diff --git a/haddock.txt b/haddock.txt index 9320a37b1..42afae805 100644 --- a/haddock.txt +++ b/haddock.txt @@ -10,14 +10,13 @@ 100% ( 20 / 20) in 'HGeometry.Line.PointAndVector' 100% ( 17 / 17) in 'HGeometry.Viewport' 100% ( 17 / 17) in 'HGeometry.Graphics.Camera' + 100% ( 16 / 16) in 'HGeometry.Plane.LowerEnvelope.Connected' 100% ( 15 / 15) in 'HGeometry.Tree.Binary.Static' 100% ( 15 / 15) in 'HGeometry.Polygon.Class' - 100% ( 15 / 15) in 'HGeometry.Plane.LowerEnvelope.ConnectedNew' - 100% ( 15 / 15) in 'HGeometry.Plane.LowerEnvelope' 100% ( 15 / 15) in 'HGeometry.Permutation' 100% ( 14 / 14) in 'HGeometry.Unbounded' - 100% ( 14 / 14) in 'HGeometry.Plane.LowerEnvelope.VertexForm' 100% ( 14 / 14) in 'HGeometry.Miso.Svg' + 100% ( 13 / 13) in 'HGeometry.Sequence.Alternating' 100% ( 12 / 12) in 'HGeometry.VerticalRayShooting.PersistentSweep' 100% ( 12 / 12) in 'HGeometry.Polygon.Convex' 100% ( 12 / 12) in 'HGeometry.List.Util' @@ -26,7 +25,6 @@ 100% ( 12 / 12) in 'HGeometry.Combinatorial.Util' 100% ( 11 / 11) in 'Ipe.Writer' 100% ( 11 / 11) in 'Hiraffe.PlanarGraph.Dart' - 100% ( 11 / 11) in 'HGeometry.Sequence.Alternating' 100% ( 11 / 11) in 'HGeometry.Polygon.Monotone' 100% ( 11 / 11) in 'HGeometry.Point.Orientation' 100% ( 10 / 10) in 'Hiraffe.Graph.Class' @@ -78,6 +76,7 @@ 100% ( 5 / 5) in 'HGeometry.Polygon' 100% ( 5 / 5) in 'HGeometry.Point.EuclideanDistance' 100% ( 5 / 5) in 'HGeometry.PlaneGraph' + 100% ( 5 / 5) in 'HGeometry.Plane.LowerEnvelope' 100% ( 5 / 5) in 'HGeometry.Number.Ratio.Generalized' 100% ( 5 / 5) in 'HGeometry.Matrix.Class' 100% ( 5 / 5) in 'HGeometry.Line.NonVertical.Class' @@ -145,18 +144,14 @@ 100% ( 1 / 1) in 'HGeometry.Miso.OrphanInstances' 100% ( 1 / 1) in 'HGeometry.Instances' 96% ( 27 / 28) in 'HGeometry.Box' - 94% ( 17 / 18) in 'HGeometry.Plane.LowerEnvelope.AdjListForm' 94% ( 16 / 17) in 'Ipe.FromIpe' - 93% ( 15 / 16) in 'HGeometry.Plane.LowerEnvelope.Connected' 90% ( 10 / 11) in 'HGeometry.Miso.Svg.Canvas' 89% ( 35 / 39) in 'Ipe.IpeOut' 86% ( 20 / 23) in 'Ipe.Reader' 84% ( 11 / 13) in 'HGeometry.Algorithms.BinarySearch' 83% ( 5 / 6) in 'HGeometry.Polygon.Triangulation' 83% ( 5 / 6) in 'HGeometry.Line' - 83% ( 5 / 6) in 'HGeometry.ConvexHull.R3.Naive' 81% ( 9 / 11) in 'Ipe.PathParser' - 80% ( 4 / 5) in 'HGeometry.Plane.LowerEnvelope.Naive' 80% ( 4 / 5) in 'HGeometry.HalfPlane.CommonIntersection' 75% ( 3 / 4) in 'HGeometry.Plane.LowerEnvelope.Connected.Graph' 70% ( 14 / 20) in 'HGeometry.LineSegment.Intersection.BentleyOttmann' @@ -165,13 +160,13 @@ 66% ( 12 / 18) in 'HGeometry.LineSegment.Intersection.Naive' 66% ( 2 / 3) in 'Ipe.Layer' 66% ( 2 / 3) in 'Hiraffe.BFS.Pure' + 66% ( 2 / 3) in 'HGeometry.Plane.LowerEnvelope.Naive' 58% ( 47 / 80) in 'Ipe.Attributes' 52% ( 37 / 71) in 'Ipe.Types' 50% ( 1 / 2) in 'HGeometry.SegmentTree.CanonicalSubSet' 50% ( 1 / 2) in 'HGeometry.Polygon.Instances' 40% ( 2 / 5) in 'HGeometry.Miso.Canvas.Zoom' 40% ( 2 / 5) in 'HGeometry.GeoJSON' - 40% ( 2 / 5) in 'HGeometry.ConvexHull.R3.Naive.Dual' 38% ( 13 / 34) in 'Ipe.Content' 33% ( 1 / 3) in 'HGeometry.Kernel.Test.Box' 30% ( 4 / 13) in 'Ipe.IpeToIpe' diff --git a/haddocks/doc-index-A.html b/haddocks/doc-index-A.html index 1b17fb8f4..99ffc6e3b 100644 --- a/haddocks/doc-index-A.html +++ b/haddocks/doc-index-A.html @@ -1 +1 @@ - (Index - A)
 

Index - A

AboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
accessHGeometry.Tree.Binary.Static
activeLayerIpe.Types, Ipe
Additive_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
addStyleSheetIpe.Types, Ipe
addStyleSheetFromIpe.Reader, Ipe
AffineIpe.Attributes, Ipe
affineTransformationHGeometry.Ellipse
Affine_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
AfterHGeometry.Interval.Class, HGeometry.Interval
AlignBaselineIpe.Attributes, Ipe
AlignBottomIpe.Attributes, Ipe
alignedOriginHGeometry.Viewport
AlignHCenterIpe.Attributes, Ipe
AlignLeftIpe.Attributes, Ipe
AlignRightIpe.Attributes, Ipe
AlignTopIpe.Attributes, Ipe
AlignVCenterIpe.Attributes, Ipe
AllIpe.IpeToIpe
allChildrenHGeometry.Tree.Util
AllColinearHGeometry.VoronoiDiagram
AllFalseHGeometry.Algorithms.BinarySearch
allNextsHGeometry.List.Zipper
allNonEmptyNextsHGeometry.List.Zipper
allPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
allSimplePolygonsHGeometry.Polygon.Instances
allTreesHGeometry.Tree.Util
AllTrueHGeometry.Algorithms.BinarySearch
Alternating 
1 (Type/Class)HGeometry.Sequence.Alternating
2 (Data Constructor)HGeometry.Sequence.Alternating
ancestorsHGeometry.Tree.Util
anchorPointHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
AnClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnEndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnOpenEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
applyHGeometry.Permutation
applyMatricesIpe.Matrix
applyMatricesPageIpe.Matrix
applyMatrixIpe.Matrix
applyMatrix'Ipe.Matrix
arbitraryPointInBoundingBoxHGeometry.Kernel.Test.Box
ArcSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ArcToIpe.Path
areaHGeometry.Polygon
area2XHGeometry.Polygon
AroundEndHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundStartHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
ArrowIpe.Attributes, Ipe
arrowNameIpe.Attributes, Ipe
arrowSizeIpe.Attributes, Ipe
ArrowSym0Ipe.Attributes, Ipe
AsA 
1 (Data Constructor)HGeometry.Ext
2 (Type/Class)HGeometry.Ext
asAnEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
asAnIntervalHGeometry.Interval
asBalancedBinLeafTreeHGeometry.Tree.Binary.Static
asBalancedBinTreeHGeometry.Tree.Binary.Static
ascEndPointsHGeometry.SegmentTree.Base, HGeometry.SegmentTree
asClosedIntervalHGeometry.Interval
asCoreHGeometry.Ext
AsExtHGeometry.Ext
AsFixedHGeometry.Number.Real.Rational
asFixedHGeometry.Number.Real.Rational
asIndexedExtHGeometry.Ext
asMonotonePolygonHGeometry.Polygon.Monotone
asNonVerticalHyperPlaneHGeometry.HyperPlane.NonVertical
asOpenIntervalHGeometry.Interval
asPointHGeometry, HGeometry.Kernel, HGeometry.Point
asPointLocationResultHGeometry.Boundary
asSimplePolygonHGeometry.Polygon.WithHoles
AssociatedHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegmentsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
asTriangleHGeometry.Polygon
AsVector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
asVertexHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
Attr 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
attrIpe.Attributes, Ipe
AttributesIpe.Attributes, Ipe
attributesIpe.Content, Ipe.Types, Ipe
Attributes'Ipe.Content, Ipe.Types, Ipe
AttributesOfIpe.Content, Ipe.Types, Ipe
AttributeUniverseIpe.Attributes, Ipe
AttrMapIpe.Content, Ipe.Types, Ipe
AttrMapSym1Ipe.Content, Ipe.Types, Ipe
attrNameIpe.Attributes, Ipe
AttrsIpe.Attributes, Ipe
\ No newline at end of file + (Index - A)
 

Index - A

AboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
accessHGeometry.Tree.Binary.Static
activeLayerIpe.Types, Ipe
Additive_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
addStyleSheetIpe.Types, Ipe
addStyleSheetFromIpe.Reader, Ipe
AffineIpe.Attributes, Ipe
affineTransformationHGeometry.Ellipse
Affine_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
AfterHGeometry.Interval.Class, HGeometry.Interval
AlignBaselineIpe.Attributes, Ipe
AlignBottomIpe.Attributes, Ipe
alignedOriginHGeometry.Viewport
AlignHCenterIpe.Attributes, Ipe
AlignLeftIpe.Attributes, Ipe
AlignRightIpe.Attributes, Ipe
AlignTopIpe.Attributes, Ipe
AlignVCenterIpe.Attributes, Ipe
AllIpe.IpeToIpe
allChildrenHGeometry.Tree.Util
AllColinearHGeometry.VoronoiDiagram
AllFalseHGeometry.Algorithms.BinarySearch
allNextsHGeometry.List.Zipper
allNonEmptyNextsHGeometry.List.Zipper
allPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
allSimplePolygonsHGeometry.Polygon.Instances
allTreesHGeometry.Tree.Util
AllTrueHGeometry.Algorithms.BinarySearch
Alternating 
1 (Type/Class)HGeometry.Sequence.Alternating
2 (Data Constructor)HGeometry.Sequence.Alternating
ancestorsHGeometry.Tree.Util
anchorPointHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
AnClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnEndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnOpenEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
applyHGeometry.Permutation
applyMatricesIpe.Matrix
applyMatricesPageIpe.Matrix
applyMatrixIpe.Matrix
applyMatrix'Ipe.Matrix
arbitraryPointInBoundingBoxHGeometry.Kernel.Test.Box
ArcSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ArcToIpe.Path
areaHGeometry.Polygon
area2XHGeometry.Polygon
AroundEndHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundStartHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
ArrowIpe.Attributes, Ipe
arrowNameIpe.Attributes, Ipe
arrowSizeIpe.Attributes, Ipe
ArrowSym0Ipe.Attributes, Ipe
AsA 
1 (Data Constructor)HGeometry.Ext
2 (Type/Class)HGeometry.Ext
asAnEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
asAnIntervalHGeometry.Interval
asBalancedBinLeafTreeHGeometry.Tree.Binary.Static
asBalancedBinTreeHGeometry.Tree.Binary.Static
ascEndPointsHGeometry.SegmentTree.Base, HGeometry.SegmentTree
asClosedIntervalHGeometry.Interval
asCoreHGeometry.Ext
AsExtHGeometry.Ext
AsFixedHGeometry.Number.Real.Rational
asFixedHGeometry.Number.Real.Rational
asIndexedExtHGeometry.Ext
asMap 
1 (Function)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
2 (Function)HGeometry.VoronoiDiagram
asMonotonePolygonHGeometry.Polygon.Monotone
asNonVerticalHyperPlaneHGeometry.HyperPlane.NonVertical
asOpenIntervalHGeometry.Interval
asPointHGeometry, HGeometry.Kernel, HGeometry.Point
asPointLocationResultHGeometry.Boundary
asSimplePolygonHGeometry.Polygon.WithHoles
AssociatedHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegmentsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
asTriangleHGeometry.Polygon
AsVector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
Attr 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
attrIpe.Attributes, Ipe
AttributesIpe.Attributes, Ipe
attributesIpe.Content, Ipe.Types, Ipe
Attributes'Ipe.Content, Ipe.Types, Ipe
AttributesOfIpe.Content, Ipe.Types, Ipe
AttributeUniverseIpe.Attributes, Ipe
AttrMapIpe.Content, Ipe.Types, Ipe
AttrMapSym1Ipe.Content, Ipe.Types, Ipe
attrNameIpe.Attributes, Ipe
AttrsIpe.Attributes, Ipe
\ No newline at end of file diff --git a/haddocks/doc-index-All.html b/haddocks/doc-index-All.html index 18e106af3..da74d5aa0 100644 --- a/haddocks/doc-index-All.html +++ b/haddocks/doc-index-All.html @@ -1 +1 @@ - (Index)
 

Index

!Ipe.IpeOut, Ipe
!!*HGeometry.Matrix.Class, HGeometry.Matrix
!*HGeometry.Matrix.Class, HGeometry.Matrix
!*!HGeometry.Matrix.Class, HGeometry.Matrix
%HGeometry.Number.Ratio.Generalized
*!!HGeometry.Matrix.Class, HGeometry.Matrix
*^HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
.+^HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
.-.HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
.-^HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
:+ 
1 (Type/Class)HGeometry.Ext
2 (Data Constructor)HGeometry.Ext
:<<HGeometry.Sequence.NonEmpty
:>>HGeometry.Sequence.NonEmpty
:~HGeometry.Ext
<>>HGeometry.Sequence.NonEmpty
AboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
accessHGeometry.Tree.Binary.Static
activeLayerIpe.Types, Ipe
Additive_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
addStyleSheetIpe.Types, Ipe
addStyleSheetFromIpe.Reader, Ipe
AffineIpe.Attributes, Ipe
affineTransformationHGeometry.Ellipse
Affine_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
AfterHGeometry.Interval.Class, HGeometry.Interval
AlignBaselineIpe.Attributes, Ipe
AlignBottomIpe.Attributes, Ipe
alignedOriginHGeometry.Viewport
AlignHCenterIpe.Attributes, Ipe
AlignLeftIpe.Attributes, Ipe
AlignRightIpe.Attributes, Ipe
AlignTopIpe.Attributes, Ipe
AlignVCenterIpe.Attributes, Ipe
AllIpe.IpeToIpe
allChildrenHGeometry.Tree.Util
AllColinearHGeometry.VoronoiDiagram
AllFalseHGeometry.Algorithms.BinarySearch
allNextsHGeometry.List.Zipper
allNonEmptyNextsHGeometry.List.Zipper
allPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
allSimplePolygonsHGeometry.Polygon.Instances
allTreesHGeometry.Tree.Util
AllTrueHGeometry.Algorithms.BinarySearch
Alternating 
1 (Type/Class)HGeometry.Sequence.Alternating
2 (Data Constructor)HGeometry.Sequence.Alternating
ancestorsHGeometry.Tree.Util
anchorPointHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
AnClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnEndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnOpenEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
applyHGeometry.Permutation
applyMatricesIpe.Matrix
applyMatricesPageIpe.Matrix
applyMatrixIpe.Matrix
applyMatrix'Ipe.Matrix
arbitraryPointInBoundingBoxHGeometry.Kernel.Test.Box
ArcSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ArcToIpe.Path
areaHGeometry.Polygon
area2XHGeometry.Polygon
AroundEndHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundStartHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
ArrowIpe.Attributes, Ipe
arrowNameIpe.Attributes, Ipe
arrowSizeIpe.Attributes, Ipe
ArrowSym0Ipe.Attributes, Ipe
AsA 
1 (Data Constructor)HGeometry.Ext
2 (Type/Class)HGeometry.Ext
asAnEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
asAnIntervalHGeometry.Interval
asBalancedBinLeafTreeHGeometry.Tree.Binary.Static
asBalancedBinTreeHGeometry.Tree.Binary.Static
ascEndPointsHGeometry.SegmentTree.Base, HGeometry.SegmentTree
asClosedIntervalHGeometry.Interval
asCoreHGeometry.Ext
AsExtHGeometry.Ext
AsFixedHGeometry.Number.Real.Rational
asFixedHGeometry.Number.Real.Rational
asIndexedExtHGeometry.Ext
asMonotonePolygonHGeometry.Polygon.Monotone
asNonVerticalHyperPlaneHGeometry.HyperPlane.NonVertical
asOpenIntervalHGeometry.Interval
asPointHGeometry, HGeometry.Kernel, HGeometry.Point
asPointLocationResultHGeometry.Boundary
asSimplePolygonHGeometry.Polygon.WithHoles
AssociatedHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegmentsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
asTriangleHGeometry.Polygon
AsVector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
asVertexHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
Attr 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
attrIpe.Attributes, Ipe
AttributesIpe.Attributes, Ipe
attributesIpe.Content, Ipe.Types, Ipe
Attributes'Ipe.Content, Ipe.Types, Ipe
AttributesOfIpe.Content, Ipe.Types, Ipe
AttributeUniverseIpe.Attributes, Ipe
AttrMapIpe.Content, Ipe.Types, Ipe
AttrMapSym1Ipe.Content, Ipe.Types, Ipe
attrNameIpe.Attributes, Ipe
AttrsIpe.Attributes, Ipe
BackgroundIpe.IpeRender
Ball 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Ball_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
basicIpeStyleIpe.Types, Ipe
basicNamedColorsIpe.Color
basisHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
BeforeHGeometry.Interval.Class, HGeometry.Interval
BelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
belowAllHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
Bezier2HGeometry.BezierSpline
Bezier3HGeometry.BezierSpline
BezierSpline 
1 (Type/Class)HGeometry.BezierSpline
2 (Data Constructor)HGeometry.BezierSpline
BezierSplineFHGeometry.BezierSpline
BidirGraph_HGeometry.PlaneGraph
BinarySearchHGeometry.Algorithms.BinarySearch
binarySearchFirstHGeometry.Algorithms.BinarySearch
binarySearchFirstIdxInHGeometry.Algorithms.BinarySearch
binarySearchFirstInHGeometry.Algorithms.BinarySearch
binarySearchIdxInHGeometry.Algorithms.BinarySearch
binarySearchInHGeometry.Algorithms.BinarySearch
binarySearchLastHGeometry.Algorithms.BinarySearch
binarySearchLastIdxInHGeometry.Algorithms.BinarySearch
binarySearchLastInHGeometry.Algorithms.BinarySearch
BinarySearchResultHGeometry.Algorithms.BinarySearch
binarySearchUntilHGeometry.Algorithms.BinarySearch
BinaryTreeHGeometry.Tree.Binary.Static
BinLeafTreeHGeometry.Tree.Binary.Static
bisectorHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
blackIpe.Color
blankCanvasHGeometry.Miso.Svg.Canvas
blueIpe.Color
bothClosedHGeometry.Kernel.Instances
Bottom 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
BottomLeftHGeometry, HGeometry.Kernel, HGeometry.Point
BottomRightHGeometry, HGeometry.Kernel, HGeometry.Point
bottomSideHGeometry, HGeometry.Box, HGeometry.Kernel
bottomToMaybeHGeometry.Unbounded
Boundary 
1 (Type/Class)HGeometry.Boundary
2 (Data Constructor)HGeometry.Boundary
boundaryDartOfHGeometry.PlaneGraph
boundaryDartsHGeometry.PlaneGraph
boundaryDartsOfHGeometry.PlaneGraph
boundaryVerticesHGeometry.PlaneGraph
boundaryVerticesOfHGeometry.PlaneGraph
BoundedHGeometry.Plane.LowerEnvelope.ConnectedNew
BoundedRegionHGeometry.HalfPlane.CommonIntersection
BoundedVertexFHGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
boundedVerticesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
boundingBoxHGeometry, HGeometry.Box, HGeometry.Kernel
BoundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace, HGeometry.HalfSpace
boundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace
Box 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
Box_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
brownIpe.Color
bruteForceLowerEnvelopeHGeometry.Plane.LowerEnvelope.ConnectedNew
buildHGeometry.Algorithms.LogarithmicMethod
buildClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
buildFailureFunctionHGeometry.StringSearch.KMP
buildIntervalHGeometry.Interval.Class, HGeometry.Interval
buildRangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
buildSegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
buildSkeletonHGeometry.SegmentTree.Base, HGeometry.SegmentTree
ButtonHGeometry.Miso.Event.Extra
Camera 
1 (Type/Class)HGeometry.Graphics.Camera
2 (Data Constructor)HGeometry.Graphics.Camera
cameraNormalHGeometry.Graphics.Camera
cameraPositionHGeometry.Graphics.Camera
cameraTransformHGeometry.Graphics.Camera
CanDeleteHGeometry.Measured.Class, HGeometry.Measured
CanInsertHGeometry.Measured.Class, HGeometry.Measured
canonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
CanvasHGeometry.Miso.Svg.Canvas
CardinalDirectionHGeometry.Direction
CCP 
1 (Type/Class)HGeometry.ClosestPair.DivideAndConquer
2 (Data Constructor)HGeometry.ClosestPair.DivideAndConquer
CCW 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
ccwPredecessorOfHGeometry.Polygon.Class, HGeometry.Polygon
ccwSuccessorOfHGeometry.Polygon.Class, HGeometry.Polygon
centerHGeometry.Ball.Class, HGeometry.Ball
centeredOriginHGeometry.Viewport
centerPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
centroidHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
Chain 
1 (Type/Class)HGeometry.HalfPlane.CommonIntersection
2 (Data Constructor)HGeometry.HalfPlane.CommonIntersection
Circle 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
circleToEllipseHGeometry.Ellipse
CircularListHGeometry.Plane.LowerEnvelope.ConnectedNew
clampToHGeometry.Interval.Class, HGeometry.Interval
classifyVerticesHGeometry.Polygon.Triangulation.MakeMonotone
ClipIpe.Attributes, Ipe
ClipSym0Ipe.Attributes, Ipe
ClosedHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
ClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
ClosedInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
ClosedInterval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
ClosedLineSegment 
1 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
ClosedLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ClosedSplineIpe.Path
ClosedSplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ClosePathIpe.Path
closestPair 
1 (Function)HGeometry.ClosestPair.DivideAndConquer, HGeometry.ClosestPair
2 (Function)HGeometry.ClosestPair.Naive
closestPairWithHGeometry.ClosestPair.Naive
cmpByDistanceToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
cmpInDirection 
1 (Function)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Function)HGeometry.HyperPlane
cmpSlopeHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
cmpXHGeometry.Polygon.Triangulation.MakeMonotone
CoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
columnHGeometry.Matrix.Class, HGeometry.Matrix
CommonAttributesIpe.Attributes, Ipe
commonAttributesIpe.Content, Ipe.Types, Ipe
CommonIntersectionHGeometry.HalfPlane.CommonIntersection
commonIntersectionHGeometry.HalfPlane.CommonIntersection
CompareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalExactHGeometry.Interval.Class, HGeometry.Interval
compare_HGeometry.Ord.Dynamic
componentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
component'HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
componentsHGeometry, HGeometry.Kernel, HGeometry.Vector
computeDiagonals 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation.MakeMonotone
3 (Function)HGeometry.Polygon.Triangulation
computeVertexFormHGeometry.Plane.LowerEnvelope.ConnectedNew
ConnectedEnvelopeHGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
ConnectedVDHGeometry.VoronoiDiagram
consHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
consElemWithHGeometry.Sequence.Alternating
constantHGeometry.Number.Real.Symbolic
constantFactorHGeometry.Number.Real.Symbolic
ConstructableClosedInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableHyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
ConstructableInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ConstructableOpenInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructablePoint_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
ConstructablePolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
ConstructableSimplePolygonHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple, HGeometry.Polygon.Simple
constructTreeHGeometry.Tree.Util
contentIpe.Types, Ipe
contentInViewIpe.Types, Ipe
ConversionErrorIpe.Reader, Ipe
ConvexHullHGeometry.ConvexHull.R3.Naive
convexHull 
1 (Function)HGeometry.ConvexHull.QuickHull
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan, HGeometry.ConvexHull
4 (Function)HGeometry.ConvexHull.DivideAndConquer
5 (Function)HGeometry.ConvexHull.Melkman
ConvexPolygonHGeometry.Polygon.Convex
ConvexPolygonFHGeometry.Polygon.Convex
ConvexPolygon_HGeometry.Polygon.Convex.Class, HGeometry.Polygon.Convex
coordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coord'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
CoordinateIpe.PathParser, Ipe.Reader
coordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coreHGeometry.Ext
CoreOfHGeometry.Ext
Corners 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
corners 
1 (Function)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Triangle.Class, HGeometry.Triangle
cornersInDirectionHGeometry, HGeometry.Box, HGeometry.Kernel
Count 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
CPHGeometry.ClosestPair.DivideAndConquer
createTreeHGeometry.IntervalTree
Crop 
1 (Type/Class)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeRender
cropIpe.IpeRender
crossHGeometry, HGeometry.Kernel, HGeometry.Vector
CubicBezierHGeometry.BezierSpline
CubicBezierSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
currentLevelHGeometry.Viewport
CurveToIpe.Path
CWHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
cycleOfHGeometry.Permutation
cycleRepHGeometry.Permutation
Cyclic 
1 (Type/Class)HGeometry.Cyclic
2 (Data Constructor)HGeometry.Cyclic
darkblueIpe.Color
darkcyanIpe.Color
darkgrayIpe.Color
darkgreenIpe.Color
darkmagentaIpe.Color
darkorangeIpe.Color
darkredIpe.Color
DartHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartAtHGeometry.PlaneGraph
DartIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartsHGeometry.PlaneGraph
dartSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
dartSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
DashIpe.Attributes, Ipe
DashNamedIpe.Attributes, Ipe
DashPatternIpe.Attributes, Ipe
DashSym0Ipe.Attributes, Ipe
dCircleHGeometry.Miso.Svg, HGeometry.Svg
dCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
dDiskHGeometry.Miso.Svg, HGeometry.Svg
decodeYAMLHGeometry.YAML
decodeYAMLFileHGeometry.YAML
defaultBoxIpe.IpeOut, Ipe
DefaultFromIpeIpe.FromIpe, Ipe
defaultFromIpeIpe.FromIpe, Ipe
DefaultIpeOutIpe.IpeOut, Ipe, Ipe
defaultOptions 
1 (Function)Ipe.IpeRender
2 (Function)Ipe.IpeToIpe
DefaultTransformByConstraintsHGeometry.Transformation
Definers 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Type/Class)HGeometry.Plane.LowerEnvelope.VertexForm
definers 
1 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Function)HGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
defIOIpe.IpeOut, Ipe
deleteHGeometry.IntervalTree
deleteAllByHGeometry.Set.Util
deleteMeasureHGeometry.Measured.Class, HGeometry.Measured
denominatorHGeometry.Number.Ratio.Generalized
DepthIpe.Attributes, Ipe
DepthSym0Ipe.Attributes, Ipe
destinationHGeometry.Plane.LowerEnvelope
detHGeometry.Matrix.Class, HGeometry.Matrix
Diagonal 
1 (Type/Class)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Polygon.Triangulation
diGraphFromAdjacencyListsHGeometry.PlaneGraph
DiGraphFromAdjListExtraConstraintsHGeometry.PlaneGraph, HGeometry.PlaneGraph
DiGraph_HGeometry.PlaneGraph
DimensionHGeometry.Properties
dimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
directionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
Disk 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Disk_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
DistanceFunctionHGeometry.ClosestPair.Naive
divideAndConquerHGeometry.Algorithms.DivideAndConquer
divideAndConquer1HGeometry.Algorithms.DivideAndConquer
divideAndConquer1WithHGeometry.Algorithms.DivideAndConquer
dLineSegmentHGeometry.Miso.Svg, HGeometry.Svg
dotHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
douglasPeuckerHGeometry.PolyLine.Simplification.DouglasPeucker
DownHGeometry.Miso.Event.Extra
dPointHGeometry.Miso.Svg, HGeometry.Svg
dPolyLineHGeometry.Miso.Svg, HGeometry.Svg
drawHGeometry.Miso.Svg, HGeometry.Svg
DrawableHGeometry.Miso.Svg, HGeometry.Svg
drawTreeHGeometry.Tree.Binary.Static
drawTree'HGeometry.Tree.Binary.Static
drawWithHGeometry.Miso.Svg, HGeometry.Svg
dRectangleHGeometry.Miso.Svg, HGeometry.Svg
dropNextHGeometry.List.Zipper
dSimplePolygonHGeometry.Miso.Svg, HGeometry.Svg
dualGraphHGeometry.PlaneGraph
DualGraphOfHGeometry.PlaneGraph, HGeometry.PlaneGraph
dualHyperPlaneHGeometry.Duality
dualLineHGeometry.Duality
dualPointHGeometry.Duality
durationHGeometry.Interval.Class, HGeometry.Interval
E 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected.Graph
EastHGeometry.Direction
eastHGeometry, HGeometry.Box, HGeometry.Kernel
Edge 
1 (Type/Class)HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
2 (Data Constructor)HGeometry.Plane.LowerEnvelope
edgeAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
edgeGeometriesHGeometry.VoronoiDiagram
EdgeGeometryHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
EdgeIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
edgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
edgeSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
edgeSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
ElemHGeometry.Algorithms.BinarySearch
ElemCyclicHGeometry.Cyclic
elementsHGeometry.Matrix.Class, HGeometry.Matrix
elemsHGeometry.Permutation
Ellipse 
1 (Data Constructor)Ipe.Path
2 (Type/Class)HGeometry.Ellipse
3 (Data Constructor)HGeometry.Ellipse
ellipseMatrixHGeometry.Ellipse
EllipseSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ellipseToCircleHGeometry.Ellipse
emptyHGeometry.Algorithms.LogarithmicMethod
EmptyIntersectionHGeometry.HalfPlane.CommonIntersection
emptyPageIpe.Types, Ipe
encodeYAMLHGeometry.YAML
encodeYAMLFileHGeometry.YAML
encodingIpe.Types, Ipe
EndHGeometry.Polygon.Triangulation.MakeMonotone
endHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
endPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
endPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
endPointsHGeometry.PlaneGraph
endPointsOfHGeometry.PlaneGraph
EndPointTypeHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
endPointTypeHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EndPoint_HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EntireFileIpe.IpeToIpe
EntireLineHGeometry.HalfPlane.CommonIntersection
EOFillIpe.Attributes, Ipe
EPSIpe.IpeRender
epsHGeometry.Number.Real.Symbolic
EpsFoldHGeometry.Number.Real.Symbolic
euclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
evalAtHGeometry.HyperPlane.Class, HGeometry.HyperPlane
evalAt'HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
evalEpsHGeometry.Number.Real.Symbolic
evalHyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
ExactHGeometry.Number.Real.Rational
Export 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
exportIpe.IpeToIpe
extHGeometry.Ext
extentHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
extraHGeometry.Ext
extractMinimaBy 
1 (Function)HGeometry.NonEmpty.Util
2 (Function)HGeometry.List.Util
extractNextHGeometry.List.Zipper
extractOrd1HGeometry.Ord.Dynamic
extractOrd2HGeometry.Ord.Dynamic
ExtraOfHGeometry.Ext
extremesHGeometry.Polygon.Class, HGeometry.Polygon
FaceHGeometry.PlaneGraph, HGeometry.PlaneGraph
faceAtHGeometry.PlaneGraph
FaceIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
facesHGeometry.PlaneGraph
FacetHGeometry.ConvexHull.R3.Naive.Dual
facetsHGeometry.ConvexHull.R3.Naive.Dual
factorsHGeometry.Number.Real.Symbolic
farDistHGeometry.Graphics.Camera
FileType 
1 (Type/Class)Ipe.IpeRender
2 (Type/Class)Ipe.IpeToIpe
FillIpe.Attributes, Ipe
FillRuleIpe.Attributes, Ipe
FillRuleSym0Ipe.Attributes, Ipe
FillSym0Ipe.Attributes, Ipe
FillTypeIpe.Attributes, Ipe
findEvertHGeometry.Tree.Util
findEvert'HGeometry.Tree.Util
findNodeHGeometry.Tree.Util
findNodesHGeometry.Tree.Util
findPathHGeometry.Tree.Util
findSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
firstChildHGeometry.Tree.Util
firstTrueHGeometry.Algorithms.BinarySearch
fitToBoxHGeometry.Transformation
fitToBoxTransformHGeometry.Transformation
flattenGroupsIpe.Content
flipAxesHGeometry.Graphics.Camera
flipEdgeHGeometry.Plane.LowerEnvelope
FlipsAtHGeometry.Algorithms.BinarySearch
flipSignHGeometry.Sign
flipYHGeometry.Viewport
focusHGeometry.Tree.Util
foldBinaryUpHGeometry.Tree.Binary.Static
folding1HGeometry.Lens.Util
foldMapZipHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
foldUpHGeometry.Tree.Binary.Static
foldUpDataHGeometry.Tree.Binary.Static
frechetDistanceWithHGeometry.PolyLine.Frechet.Discrete
fromAdjacencyListsHGeometry.PlaneGraph
fromAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
fromBoundaryPointsHGeometry.Ball.Class, HGeometry.Ball
fromCCWListHGeometry.Plane.LowerEnvelope.ConnectedNew
fromCenterAndPointHGeometry.Ball.Class, HGeometry.Ball
fromCenterAndSquaredRadiusHGeometry.Ball.Class, HGeometry.Ball
fromContentIpe.Types, Ipe
fromDiametralPairHGeometry.Ball.Class, HGeometry.Ball
fromEmbeddingHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
fromExtentHGeometry, HGeometry.Box, HGeometry.Kernel
fromFixedHGeometry.Number.Real.Rational
fromFoldableHGeometry.Foldable.Util
fromFoldable1HGeometry.Foldable.Util
fromGroupedAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromIntervalsHGeometry.IntervalTree
fromIpeXMLIpe.Reader
fromLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
fromList 
1 (Function)HGeometry.Foldable.Util
2 (Function)HGeometry.List.Zipper
fromListByHGeometry.Set.Util
fromNonEmptyHGeometry.Foldable.Util
fromNonEmptyWithHGeometry.Sequence.Alternating
fromPointAndNormalHGeometry.HyperPlane.Class, HGeometry.HyperPlane
fromPointAndVecHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
fromPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
fromSeqIpe.PathParser, Ipe.Reader
fromSimplePolygonHGeometry.Polygon.Convex
fromSizeHGeometry.Viewport
fromVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
fromVertexForm 
1 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Function)HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
fromVertexForm'HGeometry.Plane.LowerEnvelope.Connected
GAttrIpe.Attributes, Ipe
generateHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
generateAHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
generateMatrixHGeometry.Matrix.Class, HGeometry.Matrix
GeoPositionWithoutCRS'HGeometry.GeoJSON
getAttrIpe.Attributes, Ipe
getBoundingClientRectHGeometry.Miso.FFI.Extra
getPositiveDartHGeometry.PlaneGraph
goldIpe.Color
goNextHGeometry.List.Zipper
goPrevHGeometry.List.Zipper
GradientIpe.Attributes, Ipe
GradientSym0Ipe.Attributes, Ipe
GraphFromAdjListExtraConstraintsHGeometry.PlaneGraph, HGeometry.PlaneGraph
Graph_HGeometry.PlaneGraph
GRatioHGeometry.Number.Ratio.Generalized
grayIpe.Color
greenIpe.Color
Group 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
GroupAttributesIpe.Attributes, Ipe
groupBy'HGeometry.List.Util
groupItemsIpe.Content, Ipe.Types, Ipe
HalfLine 
1 (Type/Class)HGeometry.HalfLine
2 (Data Constructor)HGeometry.HalfLine
HalfLineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
halfLineThroughHGeometry.HalfLine
HalfLine_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfLine_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfOpenInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
HalfPlane_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace 
1 (Type/Class)HGeometry.HalfSpace
2 (Data Constructor)HGeometry.HalfSpace
HalfSpaceFHGeometry.HalfSpace
halfSpaceSignHGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HAlignIpe.Attributes, Ipe
HAlignSym0Ipe.Attributes, Ipe
handleInternalCanvasActionHGeometry.Miso.Svg.Canvas
HasCanonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
HasCenterHGeometry.Ball.Class, HGeometry.Ball
HasComponentsHGeometry, HGeometry.Kernel, HGeometry.Vector
HasCoordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasDartsHGeometry.PlaneGraph
HasDarts'HGeometry.PlaneGraph
HasDefaultFromIpeIpe.FromIpe, Ipe
HasDefaultIpeOutIpe.IpeOut, Ipe
HasDeterminantHGeometry.Matrix.Class, HGeometry.Matrix
HasDimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
HasDirectedTraversalsHGeometry.Cyclic
HasDirectionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasEdgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasEdges'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasElementsHGeometry.Matrix.Class, HGeometry.Matrix
HasEndHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasEndPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasFacesHGeometry.PlaneGraph
HasFaces'HGeometry.PlaneGraph
HasFromFoldableHGeometry.Foldable.Util
HasFromFoldable1HGeometry.Foldable.Util
HasHolesHGeometry.Polygon.Class, HGeometry.Polygon
HasIndexHGeometry.Indexed
HasInPolygonHGeometry.Polygon.Simple
HasIntersectionWithHGeometry.Intersection
HasMaxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMinPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMousePositionHGeometry.Miso.Svg.Canvas
hasNoPertubationHGeometry.Number.Real.Symbolic
hasNoSelfIntersectionsHGeometry.Polygon.Simple
HasOnLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
HasOnSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasOuterBoundaryHGeometry.Polygon.Class, HGeometry.Polygon
HasPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasPoints'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasSquaredEuclideanDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
HasStartHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasStartPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasSupportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasUnboundedEdgesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
HasVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasVerticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
hasVerticesHGeometry.Plane.LowerEnvelope.VertexForm
HasVertices'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasZoomLevelHGeometry.Miso.Canvas.Zoom
Has_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headOfHGeometry.PlaneGraph
HeightIpe.Attributes, Ipe
heightHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HeightSym0Ipe.Attributes, Ipe
HoleHGeometry.Polygon.Class, HGeometry.Polygon
holeAtHGeometry.Polygon.Class, HGeometry.Polygon
HoleContainerHGeometry.Polygon.WithHoles
HoleFHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
HoleIxHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
holesHGeometry.Polygon.Class, HGeometry.Polygon
HorizontalIpe.Attributes, Ipe
HorizontalAlignmentIpe.Attributes, Ipe
horizontalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
hostToWorldHGeometry.Viewport
HyperPlane 
1 (Type/Class)HGeometry.HyperPlane
2 (Data Constructor)HGeometry.HyperPlane
HyperPlane2HGeometry.HyperPlane
HyperPlane3HGeometry.HyperPlane
hyperPlaneCoefficientsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneFromEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlaneFromEquationConstraintHGeometry.HyperPlane.Class, HGeometry.HyperPlane, HGeometry.HyperPlane
HyperPlaneFromPointsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneThroughHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
identityHGeometry.Transformation
identityMatrixHGeometry.Matrix.Class, HGeometry.Matrix
ifolding1HGeometry.Lens.Util
Image 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
ImageAttributesIpe.Attributes, Ipe
imageDataIpe.Content, Ipe.Types, Ipe
impliesHGeometry.Kernel.Instances
incidentEdgesBHGeometry.Plane.LowerEnvelope
incidentEdgesOfHGeometry.PlaneGraph
incidentFaceOfHGeometry.PlaneGraph
Index 
1 (Type/Class)HGeometry.Algorithms.BinarySearch
2 (Type/Class)HGeometry.Indexed
indicesHGeometry.Permutation
InHalfLineHGeometry.HalfPlane.CommonIntersection
inIntervalHGeometry.Interval.Class, HGeometry.Interval
inPolygonHGeometry.Polygon.Simple
InSegmentHGeometry.HalfPlane.CommonIntersection
insert 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
3 (Function)HGeometry.Algorithms.LogarithmicMethod
insertBreakPointsHGeometry.Sequence.Alternating
insertByHGeometry.Set.Util
insertIntoCyclicOrderHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
InsertionOnly 
1 (Type/Class)HGeometry.Algorithms.LogarithmicMethod
2 (Data Constructor)HGeometry.Algorithms.LogarithmicMethod
insertMeasureHGeometry.Measured.Class, HGeometry.Measured
insertOrdHGeometry.CircularList.Util
insertOrdByHGeometry.CircularList.Util
insertOrdBy'HGeometry.CircularList.Util
Inside 
1 (Data Constructor)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Boundary
inSimplePolygonHGeometry.Polygon.Simple
InSubLineHGeometry.HalfPlane.CommonIntersection
InterCardinalDirectionHGeometry.Direction
interCardinalsOfHGeometry.Direction
interceptHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
InteriorHGeometry.Interval.Class, HGeometry.Interval
interiorFacePolygonAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacePolygonsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacesHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorIntersectionsHGeometry.LineSegment.Intersection.BentleyOttmann
interiorToHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
InternalHGeometry.Tree.Binary.Static
InternalCanvasActionHGeometry.Miso.Svg.Canvas
InternalNodeHGeometry.Tree.Util
interpolateHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
intersectHGeometry.Intersection
IntersectConstraintsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectingHalfPlanesHGeometry.Triangle.Class, HGeometry.Triangle
IntersectionHGeometry.Intersection
intersectionLine 
1 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Function)HGeometry.Plane.LowerEnvelope.VertexForm
IntersectionOfHGeometry.Intersection, HGeometry.Ball.CenterAndRadius, HGeometry.Ball
IntersectionPointHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPoint 
1 (Function)HGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
2 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
3 (Function)HGeometry.Plane.LowerEnvelope.VertexForm
intersectionPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPointsHGeometry.LineSegment.Intersection.BentleyOttmann
IntersectionsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersections 
1 (Function)HGeometry.LineSegment.Intersection.Naive
2 (Function)HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionVectorHGeometry.Plane.LowerEnvelope.ConnectedNew
intersectsHGeometry.Intersection
Interval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
IntervalLike_HGeometry.Interval.Class, HGeometry.Interval
IntervalTreeHGeometry.IntervalTree
Interval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
Interval_x_IntervalIntersectionHGeometry.Interval
Interval_x_Interval_ContainedHGeometry.Interval
Interval_x_Interval_PartialHGeometry.Interval
Interval_x_Interval_PointHGeometry.Interval
introOrd1HGeometry.Ord.Dynamic
introOrd2HGeometry.Ord.Dynamic
inverseMatrixHGeometry.Matrix.Class, HGeometry.Matrix
inverseOfHGeometry.Transformation
InvertibleHGeometry.Matrix.Class, HGeometry.Matrix
iOIpe.IpeOut, Ipe
iO'Ipe.IpeOut, Ipe
iO''Ipe.IpeOut, Ipe
IpeArrow 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeAttributesIpe.Content, Ipe.Types, Ipe
IpeAttrNameIpe.Attributes, Ipe
ipeBezierIpe.IpeOut, Ipe
IpeBitmapIpe.Types, Ipe
ipeCircleIpe.IpeOut, Ipe
IpeColor 
1 (Type/Class)Ipe.Color, Ipe
2 (Data Constructor)Ipe.Color, Ipe
IpeDashIpe.Attributes, Ipe
ipeDiskIpe.IpeOut, Ipe
ipeDiskMarkIpe.IpeOut, Ipe
ipeEllipseIpe.IpeOut, Ipe
IpeFile 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeFileIpe.Types, Ipe
IpeGradientIpe.Attributes, Ipe
IpeGroupIpe.Content, Ipe.Types, Ipe
ipeGroupIpe.IpeOut, Ipe
ipeHalfLineIpe.IpeOut, Ipe
ipeHalfLineInIpe.IpeOut, Ipe
IpeImageIpe.Content, Ipe.Types, Ipe
ipeLabelIpe.IpeOut, Ipe
ipeLineIpe.IpeOut, Ipe
ipeLineInIpe.IpeOut, Ipe
ipeLineSegmentIpe.IpeOut, Ipe
ipeMarkIpe.IpeOut, Ipe
IpeMiniPageIpe.Content, Ipe.Types, Ipe
IpeObjectIpe.Content, Ipe.Types, Ipe
IpeObject'Ipe.Content, Ipe.Types, Ipe
ipeObject'Ipe.Content, Ipe.Types, Ipe
IpeOpacityIpe.Attributes, Ipe
IpeOutIpe.IpeOut, Ipe
IpeOut'Ipe.IpeOut, Ipe
IpePage 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpePathIpe.Content, Ipe.Types, Ipe
IpePen 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
ipePolygonIpe.IpeOut, Ipe
ipePolyLineIpe.IpeOut, Ipe
IpePreamble 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeRayIpe.IpeOut, Ipe
IpeReadIpe.Reader, Ipe
ipeReadIpe.Reader, Ipe
IpeReadAttrIpe.Reader
ipeReadAttrIpe.Reader
ipeReadAttrsIpe.Reader
ipeReadObjectIpe.Reader
ipeReadRecIpe.Reader
IpeReadTextIpe.Reader
ipeReadTextIpe.Reader
ipeReadTextWithIpe.Reader
ipeRectangleIpe.IpeOut, Ipe
ipeRenderIpe.IpeRender
ipeRenderWithIpe.IpeRender
ipeSimplePolygonIpe.IpeOut, Ipe
IpeSize 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeStyle 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpeSymbolIpe.Content, Ipe.Types, Ipe
IpeTextLabelIpe.Content, Ipe.Types, Ipe
IpeTilingIpe.Attributes, Ipe
ipeToIpeIpe.IpeToIpe
ipeToIpeWithIpe.IpeToIpe
IpeUseIpe.Content, Ipe.Types, Ipe
IpeValueIpe.Value, Ipe
IpeWriteIpe.Writer, Ipe
ipeWriteIpe.Writer, Ipe
ipeWriteAttrsIpe.Writer
IpeWriteTextIpe.Writer, Ipe
ipeWriteTextIpe.Writer, Ipe
IsBoxableHGeometry, HGeometry.Box, HGeometry.Kernel
isCoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
isConvexHGeometry.Polygon.Convex
IsEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
isIdenticalToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isInteriorIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
IsIntersectableWithHGeometry.Intersection
isMonotoneHGeometry.Polygon.Monotone
isParallelToHGeometry.HyperPlane.Class, HGeometry.HyperPlane
isPerpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isScalarMultipleOfHGeometry, HGeometry.Kernel, HGeometry.Vector
isShiftOf 
1 (Function)HGeometry.CircularList.Util
2 (Function)HGeometry.Cyclic
isStrictlyConvexHGeometry.Polygon.Convex
isSubStringOfHGeometry.StringSearch.KMP
IsTransformableHGeometry.Transformation
isValidIntervalHGeometry.Kernel.Instances
isValidTriangleHGeometry.ConvexHull.R3.Naive
itoNonEmptyOfHGeometry.Lens.Util
ixAttrIpe.Attributes, Ipe
joinHGeometry.Set.Util
kmpMatchHGeometry.StringSearch.KMP
LabelIpe.Content, Ipe.Types, Ipe
labelledIpe.IpeOut, Ipe
labelledWithIpe.IpeOut, Ipe
labelWithHGeometry.Indexed
labelWith'HGeometry.Indexed
labelWithIndexHGeometry.Indexed
lastHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lastFalseHGeometry.Algorithms.BinarySearch
LayerIpe.Attributes, Ipe
LayerName 
1 (Type/Class)Ipe.Layer, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Layer, Ipe.Types, Ipe
layerNameIpe.Layer, Ipe.Types, Ipe
layerNamesIpe.Types, Ipe
layersIpe.Types, Ipe
LayerSym0Ipe.Attributes, Ipe
LeafHGeometry.Tree.Binary.Static
LeafNodeHGeometry.Tree.Util
leaveOutOneHGeometry.List.Util
LEEdgeHGeometry.Plane.LowerEnvelope
LeftButtonHGeometry.Miso.Event.Extra
leftFaceOfHGeometry.PlaneGraph
leftHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
leftPlaneHGeometry.Plane.LowerEnvelope
LeftSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
leftSideHGeometry, HGeometry.Box, HGeometry.Kernel
leftTangentHGeometry.Polygon.Convex.Tangents
lerpHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
levelsHGeometry.Tree.Util
LEVertex 
1 (Data Constructor)HGeometry.Plane.LowerEnvelope.VertexForm
2 (Type/Class)HGeometry.Plane.LowerEnvelope.VertexForm
liesAboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liesBelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liftI2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftI2AHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftOrd1HGeometry.Ord.Dynamic
liftPointToPlaneHGeometry.Duality
liftU2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lightblueIpe.Color
lightcyanIpe.Color
lightgrayIpe.Color
lightgreenIpe.Color
lightyellowIpe.Color
Line2_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
lineAtHGeometry.Line.LowerEnvelope
LineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
LineCapIpe.Attributes, Ipe
LineCapSym0Ipe.Attributes, Ipe
LineEQ 
1 (Type/Class)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
LineHalfLineIntersectionHGeometry.HalfLine
LineJoinIpe.Attributes, Ipe
LineJoinSym0Ipe.Attributes, Ipe
LineLineIntersectionHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineIntersectionGHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LinePV 
1 (Type/Class)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
LineSegment 
1 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegmentLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_ 
1 (Type/Class)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
lineThroughHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
LineToIpe.Path
Line_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
Line_x_Ball_PointHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Ball_SegmentHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_HalfLine_HalfLineHGeometry.HalfLine
Line_x_HalfLine_PointHGeometry.HalfLine
Line_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_Line_LineHGeometry, HGeometry.Line, HGeometry.Kernel
Line_x_Line_PointHGeometry, HGeometry.Line, HGeometry.Kernel
listIntervalsHGeometry.IntervalTree
litIpe.Literal
literallyIpe.Literal
litFileIpe.Literal
locationHGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
location2HGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
LogarithmicMethodDSHGeometry.Algorithms.LogarithmicMethod
lookupAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAttrIpe.Attributes, Ipe
lookupIdxHGeometry.Permutation
lookupLEVertexHGeometry.Line.LowerEnvelope
LossyHGeometry.Number.Real.Rational
LowerEnvelope 
1 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
2 (Type/Class)HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
3 (Type/Class)HGeometry.Line.LowerEnvelope
4 (Data Constructor)HGeometry.Line.LowerEnvelope
lowerEnvelope 
1 (Function)HGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
2 (Function)HGeometry.Line.LowerEnvelope
LowerEnvelope'HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
LowerEnvelopeFHGeometry.Line.LowerEnvelope
lowerEnvelopeVertexFormHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
lowerHull 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
3 (Function)HGeometry.ConvexHull.DivideAndConquer
lowerHull' 
1 (Function)HGeometry.ConvexHull.R3.Naive
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan
lowerHullAllHGeometry.ConvexHull.R3.Naive
lowerTangentHGeometry.Polygon.Convex.Tangents
lowerTangent'HGeometry.Polygon.Convex.Tangents
makeMonotoneHGeometry.Polygon.Triangulation.MakeMonotone
mapFHGeometry.Sequence.Alternating
MarkedViewIpe.IpeToIpe
markedViewIpe.IpeToIpe
Matrix 
1 (Data Constructor)Ipe.Attributes, Ipe
2 (Type/Class)HGeometry.Matrix
3 (Data Constructor)HGeometry.Matrix
matrixFromListHGeometry.Matrix.Class, HGeometry.Matrix
matrixFromRowsHGeometry.Matrix.Class, HGeometry.Matrix
MatrixSym0Ipe.Attributes, Ipe
matrixToMisoStringHGeometry.Miso.Svg.StaticCanvas
Matrix_HGeometry.Matrix.Class, HGeometry.Matrix
maximumMaybeHGeometry.List.Util
maximumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
maxInDirectionHGeometry.Polygon.Convex
MaxInfinityHGeometry.Unbounded
maxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
measureHGeometry.Measured.Class, HGeometry.Measured
MeasuredHGeometry.Measured.Class, HGeometry.Measured
MergeHGeometry.Polygon.Triangulation.MakeMonotone
mergeHGeometry.Algorithms.LogarithmicMethod
mergeAlternatingHGeometry.Sequence.Alternating
mergeDefinersHGeometry.Plane.LowerEnvelope.ConnectedNew
mergePairsHGeometry.ClosestPair.DivideAndConquer
mergeSortedHGeometry.Algorithms.DivideAndConquer
mergeSortedByHGeometry.Algorithms.DivideAndConquer
mergeSortedListsHGeometry.Algorithms.DivideAndConquer
mergeSortedListsByHGeometry.Algorithms.DivideAndConquer
Metric_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
MiddleButtonHGeometry.Miso.Event.Extra
minimaByHGeometry.List.Util
minimaOnHGeometry.List.Util
MinimizationDiagramHGeometry.Plane.LowerEnvelope.ConnectedNew
minimumMaybeHGeometry.List.Util
minimumMaybeByHGeometry.List.Util
minimumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
MinInfinityHGeometry.Unbounded
MiniPage 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
MiniPageAttributesIpe.Attributes, Ipe
minkowskiSumHGeometry.Polygon.Convex
minPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
mkClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
mkEndPointHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
mkEpsFoldHGeometry.Number.Real.Symbolic
MkHyperPlaneConstraintsHGeometry.HyperPlane
mkIntervalHGeometry.Interval.Class, HGeometry.Interval
mkIpeObjectIpe.Content, Ipe.Types, Ipe
MkLineEQHGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
mkLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
mkOpenIntervalHGeometry.Interval.Class, HGeometry.Interval
MkReportHGeometry.Measured.Report
MkSimplePolygonHGeometry.Polygon.Simple
MkSphereHGeometry.Ball.CenterAndRadius, HGeometry.Ball
mkTriangleHGeometry.Triangle.Class, HGeometry.Triangle
MkVector1HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector2HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector3HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector4HGeometry, HGeometry.Kernel, HGeometry.Vector
mkViewportHGeometry.Viewport
monotoneDirectionHGeometry.Polygon.Monotone
MonotonePolygonHGeometry.Polygon.Monotone
MonotonePolygonFHGeometry.Polygon.Monotone
mouseCoordinatesHGeometry.Miso.Svg.Canvas
mousePositionHGeometry.Miso.Svg.Canvas
MoveToIpe.Path
NamedIpe.Value, Ipe
namedIpe.Color, Ipe
NatHGeometry.Number.Real.Rational
navyIpe.Color
nearDistHGeometry.Graphics.Camera
negatedHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
NegativeHGeometry.HalfSpace, HGeometry.Sign
neighboursOfHGeometry.PlaneGraph
nextHGeometry.Permutation
nextDartOfHGeometry.PlaneGraph
nextSiblingHGeometry.Tree.Util
NilHGeometry.Tree.Binary.Static
NoIpe.Attributes, Ipe
NoAttrIpe.Attributes, Ipe
NoCropIpe.IpeRender
NodeHGeometry.Tree.Binary.Static
nodeHGeometry.Tree.Binary.Static
nonEmptyTailsHGeometry.Combinatorial.Util
NonVerticalHGeometry.Line.General
NonVerticalHyperPlane 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
NonVerticalHyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
normHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
normalArrowIpe.Attributes, Ipe
normalVectorHGeometry.HyperPlane.Class, HGeometry.HyperPlane
NorthHGeometry.Direction
northHGeometry, HGeometry.Box, HGeometry.Kernel
NorthEastHGeometry.Direction
northEastHGeometry, HGeometry.Box, HGeometry.Kernel
NorthWestHGeometry.Direction
northWestHGeometry, HGeometry.Box, HGeometry.Kernel
NoZip 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
nozipIpe.IpeToIpe
numDartsHGeometry.PlaneGraph
numEdgesHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
numeratorHGeometry.Number.Ratio.Generalized
numFacesHGeometry.PlaneGraph
NumTypeHGeometry.Properties
numVerticesHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
NVLine2_ 
1 (Type/Class)HGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
O 
1 (Type/Class)HGeometry.Ord.Dynamic
2 (Data Constructor)HGeometry.Ord.Dynamic
OnHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
OnBoundaryHGeometry.Boundary
OnBoundaryEdgeHGeometry.Boundary
onClickWithButtonHGeometry.Miso.Event.Extra
onContextMenuHGeometry.Miso.Event.Extra
OnEndHGeometry.Interval.Class, HGeometry.Interval
onHyperPlaneHGeometry.HyperPlane.Class, HGeometry.HyperPlane
onLayerIpe.Types, Ipe
OnLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
onLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
OnlyMarkedViewsIpe.IpeToIpe
onMouseClickAtHGeometry.Miso.Subscription.MouseExtra
onMouseEnterAtHGeometry.Miso.Subscription.MouseExtra
onMouseMoveAtHGeometry.Miso.Subscription.MouseExtra
onRightClickHGeometry.Miso.Event.Extra
onSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
onSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
onSideTestHGeometry.HyperPlane.Class, HGeometry.HyperPlane
onSideUpDownHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
OnSideUpDownTestHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
OnStartHGeometry.Interval.Class, HGeometry.Interval
onTouchEnd 
1 (Function)HGeometry.Miso.Event.Extra
2 (Function)HGeometry.Miso.Subscription.MouseExtra
onTouchMoveHGeometry.Miso.Event.Extra
onTouchMoveAtHGeometry.Miso.Subscription.MouseExtra
onTouchStartHGeometry.Miso.Event.Extra
onTouchStartAtHGeometry.Miso.Subscription.MouseExtra
onWheelHGeometry.Miso.Event.Extra
opacitiesStyleIpe.Types, Ipe
OpacityIpe.Attributes, Ipe
OpacitySym0Ipe.Attributes, Ipe
OpaqueBackgroundIpe.IpeRender
OpenHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
OpenEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
OpenInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
OpenInterval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
OpenLineSegment 
1 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
OpenLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
OperationIpe.Path
oppositeDirectionHGeometry.Direction
Options 
1 (Type/Class)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeRender
3 (Type/Class)Ipe.IpeToIpe
4 (Data Constructor)Ipe.IpeToIpe
OptMatrix_HGeometry.Matrix, HGeometry.Transformation
orangeIpe.Color
OrbitHGeometry.Permutation
orbitFromHGeometry.Permutation
orbitsHGeometry.Permutation
OrdAroundsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
ordAtXHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ordAtYHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
OrdDict 
1 (Type/Class)HGeometry.Ord.Dynamic
2 (Data Constructor)HGeometry.Ord.Dynamic
orientBTHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
orientLRHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
originHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
OriginalHGeometry.Polygon.Triangulation
outerBoundaryHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgeAtHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgesHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgeSegmentAtHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgeSegmentsHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryPolygonHGeometry.Polygon.WithHoles
outerBoundaryVertexAtHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryWithNeighboursHGeometry.Polygon.Class, HGeometry.Polygon
outerFaceHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
outerFaceDartHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
outerFaceIdHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
outgoingDartsOfHGeometry.PlaneGraph
outNeighboursOfHGeometry.PlaneGraph
Outside 
1 (Data Constructor)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Boundary
PageNumberIpe.IpeToIpe
pageNumberIpe.IpeRender
PageRange 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
pages 
1 (Function)Ipe.Types, Ipe
2 (Function)Ipe.IpeToIpe
ParallelPlaneHGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
ParallelStripsHGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
partition3HGeometry.List.Util
partitionIntoQuadrantsHGeometry, HGeometry.Kernel, HGeometry.Point
Path 
1 (Type/Class)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
pathIpe.IpeOut, Ipe
PathAttributesIpe.Attributes, Ipe
PathSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
pathSegmentIpe.IpeOut, Ipe
pathSegmentsIpe.Path, Ipe.Content, Ipe.Types, Ipe
pCoordinateIpe.PathParser
PDF 
1 (Data Constructor)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeToIpe
PenIpe.Attributes, Ipe
PenSym0Ipe.Attributes, Ipe
Permutation 
1 (Type/Class)HGeometry.Permutation
2 (Data Constructor)HGeometry.Permutation
perpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
perspectiveProjectionHGeometry.Graphics.Camera
perturbHGeometry.Number.Real.Symbolic
PinIpe.Attributes, Ipe
pinkIpe.Color
PinSym0Ipe.Attributes, Ipe
PinTypeIpe.Attributes, Ipe
PlanarGraph_HGeometry.PlaneGraph
Plane 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PlaneGraph 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Type/Class)HGeometry.PlaneGraph
3 (Data Constructor)HGeometry.PlaneGraph
PlaneGraph_HGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
Plane_ 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PNGIpe.IpeRender
Point 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
Point1HGeometry, HGeometry.Kernel, HGeometry.Point
Point1_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point2HGeometry, HGeometry.Kernel, HGeometry.Point
Point2_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point3HGeometry, HGeometry.Kernel, HGeometry.Point
Point3_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point4HGeometry, HGeometry.Kernel, HGeometry.Point
Point4_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
pointClosestToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
pointClosestToWithDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
PointFHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
pointFromListHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
PointLocationResultHGeometry.Boundary
PointLocationResultWithHGeometry.Boundary
pointOnHGeometry.HyperPlane.Class, HGeometry.HyperPlane
Point_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
PolygonalDomain 
1 (Type/Class)HGeometry.Polygon.WithHoles
2 (Data Constructor)HGeometry.Polygon.WithHoles
PolygonalDomainFHGeometry.Polygon.WithHoles
PolygonEdgeTypeHGeometry.Polygon.Triangulation
PolygonFaceDataHGeometry.Polygon.Triangulation
PolygonPathIpe.Path, Ipe.Content, Ipe.Types, Ipe
Polygon_HGeometry.Polygon.Class, HGeometry.Polygon
PolyLine 
1 (Type/Class)HGeometry.PolyLine
2 (Data Constructor)HGeometry.PolyLine
PolyLineFHGeometry.PolyLine
polyLineFromPointsHGeometry.PolyLine.Class, HGeometry.PolyLine
PolyLineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
PolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
pOperationIpe.PathParser
PositiveHGeometry.HalfSpace, HGeometry.Sign
pPointIpe.PathParser
preambleIpe.Types, Ipe
preambleDataIpe.Types, Ipe
prefixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
prevDartOfHGeometry.PlaneGraph
previousHGeometry.Permutation
prevSiblingHGeometry.Tree.Util
printAsIpeSelectionIpe.Writer, Ipe
printYAMLHGeometry.YAML
projectedEdgeGeometriesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
projectedEdgeGeometryHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
projectPointHGeometry, HGeometry.Kernel, HGeometry.Point
pureAttrIpe.Attributes, Ipe
purpleIpe.Color
QCurveToIpe.Path
qdHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
quadranceHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
QuadrantHGeometry, HGeometry.Kernel, HGeometry.Point
quadrantHGeometry, HGeometry.Kernel, HGeometry.Point
quadrantWithHGeometry, HGeometry.Kernel, HGeometry.Point
QuadraticBezierHGeometry.BezierSpline
QuadraticBezierSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
query 
1 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
2 (Function)HGeometry.RangeTree.Base, HGeometry.RangeTree
queryByHGeometry.Set.Util
queryWithHGeometry.Algorithms.LogarithmicMethod
RadicalHGeometry.Number.Radical
radiusHGeometry.Ball.Class, HGeometry.Ball
randomConvexHGeometry.Polygon.Convex.Random
randomMonotoneHGeometry.Polygon.Monotone
randomMonotoneDirectedHGeometry.Polygon.Monotone
randomNonZeroVectorHGeometry.Polygon.Monotone
rangeHGeometry.Viewport
rangeQueryHGeometry.RangeTree.Base, HGeometry.RangeTree
RangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
RArrowIpe.Attributes, Ipe
RArrowSym0Ipe.Attributes, Ipe
rawCameraNormalHGeometry.Graphics.Camera
rawViewUpHGeometry.Graphics.Camera
readAllIpe.FromIpe, Ipe
readAllFromIpe.FromIpe, Ipe
readCoordinateIpe.PathParser
readIpeFileIpe.Reader, Ipe
readIpeStylesheetIpe.Reader, Ipe
readMatrixIpe.PathParser
readPathOperationsIpe.PathParser
readPointIpe.PathParser
readRawIpeFileIpe.Reader, Ipe
readRectangleIpe.PathParser
readSinglePageFileIpe.Reader, Ipe
readSinglePageFileThrowIpe.Reader, Ipe
readXMLIpe.Reader
RealNumber 
1 (Type/Class)HGeometry.Number.Real.Rational
2 (Data Constructor)HGeometry.Number.Real.Rational
rectIpe.Content, Ipe.Types, Ipe
Rectangle 
1 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
Rectangle_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
redIpe.Color
reflectionHGeometry.Transformation
reflectionHHGeometry.Transformation
reflectionVHGeometry.Transformation
RegionHGeometry.Plane.LowerEnvelope.ConnectedNew
RegularHGeometry.Polygon.Triangulation.MakeMonotone
renderAsSvgByteStringHGeometry.Miso.Svg, HGeometry.Svg
renderAsSvgTextHGeometry.Miso.Svg, HGeometry.Svg
renderSvgToFileHGeometry.Miso.Svg, HGeometry.Svg
Report 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
Report1 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
ReportList 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
resolutionIpe.IpeRender
RestGeoPositionHGeometry.GeoJSON
RetainIpeInfoIpe.IpeToIpe
reverseHGeometry.Sequence.Alternating
RightButtonHGeometry.Miso.Event.Extra
rightFaceOfHGeometry.PlaneGraph
rightHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
rightPlaneHGeometry.Plane.LowerEnvelope
RightSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
rightSideHGeometry, HGeometry.Box, HGeometry.Kernel
rightTangentHGeometry.Polygon.Convex.Tangents
RigidIpe.Attributes, Ipe
rootHGeometry.Tree.Util
rotateCoordSystemHGeometry.Graphics.Camera
rotateToHGeometry.Transformation
rotationHGeometry.Transformation
roundToConstantHGeometry.Number.Real.Symbolic
rowHGeometry.Matrix.Class, HGeometry.Matrix
rowsHGeometry.Matrix.Class, HGeometry.Matrix
runLatexIpe.IpeToIpe
runOHGeometry.Ord.Dynamic
runParserIpe.PathParser
sameDirectionHGeometry, HGeometry.Kernel, HGeometry.Vector
samplePointHGeometry.Polygon.Simple.Sample
samplePolygonHGeometry.Polygon.Simple.Sample
samplePolygonsHGeometry.Polygon.Simple.Sample
SamplerHGeometry.Polygon.Simple.Sample
SArrowIpe.Attributes, Ipe
SAttributeUniverseIpe.Attributes, Ipe
scalarMultipleHGeometry, HGeometry.Kernel, HGeometry.Vector
scaleByHGeometry.Transformation
scaleUniformlyByHGeometry.Transformation
scalingHGeometry.Transformation
SClipIpe.Attributes, Ipe
screenDimensionsHGeometry.Graphics.Camera
SDashIpe.Attributes, Ipe
SDepthIpe.Attributes, Ipe
seagreenIpe.Color
searchHGeometry.IntervalTree
searchInSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
SegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
setAttrIpe.Attributes, Ipe
SFillIpe.Attributes, Ipe
SFillRuleIpe.Attributes, Ipe
SGradientIpe.Attributes, Ipe
SHAlignIpe.Attributes, Ipe
SHeightIpe.Attributes, Ipe
ShiftedEqHGeometry.Cyclic
shiftLeftHGeometry.Interval.Class, HGeometry.Interval
shiftRightHGeometry.Interval.Class, HGeometry.Interval
sideDirectionsHGeometry, HGeometry.Box, HGeometry.Kernel
Sides 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
sidesHGeometry, HGeometry.Box, HGeometry.Kernel
sides'HGeometry, HGeometry.Box, HGeometry.Kernel
SideTestHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SideTestUpDownHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
sideValuesHGeometry, HGeometry.Box, HGeometry.Kernel
SignHGeometry.HalfSpace, HGeometry.Sign
signedArea2XHGeometry.Polygon.Class, HGeometry.Polygon
signFromTermsHGeometry.Sign
signOfHGeometry.Number.Real.Symbolic
signormHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
SimplePolygonHGeometry.Polygon.Simple
SimplePolygonFHGeometry.Polygon.Simple
SimplePolygon_HGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
simplifyHGeometry.PolyLine.Simplification.ImaiIri
simplifyWithHGeometry.PolyLine.Simplification.ImaiIri
singlePageFileIpe.Types, Ipe
singlePageFromContentIpe.Types, Ipe
singleton 
1 (Function)HGeometry.Plane.LowerEnvelope.VertexForm
2 (Function)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
3 (Function)HGeometry.Algorithms.LogarithmicMethod
SingletonPointHGeometry.HalfPlane.CommonIntersection
singleViewIpe.IpeToIpe
SizeIpe.Attributes, Ipe
size 
1 (Function)HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Permutation
Sized 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
SizeSym0Ipe.Attributes, Ipe
skewXHGeometry.Transformation
SlabHGeometry.HalfPlane.CommonIntersection
SLayerIpe.Attributes, Ipe
SLineCapIpe.Attributes, Ipe
SLineJoinIpe.Attributes, Ipe
slopeHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
SMatrixIpe.Attributes, Ipe
snocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
snocElemWithHGeometry.Sequence.Alternating
SOpacityIpe.Attributes, Ipe
sortHGeometry.Foldable.Sort
sortAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
sortByHGeometry.Foldable.Sort
sortOnCheapHGeometry.Foldable.Sort
sosIndexHGeometry.Indexed
SoSRationalHGeometry.Number.Real.Symbolic
sosRationalHGeometry.Number.Real.Symbolic
SouthHGeometry.Direction
southHGeometry, HGeometry.Box, HGeometry.Kernel
SouthEastHGeometry.Direction
southEastHGeometry, HGeometry.Box, HGeometry.Kernel
SouthWestHGeometry.Direction
southWestHGeometry, HGeometry.Box, HGeometry.Kernel
SP 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
spanInHGeometry, HGeometry.LineSegment, HGeometry.Kernel
SPenIpe.Attributes, Ipe
Sphere 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
SPinIpe.Attributes, Ipe
SplineIpe.Path
SplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
SplitHGeometry.Polygon.Triangulation.MakeMonotone
splitByHGeometry.Set.Util
splitIncrHGeometry.CircularList.Util
splitL1AtHGeometry.Sequence.NonEmpty
splitOnHGeometry.Set.Util
splitR1AtHGeometry.Sequence.NonEmpty
sqrtHGeometry.Number.Radical
squaredEuclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredEuclideanDistToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredRadiusHGeometry.Ball.Class, HGeometry.Ball
SRArrowIpe.Attributes, Ipe
SSizeIpe.Attributes, Ipe
SStrokeIpe.Attributes, Ipe
SStrokeOpacityIpe.Attributes, Ipe
SStyleIpe.Attributes, Ipe
stab 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
stabsIntervalHGeometry.Interval.Class, HGeometry.Interval
StartHGeometry.Polygon.Triangulation.MakeMonotone
startHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startAndEndHGeometry.Interval.Class, HGeometry.Interval
startAndEndPointHGeometry.Interval.Class, HGeometry.Interval
startPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
StartPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
StaticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvas_HGeometry.Miso.Svg.StaticCanvas
StatusStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
steepestCcwFromHGeometry.ConvexHull.JarvisMarch
steepestCwFromHGeometry.ConvexHull.JarvisMarch
STilingIpe.Attributes, Ipe
STR 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
STransformationsIpe.Attributes, Ipe
StrictlyInsideHGeometry.Boundary
StrictlyOutsideHGeometry.Boundary
StrokeIpe.Attributes, Ipe
StrokeOpacityIpe.Attributes, Ipe
StrokeOpacitySym0Ipe.Attributes, Ipe
StrokeSym0Ipe.Attributes, Ipe
StyleIpe.Attributes, Ipe
styleDataIpe.Types, Ipe
styleNameIpe.Types, Ipe
stylesIpe.Types, Ipe
StyleSym0Ipe.Attributes, Ipe
SubLineHGeometry.HalfPlane.CommonIntersection
suffixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
suitableBaseHGeometry.Number.Real.Symbolic
sumVHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
supportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SVAlignIpe.Attributes, Ipe
SVGIpe.IpeRender
svgCanvas_HGeometry.Miso.Svg.Canvas
SWidthIpe.Attributes, Ipe
SymbolIpe.Content, Ipe.Types, Ipe
SymbolAttributesIpe.Attributes, Ipe
SymbolicHGeometry.Number.Real.Symbolic
symbolicHGeometry.Number.Real.Symbolic
symbolNameIpe.Content, Ipe.Types, Ipe
symbolPointIpe.Content, Ipe.Types, Ipe
tailOfHGeometry.PlaneGraph
takeAttrIpe.Attributes, Ipe
Term 
1 (Type/Class)HGeometry.Number.Real.Symbolic
2 (Data Constructor)HGeometry.Number.Real.Symbolic
termHGeometry.Number.Real.Symbolic
TeXStyleIpe.Attributes, Ipe
TextAttributesIpe.Attributes, Ipe
TextLabelIpe.Content, Ipe.Types, Ipe
TextLabelAttributesIpe.Attributes, Ipe
TextSizeUnitIpe.Attributes, Ipe
theHolesHGeometry.Polygon.WithHoles
theUnboundedVertexHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
theValueHGeometry.Indexed
theViewportHGeometry.Miso.Svg.Canvas
Three 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
TilingIpe.Attributes, Ipe
TilingSym0Ipe.Attributes, Ipe
toBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
toCounterClockwiseTriangleHGeometry.Triangle.Class, HGeometry.Triangle
toCycleRepHGeometry.Permutation
toCyclicHGeometry.Polygon.Simple
toFixedHGeometry.Number.Real.Rational
toggleHGeometry.Set.Util
toggleByHGeometry.Set.Util
toHostFromHGeometry.Viewport
toIpeSelectionXMLIpe.Writer, Ipe
toIpeXMLIpe.Writer, Ipe
toLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
ToObjectIpe.Content, Ipe.Types, Ipe
Top 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
toPlaneGraphHGeometry.Plane.LowerEnvelope.Connected.Graph
TopLeftHGeometry, HGeometry.Kernel, HGeometry.Point
toPolygonPathSegmentIpe.IpeOut, Ipe
TopRightHGeometry, HGeometry.Kernel, HGeometry.Point
topSideHGeometry, HGeometry.Box, HGeometry.Kernel
topToMaybeHGeometry.Unbounded
toRoseTreeHGeometry.Tree.Binary.Static
toRoseTree'HGeometry.Tree.Binary.Static
toSimplePolygon 
1 (Function)HGeometry.Polygon.Monotone
2 (Function)HGeometry.Polygon.Convex
ToSvgCoordinateHGeometry.Miso.Svg.StaticCanvas
toTermsHGeometry.Number.Real.Symbolic
toVecHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
toViewPortHGeometry.Graphics.Camera
toWorldInHGeometry.Viewport
Transformation 
1 (Type/Class)HGeometry.Transformation
2 (Data Constructor)HGeometry.Transformation
TransformationConstraintsHGeometry.Transformation
transformationMatrixHGeometry.Transformation
TransformationsIpe.Attributes, Ipe
TransformationsSym0Ipe.Attributes, Ipe
TransformationTypesIpe.Attributes, Ipe
transformByHGeometry.Transformation
translateByHGeometry.Transformation
translationHGeometry.Transformation
TranslationsIpe.Attributes, Ipe
transparentIpe.IpeRender
TransparentBackgroundIpe.IpeRender
traverseAttrIpe.Attributes, Ipe
traverseAttrsIpe.Attributes, Ipe
traverseBoundedVHGeometry.Plane.LowerEnvelope
traverseIpeAttrsIpe.Content, Ipe.Types, Ipe
traverseLeftFromHGeometry.Cyclic
traverseRightFromHGeometry.Cyclic
TreeNodeHGeometry.Tree.Util
Triangle 
1 (Type/Class)HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle
triangleSamplerHGeometry.Polygon.Simple.Sample
triangleSignedArea2XHGeometry.Triangle.Class, HGeometry.Triangle
Triangle_ 
1 (Type/Class)HGeometry.Triangle.Class, HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle.Class, HGeometry.Triangle
triangulate 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation
turquoiseIpe.Color
twinDartOfHGeometry.PlaneGraph
twinOfHGeometry.PlaneGraph
Two 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
unAttrsIpe.Attributes, Ipe
UnBoundedHGeometry.Unbounded
UnboundedHGeometry.Plane.LowerEnvelope.ConnectedNew
unboundedEdgesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
UnboundedRegionHGeometry.HalfPlane.CommonIntersection
unBoundedToMaybeHGeometry.Unbounded
UnboundedVertex 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
unboundedVertexIdHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
uncheckedFromCCWPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
uncheckedLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
uncheckedMontonePolygonHGeometry.Polygon.Monotone
unconsHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unconsAltHGeometry.Sequence.Alternating
uniformScalingHGeometry.Transformation
uniquePairsHGeometry.Combinatorial.Util
uniqueTripletsHGeometry.Combinatorial.Util
unitHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unitBallHGeometry.Ball.Class, HGeometry.Ball
unitEllipseHGeometry.Ellipse
unSetAttrIpe.Attributes, Ipe
unsnocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unversionedHGeometry.YAML
unZipperLocalHGeometry.Tree.Util
UpHGeometry.Miso.Event.Extra
upHGeometry.Tree.Util
updateHGeometry.Miso.Canvas.Zoom
upperHalfSpaceOfHGeometry.ConvexHull.R3.Naive
UpperHullHGeometry.ConvexHull.R3.Naive.Dual
upperHull 
1 (Function)HGeometry.ConvexHull.R3.Naive.Dual
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan
4 (Function)HGeometry.ConvexHull.DivideAndConquer
upperHull' 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
upperHullFromSortedHGeometry.ConvexHull.GrahamScan
upperHullFromSorted'HGeometry.ConvexHull.GrahamScan
upperTangentHGeometry.Polygon.Convex.Tangents
upperTangent'HGeometry.Polygon.Convex.Tangents
ValHGeometry.Unbounded
ValBHGeometry.Unbounded
VAlignIpe.Attributes, Ipe
VAlignSym0Ipe.Attributes, Ipe
ValTHGeometry.Unbounded
ValuedIpe.Value, Ipe
VectorHGeometry, HGeometry.Kernel, HGeometry.Vector
vectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Vector1HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector2HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector3HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector4HGeometry, HGeometry.Kernel, HGeometry.Vector
vectorFromListHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
Vector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
verifyConvexHGeometry.Polygon.Convex
Versioned 
1 (Type/Class)HGeometry.YAML
2 (Data Constructor)HGeometry.YAML
Vertex 
1 (Type/Class)HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
vertexAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
VertexContainerHGeometry.Polygon.Simple
VertexForm 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Type/Class)HGeometry.Plane.LowerEnvelope.VertexForm
3 (Data Constructor)HGeometry.Plane.LowerEnvelope.VertexForm
VertexIDHGeometry.Plane.LowerEnvelope
VertexIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
VertexTypeHGeometry.Polygon.Triangulation.MakeMonotone
VerticalIpe.Attributes, Ipe
VerticalAlignmentIpe.Attributes, Ipe
verticalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
VerticalLineThroughHGeometry.Line.General
VerticalOrLineEQHGeometry.Line.General
VerticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalSideTestHGeometry.HyperPlane.Class, HGeometry.HyperPlane
verticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
vertices'HGeometry.Plane.LowerEnvelope.VertexForm
View 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ViewL1HGeometry.Sequence.NonEmpty
viewl1HGeometry.Sequence.NonEmpty
ViewNumberIpe.IpeToIpe
viewNumberIpe.IpeRender
viewPlaneDepthHGeometry.Graphics.Camera
Viewport 
1 (Type/Class)HGeometry.Viewport
2 (Data Constructor)HGeometry.Viewport
viewPortHGeometry.Viewport
ViewR1HGeometry.Sequence.NonEmpty
viewr1HGeometry.Sequence.NonEmpty
viewsIpe.Types, Ipe
viewUpHGeometry.Graphics.Camera
violetIpe.Color
visibilityGraphHGeometry.Polygon.Visibility.Naive
visibilityGraphWithHGeometry.Polygon.Visibility.Naive
VoronoiDiagram 
1 (Type/Class)HGeometry.VoronoiDiagram
2 (Data Constructor)HGeometry.VoronoiDiagram
voronoiDiagramHGeometry.VoronoiDiagram
VoronoiDiagram'HGeometry.VoronoiDiagram
voronoiVerticesHGeometry.VoronoiDiagram
wComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
wCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
WestHGeometry.Direction
westHGeometry, HGeometry.Box, HGeometry.Kernel
WheelDirectionHGeometry.Miso.Event.Extra
whiteIpe.Color
WidthIpe.Attributes, Ipe
width 
1 (Function)HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
2 (Function)Ipe.Content, Ipe.Types, Ipe
WidthSym0Ipe.Attributes, Ipe
WindIpe.Attributes, Ipe
withAtsHGeometry.Miso.Svg, HGeometry.Svg
withAts'HGeometry.Miso.Svg, HGeometry.Svg
withCanvasEventsHGeometry.Miso.Svg.Canvas
withDefaultsIpe.Types, Ipe
WithIndex 
1 (Type/Class)HGeometry.Indexed
2 (Data Constructor)HGeometry.Indexed
withNeighboursHGeometry.Sequence.Alternating
withOrdHGeometry.Ord.Dynamic
worldToHostHGeometry.Viewport
worldToViewHGeometry.Graphics.Camera
writeAttrNamesIpe.Attributes, Ipe
writeAttrValuesIpe.Writer
writeIpeFileIpe.Writer, Ipe
writeIpeFile'Ipe.Writer, Ipe
writeIpeFileAsPdfIpe.IpeToIpe
writeIpePageIpe.Writer, Ipe
wrtCenterHGeometry.Viewport
xComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
xCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
xCoordAtHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
XMLIpe.IpeToIpe
xmlLiteralIpe.Literal
yComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
yCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
yCoordAtHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
yellowIpe.Color
YesIpe.Attributes, Ipe
YMonotonePolygon_HGeometry.Polygon.Triangulation.TriangulateMonotone
ZHGeometry.GeoJSON
zComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
zCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
zeroHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
ZeroToOne 
1 (Type/Class)HGeometry.Kernel.Test.Box
2 (Data Constructor)HGeometry.Kernel.Test.Box
ZipIpe.IpeToIpe
zipExactWithHGeometry.Tree.Binary.Static
Zipper 
1 (Type/Class)HGeometry.List.Zipper
2 (Data Constructor)HGeometry.List.Zipper
3 (Type/Class)HGeometry.Tree.Util
4 (Data Constructor)HGeometry.Tree.Util
zipRecsWithIpe.Attributes, Ipe
ZMHGeometry.GeoJSON
ZoomAction 
1 (Type/Class)HGeometry.Miso.Canvas.Zoom
2 (Data Constructor)HGeometry.Miso.Canvas.Zoom
ZoomConfig 
1 (Type/Class)HGeometry.Viewport
2 (Data Constructor)HGeometry.Viewport
ZoomDirectionHGeometry.Miso.Canvas.Zoom
ZoomInHGeometry.Miso.Canvas.Zoom
zoomLevelHGeometry.Miso.Canvas.Zoom
ZoomOutHGeometry.Miso.Canvas.Zoom
^*HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
^+^HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
^-^HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
^/HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
_AlternatingHGeometry.Line.LowerEnvelope
_anchorPointHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
_ArcSegmentIpe.Path
_ArcToIpe.Path
_arrowNameIpe.Attributes, Ipe
_arrowSizeIpe.Attributes, Ipe
_asClosedLineSegmentIpe.FromIpe, Ipe
_asConvexPolygonIpe.FromIpe, Ipe
_asLineSegmentIpe.FromIpe, Ipe
_asPointIpe.FromIpe, Ipe
_asPolyLineIpe.FromIpe, Ipe
_asRectangleIpe.FromIpe, Ipe
_asSimplePolygonIpe.FromIpe, Ipe
_asTriangleIpe.FromIpe, Ipe
_AttrIpe.Attributes, Ipe
_BallSphereHGeometry.Ball.CenterAndRadius, HGeometry.Ball
_BottomHGeometry.Unbounded
_BottomMaybeHGeometry.Unbounded
_BoundaryHGeometry.Boundary
_ClosedSplineIpe.Path
_ClosedSplineSegmentIpe.Path
_ClosePathIpe.Path
_ConvexPolygonHGeometry.Polygon.Convex
_coreHGeometry.Ext
_CubicBezierSegmentIpe.Path
_CurveToIpe.Path
_directionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
_DiskCircleHGeometry.Ball.CenterAndRadius, HGeometry.Ball
_EllipseIpe.Path
_EllipseCircleHGeometry.Ellipse
_EllipseSegmentIpe.Path
_endPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
_ExtHGeometry.Ext
_extraHGeometry.Ext
_GeoPolygonPolygonalDomainHGeometry.GeoJSON
_GeoPositionWithoutCRSHGeometry.GeoJSON
_getAttrIpe.Attributes, Ipe
_IpeGroupIpe.Content, Ipe.Types, Ipe
_IpeImageIpe.Content, Ipe.Types, Ipe
_IpeMiniPageIpe.Content, Ipe.Types, Ipe
_IpePathIpe.Content, Ipe.Types, Ipe
_IpeTextLabelIpe.Content, Ipe.Types, Ipe
_IpeUseIpe.Content, Ipe.Types, Ipe
_LineToIpe.Path
_MoveToIpe.Path
_PolygonPathIpe.Path
_PolyLineFHGeometry.PolyLine
_PolyLineLineSegmentHGeometry.PolyLine.Class, HGeometry.PolyLine
_PolyLineSegmentIpe.Path
_QCurveToIpe.Path
_QuadraticBezierSegmentIpe.Path
_SplineIpe.Path
_SplineSegmentIpe.Path
_TopHGeometry.Unbounded
_TopMaybeHGeometry.Unbounded
_TreeNodeEitherHGeometry.Tree.Util
_unUnBoundedHGeometry.Unbounded
_ValHGeometry.Unbounded
_ValBHGeometry.Unbounded
_ValTHGeometry.Unbounded
_VectorHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
_withAttrsIpe.FromIpe, Ipe
|.|HGeometry.Transformation
|>>HGeometry.Sequence.NonEmpty
\ No newline at end of file + (Index)
 

Index

!Ipe.IpeOut, Ipe
!!*HGeometry.Matrix.Class, HGeometry.Matrix
!*HGeometry.Matrix.Class, HGeometry.Matrix
!*!HGeometry.Matrix.Class, HGeometry.Matrix
%HGeometry.Number.Ratio.Generalized
*!!HGeometry.Matrix.Class, HGeometry.Matrix
*^HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
.+^HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
.-.HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
.-^HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
:+ 
1 (Type/Class)HGeometry.Ext
2 (Data Constructor)HGeometry.Ext
:<<HGeometry.Sequence.NonEmpty
:>>HGeometry.Sequence.NonEmpty
:~HGeometry.Ext
<>>HGeometry.Sequence.NonEmpty
AboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
accessHGeometry.Tree.Binary.Static
activeLayerIpe.Types, Ipe
Additive_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
addStyleSheetIpe.Types, Ipe
addStyleSheetFromIpe.Reader, Ipe
AffineIpe.Attributes, Ipe
affineTransformationHGeometry.Ellipse
Affine_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
AfterHGeometry.Interval.Class, HGeometry.Interval
AlignBaselineIpe.Attributes, Ipe
AlignBottomIpe.Attributes, Ipe
alignedOriginHGeometry.Viewport
AlignHCenterIpe.Attributes, Ipe
AlignLeftIpe.Attributes, Ipe
AlignRightIpe.Attributes, Ipe
AlignTopIpe.Attributes, Ipe
AlignVCenterIpe.Attributes, Ipe
AllIpe.IpeToIpe
allChildrenHGeometry.Tree.Util
AllColinearHGeometry.VoronoiDiagram
AllFalseHGeometry.Algorithms.BinarySearch
allNextsHGeometry.List.Zipper
allNonEmptyNextsHGeometry.List.Zipper
allPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
allSimplePolygonsHGeometry.Polygon.Instances
allTreesHGeometry.Tree.Util
AllTrueHGeometry.Algorithms.BinarySearch
Alternating 
1 (Type/Class)HGeometry.Sequence.Alternating
2 (Data Constructor)HGeometry.Sequence.Alternating
ancestorsHGeometry.Tree.Util
anchorPointHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
AnClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnEndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
AnOpenEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
applyHGeometry.Permutation
applyMatricesIpe.Matrix
applyMatricesPageIpe.Matrix
applyMatrixIpe.Matrix
applyMatrix'Ipe.Matrix
arbitraryPointInBoundingBoxHGeometry.Kernel.Test.Box
ArcSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ArcToIpe.Path
areaHGeometry.Polygon
area2XHGeometry.Polygon
AroundEndHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
AroundStartHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
ArrowIpe.Attributes, Ipe
arrowNameIpe.Attributes, Ipe
arrowSizeIpe.Attributes, Ipe
ArrowSym0Ipe.Attributes, Ipe
AsA 
1 (Data Constructor)HGeometry.Ext
2 (Type/Class)HGeometry.Ext
asAnEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
asAnIntervalHGeometry.Interval
asBalancedBinLeafTreeHGeometry.Tree.Binary.Static
asBalancedBinTreeHGeometry.Tree.Binary.Static
ascEndPointsHGeometry.SegmentTree.Base, HGeometry.SegmentTree
asClosedIntervalHGeometry.Interval
asCoreHGeometry.Ext
AsExtHGeometry.Ext
AsFixedHGeometry.Number.Real.Rational
asFixedHGeometry.Number.Real.Rational
asIndexedExtHGeometry.Ext
asMap 
1 (Function)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
2 (Function)HGeometry.VoronoiDiagram
asMonotonePolygonHGeometry.Polygon.Monotone
asNonVerticalHyperPlaneHGeometry.HyperPlane.NonVertical
asOpenIntervalHGeometry.Interval
asPointHGeometry, HGeometry.Kernel, HGeometry.Point
asPointLocationResultHGeometry.Boundary
asSimplePolygonHGeometry.Polygon.WithHoles
AssociatedHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegmentsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
associatedSegsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
asTriangleHGeometry.Polygon
AsVector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
Attr 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
attrIpe.Attributes, Ipe
AttributesIpe.Attributes, Ipe
attributesIpe.Content, Ipe.Types, Ipe
Attributes'Ipe.Content, Ipe.Types, Ipe
AttributesOfIpe.Content, Ipe.Types, Ipe
AttributeUniverseIpe.Attributes, Ipe
AttrMapIpe.Content, Ipe.Types, Ipe
AttrMapSym1Ipe.Content, Ipe.Types, Ipe
attrNameIpe.Attributes, Ipe
AttrsIpe.Attributes, Ipe
BackgroundIpe.IpeRender
Ball 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Ball_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
basicIpeStyleIpe.Types, Ipe
basicNamedColorsIpe.Color
basisHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
BeforeHGeometry.Interval.Class, HGeometry.Interval
BelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
Bezier2HGeometry.BezierSpline
Bezier3HGeometry.BezierSpline
BezierSpline 
1 (Type/Class)HGeometry.BezierSpline
2 (Data Constructor)HGeometry.BezierSpline
BezierSplineFHGeometry.BezierSpline
BidirGraph_HGeometry.PlaneGraph
BinarySearchHGeometry.Algorithms.BinarySearch
binarySearchFirstHGeometry.Algorithms.BinarySearch
binarySearchFirstIdxInHGeometry.Algorithms.BinarySearch
binarySearchFirstInHGeometry.Algorithms.BinarySearch
binarySearchIdxInHGeometry.Algorithms.BinarySearch
binarySearchInHGeometry.Algorithms.BinarySearch
binarySearchLastHGeometry.Algorithms.BinarySearch
binarySearchLastIdxInHGeometry.Algorithms.BinarySearch
binarySearchLastInHGeometry.Algorithms.BinarySearch
BinarySearchResultHGeometry.Algorithms.BinarySearch
binarySearchUntilHGeometry.Algorithms.BinarySearch
BinaryTreeHGeometry.Tree.Binary.Static
BinLeafTreeHGeometry.Tree.Binary.Static
bisectorHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
blackIpe.Color
blankCanvasHGeometry.Miso.Svg.Canvas
blueIpe.Color
bothClosedHGeometry.Kernel.Instances
Bottom 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
BottomLeftHGeometry, HGeometry.Kernel, HGeometry.Point
BottomRightHGeometry, HGeometry.Kernel, HGeometry.Point
bottomSideHGeometry, HGeometry.Box, HGeometry.Kernel
bottomToMaybeHGeometry.Unbounded
Boundary 
1 (Type/Class)HGeometry.Boundary
2 (Data Constructor)HGeometry.Boundary
boundaryDartOfHGeometry.PlaneGraph
boundaryDartsHGeometry.PlaneGraph
boundaryDartsOfHGeometry.PlaneGraph
boundaryVerticesHGeometry.PlaneGraph
boundaryVerticesOfHGeometry.PlaneGraph
BoundedHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
BoundedRegionHGeometry.HalfPlane.CommonIntersection
boundingBoxHGeometry, HGeometry.Box, HGeometry.Kernel
BoundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace, HGeometry.HalfSpace
boundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace
Box 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
Box_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
brownIpe.Color
bruteForceLowerEnvelopeHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
buildHGeometry.Algorithms.LogarithmicMethod
buildClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
buildFailureFunctionHGeometry.StringSearch.KMP
buildIntervalHGeometry.Interval.Class, HGeometry.Interval
buildRangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
buildSegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
buildSkeletonHGeometry.SegmentTree.Base, HGeometry.SegmentTree
ButtonHGeometry.Miso.Event.Extra
Camera 
1 (Type/Class)HGeometry.Graphics.Camera
2 (Data Constructor)HGeometry.Graphics.Camera
cameraNormalHGeometry.Graphics.Camera
cameraPositionHGeometry.Graphics.Camera
cameraTransformHGeometry.Graphics.Camera
CanDeleteHGeometry.Measured.Class, HGeometry.Measured
CanInsertHGeometry.Measured.Class, HGeometry.Measured
canonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
CanvasHGeometry.Miso.Svg.Canvas
CardinalDirectionHGeometry.Direction
CCP 
1 (Type/Class)HGeometry.ClosestPair.DivideAndConquer
2 (Data Constructor)HGeometry.ClosestPair.DivideAndConquer
CCW 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
ccwPredecessorOfHGeometry.Polygon.Class, HGeometry.Polygon
ccwSuccessorOfHGeometry.Polygon.Class, HGeometry.Polygon
centerHGeometry.Ball.Class, HGeometry.Ball
centeredOriginHGeometry.Viewport
centerPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
centroidHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
Chain 
1 (Type/Class)HGeometry.HalfPlane.CommonIntersection
2 (Data Constructor)HGeometry.HalfPlane.CommonIntersection
Circle 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
circleToEllipseHGeometry.Ellipse
CircularListHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
clampToHGeometry.Interval.Class, HGeometry.Interval
classifyVerticesHGeometry.Polygon.Triangulation.MakeMonotone
ClipIpe.Attributes, Ipe
ClipSym0Ipe.Attributes, Ipe
ClosedHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
ClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
ClosedInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
ClosedInterval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
ClosedLineSegment 
1 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
ClosedLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ClosedSplineIpe.Path
ClosedSplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ClosePathIpe.Path
closestPair 
1 (Function)HGeometry.ClosestPair.DivideAndConquer, HGeometry.ClosestPair
2 (Function)HGeometry.ClosestPair.Naive
closestPairWithHGeometry.ClosestPair.Naive
cmpByDistanceToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
cmpInDirection 
1 (Function)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Function)HGeometry.HyperPlane
cmpSlopeHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
cmpXHGeometry.Polygon.Triangulation.MakeMonotone
CoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
columnHGeometry.Matrix.Class, HGeometry.Matrix
CommonAttributesIpe.Attributes, Ipe
commonAttributesIpe.Content, Ipe.Types, Ipe
CommonIntersectionHGeometry.HalfPlane.CommonIntersection
commonIntersectionHGeometry.HalfPlane.CommonIntersection
CompareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalExactHGeometry.Interval.Class, HGeometry.Interval
compare_HGeometry.Ord.Dynamic
componentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
component'HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
componentsHGeometry, HGeometry.Kernel, HGeometry.Vector
computeDiagonals 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation.MakeMonotone
3 (Function)HGeometry.Polygon.Triangulation
computeVertexFormHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
ConnectedEnvelopeHGeometry.Plane.LowerEnvelope
ConnectedVDHGeometry.VoronoiDiagram
consHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
consElemWithHGeometry.Sequence.Alternating
constantHGeometry.Number.Real.Symbolic
constantFactorHGeometry.Number.Real.Symbolic
ConstructableClosedInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableHyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
ConstructableInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ConstructableOpenInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructablePoint_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
ConstructablePolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
ConstructableSimplePolygonHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple, HGeometry.Polygon.Simple
constructTreeHGeometry.Tree.Util
contentIpe.Types, Ipe
contentInViewIpe.Types, Ipe
ConversionErrorIpe.Reader, Ipe
convexHull 
1 (Function)HGeometry.ConvexHull.QuickHull
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan, HGeometry.ConvexHull
4 (Function)HGeometry.ConvexHull.DivideAndConquer
5 (Function)HGeometry.ConvexHull.Melkman
ConvexPolygonHGeometry.Polygon.Convex
ConvexPolygonFHGeometry.Polygon.Convex
ConvexPolygon_HGeometry.Polygon.Convex.Class, HGeometry.Polygon.Convex
coordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coord'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
CoordinateIpe.PathParser, Ipe.Reader
coordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coreHGeometry.Ext
CoreOfHGeometry.Ext
Corners 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
corners 
1 (Function)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Triangle.Class, HGeometry.Triangle
cornersInDirectionHGeometry, HGeometry.Box, HGeometry.Kernel
Count 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
CPHGeometry.ClosestPair.DivideAndConquer
createTreeHGeometry.IntervalTree
Crop 
1 (Type/Class)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeRender
cropIpe.IpeRender
crossHGeometry, HGeometry.Kernel, HGeometry.Vector
CubicBezierHGeometry.BezierSpline
CubicBezierSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
currentLevelHGeometry.Viewport
CurveToIpe.Path
CWHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
cycleOfHGeometry.Permutation
cycleRepHGeometry.Permutation
Cyclic 
1 (Type/Class)HGeometry.Cyclic
2 (Data Constructor)HGeometry.Cyclic
darkblueIpe.Color
darkcyanIpe.Color
darkgrayIpe.Color
darkgreenIpe.Color
darkmagentaIpe.Color
darkorangeIpe.Color
darkredIpe.Color
DartHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartAtHGeometry.PlaneGraph
DartIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartsHGeometry.PlaneGraph
dartSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
dartSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
DashIpe.Attributes, Ipe
DashNamedIpe.Attributes, Ipe
DashPatternIpe.Attributes, Ipe
DashSym0Ipe.Attributes, Ipe
dCircleHGeometry.Miso.Svg, HGeometry.Svg
dCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
dDiskHGeometry.Miso.Svg, HGeometry.Svg
decodeYAMLHGeometry.YAML
decodeYAMLFileHGeometry.YAML
defaultBoxIpe.IpeOut, Ipe
DefaultFromIpeIpe.FromIpe, Ipe
defaultFromIpeIpe.FromIpe, Ipe
DefaultIpeOutIpe.IpeOut, Ipe, Ipe
defaultOptions 
1 (Function)Ipe.IpeRender
2 (Function)Ipe.IpeToIpe
DefaultTransformByConstraintsHGeometry.Transformation
DefinersHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
definersHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
defIOIpe.IpeOut, Ipe
deleteHGeometry.IntervalTree
deleteAllByHGeometry.Set.Util
deleteMeasureHGeometry.Measured.Class, HGeometry.Measured
denominatorHGeometry.Number.Ratio.Generalized
DepthIpe.Attributes, Ipe
DepthSym0Ipe.Attributes, Ipe
detHGeometry.Matrix.Class, HGeometry.Matrix
Diagonal 
1 (Type/Class)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Polygon.Triangulation
diGraphFromAdjacencyListsHGeometry.PlaneGraph
DiGraphFromAdjListExtraConstraintsHGeometry.PlaneGraph, HGeometry.PlaneGraph
DiGraph_HGeometry.PlaneGraph
DimensionHGeometry.Properties
dimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
directionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
Disk 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Disk_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
DistanceFunctionHGeometry.ClosestPair.Naive
divideAndConquerHGeometry.Algorithms.DivideAndConquer
divideAndConquer1HGeometry.Algorithms.DivideAndConquer
divideAndConquer1WithHGeometry.Algorithms.DivideAndConquer
dLineSegmentHGeometry.Miso.Svg, HGeometry.Svg
dotHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
douglasPeuckerHGeometry.PolyLine.Simplification.DouglasPeucker
DownHGeometry.Miso.Event.Extra
dPointHGeometry.Miso.Svg, HGeometry.Svg
dPolyLineHGeometry.Miso.Svg, HGeometry.Svg
drawHGeometry.Miso.Svg, HGeometry.Svg
DrawableHGeometry.Miso.Svg, HGeometry.Svg
drawTreeHGeometry.Tree.Binary.Static
drawTree'HGeometry.Tree.Binary.Static
drawWithHGeometry.Miso.Svg, HGeometry.Svg
dRectangleHGeometry.Miso.Svg, HGeometry.Svg
dropNextHGeometry.List.Zipper
dSimplePolygonHGeometry.Miso.Svg, HGeometry.Svg
dualGraphHGeometry.PlaneGraph
DualGraphOfHGeometry.PlaneGraph, HGeometry.PlaneGraph
dualHyperPlaneHGeometry.Duality
dualLineHGeometry.Duality
dualPointHGeometry.Duality
durationHGeometry.Interval.Class, HGeometry.Interval
E 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected.Graph
EastHGeometry.Direction
eastHGeometry, HGeometry.Box, HGeometry.Kernel
EdgeHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
edgeAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
EdgeIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
edgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
edgeSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
edgeSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
ElemHGeometry.Algorithms.BinarySearch
ElemCyclicHGeometry.Cyclic
elementsHGeometry.Matrix.Class, HGeometry.Matrix
elemsHGeometry.Permutation
Ellipse 
1 (Data Constructor)Ipe.Path
2 (Type/Class)HGeometry.Ellipse
3 (Data Constructor)HGeometry.Ellipse
ellipseMatrixHGeometry.Ellipse
EllipseSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ellipseToCircleHGeometry.Ellipse
emptyHGeometry.Algorithms.LogarithmicMethod
EmptyIntersectionHGeometry.HalfPlane.CommonIntersection
emptyPageIpe.Types, Ipe
encodeYAMLHGeometry.YAML
encodeYAMLFileHGeometry.YAML
encodingIpe.Types, Ipe
EndHGeometry.Polygon.Triangulation.MakeMonotone
endHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
endPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
endPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
endPointsHGeometry.PlaneGraph
endPointsOfHGeometry.PlaneGraph
EndPointTypeHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
endPointTypeHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EndPoint_HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EntireFileIpe.IpeToIpe
EntireLineHGeometry.HalfPlane.CommonIntersection
EOFillIpe.Attributes, Ipe
EPSIpe.IpeRender
epsHGeometry.Number.Real.Symbolic
EpsFoldHGeometry.Number.Real.Symbolic
euclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
evalAtHGeometry.HyperPlane.Class, HGeometry.HyperPlane
evalAt'HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
evalEpsHGeometry.Number.Real.Symbolic
evalHyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
ExactHGeometry.Number.Real.Rational
Export 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
exportIpe.IpeToIpe
extHGeometry.Ext
extentHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
extraHGeometry.Ext
extractMinimaBy 
1 (Function)HGeometry.NonEmpty.Util
2 (Function)HGeometry.List.Util
extractNextHGeometry.List.Zipper
extractOrd1HGeometry.Ord.Dynamic
extractOrd2HGeometry.Ord.Dynamic
ExtraOfHGeometry.Ext
extremesHGeometry.Polygon.Class, HGeometry.Polygon
FaceHGeometry.PlaneGraph, HGeometry.PlaneGraph
faceAtHGeometry.PlaneGraph
FaceIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
facesHGeometry.PlaneGraph
factorsHGeometry.Number.Real.Symbolic
farDistHGeometry.Graphics.Camera
FileType 
1 (Type/Class)Ipe.IpeRender
2 (Type/Class)Ipe.IpeToIpe
FillIpe.Attributes, Ipe
FillRuleIpe.Attributes, Ipe
FillRuleSym0Ipe.Attributes, Ipe
FillSym0Ipe.Attributes, Ipe
FillTypeIpe.Attributes, Ipe
findEvertHGeometry.Tree.Util
findEvert'HGeometry.Tree.Util
findNodeHGeometry.Tree.Util
findNodesHGeometry.Tree.Util
findPathHGeometry.Tree.Util
findSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
firstChildHGeometry.Tree.Util
firstTrueHGeometry.Algorithms.BinarySearch
firstWithNeighborsHGeometry.Sequence.Alternating
fitToBoxHGeometry.Transformation
fitToBoxTransformHGeometry.Transformation
flattenGroupsIpe.Content
flipAxesHGeometry.Graphics.Camera
FlipsAtHGeometry.Algorithms.BinarySearch
flipSignHGeometry.Sign
flipYHGeometry.Viewport
focusHGeometry.Tree.Util
foldBinaryUpHGeometry.Tree.Binary.Static
folding1HGeometry.Lens.Util
foldMapZipHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
foldUpHGeometry.Tree.Binary.Static
foldUpDataHGeometry.Tree.Binary.Static
frechetDistanceWithHGeometry.PolyLine.Frechet.Discrete
fromAdjacencyListsHGeometry.PlaneGraph
fromAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
fromBoundaryPointsHGeometry.Ball.Class, HGeometry.Ball
fromCCWListHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
fromCenterAndPointHGeometry.Ball.Class, HGeometry.Ball
fromCenterAndSquaredRadiusHGeometry.Ball.Class, HGeometry.Ball
fromContentIpe.Types, Ipe
fromDiametralPairHGeometry.Ball.Class, HGeometry.Ball
fromEmbeddingHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
fromExtentHGeometry, HGeometry.Box, HGeometry.Kernel
fromFixedHGeometry.Number.Real.Rational
fromFoldableHGeometry.Foldable.Util
fromFoldable1HGeometry.Foldable.Util
fromGroupedAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromIntervalsHGeometry.IntervalTree
fromIpeXMLIpe.Reader
fromLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
fromList 
1 (Function)HGeometry.Foldable.Util
2 (Function)HGeometry.List.Zipper
fromListByHGeometry.Set.Util
fromNonEmptyHGeometry.Foldable.Util
fromNonEmptyWithHGeometry.Sequence.Alternating
fromPointAndNormalHGeometry.HyperPlane.Class, HGeometry.HyperPlane
fromPointAndVecHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
fromPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
fromSeqIpe.PathParser, Ipe.Reader
fromSimplePolygonHGeometry.Polygon.Convex
fromSizeHGeometry.Viewport
fromVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
fromVertexFormHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
GAttrIpe.Attributes, Ipe
generateHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
generateAHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
generateMatrixHGeometry.Matrix.Class, HGeometry.Matrix
GeoPositionWithoutCRS'HGeometry.GeoJSON
getAttrIpe.Attributes, Ipe
getBoundingClientRectHGeometry.Miso.FFI.Extra
getPositiveDartHGeometry.PlaneGraph
goldIpe.Color
goNextHGeometry.List.Zipper
goPrevHGeometry.List.Zipper
GradientIpe.Attributes, Ipe
GradientSym0Ipe.Attributes, Ipe
GraphFromAdjListExtraConstraintsHGeometry.PlaneGraph, HGeometry.PlaneGraph
Graph_HGeometry.PlaneGraph
GRatioHGeometry.Number.Ratio.Generalized
grayIpe.Color
greenIpe.Color
Group 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
GroupAttributesIpe.Attributes, Ipe
groupBy'HGeometry.List.Util
groupItemsIpe.Content, Ipe.Types, Ipe
HalfLine 
1 (Type/Class)HGeometry.HalfLine
2 (Data Constructor)HGeometry.HalfLine
HalfLineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
halfLineThroughHGeometry.HalfLine
HalfLine_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfLine_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfOpenInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
HalfPlane_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace 
1 (Type/Class)HGeometry.HalfSpace
2 (Data Constructor)HGeometry.HalfSpace
HalfSpaceFHGeometry.HalfSpace
halfSpaceSignHGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HAlignIpe.Attributes, Ipe
HAlignSym0Ipe.Attributes, Ipe
handleInternalCanvasActionHGeometry.Miso.Svg.Canvas
HasCanonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
HasCenterHGeometry.Ball.Class, HGeometry.Ball
HasComponentsHGeometry, HGeometry.Kernel, HGeometry.Vector
HasCoordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasDartsHGeometry.PlaneGraph
HasDarts'HGeometry.PlaneGraph
HasDefaultFromIpeIpe.FromIpe, Ipe
HasDefaultIpeOutIpe.IpeOut, Ipe
HasDeterminantHGeometry.Matrix.Class, HGeometry.Matrix
HasDimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
HasDirectedTraversalsHGeometry.Cyclic
HasDirectionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasEdgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasEdges'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasElementsHGeometry.Matrix.Class, HGeometry.Matrix
HasEndHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasEndPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasFacesHGeometry.PlaneGraph
HasFaces'HGeometry.PlaneGraph
HasFromFoldableHGeometry.Foldable.Util
HasFromFoldable1HGeometry.Foldable.Util
HasHolesHGeometry.Polygon.Class, HGeometry.Polygon
HasIndexHGeometry.Indexed
HasInPolygonHGeometry.Polygon.Simple
HasIntersectionWithHGeometry.Intersection
HasMaxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMinPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMousePositionHGeometry.Miso.Svg.Canvas
hasNoPertubationHGeometry.Number.Real.Symbolic
hasNoSelfIntersectionsHGeometry.Polygon.Simple
HasOnLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
HasOnSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasOuterBoundaryHGeometry.Polygon.Class, HGeometry.Polygon
HasPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasPoints'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasSquaredEuclideanDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
HasStartHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasStartPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasSupportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasVerticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasVertices'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasZoomLevelHGeometry.Miso.Canvas.Zoom
Has_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headOfHGeometry.PlaneGraph
HeightIpe.Attributes, Ipe
heightHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HeightSym0Ipe.Attributes, Ipe
HoleHGeometry.Polygon.Class, HGeometry.Polygon
holeAtHGeometry.Polygon.Class, HGeometry.Polygon
HoleContainerHGeometry.Polygon.WithHoles
HoleFHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
HoleIxHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
holesHGeometry.Polygon.Class, HGeometry.Polygon
HorizontalIpe.Attributes, Ipe
HorizontalAlignmentIpe.Attributes, Ipe
horizontalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
hostToWorldHGeometry.Viewport
HyperPlane 
1 (Type/Class)HGeometry.HyperPlane
2 (Data Constructor)HGeometry.HyperPlane
HyperPlane2HGeometry.HyperPlane
HyperPlane3HGeometry.HyperPlane
hyperPlaneCoefficientsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneFromEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlaneFromEquationConstraintHGeometry.HyperPlane.Class, HGeometry.HyperPlane, HGeometry.HyperPlane
HyperPlaneFromPointsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneThroughHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
identityHGeometry.Transformation
identityMatrixHGeometry.Matrix.Class, HGeometry.Matrix
ifolding1HGeometry.Lens.Util
Image 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
ImageAttributesIpe.Attributes, Ipe
imageDataIpe.Content, Ipe.Types, Ipe
impliesHGeometry.Kernel.Instances
incidentEdgesOfHGeometry.PlaneGraph
incidentFaceOfHGeometry.PlaneGraph
Index 
1 (Type/Class)HGeometry.Algorithms.BinarySearch
2 (Type/Class)HGeometry.Indexed
indicesHGeometry.Permutation
InHalfLineHGeometry.HalfPlane.CommonIntersection
inIntervalHGeometry.Interval.Class, HGeometry.Interval
inPolygonHGeometry.Polygon.Simple
InSegmentHGeometry.HalfPlane.CommonIntersection
insert 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
3 (Function)HGeometry.Algorithms.LogarithmicMethod
insertBreakPointsHGeometry.Sequence.Alternating
insertByHGeometry.Set.Util
insertIntoCyclicOrderHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
InsertionOnly 
1 (Type/Class)HGeometry.Algorithms.LogarithmicMethod
2 (Data Constructor)HGeometry.Algorithms.LogarithmicMethod
insertMeasureHGeometry.Measured.Class, HGeometry.Measured
insertOrdHGeometry.CircularList.Util
insertOrdByHGeometry.CircularList.Util
insertOrdBy'HGeometry.CircularList.Util
Inside 
1 (Data Constructor)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Boundary
inSimplePolygonHGeometry.Polygon.Simple
InSubLineHGeometry.HalfPlane.CommonIntersection
InterCardinalDirectionHGeometry.Direction
interCardinalsOfHGeometry.Direction
interceptHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
InteriorHGeometry.Interval.Class, HGeometry.Interval
interiorFacePolygonAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacePolygonsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacesHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorIntersectionsHGeometry.LineSegment.Intersection.BentleyOttmann
interiorToHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
InternalHGeometry.Tree.Binary.Static
InternalCanvasActionHGeometry.Miso.Svg.Canvas
InternalNodeHGeometry.Tree.Util
interpolateHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
intersectHGeometry.Intersection
IntersectConstraintsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectingHalfPlanesHGeometry.Triangle.Class, HGeometry.Triangle
IntersectionHGeometry.Intersection
intersectionLineHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
IntersectionOfHGeometry.Intersection, HGeometry.Ball.CenterAndRadius, HGeometry.Ball
IntersectionPointHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPoint 
1 (Function)HGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
2 (Function)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
intersectionPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPointsHGeometry.LineSegment.Intersection.BentleyOttmann
IntersectionsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersections 
1 (Function)HGeometry.LineSegment.Intersection.Naive
2 (Function)HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionVectorHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
intersectsHGeometry.Intersection
Interval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
IntervalLike_HGeometry.Interval.Class, HGeometry.Interval
IntervalTreeHGeometry.IntervalTree
Interval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
Interval_x_IntervalIntersectionHGeometry.Interval
Interval_x_Interval_ContainedHGeometry.Interval
Interval_x_Interval_PartialHGeometry.Interval
Interval_x_Interval_PointHGeometry.Interval
introOrd1HGeometry.Ord.Dynamic
introOrd2HGeometry.Ord.Dynamic
inverseMatrixHGeometry.Matrix.Class, HGeometry.Matrix
inverseOfHGeometry.Transformation
InvertibleHGeometry.Matrix.Class, HGeometry.Matrix
iOIpe.IpeOut, Ipe
iO'Ipe.IpeOut, Ipe
iO''Ipe.IpeOut, Ipe
IpeArrow 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeAttributesIpe.Content, Ipe.Types, Ipe
IpeAttrNameIpe.Attributes, Ipe
ipeBezierIpe.IpeOut, Ipe
IpeBitmapIpe.Types, Ipe
ipeCircleIpe.IpeOut, Ipe
IpeColor 
1 (Type/Class)Ipe.Color, Ipe
2 (Data Constructor)Ipe.Color, Ipe
IpeDashIpe.Attributes, Ipe
ipeDiskIpe.IpeOut, Ipe
ipeDiskMarkIpe.IpeOut, Ipe
ipeEllipseIpe.IpeOut, Ipe
IpeFile 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeFileIpe.Types, Ipe
IpeGradientIpe.Attributes, Ipe
IpeGroupIpe.Content, Ipe.Types, Ipe
ipeGroupIpe.IpeOut, Ipe
ipeHalfLineIpe.IpeOut, Ipe
ipeHalfLineInIpe.IpeOut, Ipe
IpeImageIpe.Content, Ipe.Types, Ipe
ipeLabelIpe.IpeOut, Ipe
ipeLineIpe.IpeOut, Ipe
ipeLineInIpe.IpeOut, Ipe
ipeLineSegmentIpe.IpeOut, Ipe
ipeMarkIpe.IpeOut, Ipe
IpeMiniPageIpe.Content, Ipe.Types, Ipe
IpeObjectIpe.Content, Ipe.Types, Ipe
IpeObject'Ipe.Content, Ipe.Types, Ipe
ipeObject'Ipe.Content, Ipe.Types, Ipe
IpeOpacityIpe.Attributes, Ipe
IpeOutIpe.IpeOut, Ipe
IpeOut'Ipe.IpeOut, Ipe
IpePage 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpePathIpe.Content, Ipe.Types, Ipe
IpePen 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
ipePolygonIpe.IpeOut, Ipe
ipePolyLineIpe.IpeOut, Ipe
IpePreamble 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeRayIpe.IpeOut, Ipe
IpeReadIpe.Reader, Ipe
ipeReadIpe.Reader, Ipe
IpeReadAttrIpe.Reader
ipeReadAttrIpe.Reader
ipeReadAttrsIpe.Reader
ipeReadObjectIpe.Reader
ipeReadRecIpe.Reader
IpeReadTextIpe.Reader
ipeReadTextIpe.Reader
ipeReadTextWithIpe.Reader
ipeRectangleIpe.IpeOut, Ipe
ipeRenderIpe.IpeRender
ipeRenderWithIpe.IpeRender
ipeSimplePolygonIpe.IpeOut, Ipe
IpeSize 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeStyle 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpeSymbolIpe.Content, Ipe.Types, Ipe
IpeTextLabelIpe.Content, Ipe.Types, Ipe
IpeTilingIpe.Attributes, Ipe
ipeToIpeIpe.IpeToIpe
ipeToIpeWithIpe.IpeToIpe
IpeUseIpe.Content, Ipe.Types, Ipe
IpeValueIpe.Value, Ipe
IpeWriteIpe.Writer, Ipe
ipeWriteIpe.Writer, Ipe
ipeWriteAttrsIpe.Writer
IpeWriteTextIpe.Writer, Ipe
ipeWriteTextIpe.Writer, Ipe
IsBoxableHGeometry, HGeometry.Box, HGeometry.Kernel
isCoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
isConvexHGeometry.Polygon.Convex
IsEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
isIdenticalToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isInteriorIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
IsIntersectableWithHGeometry.Intersection
isMonotoneHGeometry.Polygon.Monotone
isParallelToHGeometry.HyperPlane.Class, HGeometry.HyperPlane
isPerpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isScalarMultipleOfHGeometry, HGeometry.Kernel, HGeometry.Vector
isShiftOf 
1 (Function)HGeometry.CircularList.Util
2 (Function)HGeometry.Cyclic
isStrictlyConvexHGeometry.Polygon.Convex
isSubStringOfHGeometry.StringSearch.KMP
IsTransformableHGeometry.Transformation
isValidIntervalHGeometry.Kernel.Instances
itoNonEmptyOfHGeometry.Lens.Util
ixAttrIpe.Attributes, Ipe
joinHGeometry.Set.Util
kmpMatchHGeometry.StringSearch.KMP
LabelIpe.Content, Ipe.Types, Ipe
labelledIpe.IpeOut, Ipe
labelledWithIpe.IpeOut, Ipe
labelWithHGeometry.Indexed
labelWith'HGeometry.Indexed
labelWithIndexHGeometry.Indexed
lastHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lastFalseHGeometry.Algorithms.BinarySearch
LayerIpe.Attributes, Ipe
LayerName 
1 (Type/Class)Ipe.Layer, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Layer, Ipe.Types, Ipe
layerNameIpe.Layer, Ipe.Types, Ipe
layerNamesIpe.Types, Ipe
layersIpe.Types, Ipe
LayerSym0Ipe.Attributes, Ipe
LeafHGeometry.Tree.Binary.Static
LeafNodeHGeometry.Tree.Util
leaveOutOneHGeometry.List.Util
LeftButtonHGeometry.Miso.Event.Extra
leftFaceOfHGeometry.PlaneGraph
leftHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
LeftSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
leftSideHGeometry, HGeometry.Box, HGeometry.Kernel
leftTangentHGeometry.Polygon.Convex.Tangents
lerpHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
levelsHGeometry.Tree.Util
liesAboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liesBelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liftI2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftI2AHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftOrd1HGeometry.Ord.Dynamic
liftPointToPlaneHGeometry.Duality
liftU2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lightblueIpe.Color
lightcyanIpe.Color
lightgrayIpe.Color
lightgreenIpe.Color
lightyellowIpe.Color
Line2_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
lineAtHGeometry.Line.LowerEnvelope
LineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
LineCapIpe.Attributes, Ipe
LineCapSym0Ipe.Attributes, Ipe
LineEQ 
1 (Type/Class)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
LineHalfLineIntersectionHGeometry.HalfLine
LineJoinIpe.Attributes, Ipe
LineJoinSym0Ipe.Attributes, Ipe
LineLineIntersectionHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineIntersectionGHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LinePV 
1 (Type/Class)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
LineSegment 
1 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegmentLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_ 
1 (Type/Class)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
lineThroughHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
LineToIpe.Path
Line_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
Line_x_Ball_PointHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Ball_SegmentHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_HalfLine_HalfLineHGeometry.HalfLine
Line_x_HalfLine_PointHGeometry.HalfLine
Line_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_Line_LineHGeometry, HGeometry.Line, HGeometry.Kernel
Line_x_Line_PointHGeometry, HGeometry.Line, HGeometry.Kernel
listIntervalsHGeometry.IntervalTree
litIpe.Literal
literallyIpe.Literal
litFileIpe.Literal
LogarithmicMethodDSHGeometry.Algorithms.LogarithmicMethod
lookupAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAttrIpe.Attributes, Ipe
lookupIdxHGeometry.Permutation
lookupLEVertexHGeometry.Line.LowerEnvelope
LossyHGeometry.Number.Real.Rational
LowerEnvelope 
1 (Type/Class)HGeometry.Plane.LowerEnvelope
2 (Type/Class)HGeometry.Line.LowerEnvelope
3 (Data Constructor)HGeometry.Line.LowerEnvelope
lowerEnvelope 
1 (Function)HGeometry.Line.LowerEnvelope
2 (Function)HGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
LowerEnvelopeFHGeometry.Line.LowerEnvelope
lowerEnvelopeWithHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
lowerHull 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
3 (Function)HGeometry.ConvexHull.DivideAndConquer
lowerHull' 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
lowerTangentHGeometry.Polygon.Convex.Tangents
lowerTangent'HGeometry.Polygon.Convex.Tangents
makeMonotoneHGeometry.Polygon.Triangulation.MakeMonotone
mapFHGeometry.Sequence.Alternating
MarkedViewIpe.IpeToIpe
markedViewIpe.IpeToIpe
Matrix 
1 (Data Constructor)Ipe.Attributes, Ipe
2 (Type/Class)HGeometry.Matrix
3 (Data Constructor)HGeometry.Matrix
matrixFromListHGeometry.Matrix.Class, HGeometry.Matrix
matrixFromRowsHGeometry.Matrix.Class, HGeometry.Matrix
MatrixSym0Ipe.Attributes, Ipe
matrixToMisoStringHGeometry.Miso.Svg.StaticCanvas
Matrix_HGeometry.Matrix.Class, HGeometry.Matrix
maximumMaybeHGeometry.List.Util
maximumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
maxInDirectionHGeometry.Polygon.Convex
MaxInfinityHGeometry.Unbounded
maxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
measureHGeometry.Measured.Class, HGeometry.Measured
MeasuredHGeometry.Measured.Class, HGeometry.Measured
MergeHGeometry.Polygon.Triangulation.MakeMonotone
mergeHGeometry.Algorithms.LogarithmicMethod
mergeAlternatingHGeometry.Sequence.Alternating
mergeDefinersHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
mergePairsHGeometry.ClosestPair.DivideAndConquer
mergeSortedHGeometry.Algorithms.DivideAndConquer
mergeSortedByHGeometry.Algorithms.DivideAndConquer
mergeSortedListsHGeometry.Algorithms.DivideAndConquer
mergeSortedListsByHGeometry.Algorithms.DivideAndConquer
Metric_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
MiddleButtonHGeometry.Miso.Event.Extra
minimaByHGeometry.List.Util
minimaOnHGeometry.List.Util
MinimizationDiagramHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
minimumMaybeHGeometry.List.Util
minimumMaybeByHGeometry.List.Util
minimumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
MinInfinityHGeometry.Unbounded
MiniPage 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
MiniPageAttributesIpe.Attributes, Ipe
minkowskiSumHGeometry.Polygon.Convex
minPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
mkClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
mkEndPointHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
mkEpsFoldHGeometry.Number.Real.Symbolic
MkHyperPlaneConstraintsHGeometry.HyperPlane
mkIntervalHGeometry.Interval.Class, HGeometry.Interval
mkIpeObjectIpe.Content, Ipe.Types, Ipe
MkLineEQHGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
mkLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
mkOpenIntervalHGeometry.Interval.Class, HGeometry.Interval
MkReportHGeometry.Measured.Report
MkSimplePolygonHGeometry.Polygon.Simple
MkSphereHGeometry.Ball.CenterAndRadius, HGeometry.Ball
mkTriangleHGeometry.Triangle.Class, HGeometry.Triangle
MkVector1HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector2HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector3HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector4HGeometry, HGeometry.Kernel, HGeometry.Vector
mkViewportHGeometry.Viewport
monotoneDirectionHGeometry.Polygon.Monotone
MonotonePolygonHGeometry.Polygon.Monotone
MonotonePolygonFHGeometry.Polygon.Monotone
mouseCoordinatesHGeometry.Miso.Svg.Canvas
mousePositionHGeometry.Miso.Svg.Canvas
MoveToIpe.Path
NamedIpe.Value, Ipe
namedIpe.Color, Ipe
NatHGeometry.Number.Real.Rational
navyIpe.Color
nearDistHGeometry.Graphics.Camera
negatedHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
NegativeHGeometry.HalfSpace, HGeometry.Sign
neighboursOfHGeometry.PlaneGraph
nextHGeometry.Permutation
nextDartOfHGeometry.PlaneGraph
nextSiblingHGeometry.Tree.Util
NilHGeometry.Tree.Binary.Static
NoIpe.Attributes, Ipe
NoAttrIpe.Attributes, Ipe
NoCropIpe.IpeRender
NodeHGeometry.Tree.Binary.Static
nodeHGeometry.Tree.Binary.Static
nonEmptyTailsHGeometry.Combinatorial.Util
NonVerticalHGeometry.Line.General
NonVerticalHyperPlane 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
NonVerticalHyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
normHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
normalArrowIpe.Attributes, Ipe
normalVectorHGeometry.HyperPlane.Class, HGeometry.HyperPlane
NorthHGeometry.Direction
northHGeometry, HGeometry.Box, HGeometry.Kernel
NorthEastHGeometry.Direction
northEastHGeometry, HGeometry.Box, HGeometry.Kernel
NorthWestHGeometry.Direction
northWestHGeometry, HGeometry.Box, HGeometry.Kernel
NoZip 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
nozipIpe.IpeToIpe
numDartsHGeometry.PlaneGraph
numEdgesHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
numeratorHGeometry.Number.Ratio.Generalized
numFacesHGeometry.PlaneGraph
NumTypeHGeometry.Properties
numVerticesHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
NVLine2_ 
1 (Type/Class)HGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
O 
1 (Type/Class)HGeometry.Ord.Dynamic
2 (Data Constructor)HGeometry.Ord.Dynamic
OnHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
OnBoundaryHGeometry.Boundary
OnBoundaryEdgeHGeometry.Boundary
onClickWithButtonHGeometry.Miso.Event.Extra
onContextMenuHGeometry.Miso.Event.Extra
OnEndHGeometry.Interval.Class, HGeometry.Interval
onHyperPlaneHGeometry.HyperPlane.Class, HGeometry.HyperPlane
onLayerIpe.Types, Ipe
OnLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
onLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
OnlyMarkedViewsIpe.IpeToIpe
onMouseClickAtHGeometry.Miso.Subscription.MouseExtra
onMouseEnterAtHGeometry.Miso.Subscription.MouseExtra
onMouseMoveAtHGeometry.Miso.Subscription.MouseExtra
onRightClickHGeometry.Miso.Event.Extra
onSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
onSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
onSideTestHGeometry.HyperPlane.Class, HGeometry.HyperPlane
onSideUpDownHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
OnSideUpDownTestHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
OnStartHGeometry.Interval.Class, HGeometry.Interval
onTouchEnd 
1 (Function)HGeometry.Miso.Event.Extra
2 (Function)HGeometry.Miso.Subscription.MouseExtra
onTouchMoveHGeometry.Miso.Event.Extra
onTouchMoveAtHGeometry.Miso.Subscription.MouseExtra
onTouchStartHGeometry.Miso.Event.Extra
onTouchStartAtHGeometry.Miso.Subscription.MouseExtra
onWheelHGeometry.Miso.Event.Extra
opacitiesStyleIpe.Types, Ipe
OpacityIpe.Attributes, Ipe
OpacitySym0Ipe.Attributes, Ipe
OpaqueBackgroundIpe.IpeRender
OpenHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
OpenEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
OpenInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
OpenInterval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
OpenLineSegment 
1 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
OpenLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
OperationIpe.Path
oppositeDirectionHGeometry.Direction
Options 
1 (Type/Class)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeRender
3 (Type/Class)Ipe.IpeToIpe
4 (Data Constructor)Ipe.IpeToIpe
OptMatrix_HGeometry.Matrix, HGeometry.Transformation
orangeIpe.Color
OrbitHGeometry.Permutation
orbitFromHGeometry.Permutation
orbitsHGeometry.Permutation
OrdAroundsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
ordAtXHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ordAtYHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
OrdDict 
1 (Type/Class)HGeometry.Ord.Dynamic
2 (Data Constructor)HGeometry.Ord.Dynamic
orientBTHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
orientLRHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
originHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
OriginalHGeometry.Polygon.Triangulation
outerBoundaryHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgeAtHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgesHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgeSegmentAtHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryEdgeSegmentsHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryPolygonHGeometry.Polygon.WithHoles
outerBoundaryVertexAtHGeometry.Polygon.Class, HGeometry.Polygon
outerBoundaryWithNeighboursHGeometry.Polygon.Class, HGeometry.Polygon
outerFaceHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
outerFaceDartHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
outerFaceIdHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
outgoingDartsOfHGeometry.PlaneGraph
outNeighboursOfHGeometry.PlaneGraph
Outside 
1 (Data Constructor)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Boundary
PageNumberIpe.IpeToIpe
pageNumberIpe.IpeRender
PageRange 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
pages 
1 (Function)Ipe.Types, Ipe
2 (Function)Ipe.IpeToIpe
ParallelStripsHGeometry.Plane.LowerEnvelope
partition3HGeometry.List.Util
partitionIntoQuadrantsHGeometry, HGeometry.Kernel, HGeometry.Point
Path 
1 (Type/Class)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
pathIpe.IpeOut, Ipe
PathAttributesIpe.Attributes, Ipe
PathSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
pathSegmentIpe.IpeOut, Ipe
pathSegmentsIpe.Path, Ipe.Content, Ipe.Types, Ipe
pCoordinateIpe.PathParser
PDF 
1 (Data Constructor)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeToIpe
PenIpe.Attributes, Ipe
PenSym0Ipe.Attributes, Ipe
Permutation 
1 (Type/Class)HGeometry.Permutation
2 (Data Constructor)HGeometry.Permutation
perpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
perspectiveProjectionHGeometry.Graphics.Camera
perturbHGeometry.Number.Real.Symbolic
PinIpe.Attributes, Ipe
pinkIpe.Color
PinSym0Ipe.Attributes, Ipe
PinTypeIpe.Attributes, Ipe
PlanarGraph_HGeometry.PlaneGraph
Plane 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PlaneGraph 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Type/Class)HGeometry.PlaneGraph
3 (Data Constructor)HGeometry.PlaneGraph
PlaneGraph_HGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
Plane_ 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PNGIpe.IpeRender
Point 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
Point1HGeometry, HGeometry.Kernel, HGeometry.Point
Point1_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point2HGeometry, HGeometry.Kernel, HGeometry.Point
Point2_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point3HGeometry, HGeometry.Kernel, HGeometry.Point
Point3_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point4HGeometry, HGeometry.Kernel, HGeometry.Point
Point4_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
pointClosestToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
pointClosestToWithDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
PointFHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
pointFromListHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
pointLocateParallelHGeometry.Plane.LowerEnvelope
PointLocationResultHGeometry.Boundary
PointLocationResultWithHGeometry.Boundary
pointOnHGeometry.HyperPlane.Class, HGeometry.HyperPlane
Point_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
PolygonalDomain 
1 (Type/Class)HGeometry.Polygon.WithHoles
2 (Data Constructor)HGeometry.Polygon.WithHoles
PolygonalDomainFHGeometry.Polygon.WithHoles
PolygonEdgeTypeHGeometry.Polygon.Triangulation
PolygonFaceDataHGeometry.Polygon.Triangulation
PolygonPathIpe.Path, Ipe.Content, Ipe.Types, Ipe
Polygon_HGeometry.Polygon.Class, HGeometry.Polygon
PolyLine 
1 (Type/Class)HGeometry.PolyLine
2 (Data Constructor)HGeometry.PolyLine
PolyLineFHGeometry.PolyLine
polyLineFromPointsHGeometry.PolyLine.Class, HGeometry.PolyLine
PolyLineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
PolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
pOperationIpe.PathParser
PositiveHGeometry.HalfSpace, HGeometry.Sign
pPointIpe.PathParser
preambleIpe.Types, Ipe
preambleDataIpe.Types, Ipe
prefixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
prevDartOfHGeometry.PlaneGraph
previousHGeometry.Permutation
prevSiblingHGeometry.Tree.Util
printAsIpeSelectionIpe.Writer, Ipe
printYAMLHGeometry.YAML
projectPointHGeometry, HGeometry.Kernel, HGeometry.Point
pureAttrIpe.Attributes, Ipe
purpleIpe.Color
QCurveToIpe.Path
qdHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
quadranceHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
QuadrantHGeometry, HGeometry.Kernel, HGeometry.Point
quadrantHGeometry, HGeometry.Kernel, HGeometry.Point
quadrantWithHGeometry, HGeometry.Kernel, HGeometry.Point
QuadraticBezierHGeometry.BezierSpline
QuadraticBezierSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
query 
1 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
2 (Function)HGeometry.RangeTree.Base, HGeometry.RangeTree
queryByHGeometry.Set.Util
queryWithHGeometry.Algorithms.LogarithmicMethod
RadicalHGeometry.Number.Radical
radiusHGeometry.Ball.Class, HGeometry.Ball
randomConvexHGeometry.Polygon.Convex.Random
randomMonotoneHGeometry.Polygon.Monotone
randomMonotoneDirectedHGeometry.Polygon.Monotone
randomNonZeroVectorHGeometry.Polygon.Monotone
rangeHGeometry.Viewport
rangeQueryHGeometry.RangeTree.Base, HGeometry.RangeTree
RangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
RArrowIpe.Attributes, Ipe
RArrowSym0Ipe.Attributes, Ipe
rawCameraNormalHGeometry.Graphics.Camera
rawViewUpHGeometry.Graphics.Camera
readAllIpe.FromIpe, Ipe
readAllFromIpe.FromIpe, Ipe
readCoordinateIpe.PathParser
readIpeFileIpe.Reader, Ipe
readIpeStylesheetIpe.Reader, Ipe
readMatrixIpe.PathParser
readPathOperationsIpe.PathParser
readPointIpe.PathParser
readRawIpeFileIpe.Reader, Ipe
readRectangleIpe.PathParser
readSinglePageFileIpe.Reader, Ipe
readSinglePageFileThrowIpe.Reader, Ipe
readXMLIpe.Reader
RealNumber 
1 (Type/Class)HGeometry.Number.Real.Rational
2 (Data Constructor)HGeometry.Number.Real.Rational
rectIpe.Content, Ipe.Types, Ipe
Rectangle 
1 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
Rectangle_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
redIpe.Color
reflectionHGeometry.Transformation
reflectionHHGeometry.Transformation
reflectionVHGeometry.Transformation
RegionHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
RegularHGeometry.Polygon.Triangulation.MakeMonotone
renderAsSvgByteStringHGeometry.Miso.Svg, HGeometry.Svg
renderAsSvgTextHGeometry.Miso.Svg, HGeometry.Svg
renderSvgToFileHGeometry.Miso.Svg, HGeometry.Svg
Report 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
Report1 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
ReportList 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
resolutionIpe.IpeRender
RestGeoPositionHGeometry.GeoJSON
RetainIpeInfoIpe.IpeToIpe
reverseHGeometry.Sequence.Alternating
RightButtonHGeometry.Miso.Event.Extra
rightFaceOfHGeometry.PlaneGraph
rightHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
RightSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
rightSideHGeometry, HGeometry.Box, HGeometry.Kernel
rightTangentHGeometry.Polygon.Convex.Tangents
RigidIpe.Attributes, Ipe
rootHGeometry.Tree.Util
rotateCoordSystemHGeometry.Graphics.Camera
rotateToHGeometry.Transformation
rotationHGeometry.Transformation
roundToConstantHGeometry.Number.Real.Symbolic
rowHGeometry.Matrix.Class, HGeometry.Matrix
rowsHGeometry.Matrix.Class, HGeometry.Matrix
runLatexIpe.IpeToIpe
runOHGeometry.Ord.Dynamic
runParserIpe.PathParser
sameDirectionHGeometry, HGeometry.Kernel, HGeometry.Vector
samplePointHGeometry.Polygon.Simple.Sample
samplePolygonHGeometry.Polygon.Simple.Sample
samplePolygonsHGeometry.Polygon.Simple.Sample
SamplerHGeometry.Polygon.Simple.Sample
SArrowIpe.Attributes, Ipe
SAttributeUniverseIpe.Attributes, Ipe
scalarMultipleHGeometry, HGeometry.Kernel, HGeometry.Vector
scaleByHGeometry.Transformation
scaleUniformlyByHGeometry.Transformation
scalingHGeometry.Transformation
SClipIpe.Attributes, Ipe
screenDimensionsHGeometry.Graphics.Camera
SDashIpe.Attributes, Ipe
SDepthIpe.Attributes, Ipe
seagreenIpe.Color
searchHGeometry.IntervalTree
searchInSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
SegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
separatorsHGeometry.Sequence.Alternating
setAttrIpe.Attributes, Ipe
SFillIpe.Attributes, Ipe
SFillRuleIpe.Attributes, Ipe
SGradientIpe.Attributes, Ipe
SHAlignIpe.Attributes, Ipe
SHeightIpe.Attributes, Ipe
ShiftedEqHGeometry.Cyclic
shiftLeftHGeometry.Interval.Class, HGeometry.Interval
shiftRightHGeometry.Interval.Class, HGeometry.Interval
sideDirectionsHGeometry, HGeometry.Box, HGeometry.Kernel
Sides 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
sidesHGeometry, HGeometry.Box, HGeometry.Kernel
sides'HGeometry, HGeometry.Box, HGeometry.Kernel
SideTestHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SideTestUpDownHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
sideValuesHGeometry, HGeometry.Box, HGeometry.Kernel
SignHGeometry.HalfSpace, HGeometry.Sign
signedArea2XHGeometry.Polygon.Class, HGeometry.Polygon
signFromTermsHGeometry.Sign
signOfHGeometry.Number.Real.Symbolic
signormHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
SimplePolygonHGeometry.Polygon.Simple
SimplePolygonFHGeometry.Polygon.Simple
SimplePolygon_HGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
simplifyHGeometry.PolyLine.Simplification.ImaiIri
simplifyWithHGeometry.PolyLine.Simplification.ImaiIri
singlePageFileIpe.Types, Ipe
singlePageFromContentIpe.Types, Ipe
singletonHGeometry.Algorithms.LogarithmicMethod
SingletonPointHGeometry.HalfPlane.CommonIntersection
singleViewIpe.IpeToIpe
SizeIpe.Attributes, Ipe
size 
1 (Function)HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Permutation
Sized 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
SizeSym0Ipe.Attributes, Ipe
skewXHGeometry.Transformation
SlabHGeometry.HalfPlane.CommonIntersection
SLayerIpe.Attributes, Ipe
SLineCapIpe.Attributes, Ipe
SLineJoinIpe.Attributes, Ipe
slopeHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
SMatrixIpe.Attributes, Ipe
snocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
snocElemWithHGeometry.Sequence.Alternating
SOpacityIpe.Attributes, Ipe
sortHGeometry.Foldable.Sort
sortAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
sortByHGeometry.Foldable.Sort
sortOnCheapHGeometry.Foldable.Sort
sosIndexHGeometry.Indexed
SoSRationalHGeometry.Number.Real.Symbolic
sosRationalHGeometry.Number.Real.Symbolic
SouthHGeometry.Direction
southHGeometry, HGeometry.Box, HGeometry.Kernel
SouthEastHGeometry.Direction
southEastHGeometry, HGeometry.Box, HGeometry.Kernel
SouthWestHGeometry.Direction
southWestHGeometry, HGeometry.Box, HGeometry.Kernel
SP 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
spanInHGeometry, HGeometry.LineSegment, HGeometry.Kernel
SPenIpe.Attributes, Ipe
Sphere 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
SPinIpe.Attributes, Ipe
SplineIpe.Path
SplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
SplitHGeometry.Polygon.Triangulation.MakeMonotone
splitByHGeometry.Set.Util
splitIncrHGeometry.CircularList.Util
splitL1AtHGeometry.Sequence.NonEmpty
splitOnHGeometry.Set.Util
splitR1AtHGeometry.Sequence.NonEmpty
sqrtHGeometry.Number.Radical
squaredEuclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredEuclideanDistToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredRadiusHGeometry.Ball.Class, HGeometry.Ball
SRArrowIpe.Attributes, Ipe
SSizeIpe.Attributes, Ipe
SStrokeIpe.Attributes, Ipe
SStrokeOpacityIpe.Attributes, Ipe
SStyleIpe.Attributes, Ipe
stab 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
stabsIntervalHGeometry.Interval.Class, HGeometry.Interval
StartHGeometry.Polygon.Triangulation.MakeMonotone
startHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startAndEndHGeometry.Interval.Class, HGeometry.Interval
startAndEndPointHGeometry.Interval.Class, HGeometry.Interval
startPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
StartPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
StaticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvas_HGeometry.Miso.Svg.StaticCanvas
StatusStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
steepestCcwFromHGeometry.ConvexHull.JarvisMarch
steepestCwFromHGeometry.ConvexHull.JarvisMarch
STilingIpe.Attributes, Ipe
STR 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
STransformationsIpe.Attributes, Ipe
StrictlyInsideHGeometry.Boundary
StrictlyOutsideHGeometry.Boundary
StrokeIpe.Attributes, Ipe
StrokeOpacityIpe.Attributes, Ipe
StrokeOpacitySym0Ipe.Attributes, Ipe
StrokeSym0Ipe.Attributes, Ipe
StyleIpe.Attributes, Ipe
styleDataIpe.Types, Ipe
styleNameIpe.Types, Ipe
stylesIpe.Types, Ipe
StyleSym0Ipe.Attributes, Ipe
SubLineHGeometry.HalfPlane.CommonIntersection
suffixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
suitableBaseHGeometry.Number.Real.Symbolic
sumVHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
supportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SVAlignIpe.Attributes, Ipe
SVGIpe.IpeRender
svgCanvas_HGeometry.Miso.Svg.Canvas
SWidthIpe.Attributes, Ipe
SymbolIpe.Content, Ipe.Types, Ipe
SymbolAttributesIpe.Attributes, Ipe
SymbolicHGeometry.Number.Real.Symbolic
symbolicHGeometry.Number.Real.Symbolic
symbolNameIpe.Content, Ipe.Types, Ipe
symbolPointIpe.Content, Ipe.Types, Ipe
tailOfHGeometry.PlaneGraph
takeAttrIpe.Attributes, Ipe
Term 
1 (Type/Class)HGeometry.Number.Real.Symbolic
2 (Data Constructor)HGeometry.Number.Real.Symbolic
termHGeometry.Number.Real.Symbolic
TeXStyleIpe.Attributes, Ipe
TextAttributesIpe.Attributes, Ipe
TextLabelIpe.Content, Ipe.Types, Ipe
TextLabelAttributesIpe.Attributes, Ipe
TextSizeUnitIpe.Attributes, Ipe
theHolesHGeometry.Polygon.WithHoles
theValueHGeometry.Indexed
theViewportHGeometry.Miso.Svg.Canvas
Three 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
TilingIpe.Attributes, Ipe
TilingSym0Ipe.Attributes, Ipe
toBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
toCounterClockwiseTriangleHGeometry.Triangle.Class, HGeometry.Triangle
toCycleRepHGeometry.Permutation
toCyclicHGeometry.Polygon.Simple
toFixedHGeometry.Number.Real.Rational
toggleHGeometry.Set.Util
toggleByHGeometry.Set.Util
toHostFromHGeometry.Viewport
toIpeSelectionXMLIpe.Writer, Ipe
toIpeXMLIpe.Writer, Ipe
toLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
ToObjectIpe.Content, Ipe.Types, Ipe
Top 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
toPlaneGraphHGeometry.Plane.LowerEnvelope.Connected.Graph
TopLeftHGeometry, HGeometry.Kernel, HGeometry.Point
toPolygonPathSegmentIpe.IpeOut, Ipe
TopRightHGeometry, HGeometry.Kernel, HGeometry.Point
topSideHGeometry, HGeometry.Box, HGeometry.Kernel
topToMaybeHGeometry.Unbounded
toRoseTreeHGeometry.Tree.Binary.Static
toRoseTree'HGeometry.Tree.Binary.Static
toSimplePolygon 
1 (Function)HGeometry.Polygon.Monotone
2 (Function)HGeometry.Polygon.Convex
ToSvgCoordinateHGeometry.Miso.Svg.StaticCanvas
toTermsHGeometry.Number.Real.Symbolic
toVecHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
toViewPortHGeometry.Graphics.Camera
toWorldInHGeometry.Viewport
Transformation 
1 (Type/Class)HGeometry.Transformation
2 (Data Constructor)HGeometry.Transformation
TransformationConstraintsHGeometry.Transformation
transformationMatrixHGeometry.Transformation
TransformationsIpe.Attributes, Ipe
TransformationsSym0Ipe.Attributes, Ipe
TransformationTypesIpe.Attributes, Ipe
transformByHGeometry.Transformation
translateByHGeometry.Transformation
translationHGeometry.Transformation
TranslationsIpe.Attributes, Ipe
transparentIpe.IpeRender
TransparentBackgroundIpe.IpeRender
traverseAttrIpe.Attributes, Ipe
traverseAttrsIpe.Attributes, Ipe
traverseIpeAttrsIpe.Content, Ipe.Types, Ipe
traverseLeftFromHGeometry.Cyclic
traverseRightFromHGeometry.Cyclic
TreeNodeHGeometry.Tree.Util
Triangle 
1 (Type/Class)HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle
triangleSamplerHGeometry.Polygon.Simple.Sample
triangleSignedArea2XHGeometry.Triangle.Class, HGeometry.Triangle
Triangle_ 
1 (Type/Class)HGeometry.Triangle.Class, HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle.Class, HGeometry.Triangle
triangulate 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation
turquoiseIpe.Color
twinDartOfHGeometry.PlaneGraph
twinOfHGeometry.PlaneGraph
Two 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
unAttrsIpe.Attributes, Ipe
UnBoundedHGeometry.Unbounded
UnboundedHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
UnboundedRegionHGeometry.HalfPlane.CommonIntersection
unBoundedToMaybeHGeometry.Unbounded
uncheckedFromCCWPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
uncheckedLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
uncheckedMontonePolygonHGeometry.Polygon.Monotone
unconsHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unconsAltHGeometry.Sequence.Alternating
uniformScalingHGeometry.Transformation
uniquePairsHGeometry.Combinatorial.Util
uniqueTripletsHGeometry.Combinatorial.Util
unitHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unitBallHGeometry.Ball.Class, HGeometry.Ball
unitEllipseHGeometry.Ellipse
unSetAttrIpe.Attributes, Ipe
unsnocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unversionedHGeometry.YAML
unZipperLocalHGeometry.Tree.Util
UpHGeometry.Miso.Event.Extra
upHGeometry.Tree.Util
updateHGeometry.Miso.Canvas.Zoom
upperHull 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
3 (Function)HGeometry.ConvexHull.DivideAndConquer
upperHull' 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
upperHullFromSortedHGeometry.ConvexHull.GrahamScan
upperHullFromSorted'HGeometry.ConvexHull.GrahamScan
upperTangentHGeometry.Polygon.Convex.Tangents
upperTangent'HGeometry.Polygon.Convex.Tangents
ValHGeometry.Unbounded
ValBHGeometry.Unbounded
VAlignIpe.Attributes, Ipe
VAlignSym0Ipe.Attributes, Ipe
ValTHGeometry.Unbounded
ValuedIpe.Value, Ipe
VectorHGeometry, HGeometry.Kernel, HGeometry.Vector
vectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Vector1HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector2HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector3HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector4HGeometry, HGeometry.Kernel, HGeometry.Vector
vectorFromListHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
Vector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
verifyConvexHGeometry.Polygon.Convex
Versioned 
1 (Type/Class)HGeometry.YAML
2 (Data Constructor)HGeometry.YAML
VertexHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
vertexAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
VertexContainerHGeometry.Polygon.Simple
VertexFormHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
VertexIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
VertexTypeHGeometry.Polygon.Triangulation.MakeMonotone
VerticalIpe.Attributes, Ipe
VerticalAlignmentIpe.Attributes, Ipe
verticalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
VerticalLineThroughHGeometry.Line.General
VerticalOrLineEQHGeometry.Line.General
VerticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalSideTestHGeometry.HyperPlane.Class, HGeometry.HyperPlane
verticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
View 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ViewL1HGeometry.Sequence.NonEmpty
viewl1HGeometry.Sequence.NonEmpty
ViewNumberIpe.IpeToIpe
viewNumberIpe.IpeRender
viewPlaneDepthHGeometry.Graphics.Camera
Viewport 
1 (Type/Class)HGeometry.Viewport
2 (Data Constructor)HGeometry.Viewport
viewPortHGeometry.Viewport
ViewR1HGeometry.Sequence.NonEmpty
viewr1HGeometry.Sequence.NonEmpty
viewsIpe.Types, Ipe
viewUpHGeometry.Graphics.Camera
violetIpe.Color
visibilityGraphHGeometry.Polygon.Visibility.Naive
visibilityGraphWithHGeometry.Polygon.Visibility.Naive
VoronoiDiagram 
1 (Type/Class)HGeometry.VoronoiDiagram
2 (Data Constructor)HGeometry.VoronoiDiagram
voronoiDiagramHGeometry.VoronoiDiagram
VoronoiDiagram'HGeometry.VoronoiDiagram
voronoiVerticesHGeometry.VoronoiDiagram
wComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
wCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
WestHGeometry.Direction
westHGeometry, HGeometry.Box, HGeometry.Kernel
WheelDirectionHGeometry.Miso.Event.Extra
whiteIpe.Color
WidthIpe.Attributes, Ipe
width 
1 (Function)HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
2 (Function)Ipe.Content, Ipe.Types, Ipe
WidthSym0Ipe.Attributes, Ipe
WindIpe.Attributes, Ipe
withAtsHGeometry.Miso.Svg, HGeometry.Svg
withAts'HGeometry.Miso.Svg, HGeometry.Svg
withCanvasEventsHGeometry.Miso.Svg.Canvas
withDefaultsIpe.Types, Ipe
WithIndex 
1 (Type/Class)HGeometry.Indexed
2 (Data Constructor)HGeometry.Indexed
withNeighboursHGeometry.Sequence.Alternating
withOrdHGeometry.Ord.Dynamic
worldToHostHGeometry.Viewport
worldToViewHGeometry.Graphics.Camera
writeAttrNamesIpe.Attributes, Ipe
writeAttrValuesIpe.Writer
writeIpeFileIpe.Writer, Ipe
writeIpeFile'Ipe.Writer, Ipe
writeIpeFileAsPdfIpe.IpeToIpe
writeIpePageIpe.Writer, Ipe
wrtCenterHGeometry.Viewport
xComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
xCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
xCoordAtHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
XMLIpe.IpeToIpe
xmlLiteralIpe.Literal
yComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
yCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
yCoordAtHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
yellowIpe.Color
YesIpe.Attributes, Ipe
YMonotonePolygon_HGeometry.Polygon.Triangulation.TriangulateMonotone
ZHGeometry.GeoJSON
zComponentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
zCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
zeroHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
ZeroToOne 
1 (Type/Class)HGeometry.Kernel.Test.Box
2 (Data Constructor)HGeometry.Kernel.Test.Box
ZipIpe.IpeToIpe
zipExactWithHGeometry.Tree.Binary.Static
Zipper 
1 (Type/Class)HGeometry.List.Zipper
2 (Data Constructor)HGeometry.List.Zipper
3 (Type/Class)HGeometry.Tree.Util
4 (Data Constructor)HGeometry.Tree.Util
zipRecsWithIpe.Attributes, Ipe
ZMHGeometry.GeoJSON
ZoomAction 
1 (Type/Class)HGeometry.Miso.Canvas.Zoom
2 (Data Constructor)HGeometry.Miso.Canvas.Zoom
ZoomConfig 
1 (Type/Class)HGeometry.Viewport
2 (Data Constructor)HGeometry.Viewport
ZoomDirectionHGeometry.Miso.Canvas.Zoom
ZoomInHGeometry.Miso.Canvas.Zoom
zoomLevelHGeometry.Miso.Canvas.Zoom
ZoomOutHGeometry.Miso.Canvas.Zoom
^*HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
^+^HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
^-^HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
^/HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
_AlternatingHGeometry.Line.LowerEnvelope
_anchorPointHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
_ArcSegmentIpe.Path
_ArcToIpe.Path
_arrowNameIpe.Attributes, Ipe
_arrowSizeIpe.Attributes, Ipe
_asClosedLineSegmentIpe.FromIpe, Ipe
_asConvexPolygonIpe.FromIpe, Ipe
_asLineSegmentIpe.FromIpe, Ipe
_asPointIpe.FromIpe, Ipe
_asPolyLineIpe.FromIpe, Ipe
_asRectangleIpe.FromIpe, Ipe
_asSimplePolygonIpe.FromIpe, Ipe
_asTriangleIpe.FromIpe, Ipe
_AttrIpe.Attributes, Ipe
_BallSphereHGeometry.Ball.CenterAndRadius, HGeometry.Ball
_BottomHGeometry.Unbounded
_BottomMaybeHGeometry.Unbounded
_BoundaryHGeometry.Boundary
_ClosedSplineIpe.Path
_ClosedSplineSegmentIpe.Path
_ClosePathIpe.Path
_ConvexPolygonHGeometry.Polygon.Convex
_coreHGeometry.Ext
_CubicBezierSegmentIpe.Path
_CurveToIpe.Path
_directionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
_DiskCircleHGeometry.Ball.CenterAndRadius, HGeometry.Ball
_EllipseIpe.Path
_EllipseCircleHGeometry.Ellipse
_EllipseSegmentIpe.Path
_endPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
_ExtHGeometry.Ext
_extraHGeometry.Ext
_GeoPolygonPolygonalDomainHGeometry.GeoJSON
_GeoPositionWithoutCRSHGeometry.GeoJSON
_getAttrIpe.Attributes, Ipe
_IpeGroupIpe.Content, Ipe.Types, Ipe
_IpeImageIpe.Content, Ipe.Types, Ipe
_IpeMiniPageIpe.Content, Ipe.Types, Ipe
_IpePathIpe.Content, Ipe.Types, Ipe
_IpeTextLabelIpe.Content, Ipe.Types, Ipe
_IpeUseIpe.Content, Ipe.Types, Ipe
_LineToIpe.Path
_MoveToIpe.Path
_PolygonPathIpe.Path
_PolyLineFHGeometry.PolyLine
_PolyLineLineSegmentHGeometry.PolyLine.Class, HGeometry.PolyLine
_PolyLineSegmentIpe.Path
_QCurveToIpe.Path
_QuadraticBezierSegmentIpe.Path
_SplineIpe.Path
_SplineSegmentIpe.Path
_TopHGeometry.Unbounded
_TopMaybeHGeometry.Unbounded
_TreeNodeEitherHGeometry.Tree.Util
_unUnBoundedHGeometry.Unbounded
_ValHGeometry.Unbounded
_ValBHGeometry.Unbounded
_ValTHGeometry.Unbounded
_VectorHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
_withAttrsIpe.FromIpe, Ipe
|.|HGeometry.Transformation
|>>HGeometry.Sequence.NonEmpty
\ No newline at end of file diff --git a/haddocks/doc-index-B.html b/haddocks/doc-index-B.html index 4799c153b..cf1062058 100644 --- a/haddocks/doc-index-B.html +++ b/haddocks/doc-index-B.html @@ -1 +1 @@ - (Index - B)
 

Index - B

BackgroundIpe.IpeRender
Ball 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Ball_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
basicIpeStyleIpe.Types, Ipe
basicNamedColorsIpe.Color
basisHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
BeforeHGeometry.Interval.Class, HGeometry.Interval
BelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
belowAllHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
Bezier2HGeometry.BezierSpline
Bezier3HGeometry.BezierSpline
BezierSpline 
1 (Type/Class)HGeometry.BezierSpline
2 (Data Constructor)HGeometry.BezierSpline
BezierSplineFHGeometry.BezierSpline
BidirGraph_HGeometry.PlaneGraph
BinarySearchHGeometry.Algorithms.BinarySearch
binarySearchFirstHGeometry.Algorithms.BinarySearch
binarySearchFirstIdxInHGeometry.Algorithms.BinarySearch
binarySearchFirstInHGeometry.Algorithms.BinarySearch
binarySearchIdxInHGeometry.Algorithms.BinarySearch
binarySearchInHGeometry.Algorithms.BinarySearch
binarySearchLastHGeometry.Algorithms.BinarySearch
binarySearchLastIdxInHGeometry.Algorithms.BinarySearch
binarySearchLastInHGeometry.Algorithms.BinarySearch
BinarySearchResultHGeometry.Algorithms.BinarySearch
binarySearchUntilHGeometry.Algorithms.BinarySearch
BinaryTreeHGeometry.Tree.Binary.Static
BinLeafTreeHGeometry.Tree.Binary.Static
bisectorHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
blackIpe.Color
blankCanvasHGeometry.Miso.Svg.Canvas
blueIpe.Color
bothClosedHGeometry.Kernel.Instances
Bottom 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
BottomLeftHGeometry, HGeometry.Kernel, HGeometry.Point
BottomRightHGeometry, HGeometry.Kernel, HGeometry.Point
bottomSideHGeometry, HGeometry.Box, HGeometry.Kernel
bottomToMaybeHGeometry.Unbounded
Boundary 
1 (Type/Class)HGeometry.Boundary
2 (Data Constructor)HGeometry.Boundary
boundaryDartOfHGeometry.PlaneGraph
boundaryDartsHGeometry.PlaneGraph
boundaryDartsOfHGeometry.PlaneGraph
boundaryVerticesHGeometry.PlaneGraph
boundaryVerticesOfHGeometry.PlaneGraph
BoundedHGeometry.Plane.LowerEnvelope.ConnectedNew
BoundedRegionHGeometry.HalfPlane.CommonIntersection
BoundedVertexFHGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
boundedVerticesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
boundingBoxHGeometry, HGeometry.Box, HGeometry.Kernel
BoundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace, HGeometry.HalfSpace
boundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace
Box 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
Box_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
brownIpe.Color
bruteForceLowerEnvelopeHGeometry.Plane.LowerEnvelope.ConnectedNew
buildHGeometry.Algorithms.LogarithmicMethod
buildClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
buildFailureFunctionHGeometry.StringSearch.KMP
buildIntervalHGeometry.Interval.Class, HGeometry.Interval
buildRangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
buildSegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
buildSkeletonHGeometry.SegmentTree.Base, HGeometry.SegmentTree
ButtonHGeometry.Miso.Event.Extra
\ No newline at end of file + (Index - B)
 

Index - B

BackgroundIpe.IpeRender
Ball 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Ball_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
basicIpeStyleIpe.Types, Ipe
basicNamedColorsIpe.Color
basisHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
BeforeHGeometry.Interval.Class, HGeometry.Interval
BelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
Bezier2HGeometry.BezierSpline
Bezier3HGeometry.BezierSpline
BezierSpline 
1 (Type/Class)HGeometry.BezierSpline
2 (Data Constructor)HGeometry.BezierSpline
BezierSplineFHGeometry.BezierSpline
BidirGraph_HGeometry.PlaneGraph
BinarySearchHGeometry.Algorithms.BinarySearch
binarySearchFirstHGeometry.Algorithms.BinarySearch
binarySearchFirstIdxInHGeometry.Algorithms.BinarySearch
binarySearchFirstInHGeometry.Algorithms.BinarySearch
binarySearchIdxInHGeometry.Algorithms.BinarySearch
binarySearchInHGeometry.Algorithms.BinarySearch
binarySearchLastHGeometry.Algorithms.BinarySearch
binarySearchLastIdxInHGeometry.Algorithms.BinarySearch
binarySearchLastInHGeometry.Algorithms.BinarySearch
BinarySearchResultHGeometry.Algorithms.BinarySearch
binarySearchUntilHGeometry.Algorithms.BinarySearch
BinaryTreeHGeometry.Tree.Binary.Static
BinLeafTreeHGeometry.Tree.Binary.Static
bisectorHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
blackIpe.Color
blankCanvasHGeometry.Miso.Svg.Canvas
blueIpe.Color
bothClosedHGeometry.Kernel.Instances
Bottom 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
BottomLeftHGeometry, HGeometry.Kernel, HGeometry.Point
BottomRightHGeometry, HGeometry.Kernel, HGeometry.Point
bottomSideHGeometry, HGeometry.Box, HGeometry.Kernel
bottomToMaybeHGeometry.Unbounded
Boundary 
1 (Type/Class)HGeometry.Boundary
2 (Data Constructor)HGeometry.Boundary
boundaryDartOfHGeometry.PlaneGraph
boundaryDartsHGeometry.PlaneGraph
boundaryDartsOfHGeometry.PlaneGraph
boundaryVerticesHGeometry.PlaneGraph
boundaryVerticesOfHGeometry.PlaneGraph
BoundedHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
BoundedRegionHGeometry.HalfPlane.CommonIntersection
boundingBoxHGeometry, HGeometry.Box, HGeometry.Kernel
BoundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace, HGeometry.HalfSpace
boundingHyperPlaneHGeometry.HalfSpace.Class, HGeometry.HalfSpace
Box 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
Box_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
brownIpe.Color
bruteForceLowerEnvelopeHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
buildHGeometry.Algorithms.LogarithmicMethod
buildClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
buildFailureFunctionHGeometry.StringSearch.KMP
buildIntervalHGeometry.Interval.Class, HGeometry.Interval
buildRangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
buildSegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
buildSkeletonHGeometry.SegmentTree.Base, HGeometry.SegmentTree
ButtonHGeometry.Miso.Event.Extra
\ No newline at end of file diff --git a/haddocks/doc-index-C.html b/haddocks/doc-index-C.html index e8d1f07fa..b599d2d5a 100644 --- a/haddocks/doc-index-C.html +++ b/haddocks/doc-index-C.html @@ -1 +1 @@ - (Index - C)
 

Index - C

Camera 
1 (Type/Class)HGeometry.Graphics.Camera
2 (Data Constructor)HGeometry.Graphics.Camera
cameraNormalHGeometry.Graphics.Camera
cameraPositionHGeometry.Graphics.Camera
cameraTransformHGeometry.Graphics.Camera
CanDeleteHGeometry.Measured.Class, HGeometry.Measured
CanInsertHGeometry.Measured.Class, HGeometry.Measured
canonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
CanvasHGeometry.Miso.Svg.Canvas
CardinalDirectionHGeometry.Direction
CCP 
1 (Type/Class)HGeometry.ClosestPair.DivideAndConquer
2 (Data Constructor)HGeometry.ClosestPair.DivideAndConquer
CCW 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
ccwPredecessorOfHGeometry.Polygon.Class, HGeometry.Polygon
ccwSuccessorOfHGeometry.Polygon.Class, HGeometry.Polygon
centerHGeometry.Ball.Class, HGeometry.Ball
centeredOriginHGeometry.Viewport
centerPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
centroidHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
Chain 
1 (Type/Class)HGeometry.HalfPlane.CommonIntersection
2 (Data Constructor)HGeometry.HalfPlane.CommonIntersection
Circle 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
circleToEllipseHGeometry.Ellipse
CircularListHGeometry.Plane.LowerEnvelope.ConnectedNew
clampToHGeometry.Interval.Class, HGeometry.Interval
classifyVerticesHGeometry.Polygon.Triangulation.MakeMonotone
ClipIpe.Attributes, Ipe
ClipSym0Ipe.Attributes, Ipe
ClosedHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
ClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
ClosedInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
ClosedInterval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
ClosedLineSegment 
1 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
ClosedLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ClosedSplineIpe.Path
ClosedSplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ClosePathIpe.Path
closestPair 
1 (Function)HGeometry.ClosestPair.DivideAndConquer, HGeometry.ClosestPair
2 (Function)HGeometry.ClosestPair.Naive
closestPairWithHGeometry.ClosestPair.Naive
cmpByDistanceToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
cmpInDirection 
1 (Function)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Function)HGeometry.HyperPlane
cmpSlopeHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
cmpXHGeometry.Polygon.Triangulation.MakeMonotone
CoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
columnHGeometry.Matrix.Class, HGeometry.Matrix
CommonAttributesIpe.Attributes, Ipe
commonAttributesIpe.Content, Ipe.Types, Ipe
CommonIntersectionHGeometry.HalfPlane.CommonIntersection
commonIntersectionHGeometry.HalfPlane.CommonIntersection
CompareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalExactHGeometry.Interval.Class, HGeometry.Interval
compare_HGeometry.Ord.Dynamic
componentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
component'HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
componentsHGeometry, HGeometry.Kernel, HGeometry.Vector
computeDiagonals 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation.MakeMonotone
3 (Function)HGeometry.Polygon.Triangulation
computeVertexFormHGeometry.Plane.LowerEnvelope.ConnectedNew
ConnectedEnvelopeHGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
ConnectedVDHGeometry.VoronoiDiagram
consHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
consElemWithHGeometry.Sequence.Alternating
constantHGeometry.Number.Real.Symbolic
constantFactorHGeometry.Number.Real.Symbolic
ConstructableClosedInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableHyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
ConstructableInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ConstructableOpenInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructablePoint_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
ConstructablePolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
ConstructableSimplePolygonHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple, HGeometry.Polygon.Simple
constructTreeHGeometry.Tree.Util
contentIpe.Types, Ipe
contentInViewIpe.Types, Ipe
ConversionErrorIpe.Reader, Ipe
ConvexHullHGeometry.ConvexHull.R3.Naive
convexHull 
1 (Function)HGeometry.ConvexHull.QuickHull
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan, HGeometry.ConvexHull
4 (Function)HGeometry.ConvexHull.DivideAndConquer
5 (Function)HGeometry.ConvexHull.Melkman
ConvexPolygonHGeometry.Polygon.Convex
ConvexPolygonFHGeometry.Polygon.Convex
ConvexPolygon_HGeometry.Polygon.Convex.Class, HGeometry.Polygon.Convex
coordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coord'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
CoordinateIpe.PathParser, Ipe.Reader
coordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coreHGeometry.Ext
CoreOfHGeometry.Ext
Corners 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
corners 
1 (Function)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Triangle.Class, HGeometry.Triangle
cornersInDirectionHGeometry, HGeometry.Box, HGeometry.Kernel
Count 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
CPHGeometry.ClosestPair.DivideAndConquer
createTreeHGeometry.IntervalTree
Crop 
1 (Type/Class)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeRender
cropIpe.IpeRender
crossHGeometry, HGeometry.Kernel, HGeometry.Vector
CubicBezierHGeometry.BezierSpline
CubicBezierSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
currentLevelHGeometry.Viewport
CurveToIpe.Path
CWHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
cycleOfHGeometry.Permutation
cycleRepHGeometry.Permutation
Cyclic 
1 (Type/Class)HGeometry.Cyclic
2 (Data Constructor)HGeometry.Cyclic
\ No newline at end of file + (Index - C)
 

Index - C

Camera 
1 (Type/Class)HGeometry.Graphics.Camera
2 (Data Constructor)HGeometry.Graphics.Camera
cameraNormalHGeometry.Graphics.Camera
cameraPositionHGeometry.Graphics.Camera
cameraTransformHGeometry.Graphics.Camera
CanDeleteHGeometry.Measured.Class, HGeometry.Measured
CanInsertHGeometry.Measured.Class, HGeometry.Measured
canonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
CanvasHGeometry.Miso.Svg.Canvas
CardinalDirectionHGeometry.Direction
CCP 
1 (Type/Class)HGeometry.ClosestPair.DivideAndConquer
2 (Data Constructor)HGeometry.ClosestPair.DivideAndConquer
CCW 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
ccwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
ccwPredecessorOfHGeometry.Polygon.Class, HGeometry.Polygon
ccwSuccessorOfHGeometry.Polygon.Class, HGeometry.Polygon
centerHGeometry.Ball.Class, HGeometry.Ball
centeredOriginHGeometry.Viewport
centerPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
centroidHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
Chain 
1 (Type/Class)HGeometry.HalfPlane.CommonIntersection
2 (Data Constructor)HGeometry.HalfPlane.CommonIntersection
Circle 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
circleToEllipseHGeometry.Ellipse
CircularListHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
clampToHGeometry.Interval.Class, HGeometry.Interval
classifyVerticesHGeometry.Polygon.Triangulation.MakeMonotone
ClipIpe.Attributes, Ipe
ClipSym0Ipe.Attributes, Ipe
ClosedHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
ClosedEHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
ClosedInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
ClosedInterval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
ClosedLineSegment 
1 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
ClosedLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ClosedSplineIpe.Path
ClosedSplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ClosePathIpe.Path
closestPair 
1 (Function)HGeometry.ClosestPair.DivideAndConquer, HGeometry.ClosestPair
2 (Function)HGeometry.ClosestPair.Naive
closestPairWithHGeometry.ClosestPair.Naive
cmpByDistanceToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
cmpInDirection 
1 (Function)HGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
2 (Function)HGeometry.HyperPlane
cmpSlopeHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
cmpXHGeometry.Polygon.Triangulation.MakeMonotone
CoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
columnHGeometry.Matrix.Class, HGeometry.Matrix
CommonAttributesIpe.Attributes, Ipe
commonAttributesIpe.Content, Ipe.Types, Ipe
CommonIntersectionHGeometry.HalfPlane.CommonIntersection
commonIntersectionHGeometry.HalfPlane.CommonIntersection
CompareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalHGeometry.Interval.Class, HGeometry.Interval
compareIntervalExactHGeometry.Interval.Class, HGeometry.Interval
compare_HGeometry.Ord.Dynamic
componentHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
component'HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
componentsHGeometry, HGeometry.Kernel, HGeometry.Vector
computeDiagonals 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation.MakeMonotone
3 (Function)HGeometry.Polygon.Triangulation
computeVertexFormHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
ConnectedEnvelopeHGeometry.Plane.LowerEnvelope
ConnectedVDHGeometry.VoronoiDiagram
consHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
consElemWithHGeometry.Sequence.Alternating
constantHGeometry.Number.Real.Symbolic
constantFactorHGeometry.Number.Real.Symbolic
ConstructableClosedInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableHyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
ConstructableInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructableLineSegment_HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
ConstructableOpenInterval_HGeometry.Interval.Class, HGeometry.Interval
ConstructablePoint_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
ConstructablePolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
ConstructableSimplePolygonHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple, HGeometry.Polygon.Simple
constructTreeHGeometry.Tree.Util
contentIpe.Types, Ipe
contentInViewIpe.Types, Ipe
ConversionErrorIpe.Reader, Ipe
convexHull 
1 (Function)HGeometry.ConvexHull.QuickHull
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan, HGeometry.ConvexHull
4 (Function)HGeometry.ConvexHull.DivideAndConquer
5 (Function)HGeometry.ConvexHull.Melkman
ConvexPolygonHGeometry.Polygon.Convex
ConvexPolygonFHGeometry.Polygon.Convex
ConvexPolygon_HGeometry.Polygon.Convex.Class, HGeometry.Polygon.Convex
coordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coord'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
CoordinateIpe.PathParser, Ipe.Reader
coordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
coreHGeometry.Ext
CoreOfHGeometry.Ext
Corners 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
corners 
1 (Function)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Triangle.Class, HGeometry.Triangle
cornersInDirectionHGeometry, HGeometry.Box, HGeometry.Kernel
Count 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
CPHGeometry.ClosestPair.DivideAndConquer
createTreeHGeometry.IntervalTree
Crop 
1 (Type/Class)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeRender
cropIpe.IpeRender
crossHGeometry, HGeometry.Kernel, HGeometry.Vector
CubicBezierHGeometry.BezierSpline
CubicBezierSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
currentLevelHGeometry.Viewport
CurveToIpe.Path
CWHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwCmpAroundWithHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
cwOuterBoundaryFromHGeometry.Polygon.Class, HGeometry.Polygon
cycleOfHGeometry.Permutation
cycleRepHGeometry.Permutation
Cyclic 
1 (Type/Class)HGeometry.Cyclic
2 (Data Constructor)HGeometry.Cyclic
\ No newline at end of file diff --git a/haddocks/doc-index-D.html b/haddocks/doc-index-D.html index 5958040ed..1d09694cf 100644 --- a/haddocks/doc-index-D.html +++ b/haddocks/doc-index-D.html @@ -1 +1 @@ - (Index - D)
 

Index - D

darkblueIpe.Color
darkcyanIpe.Color
darkgrayIpe.Color
darkgreenIpe.Color
darkmagentaIpe.Color
darkorangeIpe.Color
darkredIpe.Color
DartHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartAtHGeometry.PlaneGraph
DartIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartsHGeometry.PlaneGraph
dartSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
dartSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
DashIpe.Attributes, Ipe
DashNamedIpe.Attributes, Ipe
DashPatternIpe.Attributes, Ipe
DashSym0Ipe.Attributes, Ipe
dCircleHGeometry.Miso.Svg, HGeometry.Svg
dCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
dDiskHGeometry.Miso.Svg, HGeometry.Svg
decodeYAMLHGeometry.YAML
decodeYAMLFileHGeometry.YAML
defaultBoxIpe.IpeOut, Ipe
DefaultFromIpeIpe.FromIpe, Ipe
defaultFromIpeIpe.FromIpe, Ipe
DefaultIpeOutIpe.IpeOut, Ipe, Ipe
defaultOptions 
1 (Function)Ipe.IpeRender
2 (Function)Ipe.IpeToIpe
DefaultTransformByConstraintsHGeometry.Transformation
Definers 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Type/Class)HGeometry.Plane.LowerEnvelope.VertexForm
definers 
1 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Function)HGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
defIOIpe.IpeOut, Ipe
deleteHGeometry.IntervalTree
deleteAllByHGeometry.Set.Util
deleteMeasureHGeometry.Measured.Class, HGeometry.Measured
denominatorHGeometry.Number.Ratio.Generalized
DepthIpe.Attributes, Ipe
DepthSym0Ipe.Attributes, Ipe
destinationHGeometry.Plane.LowerEnvelope
detHGeometry.Matrix.Class, HGeometry.Matrix
Diagonal 
1 (Type/Class)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Polygon.Triangulation
diGraphFromAdjacencyListsHGeometry.PlaneGraph
DiGraphFromAdjListExtraConstraintsHGeometry.PlaneGraph, HGeometry.PlaneGraph
DiGraph_HGeometry.PlaneGraph
DimensionHGeometry.Properties
dimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
directionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
Disk 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Disk_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
DistanceFunctionHGeometry.ClosestPair.Naive
divideAndConquerHGeometry.Algorithms.DivideAndConquer
divideAndConquer1HGeometry.Algorithms.DivideAndConquer
divideAndConquer1WithHGeometry.Algorithms.DivideAndConquer
dLineSegmentHGeometry.Miso.Svg, HGeometry.Svg
dotHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
douglasPeuckerHGeometry.PolyLine.Simplification.DouglasPeucker
DownHGeometry.Miso.Event.Extra
dPointHGeometry.Miso.Svg, HGeometry.Svg
dPolyLineHGeometry.Miso.Svg, HGeometry.Svg
drawHGeometry.Miso.Svg, HGeometry.Svg
DrawableHGeometry.Miso.Svg, HGeometry.Svg
drawTreeHGeometry.Tree.Binary.Static
drawTree'HGeometry.Tree.Binary.Static
drawWithHGeometry.Miso.Svg, HGeometry.Svg
dRectangleHGeometry.Miso.Svg, HGeometry.Svg
dropNextHGeometry.List.Zipper
dSimplePolygonHGeometry.Miso.Svg, HGeometry.Svg
dualGraphHGeometry.PlaneGraph
DualGraphOfHGeometry.PlaneGraph, HGeometry.PlaneGraph
dualHyperPlaneHGeometry.Duality
dualLineHGeometry.Duality
dualPointHGeometry.Duality
durationHGeometry.Interval.Class, HGeometry.Interval
\ No newline at end of file + (Index - D)
 

Index - D

darkblueIpe.Color
darkcyanIpe.Color
darkgrayIpe.Color
darkgreenIpe.Color
darkmagentaIpe.Color
darkorangeIpe.Color
darkredIpe.Color
DartHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartAtHGeometry.PlaneGraph
DartIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
dartsHGeometry.PlaneGraph
dartSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
dartSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
DashIpe.Attributes, Ipe
DashNamedIpe.Attributes, Ipe
DashPatternIpe.Attributes, Ipe
DashSym0Ipe.Attributes, Ipe
dCircleHGeometry.Miso.Svg, HGeometry.Svg
dCoordHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
dDiskHGeometry.Miso.Svg, HGeometry.Svg
decodeYAMLHGeometry.YAML
decodeYAMLFileHGeometry.YAML
defaultBoxIpe.IpeOut, Ipe
DefaultFromIpeIpe.FromIpe, Ipe
defaultFromIpeIpe.FromIpe, Ipe
DefaultIpeOutIpe.IpeOut, Ipe, Ipe
defaultOptions 
1 (Function)Ipe.IpeRender
2 (Function)Ipe.IpeToIpe
DefaultTransformByConstraintsHGeometry.Transformation
DefinersHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
definersHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
defIOIpe.IpeOut, Ipe
deleteHGeometry.IntervalTree
deleteAllByHGeometry.Set.Util
deleteMeasureHGeometry.Measured.Class, HGeometry.Measured
denominatorHGeometry.Number.Ratio.Generalized
DepthIpe.Attributes, Ipe
DepthSym0Ipe.Attributes, Ipe
detHGeometry.Matrix.Class, HGeometry.Matrix
Diagonal 
1 (Type/Class)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Polygon.Triangulation
diGraphFromAdjacencyListsHGeometry.PlaneGraph
DiGraphFromAdjListExtraConstraintsHGeometry.PlaneGraph, HGeometry.PlaneGraph
DiGraph_HGeometry.PlaneGraph
DimensionHGeometry.Properties
dimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
directionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
Disk 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
Disk_ 
1 (Type/Class)HGeometry.Ball.Class, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.Class, HGeometry.Ball
DistanceFunctionHGeometry.ClosestPair.Naive
divideAndConquerHGeometry.Algorithms.DivideAndConquer
divideAndConquer1HGeometry.Algorithms.DivideAndConquer
divideAndConquer1WithHGeometry.Algorithms.DivideAndConquer
dLineSegmentHGeometry.Miso.Svg, HGeometry.Svg
dotHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
douglasPeuckerHGeometry.PolyLine.Simplification.DouglasPeucker
DownHGeometry.Miso.Event.Extra
dPointHGeometry.Miso.Svg, HGeometry.Svg
dPolyLineHGeometry.Miso.Svg, HGeometry.Svg
drawHGeometry.Miso.Svg, HGeometry.Svg
DrawableHGeometry.Miso.Svg, HGeometry.Svg
drawTreeHGeometry.Tree.Binary.Static
drawTree'HGeometry.Tree.Binary.Static
drawWithHGeometry.Miso.Svg, HGeometry.Svg
dRectangleHGeometry.Miso.Svg, HGeometry.Svg
dropNextHGeometry.List.Zipper
dSimplePolygonHGeometry.Miso.Svg, HGeometry.Svg
dualGraphHGeometry.PlaneGraph
DualGraphOfHGeometry.PlaneGraph, HGeometry.PlaneGraph
dualHyperPlaneHGeometry.Duality
dualLineHGeometry.Duality
dualPointHGeometry.Duality
durationHGeometry.Interval.Class, HGeometry.Interval
\ No newline at end of file diff --git a/haddocks/doc-index-E.html b/haddocks/doc-index-E.html index daf6df154..7ad0b523d 100644 --- a/haddocks/doc-index-E.html +++ b/haddocks/doc-index-E.html @@ -1 +1 @@ - (Index - E)
 

Index - E

E 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected.Graph
EastHGeometry.Direction
eastHGeometry, HGeometry.Box, HGeometry.Kernel
Edge 
1 (Type/Class)HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
2 (Data Constructor)HGeometry.Plane.LowerEnvelope
edgeAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
edgeGeometriesHGeometry.VoronoiDiagram
EdgeGeometryHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
EdgeIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
edgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
edgeSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
edgeSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
ElemHGeometry.Algorithms.BinarySearch
ElemCyclicHGeometry.Cyclic
elementsHGeometry.Matrix.Class, HGeometry.Matrix
elemsHGeometry.Permutation
Ellipse 
1 (Data Constructor)Ipe.Path
2 (Type/Class)HGeometry.Ellipse
3 (Data Constructor)HGeometry.Ellipse
ellipseMatrixHGeometry.Ellipse
EllipseSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ellipseToCircleHGeometry.Ellipse
emptyHGeometry.Algorithms.LogarithmicMethod
EmptyIntersectionHGeometry.HalfPlane.CommonIntersection
emptyPageIpe.Types, Ipe
encodeYAMLHGeometry.YAML
encodeYAMLFileHGeometry.YAML
encodingIpe.Types, Ipe
EndHGeometry.Polygon.Triangulation.MakeMonotone
endHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
endPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
endPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
endPointsHGeometry.PlaneGraph
endPointsOfHGeometry.PlaneGraph
EndPointTypeHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
endPointTypeHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EndPoint_HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EntireFileIpe.IpeToIpe
EntireLineHGeometry.HalfPlane.CommonIntersection
EOFillIpe.Attributes, Ipe
EPSIpe.IpeRender
epsHGeometry.Number.Real.Symbolic
EpsFoldHGeometry.Number.Real.Symbolic
euclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
evalAtHGeometry.HyperPlane.Class, HGeometry.HyperPlane
evalAt'HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
evalEpsHGeometry.Number.Real.Symbolic
evalHyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
ExactHGeometry.Number.Real.Rational
Export 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
exportIpe.IpeToIpe
extHGeometry.Ext
extentHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
extraHGeometry.Ext
extractMinimaBy 
1 (Function)HGeometry.NonEmpty.Util
2 (Function)HGeometry.List.Util
extractNextHGeometry.List.Zipper
extractOrd1HGeometry.Ord.Dynamic
extractOrd2HGeometry.Ord.Dynamic
ExtraOfHGeometry.Ext
extremesHGeometry.Polygon.Class, HGeometry.Polygon
\ No newline at end of file + (Index - E)
 

Index - E

E 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected.Graph
EastHGeometry.Direction
eastHGeometry, HGeometry.Box, HGeometry.Kernel
EdgeHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
edgeAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
EdgeIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
edgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
edgeSegmentAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
edgeSegmentsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
ElemHGeometry.Algorithms.BinarySearch
ElemCyclicHGeometry.Cyclic
elementsHGeometry.Matrix.Class, HGeometry.Matrix
elemsHGeometry.Permutation
Ellipse 
1 (Data Constructor)Ipe.Path
2 (Type/Class)HGeometry.Ellipse
3 (Data Constructor)HGeometry.Ellipse
ellipseMatrixHGeometry.Ellipse
EllipseSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
ellipseToCircleHGeometry.Ellipse
emptyHGeometry.Algorithms.LogarithmicMethod
EmptyIntersectionHGeometry.HalfPlane.CommonIntersection
emptyPageIpe.Types, Ipe
encodeYAMLHGeometry.YAML
encodeYAMLFileHGeometry.YAML
encodingIpe.Types, Ipe
EndHGeometry.Polygon.Triangulation.MakeMonotone
endHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPoint 
1 (Type/Class)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
endPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
EndPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
endPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
endPointsHGeometry.PlaneGraph
endPointsOfHGeometry.PlaneGraph
EndPointTypeHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
endPointTypeHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EndPoint_HGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
EntireFileIpe.IpeToIpe
EntireLineHGeometry.HalfPlane.CommonIntersection
EOFillIpe.Attributes, Ipe
EPSIpe.IpeRender
epsHGeometry.Number.Real.Symbolic
EpsFoldHGeometry.Number.Real.Symbolic
euclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
evalAtHGeometry.HyperPlane.Class, HGeometry.HyperPlane
evalAt'HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
evalEpsHGeometry.Number.Real.Symbolic
evalHyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
ExactHGeometry.Number.Real.Rational
Export 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
exportIpe.IpeToIpe
extHGeometry.Ext
extentHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
extraHGeometry.Ext
extractMinimaBy 
1 (Function)HGeometry.NonEmpty.Util
2 (Function)HGeometry.List.Util
extractNextHGeometry.List.Zipper
extractOrd1HGeometry.Ord.Dynamic
extractOrd2HGeometry.Ord.Dynamic
ExtraOfHGeometry.Ext
extremesHGeometry.Polygon.Class, HGeometry.Polygon
\ No newline at end of file diff --git a/haddocks/doc-index-F.html b/haddocks/doc-index-F.html index 9a1a0b412..2a085ba5b 100644 --- a/haddocks/doc-index-F.html +++ b/haddocks/doc-index-F.html @@ -1 +1 @@ - (Index - F)
 

Index - F

FaceHGeometry.PlaneGraph, HGeometry.PlaneGraph
faceAtHGeometry.PlaneGraph
FaceIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
facesHGeometry.PlaneGraph
FacetHGeometry.ConvexHull.R3.Naive.Dual
facetsHGeometry.ConvexHull.R3.Naive.Dual
factorsHGeometry.Number.Real.Symbolic
farDistHGeometry.Graphics.Camera
FileType 
1 (Type/Class)Ipe.IpeRender
2 (Type/Class)Ipe.IpeToIpe
FillIpe.Attributes, Ipe
FillRuleIpe.Attributes, Ipe
FillRuleSym0Ipe.Attributes, Ipe
FillSym0Ipe.Attributes, Ipe
FillTypeIpe.Attributes, Ipe
findEvertHGeometry.Tree.Util
findEvert'HGeometry.Tree.Util
findNodeHGeometry.Tree.Util
findNodesHGeometry.Tree.Util
findPathHGeometry.Tree.Util
findSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
firstChildHGeometry.Tree.Util
firstTrueHGeometry.Algorithms.BinarySearch
fitToBoxHGeometry.Transformation
fitToBoxTransformHGeometry.Transformation
flattenGroupsIpe.Content
flipAxesHGeometry.Graphics.Camera
flipEdgeHGeometry.Plane.LowerEnvelope
FlipsAtHGeometry.Algorithms.BinarySearch
flipSignHGeometry.Sign
flipYHGeometry.Viewport
focusHGeometry.Tree.Util
foldBinaryUpHGeometry.Tree.Binary.Static
folding1HGeometry.Lens.Util
foldMapZipHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
foldUpHGeometry.Tree.Binary.Static
foldUpDataHGeometry.Tree.Binary.Static
frechetDistanceWithHGeometry.PolyLine.Frechet.Discrete
fromAdjacencyListsHGeometry.PlaneGraph
fromAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
fromBoundaryPointsHGeometry.Ball.Class, HGeometry.Ball
fromCCWListHGeometry.Plane.LowerEnvelope.ConnectedNew
fromCenterAndPointHGeometry.Ball.Class, HGeometry.Ball
fromCenterAndSquaredRadiusHGeometry.Ball.Class, HGeometry.Ball
fromContentIpe.Types, Ipe
fromDiametralPairHGeometry.Ball.Class, HGeometry.Ball
fromEmbeddingHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
fromExtentHGeometry, HGeometry.Box, HGeometry.Kernel
fromFixedHGeometry.Number.Real.Rational
fromFoldableHGeometry.Foldable.Util
fromFoldable1HGeometry.Foldable.Util
fromGroupedAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromIntervalsHGeometry.IntervalTree
fromIpeXMLIpe.Reader
fromLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
fromList 
1 (Function)HGeometry.Foldable.Util
2 (Function)HGeometry.List.Zipper
fromListByHGeometry.Set.Util
fromNonEmptyHGeometry.Foldable.Util
fromNonEmptyWithHGeometry.Sequence.Alternating
fromPointAndNormalHGeometry.HyperPlane.Class, HGeometry.HyperPlane
fromPointAndVecHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
fromPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
fromSeqIpe.PathParser, Ipe.Reader
fromSimplePolygonHGeometry.Polygon.Convex
fromSizeHGeometry.Viewport
fromVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
fromVertexForm 
1 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Function)HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
fromVertexForm'HGeometry.Plane.LowerEnvelope.Connected
\ No newline at end of file + (Index - F)
 

Index - F

FaceHGeometry.PlaneGraph, HGeometry.PlaneGraph
faceAtHGeometry.PlaneGraph
FaceIxHGeometry.PlaneGraph, HGeometry.PlaneGraph
facesHGeometry.PlaneGraph
factorsHGeometry.Number.Real.Symbolic
farDistHGeometry.Graphics.Camera
FileType 
1 (Type/Class)Ipe.IpeRender
2 (Type/Class)Ipe.IpeToIpe
FillIpe.Attributes, Ipe
FillRuleIpe.Attributes, Ipe
FillRuleSym0Ipe.Attributes, Ipe
FillSym0Ipe.Attributes, Ipe
FillTypeIpe.Attributes, Ipe
findEvertHGeometry.Tree.Util
findEvert'HGeometry.Tree.Util
findNodeHGeometry.Tree.Util
findNodesHGeometry.Tree.Util
findPathHGeometry.Tree.Util
findSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
firstChildHGeometry.Tree.Util
firstTrueHGeometry.Algorithms.BinarySearch
firstWithNeighborsHGeometry.Sequence.Alternating
fitToBoxHGeometry.Transformation
fitToBoxTransformHGeometry.Transformation
flattenGroupsIpe.Content
flipAxesHGeometry.Graphics.Camera
FlipsAtHGeometry.Algorithms.BinarySearch
flipSignHGeometry.Sign
flipYHGeometry.Viewport
focusHGeometry.Tree.Util
foldBinaryUpHGeometry.Tree.Binary.Static
folding1HGeometry.Lens.Util
foldMapZipHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
foldUpHGeometry.Tree.Binary.Static
foldUpDataHGeometry.Tree.Binary.Static
frechetDistanceWithHGeometry.PolyLine.Frechet.Discrete
fromAdjacencyListsHGeometry.PlaneGraph
fromAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
fromBoundaryPointsHGeometry.Ball.Class, HGeometry.Ball
fromCCWListHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
fromCenterAndPointHGeometry.Ball.Class, HGeometry.Ball
fromCenterAndSquaredRadiusHGeometry.Ball.Class, HGeometry.Ball
fromContentIpe.Types, Ipe
fromDiametralPairHGeometry.Ball.Class, HGeometry.Ball
fromEmbeddingHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
fromExtentHGeometry, HGeometry.Box, HGeometry.Kernel
fromFixedHGeometry.Number.Real.Rational
fromFoldableHGeometry.Foldable.Util
fromFoldable1HGeometry.Foldable.Util
fromGroupedAscListHGeometry.RangeTree.Base, HGeometry.RangeTree
fromIntervalsHGeometry.IntervalTree
fromIpeXMLIpe.Reader
fromLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
fromList 
1 (Function)HGeometry.Foldable.Util
2 (Function)HGeometry.List.Zipper
fromListByHGeometry.Set.Util
fromNonEmptyHGeometry.Foldable.Util
fromNonEmptyWithHGeometry.Sequence.Alternating
fromPointAndNormalHGeometry.HyperPlane.Class, HGeometry.HyperPlane
fromPointAndVecHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
fromPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
fromSeqIpe.PathParser, Ipe.Reader
fromSimplePolygonHGeometry.Polygon.Convex
fromSizeHGeometry.Viewport
fromVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
fromVertexFormHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
\ No newline at end of file diff --git a/haddocks/doc-index-H.html b/haddocks/doc-index-H.html index ed57e1ef2..42ea25de8 100644 --- a/haddocks/doc-index-H.html +++ b/haddocks/doc-index-H.html @@ -1 +1 @@ - (Index - H)
 

Index - H

HalfLine 
1 (Type/Class)HGeometry.HalfLine
2 (Data Constructor)HGeometry.HalfLine
HalfLineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
halfLineThroughHGeometry.HalfLine
HalfLine_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfLine_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfOpenInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
HalfPlane_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace 
1 (Type/Class)HGeometry.HalfSpace
2 (Data Constructor)HGeometry.HalfSpace
HalfSpaceFHGeometry.HalfSpace
halfSpaceSignHGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HAlignIpe.Attributes, Ipe
HAlignSym0Ipe.Attributes, Ipe
handleInternalCanvasActionHGeometry.Miso.Svg.Canvas
HasCanonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
HasCenterHGeometry.Ball.Class, HGeometry.Ball
HasComponentsHGeometry, HGeometry.Kernel, HGeometry.Vector
HasCoordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasDartsHGeometry.PlaneGraph
HasDarts'HGeometry.PlaneGraph
HasDefaultFromIpeIpe.FromIpe, Ipe
HasDefaultIpeOutIpe.IpeOut, Ipe
HasDeterminantHGeometry.Matrix.Class, HGeometry.Matrix
HasDimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
HasDirectedTraversalsHGeometry.Cyclic
HasDirectionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasEdgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasEdges'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasElementsHGeometry.Matrix.Class, HGeometry.Matrix
HasEndHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasEndPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasFacesHGeometry.PlaneGraph
HasFaces'HGeometry.PlaneGraph
HasFromFoldableHGeometry.Foldable.Util
HasFromFoldable1HGeometry.Foldable.Util
HasHolesHGeometry.Polygon.Class, HGeometry.Polygon
HasIndexHGeometry.Indexed
HasInPolygonHGeometry.Polygon.Simple
HasIntersectionWithHGeometry.Intersection
HasMaxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMinPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMousePositionHGeometry.Miso.Svg.Canvas
hasNoPertubationHGeometry.Number.Real.Symbolic
hasNoSelfIntersectionsHGeometry.Polygon.Simple
HasOnLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
HasOnSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasOuterBoundaryHGeometry.Polygon.Class, HGeometry.Polygon
HasPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasPoints'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasSquaredEuclideanDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
HasStartHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasStartPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasSupportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasUnboundedEdgesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
HasVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasVerticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
hasVerticesHGeometry.Plane.LowerEnvelope.VertexForm
HasVertices'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasZoomLevelHGeometry.Miso.Canvas.Zoom
Has_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headOfHGeometry.PlaneGraph
HeightIpe.Attributes, Ipe
heightHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HeightSym0Ipe.Attributes, Ipe
HoleHGeometry.Polygon.Class, HGeometry.Polygon
holeAtHGeometry.Polygon.Class, HGeometry.Polygon
HoleContainerHGeometry.Polygon.WithHoles
HoleFHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
HoleIxHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
holesHGeometry.Polygon.Class, HGeometry.Polygon
HorizontalIpe.Attributes, Ipe
HorizontalAlignmentIpe.Attributes, Ipe
horizontalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
hostToWorldHGeometry.Viewport
HyperPlane 
1 (Type/Class)HGeometry.HyperPlane
2 (Data Constructor)HGeometry.HyperPlane
HyperPlane2HGeometry.HyperPlane
HyperPlane3HGeometry.HyperPlane
hyperPlaneCoefficientsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneFromEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlaneFromEquationConstraintHGeometry.HyperPlane.Class, HGeometry.HyperPlane, HGeometry.HyperPlane
HyperPlaneFromPointsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneThroughHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
\ No newline at end of file + (Index - H)
 

Index - H

HalfLine 
1 (Type/Class)HGeometry.HalfLine
2 (Data Constructor)HGeometry.HalfLine
HalfLineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
halfLineThroughHGeometry.HalfLine
HalfLine_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
HalfLine_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfLine_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
HalfOpenInterval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
HalfPlane_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace 
1 (Type/Class)HGeometry.HalfSpace
2 (Data Constructor)HGeometry.HalfSpace
HalfSpaceFHGeometry.HalfSpace
halfSpaceSignHGeometry.HalfSpace.Class, HGeometry.HalfSpace
HalfSpace_HGeometry.HalfSpace.Class, HGeometry.HalfSpace
HAlignIpe.Attributes, Ipe
HAlignSym0Ipe.Attributes, Ipe
handleInternalCanvasActionHGeometry.Miso.Svg.Canvas
HasCanonicalSubSetHGeometry.SegmentTree.CanonicalSubSet
HasCenterHGeometry.Ball.Class, HGeometry.Ball
HasComponentsHGeometry, HGeometry.Kernel, HGeometry.Vector
HasCoordinatesHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasDartsHGeometry.PlaneGraph
HasDarts'HGeometry.PlaneGraph
HasDefaultFromIpeIpe.FromIpe, Ipe
HasDefaultIpeOutIpe.IpeOut, Ipe
HasDeterminantHGeometry.Matrix.Class, HGeometry.Matrix
HasDimensionsHGeometry.Miso.Svg.StaticCanvas, HGeometry.Miso.Svg.Canvas
HasDirectedTraversalsHGeometry.Cyclic
HasDirectionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasEdgesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasEdges'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasElementsHGeometry.Matrix.Class, HGeometry.Matrix
HasEndHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasEndPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasFacesHGeometry.PlaneGraph
HasFaces'HGeometry.PlaneGraph
HasFromFoldableHGeometry.Foldable.Util
HasFromFoldable1HGeometry.Foldable.Util
HasHolesHGeometry.Polygon.Class, HGeometry.Polygon
HasIndexHGeometry.Indexed
HasInPolygonHGeometry.Polygon.Simple
HasIntersectionWithHGeometry.Intersection
HasMaxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMinPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HasMousePositionHGeometry.Miso.Svg.Canvas
hasNoPertubationHGeometry.Number.Real.Symbolic
hasNoSelfIntersectionsHGeometry.Polygon.Simple
HasOnLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
HasOnSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasOuterBoundaryHGeometry.Polygon.Class, HGeometry.Polygon
HasPointsHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasPoints'HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasSquaredEuclideanDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
HasStartHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasStartPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
HasSupportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
HasVectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
HasVerticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasVertices'HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
HasZoomLevelHGeometry.Miso.Canvas.Zoom
Has_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
headOfHGeometry.PlaneGraph
HeightIpe.Attributes, Ipe
heightHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
HeightSym0Ipe.Attributes, Ipe
HoleHGeometry.Polygon.Class, HGeometry.Polygon
holeAtHGeometry.Polygon.Class, HGeometry.Polygon
HoleContainerHGeometry.Polygon.WithHoles
HoleFHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
HoleIxHGeometry.Polygon.Class, HGeometry.Polygon, HGeometry.Polygon
holesHGeometry.Polygon.Class, HGeometry.Polygon
HorizontalIpe.Attributes, Ipe
HorizontalAlignmentIpe.Attributes, Ipe
horizontalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
hostToWorldHGeometry.Viewport
HyperPlane 
1 (Type/Class)HGeometry.HyperPlane
2 (Data Constructor)HGeometry.HyperPlane
HyperPlane2HGeometry.HyperPlane
HyperPlane3HGeometry.HyperPlane
hyperPlaneCoefficientsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneFromEquationHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlaneFromEquationConstraintHGeometry.HyperPlane.Class, HGeometry.HyperPlane, HGeometry.HyperPlane
HyperPlaneFromPointsHGeometry.HyperPlane.Class, HGeometry.HyperPlane
hyperPlaneThroughHGeometry.HyperPlane.Class, HGeometry.HyperPlane
HyperPlane_HGeometry.HyperPlane.Class, HGeometry.HyperPlane
\ No newline at end of file diff --git a/haddocks/doc-index-I.html b/haddocks/doc-index-I.html index 013787ad1..eefa7f11a 100644 --- a/haddocks/doc-index-I.html +++ b/haddocks/doc-index-I.html @@ -1 +1 @@ - (Index - I)
 

Index - I

identityHGeometry.Transformation
identityMatrixHGeometry.Matrix.Class, HGeometry.Matrix
ifolding1HGeometry.Lens.Util
Image 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
ImageAttributesIpe.Attributes, Ipe
imageDataIpe.Content, Ipe.Types, Ipe
impliesHGeometry.Kernel.Instances
incidentEdgesBHGeometry.Plane.LowerEnvelope
incidentEdgesOfHGeometry.PlaneGraph
incidentFaceOfHGeometry.PlaneGraph
Index 
1 (Type/Class)HGeometry.Algorithms.BinarySearch
2 (Type/Class)HGeometry.Indexed
indicesHGeometry.Permutation
InHalfLineHGeometry.HalfPlane.CommonIntersection
inIntervalHGeometry.Interval.Class, HGeometry.Interval
inPolygonHGeometry.Polygon.Simple
InSegmentHGeometry.HalfPlane.CommonIntersection
insert 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
3 (Function)HGeometry.Algorithms.LogarithmicMethod
insertBreakPointsHGeometry.Sequence.Alternating
insertByHGeometry.Set.Util
insertIntoCyclicOrderHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
InsertionOnly 
1 (Type/Class)HGeometry.Algorithms.LogarithmicMethod
2 (Data Constructor)HGeometry.Algorithms.LogarithmicMethod
insertMeasureHGeometry.Measured.Class, HGeometry.Measured
insertOrdHGeometry.CircularList.Util
insertOrdByHGeometry.CircularList.Util
insertOrdBy'HGeometry.CircularList.Util
Inside 
1 (Data Constructor)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Boundary
inSimplePolygonHGeometry.Polygon.Simple
InSubLineHGeometry.HalfPlane.CommonIntersection
InterCardinalDirectionHGeometry.Direction
interCardinalsOfHGeometry.Direction
interceptHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
InteriorHGeometry.Interval.Class, HGeometry.Interval
interiorFacePolygonAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacePolygonsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacesHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorIntersectionsHGeometry.LineSegment.Intersection.BentleyOttmann
interiorToHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
InternalHGeometry.Tree.Binary.Static
InternalCanvasActionHGeometry.Miso.Svg.Canvas
InternalNodeHGeometry.Tree.Util
interpolateHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
intersectHGeometry.Intersection
IntersectConstraintsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectingHalfPlanesHGeometry.Triangle.Class, HGeometry.Triangle
IntersectionHGeometry.Intersection
intersectionLine 
1 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Function)HGeometry.Plane.LowerEnvelope.VertexForm
IntersectionOfHGeometry.Intersection, HGeometry.Ball.CenterAndRadius, HGeometry.Ball
IntersectionPointHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPoint 
1 (Function)HGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
2 (Function)HGeometry.Plane.LowerEnvelope.ConnectedNew
3 (Function)HGeometry.Plane.LowerEnvelope.VertexForm
intersectionPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPointsHGeometry.LineSegment.Intersection.BentleyOttmann
IntersectionsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersections 
1 (Function)HGeometry.LineSegment.Intersection.Naive
2 (Function)HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionVectorHGeometry.Plane.LowerEnvelope.ConnectedNew
intersectsHGeometry.Intersection
Interval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
IntervalLike_HGeometry.Interval.Class, HGeometry.Interval
IntervalTreeHGeometry.IntervalTree
Interval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
Interval_x_IntervalIntersectionHGeometry.Interval
Interval_x_Interval_ContainedHGeometry.Interval
Interval_x_Interval_PartialHGeometry.Interval
Interval_x_Interval_PointHGeometry.Interval
introOrd1HGeometry.Ord.Dynamic
introOrd2HGeometry.Ord.Dynamic
inverseMatrixHGeometry.Matrix.Class, HGeometry.Matrix
inverseOfHGeometry.Transformation
InvertibleHGeometry.Matrix.Class, HGeometry.Matrix
iOIpe.IpeOut, Ipe
iO'Ipe.IpeOut, Ipe
iO''Ipe.IpeOut, Ipe
IpeArrow 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeAttributesIpe.Content, Ipe.Types, Ipe
IpeAttrNameIpe.Attributes, Ipe
ipeBezierIpe.IpeOut, Ipe
IpeBitmapIpe.Types, Ipe
ipeCircleIpe.IpeOut, Ipe
IpeColor 
1 (Type/Class)Ipe.Color, Ipe
2 (Data Constructor)Ipe.Color, Ipe
IpeDashIpe.Attributes, Ipe
ipeDiskIpe.IpeOut, Ipe
ipeDiskMarkIpe.IpeOut, Ipe
ipeEllipseIpe.IpeOut, Ipe
IpeFile 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeFileIpe.Types, Ipe
IpeGradientIpe.Attributes, Ipe
IpeGroupIpe.Content, Ipe.Types, Ipe
ipeGroupIpe.IpeOut, Ipe
ipeHalfLineIpe.IpeOut, Ipe
ipeHalfLineInIpe.IpeOut, Ipe
IpeImageIpe.Content, Ipe.Types, Ipe
ipeLabelIpe.IpeOut, Ipe
ipeLineIpe.IpeOut, Ipe
ipeLineInIpe.IpeOut, Ipe
ipeLineSegmentIpe.IpeOut, Ipe
ipeMarkIpe.IpeOut, Ipe
IpeMiniPageIpe.Content, Ipe.Types, Ipe
IpeObjectIpe.Content, Ipe.Types, Ipe
IpeObject'Ipe.Content, Ipe.Types, Ipe
ipeObject'Ipe.Content, Ipe.Types, Ipe
IpeOpacityIpe.Attributes, Ipe
IpeOutIpe.IpeOut, Ipe
IpeOut'Ipe.IpeOut, Ipe
IpePage 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpePathIpe.Content, Ipe.Types, Ipe
IpePen 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
ipePolygonIpe.IpeOut, Ipe
ipePolyLineIpe.IpeOut, Ipe
IpePreamble 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeRayIpe.IpeOut, Ipe
IpeReadIpe.Reader, Ipe
ipeReadIpe.Reader, Ipe
IpeReadAttrIpe.Reader
ipeReadAttrIpe.Reader
ipeReadAttrsIpe.Reader
ipeReadObjectIpe.Reader
ipeReadRecIpe.Reader
IpeReadTextIpe.Reader
ipeReadTextIpe.Reader
ipeReadTextWithIpe.Reader
ipeRectangleIpe.IpeOut, Ipe
ipeRenderIpe.IpeRender
ipeRenderWithIpe.IpeRender
ipeSimplePolygonIpe.IpeOut, Ipe
IpeSize 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeStyle 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpeSymbolIpe.Content, Ipe.Types, Ipe
IpeTextLabelIpe.Content, Ipe.Types, Ipe
IpeTilingIpe.Attributes, Ipe
ipeToIpeIpe.IpeToIpe
ipeToIpeWithIpe.IpeToIpe
IpeUseIpe.Content, Ipe.Types, Ipe
IpeValueIpe.Value, Ipe
IpeWriteIpe.Writer, Ipe
ipeWriteIpe.Writer, Ipe
ipeWriteAttrsIpe.Writer
IpeWriteTextIpe.Writer, Ipe
ipeWriteTextIpe.Writer, Ipe
IsBoxableHGeometry, HGeometry.Box, HGeometry.Kernel
isCoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
isConvexHGeometry.Polygon.Convex
IsEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
isIdenticalToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isInteriorIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
IsIntersectableWithHGeometry.Intersection
isMonotoneHGeometry.Polygon.Monotone
isParallelToHGeometry.HyperPlane.Class, HGeometry.HyperPlane
isPerpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isScalarMultipleOfHGeometry, HGeometry.Kernel, HGeometry.Vector
isShiftOf 
1 (Function)HGeometry.CircularList.Util
2 (Function)HGeometry.Cyclic
isStrictlyConvexHGeometry.Polygon.Convex
isSubStringOfHGeometry.StringSearch.KMP
IsTransformableHGeometry.Transformation
isValidIntervalHGeometry.Kernel.Instances
isValidTriangleHGeometry.ConvexHull.R3.Naive
itoNonEmptyOfHGeometry.Lens.Util
ixAttrIpe.Attributes, Ipe
\ No newline at end of file + (Index - I)
 

Index - I

identityHGeometry.Transformation
identityMatrixHGeometry.Matrix.Class, HGeometry.Matrix
ifolding1HGeometry.Lens.Util
Image 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
ImageAttributesIpe.Attributes, Ipe
imageDataIpe.Content, Ipe.Types, Ipe
impliesHGeometry.Kernel.Instances
incidentEdgesOfHGeometry.PlaneGraph
incidentFaceOfHGeometry.PlaneGraph
Index 
1 (Type/Class)HGeometry.Algorithms.BinarySearch
2 (Type/Class)HGeometry.Indexed
indicesHGeometry.Permutation
InHalfLineHGeometry.HalfPlane.CommonIntersection
inIntervalHGeometry.Interval.Class, HGeometry.Interval
inPolygonHGeometry.Polygon.Simple
InSegmentHGeometry.HalfPlane.CommonIntersection
insert 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
3 (Function)HGeometry.Algorithms.LogarithmicMethod
insertBreakPointsHGeometry.Sequence.Alternating
insertByHGeometry.Set.Util
insertIntoCyclicOrderHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
InsertionOnly 
1 (Type/Class)HGeometry.Algorithms.LogarithmicMethod
2 (Data Constructor)HGeometry.Algorithms.LogarithmicMethod
insertMeasureHGeometry.Measured.Class, HGeometry.Measured
insertOrdHGeometry.CircularList.Util
insertOrdByHGeometry.CircularList.Util
insertOrdBy'HGeometry.CircularList.Util
Inside 
1 (Data Constructor)HGeometry.Polygon.Triangulation
2 (Data Constructor)HGeometry.Boundary
inSimplePolygonHGeometry.Polygon.Simple
InSubLineHGeometry.HalfPlane.CommonIntersection
InterCardinalDirectionHGeometry.Direction
interCardinalsOfHGeometry.Direction
interceptHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
InteriorHGeometry.Interval.Class, HGeometry.Interval
interiorFacePolygonAtHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacePolygonsHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorFacesHGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
interiorIntersectionsHGeometry.LineSegment.Intersection.BentleyOttmann
interiorToHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
InternalHGeometry.Tree.Binary.Static
InternalCanvasActionHGeometry.Miso.Svg.Canvas
InternalNodeHGeometry.Tree.Util
interpolateHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
intersectHGeometry.Intersection
IntersectConstraintsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectingHalfPlanesHGeometry.Triangle.Class, HGeometry.Triangle
IntersectionHGeometry.Intersection
intersectionLineHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
IntersectionOfHGeometry.Intersection, HGeometry.Ball.CenterAndRadius, HGeometry.Ball
IntersectionPointHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPoint 
1 (Function)HGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
2 (Function)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
intersectionPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionPointsHGeometry.LineSegment.Intersection.BentleyOttmann
IntersectionsHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
intersections 
1 (Function)HGeometry.LineSegment.Intersection.Naive
2 (Function)HGeometry.LineSegment.Intersection.BentleyOttmann
intersectionVectorHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
intersectsHGeometry.Intersection
Interval 
1 (Type/Class)HGeometry.Interval
2 (Data Constructor)HGeometry.Interval
IntervalLike_HGeometry.Interval.Class, HGeometry.Interval
IntervalTreeHGeometry.IntervalTree
Interval_ 
1 (Type/Class)HGeometry.Interval.Class, HGeometry.Interval
2 (Data Constructor)HGeometry.Interval.Class, HGeometry.Interval
Interval_x_IntervalIntersectionHGeometry.Interval
Interval_x_Interval_ContainedHGeometry.Interval
Interval_x_Interval_PartialHGeometry.Interval
Interval_x_Interval_PointHGeometry.Interval
introOrd1HGeometry.Ord.Dynamic
introOrd2HGeometry.Ord.Dynamic
inverseMatrixHGeometry.Matrix.Class, HGeometry.Matrix
inverseOfHGeometry.Transformation
InvertibleHGeometry.Matrix.Class, HGeometry.Matrix
iOIpe.IpeOut, Ipe
iO'Ipe.IpeOut, Ipe
iO''Ipe.IpeOut, Ipe
IpeArrow 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeAttributesIpe.Content, Ipe.Types, Ipe
IpeAttrNameIpe.Attributes, Ipe
ipeBezierIpe.IpeOut, Ipe
IpeBitmapIpe.Types, Ipe
ipeCircleIpe.IpeOut, Ipe
IpeColor 
1 (Type/Class)Ipe.Color, Ipe
2 (Data Constructor)Ipe.Color, Ipe
IpeDashIpe.Attributes, Ipe
ipeDiskIpe.IpeOut, Ipe
ipeDiskMarkIpe.IpeOut, Ipe
ipeEllipseIpe.IpeOut, Ipe
IpeFile 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeFileIpe.Types, Ipe
IpeGradientIpe.Attributes, Ipe
IpeGroupIpe.Content, Ipe.Types, Ipe
ipeGroupIpe.IpeOut, Ipe
ipeHalfLineIpe.IpeOut, Ipe
ipeHalfLineInIpe.IpeOut, Ipe
IpeImageIpe.Content, Ipe.Types, Ipe
ipeLabelIpe.IpeOut, Ipe
ipeLineIpe.IpeOut, Ipe
ipeLineInIpe.IpeOut, Ipe
ipeLineSegmentIpe.IpeOut, Ipe
ipeMarkIpe.IpeOut, Ipe
IpeMiniPageIpe.Content, Ipe.Types, Ipe
IpeObjectIpe.Content, Ipe.Types, Ipe
IpeObject'Ipe.Content, Ipe.Types, Ipe
ipeObject'Ipe.Content, Ipe.Types, Ipe
IpeOpacityIpe.Attributes, Ipe
IpeOutIpe.IpeOut, Ipe
IpeOut'Ipe.IpeOut, Ipe
IpePage 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpePathIpe.Content, Ipe.Types, Ipe
IpePen 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
ipePolygonIpe.IpeOut, Ipe
ipePolyLineIpe.IpeOut, Ipe
IpePreamble 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ipeRayIpe.IpeOut, Ipe
IpeReadIpe.Reader, Ipe
ipeReadIpe.Reader, Ipe
IpeReadAttrIpe.Reader
ipeReadAttrIpe.Reader
ipeReadAttrsIpe.Reader
ipeReadObjectIpe.Reader
ipeReadRecIpe.Reader
IpeReadTextIpe.Reader
ipeReadTextIpe.Reader
ipeReadTextWithIpe.Reader
ipeRectangleIpe.IpeOut, Ipe
ipeRenderIpe.IpeRender
ipeRenderWithIpe.IpeRender
ipeSimplePolygonIpe.IpeOut, Ipe
IpeSize 
1 (Type/Class)Ipe.Attributes, Ipe
2 (Data Constructor)Ipe.Attributes, Ipe
IpeStyle 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
IpeSymbolIpe.Content, Ipe.Types, Ipe
IpeTextLabelIpe.Content, Ipe.Types, Ipe
IpeTilingIpe.Attributes, Ipe
ipeToIpeIpe.IpeToIpe
ipeToIpeWithIpe.IpeToIpe
IpeUseIpe.Content, Ipe.Types, Ipe
IpeValueIpe.Value, Ipe
IpeWriteIpe.Writer, Ipe
ipeWriteIpe.Writer, Ipe
ipeWriteAttrsIpe.Writer
IpeWriteTextIpe.Writer, Ipe
ipeWriteTextIpe.Writer, Ipe
IsBoxableHGeometry, HGeometry.Box, HGeometry.Kernel
isCoLinearHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
isConvexHGeometry.Polygon.Convex
IsEndPointHGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval
isIdenticalToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isInteriorIntersectionHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
IsIntersectableWithHGeometry.Intersection
isMonotoneHGeometry.Polygon.Monotone
isParallelToHGeometry.HyperPlane.Class, HGeometry.HyperPlane
isPerpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
isScalarMultipleOfHGeometry, HGeometry.Kernel, HGeometry.Vector
isShiftOf 
1 (Function)HGeometry.CircularList.Util
2 (Function)HGeometry.Cyclic
isStrictlyConvexHGeometry.Polygon.Convex
isSubStringOfHGeometry.StringSearch.KMP
IsTransformableHGeometry.Transformation
isValidIntervalHGeometry.Kernel.Instances
itoNonEmptyOfHGeometry.Lens.Util
ixAttrIpe.Attributes, Ipe
\ No newline at end of file diff --git a/haddocks/doc-index-L.html b/haddocks/doc-index-L.html index 6fffaa6dc..7dc2f2c6c 100644 --- a/haddocks/doc-index-L.html +++ b/haddocks/doc-index-L.html @@ -1 +1 @@ - (Index - L)
 

Index - L

LabelIpe.Content, Ipe.Types, Ipe
labelledIpe.IpeOut, Ipe
labelledWithIpe.IpeOut, Ipe
labelWithHGeometry.Indexed
labelWith'HGeometry.Indexed
labelWithIndexHGeometry.Indexed
lastHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lastFalseHGeometry.Algorithms.BinarySearch
LayerIpe.Attributes, Ipe
LayerName 
1 (Type/Class)Ipe.Layer, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Layer, Ipe.Types, Ipe
layerNameIpe.Layer, Ipe.Types, Ipe
layerNamesIpe.Types, Ipe
layersIpe.Types, Ipe
LayerSym0Ipe.Attributes, Ipe
LeafHGeometry.Tree.Binary.Static
LeafNodeHGeometry.Tree.Util
leaveOutOneHGeometry.List.Util
LEEdgeHGeometry.Plane.LowerEnvelope
LeftButtonHGeometry.Miso.Event.Extra
leftFaceOfHGeometry.PlaneGraph
leftHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
leftPlaneHGeometry.Plane.LowerEnvelope
LeftSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
leftSideHGeometry, HGeometry.Box, HGeometry.Kernel
leftTangentHGeometry.Polygon.Convex.Tangents
lerpHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
levelsHGeometry.Tree.Util
LEVertex 
1 (Data Constructor)HGeometry.Plane.LowerEnvelope.VertexForm
2 (Type/Class)HGeometry.Plane.LowerEnvelope.VertexForm
liesAboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liesBelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liftI2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftI2AHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftOrd1HGeometry.Ord.Dynamic
liftPointToPlaneHGeometry.Duality
liftU2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lightblueIpe.Color
lightcyanIpe.Color
lightgrayIpe.Color
lightgreenIpe.Color
lightyellowIpe.Color
Line2_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
lineAtHGeometry.Line.LowerEnvelope
LineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
LineCapIpe.Attributes, Ipe
LineCapSym0Ipe.Attributes, Ipe
LineEQ 
1 (Type/Class)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
LineHalfLineIntersectionHGeometry.HalfLine
LineJoinIpe.Attributes, Ipe
LineJoinSym0Ipe.Attributes, Ipe
LineLineIntersectionHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineIntersectionGHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LinePV 
1 (Type/Class)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
LineSegment 
1 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegmentLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_ 
1 (Type/Class)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
lineThroughHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
LineToIpe.Path
Line_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
Line_x_Ball_PointHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Ball_SegmentHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_HalfLine_HalfLineHGeometry.HalfLine
Line_x_HalfLine_PointHGeometry.HalfLine
Line_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_Line_LineHGeometry, HGeometry.Line, HGeometry.Kernel
Line_x_Line_PointHGeometry, HGeometry.Line, HGeometry.Kernel
listIntervalsHGeometry.IntervalTree
litIpe.Literal
literallyIpe.Literal
litFileIpe.Literal
locationHGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
location2HGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
LogarithmicMethodDSHGeometry.Algorithms.LogarithmicMethod
lookupAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAttrIpe.Attributes, Ipe
lookupIdxHGeometry.Permutation
lookupLEVertexHGeometry.Line.LowerEnvelope
LossyHGeometry.Number.Real.Rational
LowerEnvelope 
1 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
2 (Type/Class)HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
3 (Type/Class)HGeometry.Line.LowerEnvelope
4 (Data Constructor)HGeometry.Line.LowerEnvelope
lowerEnvelope 
1 (Function)HGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
2 (Function)HGeometry.Line.LowerEnvelope
LowerEnvelope'HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
LowerEnvelopeFHGeometry.Line.LowerEnvelope
lowerEnvelopeVertexFormHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
lowerHull 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
3 (Function)HGeometry.ConvexHull.DivideAndConquer
lowerHull' 
1 (Function)HGeometry.ConvexHull.R3.Naive
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan
lowerHullAllHGeometry.ConvexHull.R3.Naive
lowerTangentHGeometry.Polygon.Convex.Tangents
lowerTangent'HGeometry.Polygon.Convex.Tangents
\ No newline at end of file + (Index - L)
 

Index - L

LabelIpe.Content, Ipe.Types, Ipe
labelledIpe.IpeOut, Ipe
labelledWithIpe.IpeOut, Ipe
labelWithHGeometry.Indexed
labelWith'HGeometry.Indexed
labelWithIndexHGeometry.Indexed
lastHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lastFalseHGeometry.Algorithms.BinarySearch
LayerIpe.Attributes, Ipe
LayerName 
1 (Type/Class)Ipe.Layer, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Layer, Ipe.Types, Ipe
layerNameIpe.Layer, Ipe.Types, Ipe
layerNamesIpe.Types, Ipe
layersIpe.Types, Ipe
LayerSym0Ipe.Attributes, Ipe
LeafHGeometry.Tree.Binary.Static
LeafNodeHGeometry.Tree.Util
leaveOutOneHGeometry.List.Util
LeftButtonHGeometry.Miso.Event.Extra
leftFaceOfHGeometry.PlaneGraph
leftHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
LeftSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
leftSideHGeometry, HGeometry.Box, HGeometry.Kernel
leftTangentHGeometry.Polygon.Convex.Tangents
lerpHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
levelsHGeometry.Tree.Util
liesAboveHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liesBelowHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
liftI2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftI2AHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
liftOrd1HGeometry.Ord.Dynamic
liftPointToPlaneHGeometry.Duality
liftU2HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
lightblueIpe.Color
lightcyanIpe.Color
lightgrayIpe.Color
lightgreenIpe.Color
lightyellowIpe.Color
Line2_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
lineAtHGeometry.Line.LowerEnvelope
LineBoxIntersectionHGeometry, HGeometry.Box, HGeometry.Kernel
LineCapIpe.Attributes, Ipe
LineCapSym0Ipe.Attributes, Ipe
LineEQ 
1 (Type/Class)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
LineHalfLineIntersectionHGeometry.HalfLine
LineJoinIpe.Attributes, Ipe
LineJoinSym0Ipe.Attributes, Ipe
LineLineIntersectionHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineIntersectionGHGeometry, HGeometry.Line, HGeometry.Kernel
LineLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LinePV 
1 (Type/Class)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
LineSegment 
1 (Type/Class)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegmentLineSegmentIntersectionHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_ 
1 (Type/Class)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
LineSegment_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
lineThroughHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
LineToIpe.Path
Line_HGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
Line_x_Ball_PointHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Ball_SegmentHGeometry.Ball.CenterAndRadius, HGeometry.Ball
Line_x_Box_LineSegmentHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_Box_PointHGeometry, HGeometry.Box, HGeometry.Kernel
Line_x_HalfLine_HalfLineHGeometry.HalfLine
Line_x_HalfLine_PointHGeometry.HalfLine
Line_x_LineSegment_LineSegmentHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_LineSegment_PointHGeometry, HGeometry.LineSegment, HGeometry.Kernel
Line_x_Line_LineHGeometry, HGeometry.Line, HGeometry.Kernel
Line_x_Line_PointHGeometry, HGeometry.Line, HGeometry.Kernel
listIntervalsHGeometry.IntervalTree
litIpe.Literal
literallyIpe.Literal
litFileIpe.Literal
LogarithmicMethodDSHGeometry.Algorithms.LogarithmicMethod
lookupAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
lookupAttrIpe.Attributes, Ipe
lookupIdxHGeometry.Permutation
lookupLEVertexHGeometry.Line.LowerEnvelope
LossyHGeometry.Number.Real.Rational
LowerEnvelope 
1 (Type/Class)HGeometry.Plane.LowerEnvelope
2 (Type/Class)HGeometry.Line.LowerEnvelope
3 (Data Constructor)HGeometry.Line.LowerEnvelope
lowerEnvelope 
1 (Function)HGeometry.Line.LowerEnvelope
2 (Function)HGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
LowerEnvelopeFHGeometry.Line.LowerEnvelope
lowerEnvelopeWithHGeometry.Plane.LowerEnvelope.Naive, HGeometry.Plane.LowerEnvelope
lowerHull 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
3 (Function)HGeometry.ConvexHull.DivideAndConquer
lowerHull' 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
lowerTangentHGeometry.Polygon.Convex.Tangents
lowerTangent'HGeometry.Polygon.Convex.Tangents
\ No newline at end of file diff --git a/haddocks/doc-index-M.html b/haddocks/doc-index-M.html index 74bf33948..704eb97e0 100644 --- a/haddocks/doc-index-M.html +++ b/haddocks/doc-index-M.html @@ -1 +1 @@ - (Index - M)
 

Index - M

makeMonotoneHGeometry.Polygon.Triangulation.MakeMonotone
mapFHGeometry.Sequence.Alternating
MarkedViewIpe.IpeToIpe
markedViewIpe.IpeToIpe
Matrix 
1 (Data Constructor)Ipe.Attributes, Ipe
2 (Type/Class)HGeometry.Matrix
3 (Data Constructor)HGeometry.Matrix
matrixFromListHGeometry.Matrix.Class, HGeometry.Matrix
matrixFromRowsHGeometry.Matrix.Class, HGeometry.Matrix
MatrixSym0Ipe.Attributes, Ipe
matrixToMisoStringHGeometry.Miso.Svg.StaticCanvas
Matrix_HGeometry.Matrix.Class, HGeometry.Matrix
maximumMaybeHGeometry.List.Util
maximumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
maxInDirectionHGeometry.Polygon.Convex
MaxInfinityHGeometry.Unbounded
maxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
measureHGeometry.Measured.Class, HGeometry.Measured
MeasuredHGeometry.Measured.Class, HGeometry.Measured
MergeHGeometry.Polygon.Triangulation.MakeMonotone
mergeHGeometry.Algorithms.LogarithmicMethod
mergeAlternatingHGeometry.Sequence.Alternating
mergeDefinersHGeometry.Plane.LowerEnvelope.ConnectedNew
mergePairsHGeometry.ClosestPair.DivideAndConquer
mergeSortedHGeometry.Algorithms.DivideAndConquer
mergeSortedByHGeometry.Algorithms.DivideAndConquer
mergeSortedListsHGeometry.Algorithms.DivideAndConquer
mergeSortedListsByHGeometry.Algorithms.DivideAndConquer
Metric_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
MiddleButtonHGeometry.Miso.Event.Extra
minimaByHGeometry.List.Util
minimaOnHGeometry.List.Util
MinimizationDiagramHGeometry.Plane.LowerEnvelope.ConnectedNew
minimumMaybeHGeometry.List.Util
minimumMaybeByHGeometry.List.Util
minimumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
MinInfinityHGeometry.Unbounded
MiniPage 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
MiniPageAttributesIpe.Attributes, Ipe
minkowskiSumHGeometry.Polygon.Convex
minPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
mkClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
mkEndPointHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
mkEpsFoldHGeometry.Number.Real.Symbolic
MkHyperPlaneConstraintsHGeometry.HyperPlane
mkIntervalHGeometry.Interval.Class, HGeometry.Interval
mkIpeObjectIpe.Content, Ipe.Types, Ipe
MkLineEQHGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
mkLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
mkOpenIntervalHGeometry.Interval.Class, HGeometry.Interval
MkReportHGeometry.Measured.Report
MkSimplePolygonHGeometry.Polygon.Simple
MkSphereHGeometry.Ball.CenterAndRadius, HGeometry.Ball
mkTriangleHGeometry.Triangle.Class, HGeometry.Triangle
MkVector1HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector2HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector3HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector4HGeometry, HGeometry.Kernel, HGeometry.Vector
mkViewportHGeometry.Viewport
monotoneDirectionHGeometry.Polygon.Monotone
MonotonePolygonHGeometry.Polygon.Monotone
MonotonePolygonFHGeometry.Polygon.Monotone
mouseCoordinatesHGeometry.Miso.Svg.Canvas
mousePositionHGeometry.Miso.Svg.Canvas
MoveToIpe.Path
\ No newline at end of file + (Index - M)
 

Index - M

makeMonotoneHGeometry.Polygon.Triangulation.MakeMonotone
mapFHGeometry.Sequence.Alternating
MarkedViewIpe.IpeToIpe
markedViewIpe.IpeToIpe
Matrix 
1 (Data Constructor)Ipe.Attributes, Ipe
2 (Type/Class)HGeometry.Matrix
3 (Data Constructor)HGeometry.Matrix
matrixFromListHGeometry.Matrix.Class, HGeometry.Matrix
matrixFromRowsHGeometry.Matrix.Class, HGeometry.Matrix
MatrixSym0Ipe.Attributes, Ipe
matrixToMisoStringHGeometry.Miso.Svg.StaticCanvas
Matrix_HGeometry.Matrix.Class, HGeometry.Matrix
maximumMaybeHGeometry.List.Util
maximumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
maxInDirectionHGeometry.Polygon.Convex
MaxInfinityHGeometry.Unbounded
maxPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
measureHGeometry.Measured.Class, HGeometry.Measured
MeasuredHGeometry.Measured.Class, HGeometry.Measured
MergeHGeometry.Polygon.Triangulation.MakeMonotone
mergeHGeometry.Algorithms.LogarithmicMethod
mergeAlternatingHGeometry.Sequence.Alternating
mergeDefinersHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
mergePairsHGeometry.ClosestPair.DivideAndConquer
mergeSortedHGeometry.Algorithms.DivideAndConquer
mergeSortedByHGeometry.Algorithms.DivideAndConquer
mergeSortedListsHGeometry.Algorithms.DivideAndConquer
mergeSortedListsByHGeometry.Algorithms.DivideAndConquer
Metric_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
MiddleButtonHGeometry.Miso.Event.Extra
minimaByHGeometry.List.Util
minimaOnHGeometry.List.Util
MinimizationDiagramHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
minimumMaybeHGeometry.List.Util
minimumMaybeByHGeometry.List.Util
minimumVertexByHGeometry.Polygon.Class, HGeometry.Polygon
MinInfinityHGeometry.Unbounded
MiniPage 
1 (Type/Class)Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Content, Ipe.Types, Ipe
MiniPageAttributesIpe.Attributes, Ipe
minkowskiSumHGeometry.Polygon.Convex
minPointHGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
mkClosedIntervalHGeometry.Interval.Class, HGeometry.Interval
mkEndPointHGeometry, HGeometry.Interval.EndPoint, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment, HGeometry.Kernel
mkEpsFoldHGeometry.Number.Real.Symbolic
MkHyperPlaneConstraintsHGeometry.HyperPlane
mkIntervalHGeometry.Interval.Class, HGeometry.Interval
mkIpeObjectIpe.Content, Ipe.Types, Ipe
MkLineEQHGeometry, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
mkLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
mkOpenIntervalHGeometry.Interval.Class, HGeometry.Interval
MkReportHGeometry.Measured.Report
MkSimplePolygonHGeometry.Polygon.Simple
MkSphereHGeometry.Ball.CenterAndRadius, HGeometry.Ball
mkTriangleHGeometry.Triangle.Class, HGeometry.Triangle
MkVector1HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector2HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector3HGeometry, HGeometry.Kernel, HGeometry.Vector
MkVector4HGeometry, HGeometry.Kernel, HGeometry.Vector
mkViewportHGeometry.Viewport
monotoneDirectionHGeometry.Polygon.Monotone
MonotonePolygonHGeometry.Polygon.Monotone
MonotonePolygonFHGeometry.Polygon.Monotone
mouseCoordinatesHGeometry.Miso.Svg.Canvas
mousePositionHGeometry.Miso.Svg.Canvas
MoveToIpe.Path
\ No newline at end of file diff --git a/haddocks/doc-index-P.html b/haddocks/doc-index-P.html index e0cb77dab..5fadb623e 100644 --- a/haddocks/doc-index-P.html +++ b/haddocks/doc-index-P.html @@ -1 +1 @@ - (Index - P)
 

Index - P

PageNumberIpe.IpeToIpe
pageNumberIpe.IpeRender
PageRange 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
pages 
1 (Function)Ipe.Types, Ipe
2 (Function)Ipe.IpeToIpe
ParallelPlaneHGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
ParallelStripsHGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
partition3HGeometry.List.Util
partitionIntoQuadrantsHGeometry, HGeometry.Kernel, HGeometry.Point
Path 
1 (Type/Class)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
pathIpe.IpeOut, Ipe
PathAttributesIpe.Attributes, Ipe
PathSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
pathSegmentIpe.IpeOut, Ipe
pathSegmentsIpe.Path, Ipe.Content, Ipe.Types, Ipe
pCoordinateIpe.PathParser
PDF 
1 (Data Constructor)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeToIpe
PenIpe.Attributes, Ipe
PenSym0Ipe.Attributes, Ipe
Permutation 
1 (Type/Class)HGeometry.Permutation
2 (Data Constructor)HGeometry.Permutation
perpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
perspectiveProjectionHGeometry.Graphics.Camera
perturbHGeometry.Number.Real.Symbolic
PinIpe.Attributes, Ipe
pinkIpe.Color
PinSym0Ipe.Attributes, Ipe
PinTypeIpe.Attributes, Ipe
PlanarGraph_HGeometry.PlaneGraph
Plane 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PlaneGraph 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Type/Class)HGeometry.PlaneGraph
3 (Data Constructor)HGeometry.PlaneGraph
PlaneGraph_HGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
Plane_ 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PNGIpe.IpeRender
Point 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
Point1HGeometry, HGeometry.Kernel, HGeometry.Point
Point1_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point2HGeometry, HGeometry.Kernel, HGeometry.Point
Point2_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point3HGeometry, HGeometry.Kernel, HGeometry.Point
Point3_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point4HGeometry, HGeometry.Kernel, HGeometry.Point
Point4_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
pointClosestToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
pointClosestToWithDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
PointFHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
pointFromListHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
PointLocationResultHGeometry.Boundary
PointLocationResultWithHGeometry.Boundary
pointOnHGeometry.HyperPlane.Class, HGeometry.HyperPlane
Point_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
PolygonalDomain 
1 (Type/Class)HGeometry.Polygon.WithHoles
2 (Data Constructor)HGeometry.Polygon.WithHoles
PolygonalDomainFHGeometry.Polygon.WithHoles
PolygonEdgeTypeHGeometry.Polygon.Triangulation
PolygonFaceDataHGeometry.Polygon.Triangulation
PolygonPathIpe.Path, Ipe.Content, Ipe.Types, Ipe
Polygon_HGeometry.Polygon.Class, HGeometry.Polygon
PolyLine 
1 (Type/Class)HGeometry.PolyLine
2 (Data Constructor)HGeometry.PolyLine
PolyLineFHGeometry.PolyLine
polyLineFromPointsHGeometry.PolyLine.Class, HGeometry.PolyLine
PolyLineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
PolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
pOperationIpe.PathParser
PositiveHGeometry.HalfSpace, HGeometry.Sign
pPointIpe.PathParser
preambleIpe.Types, Ipe
preambleDataIpe.Types, Ipe
prefixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
prevDartOfHGeometry.PlaneGraph
previousHGeometry.Permutation
prevSiblingHGeometry.Tree.Util
printAsIpeSelectionIpe.Writer, Ipe
printYAMLHGeometry.YAML
projectedEdgeGeometriesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
projectedEdgeGeometryHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
projectPointHGeometry, HGeometry.Kernel, HGeometry.Point
pureAttrIpe.Attributes, Ipe
purpleIpe.Color
\ No newline at end of file + (Index - P)
 

Index - P

PageNumberIpe.IpeToIpe
pageNumberIpe.IpeRender
PageRange 
1 (Type/Class)Ipe.IpeToIpe
2 (Data Constructor)Ipe.IpeToIpe
pages 
1 (Function)Ipe.Types, Ipe
2 (Function)Ipe.IpeToIpe
ParallelStripsHGeometry.Plane.LowerEnvelope
partition3HGeometry.List.Util
partitionIntoQuadrantsHGeometry, HGeometry.Kernel, HGeometry.Point
Path 
1 (Type/Class)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
2 (Data Constructor)Ipe.Path, Ipe.Content, Ipe.Types, Ipe
pathIpe.IpeOut, Ipe
PathAttributesIpe.Attributes, Ipe
PathSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
pathSegmentIpe.IpeOut, Ipe
pathSegmentsIpe.Path, Ipe.Content, Ipe.Types, Ipe
pCoordinateIpe.PathParser
PDF 
1 (Data Constructor)Ipe.IpeRender
2 (Data Constructor)Ipe.IpeToIpe
PenIpe.Attributes, Ipe
PenSym0Ipe.Attributes, Ipe
Permutation 
1 (Type/Class)HGeometry.Permutation
2 (Data Constructor)HGeometry.Permutation
perpendicularToHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
perspectiveProjectionHGeometry.Graphics.Camera
perturbHGeometry.Number.Real.Symbolic
PinIpe.Attributes, Ipe
pinkIpe.Color
PinSym0Ipe.Attributes, Ipe
PinTypeIpe.Attributes, Ipe
PlanarGraph_HGeometry.PlaneGraph
Plane 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PlaneGraph 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected.Graph
2 (Type/Class)HGeometry.PlaneGraph
3 (Data Constructor)HGeometry.PlaneGraph
PlaneGraph_HGeometry.PlaneGraph.Class, HGeometry.PlaneGraph
Plane_ 
1 (Type/Class)HGeometry.HyperPlane.NonVertical
2 (Data Constructor)HGeometry.HyperPlane.NonVertical
PNGIpe.IpeRender
Point 
1 (Type/Class)HGeometry, HGeometry.Kernel, HGeometry.Point
2 (Data Constructor)HGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
Point1HGeometry, HGeometry.Kernel, HGeometry.Point
Point1_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point2HGeometry, HGeometry.Kernel, HGeometry.Point
Point2_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point3HGeometry, HGeometry.Kernel, HGeometry.Point
Point3_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Point4HGeometry, HGeometry.Kernel, HGeometry.Point
Point4_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
pointClosestToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
pointClosestToWithDistanceHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
PointFHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
pointFromListHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
pointLocateParallelHGeometry.Plane.LowerEnvelope
PointLocationResultHGeometry.Boundary
PointLocationResultWithHGeometry.Boundary
pointOnHGeometry.HyperPlane.Class, HGeometry.HyperPlane
Point_HGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
PolygonalDomain 
1 (Type/Class)HGeometry.Polygon.WithHoles
2 (Data Constructor)HGeometry.Polygon.WithHoles
PolygonalDomainFHGeometry.Polygon.WithHoles
PolygonEdgeTypeHGeometry.Polygon.Triangulation
PolygonFaceDataHGeometry.Polygon.Triangulation
PolygonPathIpe.Path, Ipe.Content, Ipe.Types, Ipe
Polygon_HGeometry.Polygon.Class, HGeometry.Polygon
PolyLine 
1 (Type/Class)HGeometry.PolyLine
2 (Data Constructor)HGeometry.PolyLine
PolyLineFHGeometry.PolyLine
polyLineFromPointsHGeometry.PolyLine.Class, HGeometry.PolyLine
PolyLineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
PolyLine_HGeometry.PolyLine.Class, HGeometry.PolyLine
pOperationIpe.PathParser
PositiveHGeometry.HalfSpace, HGeometry.Sign
pPointIpe.PathParser
preambleIpe.Types, Ipe
preambleDataIpe.Types, Ipe
prefixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
prevDartOfHGeometry.PlaneGraph
previousHGeometry.Permutation
prevSiblingHGeometry.Tree.Util
printAsIpeSelectionIpe.Writer, Ipe
printYAMLHGeometry.YAML
projectPointHGeometry, HGeometry.Kernel, HGeometry.Point
pureAttrIpe.Attributes, Ipe
purpleIpe.Color
\ No newline at end of file diff --git a/haddocks/doc-index-R.html b/haddocks/doc-index-R.html index ab8c5342e..5446ddec4 100644 --- a/haddocks/doc-index-R.html +++ b/haddocks/doc-index-R.html @@ -1 +1 @@ - (Index - R)
 

Index - R

RadicalHGeometry.Number.Radical
radiusHGeometry.Ball.Class, HGeometry.Ball
randomConvexHGeometry.Polygon.Convex.Random
randomMonotoneHGeometry.Polygon.Monotone
randomMonotoneDirectedHGeometry.Polygon.Monotone
randomNonZeroVectorHGeometry.Polygon.Monotone
rangeHGeometry.Viewport
rangeQueryHGeometry.RangeTree.Base, HGeometry.RangeTree
RangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
RArrowIpe.Attributes, Ipe
RArrowSym0Ipe.Attributes, Ipe
rawCameraNormalHGeometry.Graphics.Camera
rawViewUpHGeometry.Graphics.Camera
readAllIpe.FromIpe, Ipe
readAllFromIpe.FromIpe, Ipe
readCoordinateIpe.PathParser
readIpeFileIpe.Reader, Ipe
readIpeStylesheetIpe.Reader, Ipe
readMatrixIpe.PathParser
readPathOperationsIpe.PathParser
readPointIpe.PathParser
readRawIpeFileIpe.Reader, Ipe
readRectangleIpe.PathParser
readSinglePageFileIpe.Reader, Ipe
readSinglePageFileThrowIpe.Reader, Ipe
readXMLIpe.Reader
RealNumber 
1 (Type/Class)HGeometry.Number.Real.Rational
2 (Data Constructor)HGeometry.Number.Real.Rational
rectIpe.Content, Ipe.Types, Ipe
Rectangle 
1 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
Rectangle_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
redIpe.Color
reflectionHGeometry.Transformation
reflectionHHGeometry.Transformation
reflectionVHGeometry.Transformation
RegionHGeometry.Plane.LowerEnvelope.ConnectedNew
RegularHGeometry.Polygon.Triangulation.MakeMonotone
renderAsSvgByteStringHGeometry.Miso.Svg, HGeometry.Svg
renderAsSvgTextHGeometry.Miso.Svg, HGeometry.Svg
renderSvgToFileHGeometry.Miso.Svg, HGeometry.Svg
Report 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
Report1 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
ReportList 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
resolutionIpe.IpeRender
RestGeoPositionHGeometry.GeoJSON
RetainIpeInfoIpe.IpeToIpe
reverseHGeometry.Sequence.Alternating
RightButtonHGeometry.Miso.Event.Extra
rightFaceOfHGeometry.PlaneGraph
rightHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
rightPlaneHGeometry.Plane.LowerEnvelope
RightSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
rightSideHGeometry, HGeometry.Box, HGeometry.Kernel
rightTangentHGeometry.Polygon.Convex.Tangents
RigidIpe.Attributes, Ipe
rootHGeometry.Tree.Util
rotateCoordSystemHGeometry.Graphics.Camera
rotateToHGeometry.Transformation
rotationHGeometry.Transformation
roundToConstantHGeometry.Number.Real.Symbolic
rowHGeometry.Matrix.Class, HGeometry.Matrix
rowsHGeometry.Matrix.Class, HGeometry.Matrix
runLatexIpe.IpeToIpe
runOHGeometry.Ord.Dynamic
runParserIpe.PathParser
\ No newline at end of file + (Index - R)
 

Index - R

RadicalHGeometry.Number.Radical
radiusHGeometry.Ball.Class, HGeometry.Ball
randomConvexHGeometry.Polygon.Convex.Random
randomMonotoneHGeometry.Polygon.Monotone
randomMonotoneDirectedHGeometry.Polygon.Monotone
randomNonZeroVectorHGeometry.Polygon.Monotone
rangeHGeometry.Viewport
rangeQueryHGeometry.RangeTree.Base, HGeometry.RangeTree
RangeTreeHGeometry.RangeTree.Base, HGeometry.RangeTree
RArrowIpe.Attributes, Ipe
RArrowSym0Ipe.Attributes, Ipe
rawCameraNormalHGeometry.Graphics.Camera
rawViewUpHGeometry.Graphics.Camera
readAllIpe.FromIpe, Ipe
readAllFromIpe.FromIpe, Ipe
readCoordinateIpe.PathParser
readIpeFileIpe.Reader, Ipe
readIpeStylesheetIpe.Reader, Ipe
readMatrixIpe.PathParser
readPathOperationsIpe.PathParser
readPointIpe.PathParser
readRawIpeFileIpe.Reader, Ipe
readRectangleIpe.PathParser
readSinglePageFileIpe.Reader, Ipe
readSinglePageFileThrowIpe.Reader, Ipe
readXMLIpe.Reader
RealNumber 
1 (Type/Class)HGeometry.Number.Real.Rational
2 (Data Constructor)HGeometry.Number.Real.Rational
rectIpe.Content, Ipe.Types, Ipe
Rectangle 
1 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
Rectangle_HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
redIpe.Color
reflectionHGeometry.Transformation
reflectionHHGeometry.Transformation
reflectionVHGeometry.Transformation
RegionHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
RegularHGeometry.Polygon.Triangulation.MakeMonotone
renderAsSvgByteStringHGeometry.Miso.Svg, HGeometry.Svg
renderAsSvgTextHGeometry.Miso.Svg, HGeometry.Svg
renderSvgToFileHGeometry.Miso.Svg, HGeometry.Svg
Report 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
Report1 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
ReportList 
1 (Type/Class)HGeometry.Measured.Report
2 (Data Constructor)HGeometry.Measured.Report
resolutionIpe.IpeRender
RestGeoPositionHGeometry.GeoJSON
RetainIpeInfoIpe.IpeToIpe
reverseHGeometry.Sequence.Alternating
RightButtonHGeometry.Miso.Event.Extra
rightFaceOfHGeometry.PlaneGraph
rightHalfPlaneHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
RightSideHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
rightSideHGeometry, HGeometry.Box, HGeometry.Kernel
rightTangentHGeometry.Polygon.Convex.Tangents
RigidIpe.Attributes, Ipe
rootHGeometry.Tree.Util
rotateCoordSystemHGeometry.Graphics.Camera
rotateToHGeometry.Transformation
rotationHGeometry.Transformation
roundToConstantHGeometry.Number.Real.Symbolic
rowHGeometry.Matrix.Class, HGeometry.Matrix
rowsHGeometry.Matrix.Class, HGeometry.Matrix
runLatexIpe.IpeToIpe
runOHGeometry.Ord.Dynamic
runParserIpe.PathParser
\ No newline at end of file diff --git a/haddocks/doc-index-S.html b/haddocks/doc-index-S.html index ed198b8f8..e0ecab24b 100644 --- a/haddocks/doc-index-S.html +++ b/haddocks/doc-index-S.html @@ -1 +1 @@ - (Index - S)
 

Index - S

sameDirectionHGeometry, HGeometry.Kernel, HGeometry.Vector
samplePointHGeometry.Polygon.Simple.Sample
samplePolygonHGeometry.Polygon.Simple.Sample
samplePolygonsHGeometry.Polygon.Simple.Sample
SamplerHGeometry.Polygon.Simple.Sample
SArrowIpe.Attributes, Ipe
SAttributeUniverseIpe.Attributes, Ipe
scalarMultipleHGeometry, HGeometry.Kernel, HGeometry.Vector
scaleByHGeometry.Transformation
scaleUniformlyByHGeometry.Transformation
scalingHGeometry.Transformation
SClipIpe.Attributes, Ipe
screenDimensionsHGeometry.Graphics.Camera
SDashIpe.Attributes, Ipe
SDepthIpe.Attributes, Ipe
seagreenIpe.Color
searchHGeometry.IntervalTree
searchInSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
SegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
setAttrIpe.Attributes, Ipe
SFillIpe.Attributes, Ipe
SFillRuleIpe.Attributes, Ipe
SGradientIpe.Attributes, Ipe
SHAlignIpe.Attributes, Ipe
SHeightIpe.Attributes, Ipe
ShiftedEqHGeometry.Cyclic
shiftLeftHGeometry.Interval.Class, HGeometry.Interval
shiftRightHGeometry.Interval.Class, HGeometry.Interval
sideDirectionsHGeometry, HGeometry.Box, HGeometry.Kernel
Sides 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
sidesHGeometry, HGeometry.Box, HGeometry.Kernel
sides'HGeometry, HGeometry.Box, HGeometry.Kernel
SideTestHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SideTestUpDownHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
sideValuesHGeometry, HGeometry.Box, HGeometry.Kernel
SignHGeometry.HalfSpace, HGeometry.Sign
signedArea2XHGeometry.Polygon.Class, HGeometry.Polygon
signFromTermsHGeometry.Sign
signOfHGeometry.Number.Real.Symbolic
signormHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
SimplePolygonHGeometry.Polygon.Simple
SimplePolygonFHGeometry.Polygon.Simple
SimplePolygon_HGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
simplifyHGeometry.PolyLine.Simplification.ImaiIri
simplifyWithHGeometry.PolyLine.Simplification.ImaiIri
singlePageFileIpe.Types, Ipe
singlePageFromContentIpe.Types, Ipe
singleton 
1 (Function)HGeometry.Plane.LowerEnvelope.VertexForm
2 (Function)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
3 (Function)HGeometry.Algorithms.LogarithmicMethod
SingletonPointHGeometry.HalfPlane.CommonIntersection
singleViewIpe.IpeToIpe
SizeIpe.Attributes, Ipe
size 
1 (Function)HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Permutation
Sized 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
SizeSym0Ipe.Attributes, Ipe
skewXHGeometry.Transformation
SlabHGeometry.HalfPlane.CommonIntersection
SLayerIpe.Attributes, Ipe
SLineCapIpe.Attributes, Ipe
SLineJoinIpe.Attributes, Ipe
slopeHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
SMatrixIpe.Attributes, Ipe
snocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
snocElemWithHGeometry.Sequence.Alternating
SOpacityIpe.Attributes, Ipe
sortHGeometry.Foldable.Sort
sortAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
sortByHGeometry.Foldable.Sort
sortOnCheapHGeometry.Foldable.Sort
sosIndexHGeometry.Indexed
SoSRationalHGeometry.Number.Real.Symbolic
sosRationalHGeometry.Number.Real.Symbolic
SouthHGeometry.Direction
southHGeometry, HGeometry.Box, HGeometry.Kernel
SouthEastHGeometry.Direction
southEastHGeometry, HGeometry.Box, HGeometry.Kernel
SouthWestHGeometry.Direction
southWestHGeometry, HGeometry.Box, HGeometry.Kernel
SP 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
spanInHGeometry, HGeometry.LineSegment, HGeometry.Kernel
SPenIpe.Attributes, Ipe
Sphere 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
SPinIpe.Attributes, Ipe
SplineIpe.Path
SplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
SplitHGeometry.Polygon.Triangulation.MakeMonotone
splitByHGeometry.Set.Util
splitIncrHGeometry.CircularList.Util
splitL1AtHGeometry.Sequence.NonEmpty
splitOnHGeometry.Set.Util
splitR1AtHGeometry.Sequence.NonEmpty
sqrtHGeometry.Number.Radical
squaredEuclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredEuclideanDistToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredRadiusHGeometry.Ball.Class, HGeometry.Ball
SRArrowIpe.Attributes, Ipe
SSizeIpe.Attributes, Ipe
SStrokeIpe.Attributes, Ipe
SStrokeOpacityIpe.Attributes, Ipe
SStyleIpe.Attributes, Ipe
stab 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
stabsIntervalHGeometry.Interval.Class, HGeometry.Interval
StartHGeometry.Polygon.Triangulation.MakeMonotone
startHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startAndEndHGeometry.Interval.Class, HGeometry.Interval
startAndEndPointHGeometry.Interval.Class, HGeometry.Interval
startPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
StartPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
StaticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvas_HGeometry.Miso.Svg.StaticCanvas
StatusStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
steepestCcwFromHGeometry.ConvexHull.JarvisMarch
steepestCwFromHGeometry.ConvexHull.JarvisMarch
STilingIpe.Attributes, Ipe
STR 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
STransformationsIpe.Attributes, Ipe
StrictlyInsideHGeometry.Boundary
StrictlyOutsideHGeometry.Boundary
StrokeIpe.Attributes, Ipe
StrokeOpacityIpe.Attributes, Ipe
StrokeOpacitySym0Ipe.Attributes, Ipe
StrokeSym0Ipe.Attributes, Ipe
StyleIpe.Attributes, Ipe
styleDataIpe.Types, Ipe
styleNameIpe.Types, Ipe
stylesIpe.Types, Ipe
StyleSym0Ipe.Attributes, Ipe
SubLineHGeometry.HalfPlane.CommonIntersection
suffixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
suitableBaseHGeometry.Number.Real.Symbolic
sumVHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
supportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SVAlignIpe.Attributes, Ipe
SVGIpe.IpeRender
svgCanvas_HGeometry.Miso.Svg.Canvas
SWidthIpe.Attributes, Ipe
SymbolIpe.Content, Ipe.Types, Ipe
SymbolAttributesIpe.Attributes, Ipe
SymbolicHGeometry.Number.Real.Symbolic
symbolicHGeometry.Number.Real.Symbolic
symbolNameIpe.Content, Ipe.Types, Ipe
symbolPointIpe.Content, Ipe.Types, Ipe
\ No newline at end of file + (Index - S)
 

Index - S

sameDirectionHGeometry, HGeometry.Kernel, HGeometry.Vector
samplePointHGeometry.Polygon.Simple.Sample
samplePolygonHGeometry.Polygon.Simple.Sample
samplePolygonsHGeometry.Polygon.Simple.Sample
SamplerHGeometry.Polygon.Simple.Sample
SArrowIpe.Attributes, Ipe
SAttributeUniverseIpe.Attributes, Ipe
scalarMultipleHGeometry, HGeometry.Kernel, HGeometry.Vector
scaleByHGeometry.Transformation
scaleUniformlyByHGeometry.Transformation
scalingHGeometry.Transformation
SClipIpe.Attributes, Ipe
screenDimensionsHGeometry.Graphics.Camera
SDashIpe.Attributes, Ipe
SDepthIpe.Attributes, Ipe
seagreenIpe.Color
searchHGeometry.IntervalTree
searchInSlabHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
segmentAboveOrOnHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
SegmentTreeHGeometry.SegmentTree.Base, HGeometry.SegmentTree
separatorsHGeometry.Sequence.Alternating
setAttrIpe.Attributes, Ipe
SFillIpe.Attributes, Ipe
SFillRuleIpe.Attributes, Ipe
SGradientIpe.Attributes, Ipe
SHAlignIpe.Attributes, Ipe
SHeightIpe.Attributes, Ipe
ShiftedEqHGeometry.Cyclic
shiftLeftHGeometry.Interval.Class, HGeometry.Interval
shiftRightHGeometry.Interval.Class, HGeometry.Interval
sideDirectionsHGeometry, HGeometry.Box, HGeometry.Kernel
Sides 
1 (Type/Class)HGeometry, HGeometry.Box, HGeometry.Kernel
2 (Data Constructor)HGeometry, HGeometry.Box, HGeometry.Kernel
sidesHGeometry, HGeometry.Box, HGeometry.Kernel
sides'HGeometry, HGeometry.Box, HGeometry.Kernel
SideTestHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SideTestUpDownHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
sideValuesHGeometry, HGeometry.Box, HGeometry.Kernel
SignHGeometry.HalfSpace, HGeometry.Sign
signedArea2XHGeometry.Polygon.Class, HGeometry.Polygon
signFromTermsHGeometry.Sign
signOfHGeometry.Number.Real.Symbolic
signormHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
SimplePolygonHGeometry.Polygon.Simple
SimplePolygonFHGeometry.Polygon.Simple
SimplePolygon_HGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
simplifyHGeometry.PolyLine.Simplification.ImaiIri
simplifyWithHGeometry.PolyLine.Simplification.ImaiIri
singlePageFileIpe.Types, Ipe
singlePageFromContentIpe.Types, Ipe
singletonHGeometry.Algorithms.LogarithmicMethod
SingletonPointHGeometry.HalfPlane.CommonIntersection
singleViewIpe.IpeToIpe
SizeIpe.Attributes, Ipe
size 
1 (Function)HGeometry, HGeometry.Box.Class, HGeometry.Box, HGeometry.Kernel
2 (Function)HGeometry.Permutation
Sized 
1 (Type/Class)HGeometry.Measured.Size
2 (Data Constructor)HGeometry.Measured.Size
SizeSym0Ipe.Attributes, Ipe
skewXHGeometry.Transformation
SlabHGeometry.HalfPlane.CommonIntersection
SLayerIpe.Attributes, Ipe
SLineCapIpe.Attributes, Ipe
SLineJoinIpe.Attributes, Ipe
slopeHGeometry, HGeometry.Line.NonVertical.Class, HGeometry.Line.LineEQ, HGeometry.Line, HGeometry.Kernel
SMatrixIpe.Attributes, Ipe
snocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
snocElemWithHGeometry.Sequence.Alternating
SOpacityIpe.Attributes, Ipe
sortHGeometry.Foldable.Sort
sortAroundHGeometry, HGeometry.Kernel, HGeometry.Point.Orientation, HGeometry.Point
sortByHGeometry.Foldable.Sort
sortOnCheapHGeometry.Foldable.Sort
sosIndexHGeometry.Indexed
SoSRationalHGeometry.Number.Real.Symbolic
sosRationalHGeometry.Number.Real.Symbolic
SouthHGeometry.Direction
southHGeometry, HGeometry.Box, HGeometry.Kernel
SouthEastHGeometry.Direction
southEastHGeometry, HGeometry.Box, HGeometry.Kernel
SouthWestHGeometry.Direction
southWestHGeometry, HGeometry.Box, HGeometry.Kernel
SP 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
spanInHGeometry, HGeometry.LineSegment, HGeometry.Kernel
SPenIpe.Attributes, Ipe
Sphere 
1 (Type/Class)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
2 (Data Constructor)HGeometry.Ball.CenterAndRadius, HGeometry.Ball
SPinIpe.Attributes, Ipe
SplineIpe.Path
SplineSegmentIpe.Path, Ipe.Content, Ipe.Types, Ipe
SplitHGeometry.Polygon.Triangulation.MakeMonotone
splitByHGeometry.Set.Util
splitIncrHGeometry.CircularList.Util
splitL1AtHGeometry.Sequence.NonEmpty
splitOnHGeometry.Set.Util
splitR1AtHGeometry.Sequence.NonEmpty
sqrtHGeometry.Number.Radical
squaredEuclideanDistHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredEuclideanDistToHGeometry, HGeometry.Kernel, HGeometry.Point.EuclideanDistance, HGeometry.Point
squaredRadiusHGeometry.Ball.Class, HGeometry.Ball
SRArrowIpe.Attributes, Ipe
SSizeIpe.Attributes, Ipe
SStrokeIpe.Attributes, Ipe
SStrokeOpacityIpe.Attributes, Ipe
SStyleIpe.Attributes, Ipe
stab 
1 (Function)HGeometry.IntervalTree
2 (Function)HGeometry.SegmentTree.Base, HGeometry.SegmentTree
stabsIntervalHGeometry.Interval.Class, HGeometry.Interval
StartHGeometry.Polygon.Triangulation.MakeMonotone
startHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startAndEndHGeometry.Interval.Class, HGeometry.Interval
startAndEndPointHGeometry.Interval.Class, HGeometry.Interval
startPointHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
StartPointOfHGeometry, HGeometry.Interval.Class, HGeometry.Interval, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
startPointOfHGeometry.LineSegment.Intersection.Naive, HGeometry.LineSegment.Intersection.BentleyOttmann
StaticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvasHGeometry.Miso.Svg.StaticCanvas
staticCanvas_HGeometry.Miso.Svg.StaticCanvas
StatusStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
steepestCcwFromHGeometry.ConvexHull.JarvisMarch
steepestCwFromHGeometry.ConvexHull.JarvisMarch
STilingIpe.Attributes, Ipe
STR 
1 (Type/Class)HGeometry.Combinatorial.Util
2 (Data Constructor)HGeometry.Combinatorial.Util
STransformationsIpe.Attributes, Ipe
StrictlyInsideHGeometry.Boundary
StrictlyOutsideHGeometry.Boundary
StrokeIpe.Attributes, Ipe
StrokeOpacityIpe.Attributes, Ipe
StrokeOpacitySym0Ipe.Attributes, Ipe
StrokeSym0Ipe.Attributes, Ipe
StyleIpe.Attributes, Ipe
styleDataIpe.Types, Ipe
styleNameIpe.Types, Ipe
stylesIpe.Types, Ipe
StyleSym0Ipe.Attributes, Ipe
SubLineHGeometry.HalfPlane.CommonIntersection
suffixHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
suitableBaseHGeometry.Number.Real.Symbolic
sumVHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
supportingLineHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
SVAlignIpe.Attributes, Ipe
SVGIpe.IpeRender
svgCanvas_HGeometry.Miso.Svg.Canvas
SWidthIpe.Attributes, Ipe
SymbolIpe.Content, Ipe.Types, Ipe
SymbolAttributesIpe.Attributes, Ipe
SymbolicHGeometry.Number.Real.Symbolic
symbolicHGeometry.Number.Real.Symbolic
symbolNameIpe.Content, Ipe.Types, Ipe
symbolPointIpe.Content, Ipe.Types, Ipe
\ No newline at end of file diff --git a/haddocks/doc-index-T.html b/haddocks/doc-index-T.html index 450ab415a..75dadb232 100644 --- a/haddocks/doc-index-T.html +++ b/haddocks/doc-index-T.html @@ -1 +1 @@ - (Index - T)
 

Index - T

tailOfHGeometry.PlaneGraph
takeAttrIpe.Attributes, Ipe
Term 
1 (Type/Class)HGeometry.Number.Real.Symbolic
2 (Data Constructor)HGeometry.Number.Real.Symbolic
termHGeometry.Number.Real.Symbolic
TeXStyleIpe.Attributes, Ipe
TextAttributesIpe.Attributes, Ipe
TextLabelIpe.Content, Ipe.Types, Ipe
TextLabelAttributesIpe.Attributes, Ipe
TextSizeUnitIpe.Attributes, Ipe
theHolesHGeometry.Polygon.WithHoles
theUnboundedVertexHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
theValueHGeometry.Indexed
theViewportHGeometry.Miso.Svg.Canvas
Three 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
TilingIpe.Attributes, Ipe
TilingSym0Ipe.Attributes, Ipe
toBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
toCounterClockwiseTriangleHGeometry.Triangle.Class, HGeometry.Triangle
toCycleRepHGeometry.Permutation
toCyclicHGeometry.Polygon.Simple
toFixedHGeometry.Number.Real.Rational
toggleHGeometry.Set.Util
toggleByHGeometry.Set.Util
toHostFromHGeometry.Viewport
toIpeSelectionXMLIpe.Writer, Ipe
toIpeXMLIpe.Writer, Ipe
toLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
ToObjectIpe.Content, Ipe.Types, Ipe
Top 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
toPlaneGraphHGeometry.Plane.LowerEnvelope.Connected.Graph
TopLeftHGeometry, HGeometry.Kernel, HGeometry.Point
toPolygonPathSegmentIpe.IpeOut, Ipe
TopRightHGeometry, HGeometry.Kernel, HGeometry.Point
topSideHGeometry, HGeometry.Box, HGeometry.Kernel
topToMaybeHGeometry.Unbounded
toRoseTreeHGeometry.Tree.Binary.Static
toRoseTree'HGeometry.Tree.Binary.Static
toSimplePolygon 
1 (Function)HGeometry.Polygon.Monotone
2 (Function)HGeometry.Polygon.Convex
ToSvgCoordinateHGeometry.Miso.Svg.StaticCanvas
toTermsHGeometry.Number.Real.Symbolic
toVecHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
toViewPortHGeometry.Graphics.Camera
toWorldInHGeometry.Viewport
Transformation 
1 (Type/Class)HGeometry.Transformation
2 (Data Constructor)HGeometry.Transformation
TransformationConstraintsHGeometry.Transformation
transformationMatrixHGeometry.Transformation
TransformationsIpe.Attributes, Ipe
TransformationsSym0Ipe.Attributes, Ipe
TransformationTypesIpe.Attributes, Ipe
transformByHGeometry.Transformation
translateByHGeometry.Transformation
translationHGeometry.Transformation
TranslationsIpe.Attributes, Ipe
transparentIpe.IpeRender
TransparentBackgroundIpe.IpeRender
traverseAttrIpe.Attributes, Ipe
traverseAttrsIpe.Attributes, Ipe
traverseBoundedVHGeometry.Plane.LowerEnvelope
traverseIpeAttrsIpe.Content, Ipe.Types, Ipe
traverseLeftFromHGeometry.Cyclic
traverseRightFromHGeometry.Cyclic
TreeNodeHGeometry.Tree.Util
Triangle 
1 (Type/Class)HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle
triangleSamplerHGeometry.Polygon.Simple.Sample
triangleSignedArea2XHGeometry.Triangle.Class, HGeometry.Triangle
Triangle_ 
1 (Type/Class)HGeometry.Triangle.Class, HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle.Class, HGeometry.Triangle
triangulate 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation
turquoiseIpe.Color
twinDartOfHGeometry.PlaneGraph
twinOfHGeometry.PlaneGraph
Two 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
\ No newline at end of file + (Index - T)
 

Index - T

tailOfHGeometry.PlaneGraph
takeAttrIpe.Attributes, Ipe
Term 
1 (Type/Class)HGeometry.Number.Real.Symbolic
2 (Data Constructor)HGeometry.Number.Real.Symbolic
termHGeometry.Number.Real.Symbolic
TeXStyleIpe.Attributes, Ipe
TextAttributesIpe.Attributes, Ipe
TextLabelIpe.Content, Ipe.Types, Ipe
TextLabelAttributesIpe.Attributes, Ipe
TextSizeUnitIpe.Attributes, Ipe
theHolesHGeometry.Polygon.WithHoles
theValueHGeometry.Indexed
theViewportHGeometry.Miso.Svg.Canvas
Three 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
TilingIpe.Attributes, Ipe
TilingSym0Ipe.Attributes, Ipe
toBarricentricHGeometry.Triangle.Class, HGeometry.Triangle
toCounterClockwiseTriangleHGeometry.Triangle.Class, HGeometry.Triangle
toCycleRepHGeometry.Permutation
toCyclicHGeometry.Polygon.Simple
toFixedHGeometry.Number.Real.Rational
toggleHGeometry.Set.Util
toggleByHGeometry.Set.Util
toHostFromHGeometry.Viewport
toIpeSelectionXMLIpe.Writer, Ipe
toIpeXMLIpe.Writer, Ipe
toLinearFunctionHGeometry, HGeometry.Line.PointAndVector, HGeometry.Line, HGeometry.Kernel
ToObjectIpe.Content, Ipe.Types, Ipe
Top 
1 (Type/Class)HGeometry.Unbounded
2 (Data Constructor)HGeometry.Unbounded
toPlaneGraphHGeometry.Plane.LowerEnvelope.Connected.Graph
TopLeftHGeometry, HGeometry.Kernel, HGeometry.Point
toPolygonPathSegmentIpe.IpeOut, Ipe
TopRightHGeometry, HGeometry.Kernel, HGeometry.Point
topSideHGeometry, HGeometry.Box, HGeometry.Kernel
topToMaybeHGeometry.Unbounded
toRoseTreeHGeometry.Tree.Binary.Static
toRoseTree'HGeometry.Tree.Binary.Static
toSimplePolygon 
1 (Function)HGeometry.Polygon.Monotone
2 (Function)HGeometry.Polygon.Convex
ToSvgCoordinateHGeometry.Miso.Svg.StaticCanvas
toTermsHGeometry.Number.Real.Symbolic
toVecHGeometry, HGeometry.Kernel, HGeometry.Point.PointF, HGeometry.Point
toViewPortHGeometry.Graphics.Camera
toWorldInHGeometry.Viewport
Transformation 
1 (Type/Class)HGeometry.Transformation
2 (Data Constructor)HGeometry.Transformation
TransformationConstraintsHGeometry.Transformation
transformationMatrixHGeometry.Transformation
TransformationsIpe.Attributes, Ipe
TransformationsSym0Ipe.Attributes, Ipe
TransformationTypesIpe.Attributes, Ipe
transformByHGeometry.Transformation
translateByHGeometry.Transformation
translationHGeometry.Transformation
TranslationsIpe.Attributes, Ipe
transparentIpe.IpeRender
TransparentBackgroundIpe.IpeRender
traverseAttrIpe.Attributes, Ipe
traverseAttrsIpe.Attributes, Ipe
traverseIpeAttrsIpe.Content, Ipe.Types, Ipe
traverseLeftFromHGeometry.Cyclic
traverseRightFromHGeometry.Cyclic
TreeNodeHGeometry.Tree.Util
Triangle 
1 (Type/Class)HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle
triangleSamplerHGeometry.Polygon.Simple.Sample
triangleSignedArea2XHGeometry.Triangle.Class, HGeometry.Triangle
Triangle_ 
1 (Type/Class)HGeometry.Triangle.Class, HGeometry.Triangle
2 (Data Constructor)HGeometry.Triangle.Class, HGeometry.Triangle
triangulate 
1 (Function)HGeometry.Polygon.Triangulation.TriangulateMonotone
2 (Function)HGeometry.Polygon.Triangulation
turquoiseIpe.Color
twinDartOfHGeometry.PlaneGraph
twinOfHGeometry.PlaneGraph
Two 
1 (Data Constructor)HGeometry.Combinatorial.Util
2 (Type/Class)HGeometry.Combinatorial.Util
\ No newline at end of file diff --git a/haddocks/doc-index-U.html b/haddocks/doc-index-U.html index 5f50c1a05..240f83db7 100644 --- a/haddocks/doc-index-U.html +++ b/haddocks/doc-index-U.html @@ -1 +1 @@ - (Index - U)
 

Index - U

unAttrsIpe.Attributes, Ipe
UnBoundedHGeometry.Unbounded
UnboundedHGeometry.Plane.LowerEnvelope.ConnectedNew
unboundedEdgesHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
UnboundedRegionHGeometry.HalfPlane.CommonIntersection
unBoundedToMaybeHGeometry.Unbounded
UnboundedVertex 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
unboundedVertexIdHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
uncheckedFromCCWPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
uncheckedLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
uncheckedMontonePolygonHGeometry.Polygon.Monotone
unconsHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unconsAltHGeometry.Sequence.Alternating
uniformScalingHGeometry.Transformation
uniquePairsHGeometry.Combinatorial.Util
uniqueTripletsHGeometry.Combinatorial.Util
unitHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unitBallHGeometry.Ball.Class, HGeometry.Ball
unitEllipseHGeometry.Ellipse
unSetAttrIpe.Attributes, Ipe
unsnocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unversionedHGeometry.YAML
unZipperLocalHGeometry.Tree.Util
UpHGeometry.Miso.Event.Extra
upHGeometry.Tree.Util
updateHGeometry.Miso.Canvas.Zoom
upperHalfSpaceOfHGeometry.ConvexHull.R3.Naive
UpperHullHGeometry.ConvexHull.R3.Naive.Dual
upperHull 
1 (Function)HGeometry.ConvexHull.R3.Naive.Dual
2 (Function)HGeometry.ConvexHull.JarvisMarch
3 (Function)HGeometry.ConvexHull.GrahamScan
4 (Function)HGeometry.ConvexHull.DivideAndConquer
upperHull' 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
upperHullFromSortedHGeometry.ConvexHull.GrahamScan
upperHullFromSorted'HGeometry.ConvexHull.GrahamScan
upperTangentHGeometry.Polygon.Convex.Tangents
upperTangent'HGeometry.Polygon.Convex.Tangents
\ No newline at end of file + (Index - U)
 

Index - U

unAttrsIpe.Attributes, Ipe
UnBoundedHGeometry.Unbounded
UnboundedHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
UnboundedRegionHGeometry.HalfPlane.CommonIntersection
unBoundedToMaybeHGeometry.Unbounded
uncheckedFromCCWPointsHGeometry.Polygon.Simple.Class, HGeometry.Polygon.Simple
uncheckedLineSegmentHGeometry, HGeometry.LineSegment.Class, HGeometry.LineSegment, HGeometry.Kernel
uncheckedMontonePolygonHGeometry.Polygon.Monotone
unconsHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unconsAltHGeometry.Sequence.Alternating
uniformScalingHGeometry.Transformation
uniquePairsHGeometry.Combinatorial.Util
uniqueTripletsHGeometry.Combinatorial.Util
unitHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unitBallHGeometry.Ball.Class, HGeometry.Ball
unitEllipseHGeometry.Ellipse
unSetAttrIpe.Attributes, Ipe
unsnocHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
unversionedHGeometry.YAML
unZipperLocalHGeometry.Tree.Util
UpHGeometry.Miso.Event.Extra
upHGeometry.Tree.Util
updateHGeometry.Miso.Canvas.Zoom
upperHull 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
3 (Function)HGeometry.ConvexHull.DivideAndConquer
upperHull' 
1 (Function)HGeometry.ConvexHull.JarvisMarch
2 (Function)HGeometry.ConvexHull.GrahamScan
upperHullFromSortedHGeometry.ConvexHull.GrahamScan
upperHullFromSorted'HGeometry.ConvexHull.GrahamScan
upperTangentHGeometry.Polygon.Convex.Tangents
upperTangent'HGeometry.Polygon.Convex.Tangents
\ No newline at end of file diff --git a/haddocks/doc-index-V.html b/haddocks/doc-index-V.html index bbc313ab8..62c458241 100644 --- a/haddocks/doc-index-V.html +++ b/haddocks/doc-index-V.html @@ -1 +1 @@ - (Index - V)
 

Index - V

ValHGeometry.Unbounded
ValBHGeometry.Unbounded
VAlignIpe.Attributes, Ipe
VAlignSym0Ipe.Attributes, Ipe
ValTHGeometry.Unbounded
ValuedIpe.Value, Ipe
VectorHGeometry, HGeometry.Kernel, HGeometry.Vector
vectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Vector1HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector2HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector3HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector4HGeometry, HGeometry.Kernel, HGeometry.Vector
vectorFromListHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
Vector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
verifyConvexHGeometry.Polygon.Convex
Versioned 
1 (Type/Class)HGeometry.YAML
2 (Data Constructor)HGeometry.YAML
Vertex 
1 (Type/Class)HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
2 (Data Constructor)HGeometry.Plane.LowerEnvelope.VertexForm, HGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope.AdjListForm, HGeometry.Plane.LowerEnvelope
vertexAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
VertexContainerHGeometry.Polygon.Simple
VertexForm 
1 (Type/Class)HGeometry.Plane.LowerEnvelope.ConnectedNew
2 (Type/Class)HGeometry.Plane.LowerEnvelope.VertexForm
3 (Data Constructor)HGeometry.Plane.LowerEnvelope.VertexForm
VertexIDHGeometry.Plane.LowerEnvelope
VertexIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
VertexTypeHGeometry.Polygon.Triangulation.MakeMonotone
VerticalIpe.Attributes, Ipe
VerticalAlignmentIpe.Attributes, Ipe
verticalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
VerticalLineThroughHGeometry.Line.General
VerticalOrLineEQHGeometry.Line.General
VerticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalSideTestHGeometry.HyperPlane.Class, HGeometry.HyperPlane
verticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
vertices'HGeometry.Plane.LowerEnvelope.VertexForm
View 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ViewL1HGeometry.Sequence.NonEmpty
viewl1HGeometry.Sequence.NonEmpty
ViewNumberIpe.IpeToIpe
viewNumberIpe.IpeRender
viewPlaneDepthHGeometry.Graphics.Camera
Viewport 
1 (Type/Class)HGeometry.Viewport
2 (Data Constructor)HGeometry.Viewport
viewPortHGeometry.Viewport
ViewR1HGeometry.Sequence.NonEmpty
viewr1HGeometry.Sequence.NonEmpty
viewsIpe.Types, Ipe
viewUpHGeometry.Graphics.Camera
violetIpe.Color
visibilityGraphHGeometry.Polygon.Visibility.Naive
visibilityGraphWithHGeometry.Polygon.Visibility.Naive
VoronoiDiagram 
1 (Type/Class)HGeometry.VoronoiDiagram
2 (Data Constructor)HGeometry.VoronoiDiagram
voronoiDiagramHGeometry.VoronoiDiagram
VoronoiDiagram'HGeometry.VoronoiDiagram
voronoiVerticesHGeometry.VoronoiDiagram
\ No newline at end of file + (Index - V)
 

Index - V

ValHGeometry.Unbounded
ValBHGeometry.Unbounded
VAlignIpe.Attributes, Ipe
VAlignSym0Ipe.Attributes, Ipe
ValTHGeometry.Unbounded
ValuedIpe.Value, Ipe
VectorHGeometry, HGeometry.Kernel, HGeometry.Vector
vectorHGeometry, HGeometry.Kernel, HGeometry.Point.Class, HGeometry.Point
Vector1HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector2HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector3HGeometry, HGeometry.Kernel, HGeometry.Vector
Vector4HGeometry, HGeometry.Kernel, HGeometry.Vector
vectorFromListHGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
Vector_HGeometry, HGeometry.Kernel, HGeometry.Vector.Class, HGeometry.Vector
verifyConvexHGeometry.Polygon.Convex
Versioned 
1 (Type/Class)HGeometry.YAML
2 (Data Constructor)HGeometry.YAML
VertexHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
vertexAtHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
VertexContainerHGeometry.Polygon.Simple
VertexFormHGeometry.Plane.LowerEnvelope.Connected, HGeometry.Plane.LowerEnvelope
VertexIxHGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.PlaneGraph, HGeometry.Polygon, HGeometry.Polygon
VertexTypeHGeometry.Polygon.Triangulation.MakeMonotone
VerticalIpe.Attributes, Ipe
VerticalAlignmentIpe.Attributes, Ipe
verticalLineHGeometry, HGeometry.Line.Class, HGeometry.Line, HGeometry.Kernel
VerticalLineThroughHGeometry.Line.General
VerticalOrLineEQHGeometry.Line.General
VerticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalRayShootingStructureHGeometry.VerticalRayShooting.PersistentSweep, HGeometry.VerticalRayShooting
verticalSideTestHGeometry.HyperPlane.Class, HGeometry.HyperPlane
verticesHGeometry.PolyLine, HGeometry.Polygon.Class, HGeometry.PlaneGraph, HGeometry.Polygon
View 
1 (Type/Class)Ipe.Types, Ipe
2 (Data Constructor)Ipe.Types, Ipe
ViewL1HGeometry.Sequence.NonEmpty
viewl1HGeometry.Sequence.NonEmpty
ViewNumberIpe.IpeToIpe
viewNumberIpe.IpeRender
viewPlaneDepthHGeometry.Graphics.Camera
Viewport 
1 (Type/Class)HGeometry.Viewport
2 (Data Constructor)HGeometry.Viewport
viewPortHGeometry.Viewport
ViewR1HGeometry.Sequence.NonEmpty
viewr1HGeometry.Sequence.NonEmpty
viewsIpe.Types, Ipe
viewUpHGeometry.Graphics.Camera
violetIpe.Color
visibilityGraphHGeometry.Polygon.Visibility.Naive
visibilityGraphWithHGeometry.Polygon.Visibility.Naive
VoronoiDiagram 
1 (Type/Class)HGeometry.VoronoiDiagram
2 (Data Constructor)HGeometry.VoronoiDiagram
voronoiDiagramHGeometry.VoronoiDiagram
VoronoiDiagram'HGeometry.VoronoiDiagram
voronoiVerticesHGeometry.VoronoiDiagram
\ No newline at end of file diff --git a/haddocks/doc-index.json b/haddocks/doc-index.json index 8efc52ac6..ecb08be4f 100644 --- a/haddocks/doc-index.json +++ b/haddocks/doc-index.json @@ -1 +1 @@ -[{"display_html":"newtype BezierSplineF f point where","name":"BezierSplineF Bezier2 Bezier3 BezierSpline","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:BezierSplineF"},{"display_html":"type BezierSpline = BezierSplineF NonEmptyVector","name":"BezierSpline","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:BezierSpline"},{"display_html":"type QuadraticBezier = BezierSplineF (Vector 3)","name":"QuadraticBezier","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:QuadraticBezier"},{"display_html":"type CubicBezier = BezierSplineF (Vector 4)","name":"CubicBezier","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:CubicBezier"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#v:closestPair"},{"display_html":"type CP point = Top (SP (Two point) (NumType point))","name":"CP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#t:CP"},{"display_html":"data CCP point = CCP (NonEmpty point) !(CP point)","name":"CCP CCP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#t:CCP"},{"display_html":"mergePairs :: forall point r. (Ord r, Num r, Point_ point 2 r) => CP point -> NonEmpty point -> NonEmpty point -> CP point","name":"mergePairs","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#v:mergePairs"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair","link":"hgeometry/HGeometry-ClosestPair.html#v:closestPair"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point d r, Foldable1 f, Has_ Metric_ d r) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.Naive","link":"hgeometry/HGeometry-ClosestPair-Naive.html#v:closestPair"},{"display_html":"closestPairWith :: (Ord r, Point_ point d r, Foldable1 f) => DistanceFunction point -> f point -> SP (Vector 2 point) r","name":"closestPairWith","module":"HGeometry.ClosestPair.Naive","link":"hgeometry/HGeometry-ClosestPair-Naive.html#v:closestPairWith"},{"display_html":"type DistanceFunction g = g -> g -> NumType g","name":"DistanceFunction","module":"HGeometry.ClosestPair.Naive","link":"hgeometry/HGeometry-ClosestPair-Naive.html#t:DistanceFunction"},{"display_html":"type ConvexHull point = [Triangle point]","name":"ConvexHull","module":"HGeometry.ConvexHull.R3.Naive","link":"hgeometry/HGeometry-ConvexHull-R3-Naive.html#t:ConvexHull"},{"display_html":"lowerHull' :: forall point r. (Ord r, Fractional r, Show r, Point_ point 3 r) => NonEmpty point -> ConvexHull point","name":"lowerHull'","module":"HGeometry.ConvexHull.R3.Naive","link":"hgeometry/HGeometry-ConvexHull-R3-Naive.html#v:lowerHull-39-"},{"display_html":"lowerHullAll :: (Ord r, Fractional r, Show r, Point_ point 3 r) => NonEmpty point -> ConvexHull point","name":"lowerHullAll","module":"HGeometry.ConvexHull.R3.Naive","link":"hgeometry/HGeometry-ConvexHull-R3-Naive.html#v:lowerHullAll"},{"display_html":"isValidTriangle :: (Num r, Ord r, Point_ point 3 r) => Triangle point -> [point] -> Maybe point","name":"isValidTriangle","module":"HGeometry.ConvexHull.R3.Naive","link":"hgeometry/HGeometry-ConvexHull-R3-Naive.html#v:isValidTriangle"},{"display_html":"upperHalfSpaceOf :: (Ord r, Num r, Point_ point 3 r) => Triangle point -> HalfSpace 3 r","name":"upperHalfSpaceOf","module":"HGeometry.ConvexHull.R3.Naive","link":"hgeometry/HGeometry-ConvexHull-R3-Naive.html#v:upperHalfSpaceOf"},{"display_html":"data Camera r = Camera !(Point 3 r) !(Vector 3 r) !(Vector 3 r) !r !r !r !(Vector 2 r)","name":"Camera Camera","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#t:Camera"},{"display_html":"cameraPosition :: Lens' (Camera r) (Point 3 r)","name":"cameraPosition","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:cameraPosition"},{"display_html":"rawCameraNormal :: Lens' (Camera r) (Vector 3 r)","name":"rawCameraNormal","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:rawCameraNormal"},{"display_html":"rawViewUp :: Lens' (Camera r) (Vector 3 r)","name":"rawViewUp","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:rawViewUp"},{"display_html":"viewPlaneDepth :: Lens' (Camera r) r","name":"viewPlaneDepth","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:viewPlaneDepth"},{"display_html":"nearDist :: Lens' (Camera r) r","name":"nearDist","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:nearDist"},{"display_html":"farDist :: Lens' (Camera r) r","name":"farDist","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:farDist"},{"display_html":"screenDimensions :: Lens' (Camera r) (Vector 2 r)","name":"screenDimensions","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:screenDimensions"},{"display_html":"cameraNormal :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"cameraNormal","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:cameraNormal"},{"display_html":"viewUp :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"viewUp","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:viewUp"},{"display_html":"cameraTransform :: Fractional r => Camera r -> Transformation 3 r","name":"cameraTransform","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:cameraTransform"},{"display_html":"worldToView :: Fractional r => Camera r -> Transformation 3 r","name":"worldToView","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:worldToView"},{"display_html":"toViewPort :: Fractional r => Camera r -> Transformation 3 r","name":"toViewPort","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:toViewPort"},{"display_html":"perspectiveProjection :: Fractional r => Camera r -> Transformation 3 r","name":"perspectiveProjection","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:perspectiveProjection"},{"display_html":"rotateCoordSystem :: Num r => Camera r -> Transformation 3 r","name":"rotateCoordSystem","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:rotateCoordSystem"},{"display_html":"flipAxes :: Num r => Transformation 3 r","name":"flipAxes","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:flipAxes"},{"display_html":"data IntervalTree interval r","name":"IntervalTree","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#t:IntervalTree"},{"display_html":"createTree :: (Foldable f, Ord r) => f r -> IntervalTree interval r","name":"createTree","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:createTree"},{"display_html":"fromIntervals :: (Foldable f, Ord r, ClosedInterval_ interval r) => f interval -> IntervalTree interval r","name":"fromIntervals","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:fromIntervals"},{"display_html":"insert :: (Ord r, ClosedInterval_ interval r) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"insert","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:insert"},{"display_html":"delete :: (Ord r, ClosedInterval_ interval r, Eq interval) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"delete","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:delete"},{"display_html":"stab :: Ord r => r -> IntervalTree interval r -> [interval]","name":"stab","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:stab"},{"display_html":"search :: Ord r => r -> IntervalTree interval r -> [interval]","name":"search","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:search"},{"display_html":"listIntervals :: IntervalTree interval r -> [interval]","name":"listIntervals","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:listIntervals"},{"display_html":"intersections :: (Ord r, Fractional r, LineSegment_ lineSegment point, Eq lineSegment, Point_ point 2 r, IntersectConstraints lineSegment, Foldable f) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:intersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:Intersections"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:OrdArounds"},{"display_html":"intersections :: forall lineSegment point r f. (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, HasOnSegment lineSegment 2, IntersectConstraints lineSegment, Foldable f, Functor f, StartPointOf lineSegment ~ EndPointOf lineSegment) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersections"},{"display_html":"interiorIntersections :: (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, IntersectConstraints lineSegment, StartPointOf lineSegment ~ EndPointOf lineSegment, HasOnSegment lineSegment 2, Foldable f, Functor f) => f lineSegment -> Intersections r lineSegment","name":"interiorIntersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorIntersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Intersections"},{"display_html":"intersectionPoints :: Intersections r lineSegment -> Set (Point 2 r)","name":"intersectionPoints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoints"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:OrdArounds"},{"display_html":"type PlaneGraph k v e = Map k (Map e k, v)","name":"PlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:PlaneGraph"},{"display_html":"newtype E r = E (Vector 2 r)","name":"E E","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:E"},{"display_html":"toPlaneGraph :: (Plane_ plane r, Num r, Ord r) => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r)","name":"toPlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html#v:toPlaneGraph"},{"display_html":"intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r)","name":"intersectionPoint","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:intersectionPoint"},{"display_html":"intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r)","name":"intersectionLine","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:intersectionLine"},{"display_html":"intersectionVector :: (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r)","name":"intersectionVector","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:intersectionVector"},{"display_html":"type MinimizationDiagram r plane = Map plane (Region r (Point 2 r))","name":"MinimizationDiagram","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:MinimizationDiagram"},{"display_html":"data Region r point","name":"Region Bounded Unbounded","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:Region"},{"display_html":"type CircularList a = [a]","name":"CircularList","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:CircularList"},{"display_html":"fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) => VertexForm r plane -> MinimizationDiagram r plane","name":"fromVertexForm","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:fromVertexForm"},{"display_html":"data Definers plane","name":"Definers","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:Definers"},{"display_html":"fromCCWList :: [plane] -> Definers plane","name":"fromCCWList","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:fromCCWList"},{"display_html":"definers :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r, Definers plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:definers"},{"display_html":"mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane","name":"mergeDefiners","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:mergeDefiners"},{"display_html":"type VertexForm r plane = Map (Point 3 r) (Definers plane)","name":"VertexForm","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:VertexForm"},{"display_html":"bruteForceLowerEnvelope :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> MinimizationDiagram r plane","name":"bruteForceLowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:bruteForceLowerEnvelope"},{"display_html":"computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane","name":"computeVertexForm","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:computeVertexForm"},{"display_html":"newtype VertexForm plane = VertexForm (Map (Point 3 (NumType plane)) (Definers plane))","name":"VertexForm VertexForm","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#t:VertexForm"},{"display_html":"hasVertices :: VertexForm plane -> Bool","name":"hasVertices","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:hasVertices"},{"display_html":"vertices' :: IndexedTraversal' (VertexIx (VertexForm plane)) (VertexForm plane) (Vertex (VertexForm plane))","name":"vertices'","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:vertices-39-"},{"display_html":"singleton :: LEVertex plane -> VertexForm plane","name":"singleton","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:singleton"},{"display_html":"type LEVertex = BoundedVertexF (Const ())","name":"LEVertex","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#t:LEVertex"},{"display_html":"pattern LEVertex :: Point 3 (NumType plane) -> Definers plane -> LEVertex plane","name":"LEVertex","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:LEVertex"},{"display_html":"type Definers plane = Set plane","name":"Definers","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#t:Definers"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:location2"},{"display_html":"intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r)","name":"intersectionLine","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:intersectionLine"},{"display_html":"intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r)","name":"intersectionPoint","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html#v:intersectionPoint"},{"display_html":"data LowerEnvelope' plane = LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane))","name":"LowerEnvelope' LowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:LowerEnvelope-39-"},{"display_html":"theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane)","name":"theUnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:theUnboundedVertex"},{"display_html":"boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane))","name":"boundedVertices","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:boundedVertices"},{"display_html":"singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane","name":"singleton","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:singleton"},{"display_html":"fromVertexForm' :: forall plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r) => VertexForm plane -> LowerEnvelope' plane","name":"fromVertexForm'","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:fromVertexForm-39-"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:location2"},{"display_html":"newtype UnboundedVertex plane = UnboundedVertex (Seq (LEEdge plane))","name":"UnboundedVertex UnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:UnboundedVertex"},{"display_html":"unboundedVertexId :: VertexID","name":"unboundedVertexId","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:unboundedVertexId"},{"display_html":"class HasUnboundedEdges t e | t -> e where","name":"HasUnboundedEdges unboundedEdges","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:HasUnboundedEdges"},{"display_html":"type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point)","name":"EdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:EdgeGeometry"},{"display_html":"projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r))","name":"projectedEdgeGeometries","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:projectedEdgeGeometries"},{"display_html":"projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r)","name":"projectedEdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:projectedEdgeGeometry"},{"display_html":"data LowerEnvelope plane","name":"LowerEnvelope ConnectedEnvelope ParallelStrips","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:LowerEnvelope"},{"display_html":"data LowerEnvelope' plane = LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane))","name":"LowerEnvelope' LowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:LowerEnvelope-39-"},{"display_html":"data ParallelPlane plane","name":"ParallelPlane","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:ParallelPlane"},{"display_html":"theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane)","name":"theUnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:theUnboundedVertex"},{"display_html":"boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane))","name":"boundedVertices","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:boundedVertices"},{"display_html":"singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane","name":"singleton","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:singleton"},{"display_html":"fromVertexForm :: forall f plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r, Foldable1 f) => f plane -> VertexForm plane -> LowerEnvelope plane","name":"fromVertexForm","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:fromVertexForm"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:location2"},{"display_html":"newtype UnboundedVertex plane = UnboundedVertex (Seq (LEEdge plane))","name":"UnboundedVertex UnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:UnboundedVertex"},{"display_html":"unboundedVertexId :: VertexID","name":"unboundedVertexId","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:unboundedVertexId"},{"display_html":"class HasUnboundedEdges t e | t -> e where","name":"HasUnboundedEdges unboundedEdges","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:HasUnboundedEdges"},{"display_html":"type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point)","name":"EdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:EdgeGeometry"},{"display_html":"projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r))","name":"projectedEdgeGeometries","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:projectedEdgeGeometries"},{"display_html":"projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r)","name":"projectedEdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:projectedEdgeGeometry"},{"display_html":"lowerEnvelope :: (Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f, Ord plane, Show plane, Show r) => f plane -> LowerEnvelope plane","name":"lowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelope"},{"display_html":"lowerEnvelopeVertexForm :: (Plane_ plane r, Ord r, Fractional r, Foldable f, Ord plane) => f plane -> VertexForm plane","name":"lowerEnvelopeVertexForm","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelopeVertexForm"},{"display_html":"asVertex :: (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) => f plane -> Three plane -> Maybe (LEVertex plane)","name":"asVertex","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html#v:asVertex"},{"display_html":"belowAll :: (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool","name":"belowAll","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html#v:belowAll"},{"display_html":"module HGeometry.Plane.LowerEnvelope.Naive","name":"","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry"},{"display_html":"type VertexID = Int","name":"VertexID","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#t:VertexID"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:location2"},{"display_html":"incidentEdgesB :: Lens (BoundedVertexF f plane) (BoundedVertexF g plane) (f (LEEdge plane)) (g (LEEdge plane))","name":"incidentEdgesB","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:incidentEdgesB"},{"display_html":"traverseBoundedV :: (Traversable f, Applicative g, NumType plane ~ NumType plane', Ord plane') => (plane -> g plane') -> BoundedVertexF f plane -> g (BoundedVertexF f plane')","name":"traverseBoundedV","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:traverseBoundedV"},{"display_html":"data LEEdge plane = Edge !VertexID plane plane","name":"LEEdge Edge","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#t:LEEdge"},{"display_html":"destination :: Getter (LEEdge plane) VertexID","name":"destination","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:destination"},{"display_html":"leftPlane :: Lens' (LEEdge plane) plane","name":"leftPlane","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:leftPlane"},{"display_html":"rightPlane :: Lens' (LEEdge plane) plane","name":"rightPlane","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:rightPlane"},{"display_html":"flipEdge :: VertexID -> LEEdge plane -> LEEdge plane","name":"flipEdge","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:flipEdge"},{"display_html":"module HGeometry.Plane.LowerEnvelope.AdjListForm","name":"","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry"},{"display_html":"type UpperHull point = LowerEnvelope (NonVerticalHyperPlane 3 (NumType point) :+ point)","name":"UpperHull","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"hgeometry/HGeometry-ConvexHull-R3-Naive-Dual.html#t:UpperHull"},{"display_html":"upperHull :: (Point_ point 3 r, Ord r, Fractional r, Foldable1 f, Functor f, Show point, Show r, Ord point) => f point -> UpperHull point","name":"upperHull","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"hgeometry/HGeometry-ConvexHull-R3-Naive-Dual.html#v:upperHull"},{"display_html":"type Facet point = [point]","name":"Facet","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"hgeometry/HGeometry-ConvexHull-R3-Naive-Dual.html#t:Facet"},{"display_html":"facets :: UpperHull point -> [Facet point]","name":"facets","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"hgeometry/HGeometry-ConvexHull-R3-Naive-Dual.html#v:facets"},{"display_html":"class (HasVertices polyLine polyLine, HasPoints' polyLine point, HasStart polyLine point, HasEnd polyLine point, Vertex polyLine ~ point, Point_ point (Dimension point) (NumType point), NumType polyLine ~ NumType point, Dimension polyLine ~ Dimension point) => PolyLine_ polyLine point | polyLine -> point","name":"PolyLine_","module":"HGeometry.PolyLine.Class","link":"hgeometry/HGeometry-PolyLine-Class.html#t:PolyLine_"},{"display_html":"class PolyLine_ polyLine point => ConstructablePolyLine_ polyLine point where","name":"ConstructablePolyLine_ polyLineFromPoints","module":"HGeometry.PolyLine.Class","link":"hgeometry/HGeometry-PolyLine-Class.html#t:ConstructablePolyLine_"},{"display_html":"_PolyLineLineSegment :: (ConstructableLineSegment_ lineSegment point, ConstructablePolyLine_ polyLine point) => Prism' polyLine lineSegment","name":"_PolyLineLineSegment","module":"HGeometry.PolyLine.Class","link":"hgeometry/HGeometry-PolyLine-Class.html#v:_PolyLineLineSegment"},{"display_html":"newtype PolyLineF f point = PolyLine (f point)","name":"PolyLineF PolyLine","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:PolyLineF"},{"display_html":"type PolyLine = PolyLineF NonEmptyVector","name":"PolyLine","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:PolyLine"},{"display_html":"_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') (f point) (f' point')","name":"_PolyLineF","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#v:_PolyLineF"},{"display_html":"module HGeometry.PolyLine.Class","name":"","module":"HGeometry.PolyLine","link":"hgeometry"},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:HasVertices"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:HasEdges"},{"display_html":"frechetDistanceWith :: (HasVertices' polyLine, HasVertices' polyLine', Ord r, VertexIx polyLine ~ Int, VertexIx polyLine' ~ Int) => (Vertex polyLine -> Vertex polyLine' -> r) -> polyLine -> polyLine' -> r","name":"frechetDistanceWith","module":"HGeometry.PolyLine.Frechet.Discrete","link":"hgeometry/HGeometry-PolyLine-Frechet-Discrete.html#v:frechetDistanceWith"},{"display_html":"douglasPeucker :: forall polyLine point d r. (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLineF ViewR1 point","name":"douglasPeucker","module":"HGeometry.PolyLine.Simplification.DouglasPeucker","link":"hgeometry/HGeometry-PolyLine-Simplification-DouglasPeucker.html#v:douglasPeucker"},{"display_html":"simplify :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLine point","name":"simplify","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"hgeometry/HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplify"},{"display_html":"simplifyWith :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r) => (ClosedLineSegment point -> PolyLine point -> Bool) -> polyLine -> PolyLine point","name":"simplifyWith","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"hgeometry/HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplifyWith"},{"display_html":"class HasVertices polygon polygon => HasOuterBoundary polygon where","name":"HasOuterBoundary outerBoundaryVertexAt ccwOuterBoundaryFrom cwOuterBoundaryFrom outerBoundary outerBoundaryEdgeAt outerBoundaryEdges","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasOuterBoundary"},{"display_html":"signedArea2X :: (Num r, HasOuterBoundary simplePolygon, Point_ point 2 r, Vertex simplePolygon ~ point) => simplePolygon -> r","name":"signedArea2X","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:signedArea2X"},{"display_html":"minimumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"minimumVertexBy","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:minimumVertexBy"},{"display_html":"maximumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"maximumVertexBy","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:maximumVertexBy"},{"display_html":"outerBoundaryEdgeSegmentAt :: (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => VertexIx polygon -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegmentAt","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegmentAt"},{"display_html":"outerBoundaryEdgeSegments :: forall polygon point r. (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => IndexedFold1 (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegments","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegments"},{"display_html":"outerBoundaryWithNeighbours :: (HasOuterBoundary polygon, VertexIx polygon ~ Int) => IndexedFold1 (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) polygon (Vertex polygon, (Vertex polygon, Vertex polygon))","name":"outerBoundaryWithNeighbours","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:outerBoundaryWithNeighbours"},{"display_html":"type Hole polygon = SimplePolygonF (HoleF polygon) (Vertex polygon)","name":"Hole","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:Hole"},{"display_html":"class VertexContainer (HoleF polygon) (Vertex polygon) => HasHoles polygon where","name":"HasHoles HoleF HoleIx holes holeAt","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasHoles"},{"display_html":"class (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r, NumType polygon ~ r, Dimension polygon ~ 2, HasHoles polygon) => Polygon_ polygon point r where","name":"Polygon_ ccwPredecessorOf ccwSuccessorOf extremes","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:Polygon_"},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasVertices"},{"display_html":"class HasVertices' graph where","name":"HasVertices' Vertex VertexIx vertexAt numVertices","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasVertices-39-"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasEdges"},{"display_html":"class HasEdges' graph where","name":"HasEdges' Edge EdgeIx edgeAt numEdges","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasEdges-39-"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple.Class","link":"hgeometry/HGeometry-Polygon-Simple-Class.html#t:SimplePolygon_"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex.Class","link":"hgeometry/HGeometry-Polygon-Convex-Class.html#t:ConvexPolygon_"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:SimplePolygon_"},{"display_html":"type SimplePolygon = SimplePolygonF (Cyclic NonEmptyVector)","name":"SimplePolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:SimplePolygon"},{"display_html":"newtype SimplePolygonF f point = MkSimplePolygon (f point)","name":"SimplePolygonF MkSimplePolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:SimplePolygonF"},{"display_html":"toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point","name":"toCyclic","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#v:toCyclic"},{"display_html":"type VertexContainer f point = (IxValue (f point) ~ point, Index (f point) ~ Int, TraversableWithIndex Int f, Traversable1 f, Ixed (f point), HasDirectedTraversals f)","name":"VertexContainer","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:VertexContainer"},{"display_html":"class HasInPolygon polygon point r | polygon -> point, point -> r where","name":"HasInPolygon inPolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:HasInPolygon"},{"display_html":"inSimplePolygon :: forall queryPoint simplePolygon point r. (Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r, SimplePolygon_ simplePolygon point r) => queryPoint -> simplePolygon -> PointLocationResultWith (VertexIx simplePolygon)","name":"inSimplePolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#v:inSimplePolygon"},{"display_html":"hasNoSelfIntersections :: forall f point r. (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) => f point -> Bool","name":"hasNoSelfIntersections","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#v:hasNoSelfIntersections"},{"display_html":"module HGeometry.Polygon.Simple.Class","name":"","module":"HGeometry.Polygon.Simple","link":"hgeometry"},{"display_html":"class (PlanarGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex), NumType vertex ~ NumType planeGraph) => PlaneGraph_ planeGraph vertex | planeGraph -> vertex where","name":"PlaneGraph_ fromEmbedding interiorFaces outerFace outerFaceDart outerFaceId","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#t:PlaneGraph_"},{"display_html":"dartSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => DartIx planeGraph -> IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:dartSegmentAt"},{"display_html":"edgeSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => EdgeIx planeGraph -> IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:edgeSegmentAt"},{"display_html":"dartSegments :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegments","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:dartSegments"},{"display_html":"edgeSegments :: forall planeGraph vertex. (HasEdges planeGraph planeGraph, BidirGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex)) => IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegments","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:edgeSegments"},{"display_html":"interiorFacePolygonAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => FaceIx planeGraph -> IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygonAt","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:interiorFacePolygonAt"},{"display_html":"interiorFacePolygons :: forall planeGraph vertex r. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 r, Ord r, Num r, Eq (FaceIx planeGraph)) => IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygons","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:interiorFacePolygons"},{"display_html":"module Hiraffe.Graph.Class","name":"","module":"HGeometry.PlaneGraph","link":"hgeometry"},{"display_html":"module HGeometry.PlaneGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":"hgeometry"},{"display_html":"module Hiraffe.PlanarGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":"hgeometry"},{"display_html":"newtype PlaneGraph s v e f = PlaneGraph (PlanarGraph s Primal v e f)","name":"PlaneGraph PlaneGraph","module":"HGeometry.PlaneGraph","link":"hgeometry/HGeometry-PlaneGraph.html#t:PlaneGraph"},{"display_html":"type MonotonePolygon point = MonotonePolygonF (SimplePolygon point)","name":"MonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#t:MonotonePolygon"},{"display_html":"data MonotonePolygonF simplePolygon","name":"MonotonePolygonF","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#t:MonotonePolygonF"},{"display_html":"monotoneDirection :: MonotonePolygonF simplePolygon -> Vector 2 (NumType simplePolygon)","name":"monotoneDirection","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:monotoneDirection"},{"display_html":"toSimplePolygon :: MonotonePolygonF simplePolygon -> simplePolygon","name":"toSimplePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:toSimplePolygon"},{"display_html":"asMonotonePolygon :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Maybe (MonotonePolygonF simplePolygon)","name":"asMonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:asMonotonePolygon"},{"display_html":"uncheckedMontonePolygon :: SimplePolygon_ simplePolygon point r => Vector 2 r -> simplePolygon -> MonotonePolygonF simplePolygon","name":"uncheckedMontonePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:uncheckedMontonePolygon"},{"display_html":"randomMonotone :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> m (MonotonePolygon (Point 2 r))","name":"randomMonotone","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:randomMonotone"},{"display_html":"randomMonotoneDirected :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r))","name":"randomMonotoneDirected","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:randomMonotoneDirected"},{"display_html":"isMonotone :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Bool","name":"isMonotone","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:isMonotone"},{"display_html":"randomNonZeroVector :: (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) => m (Vector 2 r)","name":"randomNonZeroVector","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:randomNonZeroVector"},{"display_html":"leftTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"leftTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:leftTangent"},{"display_html":"rightTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"rightTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:rightTangent"},{"display_html":"lowerTangent :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"lowerTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent"},{"display_html":"lowerTangent' :: forall point r f. (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"lowerTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent-39-"},{"display_html":"upperTangent :: forall convexPolygon point r. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"upperTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:upperTangent"},{"display_html":"upperTangent' :: (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"upperTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:upperTangent-39-"},{"display_html":"randomConvex :: (MonadState g m, RandomGen g) => Int -> Int -> m (ConvexPolygon (Point 2 Rational))","name":"randomConvex","module":"HGeometry.Polygon.Convex.Random","link":"hgeometry/HGeometry-Polygon-Convex-Random.html#v:randomConvex"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#t:ConvexPolygon_"},{"display_html":"type ConvexPolygon = ConvexPolygonF (Cyclic NonEmptyVector)","name":"ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#t:ConvexPolygon"},{"display_html":"data ConvexPolygonF f point","name":"ConvexPolygonF","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#t:ConvexPolygonF"},{"display_html":"fromSimplePolygon :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Maybe (ConvexPolygonF f point)","name":"fromSimplePolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:fromSimplePolygon"},{"display_html":"toSimplePolygon :: ConvexPolygonF f point -> SimplePolygonF f point","name":"toSimplePolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:toSimplePolygon"},{"display_html":"_ConvexPolygon :: forall f point r. (Num r, Ord r, Point_ point 2 r, VertexContainer f point) => Prism' (SimplePolygonF f point) (ConvexPolygonF f point)","name":"_ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:_ConvexPolygon"},{"display_html":"isStrictlyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isStrictlyConvex","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:isStrictlyConvex"},{"display_html":"isConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isConvex","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:isConvex"},{"display_html":"verifyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => ConvexPolygonF f point -> Bool","name":"verifyConvex","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:verifyConvex"},{"display_html":"minkowskiSum :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r, ConvexPolygon_ convexPolygon' point' r) => convexPolygon -> convexPolygon' -> ConvexPolygon (point :+ point')","name":"minkowskiSum","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:minkowskiSum"},{"display_html":"maxInDirection :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => Vector 2 r -> convexPolygon -> point","name":"maxInDirection","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:maxInDirection"},{"display_html":"convexHull :: (Ord r, Fractional r, Show r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.QuickHull","link":"hgeometry/HGeometry-ConvexHull-QuickHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:convexHull"},{"display_html":"upperHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:upperHull"},{"display_html":"upperHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull"},{"display_html":"lowerHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull-39-"},{"display_html":"steepestCcwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCcwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:steepestCcwFrom"},{"display_html":"steepestCwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:steepestCwFrom"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHull"},{"display_html":"upperHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:lowerHull"},{"display_html":"lowerHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:lowerHull-39-"},{"display_html":"upperHullFromSorted :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted"},{"display_html":"upperHullFromSorted' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted'","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted-39-"},{"display_html":"newtype LowerEnvelopeF f vertex line = LowerEnvelope (Alternating f vertex line)","name":"LowerEnvelopeF LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#t:LowerEnvelopeF"},{"display_html":"type LowerEnvelope = LowerEnvelopeF Vector","name":"LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#t:LowerEnvelope"},{"display_html":"_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') (Alternating f vertex line) (Alternating f' vertex' line')","name":"_Alternating","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:_Alternating"},{"display_html":"lowerEnvelope :: forall g f line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, Functor f, IsIntersectableWith line line, Intersection line line ~ Maybe (LineLineIntersection line), HasFromFoldable g) => f line -> LowerEnvelopeF g (Point 2 r) line","name":"lowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:lowerEnvelope"},{"display_html":"lineAt :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> line","name":"lineAt","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:lineAt"},{"display_html":"lookupLEVertex :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line)","name":"lookupLEVertex","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:lookupLEVertex"},{"display_html":"data CommonIntersection halfPlane r","name":"CommonIntersection BoundedRegion EmptyIntersection InSubLine SingletonPoint Slab UnboundedRegion","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#t:CommonIntersection"},{"display_html":"data SubLine halfPlane r","name":"SubLine EntireLine InHalfLine InSegment","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#t:SubLine"},{"display_html":"newtype Chain f halfPlane r = Chain (Alternating f (Point 2 r) halfPlane)","name":"Chain Chain","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#t:Chain"},{"display_html":"commonIntersection :: forall f halfPlane r. (Foldable1 f, Functor f, HalfPlane_ halfPlane r, Fractional r, Ord r, Show halfPlane, Show r) => f halfPlane -> CommonIntersection halfPlane r","name":"commonIntersection","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#v:commonIntersection"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull","link":"hgeometry/HGeometry-ConvexHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"hgeometry/HGeometry-ConvexHull-DivideAndConquer.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"hgeometry/HGeometry-ConvexHull-DivideAndConquer.html#v:upperHull"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"hgeometry/HGeometry-ConvexHull-DivideAndConquer.html#v:lowerHull"},{"display_html":"module HGeometry.Polygon.Class","name":"","module":"HGeometry.Polygon","link":"hgeometry"},{"display_html":"asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point)","name":"asTriangle","module":"HGeometry.Polygon","link":"hgeometry/HGeometry-Polygon.html#v:asTriangle"},{"display_html":"area2X :: (Polygon_ polygon point r, Num r, Point_ point 2 r, SimplePolygon_ (Hole polygon) point r) => polygon -> r","name":"area2X","module":"HGeometry.Polygon","link":"hgeometry/HGeometry-Polygon.html#v:area2X"},{"display_html":"area :: (Polygon_ polygon point r, SimplePolygon_ (Hole polygon) point r, Fractional r) => polygon -> r","name":"area","module":"HGeometry.Polygon","link":"hgeometry/HGeometry-Polygon.html#v:area"},{"display_html":"convexHull :: forall polygon point r. (Polygon_ polygon point r, Ord r, Num r) => polygon -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.Melkman","link":"hgeometry/HGeometry-ConvexHull-Melkman.html#v:convexHull"},{"display_html":"type YMonotonePolygon_ = SimplePolygon_","name":"YMonotonePolygon_","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-TriangulateMonotone.html#t:YMonotonePolygon_"},{"display_html":"triangulate :: forall s yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:triangulate"},{"display_html":"computeDiagonals :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> [Diagonal yMonotonePolygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:computeDiagonals"},{"display_html":"makeMonotone :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"makeMonotone","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:makeMonotone"},{"display_html":"computeDiagonals :: (Polygon_ polygon point r, Point_ point 2 r, Ord r, Num r, Ord (VertexIx polygon)) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:computeDiagonals"},{"display_html":"classifyVertices :: (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> [(VertexIx polygon, VertexType)]","name":"classifyVertices","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:classifyVertices"},{"display_html":"data VertexType","name":"VertexType Start Split End Merge Regular","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#t:VertexType"},{"display_html":"cmpX :: (Point_ point 2 r, LineSegment_ lineSegment point', Point_ point' 2 r, Ord r, Num r) => point -> lineSegment -> Ordering","name":"cmpX","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:cmpX"},{"display_html":"triangulate :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#v:triangulate"},{"display_html":"computeDiagonals :: forall polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#v:computeDiagonals"},{"display_html":"data PolygonEdgeType","name":"PolygonEdgeType Diagonal Original","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#t:PolygonEdgeType"},{"display_html":"data PolygonFaceData","name":"PolygonFaceData Outside Inside","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#t:PolygonFaceData"},{"display_html":"type Diagonal polygon = Vector 2 (VertexIx polygon)","name":"Diagonal","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#t:Diagonal"},{"display_html":"samplePolygon :: (SimplePolygon_ polygon point r, Ord r, Real r, UniformRange r, StatefulGen g m) => polygon -> g -> m (Point 2 Double)","name":"samplePolygon","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:samplePolygon"},{"display_html":"samplePolygons :: (SimplePolygon_ polygon point r, StatefulGen g m, Foldable1 nonEmpty, Real r, Ord r, UniformRange r) => nonEmpty polygon -> g -> m (Point 2 Double)","name":"samplePolygons","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:samplePolygons"},{"display_html":"data Sampler w v","name":"Sampler","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#t:Sampler"},{"display_html":"samplePoint :: (Point_ point 2 r, StatefulGen g m, Real r, Ord r, UniformRange r) => Sampler r (Triangle point) -> g -> m (Point 2 Double)","name":"samplePoint","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:samplePoint"},{"display_html":"triangleSampler :: (SimplePolygon_ polygon point r, Num r, Ord r, Foldable1 nonEmpty) => nonEmpty polygon -> Sampler r (Triangle point)","name":"triangleSampler","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:triangleSampler"},{"display_html":"visibilityGraph :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraph","module":"HGeometry.Polygon.Visibility.Naive","link":"hgeometry/HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraph"},{"display_html":"visibilityGraphWith :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraphWith","module":"HGeometry.Polygon.Visibility.Naive","link":"hgeometry/HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraphWith"},{"display_html":"data PolygonalDomainF (h :: Type -> Type) (f :: Type -> Type) (point :: Type) = PolygonalDomain (SimplePolygonF f point) (h (SimplePolygonF f point))","name":"PolygonalDomainF PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#t:PolygonalDomainF"},{"display_html":"type PolygonalDomain point = PolygonalDomainF Vector (Cyclic NonEmptyVector) point","name":"PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#t:PolygonalDomain"},{"display_html":"asSimplePolygon :: (HasFromFoldable h, HoleContainer h f point) => Prism' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"asSimplePolygon","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#v:asSimplePolygon"},{"display_html":"outerBoundaryPolygon :: Lens' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"outerBoundaryPolygon","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#v:outerBoundaryPolygon"},{"display_html":"theHoles :: Lens (PolygonalDomainF h f point) (PolygonalDomainF h' f point) (h (SimplePolygonF f point)) (h' (SimplePolygonF f point))","name":"theHoles","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#v:theHoles"},{"display_html":"type HoleContainer h f point = (TraversableWithIndex Int h, Index (h (SimplePolygonF f point)) ~ Int, IxValue (h (SimplePolygonF f point)) ~ SimplePolygonF f point, Ixed (h (SimplePolygonF f point)), VertexContainer f point)","name":"HoleContainer","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#t:HoleContainer"},{"display_html":"class HasCanonicalSubSet s t a f g | s -> f, t -> g where","name":"HasCanonicalSubSet canonicalSubSet","module":"HGeometry.SegmentTree.CanonicalSubSet","link":"hgeometry/HGeometry-SegmentTree-CanonicalSubSet.html#t:HasCanonicalSubSet"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:ascEndPoints"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:ascEndPoints"},{"display_html":"data RangeTree f point","name":"RangeTree","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#t:RangeTree"},{"display_html":"buildRangeTree :: (Foldable1 g, Point_ point d r, Ord r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"buildRangeTree","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:buildRangeTree"},{"display_html":"fromAscList :: (Foldable1 g, Functor g, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"fromAscList","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:fromAscList"},{"display_html":"fromGroupedAscList :: (Foldable1 g, Foldable1 h, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g (h point) -> RangeTree f point","name":"fromGroupedAscList","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:fromGroupedAscList"},{"display_html":"rangeQuery :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) => interval -> RangeTree f point -> [f point]","name":"rangeQuery","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:rangeQuery"},{"display_html":"query :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r, Monoid (f point)) => interval -> RangeTree f point -> f point","name":"query","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:query"},{"display_html":"module HGeometry.RangeTree.Base","name":"","module":"HGeometry.RangeTree","link":"hgeometry"},{"display_html":"type VerticalRayShootingStructure lineSegment = VerticalRayShootingStructure' (NumType lineSegment) lineSegment","name":"VerticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#t:VerticalRayShootingStructure"},{"display_html":"type StatusStructure lineSegment = Set lineSegment","name":"StatusStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#t:StatusStructure"},{"display_html":"verticalRayShootingStructure :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, Foldable1 f) => f lineSegment -> VerticalRayShootingStructure lineSegment","name":"verticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:verticalRayShootingStructure"},{"display_html":"segmentAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAbove"},{"display_html":"segmentAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAboveOrOn"},{"display_html":"findSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment)","name":"findSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:findSlab"},{"display_html":"lookupAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAbove"},{"display_html":"lookupAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAboveOrOn"},{"display_html":"searchInSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, HasSupportingLine lineSegment, Num r) => (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment","name":"searchInSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:searchInSlab"},{"display_html":"module HGeometry.VerticalRayShooting.PersistentSweep","name":"","module":"HGeometry.VerticalRayShooting","link":"hgeometry"},{"display_html":"data VoronoiDiagram point","name":"VoronoiDiagram AllColinear ConnectedVD","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#t:VoronoiDiagram"},{"display_html":"newtype VoronoiDiagram' point = VoronoiDiagram (LowerEnvelope' (Plane (NumType point) :+ point))","name":"VoronoiDiagram' VoronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#t:VoronoiDiagram-39-"},{"display_html":"voronoiDiagram :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r) => f point -> VoronoiDiagram point","name":"voronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#v:voronoiDiagram"},{"display_html":"voronoiVertices :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable f) => f point -> [Point 2 r]","name":"voronoiVertices","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#v:voronoiVertices"},{"display_html":"edgeGeometries :: (Point_ point 2 r, Ord r, Fractional r, Show point, Show r) => Fold (VoronoiDiagram' point) (EdgeGeometry (Point 2 r))","name":"edgeGeometries","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#v:edgeGeometries"},{"display_html":"type GeoPositionWithoutCRS' = PointXY :+ Maybe RestGeoPosition","name":"GeoPositionWithoutCRS'","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#t:GeoPositionWithoutCRS-39-"},{"display_html":"data RestGeoPosition","name":"RestGeoPosition Z ZM","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#t:RestGeoPosition"},{"display_html":"_GeoPositionWithoutCRS :: Prism' GeoPositionWithoutCRS (PointXY :+ Maybe RestGeoPosition)","name":"_GeoPositionWithoutCRS","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#v:_GeoPositionWithoutCRS"},{"display_html":"_GeoPolygonPolygonalDomain :: Iso' GeoPolygon GeoPolygonalDomain","name":"_GeoPolygonPolygonalDomain","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#v:_GeoPolygonPolygonalDomain"},{"display_html":"ipeRenderWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeRenderWith","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#v:ipeRenderWith"},{"display_html":"ipeRender :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeRender","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#v:ipeRender"},{"display_html":"data FileType","name":"FileType SVG PDF PNG EPS","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:FileType"},{"display_html":"data Options = Options {}","name":"Options crop viewNumber pageNumber transparent resolution Options","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#v:defaultOptions"},{"display_html":"data Background","name":"Background OpaqueBackground TransparentBackground","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:Background"},{"display_html":"data Crop","name":"Crop Crop NoCrop","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:Crop"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Layer","link":"hgeometry/ipe/Ipe-Layer.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Layer","link":"hgeometry/ipe/Ipe-Layer.html#v:layerName"},{"display_html":"literally :: String -> Q Exp","name":"literally","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:literally"},{"display_html":"lit :: QuasiQuoter","name":"lit","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:lit"},{"display_html":"litFile :: QuasiQuoter","name":"litFile","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:litFile"},{"display_html":"xmlLiteral :: String -> Node Text Text","name":"xmlLiteral","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:xmlLiteral"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#t:PathSegment"},{"display_html":"_PolyLineSegment :: forall r. Prism' (PathSegment r) (PolyLine (Point 2 r))","name":"_PolyLineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_PolyLineSegment"},{"display_html":"_PolygonPath :: forall r. Prism' (PathSegment r) (SimplePolygon (Point 2 r))","name":"_PolygonPath","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_PolygonPath"},{"display_html":"_CubicBezierSegment :: forall r. Prism' (PathSegment r) (CubicBezier (Point 2 r))","name":"_CubicBezierSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_CubicBezierSegment"},{"display_html":"_QuadraticBezierSegment :: forall r. Prism' (PathSegment r) (QuadraticBezier (Point 2 r))","name":"_QuadraticBezierSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_QuadraticBezierSegment"},{"display_html":"_EllipseSegment :: forall r. Prism' (PathSegment r) (Ellipse r)","name":"_EllipseSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_EllipseSegment"},{"display_html":"_ArcSegment :: forall r. Prism' (PathSegment r) ()","name":"_ArcSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ArcSegment"},{"display_html":"_SplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_SplineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_SplineSegment"},{"display_html":"_ClosedSplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_ClosedSplineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ClosedSplineSegment"},{"display_html":"data Operation r","name":"Operation Ellipse MoveTo LineTo ArcTo Spline ClosedSpline ClosePath CurveTo QCurveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#t:Operation"},{"display_html":"_MoveTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_MoveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_MoveTo"},{"display_html":"_LineTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_LineTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_LineTo"},{"display_html":"_CurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r, Point 2 r)","name":"_CurveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_CurveTo"},{"display_html":"_QCurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r)","name":"_QCurveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_QCurveTo"},{"display_html":"_Ellipse :: forall r. Prism' (Operation r) (Matrix 3 3 r)","name":"_Ellipse","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_Ellipse"},{"display_html":"_ArcTo :: forall r. Prism' (Operation r) (Matrix 3 3 r, Point 2 r)","name":"_ArcTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ArcTo"},{"display_html":"_Spline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_Spline","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_Spline"},{"display_html":"_ClosedSpline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_ClosedSpline","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ClosedSpline"},{"display_html":"_ClosePath :: forall r. Prism' (Operation r) ()","name":"_ClosePath","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ClosePath"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#t:Coordinate"},{"display_html":"readCoordinate :: Coordinate r => Text -> Either Text r","name":"readCoordinate","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readCoordinate"},{"display_html":"readPoint :: Coordinate r => Text -> Either Text (Point 2 r)","name":"readPoint","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readPoint"},{"display_html":"readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r)","name":"readMatrix","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readMatrix"},{"display_html":"readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r))","name":"readRectangle","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readRectangle"},{"display_html":"runParser :: Parser a -> Text -> Either Text a","name":"runParser","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:runParser"},{"display_html":"readPathOperations :: Coordinate r => Text -> Either Text [Operation r]","name":"readPathOperations","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readPathOperations"},{"display_html":"pOperation :: forall r. Coordinate r => Parser (Operation r)","name":"pOperation","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:pOperation"},{"display_html":"pPoint :: Coordinate r => Parser (Point 2 r)","name":"pPoint","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:pPoint"},{"display_html":"pCoordinate :: Coordinate r => Parser r","name":"pCoordinate","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:pCoordinate"},{"display_html":"data IpeValue v","name":"IpeValue Valued Named","module":"Ipe.Value","link":"hgeometry/ipe/Ipe-Value.html#t:IpeValue"},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:named"},{"display_html":"basicNamedColors :: [IpeColor r]","name":"basicNamedColors","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:basicNamedColors"},{"display_html":"black :: IpeColor r","name":"black","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:black"},{"display_html":"white :: IpeColor r","name":"white","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:white"},{"display_html":"red :: IpeColor r","name":"red","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:red"},{"display_html":"green :: IpeColor r","name":"green","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:green"},{"display_html":"blue :: IpeColor r","name":"blue","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:blue"},{"display_html":"yellow :: IpeColor r","name":"yellow","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:yellow"},{"display_html":"orange :: IpeColor r","name":"orange","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:orange"},{"display_html":"gold :: IpeColor r","name":"gold","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:gold"},{"display_html":"purple :: IpeColor r","name":"purple","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:purple"},{"display_html":"gray :: IpeColor r","name":"gray","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:gray"},{"display_html":"brown :: IpeColor r","name":"brown","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:brown"},{"display_html":"navy :: IpeColor r","name":"navy","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:navy"},{"display_html":"pink :: IpeColor r","name":"pink","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:pink"},{"display_html":"seagreen :: IpeColor r","name":"seagreen","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:seagreen"},{"display_html":"turquoise :: IpeColor r","name":"turquoise","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:turquoise"},{"display_html":"violet :: IpeColor r","name":"violet","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:violet"},{"display_html":"darkblue :: IpeColor r","name":"darkblue","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkblue"},{"display_html":"darkcyan :: IpeColor r","name":"darkcyan","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkcyan"},{"display_html":"darkgray :: IpeColor r","name":"darkgray","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkgray"},{"display_html":"darkgreen :: IpeColor r","name":"darkgreen","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkgreen"},{"display_html":"darkmagenta :: IpeColor r","name":"darkmagenta","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkmagenta"},{"display_html":"darkorange :: IpeColor r","name":"darkorange","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkorange"},{"display_html":"darkred :: IpeColor r","name":"darkred","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkred"},{"display_html":"lightblue :: IpeColor r","name":"lightblue","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightblue"},{"display_html":"lightcyan :: IpeColor r","name":"lightcyan","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightcyan"},{"display_html":"lightgray :: IpeColor r","name":"lightgray","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightgray"},{"display_html":"lightgreen :: IpeColor r","name":"lightgreen","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightgreen"},{"display_html":"lightyellow :: IpeColor r","name":"lightyellow","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightyellow"},{"display_html":"data AttributeUniverse","name":"AttributeUniverse HAlign VAlign Height Gradient Tiling Opacity StrokeOpacity RArrow FillRule LineJoin LineCap Dash Pen Fill Stroke Transformations Pin Layer Matrix Width Depth Style Size Arrow Clip","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:AttributeUniverse"},{"display_html":"type family LayerSym0 :: AttributeUniverse where ...","name":"LayerSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:LayerSym0"},{"display_html":"type family MatrixSym0 :: AttributeUniverse where ...","name":"MatrixSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:MatrixSym0"},{"display_html":"type family PinSym0 :: AttributeUniverse where ...","name":"PinSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PinSym0"},{"display_html":"type family TransformationsSym0 :: AttributeUniverse where ...","name":"TransformationsSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TransformationsSym0"},{"display_html":"type family StrokeSym0 :: AttributeUniverse where ...","name":"StrokeSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:StrokeSym0"},{"display_html":"type family FillSym0 :: AttributeUniverse where ...","name":"FillSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:FillSym0"},{"display_html":"type family PenSym0 :: AttributeUniverse where ...","name":"PenSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PenSym0"},{"display_html":"type family SizeSym0 :: AttributeUniverse where ...","name":"SizeSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:SizeSym0"},{"display_html":"type family DashSym0 :: AttributeUniverse where ...","name":"DashSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:DashSym0"},{"display_html":"type family LineCapSym0 :: AttributeUniverse where ...","name":"LineCapSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:LineCapSym0"},{"display_html":"type family LineJoinSym0 :: AttributeUniverse where ...","name":"LineJoinSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:LineJoinSym0"},{"display_html":"type family FillRuleSym0 :: AttributeUniverse where ...","name":"FillRuleSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:FillRuleSym0"},{"display_html":"type family ArrowSym0 :: AttributeUniverse where ...","name":"ArrowSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:ArrowSym0"},{"display_html":"type family RArrowSym0 :: AttributeUniverse where ...","name":"RArrowSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:RArrowSym0"},{"display_html":"type family StrokeOpacitySym0 :: AttributeUniverse where ...","name":"StrokeOpacitySym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:StrokeOpacitySym0"},{"display_html":"type family OpacitySym0 :: AttributeUniverse where ...","name":"OpacitySym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:OpacitySym0"},{"display_html":"type family TilingSym0 :: AttributeUniverse where ...","name":"TilingSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TilingSym0"},{"display_html":"type family GradientSym0 :: AttributeUniverse where ...","name":"GradientSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:GradientSym0"},{"display_html":"type family WidthSym0 :: AttributeUniverse where ...","name":"WidthSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:WidthSym0"},{"display_html":"type family HeightSym0 :: AttributeUniverse where ...","name":"HeightSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:HeightSym0"},{"display_html":"type family DepthSym0 :: AttributeUniverse where ...","name":"DepthSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:DepthSym0"},{"display_html":"type family VAlignSym0 :: AttributeUniverse where ...","name":"VAlignSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:VAlignSym0"},{"display_html":"type family HAlignSym0 :: AttributeUniverse where ...","name":"HAlignSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:HAlignSym0"},{"display_html":"type family StyleSym0 :: AttributeUniverse where ...","name":"StyleSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:StyleSym0"},{"display_html":"type family ClipSym0 :: AttributeUniverse where ...","name":"ClipSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:ClipSym0"},{"display_html":"data SAttributeUniverse :: AttributeUniverse -> Type where","name":"SAttributeUniverse SClip SStyle SHAlign SVAlign SDepth SHeight SWidth SGradient STiling SOpacity SStrokeOpacity SRArrow SArrow SFillRule SLineJoin SLineCap SDash SSize SPen SFill SStroke STransformations SPin SMatrix SLayer","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:SAttributeUniverse"},{"display_html":"type CommonAttributes = [Layer, Matrix, Pin, Transformations]","name":"CommonAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:CommonAttributes"},{"display_html":"type TextAttributes = CommonAttributes ++ [Stroke, Size, Width, Height, Depth, VAlign, HAlign, Style, Opacity]","name":"TextAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TextAttributes"},{"display_html":"type TextLabelAttributes = TextAttributes","name":"TextLabelAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TextLabelAttributes"},{"display_html":"type MiniPageAttributes = TextAttributes","name":"MiniPageAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:MiniPageAttributes"},{"display_html":"type ImageAttributes = CommonAttributes","name":"ImageAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:ImageAttributes"},{"display_html":"type SymbolAttributes = CommonAttributes ++ [Stroke, Fill, Pen, Size]","name":"SymbolAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:SymbolAttributes"},{"display_html":"type PathAttributes = CommonAttributes ++ [Stroke, Fill, Dash, Pen, LineCap, LineJoin, FillRule, Arrow, RArrow, StrokeOpacity, Opacity, Tiling, Gradient]","name":"PathAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PathAttributes"},{"display_html":"type GroupAttributes = CommonAttributes ++ '['Clip]","name":"GroupAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:GroupAttributes"},{"display_html":"newtype Attr (f :: TyFun u Type -> Type) (label :: u) = GAttr {}","name":"Attr _getAttr GAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:Attr"},{"display_html":"getAttr :: forall u (f :: TyFun u Type -> Type) (label :: u) u (f :: TyFun u Type -> Type) (label :: u). Iso (Attr (f :: TyFun u Type -> Type) (label :: u)) (Attr (f :: TyFun u Type -> Type) (label :: u)) (Maybe (Apply f label)) (Maybe (Apply f label))","name":"getAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:getAttr"},{"display_html":"pattern Attr :: Apply f label -> Attr f label","name":"Attr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:Attr"},{"display_html":"pattern NoAttr :: Attr f label","name":"NoAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:NoAttr"},{"display_html":"traverseAttr :: Applicative h => (Apply f label -> h (Apply g label)) -> Attr f label -> h (Attr g label)","name":"traverseAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:traverseAttr"},{"display_html":"pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a)","name":"pureAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:pureAttr"},{"display_html":"newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) = Attrs (Rec (Attr f) ats)","name":"Attributes Attrs","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:Attributes"},{"display_html":"unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats')","name":"unAttrs","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:unAttrs"},{"display_html":"traverseAttrs :: Applicative h => (forall label. Attr f label -> h (Attr g label)) -> Attributes f ats -> h (Attributes g ats)","name":"traverseAttrs","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:traverseAttrs"},{"display_html":"zipRecsWith :: (forall a. f a -> g a -> h a) -> Rec f as -> Rec g as -> Rec h as","name":"zipRecsWith","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:zipRecsWith"},{"display_html":"ixAttr :: forall at ats proxy f. at ats => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))","name":"ixAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:ixAttr"},{"display_html":"_Attr :: forall at ats proxy f. (at ats, RecApplicative ats) => proxy at -> Prism' (Attributes f ats) (Apply f at)","name":"_Attr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:_Attr"},{"display_html":"lookupAttr :: at ats => proxy at -> Attributes f ats -> Maybe (Apply f at)","name":"lookupAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:lookupAttr"},{"display_html":"setAttr :: forall proxy at ats f. at ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats","name":"setAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:setAttr"},{"display_html":"takeAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats)","name":"takeAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:takeAttr"},{"display_html":"unSetAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> Attributes f ats","name":"unSetAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:unSetAttr"},{"display_html":"attr :: (at ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats","name":"attr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:attr"},{"display_html":"data PinType","name":"PinType Vertical Horizontal No Yes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PinType"},{"display_html":"data TransformationTypes","name":"TransformationTypes Translations Affine Rigid","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TransformationTypes"},{"display_html":"data HorizontalAlignment","name":"HorizontalAlignment AlignRight AlignHCenter AlignLeft","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:HorizontalAlignment"},{"display_html":"data VerticalAlignment","name":"VerticalAlignment AlignBaseline AlignBottom AlignVCenter AlignTop","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:VerticalAlignment"},{"display_html":"type TeXStyle = Text","name":"TeXStyle","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TeXStyle"},{"display_html":"type TextSizeUnit r = r","name":"TextSizeUnit","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TextSizeUnit"},{"display_html":"newtype IpeSize r = IpeSize (IpeValue r)","name":"IpeSize IpeSize","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeSize"},{"display_html":"newtype IpePen r = IpePen (IpeValue r)","name":"IpePen IpePen","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpePen"},{"display_html":"data IpeDash r","name":"IpeDash DashPattern DashNamed","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeDash"},{"display_html":"data FillType","name":"FillType EOFill Wind","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:FillType"},{"display_html":"type IpeOpacity = Text","name":"IpeOpacity","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeOpacity"},{"display_html":"type IpeTiling = Text","name":"IpeTiling","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeTiling"},{"display_html":"type IpeGradient = Text","name":"IpeGradient","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeGradient"},{"display_html":"data IpeArrow r = IpeArrow {}","name":"IpeArrow _arrowSize _arrowName IpeArrow","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeArrow"},{"display_html":"arrowSize :: forall r r. Lens (IpeArrow r) (IpeArrow r) (IpeSize r) (IpeSize r)","name":"arrowSize","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:arrowSize"},{"display_html":"arrowName :: forall r. Lens' (IpeArrow r) Text","name":"arrowName","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:arrowName"},{"display_html":"normalArrow :: IpeArrow r","name":"normalArrow","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:normalArrow"},{"display_html":"class IpeAttrName (a :: AttributeUniverse) where","name":"IpeAttrName attrName","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeAttrName"},{"display_html":"writeAttrNames :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs","name":"writeAttrNames","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:writeAttrNames"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:rect"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:width"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:symbolName"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:PathSegment"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:groupItems"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:ToObject"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:commonAttributes"},{"display_html":"flattenGroups :: [IpeObject r] -> [IpeObject r]","name":"flattenGroups","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:flattenGroups"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:singlePageFromContent"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:activeLayer"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:addStyleSheet"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:opacitiesStyle"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:preambleData"},{"display_html":"applyMatrix' :: (IsTransformable (i r), Matrix AttributesOf i, Dimension (i r) ~ 2, r ~ NumType (i r)) => IpeObject' i r -> IpeObject' i r","name":"applyMatrix'","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatrix-39-"},{"display_html":"applyMatrix :: Fractional r => IpeObject r -> IpeObject r","name":"applyMatrix","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatrix"},{"display_html":"applyMatrices :: Fractional r => IpeFile r -> IpeFile r","name":"applyMatrices","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatrices"},{"display_html":"applyMatricesPage :: Fractional r => IpePage r -> IpePage r","name":"applyMatricesPage","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatricesPage"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readRawIpeFile"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readSinglePageFileThrow"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:ConversionError"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readIpeStylesheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:addStyleSheetFrom"},{"display_html":"fromIpeXML :: IpeRead (t r) => ByteString -> Either ConversionError (t r)","name":"fromIpeXML","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:fromIpeXML"},{"display_html":"readXML :: ByteString -> Either ConversionError (Node Text Text)","name":"readXML","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readXML"},{"display_html":"class IpeReadText t where","name":"IpeReadText ipeReadText","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:IpeReadText"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:IpeRead"},{"display_html":"class IpeReadAttr t where","name":"IpeReadAttr ipeReadAttr","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:IpeReadAttr"},{"display_html":"ipeReadTextWith :: (Text -> Either t v) -> Text -> Either ConversionError (IpeValue v)","name":"ipeReadTextWith","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadTextWith"},{"display_html":"ipeReadObject :: (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy i -> proxy r -> Node Text Text -> Either ConversionError (i r :+ IpeAttributes i r)","name":"ipeReadObject","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadObject"},{"display_html":"ipeReadAttrs :: forall proxy proxy' i r f ats. (f ~ AttrMapSym1 r, ats ~ AttributesOf i, ReifyConstraint IpeReadAttr (Attr f) ats, RecApplicative ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => proxy i -> proxy' r -> Node Text Text -> Either ConversionError (IpeAttributes i r)","name":"ipeReadAttrs","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadAttrs"},{"display_html":"ipeReadRec :: forall f ats. (RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy f -> Proxy ats -> Node Text Text -> Either ConversionError (Rec (Attr f) ats)","name":"ipeReadRec","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadRec"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:Coordinate"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#t:HasDefaultFromIpe"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:readAllFrom"},{"display_html":"type IpeOut g i r = g -> IpeObject' i r","name":"IpeOut","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#t:IpeOut"},{"display_html":"type IpeOut' f g i r = g -> f (IpeObject' i r)","name":"IpeOut'","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#t:IpeOut-39-"},{"display_html":"(!) :: IpeObject' i r -> IpeAttributes i r -> IpeObject' i r","name":"!","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:-33-"},{"display_html":"iO :: ToObject i => IpeObject' i r -> IpeObject r","name":"iO","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:iO"},{"display_html":"iO'' :: (HasDefaultIpeOut g, NumType g ~ r, DefaultIpeOut g ~ i, ToObject i) => g -> IpeAttributes i r -> IpeObject r","name":"iO''","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:iO-39--39-"},{"display_html":"iO' :: HasDefaultIpeOut g => g -> IpeObject (NumType g)","name":"iO'","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:iO-39-"},{"display_html":"class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where","name":"HasDefaultIpeOut defIO DefaultIpeOut","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#t:HasDefaultIpeOut"},{"display_html":"ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r","name":"ipeMark","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeMark"},{"display_html":"ipeDiskMark :: IpeOut (Point 2 r) IpeSymbol r","name":"ipeDiskMark","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeDiskMark"},{"display_html":"defaultBox :: Num r => Rectangle (Point 2 r)","name":"defaultBox","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:defaultBox"},{"display_html":"ipeLine :: (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r","name":"ipeLine","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLine"},{"display_html":"ipeLineIn :: forall r. (Ord r, Fractional r, Show r) => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r","name":"ipeLineIn","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLineIn"},{"display_html":"ipeHalfLine :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeHalfLine","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeHalfLine"},{"display_html":"ipeRay :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeRay","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeRay"},{"display_html":"ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r","name":"ipeHalfLineIn","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeHalfLineIn"},{"display_html":"ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r","name":"ipeLineSegment","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLineSegment"},{"display_html":"ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r","name":"ipePolyLine","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipePolyLine"},{"display_html":"ipeEllipse :: IpeOut (Ellipse r) Path r","name":"ipeEllipse","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeEllipse"},{"display_html":"ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r","name":"ipeCircle","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeCircle"},{"display_html":"ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r","name":"ipeDisk","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeDisk"},{"display_html":"ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r","name":"ipeBezier","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeBezier"},{"display_html":"path :: PathSegment r -> Path r","name":"path","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:path"},{"display_html":"pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> PathSegment r","name":"pathSegment","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:pathSegment"},{"display_html":"ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r","name":"ipePolygon","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipePolygon"},{"display_html":"toPolygonPathSegment :: (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r","name":"toPolygonPathSegment","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:toPolygonPathSegment"},{"display_html":"ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r","name":"ipeSimplePolygon","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeSimplePolygon"},{"display_html":"ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r","name":"ipeRectangle","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeRectangle"},{"display_html":"ipeGroup :: Foldable f => IpeOut (f (IpeObject r)) Group r","name":"ipeGroup","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeGroup"},{"display_html":"ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r","name":"ipeLabel","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLabel"},{"display_html":"labelled :: (Show lbl, NumType g ~ r, ToObject i) => (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelled","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:labelled"},{"display_html":"labelledWith :: (Show lbl, NumType g ~ r, ToObject i) => IpeAttributes TextLabel r -> (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelledWith","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:labelledWith"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:toIpeSelectionXML"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#t:IpeWriteText"},{"display_html":"ipeWriteAttrs :: (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)]","name":"ipeWriteAttrs","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:ipeWriteAttrs"},{"display_html":"writeAttrValues :: (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs","name":"writeAttrValues","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeAttrValues"},{"display_html":"ipeToIpeWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpeWith","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:ipeToIpeWith"},{"display_html":"ipeToIpe :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpe","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:ipeToIpe"},{"display_html":"writeIpeFileAsPdf :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFileAsPdf","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:writeIpeFileAsPdf"},{"display_html":"data FileType","name":"FileType XML PDF","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:FileType"},{"display_html":"data Export","name":"Export RetainIpeInfo Export","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:Export"},{"display_html":"type PageNumber = Int","name":"PageNumber","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:PageNumber"},{"display_html":"type ViewNumber = Int","name":"ViewNumber","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:ViewNumber"},{"display_html":"data MarkedView","name":"MarkedView OnlyMarkedViews All","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:MarkedView"},{"display_html":"data NoZip","name":"NoZip NoZip Zip","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:NoZip"},{"display_html":"data PageRange","name":"PageRange EntireFile PageRange","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:PageRange"},{"display_html":"data Options = Options {}","name":"Options markedView nozip runLatex singleView pages export Options","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:defaultOptions"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:singlePageFromContent"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readSinglePageFileThrow"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readRawIpeFile"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:ConversionError"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readAllFrom"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:toIpeSelectionXML"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeObject"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpePath"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeUse"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeGroup"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeMiniPage"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeImage"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:activeLayer"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:opacitiesStyle"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readIpeStylesheet"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:addStyleSheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:addStyleSheetFrom"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:preambleData"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeRead"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:HasDefaultFromIpe"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeWriteText"},{"display_html":"module Ipe.IpeOut","name":"","module":"Ipe","link":"hgeometry/ipe"},{"display_html":"module Ipe.Attributes","name":"","module":"Ipe","link":"hgeometry/ipe"},{"display_html":"module Ipe.Value","name":"","module":"Ipe","link":"hgeometry/ipe"},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:named"},{"display_html":"class (HasCenter ball point, NumType ball ~ NumType point, Point_ point (Dimension ball) (NumType ball)) => Ball_ ball point | ball -> point where","name":"Ball_ squaredRadius fromCenterAndSquaredRadius unitBall radius","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#t:Ball_"},{"display_html":"pattern Ball_ :: Ball_ ball point => point -> NumType ball -> ball","name":"Ball_","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:Ball_"},{"display_html":"class HasCenter geom point | geom -> point where","name":"HasCenter center","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#t:HasCenter"},{"display_html":"fromDiametralPair :: (Fractional r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) => point -> point -> ball","name":"fromDiametralPair","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:fromDiametralPair"},{"display_html":"fromCenterAndPoint :: (Num r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) => point -> point -> ball","name":"fromCenterAndPoint","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:fromCenterAndPoint"},{"display_html":"class (Ball_ disk point, Dimension disk ~ 2) => Disk_ disk point","name":"Disk_","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#t:Disk_"},{"display_html":"fromBoundaryPoints :: (Disk_ disk (Point 2 r), Point_ point 2 r, Fractional r) => Vector 3 point -> disk","name":"fromBoundaryPoints","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:fromBoundaryPoints"},{"display_html":"pattern Disk_ :: Disk_ ball point => point -> NumType ball -> ball","name":"Disk_","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:Disk_"},{"display_html":"newtype Boundary g = Boundary g","name":"Boundary Boundary","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#t:Boundary"},{"display_html":"_Boundary :: Iso g h (Boundary g) (Boundary h)","name":"_Boundary","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#v:_Boundary"},{"display_html":"data PointLocationResult","name":"PointLocationResult Inside OnBoundary Outside","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#t:PointLocationResult"},{"display_html":"data PointLocationResultWith edge","name":"PointLocationResultWith StrictlyInside OnBoundaryEdge StrictlyOutside","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#t:PointLocationResultWith"},{"display_html":"asPointLocationResult :: PointLocationResultWith edge -> PointLocationResult","name":"asPointLocationResult","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#v:asPointLocationResult"},{"display_html":"data CardinalDirection","name":"CardinalDirection North East South West","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#t:CardinalDirection"},{"display_html":"oppositeDirection :: CardinalDirection -> CardinalDirection","name":"oppositeDirection","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#v:oppositeDirection"},{"display_html":"data InterCardinalDirection","name":"InterCardinalDirection NorthWest NorthEast SouthEast SouthWest","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#t:InterCardinalDirection"},{"display_html":"interCardinalsOf :: CardinalDirection -> Vector 2 InterCardinalDirection","name":"interCardinalsOf","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#v:interCardinalsOf"},{"display_html":"class (NumType hyperPlane ~ r, Dimension hyperPlane ~ d, Has_ Vector_ d r, Has_ Vector_ (1 + d) r) => HyperPlane_ hyperPlane d r | hyperPlane -> d, hyperPlane -> r where","name":"HyperPlane_ evalHyperPlaneEquation hyperPlaneEquation normalVector onHyperPlane onSideTest","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:HyperPlane_"},{"display_html":"class HyperPlane_ hyperPlane d r => ConstructableHyperPlane_ hyperPlane d r where","name":"ConstructableHyperPlane_ HyperPlaneFromEquationConstraint hyperPlaneFromEquation fromPointAndNormal","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:ConstructableHyperPlane_"},{"display_html":"class HyperPlane_ hyperPlane d r => NonVerticalHyperPlane_ hyperPlane d r where","name":"NonVerticalHyperPlane_ hyperPlaneCoefficients evalAt verticalSideTest","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:NonVerticalHyperPlane_"},{"display_html":"isParallelTo :: (HyperPlane_ hyperPlane d r, HyperPlane_ hyperPlane' d r, Has_ Metric_ d r, Num r, Eq r, 1 <= d) => hyperPlane -> hyperPlane' -> Bool","name":"isParallelTo","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#v:isParallelTo"},{"display_html":"pointOn :: forall hyperPlane d r. (HyperPlane_ hyperPlane d r, Eq r, Fractional r, Has_ Additive_ d r, FoldableWithIndex Int (Vector d)) => hyperPlane -> Point d r","name":"pointOn","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#v:pointOn"},{"display_html":"class HyperPlaneFromPoints hyperPlane where","name":"HyperPlaneFromPoints hyperPlaneThrough","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:HyperPlaneFromPoints"},{"display_html":"class (HyperPlane_ (BoundingHyperPlane halfSpace d r) d r, Dimension halfSpace ~ d, Dimension (BoundingHyperPlane halfSpace d r) ~ d, NumType halfSpace ~ r, NumType (BoundingHyperPlane halfSpace d r) ~ r) => HalfSpace_ halfSpace d r | halfSpace -> d, halfSpace -> r where","name":"HalfSpace_ BoundingHyperPlane boundingHyperPlane halfSpaceSign","module":"HGeometry.HalfSpace.Class","link":"hgeometry/kernel/HGeometry-HalfSpace-Class.html#t:HalfSpace_"},{"display_html":"type HalfPlane_ halfPlane r = HalfSpace_ halfPlane 2 r","name":"HalfPlane_","module":"HGeometry.HalfSpace.Class","link":"hgeometry/kernel/HGeometry-HalfSpace-Class.html#t:HalfPlane_"},{"display_html":"module HGeometry.HyperPlane.Class","name":"","module":"HGeometry.HyperPlane","link":"hgeometry/kernel"},{"display_html":"newtype HyperPlane d r where","name":"HyperPlane HyperPlane HyperPlane2 HyperPlane3","module":"HGeometry.HyperPlane","link":"hgeometry/kernel/HGeometry-HyperPlane.html#t:HyperPlane"},{"display_html":"type MkHyperPlaneConstraints d r = (d < (d + 1), KnownNat d, Has_ Metric_ d r, Has_ Metric_ (d + 1) r, Has_ Vector_ d r, Has_ Vector_ (d + 1) r)","name":"MkHyperPlaneConstraints","module":"HGeometry.HyperPlane","link":"hgeometry/kernel/HGeometry-HyperPlane.html#t:MkHyperPlaneConstraints"},{"display_html":"cmpInDirection :: forall point d r. (Ord r, Num r, Has_ Metric_ (d + 1) r, Has_ Metric_ d r, Point_ point d r, d < (d + 1)) => Vector d r -> point -> point -> Ordering","name":"cmpInDirection","module":"HGeometry.HyperPlane","link":"hgeometry/kernel/HGeometry-HyperPlane.html#v:cmpInDirection"},{"display_html":"newtype NonVerticalHyperPlane d r where","name":"NonVerticalHyperPlane NonVerticalHyperPlane Plane","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#t:NonVerticalHyperPlane"},{"display_html":"asNonVerticalHyperPlane :: (HyperPlane_ hyperPlane d r, Fractional r, Eq r, 1 <= d) => hyperPlane -> Maybe (NonVerticalHyperPlane d r)","name":"asNonVerticalHyperPlane","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#v:asNonVerticalHyperPlane"},{"display_html":"type Plane = NonVerticalHyperPlane 3","name":"Plane","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#t:Plane"},{"display_html":"type Plane_ plane = NonVerticalHyperPlane_ plane 3","name":"Plane_","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#t:Plane_"},{"display_html":"pattern Plane_ :: Plane_ plane r => r -> r -> r -> plane","name":"Plane_","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#v:Plane_"},{"display_html":"type family Intersection g h :: Type","name":"Intersection","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:Intersection"},{"display_html":"data family IntersectionOf g h","name":"IntersectionOf","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:IntersectionOf"},{"display_html":"class HasIntersectionWith g h where","name":"HasIntersectionWith intersects","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:HasIntersectionWith"},{"display_html":"class HasIntersectionWith g h => IsIntersectableWith g h where","name":"IsIntersectableWith intersect","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:IsIntersectableWith"},{"display_html":"data HalfSpaceF boundingHyperPlane = HalfSpace !Sign boundingHyperPlane","name":"HalfSpaceF HalfSpace","module":"HGeometry.HalfSpace","link":"hgeometry/kernel/HGeometry-HalfSpace.html#t:HalfSpaceF"},{"display_html":"type HalfSpace d r = HalfSpaceF (HyperPlane d r)","name":"HalfSpace","module":"HGeometry.HalfSpace","link":"hgeometry/kernel/HGeometry-HalfSpace.html#t:HalfSpace"},{"display_html":"data Sign","name":"Sign Negative Positive","module":"HGeometry.HalfSpace","link":"hgeometry/kernel/HGeometry-HalfSpace.html#t:Sign"},{"display_html":"module HGeometry.HalfSpace.Class","name":"","module":"HGeometry.HalfSpace","link":"hgeometry/kernel"},{"display_html":"class IsEndPoint endPoint endPoint => EndPoint_ endPoint where","name":"EndPoint_ endPointType mkEndPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:EndPoint_"},{"display_html":"class IsEndPoint endPoint endPoint' where","name":"IsEndPoint _endPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:IsEndPoint"},{"display_html":"data EndPointType","name":"EndPointType Open Closed","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:EndPointType"},{"display_html":"newtype EndPoint (et :: EndPointType) r where","name":"EndPoint EndPoint OpenE ClosedE","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:EndPoint"},{"display_html":"data AnEndPoint r where","name":"AnEndPoint AnOpenE AnClosedE AnEndPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:AnEndPoint"},{"display_html":"asAnEndPoint :: EndPoint_ endPoint => endPoint -> AnEndPoint (IxValue endPoint)","name":"asAnEndPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#v:asAnEndPoint"},{"display_html":"class (IntervalLike_ interval r, NumType interval ~ r) => Interval_ interval r | interval -> r","name":"Interval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:Interval_"},{"display_html":"pattern Interval_ :: Interval_ interval r => StartPointOf interval -> EndPointOf interval -> interval","name":"Interval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:Interval_"},{"display_html":"class (HasStart interval point, HasStartPoint interval (StartPointOf interval), HasEnd interval point, HasEndPoint interval (EndPointOf interval), EndPoint_ (EndPointOf interval), IxValue (EndPointOf interval) ~ point, EndPoint_ (StartPointOf interval), IxValue (StartPointOf interval) ~ point) => IntervalLike_ interval point | interval -> point","name":"IntervalLike_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:IntervalLike_"},{"display_html":"class Interval_ interval point => ConstructableInterval_ interval point where","name":"ConstructableInterval_ mkInterval buildInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ConstructableInterval_"},{"display_html":"class (Interval_ interval r, StartPointOf interval ~ EndPoint Closed r, EndPointOf interval ~ EndPoint Closed r) => ClosedInterval_ interval r","name":"ClosedInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ClosedInterval_"},{"display_html":"pattern ClosedInterval_ :: ClosedInterval_ interval r => r -> r -> interval","name":"ClosedInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:ClosedInterval_"},{"display_html":"class (ClosedInterval_ interval r, ConstructableInterval_ interval r) => ConstructableClosedInterval_ interval r where","name":"ConstructableClosedInterval_ mkClosedInterval buildClosedInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ConstructableClosedInterval_"},{"display_html":"clampTo :: (ClosedInterval_ interval r, Ord r) => interval -> r -> r","name":"clampTo","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:clampTo"},{"display_html":"class (Interval_ interval r, StartPointOf interval ~ EndPoint Open r, EndPointOf interval ~ EndPoint Open r) => OpenInterval_ interval r | interval -> r","name":"OpenInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:OpenInterval_"},{"display_html":"pattern OpenInterval_ :: OpenInterval_ interval r => r -> r -> interval","name":"OpenInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:OpenInterval_"},{"display_html":"class (OpenInterval_ interval r, ConstructableInterval_ interval r) => ConstructableOpenInterval_ interval r | interval -> r where","name":"ConstructableOpenInterval_ mkOpenInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ConstructableOpenInterval_"},{"display_html":"class HasStart seg p | seg -> p where","name":"HasStart start","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasStart"},{"display_html":"class HasEnd seg p | seg -> p where","name":"HasEnd end","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasEnd"},{"display_html":"startAndEnd :: (HasStart seg p, HasEnd seg p) => seg -> (p, p)","name":"startAndEnd","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:startAndEnd"},{"display_html":"type family StartPointOf interval","name":"StartPointOf","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:StartPointOf"},{"display_html":"type family EndPointOf interval","name":"EndPointOf","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:EndPointOf"},{"display_html":"class HasStartPoint seg p | seg -> p where","name":"HasStartPoint startPoint","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasStartPoint"},{"display_html":"class HasEndPoint seg p | seg -> p where","name":"HasEndPoint endPoint","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasEndPoint"},{"display_html":"startAndEndPoint :: (HasStartPoint seg s, HasEndPoint seg e) => seg -> (s, e)","name":"startAndEndPoint","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:startAndEndPoint"},{"display_html":"inInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> PointLocationResult","name":"inInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:inInterval"},{"display_html":"stabsInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> Bool","name":"stabsInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:stabsInterval"},{"display_html":"compareInterval :: (Ord r, Interval_ interval r) => r -> interval -> Ordering","name":"compareInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:compareInterval"},{"display_html":"compareIntervalExact :: (Ord r, Interval_ interval r) => r -> interval -> CompareInterval","name":"compareIntervalExact","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:compareIntervalExact"},{"display_html":"data CompareInterval","name":"CompareInterval Before OnStart Interior OnEnd After","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:CompareInterval"},{"display_html":"shiftLeft :: (Num r, Interval_ interval r) => r -> interval -> interval","name":"shiftLeft","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:shiftLeft"},{"display_html":"shiftRight :: (Num r, Interval_ interval r) => r -> interval -> interval","name":"shiftRight","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:shiftRight"},{"display_html":"duration :: (Interval_ interval r, Num r) => interval -> r","name":"duration","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:duration"},{"display_html":"module HGeometry.Interval.EndPoint","name":"","module":"HGeometry.Interval.Class","link":"hgeometry/kernel"},{"display_html":"data Interval endPoint r where","name":"Interval Interval ClosedInterval OpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:Interval"},{"display_html":"type ClosedInterval r = Interval (EndPoint Closed) r","name":"ClosedInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:ClosedInterval"},{"display_html":"type OpenInterval r = Interval (EndPoint Open) r","name":"OpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:OpenInterval"},{"display_html":"data HalfOpenInterval r = HalfOpenInterval !(EndPoint Open r) !(EndPoint Closed r)","name":"HalfOpenInterval HalfOpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:HalfOpenInterval"},{"display_html":"module HGeometry.Interval.Class","name":"","module":"HGeometry.Interval","link":"hgeometry/kernel"},{"display_html":"asClosedInterval :: Interval_ interval r => interval -> Maybe (ClosedInterval r)","name":"asClosedInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#v:asClosedInterval"},{"display_html":"asOpenInterval :: Interval_ interval r => interval -> Maybe (OpenInterval r)","name":"asOpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#v:asOpenInterval"},{"display_html":"asAnInterval :: Interval_ interval r => interval -> Interval AnEndPoint r","name":"asAnInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#v:asAnInterval"},{"display_html":"data Interval_x_IntervalIntersection r interval","name":"Interval_x_IntervalIntersection Interval_x_Interval_Point Interval_x_Interval_Contained Interval_x_Interval_Partial","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:Interval_x_IntervalIntersection"},{"display_html":"class (HasMinPoint box point, HasMaxPoint box point, Point_ point (Dimension box) (NumType box)) => Box_ box point | box -> point where","name":"Box_ extent","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:Box_"},{"display_html":"class HasMinPoint box point | box -> point where","name":"HasMinPoint minPoint","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:HasMinPoint"},{"display_html":"class HasMaxPoint box point | box -> point where","name":"HasMaxPoint maxPoint","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:HasMaxPoint"},{"display_html":"centerPoint :: (Box_ box point, Point_ point d r, Fractional r) => box -> point","name":"centerPoint","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:centerPoint"},{"display_html":"type Rectangle_ rectangle point = (Box_ rectangle point, Dimension rectangle ~ 2)","name":"Rectangle_","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:Rectangle_"},{"display_html":"width :: (Box_ box point, Point_ point d r, 1 <= d, Functor (Vector d), Num r) => box -> r","name":"width","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:width"},{"display_html":"height :: (Box_ box point, Point_ point d r, 2 <= d, Functor (Vector d), Num r) => box -> r","name":"height","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:height"},{"display_html":"size :: forall box d point r. (Box_ box point, Point_ point d r, Num r, Functor (Vector d)) => box -> Vector d r","name":"size","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:size"},{"display_html":"class Line_ line d r | line -> d, line -> r where","name":"Line_ fromPointAndVec","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#t:Line_"},{"display_html":"type Line2_ line r = (Line_ line 2 r, HyperPlane_ line 2 r)","name":"Line2_","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#t:Line2_"},{"display_html":"lineThrough :: forall line point d r. (Line_ line d r, Point_ point d r, Num r) => point -> point -> line","name":"lineThrough","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#v:lineThrough"},{"display_html":"verticalLine :: forall r line. (Line_ line 2 r, Num r) => r -> line","name":"verticalLine","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#v:verticalLine"},{"display_html":"horizontalLine :: forall r line. (Line_ line 2 r, Num r) => r -> line","name":"horizontalLine","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#v:horizontalLine"},{"display_html":"class HasOnLine line d | line -> d where","name":"HasOnLine onLine","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#t:HasOnLine"},{"display_html":"type NVLine2_ line r = (Line_ line 2 r, NonVerticalHyperPlane_ line 2 r)","name":"NVLine2_","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#t:NVLine2_"},{"display_html":"pattern NVLine2_ :: NonVerticalHyperPlane_ line 2 r => r -> r -> line","name":"NVLine2_","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#v:NVLine2_"},{"display_html":"slope :: NonVerticalHyperPlane_ line 2 r => Lens' line r","name":"slope","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#v:slope"},{"display_html":"intercept :: NonVerticalHyperPlane_ line 2 r => Lens' line r","name":"intercept","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#v:intercept"},{"display_html":"newtype LineEQ r where","name":"LineEQ LineEQ MkLineEQ","module":"HGeometry.Line.LineEQ","link":"hgeometry/kernel/HGeometry-Line-LineEQ.html#t:LineEQ"},{"display_html":"evalAt' :: Num r => r -> LineEQ r -> r","name":"evalAt'","module":"HGeometry.Line.LineEQ","link":"hgeometry/kernel/HGeometry-Line-LineEQ.html#v:evalAt-39-"},{"display_html":"module HGeometry.Line.NonVertical.Class","name":"","module":"HGeometry.Line.LineEQ","link":"hgeometry/kernel"},{"display_html":"data VerticalOrLineEQ r","name":"VerticalOrLineEQ NonVertical VerticalLineThrough","module":"HGeometry.Line.General","link":"hgeometry/kernel/HGeometry-Line-General.html#t:VerticalOrLineEQ"},{"display_html":"dualPoint :: forall hyperPlane d r. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d) => hyperPlane -> Point d r","name":"dualPoint","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:dualPoint"},{"display_html":"dualHyperPlane :: forall point d r. (Point_ point d r, Num r, 1 <= d) => point -> NonVerticalHyperPlane d r","name":"dualHyperPlane","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:dualHyperPlane"},{"display_html":"dualLine :: (Point_ point 2 r, Num r) => point -> LineEQ r","name":"dualLine","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:dualLine"},{"display_html":"liftPointToPlane :: (Point_ point 2 r, Num r) => point -> NonVerticalHyperPlane 3 r","name":"liftPointToPlane","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:liftPointToPlane"},{"display_html":"data LinePV d r = LinePV {}","name":"LinePV LinePV _anchorPoint _direction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:LinePV"},{"display_html":"anchorPoint :: Lens' (LinePV d r) (Point d r)","name":"anchorPoint","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:anchorPoint"},{"display_html":"class HasDirection t where","name":"HasDirection direction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:HasDirection"},{"display_html":"isIdenticalTo :: Eq (Vector d r) => LinePV d r -> LinePV d r -> Bool","name":"isIdenticalTo","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:isIdenticalTo"},{"display_html":"class HasSupportingLine t where","name":"HasSupportingLine supportingLine","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:HasSupportingLine"},{"display_html":"fromLinearFunction :: Num r => r -> r -> LinePV 2 r","name":"fromLinearFunction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:fromLinearFunction"},{"display_html":"toLinearFunction :: forall r. (Fractional r, Ord r) => LinePV 2 r -> Maybe (LineEQ r)","name":"toLinearFunction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:toLinearFunction"},{"display_html":"data SideTestUpDown","name":"SideTestUpDown On Above Below","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:SideTestUpDown"},{"display_html":"class OnSideUpDownTest t where","name":"OnSideUpDownTest onSideUpDown","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:OnSideUpDownTest"},{"display_html":"liesAbove :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool","name":"liesAbove","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:liesAbove"},{"display_html":"liesBelow :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool","name":"liesBelow","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:liesBelow"},{"display_html":"data SideTest","name":"SideTest LeftSide OnLine RightSide","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:SideTest"},{"display_html":"onSide :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest","name":"onSide","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:onSide"},{"display_html":"leftHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r)","name":"leftHalfPlane","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:leftHalfPlane"},{"display_html":"rightHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r)","name":"rightHalfPlane","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:rightHalfPlane"},{"display_html":"bisector :: (Fractional r, Point_ point 2 r) => point -> point -> LinePV 2 r","name":"bisector","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:bisector"},{"display_html":"perpendicularTo :: Num r => LinePV 2 r -> LinePV 2 r","name":"perpendicularTo","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:perpendicularTo"},{"display_html":"isPerpendicularTo :: (Num r, Eq r) => Vector 2 r -> LinePV 2 r -> Bool","name":"isPerpendicularTo","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:isPerpendicularTo"},{"display_html":"cmpSlope :: forall r. (Num r, Ord r) => LinePV 2 r -> LinePV 2 r -> Ordering","name":"cmpSlope","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:cmpSlope"},{"display_html":"module HGeometry.Line.Class","name":"","module":"HGeometry.Line","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Line.LineEQ","name":"","module":"HGeometry.Line","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Line.PointAndVector","name":"","module":"HGeometry.Line","link":"hgeometry/kernel"},{"display_html":"type LineLineIntersection line = LineLineIntersectionG (NumType line) line","name":"LineLineIntersection","module":"HGeometry.Line","link":"hgeometry/kernel/HGeometry-Line.html#t:LineLineIntersection"},{"display_html":"data LineLineIntersectionG r line","name":"LineLineIntersectionG Line_x_Line_Point Line_x_Line_Line","module":"HGeometry.Line","link":"hgeometry/kernel/HGeometry-Line.html#t:LineLineIntersectionG"},{"display_html":"data HalfLine point = HalfLine !point !(Vector (Dimension point) (NumType point))","name":"HalfLine HalfLine","module":"HGeometry.HalfLine","link":"hgeometry/kernel/HGeometry-HalfLine.html#t:HalfLine"},{"display_html":"halfLineThrough :: (Point_ point d r, Num r) => point -> point -> HalfLine point","name":"halfLineThrough","module":"HGeometry.HalfLine","link":"hgeometry/kernel/HGeometry-HalfLine.html#v:halfLineThrough"},{"display_html":"data LineHalfLineIntersection point halfLine","name":"LineHalfLineIntersection Line_x_HalfLine_Point Line_x_HalfLine_HalfLine","module":"HGeometry.HalfLine","link":"hgeometry/kernel/HGeometry-HalfLine.html#t:LineHalfLineIntersection"},{"display_html":"class (IntervalLike_ lineSegment point, Point_ point (Dimension lineSegment) (NumType lineSegment)) => LineSegment_ lineSegment point | lineSegment -> point","name":"LineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:LineSegment_"},{"display_html":"pattern LineSegment_ :: forall lineSegment point. LineSegment_ lineSegment point => point -> point -> lineSegment","name":"LineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:LineSegment_"},{"display_html":"class LineSegment_ lineSegment point => ConstructableLineSegment_ lineSegment point where","name":"ConstructableLineSegment_ uncheckedLineSegment mkLineSegment","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:ConstructableLineSegment_"},{"display_html":"class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Closed point, EndPointOf lineSegment ~ EndPoint Closed point) => ClosedLineSegment_ lineSegment point","name":"ClosedLineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:ClosedLineSegment_"},{"display_html":"class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Open point, EndPointOf lineSegment ~ EndPoint Open point) => OpenLineSegment_ lineSegment point","name":"OpenLineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:OpenLineSegment_"},{"display_html":"interpolate :: forall lineSegment d point r. (Fractional r, LineSegment_ lineSegment point, ConstructablePoint_ point d r) => r -> lineSegment -> point","name":"interpolate","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:interpolate"},{"display_html":"class HasOnSegment lineSegment d | lineSegment -> d where","name":"HasOnSegment onSegment","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasOnSegment"},{"display_html":"class HasStart seg p | seg -> p where","name":"HasStart start","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasStart"},{"display_html":"class HasEnd seg p | seg -> p where","name":"HasEnd end","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasEnd"},{"display_html":"class HasStartPoint seg p | seg -> p where","name":"HasStartPoint startPoint","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasStartPoint"},{"display_html":"class HasEndPoint seg p | seg -> p where","name":"HasEndPoint endPoint","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasEndPoint"},{"display_html":"type family StartPointOf interval","name":"StartPointOf","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:StartPointOf"},{"display_html":"type family EndPointOf interval","name":"EndPointOf","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:EndPointOf"},{"display_html":"ordAtY :: (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering","name":"ordAtY","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:ordAtY"},{"display_html":"ordAtX :: (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering","name":"ordAtX","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:ordAtX"},{"display_html":"xCoordAt :: (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> r","name":"xCoordAt","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:xCoordAt"},{"display_html":"yCoordAt :: (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> r","name":"yCoordAt","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:yCoordAt"},{"display_html":"orientLR :: (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) => lineSegment -> lineSegment","name":"orientLR","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:orientLR"},{"display_html":"orientBT :: (LineSegment_ lineSegment point, Point_ point d r, 2 <= d, Ord r) => lineSegment -> lineSegment","name":"orientBT","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:orientBT"},{"display_html":"class (r ~ NumType matrix, Ixed matrix, IxValue matrix ~ r, Index matrix ~ (Int, Int), HasElements matrix matrix) => Matrix_ matrix n m r | matrix -> n, matrix -> m, matrix -> r where","name":"Matrix_ !!* !* !*! *!! column generateMatrix matrixFromRows rows identityMatrix matrixFromList row","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:Matrix_"},{"display_html":"class HasElements matrix matrix' where","name":"HasElements elements","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:HasElements"},{"display_html":"class HasDeterminant d where","name":"HasDeterminant det","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:HasDeterminant"},{"display_html":"class Invertible n where","name":"Invertible inverseMatrix","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:Invertible"},{"display_html":"newtype Matrix n m r = Matrix (Vector n (Vector m r))","name":"Matrix Matrix","module":"HGeometry.Matrix","link":"hgeometry/kernel/HGeometry-Matrix.html#t:Matrix"},{"display_html":"type OptMatrix_ d r = (Has_ Additive_ d r, Has_ Vector_ d (Vector d r), Ixed (Vector d r), Ixed (Vector d (Vector d r)))","name":"OptMatrix_","module":"HGeometry.Matrix","link":"hgeometry/kernel/HGeometry-Matrix.html#t:OptMatrix_"},{"display_html":"module HGeometry.Matrix.Class","name":"","module":"HGeometry.Matrix","link":"hgeometry/kernel"},{"display_html":"newtype Transformation d r = Transformation (Matrix (d + 1) (d + 1) r)","name":"Transformation Transformation","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:Transformation"},{"display_html":"transformationMatrix :: Iso (Transformation d r) (Transformation d s) (Matrix (d + 1) (d + 1) r) (Matrix (d + 1) (d + 1) s)","name":"transformationMatrix","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:transformationMatrix"},{"display_html":"(|.|) :: (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r","name":"|.|","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:-124-.-124-"},{"display_html":"identity :: (Num r, OptMatrix_ (d + 1) r) => Transformation d r","name":"identity","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:identity"},{"display_html":"inverseOf :: (Fractional r, OptMatrix_ (d + 1) r, Invertible (d + 1)) => Transformation d r -> Transformation d r","name":"inverseOf","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:inverseOf"},{"display_html":"class IsTransformable g where","name":"IsTransformable transformBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:IsTransformable"},{"display_html":"type TransformationConstraints d r = (KnownNat d, Has_ Vector_ d r, OptMatrix_ (d + 1) r, HasComponents (Vector (d + 1) r) (Vector (d + 1) (Vector (d + 1) r)), Has_ Additive_ (d + 1) r)","name":"TransformationConstraints","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:TransformationConstraints"},{"display_html":"type DefaultTransformByConstraints g d r = (d ~ Dimension g, r ~ NumType g, OptMatrix_ (d + 1) r, Fractional r, Has_ Additive_ d r, HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r))","name":"DefaultTransformByConstraints","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:DefaultTransformByConstraints"},{"display_html":"type OptMatrix_ d r = (Has_ Additive_ d r, Has_ Vector_ d (Vector d r), Ixed (Vector d r), Ixed (Vector d (Vector d r)))","name":"OptMatrix_","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:OptMatrix_"},{"display_html":"translation :: forall d r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r","name":"translation","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:translation"},{"display_html":"scaling :: forall d r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r","name":"scaling","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:scaling"},{"display_html":"uniformScaling :: forall d r. (Num r, TransformationConstraints d r) => r -> Transformation d r","name":"uniformScaling","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:uniformScaling"},{"display_html":"translateBy :: (IsTransformable g, Num (NumType g), Vector_ vector (Dimension g) (NumType g), TransformationConstraints (Dimension g) (NumType g)) => vector -> g -> g","name":"translateBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:translateBy"},{"display_html":"scaleBy :: (IsTransformable g, Num (NumType g), Vector_ vector (Dimension g) (NumType g), TransformationConstraints (Dimension g) (NumType g)) => vector -> g -> g","name":"scaleBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:scaleBy"},{"display_html":"scaleUniformlyBy :: (IsTransformable g, Num (NumType g), TransformationConstraints (Dimension g) (NumType g)) => NumType g -> g -> g","name":"scaleUniformlyBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:scaleUniformlyBy"},{"display_html":"rotateTo :: Num r => Vector 3 (Vector 3 r) -> Transformation 3 r","name":"rotateTo","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:rotateTo"},{"display_html":"skewX :: Num r => r -> Transformation 2 r","name":"skewX","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:skewX"},{"display_html":"rotation :: Floating r => r -> Transformation 2 r","name":"rotation","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:rotation"},{"display_html":"reflection :: Floating r => r -> Transformation 2 r","name":"reflection","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:reflection"},{"display_html":"reflectionV :: Num r => Transformation 2 r","name":"reflectionV","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:reflectionV"},{"display_html":"reflectionH :: Num r => Transformation 2 r","name":"reflectionH","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:reflectionH"},{"display_html":"fitToBox :: forall rectangle g point r. (NumType g ~ r, Dimension g ~ 2, IsTransformable g, IsBoxable g, Rectangle_ rectangle point, Point_ point 2 r, Ord r, Fractional r) => rectangle -> g -> g","name":"fitToBox","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:fitToBox"},{"display_html":"fitToBoxTransform :: forall rectangle g point r. (NumType g ~ r, Dimension g ~ 2, IsTransformable g, IsBoxable g, Rectangle_ rectangle point, Point_ point 2 r, Ord r, Fractional r) => rectangle -> g -> Transformation 2 r","name":"fitToBoxTransform","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:fitToBoxTransform"},{"display_html":"data LineSegment endPoint point where","name":"LineSegment LineSegment ClosedLineSegment OpenLineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:LineSegment"},{"display_html":"type ClosedLineSegment point = LineSegment (EndPoint Closed) point","name":"ClosedLineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:ClosedLineSegment"},{"display_html":"type OpenLineSegment point = LineSegment (EndPoint Open) point","name":"OpenLineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:OpenLineSegment"},{"display_html":"newtype EndPoint (et :: EndPointType) r where","name":"EndPoint EndPoint OpenE ClosedE","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:EndPoint"},{"display_html":"data AnEndPoint r where","name":"AnEndPoint AnEndPoint AnOpenE AnClosedE","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:AnEndPoint"},{"display_html":"module HGeometry.LineSegment.Class","name":"","module":"HGeometry.LineSegment","link":"hgeometry/kernel"},{"display_html":"spanIn :: (Point_ point d r, Ord r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => Getter point r -> LineSegment endPoint point -> Interval AnEndPoint r","name":"spanIn","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#v:spanIn"},{"display_html":"class IsEndPoint endPoint endPoint => EndPoint_ endPoint where","name":"EndPoint_ endPointType mkEndPoint","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:EndPoint_"},{"display_html":"data LineLineSegmentIntersection lineSegment","name":"LineLineSegmentIntersection Line_x_LineSegment_Point Line_x_LineSegment_LineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:LineLineSegmentIntersection"},{"display_html":"data LineSegmentLineSegmentIntersection lineSegment","name":"LineSegmentLineSegmentIntersection LineSegment_x_LineSegment_Point LineSegment_x_LineSegment_LineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:LineSegmentLineSegmentIntersection"},{"display_html":"data HalfLineLineSegmentIntersection point segment","name":"HalfLineLineSegmentIntersection HalfLine_x_LineSegment_Point HalfLine_x_LineSegment_LineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:HalfLineLineSegmentIntersection"},{"display_html":"data Ball point where","name":"Ball Ball Disk","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Ball"},{"display_html":"type Disk = Ball","name":"Disk","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Disk"},{"display_html":"newtype Sphere point where","name":"Sphere Sphere Circle MkSphere","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Sphere"},{"display_html":"type Circle = Sphere","name":"Circle","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Circle"},{"display_html":"_BallSphere :: Iso (Ball point) (Ball point') (Sphere point) (Sphere point')","name":"_BallSphere","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#v:_BallSphere"},{"display_html":"_DiskCircle :: Iso (Disk point) (Disk point') (Circle point) (Circle point')","name":"_DiskCircle","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#v:_DiskCircle"},{"display_html":"data family IntersectionOf g h","name":"IntersectionOf Line_x_Ball_Point Line_x_Ball_Segment","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:IntersectionOf"},{"display_html":"module HGeometry.Ball.CenterAndRadius","name":"","module":"HGeometry.Ball","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Ball.Class","name":"","module":"HGeometry.Ball","link":"hgeometry/kernel"},{"display_html":"newtype Ellipse r = Ellipse (Transformation 2 r)","name":"Ellipse Ellipse","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#t:Ellipse"},{"display_html":"affineTransformation :: Iso (Ellipse r) (Ellipse s) (Transformation 2 r) (Transformation 2 s)","name":"affineTransformation","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:affineTransformation"},{"display_html":"ellipseMatrix :: Iso (Ellipse r) (Ellipse s) (Matrix 3 3 r) (Matrix 3 3 s)","name":"ellipseMatrix","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:ellipseMatrix"},{"display_html":"unitEllipse :: Num r => Ellipse r","name":"unitEllipse","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:unitEllipse"},{"display_html":"circleToEllipse :: (Radical r, Point_ point 2 r) => Circle point -> Ellipse r","name":"circleToEllipse","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:circleToEllipse"},{"display_html":"ellipseToCircle :: (Num r, Eq r) => Ellipse r -> Maybe (Circle (Point 2 r))","name":"ellipseToCircle","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:ellipseToCircle"},{"display_html":"_EllipseCircle :: (Radical r, Eq r) => Prism' (Ellipse r) (Circle (Point 2 r))","name":"_EllipseCircle","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:_EllipseCircle"},{"display_html":"module HGeometry.Box.Class","name":"","module":"HGeometry.Box","link":"hgeometry/kernel"},{"display_html":"data Box point where","name":"Box Box Rectangle","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Box"},{"display_html":"type Rectangle = Box","name":"Rectangle","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Rectangle"},{"display_html":"fromExtent :: (Vector_ vector d interval, ClosedInterval_ interval r, Has_ Additive_ d r, Has_ Vector_ d interval, HasComponents (Vector d interval) (Vector d r)) => vector -> Box (Point d r)","name":"fromExtent","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:fromExtent"},{"display_html":"data Corners a = Corners !a !a !a !a","name":"Corners Corners","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Corners"},{"display_html":"northWest :: Lens' (Corners a) a","name":"northWest","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:northWest"},{"display_html":"northEast :: Lens' (Corners a) a","name":"northEast","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:northEast"},{"display_html":"southEast :: Lens' (Corners a) a","name":"southEast","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:southEast"},{"display_html":"southWest :: Lens' (Corners a) a","name":"southWest","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:southWest"},{"display_html":"corners :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Corners point","name":"corners","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:corners"},{"display_html":"cornersInDirection :: CardinalDirection -> Corners p -> Vector 2 p","name":"cornersInDirection","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:cornersInDirection"},{"display_html":"data Sides a = Sides !a !a !a !a","name":"Sides Sides","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Sides"},{"display_html":"north :: Lens' (Sides a) a","name":"north","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:north"},{"display_html":"east :: Lens' (Sides a) a","name":"east","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:east"},{"display_html":"south :: Lens' (Sides a) a","name":"south","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:south"},{"display_html":"west :: Lens' (Sides a) a","name":"west","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:west"},{"display_html":"topSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"topSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:topSide"},{"display_html":"bottomSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"bottomSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:bottomSide"},{"display_html":"leftSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"leftSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:leftSide"},{"display_html":"rightSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"rightSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:rightSide"},{"display_html":"sides :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point)","name":"sides","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sides"},{"display_html":"sides' :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point)","name":"sides'","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sides-39-"},{"display_html":"sideDirections :: Sides CardinalDirection","name":"sideDirections","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sideDirections"},{"display_html":"sideValues :: (Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides r","name":"sideValues","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sideValues"},{"display_html":"class IsBoxable g where","name":"IsBoxable boundingBox","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:IsBoxable"},{"display_html":"data LineBoxIntersection d r","name":"LineBoxIntersection Line_x_Box_Point Line_x_Box_LineSegment","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:LineBoxIntersection"},{"display_html":"data HalfLineBoxIntersection point","name":"HalfLineBoxIntersection HalfLine_x_Box_Point HalfLine_x_Box_LineSegment","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:HalfLineBoxIntersection"},{"display_html":"module HGeometry.Line","name":"","module":"HGeometry.Kernel","link":"hgeometry/kernel"},{"display_html":"module HGeometry.LineSegment","name":"","module":"HGeometry.Kernel","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Box","name":"","module":"HGeometry.Kernel","link":"hgeometry/kernel"},{"display_html":"class Point_ point (Dimension point) (NumType point) => Triangle_ triangle point | triangle -> point where","name":"Triangle_ corners mkTriangle","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#t:Triangle_"},{"display_html":"pattern Triangle_ :: Triangle_ triangle point => point -> point -> point -> triangle","name":"Triangle_","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:Triangle_"},{"display_html":"toCounterClockwiseTriangle :: (Num r, Eq r, Point_ point 2 r, Triangle_ triangle point) => triangle -> triangle","name":"toCounterClockwiseTriangle","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:toCounterClockwiseTriangle"},{"display_html":"triangleSignedArea2X :: (Num r, Point_ point 2 r, Triangle_ triangle point) => triangle -> r","name":"triangleSignedArea2X","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:triangleSignedArea2X"},{"display_html":"intersectingHalfPlanes :: (Triangle_ triangle point, Point_ point 2 r, Num r, Ord r) => triangle -> Vector 3 (HalfSpaceF (LinePV 2 r))","name":"intersectingHalfPlanes","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:intersectingHalfPlanes"},{"display_html":"toBarricentric :: (Fractional r, Point_ point 2 r, Triangle_ triangle point) => point -> triangle -> Vector 3 r","name":"toBarricentric","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:toBarricentric"},{"display_html":"fromBarricentric :: (Triangle_ triangle point, Point_ point d r, Num r) => Vector 3 r -> triangle -> Point d r","name":"fromBarricentric","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:fromBarricentric"},{"display_html":"data Triangle point where","name":"Triangle Triangle","module":"HGeometry.Triangle","link":"hgeometry/kernel/HGeometry-Triangle.html#t:Triangle"},{"display_html":"module HGeometry.Triangle.Class","name":"","module":"HGeometry.Triangle","link":"hgeometry/kernel"},{"display_html":"data Viewport r = Viewport (Rectangle (Point 2 r)) (Transformation 2 r)","name":"Viewport Viewport","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#t:Viewport"},{"display_html":"mkViewport :: (Rectangle_ rectangle point, Point_ point 2 r, Fractional r) => rectangle -> Transformation 2 r -> Viewport r","name":"mkViewport","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:mkViewport"},{"display_html":"viewPort :: Lens' (Viewport r) (Rectangle (Point 2 r))","name":"viewPort","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:viewPort"},{"display_html":"worldToHost :: Lens' (Viewport r) (Transformation 2 r)","name":"worldToHost","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:worldToHost"},{"display_html":"hostToWorld :: Fractional r => Getter (Viewport r) (Transformation 2 r)","name":"hostToWorld","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:hostToWorld"},{"display_html":"toWorldIn :: (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Fractional r) => Viewport r -> g -> g","name":"toWorldIn","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:toWorldIn"},{"display_html":"toHostFrom :: (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Num r) => Viewport r -> g -> g","name":"toHostFrom","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:toHostFrom"},{"display_html":"fromSize :: (Num r, Vector_ vector 2 r) => vector -> Viewport r","name":"fromSize","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:fromSize"},{"display_html":"flipY :: (Num r, Vector_ vector 2 r) => vector -> Viewport r","name":"flipY","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:flipY"},{"display_html":"centeredOrigin :: (Fractional r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Viewport r","name":"centeredOrigin","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:centeredOrigin"},{"display_html":"alignedOrigin :: Num r => Rectangle (Point 2 r) -> Viewport r","name":"alignedOrigin","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:alignedOrigin"},{"display_html":"wrtCenter :: Fractional r => Viewport r -> Transformation 2 r -> Transformation 2 r","name":"wrtCenter","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:wrtCenter"},{"display_html":"data ZoomConfig r = ZoomConfig (ClosedInterval r) r","name":"ZoomConfig ZoomConfig","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#t:ZoomConfig"},{"display_html":"range :: Lens' (ZoomConfig r) (ClosedInterval r)","name":"range","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:range"},{"display_html":"currentLevel :: Ord r => Lens' (ZoomConfig r) r","name":"currentLevel","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:currentLevel"},{"display_html":"isValidInterval :: (Eq (endPoint r), Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)) => endPoint r -> endPoint r -> Bool","name":"isValidInterval","module":"HGeometry.Kernel.Instances","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Instances.html#v:isValidInterval"},{"display_html":"bothClosed :: EndPoint_ (endPoint r) => endPoint r -> endPoint r -> Bool","name":"bothClosed","module":"HGeometry.Kernel.Instances","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Instances.html#v:bothClosed"},{"display_html":"implies :: Bool -> Bool -> Bool","name":"implies","module":"HGeometry.Kernel.Instances","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Instances.html#v:implies"},{"display_html":"arbitraryPointInBoundingBox :: Rectangle (Point 2 Rational) -> Gen (Point 2 Rational)","name":"arbitraryPointInBoundingBox","module":"HGeometry.Kernel.Test.Box","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Test-Box.html#v:arbitraryPointInBoundingBox"},{"display_html":"newtype ZeroToOne = ZeroToOne Rational","name":"ZeroToOne ZeroToOne","module":"HGeometry.Kernel.Test.Box","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Test-Box.html#t:ZeroToOne"},{"display_html":"data WheelDirection","name":"WheelDirection Down Up","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#t:WheelDirection"},{"display_html":"onWheel :: (WheelDirection -> action) -> Attribute action","name":"onWheel","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onWheel"},{"display_html":"data Button","name":"Button LeftButton MiddleButton RightButton","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#t:Button"},{"display_html":"onClickWithButton :: (Button -> action) -> Attribute action","name":"onClickWithButton","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onClickWithButton"},{"display_html":"onRightClick :: action -> Attribute action","name":"onRightClick","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onRightClick"},{"display_html":"onContextMenu :: action -> Attribute action","name":"onContextMenu","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onContextMenu"},{"display_html":"onTouchStart :: action -> Attribute action","name":"onTouchStart","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onTouchStart"},{"display_html":"onTouchMove :: action -> Attribute action","name":"onTouchMove","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onTouchMove"},{"display_html":"onTouchEnd :: action -> Attribute action","name":"onTouchEnd","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onTouchEnd"},{"display_html":"getBoundingClientRect :: JSVal -> JSM JSVal","name":"getBoundingClientRect","module":"HGeometry.Miso.FFI.Extra","link":"hgeometry/miso/HGeometry-Miso-FFI-Extra.html#v:getBoundingClientRect"},{"display_html":"onMouseEnterAt :: (Point 2 Int -> action) -> Attribute action","name":"onMouseEnterAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onMouseEnterAt"},{"display_html":"onMouseMoveAt :: (Point 2 Int -> action) -> Attribute action","name":"onMouseMoveAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onMouseMoveAt"},{"display_html":"onMouseClickAt :: (Point 2 Int -> action) -> Attribute action","name":"onMouseClickAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onMouseClickAt"},{"display_html":"onTouchStartAt :: (Point 2 Int -> action) -> Attribute action","name":"onTouchStartAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onTouchStartAt"},{"display_html":"onTouchMoveAt :: (Point 2 Int -> action) -> Attribute action","name":"onTouchMoveAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onTouchMoveAt"},{"display_html":"onTouchEnd :: action -> Attribute action","name":"onTouchEnd","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onTouchEnd"},{"display_html":"class HasVector point point' where","name":"HasVector vector","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasVector"},{"display_html":"class (Has_ Vector_ (Dimension point) (NumType point), Has_ Vector_ (Dimension point') (NumType point'), HasComponents (Vector (Dimension point') (NumType point)) (Vector (Dimension point') (NumType point')), Dimension point ~ Dimension point', HasVector point point') => HasCoordinates point point' where","name":"HasCoordinates coordinates","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasCoordinates"},{"display_html":"class (Additive_ (Vector d r) d r, HasCoordinates point point, d ~ Dimension point, r ~ NumType point) => Affine_ point d r | point -> d, point -> r where","name":"Affine_ .+^ .-. .-^","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:Affine_"},{"display_html":"class (Affine_ point d r, HasVector point point) => Point_ point d r where","name":"Point_ coord'","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:Point_"},{"display_html":"pattern Point1_ :: Point_ point 1 r => r -> point","name":"Point1_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point1_"},{"display_html":"pattern Point2_ :: Point_ point 2 r => r -> r -> point","name":"Point2_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point2_"},{"display_html":"pattern Point3_ :: Point_ point 3 r => r -> r -> r -> point","name":"Point3_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point3_"},{"display_html":"pattern Point4_ :: Point_ point 4 r => r -> r -> r -> r -> point","name":"Point4_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point4_"},{"display_html":"class Point_ point d r => ConstructablePoint_ point d r where","name":"ConstructablePoint_ fromVector","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:ConstructablePoint_"},{"display_html":"origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point","name":"origin","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:origin"},{"display_html":"pointFromList :: (ConstructablePoint_ point d r, Vector_ (Vector d r) d r) => [r] -> Maybe point","name":"pointFromList","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:pointFromList"},{"display_html":"coord :: forall i point d r. (1 <= i, i <= d, KnownNat i, Point_ point d r) => IndexedLens' Int point r","name":"coord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:coord"},{"display_html":"xCoord :: (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"xCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:xCoord"},{"display_html":"yCoord :: (2 <= d, Point_ point d r) => IndexedLens' Int point r","name":"yCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:yCoord"},{"display_html":"zCoord :: (3 <= d, Point_ point d r) => IndexedLens' Int point r","name":"zCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:zCoord"},{"display_html":"wCoord :: (4 <= d, Point_ point d r) => IndexedLens' Int point r","name":"wCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:wCoord"},{"display_html":"dCoord :: forall point d r. (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"dCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:dCoord"},{"display_html":"class HasPoints s t point point' | s -> point, t -> point' where","name":"HasPoints allPoints","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasPoints"},{"display_html":"type HasPoints' s point = HasPoints s s point point","name":"HasPoints'","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasPoints-39-"},{"display_html":"newtype PointF v = Point {}","name":"PointF Point toVec","module":"HGeometry.Point.PointF","link":"hgeometry/point/HGeometry-Point-PointF.html#t:PointF"},{"display_html":"cmpByDistanceTo :: (Ord r, Num r, Point_ point d r, Point_ center d r, Metric_ (Vector d r) d r) => center -> point -> point -> Ordering","name":"cmpByDistanceTo","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#v:cmpByDistanceTo"},{"display_html":"squaredEuclideanDist :: (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r","name":"squaredEuclideanDist","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#v:squaredEuclideanDist"},{"display_html":"euclideanDist :: (Radical r, Point_ point d r, Metric_ (Vector d r) d r) => point -> point -> r","name":"euclideanDist","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#v:euclideanDist"},{"display_html":"class Metric_ (Vector (Dimension g) (NumType g)) (Dimension g) (NumType g) => HasSquaredEuclideanDistance g where","name":"HasSquaredEuclideanDistance pointClosestToWithDistance pointClosestTo squaredEuclideanDistTo","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#t:HasSquaredEuclideanDistance"},{"display_html":"data CCW where","name":"CCW CCW CW CoLinear","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#t:CCW"},{"display_html":"ccw :: (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW","name":"ccw","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:ccw"},{"display_html":"isCoLinear :: (Point_ point 2 r, Num r, Eq r) => point -> point -> point -> Bool","name":"isCoLinear","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:isCoLinear"},{"display_html":"sortAround :: (Point_ center 2 r, Point_ point 2 r, Num r, Ord r) => center -> [point] -> [point]","name":"sortAround","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:sortAround"},{"display_html":"ccwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"ccwCmpAroundWith","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:ccwCmpAroundWith"},{"display_html":"cwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"cwCmpAroundWith","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:cwCmpAroundWith"},{"display_html":"ccwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"ccwCmpAround","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:ccwCmpAround"},{"display_html":"cwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"cwCmpAround","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:cwCmpAround"},{"display_html":"insertIntoCyclicOrder :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> CList point -> CList point","name":"insertIntoCyclicOrder","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:insertIntoCyclicOrder"},{"display_html":"cmpInDirection :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering","name":"cmpInDirection","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:cmpInDirection"},{"display_html":"type Point d r = PointF (Vector d r)","name":"Point","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Point"},{"display_html":"newtype PointF v where","name":"PointF Point Point1 Point2 Point3 Point4 toVec","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:PointF"},{"display_html":"class (Affine_ point d r, HasVector point point) => Point_ point d r where","name":"Point_ coord'","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Point_"},{"display_html":"pattern Point1_ :: Point_ point 1 r => r -> point","name":"Point1_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point1_"},{"display_html":"pattern Point2_ :: Point_ point 2 r => r -> r -> point","name":"Point2_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point2_"},{"display_html":"pattern Point3_ :: Point_ point 3 r => r -> r -> r -> point","name":"Point3_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point3_"},{"display_html":"pattern Point4_ :: Point_ point 4 r => r -> r -> r -> r -> point","name":"Point4_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point4_"},{"display_html":"class Point_ point d r => ConstructablePoint_ point d r where","name":"ConstructablePoint_ fromVector","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:ConstructablePoint_"},{"display_html":"class HasVector point point' where","name":"HasVector vector","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasVector"},{"display_html":"class (Has_ Vector_ (Dimension point) (NumType point), Has_ Vector_ (Dimension point') (NumType point'), HasComponents (Vector (Dimension point') (NumType point)) (Vector (Dimension point') (NumType point')), Dimension point ~ Dimension point', HasVector point point') => HasCoordinates point point' where","name":"HasCoordinates coordinates","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasCoordinates"},{"display_html":"asPoint :: forall point d r. Point_ point d r => Lens' point (Point d r)","name":"asPoint","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:asPoint"},{"display_html":"origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point","name":"origin","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:origin"},{"display_html":"pointFromList :: (ConstructablePoint_ point d r, Vector_ (Vector d r) d r) => [r] -> Maybe point","name":"pointFromList","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:pointFromList"},{"display_html":"coord :: forall i point d r. (1 <= i, i <= d, KnownNat i, Point_ point d r) => IndexedLens' Int point r","name":"coord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:coord"},{"display_html":"xCoord :: (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"xCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:xCoord"},{"display_html":"yCoord :: (2 <= d, Point_ point d r) => IndexedLens' Int point r","name":"yCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:yCoord"},{"display_html":"zCoord :: (3 <= d, Point_ point d r) => IndexedLens' Int point r","name":"zCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:zCoord"},{"display_html":"wCoord :: (4 <= d, Point_ point d r) => IndexedLens' Int point r","name":"wCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:wCoord"},{"display_html":"dCoord :: forall point d r. (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"dCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:dCoord"},{"display_html":"projectPoint :: forall i point d r. (Point_ point d r, i <= d, Has_ Vector_ i r) => point -> Point i r","name":"projectPoint","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:projectPoint"},{"display_html":"class (Additive_ (Vector d r) d r, HasCoordinates point point, d ~ Dimension point, r ~ NumType point) => Affine_ point d r | point -> d, point -> r where","name":"Affine_ .+^ .-. .-^","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Affine_"},{"display_html":"data CCW where","name":"CCW CCW CW CoLinear","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:CCW"},{"display_html":"ccw :: (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW","name":"ccw","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:ccw"},{"display_html":"isCoLinear :: (Point_ point 2 r, Num r, Eq r) => point -> point -> point -> Bool","name":"isCoLinear","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:isCoLinear"},{"display_html":"ccwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"ccwCmpAround","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:ccwCmpAround"},{"display_html":"cwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"cwCmpAround","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cwCmpAround"},{"display_html":"ccwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"ccwCmpAroundWith","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:ccwCmpAroundWith"},{"display_html":"cwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"cwCmpAroundWith","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cwCmpAroundWith"},{"display_html":"sortAround :: (Point_ center 2 r, Point_ point 2 r, Num r, Ord r) => center -> [point] -> [point]","name":"sortAround","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:sortAround"},{"display_html":"insertIntoCyclicOrder :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> CList point -> CList point","name":"insertIntoCyclicOrder","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:insertIntoCyclicOrder"},{"display_html":"data Quadrant","name":"Quadrant TopRight TopLeft BottomLeft BottomRight","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Quadrant"},{"display_html":"quadrantWith :: (Ord r, Point_ point 2 r) => point -> point -> Quadrant","name":"quadrantWith","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:quadrantWith"},{"display_html":"quadrant :: (Ord r, Num r, ConstructablePoint_ point 2 r) => point -> Quadrant","name":"quadrant","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:quadrant"},{"display_html":"partitionIntoQuadrants :: (Ord r, Point_ point 2 r) => point -> [point] -> ([point], [point], [point], [point])","name":"partitionIntoQuadrants","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:partitionIntoQuadrants"},{"display_html":"cmpByDistanceTo :: (Ord r, Num r, Point_ point d r, Point_ center d r, Metric_ (Vector d r) d r) => center -> point -> point -> Ordering","name":"cmpByDistanceTo","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cmpByDistanceTo"},{"display_html":"cmpInDirection :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering","name":"cmpInDirection","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cmpInDirection"},{"display_html":"squaredEuclideanDist :: (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r","name":"squaredEuclideanDist","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:squaredEuclideanDist"},{"display_html":"euclideanDist :: (Radical r, Point_ point d r, Metric_ (Vector d r) d r) => point -> point -> r","name":"euclideanDist","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:euclideanDist"},{"display_html":"class Metric_ (Vector (Dimension g) (NumType g)) (Dimension g) (NumType g) => HasSquaredEuclideanDistance g where","name":"HasSquaredEuclideanDistance pointClosestToWithDistance pointClosestTo squaredEuclideanDistTo","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasSquaredEuclideanDistance"},{"display_html":"class HasPoints s t point point' | s -> point, t -> point' where","name":"HasPoints allPoints","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasPoints"},{"display_html":"type HasPoints' s point = HasPoints s s point point","name":"HasPoints'","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasPoints-39-"},{"display_html":"allSimplePolygons :: [SimplePolygon (Point 2 Double)]","name":"allSimplePolygons","module":"HGeometry.Polygon.Instances","link":"hgeometry/quickcheck/HGeometry-Polygon-Instances.html#v:allSimplePolygons"},{"display_html":"data ZoomDirection","name":"ZoomDirection ZoomIn ZoomOut","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#t:ZoomDirection"},{"display_html":"class HasZoomLevel canvas r | canvas -> r where","name":"HasZoomLevel zoomLevel","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#t:HasZoomLevel"},{"display_html":"newtype ZoomAction = ZoomAction ZoomDirection","name":"ZoomAction ZoomAction","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#t:ZoomAction"},{"display_html":"update :: (Fractional r, Ord r, HasZoomLevel canvas r) => canvas -> ZoomAction -> Effect action canvas","name":"update","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#v:update"},{"display_html":"renderSvgToFile :: OsPath -> View action -> IO ()","name":"renderSvgToFile","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:renderSvgToFile"},{"display_html":"renderAsSvgText :: View action -> Text","name":"renderAsSvgText","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:renderAsSvgText"},{"display_html":"renderAsSvgByteString :: View action -> ByteString","name":"renderAsSvgByteString","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:renderAsSvgByteString"},{"display_html":"withAts :: ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action","name":"withAts","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:withAts"},{"display_html":"withAts' :: ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> [View action] -> View action","name":"withAts'","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:withAts-39-"},{"display_html":"class Drawable t where","name":"Drawable draw drawWith","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#t:Drawable"},{"display_html":"dPoint :: (Point_ point 2 r, ToMisoString r) => point -> [Attribute action] -> View action","name":"dPoint","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dPoint"},{"display_html":"dLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r, ToMisoString r) => lineSegment -> [Attribute action] -> View action","name":"dLineSegment","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dLineSegment"},{"display_html":"dRectangle :: (Rectangle_ rectangle point, Point_ point 2 r, ToMisoString r, Num r) => rectangle -> [Attribute action] -> View action","name":"dRectangle","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dRectangle"},{"display_html":"dCircle :: (Point_ point 2 r, ToMisoString r) => Circle point -> [Attribute action] -> View action","name":"dCircle","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dCircle"},{"display_html":"dDisk :: (Disk_ disk point, Point_ point 2 r, ToMisoString r, Floating r) => disk -> [Attribute action] -> View action","name":"dDisk","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dDisk"},{"display_html":"dPolyLine :: (PolyLine_ polyLine point, Point_ point 2 r, ToMisoString r) => polyLine -> [Attribute action] -> View action","name":"dPolyLine","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dPolyLine"},{"display_html":"dSimplePolygon :: (SimplePolygon_ simplePolygon point r, ToMisoString r) => simplePolygon -> [Attribute action] -> View action","name":"dSimplePolygon","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dSimplePolygon"},{"display_html":"module HGeometry.Miso.Svg","name":"","module":"HGeometry.Svg","link":"hgeometry/svg"},{"display_html":"data StaticCanvas r","name":"StaticCanvas","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#t:StaticCanvas"},{"display_html":"staticCanvas :: Num r => Int -> Int -> StaticCanvas r","name":"staticCanvas","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#v:staticCanvas"},{"display_html":"class HasDimensions s a | s -> a where","name":"HasDimensions dimensions","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#t:HasDimensions"},{"display_html":"staticCanvas_ :: (RealFrac r, ToSvgCoordinate r) => StaticCanvas r -> [Attribute action] -> [View action] -> View action","name":"staticCanvas_","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#v:staticCanvas_"},{"display_html":"type ToSvgCoordinate = ToMisoString","name":"ToSvgCoordinate","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#t:ToSvgCoordinate"},{"display_html":"matrixToMisoString :: ToSvgCoordinate r => Matrix 3 3 r -> MisoString","name":"matrixToMisoString","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#v:matrixToMisoString"},{"display_html":"data Canvas r","name":"Canvas","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:Canvas"},{"display_html":"theViewport :: Lens (Canvas r) (Canvas s) (Viewport r) (Viewport s)","name":"theViewport","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:theViewport"},{"display_html":"blankCanvas :: Num r => Int -> Int -> Canvas r","name":"blankCanvas","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:blankCanvas"},{"display_html":"class HasDimensions s a | s -> a where","name":"HasDimensions dimensions","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:HasDimensions"},{"display_html":"class HasMousePosition s a | s -> a where","name":"HasMousePosition mousePosition","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:HasMousePosition"},{"display_html":"mouseCoordinates :: Fractional r => Getter (Canvas r) (Maybe (Point 2 r))","name":"mouseCoordinates","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:mouseCoordinates"},{"display_html":"data InternalCanvasAction","name":"InternalCanvasAction","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:InternalCanvasAction"},{"display_html":"handleInternalCanvasAction :: Canvas r -> InternalCanvasAction -> Effect action (Canvas r)","name":"handleInternalCanvasAction","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:handleInternalCanvasAction"},{"display_html":"withCanvasEvents :: Map MisoString Bool -> Map MisoString Bool","name":"withCanvasEvents","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:withCanvasEvents"},{"display_html":"svgCanvas_ :: (RealFrac r, ToSvgCoordinate r) => Canvas r -> [Attribute action] -> [View action] -> View (Either InternalCanvasAction action)","name":"svgCanvas_","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:svgCanvas_"},{"display_html":"type family Dimension t :: Nat","name":"Dimension","module":"HGeometry.Properties","link":"hgeometry/vector/HGeometry-Properties.html#t:Dimension"},{"display_html":"type family NumType t :: Type","name":"NumType","module":"HGeometry.Properties","link":"hgeometry/vector/HGeometry-Properties.html#t:NumType"},{"display_html":"class (r ~ IxValue vector, s ~ IxValue vector', d ~ Dimension vector, d ~ Dimension vector') => AsVector_ vector vector' d r s | vector -> d, vector -> r, vector' -> s where","name":"AsVector_ _Vector","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:AsVector_"},{"display_html":"class (HasComponents vector vector, AsVector_ vector vector d r r, KnownNat d) => Vector_ vector d r where","name":"Vector_ generateA component'","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Vector_"},{"display_html":"type Has_ c d r = c (Vector d r) d r","name":"Has_","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Has_"},{"display_html":"generate :: Vector_ vector d r => (Int -> r) -> vector","name":"generate","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:generate"},{"display_html":"vectorFromList :: Vector_ vector d r => [r] -> Maybe vector","name":"vectorFromList","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:vectorFromList"},{"display_html":"component :: forall i vector r d. (i <= (d - 1), KnownNat i, Vector_ vector d r) => IndexedLens' Int vector r","name":"component","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:component"},{"display_html":"xComponent :: (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r","name":"xComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:xComponent"},{"display_html":"yComponent :: (Vector_ vector d r, 2 <= d) => IndexedLens' Int vector r","name":"yComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:yComponent"},{"display_html":"zComponent :: (Vector_ vector d r, 3 <= d) => IndexedLens' Int vector r","name":"zComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:zComponent"},{"display_html":"wComponent :: (Vector_ vector d r, 4 <= d) => IndexedLens' Int vector r","name":"wComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:wComponent"},{"display_html":"head :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r","name":"head","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:head"},{"display_html":"last :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r","name":"last","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:last"},{"display_html":"prefix :: forall i d vector vector' r. (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector'","name":"prefix","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:prefix"},{"display_html":"suffix :: forall i d vector vector' r. (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector'","name":"suffix","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:suffix"},{"display_html":"cons :: forall vector' vector d r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => r -> vector -> vector'","name":"cons","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:cons"},{"display_html":"snoc :: forall vector' vector d r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector'","name":"snoc","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:snoc"},{"display_html":"uncons :: forall vector' vector d r. (Vector_ vector (d + 1) r, Vector_ vector' d r, 0 <= ((d + 1) - 1), d <= Dimension vector) => vector -> (r, vector')","name":"uncons","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:uncons"},{"display_html":"unsnoc :: forall vector' vector d r. (Vector_ vector (d + 1) r, Vector_ vector' d r, d <= ((d + 1) - 1), d <= Dimension vector) => vector -> (vector', r)","name":"unsnoc","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:unsnoc"},{"display_html":"class Vector_ vector d r => Additive_ vector d r where","name":"Additive_ liftU2 liftI2A","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Additive_"},{"display_html":"zero :: (Num r, Additive_ vector d r) => vector","name":"zero","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:zero"},{"display_html":"liftI2 :: Additive_ vector d r => (r -> r -> r) -> vector -> vector -> vector","name":"liftI2","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:liftI2"},{"display_html":"lerp :: (Num r, Additive_ vector d r) => r -> vector -> vector -> vector","name":"lerp","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:lerp"},{"display_html":"(^+^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector","name":"^+^","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--43--94-"},{"display_html":"(^-^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector","name":"^-^","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--45--94-"},{"display_html":"negated :: (Num r, Vector_ vector d r) => vector -> vector","name":"negated","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:negated"},{"display_html":"(*^) :: (Num r, Vector_ vector d r) => r -> vector -> vector","name":"*^","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-42--94-"},{"display_html":"(^*) :: (Num r, Vector_ vector d r) => vector -> r -> vector","name":"^*","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--42-"},{"display_html":"(^/) :: (Vector_ vector d r, Fractional r) => vector -> r -> vector","name":"^/","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--47-"},{"display_html":"sumV :: (Foldable f, Additive_ vector d r, Num r) => f vector -> vector","name":"sumV","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:sumV"},{"display_html":"basis :: (Additive_ vector d r, Num r) => [vector]","name":"basis","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:basis"},{"display_html":"unit :: forall vector d r. (Additive_ vector d r, Num r) => vector","name":"unit","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:unit"},{"display_html":"foldMapZip :: (Additive_ vector d r, Semigroup m) => (r -> r -> m) -> vector -> vector -> m","name":"foldMapZip","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:foldMapZip"},{"display_html":"class Additive_ vector d r => Metric_ vector d r where","name":"Metric_ dot norm qd quadrance signorm","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Metric_"},{"display_html":"data family Vector (d :: Nat) (r :: Type)","name":"Vector Vector1 Vector2 Vector3 Vector4 MkVector1 MkVector2 MkVector3 MkVector4","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#t:Vector"},{"display_html":"class HasComponents vector vector' where","name":"HasComponents components","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#t:HasComponents"},{"display_html":"module HGeometry.Vector.Class","name":"","module":"HGeometry.Vector","link":"hgeometry/vector"},{"display_html":"isScalarMultipleOf :: (Eq r, Num r, Metric_ vector d r) => vector -> vector -> Bool","name":"isScalarMultipleOf","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:isScalarMultipleOf"},{"display_html":"scalarMultiple :: (Eq r, Fractional r, Additive_ vector d r) => vector -> vector -> Maybe r","name":"scalarMultiple","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:scalarMultiple"},{"display_html":"sameDirection :: (Additive_ vector d r, Num r, Eq r) => vector -> vector -> Bool","name":"sameDirection","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:sameDirection"},{"display_html":"cross :: Num r => Vector 3 r -> Vector 3 r -> Vector 3 r","name":"cross","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:cross"},{"display_html":"binarySearchFirst :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchFirst","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirst"},{"display_html":"binarySearchLast :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchLast","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchLast"},{"display_html":"binarySearchUntil :: (Fractional r, Ord r) => r -> (r -> Bool) -> r -> r -> r","name":"binarySearchUntil","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchUntil"},{"display_html":"data BinarySearchResult a","name":"BinarySearchResult AllFalse AllTrue FlipsAt","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#t:BinarySearchResult"},{"display_html":"firstTrue :: BinarySearchResult a -> Maybe a","name":"firstTrue","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:firstTrue"},{"display_html":"lastFalse :: BinarySearchResult a -> Maybe a","name":"lastFalse","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:lastFalse"},{"display_html":"class BinarySearch v where","name":"BinarySearch Index Elem binarySearchIn binarySearchIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#t:BinarySearch"},{"display_html":"binarySearchFirstIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchFirstIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIn"},{"display_html":"binarySearchFirstIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchFirstIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIdxIn"},{"display_html":"binarySearchLastIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchLastIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIn"},{"display_html":"binarySearchLastIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchLastIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIdxIn"},{"display_html":"divideAndConquer :: (Foldable f, Monoid s) => (a -> s) -> f a -> s","name":"divideAndConquer","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer"},{"display_html":"divideAndConquer1 :: (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s","name":"divideAndConquer1","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1"},{"display_html":"divideAndConquer1With :: Foldable1 f => (s -> s -> s) -> (a -> s) -> f a -> s","name":"divideAndConquer1With","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1With"},{"display_html":"mergeSorted :: Ord a => NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSorted","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSorted"},{"display_html":"mergeSortedLists :: Ord a => [a] -> [a] -> [a]","name":"mergeSortedLists","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedLists"},{"display_html":"mergeSortedBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSortedBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedBy"},{"display_html":"mergeSortedListsBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]","name":"mergeSortedListsBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedListsBy"},{"display_html":"newtype InsertionOnly static a = InsertionOnly [Maybe (static a)]","name":"InsertionOnly InsertionOnly","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#t:InsertionOnly"},{"display_html":"empty :: InsertionOnly static a","name":"empty","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#v:empty"},{"display_html":"class LogarithmicMethodDS static a where","name":"LogarithmicMethodDS singleton build merge","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#t:LogarithmicMethodDS"},{"display_html":"insert :: LogarithmicMethodDS static a => a -> InsertionOnly static a -> InsertionOnly static a","name":"insert","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#v:insert"},{"display_html":"queryWith :: Monoid m => (static a -> m) -> InsertionOnly static a -> m","name":"queryWith","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#v:queryWith"},{"display_html":"insertOrd :: Ord a => a -> CList a -> CList a","name":"insertOrd","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:insertOrd"},{"display_html":"insertOrdBy :: (a -> a -> Ordering) -> a -> CList a -> CList a","name":"insertOrdBy","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:insertOrdBy"},{"display_html":"insertOrdBy' :: (a -> a -> Ordering) -> a -> [a] -> [a]","name":"insertOrdBy'","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:insertOrdBy-39-"},{"display_html":"splitIncr :: (a -> a -> Ordering) -> [a] -> ([a], [a])","name":"splitIncr","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:splitIncr"},{"display_html":"isShiftOf :: Eq a => CList a -> CList a -> Bool","name":"isShiftOf","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:isShiftOf"},{"display_html":"data STR a b c = STR !a !b !c","name":"STR STR","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:STR"},{"display_html":"type Three = V3","name":"Three","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:Three"},{"display_html":"pattern Three :: a -> a -> a -> Three a","name":"Three","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:Three"},{"display_html":"uniqueTriplets :: Foldable f => f a -> [Three a]","name":"uniqueTriplets","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:uniqueTriplets"},{"display_html":"data SP a b = SP !a !b","name":"SP SP","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:SP"},{"display_html":"type Two = V2","name":"Two","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:Two"},{"display_html":"pattern Two :: a -> a -> Two a","name":"Two","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:Two"},{"display_html":"uniquePairs :: Foldable f => f a -> [Two a]","name":"uniquePairs","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:uniquePairs"},{"display_html":"nonEmptyTails :: [a] -> [[a]]","name":"nonEmptyTails","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:nonEmptyTails"},{"display_html":"data core :+ extra = core :+ extra","name":":+ :+","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t::-43-"},{"display_html":"_core :: (core :+ extra) -> core","name":"_core","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:_core"},{"display_html":"_extra :: (core :+ extra) -> extra","name":"_extra","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:_extra"},{"display_html":"core :: Lens (core :+ extra) (core' :+ extra) core core'","name":"core","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:core"},{"display_html":"extra :: Lens (core :+ extra) (core :+ extra') extra extra'","name":"extra","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:extra"},{"display_html":"ext :: a -> a :+ ()","name":"ext","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:ext"},{"display_html":"class AsA t c | t -> c where","name":"AsA asCore","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t:AsA"},{"display_html":"type (:~) t c = t `AsA` c","name":":~","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t::-126-"},{"display_html":"pattern AsA :: t :~ c => c -> t","name":"AsA","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:AsA"},{"display_html":"class AsExt t where","name":"AsExt _Ext ExtraOf CoreOf","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t:AsExt"},{"display_html":"asIndexedExt :: (Indexable i p, Functor f) => p (s :+ i) (f (t :+ j)) -> Indexed i s (f t)","name":"asIndexedExt","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:asIndexedExt"},{"display_html":"sortBy :: forall vector f a. (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a","name":"sortBy","module":"HGeometry.Foldable.Sort","link":"hgeometry-combinatorial/HGeometry-Foldable-Sort.html#v:sortBy"},{"display_html":"sort :: forall vector f a. (Foldable f, Vector vector a, Ord a) => f a -> vector a","name":"sort","module":"HGeometry.Foldable.Sort","link":"hgeometry-combinatorial/HGeometry-Foldable-Sort.html#v:sort"},{"display_html":"sortOnCheap :: forall vector f a b. (Foldable f, Vector vector a, Ord b) => (a -> b) -> f a -> vector a","name":"sortOnCheap","module":"HGeometry.Foldable.Sort","link":"hgeometry-combinatorial/HGeometry-Foldable-Sort.html#v:sortOnCheap"},{"display_html":"class HasFromFoldable f where","name":"HasFromFoldable fromList fromFoldable","module":"HGeometry.Foldable.Util","link":"hgeometry-combinatorial/HGeometry-Foldable-Util.html#t:HasFromFoldable"},{"display_html":"class HasFromFoldable1 f where","name":"HasFromFoldable1 fromNonEmpty fromFoldable1","module":"HGeometry.Foldable.Util","link":"hgeometry-combinatorial/HGeometry-Foldable-Util.html#t:HasFromFoldable1"},{"display_html":"class HasIndex a where","name":"HasIndex sosIndex","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#t:HasIndex"},{"display_html":"type Index = Int","name":"Index","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#t:Index"},{"display_html":"data WithIndex a = WithIndex !Index a","name":"WithIndex WithIndex","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#t:WithIndex"},{"display_html":"theValue :: Lens (WithIndex a) (WithIndex b) a b","name":"theValue","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:theValue"},{"display_html":"labelWithIndex :: Traversable t => t a -> t (WithIndex a)","name":"labelWithIndex","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:labelWithIndex"},{"display_html":"labelWith :: Traversable t => (Index -> a -> b) -> t a -> t b","name":"labelWith","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:labelWith"},{"display_html":"labelWith' :: forall t a b. Traversable t => (Index -> a -> b) -> t a -> (t b, Int)","name":"labelWith'","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:labelWith-39-"},{"display_html":"folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a","name":"folding1","module":"HGeometry.Lens.Util","link":"hgeometry-combinatorial/HGeometry-Lens-Util.html#v:folding1"},{"display_html":"ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) => (s -> f (i, a)) -> Over p g s t a b","name":"ifolding1","module":"HGeometry.Lens.Util","link":"hgeometry-combinatorial/HGeometry-Lens-Util.html#v:ifolding1"},{"display_html":"itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i, a)) s a -> s -> NonEmpty (i, a)","name":"itoNonEmptyOf","module":"HGeometry.Lens.Util","link":"hgeometry-combinatorial/HGeometry-Lens-Util.html#v:itoNonEmptyOf"},{"display_html":"data Zipper a = Zipper [a] [a]","name":"Zipper Zipper","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#t:Zipper"},{"display_html":"fromList :: [a] -> Zipper a","name":"fromList","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:fromList"},{"display_html":"goNext :: Zipper a -> Maybe (Zipper a)","name":"goNext","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:goNext"},{"display_html":"goPrev :: Zipper a -> Maybe (Zipper a)","name":"goPrev","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:goPrev"},{"display_html":"allNexts :: Zipper a -> [Zipper a]","name":"allNexts","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:allNexts"},{"display_html":"extractNext :: Zipper a -> Maybe (a, Zipper a)","name":"extractNext","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:extractNext"},{"display_html":"dropNext :: Zipper a -> Maybe (Zipper a)","name":"dropNext","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:dropNext"},{"display_html":"allNonEmptyNexts :: Zipper a -> [Zipper a]","name":"allNonEmptyNexts","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:allNonEmptyNexts"},{"display_html":"class Measured f a where","name":"Measured measure","module":"HGeometry.Measured.Class","link":"hgeometry-combinatorial/HGeometry-Measured-Class.html#t:Measured"},{"display_html":"class Measured f a => CanInsert f a where","name":"CanInsert insertMeasure","module":"HGeometry.Measured.Class","link":"hgeometry-combinatorial/HGeometry-Measured-Class.html#t:CanInsert"},{"display_html":"class Measured f a => CanDelete f a where","name":"CanDelete deleteMeasure","module":"HGeometry.Measured.Class","link":"hgeometry-combinatorial/HGeometry-Measured-Class.html#t:CanDelete"},{"display_html":"module HGeometry.Measured.Class","name":"","module":"HGeometry.Measured","link":"hgeometry-combinatorial"},{"display_html":"newtype Count a = Count Word","name":"Count Count","module":"HGeometry.Measured.Size","link":"hgeometry-combinatorial/HGeometry-Measured-Size.html#t:Count"},{"display_html":"data Sized a = Sized !(Count a) a","name":"Sized Sized","module":"HGeometry.Measured.Size","link":"hgeometry-combinatorial/HGeometry-Measured-Size.html#t:Sized"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a]","name":"extractMinimaBy","module":"HGeometry.NonEmpty.Util","link":"hgeometry-combinatorial/HGeometry-NonEmpty-Util.html#v:extractMinimaBy"},{"display_html":"leaveOutOne :: [a] -> [(a, [a])]","name":"leaveOutOne","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:leaveOutOne"},{"display_html":"minimumMaybe :: Ord a => [a] -> Maybe a","name":"minimumMaybe","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimumMaybe"},{"display_html":"maximumMaybe :: Ord a => [a] -> Maybe a","name":"maximumMaybe","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:maximumMaybe"},{"display_html":"minimumMaybeBy :: (a -> a -> Ordering) -> [a] -> Maybe a","name":"minimumMaybeBy","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimumMaybeBy"},{"display_html":"minimaOn :: Ord b => (a -> b) -> [a] -> [a]","name":"minimaOn","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimaOn"},{"display_html":"minimaBy :: (a -> a -> Ordering) -> [a] -> [a]","name":"minimaBy","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimaBy"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> [a] -> [a] :+ [a]","name":"extractMinimaBy","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:extractMinimaBy"},{"display_html":"partition3 :: Foldable f => (a -> Ordering) -> f a -> ([a], [a], [a])","name":"partition3","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:partition3"},{"display_html":"groupBy' :: (a -> a -> Ordering) -> [a] -> [NonEmpty a]","name":"groupBy'","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:groupBy-39-"},{"display_html":"class Num r => Radical r where","name":"Radical sqrt","module":"HGeometry.Number.Radical","link":"hgeometry-combinatorial/HGeometry-Number-Radical.html#t:Radical"},{"display_html":"data GRatio a","name":"GRatio","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#t:GRatio"},{"display_html":"(%) :: (Eq a, Num a) => a -> a -> GRatio a","name":"%","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#v:-37-"},{"display_html":"numerator :: GRatio a -> a","name":"numerator","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#v:numerator"},{"display_html":"denominator :: GRatio a -> a","name":"denominator","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#v:denominator"},{"display_html":"newtype RealNumber (p :: Nat) = RealNumber Rational","name":"RealNumber RealNumber","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#t:RealNumber"},{"display_html":"data AsFixed p","name":"AsFixed Exact Lossy","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#t:AsFixed"},{"display_html":"asFixed :: KnownNat p => RealNumber p -> AsFixed (NatPrec p)","name":"asFixed","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#v:asFixed"},{"display_html":"toFixed :: KnownNat p => RealNumber p -> Fixed (NatPrec p)","name":"toFixed","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#v:toFixed"},{"display_html":"fromFixed :: KnownNat p => Fixed (NatPrec p) -> RealNumber p","name":"fromFixed","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#v:fromFixed"},{"display_html":"type Nat = Natural","name":"Nat","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#t:Nat"},{"display_html":"newtype O (s :: Type) (a :: Type) = O {}","name":"O runO O","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#t:O"},{"display_html":"newtype OrdDict a = OrdDict {}","name":"OrdDict compare_ OrdDict","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#t:OrdDict"},{"display_html":"withOrd :: (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b","name":"withOrd","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:withOrd"},{"display_html":"extractOrd1 :: f (O s a) -> O s (f a)","name":"extractOrd1","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:extractOrd1"},{"display_html":"introOrd1 :: f a -> f (O s a)","name":"introOrd1","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:introOrd1"},{"display_html":"liftOrd1 :: (f (O s a) -> g (O s a)) -> f a -> O s (g a)","name":"liftOrd1","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:liftOrd1"},{"display_html":"extractOrd2 :: f (O s k) v -> O s (f k v)","name":"extractOrd2","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:extractOrd2"},{"display_html":"introOrd2 :: f k v -> f (O s k) v","name":"introOrd2","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:introOrd2"},{"display_html":"data Alternating f sep a = Alternating a (f (sep, a))","name":"Alternating Alternating","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#t:Alternating"},{"display_html":"fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a","name":"fromNonEmptyWith","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:fromNonEmptyWith"},{"display_html":"mapF :: (f (sep, a) -> g (sep', a)) -> Alternating f sep a -> Alternating g sep' a","name":"mapF","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:mapF"},{"display_html":"withNeighbours :: Foldable f => Alternating f sep a -> [(a, sep, a)]","name":"withNeighbours","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:withNeighbours"},{"display_html":"mergeAlternating :: Ord t => (t -> a -> b -> c) -> Alternating List t a -> Alternating List t b -> [(t, c)]","name":"mergeAlternating","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:mergeAlternating"},{"display_html":"insertBreakPoints :: Ord t => [t] -> Alternating List t a -> Alternating List t a","name":"insertBreakPoints","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:insertBreakPoints"},{"display_html":"reverse :: Alternating List b a -> Alternating List b a","name":"reverse","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:reverse"},{"display_html":"consElemWith :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> a -> Alternating f sep a -> Alternating f sep a","name":"consElemWith","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:consElemWith"},{"display_html":"unconsAlt :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a)","name":"unconsAlt","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:unconsAlt"},{"display_html":"snocElemWith :: Snoc (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> Alternating f sep a -> a -> Alternating f sep a","name":"snocElemWith","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:snocElemWith"},{"display_html":"data ViewL1 a = a :<< (Seq a)","name":"ViewL1 :<<","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#t:ViewL1"},{"display_html":"data ViewR1 a = (Seq a) :>> a","name":"ViewR1 :>>","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#t:ViewR1"},{"display_html":"viewl1 :: ViewR1 a -> ViewL1 a","name":"viewl1","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:viewl1"},{"display_html":"viewr1 :: ViewL1 a -> ViewR1 a","name":"viewr1","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:viewr1"},{"display_html":"(|>>) :: ViewR1 a -> a -> ViewR1 a","name":"|>>","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:-124--62--62-"},{"display_html":"(<>>) :: ViewR1 a -> Seq a -> ViewR1 a","name":"<>>","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:-60--62--62-"},{"display_html":"splitL1At :: Int -> ViewL1 a -> Maybe (Seq a, a, Seq a)","name":"splitL1At","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:splitL1At"},{"display_html":"splitR1At :: Int -> ViewR1 a -> Maybe (Seq a, a, Seq a)","name":"splitR1At","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:splitR1At"},{"display_html":"toggle :: Ord a => a -> Set a -> Set a","name":"toggle","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:toggle"},{"display_html":"splitOn :: Ord b => (a -> b) -> b -> Set a -> (Set a, Set a, Set a)","name":"splitOn","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:splitOn"},{"display_html":"splitBy :: (a -> Ordering) -> Set a -> (Set a, Set a, Set a)","name":"splitBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:splitBy"},{"display_html":"fromListBy :: (a -> a -> Ordering) -> [a] -> Set a","name":"fromListBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:fromListBy"},{"display_html":"join :: Set a -> Set a -> Set a","name":"join","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:join"},{"display_html":"insertBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"insertBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:insertBy"},{"display_html":"deleteAllBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"deleteAllBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:deleteAllBy"},{"display_html":"queryBy :: (a -> a -> Ordering) -> (forall b. Ord b => b -> Set b -> t b) -> a -> Set a -> t a","name":"queryBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:queryBy"},{"display_html":"toggleBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"toggleBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:toggleBy"},{"display_html":"data Sign","name":"Sign Positive Negative","module":"HGeometry.Sign","link":"hgeometry-combinatorial/HGeometry-Sign.html#t:Sign"},{"display_html":"flipSign :: Sign -> Sign","name":"flipSign","module":"HGeometry.Sign","link":"hgeometry-combinatorial/HGeometry-Sign.html#v:flipSign"},{"display_html":"signFromTerms :: (Num r, Eq r, Foldable1 f) => f r -> Maybe Sign","name":"signFromTerms","module":"HGeometry.Sign","link":"hgeometry-combinatorial/HGeometry-Sign.html#v:signFromTerms"},{"display_html":"data EpsFold i","name":"EpsFold","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:EpsFold"},{"display_html":"eps :: i -> EpsFold i","name":"eps","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:eps"},{"display_html":"mkEpsFold :: Ord i => [i] -> EpsFold i","name":"mkEpsFold","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:mkEpsFold"},{"display_html":"evalEps :: (Fractional r, Integral i, Integral j) => j -> r -> EpsFold i -> r","name":"evalEps","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:evalEps"},{"display_html":"hasNoPertubation :: EpsFold i -> Bool","name":"hasNoPertubation","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:hasNoPertubation"},{"display_html":"factors :: EpsFold i -> Bag i","name":"factors","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:factors"},{"display_html":"suitableBase :: EpsFold i -> Int","name":"suitableBase","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:suitableBase"},{"display_html":"data Term i r = Term !r (EpsFold i)","name":"Term Term","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:Term"},{"display_html":"term :: r -> i -> Term i r","name":"term","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:term"},{"display_html":"constantFactor :: Lens' (Term i r) r","name":"constantFactor","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:constantFactor"},{"display_html":"data Symbolic i r","name":"Symbolic","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:Symbolic"},{"display_html":"constant :: Ord i => r -> Symbolic i r","name":"constant","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:constant"},{"display_html":"symbolic :: Ord i => r -> i -> Symbolic i r","name":"symbolic","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:symbolic"},{"display_html":"perturb :: (Num r, Ord i) => r -> i -> Symbolic i r","name":"perturb","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:perturb"},{"display_html":"toTerms :: Symbolic i r -> [Term i r]","name":"toTerms","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:toTerms"},{"display_html":"signOf :: (Num r, Eq r) => Symbolic i r -> Maybe Sign","name":"signOf","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:signOf"},{"display_html":"roundToConstant :: Num r => Symbolic i r -> r","name":"roundToConstant","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:roundToConstant"},{"display_html":"type SoSRational i r = GRatio (Symbolic i r)","name":"SoSRational","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:SoSRational"},{"display_html":"sosRational :: (Ord i, Eq r, Num r) => Symbolic i r -> Symbolic i r -> SoSRational i r","name":"sosRational","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:sosRational"},{"display_html":"isSubStringOf :: (Eq a, Foldable p, Foldable t) => p a -> t a -> Maybe Int","name":"isSubStringOf","module":"HGeometry.StringSearch.KMP","link":"hgeometry-combinatorial/HGeometry-StringSearch-KMP.html#v:isSubStringOf"},{"display_html":"kmpMatch :: Eq a => Vector a -> Vector a -> Maybe Int","name":"kmpMatch","module":"HGeometry.StringSearch.KMP","link":"hgeometry-combinatorial/HGeometry-StringSearch-KMP.html#v:kmpMatch"},{"display_html":"buildFailureFunction :: forall a. Eq a => Vector a -> Vector Int","name":"buildFailureFunction","module":"HGeometry.StringSearch.KMP","link":"hgeometry-combinatorial/HGeometry-StringSearch-KMP.html#v:buildFailureFunction"},{"display_html":"data TreeNode v a","name":"TreeNode LeafNode InternalNode","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#t:TreeNode"},{"display_html":"_TreeNodeEither :: Iso' (TreeNode v p) (Either v p)","name":"_TreeNodeEither","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:_TreeNodeEither"},{"display_html":"data Zipper a = Zipper {}","name":"Zipper ancestors focus Zipper","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#t:Zipper"},{"display_html":"root :: Tree a -> Zipper a","name":"root","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:root"},{"display_html":"up :: Zipper a -> Maybe (Zipper a)","name":"up","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:up"},{"display_html":"firstChild :: Zipper a -> Maybe (Zipper a)","name":"firstChild","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:firstChild"},{"display_html":"nextSibling :: Zipper a -> Maybe (Zipper a)","name":"nextSibling","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:nextSibling"},{"display_html":"prevSibling :: Zipper a -> Maybe (Zipper a)","name":"prevSibling","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:prevSibling"},{"display_html":"allChildren :: Zipper a -> [Zipper a]","name":"allChildren","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:allChildren"},{"display_html":"allTrees :: Zipper a -> [Zipper a]","name":"allTrees","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:allTrees"},{"display_html":"unZipperLocal :: Zipper a -> Tree a","name":"unZipperLocal","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:unZipperLocal"},{"display_html":"constructTree :: [([Tree a], a, [Tree a])] -> Maybe (Tree a)","name":"constructTree","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:constructTree"},{"display_html":"findEvert :: (a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findEvert"},{"display_html":"findEvert' :: (Tree a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert'","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findEvert-39-"},{"display_html":"findPath :: (a -> Bool) -> (a -> Bool) -> Tree a -> Maybe [a]","name":"findPath","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findPath"},{"display_html":"findNode :: (a -> Bool) -> Tree a -> Maybe [a]","name":"findNode","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findNode"},{"display_html":"findNodes :: (Tree a -> Bool) -> Tree a -> [[a]]","name":"findNodes","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findNodes"},{"display_html":"levels :: Tree a -> NonEmpty (NonEmpty a)","name":"levels","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:levels"},{"display_html":"data BinLeafTree v a","name":"BinLeafTree Node Leaf","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#t:BinLeafTree"},{"display_html":"node :: (Measured f a, Semigroup (f a)) => BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a","name":"node","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:node"},{"display_html":"asBalancedBinLeafTree :: Foldable1 f => f a -> BinLeafTree (Count a) a","name":"asBalancedBinLeafTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:asBalancedBinLeafTree"},{"display_html":"foldUp :: (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b","name":"foldUp","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:foldUp"},{"display_html":"foldUpData :: (w -> v -> w -> w) -> (a -> w) -> BinLeafTree v a -> BinLeafTree w a","name":"foldUpData","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:foldUpData"},{"display_html":"zipExactWith :: (u -> v -> w) -> (a -> b -> c) -> BinLeafTree u a -> BinLeafTree v b -> BinLeafTree w c","name":"zipExactWith","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:zipExactWith"},{"display_html":"toRoseTree :: BinLeafTree v a -> Tree (TreeNode v a)","name":"toRoseTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:toRoseTree"},{"display_html":"drawTree :: (Show v, Show a) => BinLeafTree v a -> String","name":"drawTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:drawTree"},{"display_html":"data BinaryTree a","name":"BinaryTree Internal Nil","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#t:BinaryTree"},{"display_html":"asBalancedBinTree :: forall f a. Foldable f => f a -> BinaryTree a","name":"asBalancedBinTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:asBalancedBinTree"},{"display_html":"access :: BinaryTree a -> Maybe a","name":"access","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:access"},{"display_html":"foldBinaryUp :: b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)","name":"foldBinaryUp","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:foldBinaryUp"},{"display_html":"toRoseTree' :: BinaryTree a -> Maybe (Tree a)","name":"toRoseTree'","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:toRoseTree-39-"},{"display_html":"drawTree' :: Show a => BinaryTree a -> String","name":"drawTree'","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:drawTree-39-"},{"display_html":"newtype Report a where","name":"Report Report MkReport","module":"HGeometry.Measured.Report","link":"hgeometry-combinatorial/HGeometry-Measured-Report.html#t:Report"},{"display_html":"newtype Report1 a = Report1 (BinLeafTree (Const () a) a)","name":"Report1 Report1","module":"HGeometry.Measured.Report","link":"hgeometry-combinatorial/HGeometry-Measured-Report.html#t:Report1"},{"display_html":"newtype ReportList a = ReportList [a]","name":"ReportList ReportList","module":"HGeometry.Measured.Report","link":"hgeometry-combinatorial/HGeometry-Measured-Report.html#t:ReportList"},{"display_html":"data Top a where","name":"Top ValT Top","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#t:Top"},{"display_html":"topToMaybe :: Top a -> Maybe a","name":"topToMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:topToMaybe"},{"display_html":"_ValT :: Prism (Top a) (Top b) a b","name":"_ValT","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_ValT"},{"display_html":"_Top :: Prism' (Top a) ()","name":"_Top","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_Top"},{"display_html":"_TopMaybe :: Iso' (Top a) (Maybe a)","name":"_TopMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_TopMaybe"},{"display_html":"data Bottom a where","name":"Bottom Bottom ValB","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#t:Bottom"},{"display_html":"bottomToMaybe :: Bottom a -> Maybe a","name":"bottomToMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:bottomToMaybe"},{"display_html":"_ValB :: Prism (Bottom a) (Bottom b) a b","name":"_ValB","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_ValB"},{"display_html":"_Bottom :: Prism' (Bottom a) ()","name":"_Bottom","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_Bottom"},{"display_html":"_BottomMaybe :: Iso' (Bottom a) (Maybe a)","name":"_BottomMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_BottomMaybe"},{"display_html":"data UnBounded a","name":"UnBounded MaxInfinity MinInfinity Val _unUnBounded","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#t:UnBounded"},{"display_html":"_Val :: Prism (UnBounded a) (UnBounded b) a b","name":"_Val","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_Val"},{"display_html":"unBoundedToMaybe :: UnBounded a -> Maybe a","name":"unBoundedToMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:unBoundedToMaybe"},{"display_html":"data Permutation a = Permutation (NonEmptyVector (Orbit a)) (Vector (Int, Int))","name":"Permutation Permutation","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#t:Permutation"},{"display_html":"orbits :: Lens (Permutation a) (Permutation b) (NonEmptyVector (Orbit a)) (NonEmptyVector (Orbit b))","name":"orbits","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:orbits"},{"display_html":"indices :: (Indexable i p, Applicative f) => (i -> Bool) -> Optical' p (Indexed i) f a a","name":"indices","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:indices"},{"display_html":"type Orbit a = NonEmptyVector a","name":"Orbit","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#t:Orbit"},{"display_html":"elems :: Permutation a -> NonEmptyVector a","name":"elems","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:elems"},{"display_html":"size :: Permutation a -> Int","name":"size","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:size"},{"display_html":"cycleOf :: Enum a => Permutation a -> a -> Orbit a","name":"cycleOf","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:cycleOf"},{"display_html":"next :: NonEmptyVector a -> Int -> a","name":"next","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:next"},{"display_html":"previous :: NonEmptyVector a -> Int -> a","name":"previous","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:previous"},{"display_html":"lookupIdx :: Enum a => Permutation a -> a -> (Int, Int)","name":"lookupIdx","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:lookupIdx"},{"display_html":"apply :: Enum a => Permutation a -> a -> a","name":"apply","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:apply"},{"display_html":"orbitFrom :: Eq a => a -> (a -> a) -> NonEmpty a","name":"orbitFrom","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:orbitFrom"},{"display_html":"cycleRep :: (Enum a, Eq a) => NonEmptyVector a -> (a -> a) -> Permutation a","name":"cycleRep","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:cycleRep"},{"display_html":"toCycleRep :: Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a","name":"toCycleRep","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:toCycleRep"},{"display_html":"newtype Cyclic v a = Cyclic (v a)","name":"Cyclic Cyclic","module":"HGeometry.Cyclic","link":"hgeometry-combinatorial/HGeometry-Cyclic.html#t:Cyclic"},{"display_html":"class HasDirectedTraversals v where","name":"HasDirectedTraversals traverseRightFrom traverseLeftFrom","module":"HGeometry.Cyclic","link":"hgeometry-combinatorial/HGeometry-Cyclic.html#t:HasDirectedTraversals"},{"display_html":"class ShiftedEq t where","name":"ShiftedEq ElemCyclic isShiftOf","module":"HGeometry.Cyclic","link":"hgeometry-combinatorial/HGeometry-Cyclic.html#t:ShiftedEq"},{"display_html":"encodeYAML :: ToYAML a => a -> ByteString","name":"encodeYAML","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:encodeYAML"},{"display_html":"encodeYAMLFile :: ToYAML a => OsPath -> a -> IO ()","name":"encodeYAMLFile","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:encodeYAMLFile"},{"display_html":"decodeYAML :: FromYAML a => ByteString -> Either (Pos, String) a","name":"decodeYAML","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:decodeYAML"},{"display_html":"decodeYAMLFile :: FromYAML a => OsPath -> IO (Either (Pos, String) a)","name":"decodeYAMLFile","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:decodeYAMLFile"},{"display_html":"printYAML :: ToYAML a => a -> IO ()","name":"printYAML","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:printYAML"},{"display_html":"data Versioned a = Versioned Version a","name":"Versioned Versioned","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#t:Versioned"},{"display_html":"unversioned :: Versioned a -> a","name":"unversioned","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:unversioned"}] \ No newline at end of file +[{"display_html":"newtype BezierSplineF f point where","name":"BezierSplineF Bezier2 Bezier3 BezierSpline","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:BezierSplineF"},{"display_html":"type BezierSpline = BezierSplineF NonEmptyVector","name":"BezierSpline","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:BezierSpline"},{"display_html":"type QuadraticBezier = BezierSplineF (Vector 3)","name":"QuadraticBezier","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:QuadraticBezier"},{"display_html":"type CubicBezier = BezierSplineF (Vector 4)","name":"CubicBezier","module":"HGeometry.BezierSpline","link":"hgeometry/HGeometry-BezierSpline.html#t:CubicBezier"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#v:closestPair"},{"display_html":"type CP point = Top (SP (Two point) (NumType point))","name":"CP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#t:CP"},{"display_html":"data CCP point = CCP (NonEmpty point) !(CP point)","name":"CCP CCP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#t:CCP"},{"display_html":"mergePairs :: forall point r. (Ord r, Num r, Point_ point 2 r) => CP point -> NonEmpty point -> NonEmpty point -> CP point","name":"mergePairs","module":"HGeometry.ClosestPair.DivideAndConquer","link":"hgeometry/HGeometry-ClosestPair-DivideAndConquer.html#v:mergePairs"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair","link":"hgeometry/HGeometry-ClosestPair.html#v:closestPair"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point d r, Foldable1 f, Has_ Metric_ d r) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.Naive","link":"hgeometry/HGeometry-ClosestPair-Naive.html#v:closestPair"},{"display_html":"closestPairWith :: (Ord r, Point_ point d r, Foldable1 f) => DistanceFunction point -> f point -> SP (Vector 2 point) r","name":"closestPairWith","module":"HGeometry.ClosestPair.Naive","link":"hgeometry/HGeometry-ClosestPair-Naive.html#v:closestPairWith"},{"display_html":"type DistanceFunction g = g -> g -> NumType g","name":"DistanceFunction","module":"HGeometry.ClosestPair.Naive","link":"hgeometry/HGeometry-ClosestPair-Naive.html#t:DistanceFunction"},{"display_html":"data Camera r = Camera !(Point 3 r) !(Vector 3 r) !(Vector 3 r) !r !r !r !(Vector 2 r)","name":"Camera Camera","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#t:Camera"},{"display_html":"cameraPosition :: Lens' (Camera r) (Point 3 r)","name":"cameraPosition","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:cameraPosition"},{"display_html":"rawCameraNormal :: Lens' (Camera r) (Vector 3 r)","name":"rawCameraNormal","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:rawCameraNormal"},{"display_html":"rawViewUp :: Lens' (Camera r) (Vector 3 r)","name":"rawViewUp","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:rawViewUp"},{"display_html":"viewPlaneDepth :: Lens' (Camera r) r","name":"viewPlaneDepth","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:viewPlaneDepth"},{"display_html":"nearDist :: Lens' (Camera r) r","name":"nearDist","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:nearDist"},{"display_html":"farDist :: Lens' (Camera r) r","name":"farDist","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:farDist"},{"display_html":"screenDimensions :: Lens' (Camera r) (Vector 2 r)","name":"screenDimensions","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:screenDimensions"},{"display_html":"cameraNormal :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"cameraNormal","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:cameraNormal"},{"display_html":"viewUp :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"viewUp","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:viewUp"},{"display_html":"cameraTransform :: Fractional r => Camera r -> Transformation 3 r","name":"cameraTransform","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:cameraTransform"},{"display_html":"worldToView :: Fractional r => Camera r -> Transformation 3 r","name":"worldToView","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:worldToView"},{"display_html":"toViewPort :: Fractional r => Camera r -> Transformation 3 r","name":"toViewPort","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:toViewPort"},{"display_html":"perspectiveProjection :: Fractional r => Camera r -> Transformation 3 r","name":"perspectiveProjection","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:perspectiveProjection"},{"display_html":"rotateCoordSystem :: Num r => Camera r -> Transformation 3 r","name":"rotateCoordSystem","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:rotateCoordSystem"},{"display_html":"flipAxes :: Num r => Transformation 3 r","name":"flipAxes","module":"HGeometry.Graphics.Camera","link":"hgeometry/HGeometry-Graphics-Camera.html#v:flipAxes"},{"display_html":"data IntervalTree interval r","name":"IntervalTree","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#t:IntervalTree"},{"display_html":"createTree :: (Foldable f, Ord r) => f r -> IntervalTree interval r","name":"createTree","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:createTree"},{"display_html":"fromIntervals :: (Foldable f, Ord r, ClosedInterval_ interval r) => f interval -> IntervalTree interval r","name":"fromIntervals","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:fromIntervals"},{"display_html":"insert :: (Ord r, ClosedInterval_ interval r) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"insert","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:insert"},{"display_html":"delete :: (Ord r, ClosedInterval_ interval r, Eq interval) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"delete","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:delete"},{"display_html":"stab :: Ord r => r -> IntervalTree interval r -> [interval]","name":"stab","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:stab"},{"display_html":"search :: Ord r => r -> IntervalTree interval r -> [interval]","name":"search","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:search"},{"display_html":"listIntervals :: IntervalTree interval r -> [interval]","name":"listIntervals","module":"HGeometry.IntervalTree","link":"hgeometry/HGeometry-IntervalTree.html#v:listIntervals"},{"display_html":"intersections :: (Ord r, Fractional r, LineSegment_ lineSegment point, Eq lineSegment, Point_ point 2 r, IntersectConstraints lineSegment, Foldable f) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:intersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:Intersections"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.Naive","link":"hgeometry/HGeometry-LineSegment-Intersection-Naive.html#t:OrdArounds"},{"display_html":"intersections :: forall lineSegment point r f. (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, HasOnSegment lineSegment 2, IntersectConstraints lineSegment, Foldable f, Functor f, StartPointOf lineSegment ~ EndPointOf lineSegment) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersections"},{"display_html":"interiorIntersections :: (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, IntersectConstraints lineSegment, StartPointOf lineSegment ~ EndPointOf lineSegment, HasOnSegment lineSegment 2, Foldable f, Functor f) => f lineSegment -> Intersections r lineSegment","name":"interiorIntersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorIntersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Intersections"},{"display_html":"intersectionPoints :: Intersections r lineSegment -> Set (Point 2 r)","name":"intersectionPoints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoints"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"hgeometry/HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:OrdArounds"},{"display_html":"type PlaneGraph k v e = Map k (Map e k, v)","name":"PlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:PlaneGraph"},{"display_html":"newtype E r = E (Vector 2 r)","name":"E E","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:E"},{"display_html":"toPlaneGraph :: (Plane_ plane r, Num r, Ord r) => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r)","name":"toPlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html#v:toPlaneGraph"},{"display_html":"data MinimizationDiagram r plane","name":"MinimizationDiagram","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:MinimizationDiagram"},{"display_html":"asMap :: MinimizationDiagram r plane -> Map plane (Region r (Point 2 r))","name":"asMap","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:asMap"},{"display_html":"data Region r point","name":"Region Bounded Unbounded","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:Region"},{"display_html":"type CircularList a = [a]","name":"CircularList","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:CircularList"},{"display_html":"intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r)","name":"intersectionPoint","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:intersectionPoint"},{"display_html":"intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r)","name":"intersectionLine","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:intersectionLine"},{"display_html":"intersectionVector :: (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r)","name":"intersectionVector","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:intersectionVector"},{"display_html":"fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) => VertexForm r plane -> MinimizationDiagram r plane","name":"fromVertexForm","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:fromVertexForm"},{"display_html":"data Definers plane","name":"Definers","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:Definers"},{"display_html":"fromCCWList :: [plane] -> Definers plane","name":"fromCCWList","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:fromCCWList"},{"display_html":"definers :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r, Definers plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:definers"},{"display_html":"mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane","name":"mergeDefiners","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:mergeDefiners"},{"display_html":"type VertexForm r plane = Map (Point 3 r) (Definers plane)","name":"VertexForm","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#t:VertexForm"},{"display_html":"bruteForceLowerEnvelope :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> MinimizationDiagram r plane","name":"bruteForceLowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:bruteForceLowerEnvelope"},{"display_html":"computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane","name":"computeVertexForm","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html#v:computeVertexForm"},{"display_html":"class (HasVertices polyLine polyLine, HasPoints' polyLine point, HasStart polyLine point, HasEnd polyLine point, Vertex polyLine ~ point, Point_ point (Dimension point) (NumType point), NumType polyLine ~ NumType point, Dimension polyLine ~ Dimension point) => PolyLine_ polyLine point | polyLine -> point","name":"PolyLine_","module":"HGeometry.PolyLine.Class","link":"hgeometry/HGeometry-PolyLine-Class.html#t:PolyLine_"},{"display_html":"class PolyLine_ polyLine point => ConstructablePolyLine_ polyLine point where","name":"ConstructablePolyLine_ polyLineFromPoints","module":"HGeometry.PolyLine.Class","link":"hgeometry/HGeometry-PolyLine-Class.html#t:ConstructablePolyLine_"},{"display_html":"_PolyLineLineSegment :: (ConstructableLineSegment_ lineSegment point, ConstructablePolyLine_ polyLine point) => Prism' polyLine lineSegment","name":"_PolyLineLineSegment","module":"HGeometry.PolyLine.Class","link":"hgeometry/HGeometry-PolyLine-Class.html#v:_PolyLineLineSegment"},{"display_html":"newtype PolyLineF f point = PolyLine (f point)","name":"PolyLineF PolyLine","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:PolyLineF"},{"display_html":"type PolyLine = PolyLineF NonEmptyVector","name":"PolyLine","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:PolyLine"},{"display_html":"_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') (f point) (f' point')","name":"_PolyLineF","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#v:_PolyLineF"},{"display_html":"module HGeometry.PolyLine.Class","name":"","module":"HGeometry.PolyLine","link":"hgeometry"},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:HasVertices"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.PolyLine","link":"hgeometry/HGeometry-PolyLine.html#t:HasEdges"},{"display_html":"frechetDistanceWith :: (HasVertices' polyLine, HasVertices' polyLine', Ord r, VertexIx polyLine ~ Int, VertexIx polyLine' ~ Int) => (Vertex polyLine -> Vertex polyLine' -> r) -> polyLine -> polyLine' -> r","name":"frechetDistanceWith","module":"HGeometry.PolyLine.Frechet.Discrete","link":"hgeometry/HGeometry-PolyLine-Frechet-Discrete.html#v:frechetDistanceWith"},{"display_html":"douglasPeucker :: forall polyLine point d r. (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLineF ViewR1 point","name":"douglasPeucker","module":"HGeometry.PolyLine.Simplification.DouglasPeucker","link":"hgeometry/HGeometry-PolyLine-Simplification-DouglasPeucker.html#v:douglasPeucker"},{"display_html":"simplify :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLine point","name":"simplify","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"hgeometry/HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplify"},{"display_html":"simplifyWith :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r) => (ClosedLineSegment point -> PolyLine point -> Bool) -> polyLine -> PolyLine point","name":"simplifyWith","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"hgeometry/HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplifyWith"},{"display_html":"class HasVertices polygon polygon => HasOuterBoundary polygon where","name":"HasOuterBoundary outerBoundaryVertexAt ccwOuterBoundaryFrom cwOuterBoundaryFrom outerBoundary outerBoundaryEdgeAt outerBoundaryEdges","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasOuterBoundary"},{"display_html":"signedArea2X :: (Num r, HasOuterBoundary simplePolygon, Point_ point 2 r, Vertex simplePolygon ~ point) => simplePolygon -> r","name":"signedArea2X","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:signedArea2X"},{"display_html":"minimumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"minimumVertexBy","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:minimumVertexBy"},{"display_html":"maximumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"maximumVertexBy","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:maximumVertexBy"},{"display_html":"outerBoundaryEdgeSegmentAt :: (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => VertexIx polygon -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegmentAt","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegmentAt"},{"display_html":"outerBoundaryEdgeSegments :: forall polygon point r. (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => IndexedFold1 (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegments","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegments"},{"display_html":"outerBoundaryWithNeighbours :: (HasOuterBoundary polygon, VertexIx polygon ~ Int) => IndexedFold1 (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) polygon (Vertex polygon, (Vertex polygon, Vertex polygon))","name":"outerBoundaryWithNeighbours","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#v:outerBoundaryWithNeighbours"},{"display_html":"type Hole polygon = SimplePolygonF (HoleF polygon) (Vertex polygon)","name":"Hole","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:Hole"},{"display_html":"class VertexContainer (HoleF polygon) (Vertex polygon) => HasHoles polygon where","name":"HasHoles HoleF HoleIx holes holeAt","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasHoles"},{"display_html":"class (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r, NumType polygon ~ r, Dimension polygon ~ 2, HasHoles polygon) => Polygon_ polygon point r where","name":"Polygon_ ccwPredecessorOf ccwSuccessorOf extremes","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:Polygon_"},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasVertices"},{"display_html":"class HasVertices' graph where","name":"HasVertices' Vertex VertexIx vertexAt numVertices","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasVertices-39-"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasEdges"},{"display_html":"class HasEdges' graph where","name":"HasEdges' Edge EdgeIx edgeAt numEdges","module":"HGeometry.Polygon.Class","link":"hgeometry/HGeometry-Polygon-Class.html#t:HasEdges-39-"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple.Class","link":"hgeometry/HGeometry-Polygon-Simple-Class.html#t:SimplePolygon_"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex.Class","link":"hgeometry/HGeometry-Polygon-Convex-Class.html#t:ConvexPolygon_"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:SimplePolygon_"},{"display_html":"type SimplePolygon = SimplePolygonF (Cyclic NonEmptyVector)","name":"SimplePolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:SimplePolygon"},{"display_html":"newtype SimplePolygonF f point = MkSimplePolygon (f point)","name":"SimplePolygonF MkSimplePolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:SimplePolygonF"},{"display_html":"toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point","name":"toCyclic","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#v:toCyclic"},{"display_html":"type VertexContainer f point = (IxValue (f point) ~ point, Index (f point) ~ Int, TraversableWithIndex Int f, Traversable1 f, Ixed (f point), HasDirectedTraversals f)","name":"VertexContainer","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:VertexContainer"},{"display_html":"class HasInPolygon polygon point r | polygon -> point, point -> r where","name":"HasInPolygon inPolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#t:HasInPolygon"},{"display_html":"inSimplePolygon :: forall queryPoint simplePolygon point r. (Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r, SimplePolygon_ simplePolygon point r) => queryPoint -> simplePolygon -> PointLocationResultWith (VertexIx simplePolygon)","name":"inSimplePolygon","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#v:inSimplePolygon"},{"display_html":"hasNoSelfIntersections :: forall f point r. (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) => f point -> Bool","name":"hasNoSelfIntersections","module":"HGeometry.Polygon.Simple","link":"hgeometry/HGeometry-Polygon-Simple.html#v:hasNoSelfIntersections"},{"display_html":"module HGeometry.Polygon.Simple.Class","name":"","module":"HGeometry.Polygon.Simple","link":"hgeometry"},{"display_html":"class (PlanarGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex), NumType vertex ~ NumType planeGraph) => PlaneGraph_ planeGraph vertex | planeGraph -> vertex where","name":"PlaneGraph_ fromEmbedding interiorFaces outerFace outerFaceDart outerFaceId","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#t:PlaneGraph_"},{"display_html":"dartSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => DartIx planeGraph -> IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:dartSegmentAt"},{"display_html":"edgeSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => EdgeIx planeGraph -> IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:edgeSegmentAt"},{"display_html":"dartSegments :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegments","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:dartSegments"},{"display_html":"edgeSegments :: forall planeGraph vertex. (HasEdges planeGraph planeGraph, BidirGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex)) => IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegments","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:edgeSegments"},{"display_html":"interiorFacePolygonAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => FaceIx planeGraph -> IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygonAt","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:interiorFacePolygonAt"},{"display_html":"interiorFacePolygons :: forall planeGraph vertex r. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 r, Ord r, Num r, Eq (FaceIx planeGraph)) => IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygons","module":"HGeometry.PlaneGraph.Class","link":"hgeometry/HGeometry-PlaneGraph-Class.html#v:interiorFacePolygons"},{"display_html":"module Hiraffe.Graph.Class","name":"","module":"HGeometry.PlaneGraph","link":"hgeometry"},{"display_html":"module HGeometry.PlaneGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":"hgeometry"},{"display_html":"module Hiraffe.PlanarGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":"hgeometry"},{"display_html":"newtype PlaneGraph s v e f = PlaneGraph (PlanarGraph s Primal v e f)","name":"PlaneGraph PlaneGraph","module":"HGeometry.PlaneGraph","link":"hgeometry/HGeometry-PlaneGraph.html#t:PlaneGraph"},{"display_html":"type MonotonePolygon point = MonotonePolygonF (SimplePolygon point)","name":"MonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#t:MonotonePolygon"},{"display_html":"data MonotonePolygonF simplePolygon","name":"MonotonePolygonF","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#t:MonotonePolygonF"},{"display_html":"monotoneDirection :: MonotonePolygonF simplePolygon -> Vector 2 (NumType simplePolygon)","name":"monotoneDirection","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:monotoneDirection"},{"display_html":"toSimplePolygon :: MonotonePolygonF simplePolygon -> simplePolygon","name":"toSimplePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:toSimplePolygon"},{"display_html":"asMonotonePolygon :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Maybe (MonotonePolygonF simplePolygon)","name":"asMonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:asMonotonePolygon"},{"display_html":"uncheckedMontonePolygon :: SimplePolygon_ simplePolygon point r => Vector 2 r -> simplePolygon -> MonotonePolygonF simplePolygon","name":"uncheckedMontonePolygon","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:uncheckedMontonePolygon"},{"display_html":"randomMonotone :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> m (MonotonePolygon (Point 2 r))","name":"randomMonotone","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:randomMonotone"},{"display_html":"randomMonotoneDirected :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r))","name":"randomMonotoneDirected","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:randomMonotoneDirected"},{"display_html":"isMonotone :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Bool","name":"isMonotone","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:isMonotone"},{"display_html":"randomNonZeroVector :: (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) => m (Vector 2 r)","name":"randomNonZeroVector","module":"HGeometry.Polygon.Monotone","link":"hgeometry/HGeometry-Polygon-Monotone.html#v:randomNonZeroVector"},{"display_html":"leftTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"leftTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:leftTangent"},{"display_html":"rightTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"rightTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:rightTangent"},{"display_html":"lowerTangent :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"lowerTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent"},{"display_html":"lowerTangent' :: forall point r f. (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"lowerTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent-39-"},{"display_html":"upperTangent :: forall convexPolygon point r. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"upperTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:upperTangent"},{"display_html":"upperTangent' :: (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"upperTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"hgeometry/HGeometry-Polygon-Convex-Tangents.html#v:upperTangent-39-"},{"display_html":"randomConvex :: (MonadState g m, RandomGen g) => Int -> Int -> m (ConvexPolygon (Point 2 Rational))","name":"randomConvex","module":"HGeometry.Polygon.Convex.Random","link":"hgeometry/HGeometry-Polygon-Convex-Random.html#v:randomConvex"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#t:ConvexPolygon_"},{"display_html":"type ConvexPolygon = ConvexPolygonF (Cyclic NonEmptyVector)","name":"ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#t:ConvexPolygon"},{"display_html":"data ConvexPolygonF f point","name":"ConvexPolygonF","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#t:ConvexPolygonF"},{"display_html":"fromSimplePolygon :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Maybe (ConvexPolygonF f point)","name":"fromSimplePolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:fromSimplePolygon"},{"display_html":"toSimplePolygon :: ConvexPolygonF f point -> SimplePolygonF f point","name":"toSimplePolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:toSimplePolygon"},{"display_html":"_ConvexPolygon :: forall f point r. (Num r, Ord r, Point_ point 2 r, VertexContainer f point) => Prism' (SimplePolygonF f point) (ConvexPolygonF f point)","name":"_ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:_ConvexPolygon"},{"display_html":"isStrictlyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isStrictlyConvex","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:isStrictlyConvex"},{"display_html":"isConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isConvex","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:isConvex"},{"display_html":"verifyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => ConvexPolygonF f point -> Bool","name":"verifyConvex","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:verifyConvex"},{"display_html":"minkowskiSum :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r, ConvexPolygon_ convexPolygon' point' r) => convexPolygon -> convexPolygon' -> ConvexPolygon (point :+ point')","name":"minkowskiSum","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:minkowskiSum"},{"display_html":"maxInDirection :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => Vector 2 r -> convexPolygon -> point","name":"maxInDirection","module":"HGeometry.Polygon.Convex","link":"hgeometry/HGeometry-Polygon-Convex.html#v:maxInDirection"},{"display_html":"convexHull :: (Ord r, Fractional r, Show r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.QuickHull","link":"hgeometry/HGeometry-ConvexHull-QuickHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:convexHull"},{"display_html":"upperHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:upperHull"},{"display_html":"upperHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull"},{"display_html":"lowerHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull-39-"},{"display_html":"steepestCcwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCcwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:steepestCcwFrom"},{"display_html":"steepestCwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"hgeometry/HGeometry-ConvexHull-JarvisMarch.html#v:steepestCwFrom"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHull"},{"display_html":"upperHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:lowerHull"},{"display_html":"lowerHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:lowerHull-39-"},{"display_html":"upperHullFromSorted :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted"},{"display_html":"upperHullFromSorted' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted'","module":"HGeometry.ConvexHull.GrahamScan","link":"hgeometry/HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted-39-"},{"display_html":"newtype LowerEnvelopeF f vertex line = LowerEnvelope (Alternating f vertex line)","name":"LowerEnvelopeF LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#t:LowerEnvelopeF"},{"display_html":"type LowerEnvelope = LowerEnvelopeF Vector","name":"LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#t:LowerEnvelope"},{"display_html":"_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') (Alternating f vertex line) (Alternating f' vertex' line')","name":"_Alternating","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:_Alternating"},{"display_html":"lowerEnvelope :: forall g f line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, Functor f, IsIntersectableWith line line, Intersection line line ~ Maybe (LineLineIntersection line), HasFromFoldable g) => f line -> LowerEnvelopeF g (Point 2 r) line","name":"lowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:lowerEnvelope"},{"display_html":"lineAt :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> line","name":"lineAt","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:lineAt"},{"display_html":"lookupLEVertex :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line)","name":"lookupLEVertex","module":"HGeometry.Line.LowerEnvelope","link":"hgeometry/HGeometry-Line-LowerEnvelope.html#v:lookupLEVertex"},{"display_html":"lowerEnvelope :: (Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f, Ord plane, Show plane, Show r) => f plane -> LowerEnvelope plane","name":"lowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelope"},{"display_html":"lowerEnvelopeWith :: forall nonEmpty plane r. (Plane_ plane r, Ord r, Fractional r, Foldable1 nonEmpty) => (NonEmpty plane -> MinimizationDiagram r plane) -> nonEmpty plane -> LowerEnvelope plane","name":"lowerEnvelopeWith","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelopeWith"},{"display_html":"module HGeometry.Plane.LowerEnvelope.Naive","name":"","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry"},{"display_html":"data LowerEnvelope plane","name":"LowerEnvelope ConnectedEnvelope ParallelStrips","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#t:LowerEnvelope"},{"display_html":"pointLocateParallel :: (Plane_ plane r, Point_ point 2 r, Ord r, Num r) => point -> Alternating Vector (VerticalOrLineEQ r) plane -> plane","name":"pointLocateParallel","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry/HGeometry-Plane-LowerEnvelope.html#v:pointLocateParallel"},{"display_html":"module HGeometry.Plane.LowerEnvelope.Connected","name":"","module":"HGeometry.Plane.LowerEnvelope","link":"hgeometry"},{"display_html":"data CommonIntersection halfPlane r","name":"CommonIntersection BoundedRegion EmptyIntersection InSubLine SingletonPoint Slab UnboundedRegion","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#t:CommonIntersection"},{"display_html":"data SubLine halfPlane r","name":"SubLine EntireLine InHalfLine InSegment","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#t:SubLine"},{"display_html":"newtype Chain f halfPlane r = Chain (Alternating f (Point 2 r) halfPlane)","name":"Chain Chain","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#t:Chain"},{"display_html":"commonIntersection :: forall f halfPlane r. (Foldable1 f, Functor f, HalfPlane_ halfPlane r, Fractional r, Ord r, Show halfPlane, Show r) => f halfPlane -> CommonIntersection halfPlane r","name":"commonIntersection","module":"HGeometry.HalfPlane.CommonIntersection","link":"hgeometry/HGeometry-HalfPlane-CommonIntersection.html#v:commonIntersection"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull","link":"hgeometry/HGeometry-ConvexHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"hgeometry/HGeometry-ConvexHull-DivideAndConquer.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"hgeometry/HGeometry-ConvexHull-DivideAndConquer.html#v:upperHull"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"hgeometry/HGeometry-ConvexHull-DivideAndConquer.html#v:lowerHull"},{"display_html":"module HGeometry.Polygon.Class","name":"","module":"HGeometry.Polygon","link":"hgeometry"},{"display_html":"asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point)","name":"asTriangle","module":"HGeometry.Polygon","link":"hgeometry/HGeometry-Polygon.html#v:asTriangle"},{"display_html":"area2X :: (Polygon_ polygon point r, Num r, Point_ point 2 r, SimplePolygon_ (Hole polygon) point r) => polygon -> r","name":"area2X","module":"HGeometry.Polygon","link":"hgeometry/HGeometry-Polygon.html#v:area2X"},{"display_html":"area :: (Polygon_ polygon point r, SimplePolygon_ (Hole polygon) point r, Fractional r) => polygon -> r","name":"area","module":"HGeometry.Polygon","link":"hgeometry/HGeometry-Polygon.html#v:area"},{"display_html":"convexHull :: forall polygon point r. (Polygon_ polygon point r, Ord r, Num r) => polygon -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.Melkman","link":"hgeometry/HGeometry-ConvexHull-Melkman.html#v:convexHull"},{"display_html":"type YMonotonePolygon_ = SimplePolygon_","name":"YMonotonePolygon_","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-TriangulateMonotone.html#t:YMonotonePolygon_"},{"display_html":"triangulate :: forall s yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:triangulate"},{"display_html":"computeDiagonals :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> [Diagonal yMonotonePolygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:computeDiagonals"},{"display_html":"makeMonotone :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"makeMonotone","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:makeMonotone"},{"display_html":"computeDiagonals :: (Polygon_ polygon point r, Point_ point 2 r, Ord r, Num r, Ord (VertexIx polygon)) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:computeDiagonals"},{"display_html":"classifyVertices :: (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> [(VertexIx polygon, VertexType)]","name":"classifyVertices","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:classifyVertices"},{"display_html":"data VertexType","name":"VertexType Start Split End Merge Regular","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#t:VertexType"},{"display_html":"cmpX :: (Point_ point 2 r, LineSegment_ lineSegment point', Point_ point' 2 r, Ord r, Num r) => point -> lineSegment -> Ordering","name":"cmpX","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"hgeometry/HGeometry-Polygon-Triangulation-MakeMonotone.html#v:cmpX"},{"display_html":"triangulate :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#v:triangulate"},{"display_html":"computeDiagonals :: forall polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#v:computeDiagonals"},{"display_html":"data PolygonEdgeType","name":"PolygonEdgeType Diagonal Original","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#t:PolygonEdgeType"},{"display_html":"data PolygonFaceData","name":"PolygonFaceData Outside Inside","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#t:PolygonFaceData"},{"display_html":"type Diagonal polygon = Vector 2 (VertexIx polygon)","name":"Diagonal","module":"HGeometry.Polygon.Triangulation","link":"hgeometry/HGeometry-Polygon-Triangulation.html#t:Diagonal"},{"display_html":"samplePolygon :: (SimplePolygon_ polygon point r, Ord r, Real r, UniformRange r, StatefulGen g m) => polygon -> g -> m (Point 2 Double)","name":"samplePolygon","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:samplePolygon"},{"display_html":"samplePolygons :: (SimplePolygon_ polygon point r, StatefulGen g m, Foldable1 nonEmpty, Real r, Ord r, UniformRange r) => nonEmpty polygon -> g -> m (Point 2 Double)","name":"samplePolygons","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:samplePolygons"},{"display_html":"data Sampler w v","name":"Sampler","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#t:Sampler"},{"display_html":"samplePoint :: (Point_ point 2 r, StatefulGen g m, Real r, Ord r, UniformRange r) => Sampler r (Triangle point) -> g -> m (Point 2 Double)","name":"samplePoint","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:samplePoint"},{"display_html":"triangleSampler :: (SimplePolygon_ polygon point r, Num r, Ord r, Foldable1 nonEmpty) => nonEmpty polygon -> Sampler r (Triangle point)","name":"triangleSampler","module":"HGeometry.Polygon.Simple.Sample","link":"hgeometry/HGeometry-Polygon-Simple-Sample.html#v:triangleSampler"},{"display_html":"visibilityGraph :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraph","module":"HGeometry.Polygon.Visibility.Naive","link":"hgeometry/HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraph"},{"display_html":"visibilityGraphWith :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraphWith","module":"HGeometry.Polygon.Visibility.Naive","link":"hgeometry/HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraphWith"},{"display_html":"data PolygonalDomainF (h :: Type -> Type) (f :: Type -> Type) (point :: Type) = PolygonalDomain (SimplePolygonF f point) (h (SimplePolygonF f point))","name":"PolygonalDomainF PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#t:PolygonalDomainF"},{"display_html":"type PolygonalDomain point = PolygonalDomainF Vector (Cyclic NonEmptyVector) point","name":"PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#t:PolygonalDomain"},{"display_html":"asSimplePolygon :: (HasFromFoldable h, HoleContainer h f point) => Prism' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"asSimplePolygon","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#v:asSimplePolygon"},{"display_html":"outerBoundaryPolygon :: Lens' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"outerBoundaryPolygon","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#v:outerBoundaryPolygon"},{"display_html":"theHoles :: Lens (PolygonalDomainF h f point) (PolygonalDomainF h' f point) (h (SimplePolygonF f point)) (h' (SimplePolygonF f point))","name":"theHoles","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#v:theHoles"},{"display_html":"type HoleContainer h f point = (TraversableWithIndex Int h, Index (h (SimplePolygonF f point)) ~ Int, IxValue (h (SimplePolygonF f point)) ~ SimplePolygonF f point, Ixed (h (SimplePolygonF f point)), VertexContainer f point)","name":"HoleContainer","module":"HGeometry.Polygon.WithHoles","link":"hgeometry/HGeometry-Polygon-WithHoles.html#t:HoleContainer"},{"display_html":"class HasCanonicalSubSet s t a f g | s -> f, t -> g where","name":"HasCanonicalSubSet canonicalSubSet","module":"HGeometry.SegmentTree.CanonicalSubSet","link":"hgeometry/HGeometry-SegmentTree-CanonicalSubSet.html#t:HasCanonicalSubSet"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree.Base","link":"hgeometry/HGeometry-SegmentTree-Base.html#v:ascEndPoints"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree","link":"hgeometry/HGeometry-SegmentTree.html#v:ascEndPoints"},{"display_html":"data RangeTree f point","name":"RangeTree","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#t:RangeTree"},{"display_html":"buildRangeTree :: (Foldable1 g, Point_ point d r, Ord r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"buildRangeTree","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:buildRangeTree"},{"display_html":"fromAscList :: (Foldable1 g, Functor g, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"fromAscList","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:fromAscList"},{"display_html":"fromGroupedAscList :: (Foldable1 g, Foldable1 h, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g (h point) -> RangeTree f point","name":"fromGroupedAscList","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:fromGroupedAscList"},{"display_html":"rangeQuery :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) => interval -> RangeTree f point -> [f point]","name":"rangeQuery","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:rangeQuery"},{"display_html":"query :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r, Monoid (f point)) => interval -> RangeTree f point -> f point","name":"query","module":"HGeometry.RangeTree.Base","link":"hgeometry/HGeometry-RangeTree-Base.html#v:query"},{"display_html":"module HGeometry.RangeTree.Base","name":"","module":"HGeometry.RangeTree","link":"hgeometry"},{"display_html":"type VerticalRayShootingStructure lineSegment = VerticalRayShootingStructure' (NumType lineSegment) lineSegment","name":"VerticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#t:VerticalRayShootingStructure"},{"display_html":"type StatusStructure lineSegment = Set lineSegment","name":"StatusStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#t:StatusStructure"},{"display_html":"verticalRayShootingStructure :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, Foldable1 f) => f lineSegment -> VerticalRayShootingStructure lineSegment","name":"verticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:verticalRayShootingStructure"},{"display_html":"segmentAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAbove"},{"display_html":"segmentAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAboveOrOn"},{"display_html":"findSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment)","name":"findSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:findSlab"},{"display_html":"lookupAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAbove"},{"display_html":"lookupAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAboveOrOn"},{"display_html":"searchInSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, HasSupportingLine lineSegment, Num r) => (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment","name":"searchInSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"hgeometry/HGeometry-VerticalRayShooting-PersistentSweep.html#v:searchInSlab"},{"display_html":"module HGeometry.VerticalRayShooting.PersistentSweep","name":"","module":"HGeometry.VerticalRayShooting","link":"hgeometry"},{"display_html":"data VoronoiDiagram point","name":"VoronoiDiagram AllColinear ConnectedVD","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#t:VoronoiDiagram"},{"display_html":"newtype VoronoiDiagram' point = VoronoiDiagram (MinimizationDiagram (NumType point) point)","name":"VoronoiDiagram' VoronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#t:VoronoiDiagram-39-"},{"display_html":"voronoiDiagram :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r) => f point -> VoronoiDiagram point","name":"voronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#v:voronoiDiagram"},{"display_html":"voronoiVertices :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r, Ord point) => f point -> Set (Point 2 r)","name":"voronoiVertices","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#v:voronoiVertices"},{"display_html":"asMap :: (Point_ point 2 r, Ord point) => VoronoiDiagram' point -> Map point (Region r (Point 2 r))","name":"asMap","module":"HGeometry.VoronoiDiagram","link":"hgeometry/HGeometry-VoronoiDiagram.html#v:asMap"},{"display_html":"type GeoPositionWithoutCRS' = PointXY :+ Maybe RestGeoPosition","name":"GeoPositionWithoutCRS'","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#t:GeoPositionWithoutCRS-39-"},{"display_html":"data RestGeoPosition","name":"RestGeoPosition Z ZM","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#t:RestGeoPosition"},{"display_html":"_GeoPositionWithoutCRS :: Prism' GeoPositionWithoutCRS (PointXY :+ Maybe RestGeoPosition)","name":"_GeoPositionWithoutCRS","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#v:_GeoPositionWithoutCRS"},{"display_html":"_GeoPolygonPolygonalDomain :: Iso' GeoPolygon GeoPolygonalDomain","name":"_GeoPolygonPolygonalDomain","module":"HGeometry.GeoJSON","link":"hgeometry/geojson/HGeometry-GeoJSON.html#v:_GeoPolygonPolygonalDomain"},{"display_html":"ipeRenderWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeRenderWith","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#v:ipeRenderWith"},{"display_html":"ipeRender :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeRender","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#v:ipeRender"},{"display_html":"data FileType","name":"FileType SVG PDF PNG EPS","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:FileType"},{"display_html":"data Options = Options {}","name":"Options crop viewNumber pageNumber transparent resolution Options","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#v:defaultOptions"},{"display_html":"data Background","name":"Background OpaqueBackground TransparentBackground","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:Background"},{"display_html":"data Crop","name":"Crop Crop NoCrop","module":"Ipe.IpeRender","link":"hgeometry/ipe/Ipe-IpeRender.html#t:Crop"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Layer","link":"hgeometry/ipe/Ipe-Layer.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Layer","link":"hgeometry/ipe/Ipe-Layer.html#v:layerName"},{"display_html":"literally :: String -> Q Exp","name":"literally","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:literally"},{"display_html":"lit :: QuasiQuoter","name":"lit","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:lit"},{"display_html":"litFile :: QuasiQuoter","name":"litFile","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:litFile"},{"display_html":"xmlLiteral :: String -> Node Text Text","name":"xmlLiteral","module":"Ipe.Literal","link":"hgeometry/ipe/Ipe-Literal.html#v:xmlLiteral"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#t:PathSegment"},{"display_html":"_PolyLineSegment :: forall r. Prism' (PathSegment r) (PolyLine (Point 2 r))","name":"_PolyLineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_PolyLineSegment"},{"display_html":"_PolygonPath :: forall r. Prism' (PathSegment r) (SimplePolygon (Point 2 r))","name":"_PolygonPath","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_PolygonPath"},{"display_html":"_CubicBezierSegment :: forall r. Prism' (PathSegment r) (CubicBezier (Point 2 r))","name":"_CubicBezierSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_CubicBezierSegment"},{"display_html":"_QuadraticBezierSegment :: forall r. Prism' (PathSegment r) (QuadraticBezier (Point 2 r))","name":"_QuadraticBezierSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_QuadraticBezierSegment"},{"display_html":"_EllipseSegment :: forall r. Prism' (PathSegment r) (Ellipse r)","name":"_EllipseSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_EllipseSegment"},{"display_html":"_ArcSegment :: forall r. Prism' (PathSegment r) ()","name":"_ArcSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ArcSegment"},{"display_html":"_SplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_SplineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_SplineSegment"},{"display_html":"_ClosedSplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_ClosedSplineSegment","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ClosedSplineSegment"},{"display_html":"data Operation r","name":"Operation Ellipse MoveTo LineTo ArcTo Spline ClosedSpline ClosePath CurveTo QCurveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#t:Operation"},{"display_html":"_MoveTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_MoveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_MoveTo"},{"display_html":"_LineTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_LineTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_LineTo"},{"display_html":"_CurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r, Point 2 r)","name":"_CurveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_CurveTo"},{"display_html":"_QCurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r)","name":"_QCurveTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_QCurveTo"},{"display_html":"_Ellipse :: forall r. Prism' (Operation r) (Matrix 3 3 r)","name":"_Ellipse","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_Ellipse"},{"display_html":"_ArcTo :: forall r. Prism' (Operation r) (Matrix 3 3 r, Point 2 r)","name":"_ArcTo","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ArcTo"},{"display_html":"_Spline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_Spline","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_Spline"},{"display_html":"_ClosedSpline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_ClosedSpline","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ClosedSpline"},{"display_html":"_ClosePath :: forall r. Prism' (Operation r) ()","name":"_ClosePath","module":"Ipe.Path","link":"hgeometry/ipe/Ipe-Path.html#v:_ClosePath"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#t:Coordinate"},{"display_html":"readCoordinate :: Coordinate r => Text -> Either Text r","name":"readCoordinate","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readCoordinate"},{"display_html":"readPoint :: Coordinate r => Text -> Either Text (Point 2 r)","name":"readPoint","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readPoint"},{"display_html":"readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r)","name":"readMatrix","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readMatrix"},{"display_html":"readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r))","name":"readRectangle","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readRectangle"},{"display_html":"runParser :: Parser a -> Text -> Either Text a","name":"runParser","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:runParser"},{"display_html":"readPathOperations :: Coordinate r => Text -> Either Text [Operation r]","name":"readPathOperations","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:readPathOperations"},{"display_html":"pOperation :: forall r. Coordinate r => Parser (Operation r)","name":"pOperation","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:pOperation"},{"display_html":"pPoint :: Coordinate r => Parser (Point 2 r)","name":"pPoint","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:pPoint"},{"display_html":"pCoordinate :: Coordinate r => Parser r","name":"pCoordinate","module":"Ipe.PathParser","link":"hgeometry/ipe/Ipe-PathParser.html#v:pCoordinate"},{"display_html":"data IpeValue v","name":"IpeValue Valued Named","module":"Ipe.Value","link":"hgeometry/ipe/Ipe-Value.html#t:IpeValue"},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:named"},{"display_html":"basicNamedColors :: [IpeColor r]","name":"basicNamedColors","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:basicNamedColors"},{"display_html":"black :: IpeColor r","name":"black","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:black"},{"display_html":"white :: IpeColor r","name":"white","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:white"},{"display_html":"red :: IpeColor r","name":"red","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:red"},{"display_html":"green :: IpeColor r","name":"green","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:green"},{"display_html":"blue :: IpeColor r","name":"blue","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:blue"},{"display_html":"yellow :: IpeColor r","name":"yellow","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:yellow"},{"display_html":"orange :: IpeColor r","name":"orange","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:orange"},{"display_html":"gold :: IpeColor r","name":"gold","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:gold"},{"display_html":"purple :: IpeColor r","name":"purple","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:purple"},{"display_html":"gray :: IpeColor r","name":"gray","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:gray"},{"display_html":"brown :: IpeColor r","name":"brown","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:brown"},{"display_html":"navy :: IpeColor r","name":"navy","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:navy"},{"display_html":"pink :: IpeColor r","name":"pink","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:pink"},{"display_html":"seagreen :: IpeColor r","name":"seagreen","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:seagreen"},{"display_html":"turquoise :: IpeColor r","name":"turquoise","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:turquoise"},{"display_html":"violet :: IpeColor r","name":"violet","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:violet"},{"display_html":"darkblue :: IpeColor r","name":"darkblue","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkblue"},{"display_html":"darkcyan :: IpeColor r","name":"darkcyan","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkcyan"},{"display_html":"darkgray :: IpeColor r","name":"darkgray","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkgray"},{"display_html":"darkgreen :: IpeColor r","name":"darkgreen","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkgreen"},{"display_html":"darkmagenta :: IpeColor r","name":"darkmagenta","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkmagenta"},{"display_html":"darkorange :: IpeColor r","name":"darkorange","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkorange"},{"display_html":"darkred :: IpeColor r","name":"darkred","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:darkred"},{"display_html":"lightblue :: IpeColor r","name":"lightblue","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightblue"},{"display_html":"lightcyan :: IpeColor r","name":"lightcyan","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightcyan"},{"display_html":"lightgray :: IpeColor r","name":"lightgray","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightgray"},{"display_html":"lightgreen :: IpeColor r","name":"lightgreen","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightgreen"},{"display_html":"lightyellow :: IpeColor r","name":"lightyellow","module":"Ipe.Color","link":"hgeometry/ipe/Ipe-Color.html#v:lightyellow"},{"display_html":"data AttributeUniverse","name":"AttributeUniverse HAlign VAlign Height Gradient Tiling Opacity StrokeOpacity RArrow FillRule LineJoin LineCap Dash Pen Fill Stroke Transformations Pin Layer Matrix Width Depth Style Size Arrow Clip","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:AttributeUniverse"},{"display_html":"type family LayerSym0 :: AttributeUniverse where ...","name":"LayerSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:LayerSym0"},{"display_html":"type family MatrixSym0 :: AttributeUniverse where ...","name":"MatrixSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:MatrixSym0"},{"display_html":"type family PinSym0 :: AttributeUniverse where ...","name":"PinSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PinSym0"},{"display_html":"type family TransformationsSym0 :: AttributeUniverse where ...","name":"TransformationsSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TransformationsSym0"},{"display_html":"type family StrokeSym0 :: AttributeUniverse where ...","name":"StrokeSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:StrokeSym0"},{"display_html":"type family FillSym0 :: AttributeUniverse where ...","name":"FillSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:FillSym0"},{"display_html":"type family PenSym0 :: AttributeUniverse where ...","name":"PenSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PenSym0"},{"display_html":"type family SizeSym0 :: AttributeUniverse where ...","name":"SizeSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:SizeSym0"},{"display_html":"type family DashSym0 :: AttributeUniverse where ...","name":"DashSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:DashSym0"},{"display_html":"type family LineCapSym0 :: AttributeUniverse where ...","name":"LineCapSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:LineCapSym0"},{"display_html":"type family LineJoinSym0 :: AttributeUniverse where ...","name":"LineJoinSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:LineJoinSym0"},{"display_html":"type family FillRuleSym0 :: AttributeUniverse where ...","name":"FillRuleSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:FillRuleSym0"},{"display_html":"type family ArrowSym0 :: AttributeUniverse where ...","name":"ArrowSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:ArrowSym0"},{"display_html":"type family RArrowSym0 :: AttributeUniverse where ...","name":"RArrowSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:RArrowSym0"},{"display_html":"type family StrokeOpacitySym0 :: AttributeUniverse where ...","name":"StrokeOpacitySym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:StrokeOpacitySym0"},{"display_html":"type family OpacitySym0 :: AttributeUniverse where ...","name":"OpacitySym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:OpacitySym0"},{"display_html":"type family TilingSym0 :: AttributeUniverse where ...","name":"TilingSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TilingSym0"},{"display_html":"type family GradientSym0 :: AttributeUniverse where ...","name":"GradientSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:GradientSym0"},{"display_html":"type family WidthSym0 :: AttributeUniverse where ...","name":"WidthSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:WidthSym0"},{"display_html":"type family HeightSym0 :: AttributeUniverse where ...","name":"HeightSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:HeightSym0"},{"display_html":"type family DepthSym0 :: AttributeUniverse where ...","name":"DepthSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:DepthSym0"},{"display_html":"type family VAlignSym0 :: AttributeUniverse where ...","name":"VAlignSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:VAlignSym0"},{"display_html":"type family HAlignSym0 :: AttributeUniverse where ...","name":"HAlignSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:HAlignSym0"},{"display_html":"type family StyleSym0 :: AttributeUniverse where ...","name":"StyleSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:StyleSym0"},{"display_html":"type family ClipSym0 :: AttributeUniverse where ...","name":"ClipSym0","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:ClipSym0"},{"display_html":"data SAttributeUniverse :: AttributeUniverse -> Type where","name":"SAttributeUniverse SClip SStyle SHAlign SVAlign SDepth SHeight SWidth SGradient STiling SOpacity SStrokeOpacity SRArrow SArrow SFillRule SLineJoin SLineCap SDash SSize SPen SFill SStroke STransformations SPin SMatrix SLayer","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:SAttributeUniverse"},{"display_html":"type CommonAttributes = [Layer, Matrix, Pin, Transformations]","name":"CommonAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:CommonAttributes"},{"display_html":"type TextAttributes = CommonAttributes ++ [Stroke, Size, Width, Height, Depth, VAlign, HAlign, Style, Opacity]","name":"TextAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TextAttributes"},{"display_html":"type TextLabelAttributes = TextAttributes","name":"TextLabelAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TextLabelAttributes"},{"display_html":"type MiniPageAttributes = TextAttributes","name":"MiniPageAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:MiniPageAttributes"},{"display_html":"type ImageAttributes = CommonAttributes","name":"ImageAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:ImageAttributes"},{"display_html":"type SymbolAttributes = CommonAttributes ++ [Stroke, Fill, Pen, Size]","name":"SymbolAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:SymbolAttributes"},{"display_html":"type PathAttributes = CommonAttributes ++ [Stroke, Fill, Dash, Pen, LineCap, LineJoin, FillRule, Arrow, RArrow, StrokeOpacity, Opacity, Tiling, Gradient]","name":"PathAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PathAttributes"},{"display_html":"type GroupAttributes = CommonAttributes ++ '['Clip]","name":"GroupAttributes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:GroupAttributes"},{"display_html":"newtype Attr (f :: TyFun u Type -> Type) (label :: u) = GAttr {}","name":"Attr _getAttr GAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:Attr"},{"display_html":"getAttr :: forall u (f :: TyFun u Type -> Type) (label :: u) u (f :: TyFun u Type -> Type) (label :: u). Iso (Attr (f :: TyFun u Type -> Type) (label :: u)) (Attr (f :: TyFun u Type -> Type) (label :: u)) (Maybe (Apply f label)) (Maybe (Apply f label))","name":"getAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:getAttr"},{"display_html":"pattern Attr :: Apply f label -> Attr f label","name":"Attr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:Attr"},{"display_html":"pattern NoAttr :: Attr f label","name":"NoAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:NoAttr"},{"display_html":"traverseAttr :: Applicative h => (Apply f label -> h (Apply g label)) -> Attr f label -> h (Attr g label)","name":"traverseAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:traverseAttr"},{"display_html":"pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a)","name":"pureAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:pureAttr"},{"display_html":"newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) = Attrs (Rec (Attr f) ats)","name":"Attributes Attrs","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:Attributes"},{"display_html":"unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats')","name":"unAttrs","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:unAttrs"},{"display_html":"traverseAttrs :: Applicative h => (forall label. Attr f label -> h (Attr g label)) -> Attributes f ats -> h (Attributes g ats)","name":"traverseAttrs","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:traverseAttrs"},{"display_html":"zipRecsWith :: (forall a. f a -> g a -> h a) -> Rec f as -> Rec g as -> Rec h as","name":"zipRecsWith","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:zipRecsWith"},{"display_html":"ixAttr :: forall at ats proxy f. at ats => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))","name":"ixAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:ixAttr"},{"display_html":"_Attr :: forall at ats proxy f. (at ats, RecApplicative ats) => proxy at -> Prism' (Attributes f ats) (Apply f at)","name":"_Attr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:_Attr"},{"display_html":"lookupAttr :: at ats => proxy at -> Attributes f ats -> Maybe (Apply f at)","name":"lookupAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:lookupAttr"},{"display_html":"setAttr :: forall proxy at ats f. at ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats","name":"setAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:setAttr"},{"display_html":"takeAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats)","name":"takeAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:takeAttr"},{"display_html":"unSetAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> Attributes f ats","name":"unSetAttr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:unSetAttr"},{"display_html":"attr :: (at ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats","name":"attr","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:attr"},{"display_html":"data PinType","name":"PinType Vertical Horizontal No Yes","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:PinType"},{"display_html":"data TransformationTypes","name":"TransformationTypes Translations Affine Rigid","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TransformationTypes"},{"display_html":"data HorizontalAlignment","name":"HorizontalAlignment AlignRight AlignHCenter AlignLeft","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:HorizontalAlignment"},{"display_html":"data VerticalAlignment","name":"VerticalAlignment AlignBaseline AlignBottom AlignVCenter AlignTop","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:VerticalAlignment"},{"display_html":"type TeXStyle = Text","name":"TeXStyle","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TeXStyle"},{"display_html":"type TextSizeUnit r = r","name":"TextSizeUnit","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:TextSizeUnit"},{"display_html":"newtype IpeSize r = IpeSize (IpeValue r)","name":"IpeSize IpeSize","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeSize"},{"display_html":"newtype IpePen r = IpePen (IpeValue r)","name":"IpePen IpePen","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpePen"},{"display_html":"data IpeDash r","name":"IpeDash DashPattern DashNamed","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeDash"},{"display_html":"data FillType","name":"FillType EOFill Wind","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:FillType"},{"display_html":"type IpeOpacity = Text","name":"IpeOpacity","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeOpacity"},{"display_html":"type IpeTiling = Text","name":"IpeTiling","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeTiling"},{"display_html":"type IpeGradient = Text","name":"IpeGradient","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeGradient"},{"display_html":"data IpeArrow r = IpeArrow {}","name":"IpeArrow _arrowSize _arrowName IpeArrow","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeArrow"},{"display_html":"arrowSize :: forall r r. Lens (IpeArrow r) (IpeArrow r) (IpeSize r) (IpeSize r)","name":"arrowSize","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:arrowSize"},{"display_html":"arrowName :: forall r. Lens' (IpeArrow r) Text","name":"arrowName","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:arrowName"},{"display_html":"normalArrow :: IpeArrow r","name":"normalArrow","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:normalArrow"},{"display_html":"class IpeAttrName (a :: AttributeUniverse) where","name":"IpeAttrName attrName","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#t:IpeAttrName"},{"display_html":"writeAttrNames :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs","name":"writeAttrNames","module":"Ipe.Attributes","link":"hgeometry/ipe/Ipe-Attributes.html#v:writeAttrNames"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:rect"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:width"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:symbolName"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:PathSegment"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:groupItems"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:ToObject"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:commonAttributes"},{"display_html":"flattenGroups :: [IpeObject r] -> [IpeObject r]","name":"flattenGroups","module":"Ipe.Content","link":"hgeometry/ipe/Ipe-Content.html#v:flattenGroups"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:singlePageFromContent"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:activeLayer"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:addStyleSheet"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:opacitiesStyle"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe.Types","link":"hgeometry/ipe/Ipe-Types.html#v:preambleData"},{"display_html":"applyMatrix' :: (IsTransformable (i r), Matrix AttributesOf i, Dimension (i r) ~ 2, r ~ NumType (i r)) => IpeObject' i r -> IpeObject' i r","name":"applyMatrix'","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatrix-39-"},{"display_html":"applyMatrix :: Fractional r => IpeObject r -> IpeObject r","name":"applyMatrix","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatrix"},{"display_html":"applyMatrices :: Fractional r => IpeFile r -> IpeFile r","name":"applyMatrices","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatrices"},{"display_html":"applyMatricesPage :: Fractional r => IpePage r -> IpePage r","name":"applyMatricesPage","module":"Ipe.Matrix","link":"hgeometry/ipe/Ipe-Matrix.html#v:applyMatricesPage"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readRawIpeFile"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readSinglePageFileThrow"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:ConversionError"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readIpeStylesheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:addStyleSheetFrom"},{"display_html":"fromIpeXML :: IpeRead (t r) => ByteString -> Either ConversionError (t r)","name":"fromIpeXML","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:fromIpeXML"},{"display_html":"readXML :: ByteString -> Either ConversionError (Node Text Text)","name":"readXML","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:readXML"},{"display_html":"class IpeReadText t where","name":"IpeReadText ipeReadText","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:IpeReadText"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:IpeRead"},{"display_html":"class IpeReadAttr t where","name":"IpeReadAttr ipeReadAttr","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:IpeReadAttr"},{"display_html":"ipeReadTextWith :: (Text -> Either t v) -> Text -> Either ConversionError (IpeValue v)","name":"ipeReadTextWith","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadTextWith"},{"display_html":"ipeReadObject :: (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy i -> proxy r -> Node Text Text -> Either ConversionError (i r :+ IpeAttributes i r)","name":"ipeReadObject","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadObject"},{"display_html":"ipeReadAttrs :: forall proxy proxy' i r f ats. (f ~ AttrMapSym1 r, ats ~ AttributesOf i, ReifyConstraint IpeReadAttr (Attr f) ats, RecApplicative ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => proxy i -> proxy' r -> Node Text Text -> Either ConversionError (IpeAttributes i r)","name":"ipeReadAttrs","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadAttrs"},{"display_html":"ipeReadRec :: forall f ats. (RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy f -> Proxy ats -> Node Text Text -> Either ConversionError (Rec (Attr f) ats)","name":"ipeReadRec","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#v:ipeReadRec"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.Reader","link":"hgeometry/ipe/Ipe-Reader.html#t:Coordinate"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#t:HasDefaultFromIpe"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe.FromIpe","link":"hgeometry/ipe/Ipe-FromIpe.html#v:readAllFrom"},{"display_html":"type IpeOut g i r = g -> IpeObject' i r","name":"IpeOut","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#t:IpeOut"},{"display_html":"type IpeOut' f g i r = g -> f (IpeObject' i r)","name":"IpeOut'","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#t:IpeOut-39-"},{"display_html":"(!) :: IpeObject' i r -> IpeAttributes i r -> IpeObject' i r","name":"!","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:-33-"},{"display_html":"iO :: ToObject i => IpeObject' i r -> IpeObject r","name":"iO","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:iO"},{"display_html":"iO'' :: (HasDefaultIpeOut g, NumType g ~ r, DefaultIpeOut g ~ i, ToObject i) => g -> IpeAttributes i r -> IpeObject r","name":"iO''","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:iO-39--39-"},{"display_html":"iO' :: HasDefaultIpeOut g => g -> IpeObject (NumType g)","name":"iO'","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:iO-39-"},{"display_html":"class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where","name":"HasDefaultIpeOut defIO DefaultIpeOut","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#t:HasDefaultIpeOut"},{"display_html":"ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r","name":"ipeMark","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeMark"},{"display_html":"ipeDiskMark :: IpeOut (Point 2 r) IpeSymbol r","name":"ipeDiskMark","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeDiskMark"},{"display_html":"defaultBox :: Num r => Rectangle (Point 2 r)","name":"defaultBox","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:defaultBox"},{"display_html":"ipeLine :: (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r","name":"ipeLine","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLine"},{"display_html":"ipeLineIn :: forall r. (Ord r, Fractional r, Show r) => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r","name":"ipeLineIn","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLineIn"},{"display_html":"ipeHalfLine :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeHalfLine","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeHalfLine"},{"display_html":"ipeRay :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeRay","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeRay"},{"display_html":"ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r","name":"ipeHalfLineIn","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeHalfLineIn"},{"display_html":"ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r","name":"ipeLineSegment","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLineSegment"},{"display_html":"ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r","name":"ipePolyLine","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipePolyLine"},{"display_html":"ipeEllipse :: IpeOut (Ellipse r) Path r","name":"ipeEllipse","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeEllipse"},{"display_html":"ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r","name":"ipeCircle","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeCircle"},{"display_html":"ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r","name":"ipeDisk","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeDisk"},{"display_html":"ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r","name":"ipeBezier","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeBezier"},{"display_html":"path :: PathSegment r -> Path r","name":"path","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:path"},{"display_html":"pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> PathSegment r","name":"pathSegment","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:pathSegment"},{"display_html":"ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r","name":"ipePolygon","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipePolygon"},{"display_html":"toPolygonPathSegment :: (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r","name":"toPolygonPathSegment","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:toPolygonPathSegment"},{"display_html":"ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r","name":"ipeSimplePolygon","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeSimplePolygon"},{"display_html":"ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r","name":"ipeRectangle","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeRectangle"},{"display_html":"ipeGroup :: Foldable f => IpeOut (f (IpeObject r)) Group r","name":"ipeGroup","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeGroup"},{"display_html":"ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r","name":"ipeLabel","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:ipeLabel"},{"display_html":"labelled :: (Show lbl, NumType g ~ r, ToObject i) => (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelled","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:labelled"},{"display_html":"labelledWith :: (Show lbl, NumType g ~ r, ToObject i) => IpeAttributes TextLabel r -> (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelledWith","module":"Ipe.IpeOut","link":"hgeometry/ipe/Ipe-IpeOut.html#v:labelledWith"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:toIpeSelectionXML"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#t:IpeWriteText"},{"display_html":"ipeWriteAttrs :: (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)]","name":"ipeWriteAttrs","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:ipeWriteAttrs"},{"display_html":"writeAttrValues :: (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs","name":"writeAttrValues","module":"Ipe.Writer","link":"hgeometry/ipe/Ipe-Writer.html#v:writeAttrValues"},{"display_html":"ipeToIpeWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpeWith","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:ipeToIpeWith"},{"display_html":"ipeToIpe :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpe","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:ipeToIpe"},{"display_html":"writeIpeFileAsPdf :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFileAsPdf","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:writeIpeFileAsPdf"},{"display_html":"data FileType","name":"FileType XML PDF","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:FileType"},{"display_html":"data Export","name":"Export RetainIpeInfo Export","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:Export"},{"display_html":"type PageNumber = Int","name":"PageNumber","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:PageNumber"},{"display_html":"type ViewNumber = Int","name":"ViewNumber","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:ViewNumber"},{"display_html":"data MarkedView","name":"MarkedView OnlyMarkedViews All","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:MarkedView"},{"display_html":"data NoZip","name":"NoZip NoZip Zip","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:NoZip"},{"display_html":"data PageRange","name":"PageRange EntireFile PageRange","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:PageRange"},{"display_html":"data Options = Options {}","name":"Options markedView nozip runLatex singleView pages export Options","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeToIpe","link":"hgeometry/ipe/Ipe-IpeToIpe.html#v:defaultOptions"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:singlePageFromContent"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readSinglePageFileThrow"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readRawIpeFile"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:ConversionError"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readAllFrom"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:toIpeSelectionXML"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeObject"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpePath"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeUse"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeGroup"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeMiniPage"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_IpeImage"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:activeLayer"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:opacitiesStyle"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:readIpeStylesheet"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:addStyleSheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:addStyleSheetFrom"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:preambleData"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeRead"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:HasDefaultFromIpe"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeWriteText"},{"display_html":"module Ipe.IpeOut","name":"","module":"Ipe","link":"hgeometry/ipe"},{"display_html":"module Ipe.Attributes","name":"","module":"Ipe","link":"hgeometry/ipe"},{"display_html":"module Ipe.Value","name":"","module":"Ipe","link":"hgeometry/ipe"},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe","link":"hgeometry/ipe/Ipe.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe","link":"hgeometry/ipe/Ipe.html#v:named"},{"display_html":"class (HasCenter ball point, NumType ball ~ NumType point, Point_ point (Dimension ball) (NumType ball)) => Ball_ ball point | ball -> point where","name":"Ball_ squaredRadius fromCenterAndSquaredRadius unitBall radius","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#t:Ball_"},{"display_html":"pattern Ball_ :: Ball_ ball point => point -> NumType ball -> ball","name":"Ball_","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:Ball_"},{"display_html":"class HasCenter geom point | geom -> point where","name":"HasCenter center","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#t:HasCenter"},{"display_html":"fromDiametralPair :: (Fractional r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) => point -> point -> ball","name":"fromDiametralPair","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:fromDiametralPair"},{"display_html":"fromCenterAndPoint :: (Num r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) => point -> point -> ball","name":"fromCenterAndPoint","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:fromCenterAndPoint"},{"display_html":"class (Ball_ disk point, Dimension disk ~ 2) => Disk_ disk point","name":"Disk_","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#t:Disk_"},{"display_html":"fromBoundaryPoints :: (Disk_ disk (Point 2 r), Point_ point 2 r, Fractional r) => Vector 3 point -> disk","name":"fromBoundaryPoints","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:fromBoundaryPoints"},{"display_html":"pattern Disk_ :: Disk_ ball point => point -> NumType ball -> ball","name":"Disk_","module":"HGeometry.Ball.Class","link":"hgeometry/kernel/HGeometry-Ball-Class.html#v:Disk_"},{"display_html":"newtype Boundary g = Boundary g","name":"Boundary Boundary","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#t:Boundary"},{"display_html":"_Boundary :: Iso g h (Boundary g) (Boundary h)","name":"_Boundary","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#v:_Boundary"},{"display_html":"data PointLocationResult","name":"PointLocationResult Inside OnBoundary Outside","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#t:PointLocationResult"},{"display_html":"data PointLocationResultWith edge","name":"PointLocationResultWith StrictlyInside OnBoundaryEdge StrictlyOutside","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#t:PointLocationResultWith"},{"display_html":"asPointLocationResult :: PointLocationResultWith edge -> PointLocationResult","name":"asPointLocationResult","module":"HGeometry.Boundary","link":"hgeometry/kernel/HGeometry-Boundary.html#v:asPointLocationResult"},{"display_html":"data CardinalDirection","name":"CardinalDirection North East South West","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#t:CardinalDirection"},{"display_html":"oppositeDirection :: CardinalDirection -> CardinalDirection","name":"oppositeDirection","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#v:oppositeDirection"},{"display_html":"data InterCardinalDirection","name":"InterCardinalDirection NorthWest NorthEast SouthEast SouthWest","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#t:InterCardinalDirection"},{"display_html":"interCardinalsOf :: CardinalDirection -> Vector 2 InterCardinalDirection","name":"interCardinalsOf","module":"HGeometry.Direction","link":"hgeometry/kernel/HGeometry-Direction.html#v:interCardinalsOf"},{"display_html":"class (NumType hyperPlane ~ r, Dimension hyperPlane ~ d, Has_ Vector_ d r, Has_ Vector_ (1 + d) r) => HyperPlane_ hyperPlane d r | hyperPlane -> d, hyperPlane -> r where","name":"HyperPlane_ evalHyperPlaneEquation hyperPlaneEquation normalVector onHyperPlane onSideTest","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:HyperPlane_"},{"display_html":"class HyperPlane_ hyperPlane d r => ConstructableHyperPlane_ hyperPlane d r where","name":"ConstructableHyperPlane_ HyperPlaneFromEquationConstraint hyperPlaneFromEquation fromPointAndNormal","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:ConstructableHyperPlane_"},{"display_html":"class HyperPlane_ hyperPlane d r => NonVerticalHyperPlane_ hyperPlane d r where","name":"NonVerticalHyperPlane_ hyperPlaneCoefficients evalAt verticalSideTest","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:NonVerticalHyperPlane_"},{"display_html":"isParallelTo :: (HyperPlane_ hyperPlane d r, HyperPlane_ hyperPlane' d r, Has_ Metric_ d r, Num r, Eq r, 1 <= d) => hyperPlane -> hyperPlane' -> Bool","name":"isParallelTo","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#v:isParallelTo"},{"display_html":"pointOn :: forall hyperPlane d r. (HyperPlane_ hyperPlane d r, Eq r, Fractional r, Has_ Additive_ d r, FoldableWithIndex Int (Vector d)) => hyperPlane -> Point d r","name":"pointOn","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#v:pointOn"},{"display_html":"class HyperPlaneFromPoints hyperPlane where","name":"HyperPlaneFromPoints hyperPlaneThrough","module":"HGeometry.HyperPlane.Class","link":"hgeometry/kernel/HGeometry-HyperPlane-Class.html#t:HyperPlaneFromPoints"},{"display_html":"class (HyperPlane_ (BoundingHyperPlane halfSpace d r) d r, Dimension halfSpace ~ d, Dimension (BoundingHyperPlane halfSpace d r) ~ d, NumType halfSpace ~ r, NumType (BoundingHyperPlane halfSpace d r) ~ r) => HalfSpace_ halfSpace d r | halfSpace -> d, halfSpace -> r where","name":"HalfSpace_ BoundingHyperPlane boundingHyperPlane halfSpaceSign","module":"HGeometry.HalfSpace.Class","link":"hgeometry/kernel/HGeometry-HalfSpace-Class.html#t:HalfSpace_"},{"display_html":"type HalfPlane_ halfPlane r = HalfSpace_ halfPlane 2 r","name":"HalfPlane_","module":"HGeometry.HalfSpace.Class","link":"hgeometry/kernel/HGeometry-HalfSpace-Class.html#t:HalfPlane_"},{"display_html":"module HGeometry.HyperPlane.Class","name":"","module":"HGeometry.HyperPlane","link":"hgeometry/kernel"},{"display_html":"newtype HyperPlane d r where","name":"HyperPlane HyperPlane HyperPlane2 HyperPlane3","module":"HGeometry.HyperPlane","link":"hgeometry/kernel/HGeometry-HyperPlane.html#t:HyperPlane"},{"display_html":"type MkHyperPlaneConstraints d r = (d < (d + 1), KnownNat d, Has_ Metric_ d r, Has_ Metric_ (d + 1) r, Has_ Vector_ d r, Has_ Vector_ (d + 1) r)","name":"MkHyperPlaneConstraints","module":"HGeometry.HyperPlane","link":"hgeometry/kernel/HGeometry-HyperPlane.html#t:MkHyperPlaneConstraints"},{"display_html":"cmpInDirection :: forall point d r. (Ord r, Num r, Has_ Metric_ (d + 1) r, Has_ Metric_ d r, Point_ point d r, d < (d + 1)) => Vector d r -> point -> point -> Ordering","name":"cmpInDirection","module":"HGeometry.HyperPlane","link":"hgeometry/kernel/HGeometry-HyperPlane.html#v:cmpInDirection"},{"display_html":"newtype NonVerticalHyperPlane d r where","name":"NonVerticalHyperPlane NonVerticalHyperPlane Plane","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#t:NonVerticalHyperPlane"},{"display_html":"asNonVerticalHyperPlane :: (HyperPlane_ hyperPlane d r, Fractional r, Eq r, 1 <= d) => hyperPlane -> Maybe (NonVerticalHyperPlane d r)","name":"asNonVerticalHyperPlane","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#v:asNonVerticalHyperPlane"},{"display_html":"type Plane = NonVerticalHyperPlane 3","name":"Plane","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#t:Plane"},{"display_html":"type Plane_ plane = NonVerticalHyperPlane_ plane 3","name":"Plane_","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#t:Plane_"},{"display_html":"pattern Plane_ :: Plane_ plane r => r -> r -> r -> plane","name":"Plane_","module":"HGeometry.HyperPlane.NonVertical","link":"hgeometry/kernel/HGeometry-HyperPlane-NonVertical.html#v:Plane_"},{"display_html":"type family Intersection g h :: Type","name":"Intersection","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:Intersection"},{"display_html":"data family IntersectionOf g h","name":"IntersectionOf","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:IntersectionOf"},{"display_html":"class HasIntersectionWith g h where","name":"HasIntersectionWith intersects","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:HasIntersectionWith"},{"display_html":"class HasIntersectionWith g h => IsIntersectableWith g h where","name":"IsIntersectableWith intersect","module":"HGeometry.Intersection","link":"hgeometry/kernel/HGeometry-Intersection.html#t:IsIntersectableWith"},{"display_html":"data HalfSpaceF boundingHyperPlane = HalfSpace !Sign boundingHyperPlane","name":"HalfSpaceF HalfSpace","module":"HGeometry.HalfSpace","link":"hgeometry/kernel/HGeometry-HalfSpace.html#t:HalfSpaceF"},{"display_html":"type HalfSpace d r = HalfSpaceF (HyperPlane d r)","name":"HalfSpace","module":"HGeometry.HalfSpace","link":"hgeometry/kernel/HGeometry-HalfSpace.html#t:HalfSpace"},{"display_html":"data Sign","name":"Sign Negative Positive","module":"HGeometry.HalfSpace","link":"hgeometry/kernel/HGeometry-HalfSpace.html#t:Sign"},{"display_html":"module HGeometry.HalfSpace.Class","name":"","module":"HGeometry.HalfSpace","link":"hgeometry/kernel"},{"display_html":"class IsEndPoint endPoint endPoint => EndPoint_ endPoint where","name":"EndPoint_ endPointType mkEndPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:EndPoint_"},{"display_html":"class IsEndPoint endPoint endPoint' where","name":"IsEndPoint _endPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:IsEndPoint"},{"display_html":"data EndPointType","name":"EndPointType Open Closed","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:EndPointType"},{"display_html":"newtype EndPoint (et :: EndPointType) r where","name":"EndPoint EndPoint OpenE ClosedE","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:EndPoint"},{"display_html":"data AnEndPoint r where","name":"AnEndPoint AnOpenE AnClosedE AnEndPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#t:AnEndPoint"},{"display_html":"asAnEndPoint :: EndPoint_ endPoint => endPoint -> AnEndPoint (IxValue endPoint)","name":"asAnEndPoint","module":"HGeometry.Interval.EndPoint","link":"hgeometry/kernel/HGeometry-Interval-EndPoint.html#v:asAnEndPoint"},{"display_html":"class (IntervalLike_ interval r, NumType interval ~ r) => Interval_ interval r | interval -> r","name":"Interval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:Interval_"},{"display_html":"pattern Interval_ :: Interval_ interval r => StartPointOf interval -> EndPointOf interval -> interval","name":"Interval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:Interval_"},{"display_html":"class (HasStart interval point, HasStartPoint interval (StartPointOf interval), HasEnd interval point, HasEndPoint interval (EndPointOf interval), EndPoint_ (EndPointOf interval), IxValue (EndPointOf interval) ~ point, EndPoint_ (StartPointOf interval), IxValue (StartPointOf interval) ~ point) => IntervalLike_ interval point | interval -> point","name":"IntervalLike_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:IntervalLike_"},{"display_html":"class Interval_ interval point => ConstructableInterval_ interval point where","name":"ConstructableInterval_ mkInterval buildInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ConstructableInterval_"},{"display_html":"class (Interval_ interval r, StartPointOf interval ~ EndPoint Closed r, EndPointOf interval ~ EndPoint Closed r) => ClosedInterval_ interval r","name":"ClosedInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ClosedInterval_"},{"display_html":"pattern ClosedInterval_ :: ClosedInterval_ interval r => r -> r -> interval","name":"ClosedInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:ClosedInterval_"},{"display_html":"class (ClosedInterval_ interval r, ConstructableInterval_ interval r) => ConstructableClosedInterval_ interval r where","name":"ConstructableClosedInterval_ mkClosedInterval buildClosedInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ConstructableClosedInterval_"},{"display_html":"clampTo :: (ClosedInterval_ interval r, Ord r) => interval -> r -> r","name":"clampTo","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:clampTo"},{"display_html":"class (Interval_ interval r, StartPointOf interval ~ EndPoint Open r, EndPointOf interval ~ EndPoint Open r) => OpenInterval_ interval r | interval -> r","name":"OpenInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:OpenInterval_"},{"display_html":"pattern OpenInterval_ :: OpenInterval_ interval r => r -> r -> interval","name":"OpenInterval_","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:OpenInterval_"},{"display_html":"class (OpenInterval_ interval r, ConstructableInterval_ interval r) => ConstructableOpenInterval_ interval r | interval -> r where","name":"ConstructableOpenInterval_ mkOpenInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:ConstructableOpenInterval_"},{"display_html":"class HasStart seg p | seg -> p where","name":"HasStart start","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasStart"},{"display_html":"class HasEnd seg p | seg -> p where","name":"HasEnd end","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasEnd"},{"display_html":"startAndEnd :: (HasStart seg p, HasEnd seg p) => seg -> (p, p)","name":"startAndEnd","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:startAndEnd"},{"display_html":"type family StartPointOf interval","name":"StartPointOf","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:StartPointOf"},{"display_html":"type family EndPointOf interval","name":"EndPointOf","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:EndPointOf"},{"display_html":"class HasStartPoint seg p | seg -> p where","name":"HasStartPoint startPoint","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasStartPoint"},{"display_html":"class HasEndPoint seg p | seg -> p where","name":"HasEndPoint endPoint","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:HasEndPoint"},{"display_html":"startAndEndPoint :: (HasStartPoint seg s, HasEndPoint seg e) => seg -> (s, e)","name":"startAndEndPoint","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:startAndEndPoint"},{"display_html":"inInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> PointLocationResult","name":"inInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:inInterval"},{"display_html":"stabsInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> Bool","name":"stabsInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:stabsInterval"},{"display_html":"compareInterval :: (Ord r, Interval_ interval r) => r -> interval -> Ordering","name":"compareInterval","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:compareInterval"},{"display_html":"compareIntervalExact :: (Ord r, Interval_ interval r) => r -> interval -> CompareInterval","name":"compareIntervalExact","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:compareIntervalExact"},{"display_html":"data CompareInterval","name":"CompareInterval Before OnStart Interior OnEnd After","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#t:CompareInterval"},{"display_html":"shiftLeft :: (Num r, Interval_ interval r) => r -> interval -> interval","name":"shiftLeft","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:shiftLeft"},{"display_html":"shiftRight :: (Num r, Interval_ interval r) => r -> interval -> interval","name":"shiftRight","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:shiftRight"},{"display_html":"duration :: (Interval_ interval r, Num r) => interval -> r","name":"duration","module":"HGeometry.Interval.Class","link":"hgeometry/kernel/HGeometry-Interval-Class.html#v:duration"},{"display_html":"module HGeometry.Interval.EndPoint","name":"","module":"HGeometry.Interval.Class","link":"hgeometry/kernel"},{"display_html":"data Interval endPoint r where","name":"Interval Interval ClosedInterval OpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:Interval"},{"display_html":"type ClosedInterval r = Interval (EndPoint Closed) r","name":"ClosedInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:ClosedInterval"},{"display_html":"type OpenInterval r = Interval (EndPoint Open) r","name":"OpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:OpenInterval"},{"display_html":"data HalfOpenInterval r = HalfOpenInterval !(EndPoint Open r) !(EndPoint Closed r)","name":"HalfOpenInterval HalfOpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:HalfOpenInterval"},{"display_html":"module HGeometry.Interval.Class","name":"","module":"HGeometry.Interval","link":"hgeometry/kernel"},{"display_html":"asClosedInterval :: Interval_ interval r => interval -> Maybe (ClosedInterval r)","name":"asClosedInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#v:asClosedInterval"},{"display_html":"asOpenInterval :: Interval_ interval r => interval -> Maybe (OpenInterval r)","name":"asOpenInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#v:asOpenInterval"},{"display_html":"asAnInterval :: Interval_ interval r => interval -> Interval AnEndPoint r","name":"asAnInterval","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#v:asAnInterval"},{"display_html":"data Interval_x_IntervalIntersection r interval","name":"Interval_x_IntervalIntersection Interval_x_Interval_Point Interval_x_Interval_Contained Interval_x_Interval_Partial","module":"HGeometry.Interval","link":"hgeometry/kernel/HGeometry-Interval.html#t:Interval_x_IntervalIntersection"},{"display_html":"class (HasMinPoint box point, HasMaxPoint box point, Point_ point (Dimension box) (NumType box)) => Box_ box point | box -> point where","name":"Box_ extent","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:Box_"},{"display_html":"class HasMinPoint box point | box -> point where","name":"HasMinPoint minPoint","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:HasMinPoint"},{"display_html":"class HasMaxPoint box point | box -> point where","name":"HasMaxPoint maxPoint","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:HasMaxPoint"},{"display_html":"centerPoint :: (Box_ box point, Point_ point d r, Fractional r) => box -> point","name":"centerPoint","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:centerPoint"},{"display_html":"type Rectangle_ rectangle point = (Box_ rectangle point, Dimension rectangle ~ 2)","name":"Rectangle_","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#t:Rectangle_"},{"display_html":"width :: (Box_ box point, Point_ point d r, 1 <= d, Functor (Vector d), Num r) => box -> r","name":"width","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:width"},{"display_html":"height :: (Box_ box point, Point_ point d r, 2 <= d, Functor (Vector d), Num r) => box -> r","name":"height","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:height"},{"display_html":"size :: forall box d point r. (Box_ box point, Point_ point d r, Num r, Functor (Vector d)) => box -> Vector d r","name":"size","module":"HGeometry.Box.Class","link":"hgeometry/kernel/HGeometry-Box-Class.html#v:size"},{"display_html":"class Line_ line d r | line -> d, line -> r where","name":"Line_ fromPointAndVec","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#t:Line_"},{"display_html":"type Line2_ line r = (Line_ line 2 r, HyperPlane_ line 2 r)","name":"Line2_","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#t:Line2_"},{"display_html":"lineThrough :: forall line point d r. (Line_ line d r, Point_ point d r, Num r) => point -> point -> line","name":"lineThrough","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#v:lineThrough"},{"display_html":"verticalLine :: forall r line. (Line_ line 2 r, Num r) => r -> line","name":"verticalLine","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#v:verticalLine"},{"display_html":"horizontalLine :: forall r line. (Line_ line 2 r, Num r) => r -> line","name":"horizontalLine","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#v:horizontalLine"},{"display_html":"class HasOnLine line d | line -> d where","name":"HasOnLine onLine","module":"HGeometry.Line.Class","link":"hgeometry/kernel/HGeometry-Line-Class.html#t:HasOnLine"},{"display_html":"type NVLine2_ line r = (Line_ line 2 r, NonVerticalHyperPlane_ line 2 r)","name":"NVLine2_","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#t:NVLine2_"},{"display_html":"pattern NVLine2_ :: NonVerticalHyperPlane_ line 2 r => r -> r -> line","name":"NVLine2_","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#v:NVLine2_"},{"display_html":"slope :: NonVerticalHyperPlane_ line 2 r => Lens' line r","name":"slope","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#v:slope"},{"display_html":"intercept :: NonVerticalHyperPlane_ line 2 r => Lens' line r","name":"intercept","module":"HGeometry.Line.NonVertical.Class","link":"hgeometry/kernel/HGeometry-Line-NonVertical-Class.html#v:intercept"},{"display_html":"newtype LineEQ r where","name":"LineEQ LineEQ MkLineEQ","module":"HGeometry.Line.LineEQ","link":"hgeometry/kernel/HGeometry-Line-LineEQ.html#t:LineEQ"},{"display_html":"evalAt' :: Num r => r -> LineEQ r -> r","name":"evalAt'","module":"HGeometry.Line.LineEQ","link":"hgeometry/kernel/HGeometry-Line-LineEQ.html#v:evalAt-39-"},{"display_html":"module HGeometry.Line.NonVertical.Class","name":"","module":"HGeometry.Line.LineEQ","link":"hgeometry/kernel"},{"display_html":"data VerticalOrLineEQ r","name":"VerticalOrLineEQ NonVertical VerticalLineThrough","module":"HGeometry.Line.General","link":"hgeometry/kernel/HGeometry-Line-General.html#t:VerticalOrLineEQ"},{"display_html":"dualPoint :: forall hyperPlane d r. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d) => hyperPlane -> Point d r","name":"dualPoint","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:dualPoint"},{"display_html":"dualHyperPlane :: forall point d r. (Point_ point d r, Num r, 1 <= d) => point -> NonVerticalHyperPlane d r","name":"dualHyperPlane","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:dualHyperPlane"},{"display_html":"dualLine :: (Point_ point 2 r, Num r) => point -> LineEQ r","name":"dualLine","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:dualLine"},{"display_html":"liftPointToPlane :: (Point_ point 2 r, Num r) => point -> NonVerticalHyperPlane 3 r","name":"liftPointToPlane","module":"HGeometry.Duality","link":"hgeometry/kernel/HGeometry-Duality.html#v:liftPointToPlane"},{"display_html":"data LinePV d r = LinePV {}","name":"LinePV LinePV _anchorPoint _direction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:LinePV"},{"display_html":"anchorPoint :: Lens' (LinePV d r) (Point d r)","name":"anchorPoint","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:anchorPoint"},{"display_html":"class HasDirection t where","name":"HasDirection direction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:HasDirection"},{"display_html":"isIdenticalTo :: Eq (Vector d r) => LinePV d r -> LinePV d r -> Bool","name":"isIdenticalTo","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:isIdenticalTo"},{"display_html":"class HasSupportingLine t where","name":"HasSupportingLine supportingLine","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:HasSupportingLine"},{"display_html":"fromLinearFunction :: Num r => r -> r -> LinePV 2 r","name":"fromLinearFunction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:fromLinearFunction"},{"display_html":"toLinearFunction :: forall r. (Fractional r, Ord r) => LinePV 2 r -> Maybe (LineEQ r)","name":"toLinearFunction","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:toLinearFunction"},{"display_html":"data SideTestUpDown","name":"SideTestUpDown On Above Below","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:SideTestUpDown"},{"display_html":"class OnSideUpDownTest t where","name":"OnSideUpDownTest onSideUpDown","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:OnSideUpDownTest"},{"display_html":"liesAbove :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool","name":"liesAbove","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:liesAbove"},{"display_html":"liesBelow :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool","name":"liesBelow","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:liesBelow"},{"display_html":"data SideTest","name":"SideTest LeftSide OnLine RightSide","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#t:SideTest"},{"display_html":"onSide :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest","name":"onSide","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:onSide"},{"display_html":"leftHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r)","name":"leftHalfPlane","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:leftHalfPlane"},{"display_html":"rightHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r)","name":"rightHalfPlane","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:rightHalfPlane"},{"display_html":"bisector :: (Fractional r, Point_ point 2 r) => point -> point -> LinePV 2 r","name":"bisector","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:bisector"},{"display_html":"perpendicularTo :: Num r => LinePV 2 r -> LinePV 2 r","name":"perpendicularTo","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:perpendicularTo"},{"display_html":"isPerpendicularTo :: (Num r, Eq r) => Vector 2 r -> LinePV 2 r -> Bool","name":"isPerpendicularTo","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:isPerpendicularTo"},{"display_html":"cmpSlope :: forall r. (Num r, Ord r) => LinePV 2 r -> LinePV 2 r -> Ordering","name":"cmpSlope","module":"HGeometry.Line.PointAndVector","link":"hgeometry/kernel/HGeometry-Line-PointAndVector.html#v:cmpSlope"},{"display_html":"module HGeometry.Line.Class","name":"","module":"HGeometry.Line","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Line.LineEQ","name":"","module":"HGeometry.Line","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Line.PointAndVector","name":"","module":"HGeometry.Line","link":"hgeometry/kernel"},{"display_html":"type LineLineIntersection line = LineLineIntersectionG (NumType line) line","name":"LineLineIntersection","module":"HGeometry.Line","link":"hgeometry/kernel/HGeometry-Line.html#t:LineLineIntersection"},{"display_html":"data LineLineIntersectionG r line","name":"LineLineIntersectionG Line_x_Line_Point Line_x_Line_Line","module":"HGeometry.Line","link":"hgeometry/kernel/HGeometry-Line.html#t:LineLineIntersectionG"},{"display_html":"data HalfLine point = HalfLine !point !(Vector (Dimension point) (NumType point))","name":"HalfLine HalfLine","module":"HGeometry.HalfLine","link":"hgeometry/kernel/HGeometry-HalfLine.html#t:HalfLine"},{"display_html":"halfLineThrough :: (Point_ point d r, Num r) => point -> point -> HalfLine point","name":"halfLineThrough","module":"HGeometry.HalfLine","link":"hgeometry/kernel/HGeometry-HalfLine.html#v:halfLineThrough"},{"display_html":"data LineHalfLineIntersection point halfLine","name":"LineHalfLineIntersection Line_x_HalfLine_Point Line_x_HalfLine_HalfLine","module":"HGeometry.HalfLine","link":"hgeometry/kernel/HGeometry-HalfLine.html#t:LineHalfLineIntersection"},{"display_html":"class (IntervalLike_ lineSegment point, Point_ point (Dimension lineSegment) (NumType lineSegment)) => LineSegment_ lineSegment point | lineSegment -> point","name":"LineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:LineSegment_"},{"display_html":"pattern LineSegment_ :: forall lineSegment point. LineSegment_ lineSegment point => point -> point -> lineSegment","name":"LineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:LineSegment_"},{"display_html":"class LineSegment_ lineSegment point => ConstructableLineSegment_ lineSegment point where","name":"ConstructableLineSegment_ uncheckedLineSegment mkLineSegment","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:ConstructableLineSegment_"},{"display_html":"class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Closed point, EndPointOf lineSegment ~ EndPoint Closed point) => ClosedLineSegment_ lineSegment point","name":"ClosedLineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:ClosedLineSegment_"},{"display_html":"class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Open point, EndPointOf lineSegment ~ EndPoint Open point) => OpenLineSegment_ lineSegment point","name":"OpenLineSegment_","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:OpenLineSegment_"},{"display_html":"interpolate :: forall lineSegment d point r. (Fractional r, LineSegment_ lineSegment point, ConstructablePoint_ point d r) => r -> lineSegment -> point","name":"interpolate","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:interpolate"},{"display_html":"class HasOnSegment lineSegment d | lineSegment -> d where","name":"HasOnSegment onSegment","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasOnSegment"},{"display_html":"class HasStart seg p | seg -> p where","name":"HasStart start","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasStart"},{"display_html":"class HasEnd seg p | seg -> p where","name":"HasEnd end","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasEnd"},{"display_html":"class HasStartPoint seg p | seg -> p where","name":"HasStartPoint startPoint","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasStartPoint"},{"display_html":"class HasEndPoint seg p | seg -> p where","name":"HasEndPoint endPoint","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:HasEndPoint"},{"display_html":"type family StartPointOf interval","name":"StartPointOf","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:StartPointOf"},{"display_html":"type family EndPointOf interval","name":"EndPointOf","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#t:EndPointOf"},{"display_html":"ordAtY :: (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering","name":"ordAtY","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:ordAtY"},{"display_html":"ordAtX :: (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering","name":"ordAtX","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:ordAtX"},{"display_html":"xCoordAt :: (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> r","name":"xCoordAt","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:xCoordAt"},{"display_html":"yCoordAt :: (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> r","name":"yCoordAt","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:yCoordAt"},{"display_html":"orientLR :: (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) => lineSegment -> lineSegment","name":"orientLR","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:orientLR"},{"display_html":"orientBT :: (LineSegment_ lineSegment point, Point_ point d r, 2 <= d, Ord r) => lineSegment -> lineSegment","name":"orientBT","module":"HGeometry.LineSegment.Class","link":"hgeometry/kernel/HGeometry-LineSegment-Class.html#v:orientBT"},{"display_html":"class (r ~ NumType matrix, Ixed matrix, IxValue matrix ~ r, Index matrix ~ (Int, Int), HasElements matrix matrix) => Matrix_ matrix n m r | matrix -> n, matrix -> m, matrix -> r where","name":"Matrix_ !!* !* !*! *!! column generateMatrix matrixFromRows rows identityMatrix matrixFromList row","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:Matrix_"},{"display_html":"class HasElements matrix matrix' where","name":"HasElements elements","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:HasElements"},{"display_html":"class HasDeterminant d where","name":"HasDeterminant det","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:HasDeterminant"},{"display_html":"class Invertible n where","name":"Invertible inverseMatrix","module":"HGeometry.Matrix.Class","link":"hgeometry/kernel/HGeometry-Matrix-Class.html#t:Invertible"},{"display_html":"newtype Matrix n m r = Matrix (Vector n (Vector m r))","name":"Matrix Matrix","module":"HGeometry.Matrix","link":"hgeometry/kernel/HGeometry-Matrix.html#t:Matrix"},{"display_html":"type OptMatrix_ d r = (Has_ Additive_ d r, Has_ Vector_ d (Vector d r), Ixed (Vector d r), Ixed (Vector d (Vector d r)))","name":"OptMatrix_","module":"HGeometry.Matrix","link":"hgeometry/kernel/HGeometry-Matrix.html#t:OptMatrix_"},{"display_html":"module HGeometry.Matrix.Class","name":"","module":"HGeometry.Matrix","link":"hgeometry/kernel"},{"display_html":"newtype Transformation d r = Transformation (Matrix (d + 1) (d + 1) r)","name":"Transformation Transformation","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:Transformation"},{"display_html":"transformationMatrix :: Iso (Transformation d r) (Transformation d s) (Matrix (d + 1) (d + 1) r) (Matrix (d + 1) (d + 1) s)","name":"transformationMatrix","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:transformationMatrix"},{"display_html":"(|.|) :: (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r","name":"|.|","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:-124-.-124-"},{"display_html":"identity :: (Num r, OptMatrix_ (d + 1) r) => Transformation d r","name":"identity","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:identity"},{"display_html":"inverseOf :: (Fractional r, OptMatrix_ (d + 1) r, Invertible (d + 1)) => Transformation d r -> Transformation d r","name":"inverseOf","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:inverseOf"},{"display_html":"class IsTransformable g where","name":"IsTransformable transformBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:IsTransformable"},{"display_html":"type TransformationConstraints d r = (KnownNat d, Has_ Vector_ d r, OptMatrix_ (d + 1) r, HasComponents (Vector (d + 1) r) (Vector (d + 1) (Vector (d + 1) r)), Has_ Additive_ (d + 1) r)","name":"TransformationConstraints","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:TransformationConstraints"},{"display_html":"type DefaultTransformByConstraints g d r = (d ~ Dimension g, r ~ NumType g, OptMatrix_ (d + 1) r, Fractional r, Has_ Additive_ d r, HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r))","name":"DefaultTransformByConstraints","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:DefaultTransformByConstraints"},{"display_html":"type OptMatrix_ d r = (Has_ Additive_ d r, Has_ Vector_ d (Vector d r), Ixed (Vector d r), Ixed (Vector d (Vector d r)))","name":"OptMatrix_","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#t:OptMatrix_"},{"display_html":"translation :: forall d r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r","name":"translation","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:translation"},{"display_html":"scaling :: forall d r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r","name":"scaling","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:scaling"},{"display_html":"uniformScaling :: forall d r. (Num r, TransformationConstraints d r) => r -> Transformation d r","name":"uniformScaling","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:uniformScaling"},{"display_html":"translateBy :: (IsTransformable g, Num (NumType g), Vector_ vector (Dimension g) (NumType g), TransformationConstraints (Dimension g) (NumType g)) => vector -> g -> g","name":"translateBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:translateBy"},{"display_html":"scaleBy :: (IsTransformable g, Num (NumType g), Vector_ vector (Dimension g) (NumType g), TransformationConstraints (Dimension g) (NumType g)) => vector -> g -> g","name":"scaleBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:scaleBy"},{"display_html":"scaleUniformlyBy :: (IsTransformable g, Num (NumType g), TransformationConstraints (Dimension g) (NumType g)) => NumType g -> g -> g","name":"scaleUniformlyBy","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:scaleUniformlyBy"},{"display_html":"rotateTo :: Num r => Vector 3 (Vector 3 r) -> Transformation 3 r","name":"rotateTo","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:rotateTo"},{"display_html":"skewX :: Num r => r -> Transformation 2 r","name":"skewX","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:skewX"},{"display_html":"rotation :: Floating r => r -> Transformation 2 r","name":"rotation","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:rotation"},{"display_html":"reflection :: Floating r => r -> Transformation 2 r","name":"reflection","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:reflection"},{"display_html":"reflectionV :: Num r => Transformation 2 r","name":"reflectionV","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:reflectionV"},{"display_html":"reflectionH :: Num r => Transformation 2 r","name":"reflectionH","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:reflectionH"},{"display_html":"fitToBox :: forall rectangle g point r. (NumType g ~ r, Dimension g ~ 2, IsTransformable g, IsBoxable g, Rectangle_ rectangle point, Point_ point 2 r, Ord r, Fractional r) => rectangle -> g -> g","name":"fitToBox","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:fitToBox"},{"display_html":"fitToBoxTransform :: forall rectangle g point r. (NumType g ~ r, Dimension g ~ 2, IsTransformable g, IsBoxable g, Rectangle_ rectangle point, Point_ point 2 r, Ord r, Fractional r) => rectangle -> g -> Transformation 2 r","name":"fitToBoxTransform","module":"HGeometry.Transformation","link":"hgeometry/kernel/HGeometry-Transformation.html#v:fitToBoxTransform"},{"display_html":"data LineSegment endPoint point where","name":"LineSegment LineSegment ClosedLineSegment OpenLineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:LineSegment"},{"display_html":"type ClosedLineSegment point = LineSegment (EndPoint Closed) point","name":"ClosedLineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:ClosedLineSegment"},{"display_html":"type OpenLineSegment point = LineSegment (EndPoint Open) point","name":"OpenLineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:OpenLineSegment"},{"display_html":"newtype EndPoint (et :: EndPointType) r where","name":"EndPoint EndPoint OpenE ClosedE","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:EndPoint"},{"display_html":"data AnEndPoint r where","name":"AnEndPoint AnEndPoint AnOpenE AnClosedE","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:AnEndPoint"},{"display_html":"module HGeometry.LineSegment.Class","name":"","module":"HGeometry.LineSegment","link":"hgeometry/kernel"},{"display_html":"spanIn :: (Point_ point d r, Ord r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => Getter point r -> LineSegment endPoint point -> Interval AnEndPoint r","name":"spanIn","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#v:spanIn"},{"display_html":"class IsEndPoint endPoint endPoint => EndPoint_ endPoint where","name":"EndPoint_ endPointType mkEndPoint","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:EndPoint_"},{"display_html":"data LineLineSegmentIntersection lineSegment","name":"LineLineSegmentIntersection Line_x_LineSegment_Point Line_x_LineSegment_LineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:LineLineSegmentIntersection"},{"display_html":"data LineSegmentLineSegmentIntersection lineSegment","name":"LineSegmentLineSegmentIntersection LineSegment_x_LineSegment_Point LineSegment_x_LineSegment_LineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:LineSegmentLineSegmentIntersection"},{"display_html":"data HalfLineLineSegmentIntersection point segment","name":"HalfLineLineSegmentIntersection HalfLine_x_LineSegment_Point HalfLine_x_LineSegment_LineSegment","module":"HGeometry.LineSegment","link":"hgeometry/kernel/HGeometry-LineSegment.html#t:HalfLineLineSegmentIntersection"},{"display_html":"data Ball point where","name":"Ball Ball Disk","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Ball"},{"display_html":"type Disk = Ball","name":"Disk","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Disk"},{"display_html":"newtype Sphere point where","name":"Sphere Sphere Circle MkSphere","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Sphere"},{"display_html":"type Circle = Sphere","name":"Circle","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:Circle"},{"display_html":"_BallSphere :: Iso (Ball point) (Ball point') (Sphere point) (Sphere point')","name":"_BallSphere","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#v:_BallSphere"},{"display_html":"_DiskCircle :: Iso (Disk point) (Disk point') (Circle point) (Circle point')","name":"_DiskCircle","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#v:_DiskCircle"},{"display_html":"data family IntersectionOf g h","name":"IntersectionOf Line_x_Ball_Point Line_x_Ball_Segment","module":"HGeometry.Ball.CenterAndRadius","link":"hgeometry/kernel/HGeometry-Ball-CenterAndRadius.html#t:IntersectionOf"},{"display_html":"module HGeometry.Ball.CenterAndRadius","name":"","module":"HGeometry.Ball","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Ball.Class","name":"","module":"HGeometry.Ball","link":"hgeometry/kernel"},{"display_html":"newtype Ellipse r = Ellipse (Transformation 2 r)","name":"Ellipse Ellipse","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#t:Ellipse"},{"display_html":"affineTransformation :: Iso (Ellipse r) (Ellipse s) (Transformation 2 r) (Transformation 2 s)","name":"affineTransformation","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:affineTransformation"},{"display_html":"ellipseMatrix :: Iso (Ellipse r) (Ellipse s) (Matrix 3 3 r) (Matrix 3 3 s)","name":"ellipseMatrix","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:ellipseMatrix"},{"display_html":"unitEllipse :: Num r => Ellipse r","name":"unitEllipse","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:unitEllipse"},{"display_html":"circleToEllipse :: (Radical r, Point_ point 2 r) => Circle point -> Ellipse r","name":"circleToEllipse","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:circleToEllipse"},{"display_html":"ellipseToCircle :: (Num r, Eq r) => Ellipse r -> Maybe (Circle (Point 2 r))","name":"ellipseToCircle","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:ellipseToCircle"},{"display_html":"_EllipseCircle :: (Radical r, Eq r) => Prism' (Ellipse r) (Circle (Point 2 r))","name":"_EllipseCircle","module":"HGeometry.Ellipse","link":"hgeometry/kernel/HGeometry-Ellipse.html#v:_EllipseCircle"},{"display_html":"module HGeometry.Box.Class","name":"","module":"HGeometry.Box","link":"hgeometry/kernel"},{"display_html":"data Box point where","name":"Box Box Rectangle","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Box"},{"display_html":"type Rectangle = Box","name":"Rectangle","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Rectangle"},{"display_html":"fromExtent :: (Vector_ vector d interval, ClosedInterval_ interval r, Has_ Additive_ d r, Has_ Vector_ d interval, HasComponents (Vector d interval) (Vector d r)) => vector -> Box (Point d r)","name":"fromExtent","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:fromExtent"},{"display_html":"data Corners a = Corners !a !a !a !a","name":"Corners Corners","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Corners"},{"display_html":"northWest :: Lens' (Corners a) a","name":"northWest","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:northWest"},{"display_html":"northEast :: Lens' (Corners a) a","name":"northEast","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:northEast"},{"display_html":"southEast :: Lens' (Corners a) a","name":"southEast","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:southEast"},{"display_html":"southWest :: Lens' (Corners a) a","name":"southWest","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:southWest"},{"display_html":"corners :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Corners point","name":"corners","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:corners"},{"display_html":"cornersInDirection :: CardinalDirection -> Corners p -> Vector 2 p","name":"cornersInDirection","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:cornersInDirection"},{"display_html":"data Sides a = Sides !a !a !a !a","name":"Sides Sides","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:Sides"},{"display_html":"north :: Lens' (Sides a) a","name":"north","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:north"},{"display_html":"east :: Lens' (Sides a) a","name":"east","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:east"},{"display_html":"south :: Lens' (Sides a) a","name":"south","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:south"},{"display_html":"west :: Lens' (Sides a) a","name":"west","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:west"},{"display_html":"topSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"topSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:topSide"},{"display_html":"bottomSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"bottomSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:bottomSide"},{"display_html":"leftSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"leftSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:leftSide"},{"display_html":"rightSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point","name":"rightSide","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:rightSide"},{"display_html":"sides :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point)","name":"sides","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sides"},{"display_html":"sides' :: (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point)","name":"sides'","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sides-39-"},{"display_html":"sideDirections :: Sides CardinalDirection","name":"sideDirections","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sideDirections"},{"display_html":"sideValues :: (Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides r","name":"sideValues","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#v:sideValues"},{"display_html":"class IsBoxable g where","name":"IsBoxable boundingBox","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:IsBoxable"},{"display_html":"data LineBoxIntersection d r","name":"LineBoxIntersection Line_x_Box_Point Line_x_Box_LineSegment","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:LineBoxIntersection"},{"display_html":"data HalfLineBoxIntersection point","name":"HalfLineBoxIntersection HalfLine_x_Box_Point HalfLine_x_Box_LineSegment","module":"HGeometry.Box","link":"hgeometry/kernel/HGeometry-Box.html#t:HalfLineBoxIntersection"},{"display_html":"module HGeometry.Line","name":"","module":"HGeometry.Kernel","link":"hgeometry/kernel"},{"display_html":"module HGeometry.LineSegment","name":"","module":"HGeometry.Kernel","link":"hgeometry/kernel"},{"display_html":"module HGeometry.Box","name":"","module":"HGeometry.Kernel","link":"hgeometry/kernel"},{"display_html":"class Point_ point (Dimension point) (NumType point) => Triangle_ triangle point | triangle -> point where","name":"Triangle_ corners mkTriangle","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#t:Triangle_"},{"display_html":"pattern Triangle_ :: Triangle_ triangle point => point -> point -> point -> triangle","name":"Triangle_","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:Triangle_"},{"display_html":"toCounterClockwiseTriangle :: (Num r, Eq r, Point_ point 2 r, Triangle_ triangle point) => triangle -> triangle","name":"toCounterClockwiseTriangle","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:toCounterClockwiseTriangle"},{"display_html":"triangleSignedArea2X :: (Num r, Point_ point 2 r, Triangle_ triangle point) => triangle -> r","name":"triangleSignedArea2X","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:triangleSignedArea2X"},{"display_html":"intersectingHalfPlanes :: (Triangle_ triangle point, Point_ point 2 r, Num r, Ord r) => triangle -> Vector 3 (HalfSpaceF (LinePV 2 r))","name":"intersectingHalfPlanes","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:intersectingHalfPlanes"},{"display_html":"toBarricentric :: (Fractional r, Point_ point 2 r, Triangle_ triangle point) => point -> triangle -> Vector 3 r","name":"toBarricentric","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:toBarricentric"},{"display_html":"fromBarricentric :: (Triangle_ triangle point, Point_ point d r, Num r) => Vector 3 r -> triangle -> Point d r","name":"fromBarricentric","module":"HGeometry.Triangle.Class","link":"hgeometry/kernel/HGeometry-Triangle-Class.html#v:fromBarricentric"},{"display_html":"data Triangle point where","name":"Triangle Triangle","module":"HGeometry.Triangle","link":"hgeometry/kernel/HGeometry-Triangle.html#t:Triangle"},{"display_html":"module HGeometry.Triangle.Class","name":"","module":"HGeometry.Triangle","link":"hgeometry/kernel"},{"display_html":"data Viewport r = Viewport (Rectangle (Point 2 r)) (Transformation 2 r)","name":"Viewport Viewport","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#t:Viewport"},{"display_html":"mkViewport :: (Rectangle_ rectangle point, Point_ point 2 r, Fractional r) => rectangle -> Transformation 2 r -> Viewport r","name":"mkViewport","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:mkViewport"},{"display_html":"viewPort :: Lens' (Viewport r) (Rectangle (Point 2 r))","name":"viewPort","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:viewPort"},{"display_html":"worldToHost :: Lens' (Viewport r) (Transformation 2 r)","name":"worldToHost","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:worldToHost"},{"display_html":"hostToWorld :: Fractional r => Getter (Viewport r) (Transformation 2 r)","name":"hostToWorld","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:hostToWorld"},{"display_html":"toWorldIn :: (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Fractional r) => Viewport r -> g -> g","name":"toWorldIn","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:toWorldIn"},{"display_html":"toHostFrom :: (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Num r) => Viewport r -> g -> g","name":"toHostFrom","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:toHostFrom"},{"display_html":"fromSize :: (Num r, Vector_ vector 2 r) => vector -> Viewport r","name":"fromSize","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:fromSize"},{"display_html":"flipY :: (Num r, Vector_ vector 2 r) => vector -> Viewport r","name":"flipY","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:flipY"},{"display_html":"centeredOrigin :: (Fractional r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Viewport r","name":"centeredOrigin","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:centeredOrigin"},{"display_html":"alignedOrigin :: Num r => Rectangle (Point 2 r) -> Viewport r","name":"alignedOrigin","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:alignedOrigin"},{"display_html":"wrtCenter :: Fractional r => Viewport r -> Transformation 2 r -> Transformation 2 r","name":"wrtCenter","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:wrtCenter"},{"display_html":"data ZoomConfig r = ZoomConfig (ClosedInterval r) r","name":"ZoomConfig ZoomConfig","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#t:ZoomConfig"},{"display_html":"range :: Lens' (ZoomConfig r) (ClosedInterval r)","name":"range","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:range"},{"display_html":"currentLevel :: Ord r => Lens' (ZoomConfig r) r","name":"currentLevel","module":"HGeometry.Viewport","link":"hgeometry/kernel/HGeometry-Viewport.html#v:currentLevel"},{"display_html":"isValidInterval :: (Eq (endPoint r), Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)) => endPoint r -> endPoint r -> Bool","name":"isValidInterval","module":"HGeometry.Kernel.Instances","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Instances.html#v:isValidInterval"},{"display_html":"bothClosed :: EndPoint_ (endPoint r) => endPoint r -> endPoint r -> Bool","name":"bothClosed","module":"HGeometry.Kernel.Instances","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Instances.html#v:bothClosed"},{"display_html":"implies :: Bool -> Bool -> Bool","name":"implies","module":"HGeometry.Kernel.Instances","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Instances.html#v:implies"},{"display_html":"arbitraryPointInBoundingBox :: Rectangle (Point 2 Rational) -> Gen (Point 2 Rational)","name":"arbitraryPointInBoundingBox","module":"HGeometry.Kernel.Test.Box","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Test-Box.html#v:arbitraryPointInBoundingBox"},{"display_html":"newtype ZeroToOne = ZeroToOne Rational","name":"ZeroToOne ZeroToOne","module":"HGeometry.Kernel.Test.Box","link":"hgeometry/kernel-quickcheck/HGeometry-Kernel-Test-Box.html#t:ZeroToOne"},{"display_html":"data WheelDirection","name":"WheelDirection Down Up","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#t:WheelDirection"},{"display_html":"onWheel :: (WheelDirection -> action) -> Attribute action","name":"onWheel","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onWheel"},{"display_html":"data Button","name":"Button LeftButton MiddleButton RightButton","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#t:Button"},{"display_html":"onClickWithButton :: (Button -> action) -> Attribute action","name":"onClickWithButton","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onClickWithButton"},{"display_html":"onRightClick :: action -> Attribute action","name":"onRightClick","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onRightClick"},{"display_html":"onContextMenu :: action -> Attribute action","name":"onContextMenu","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onContextMenu"},{"display_html":"onTouchStart :: action -> Attribute action","name":"onTouchStart","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onTouchStart"},{"display_html":"onTouchMove :: action -> Attribute action","name":"onTouchMove","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onTouchMove"},{"display_html":"onTouchEnd :: action -> Attribute action","name":"onTouchEnd","module":"HGeometry.Miso.Event.Extra","link":"hgeometry/miso/HGeometry-Miso-Event-Extra.html#v:onTouchEnd"},{"display_html":"getBoundingClientRect :: JSVal -> JSM JSVal","name":"getBoundingClientRect","module":"HGeometry.Miso.FFI.Extra","link":"hgeometry/miso/HGeometry-Miso-FFI-Extra.html#v:getBoundingClientRect"},{"display_html":"onMouseEnterAt :: (Point 2 Int -> action) -> Attribute action","name":"onMouseEnterAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onMouseEnterAt"},{"display_html":"onMouseMoveAt :: (Point 2 Int -> action) -> Attribute action","name":"onMouseMoveAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onMouseMoveAt"},{"display_html":"onMouseClickAt :: (Point 2 Int -> action) -> Attribute action","name":"onMouseClickAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onMouseClickAt"},{"display_html":"onTouchStartAt :: (Point 2 Int -> action) -> Attribute action","name":"onTouchStartAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onTouchStartAt"},{"display_html":"onTouchMoveAt :: (Point 2 Int -> action) -> Attribute action","name":"onTouchMoveAt","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onTouchMoveAt"},{"display_html":"onTouchEnd :: action -> Attribute action","name":"onTouchEnd","module":"HGeometry.Miso.Subscription.MouseExtra","link":"hgeometry/miso/HGeometry-Miso-Subscription-MouseExtra.html#v:onTouchEnd"},{"display_html":"class HasVector point point' where","name":"HasVector vector","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasVector"},{"display_html":"class (Has_ Vector_ (Dimension point) (NumType point), Has_ Vector_ (Dimension point') (NumType point'), HasComponents (Vector (Dimension point') (NumType point)) (Vector (Dimension point') (NumType point')), Dimension point ~ Dimension point', HasVector point point') => HasCoordinates point point' where","name":"HasCoordinates coordinates","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasCoordinates"},{"display_html":"class (Additive_ (Vector d r) d r, HasCoordinates point point, d ~ Dimension point, r ~ NumType point) => Affine_ point d r | point -> d, point -> r where","name":"Affine_ .+^ .-. .-^","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:Affine_"},{"display_html":"class (Affine_ point d r, HasVector point point) => Point_ point d r where","name":"Point_ coord'","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:Point_"},{"display_html":"pattern Point1_ :: Point_ point 1 r => r -> point","name":"Point1_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point1_"},{"display_html":"pattern Point2_ :: Point_ point 2 r => r -> r -> point","name":"Point2_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point2_"},{"display_html":"pattern Point3_ :: Point_ point 3 r => r -> r -> r -> point","name":"Point3_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point3_"},{"display_html":"pattern Point4_ :: Point_ point 4 r => r -> r -> r -> r -> point","name":"Point4_","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:Point4_"},{"display_html":"class Point_ point d r => ConstructablePoint_ point d r where","name":"ConstructablePoint_ fromVector","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:ConstructablePoint_"},{"display_html":"origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point","name":"origin","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:origin"},{"display_html":"pointFromList :: (ConstructablePoint_ point d r, Vector_ (Vector d r) d r) => [r] -> Maybe point","name":"pointFromList","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:pointFromList"},{"display_html":"coord :: forall i point d r. (1 <= i, i <= d, KnownNat i, Point_ point d r) => IndexedLens' Int point r","name":"coord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:coord"},{"display_html":"xCoord :: (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"xCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:xCoord"},{"display_html":"yCoord :: (2 <= d, Point_ point d r) => IndexedLens' Int point r","name":"yCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:yCoord"},{"display_html":"zCoord :: (3 <= d, Point_ point d r) => IndexedLens' Int point r","name":"zCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:zCoord"},{"display_html":"wCoord :: (4 <= d, Point_ point d r) => IndexedLens' Int point r","name":"wCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:wCoord"},{"display_html":"dCoord :: forall point d r. (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"dCoord","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#v:dCoord"},{"display_html":"class HasPoints s t point point' | s -> point, t -> point' where","name":"HasPoints allPoints","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasPoints"},{"display_html":"type HasPoints' s point = HasPoints s s point point","name":"HasPoints'","module":"HGeometry.Point.Class","link":"hgeometry/point/HGeometry-Point-Class.html#t:HasPoints-39-"},{"display_html":"newtype PointF v = Point {}","name":"PointF Point toVec","module":"HGeometry.Point.PointF","link":"hgeometry/point/HGeometry-Point-PointF.html#t:PointF"},{"display_html":"cmpByDistanceTo :: (Ord r, Num r, Point_ point d r, Point_ center d r, Metric_ (Vector d r) d r) => center -> point -> point -> Ordering","name":"cmpByDistanceTo","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#v:cmpByDistanceTo"},{"display_html":"squaredEuclideanDist :: (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r","name":"squaredEuclideanDist","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#v:squaredEuclideanDist"},{"display_html":"euclideanDist :: (Radical r, Point_ point d r, Metric_ (Vector d r) d r) => point -> point -> r","name":"euclideanDist","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#v:euclideanDist"},{"display_html":"class Metric_ (Vector (Dimension g) (NumType g)) (Dimension g) (NumType g) => HasSquaredEuclideanDistance g where","name":"HasSquaredEuclideanDistance pointClosestToWithDistance pointClosestTo squaredEuclideanDistTo","module":"HGeometry.Point.EuclideanDistance","link":"hgeometry/point/HGeometry-Point-EuclideanDistance.html#t:HasSquaredEuclideanDistance"},{"display_html":"data CCW where","name":"CCW CCW CW CoLinear","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#t:CCW"},{"display_html":"ccw :: (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW","name":"ccw","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:ccw"},{"display_html":"isCoLinear :: (Point_ point 2 r, Num r, Eq r) => point -> point -> point -> Bool","name":"isCoLinear","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:isCoLinear"},{"display_html":"sortAround :: (Point_ center 2 r, Point_ point 2 r, Num r, Ord r) => center -> [point] -> [point]","name":"sortAround","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:sortAround"},{"display_html":"ccwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"ccwCmpAroundWith","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:ccwCmpAroundWith"},{"display_html":"cwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"cwCmpAroundWith","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:cwCmpAroundWith"},{"display_html":"ccwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"ccwCmpAround","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:ccwCmpAround"},{"display_html":"cwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"cwCmpAround","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:cwCmpAround"},{"display_html":"insertIntoCyclicOrder :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> CList point -> CList point","name":"insertIntoCyclicOrder","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:insertIntoCyclicOrder"},{"display_html":"cmpInDirection :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering","name":"cmpInDirection","module":"HGeometry.Point.Orientation","link":"hgeometry/point/HGeometry-Point-Orientation.html#v:cmpInDirection"},{"display_html":"type Point d r = PointF (Vector d r)","name":"Point","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Point"},{"display_html":"newtype PointF v where","name":"PointF Point Point1 Point2 Point3 Point4 toVec","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:PointF"},{"display_html":"class (Affine_ point d r, HasVector point point) => Point_ point d r where","name":"Point_ coord'","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Point_"},{"display_html":"pattern Point1_ :: Point_ point 1 r => r -> point","name":"Point1_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point1_"},{"display_html":"pattern Point2_ :: Point_ point 2 r => r -> r -> point","name":"Point2_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point2_"},{"display_html":"pattern Point3_ :: Point_ point 3 r => r -> r -> r -> point","name":"Point3_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point3_"},{"display_html":"pattern Point4_ :: Point_ point 4 r => r -> r -> r -> r -> point","name":"Point4_","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:Point4_"},{"display_html":"class Point_ point d r => ConstructablePoint_ point d r where","name":"ConstructablePoint_ fromVector","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:ConstructablePoint_"},{"display_html":"class HasVector point point' where","name":"HasVector vector","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasVector"},{"display_html":"class (Has_ Vector_ (Dimension point) (NumType point), Has_ Vector_ (Dimension point') (NumType point'), HasComponents (Vector (Dimension point') (NumType point)) (Vector (Dimension point') (NumType point')), Dimension point ~ Dimension point', HasVector point point') => HasCoordinates point point' where","name":"HasCoordinates coordinates","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasCoordinates"},{"display_html":"asPoint :: forall point d r. Point_ point d r => Lens' point (Point d r)","name":"asPoint","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:asPoint"},{"display_html":"origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point","name":"origin","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:origin"},{"display_html":"pointFromList :: (ConstructablePoint_ point d r, Vector_ (Vector d r) d r) => [r] -> Maybe point","name":"pointFromList","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:pointFromList"},{"display_html":"coord :: forall i point d r. (1 <= i, i <= d, KnownNat i, Point_ point d r) => IndexedLens' Int point r","name":"coord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:coord"},{"display_html":"xCoord :: (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"xCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:xCoord"},{"display_html":"yCoord :: (2 <= d, Point_ point d r) => IndexedLens' Int point r","name":"yCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:yCoord"},{"display_html":"zCoord :: (3 <= d, Point_ point d r) => IndexedLens' Int point r","name":"zCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:zCoord"},{"display_html":"wCoord :: (4 <= d, Point_ point d r) => IndexedLens' Int point r","name":"wCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:wCoord"},{"display_html":"dCoord :: forall point d r. (1 <= d, Point_ point d r) => IndexedLens' Int point r","name":"dCoord","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:dCoord"},{"display_html":"projectPoint :: forall i point d r. (Point_ point d r, i <= d, Has_ Vector_ i r) => point -> Point i r","name":"projectPoint","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:projectPoint"},{"display_html":"class (Additive_ (Vector d r) d r, HasCoordinates point point, d ~ Dimension point, r ~ NumType point) => Affine_ point d r | point -> d, point -> r where","name":"Affine_ .+^ .-. .-^","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Affine_"},{"display_html":"data CCW where","name":"CCW CCW CW CoLinear","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:CCW"},{"display_html":"ccw :: (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW","name":"ccw","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:ccw"},{"display_html":"isCoLinear :: (Point_ point 2 r, Num r, Eq r) => point -> point -> point -> Bool","name":"isCoLinear","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:isCoLinear"},{"display_html":"ccwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"ccwCmpAround","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:ccwCmpAround"},{"display_html":"cwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering","name":"cwCmpAround","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cwCmpAround"},{"display_html":"ccwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"ccwCmpAroundWith","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:ccwCmpAroundWith"},{"display_html":"cwCmpAroundWith :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering","name":"cwCmpAroundWith","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cwCmpAroundWith"},{"display_html":"sortAround :: (Point_ center 2 r, Point_ point 2 r, Num r, Ord r) => center -> [point] -> [point]","name":"sortAround","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:sortAround"},{"display_html":"insertIntoCyclicOrder :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> CList point -> CList point","name":"insertIntoCyclicOrder","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:insertIntoCyclicOrder"},{"display_html":"data Quadrant","name":"Quadrant TopRight TopLeft BottomLeft BottomRight","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:Quadrant"},{"display_html":"quadrantWith :: (Ord r, Point_ point 2 r) => point -> point -> Quadrant","name":"quadrantWith","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:quadrantWith"},{"display_html":"quadrant :: (Ord r, Num r, ConstructablePoint_ point 2 r) => point -> Quadrant","name":"quadrant","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:quadrant"},{"display_html":"partitionIntoQuadrants :: (Ord r, Point_ point 2 r) => point -> [point] -> ([point], [point], [point], [point])","name":"partitionIntoQuadrants","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:partitionIntoQuadrants"},{"display_html":"cmpByDistanceTo :: (Ord r, Num r, Point_ point d r, Point_ center d r, Metric_ (Vector d r) d r) => center -> point -> point -> Ordering","name":"cmpByDistanceTo","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cmpByDistanceTo"},{"display_html":"cmpInDirection :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering","name":"cmpInDirection","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:cmpInDirection"},{"display_html":"squaredEuclideanDist :: (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r","name":"squaredEuclideanDist","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:squaredEuclideanDist"},{"display_html":"euclideanDist :: (Radical r, Point_ point d r, Metric_ (Vector d r) d r) => point -> point -> r","name":"euclideanDist","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#v:euclideanDist"},{"display_html":"class Metric_ (Vector (Dimension g) (NumType g)) (Dimension g) (NumType g) => HasSquaredEuclideanDistance g where","name":"HasSquaredEuclideanDistance pointClosestToWithDistance pointClosestTo squaredEuclideanDistTo","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasSquaredEuclideanDistance"},{"display_html":"class HasPoints s t point point' | s -> point, t -> point' where","name":"HasPoints allPoints","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasPoints"},{"display_html":"type HasPoints' s point = HasPoints s s point point","name":"HasPoints'","module":"HGeometry.Point","link":"hgeometry/point/HGeometry-Point.html#t:HasPoints-39-"},{"display_html":"allSimplePolygons :: [SimplePolygon (Point 2 Double)]","name":"allSimplePolygons","module":"HGeometry.Polygon.Instances","link":"hgeometry/quickcheck/HGeometry-Polygon-Instances.html#v:allSimplePolygons"},{"display_html":"data ZoomDirection","name":"ZoomDirection ZoomIn ZoomOut","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#t:ZoomDirection"},{"display_html":"class HasZoomLevel canvas r | canvas -> r where","name":"HasZoomLevel zoomLevel","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#t:HasZoomLevel"},{"display_html":"newtype ZoomAction = ZoomAction ZoomDirection","name":"ZoomAction ZoomAction","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#t:ZoomAction"},{"display_html":"update :: (Fractional r, Ord r, HasZoomLevel canvas r) => canvas -> ZoomAction -> Effect action canvas","name":"update","module":"HGeometry.Miso.Canvas.Zoom","link":"hgeometry/svg/HGeometry-Miso-Canvas-Zoom.html#v:update"},{"display_html":"renderSvgToFile :: OsPath -> View action -> IO ()","name":"renderSvgToFile","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:renderSvgToFile"},{"display_html":"renderAsSvgText :: View action -> Text","name":"renderAsSvgText","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:renderAsSvgText"},{"display_html":"renderAsSvgByteString :: View action -> ByteString","name":"renderAsSvgByteString","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:renderAsSvgByteString"},{"display_html":"withAts :: ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action","name":"withAts","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:withAts"},{"display_html":"withAts' :: ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> [View action] -> View action","name":"withAts'","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:withAts-39-"},{"display_html":"class Drawable t where","name":"Drawable draw drawWith","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#t:Drawable"},{"display_html":"dPoint :: (Point_ point 2 r, ToMisoString r) => point -> [Attribute action] -> View action","name":"dPoint","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dPoint"},{"display_html":"dLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r, ToMisoString r) => lineSegment -> [Attribute action] -> View action","name":"dLineSegment","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dLineSegment"},{"display_html":"dRectangle :: (Rectangle_ rectangle point, Point_ point 2 r, ToMisoString r, Num r) => rectangle -> [Attribute action] -> View action","name":"dRectangle","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dRectangle"},{"display_html":"dCircle :: (Point_ point 2 r, ToMisoString r) => Circle point -> [Attribute action] -> View action","name":"dCircle","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dCircle"},{"display_html":"dDisk :: (Disk_ disk point, Point_ point 2 r, ToMisoString r, Floating r) => disk -> [Attribute action] -> View action","name":"dDisk","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dDisk"},{"display_html":"dPolyLine :: (PolyLine_ polyLine point, Point_ point 2 r, ToMisoString r) => polyLine -> [Attribute action] -> View action","name":"dPolyLine","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dPolyLine"},{"display_html":"dSimplePolygon :: (SimplePolygon_ simplePolygon point r, ToMisoString r) => simplePolygon -> [Attribute action] -> View action","name":"dSimplePolygon","module":"HGeometry.Miso.Svg","link":"hgeometry/svg/HGeometry-Miso-Svg.html#v:dSimplePolygon"},{"display_html":"module HGeometry.Miso.Svg","name":"","module":"HGeometry.Svg","link":"hgeometry/svg"},{"display_html":"data StaticCanvas r","name":"StaticCanvas","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#t:StaticCanvas"},{"display_html":"staticCanvas :: Num r => Int -> Int -> StaticCanvas r","name":"staticCanvas","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#v:staticCanvas"},{"display_html":"class HasDimensions s a | s -> a where","name":"HasDimensions dimensions","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#t:HasDimensions"},{"display_html":"staticCanvas_ :: (RealFrac r, ToSvgCoordinate r) => StaticCanvas r -> [Attribute action] -> [View action] -> View action","name":"staticCanvas_","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#v:staticCanvas_"},{"display_html":"type ToSvgCoordinate = ToMisoString","name":"ToSvgCoordinate","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#t:ToSvgCoordinate"},{"display_html":"matrixToMisoString :: ToSvgCoordinate r => Matrix 3 3 r -> MisoString","name":"matrixToMisoString","module":"HGeometry.Miso.Svg.StaticCanvas","link":"hgeometry/svg/HGeometry-Miso-Svg-StaticCanvas.html#v:matrixToMisoString"},{"display_html":"data Canvas r","name":"Canvas","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:Canvas"},{"display_html":"theViewport :: Lens (Canvas r) (Canvas s) (Viewport r) (Viewport s)","name":"theViewport","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:theViewport"},{"display_html":"blankCanvas :: Num r => Int -> Int -> Canvas r","name":"blankCanvas","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:blankCanvas"},{"display_html":"class HasDimensions s a | s -> a where","name":"HasDimensions dimensions","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:HasDimensions"},{"display_html":"class HasMousePosition s a | s -> a where","name":"HasMousePosition mousePosition","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:HasMousePosition"},{"display_html":"mouseCoordinates :: Fractional r => Getter (Canvas r) (Maybe (Point 2 r))","name":"mouseCoordinates","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:mouseCoordinates"},{"display_html":"data InternalCanvasAction","name":"InternalCanvasAction","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#t:InternalCanvasAction"},{"display_html":"handleInternalCanvasAction :: Canvas r -> InternalCanvasAction -> Effect action (Canvas r)","name":"handleInternalCanvasAction","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:handleInternalCanvasAction"},{"display_html":"withCanvasEvents :: Map MisoString Bool -> Map MisoString Bool","name":"withCanvasEvents","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:withCanvasEvents"},{"display_html":"svgCanvas_ :: (RealFrac r, ToSvgCoordinate r) => Canvas r -> [Attribute action] -> [View action] -> View (Either InternalCanvasAction action)","name":"svgCanvas_","module":"HGeometry.Miso.Svg.Canvas","link":"hgeometry/svg/HGeometry-Miso-Svg-Canvas.html#v:svgCanvas_"},{"display_html":"type family Dimension t :: Nat","name":"Dimension","module":"HGeometry.Properties","link":"hgeometry/vector/HGeometry-Properties.html#t:Dimension"},{"display_html":"type family NumType t :: Type","name":"NumType","module":"HGeometry.Properties","link":"hgeometry/vector/HGeometry-Properties.html#t:NumType"},{"display_html":"class (r ~ IxValue vector, s ~ IxValue vector', d ~ Dimension vector, d ~ Dimension vector') => AsVector_ vector vector' d r s | vector -> d, vector -> r, vector' -> s where","name":"AsVector_ _Vector","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:AsVector_"},{"display_html":"class (HasComponents vector vector, AsVector_ vector vector d r r, KnownNat d) => Vector_ vector d r where","name":"Vector_ generateA component'","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Vector_"},{"display_html":"type Has_ c d r = c (Vector d r) d r","name":"Has_","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Has_"},{"display_html":"generate :: Vector_ vector d r => (Int -> r) -> vector","name":"generate","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:generate"},{"display_html":"vectorFromList :: Vector_ vector d r => [r] -> Maybe vector","name":"vectorFromList","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:vectorFromList"},{"display_html":"component :: forall i vector r d. (i <= (d - 1), KnownNat i, Vector_ vector d r) => IndexedLens' Int vector r","name":"component","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:component"},{"display_html":"xComponent :: (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r","name":"xComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:xComponent"},{"display_html":"yComponent :: (Vector_ vector d r, 2 <= d) => IndexedLens' Int vector r","name":"yComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:yComponent"},{"display_html":"zComponent :: (Vector_ vector d r, 3 <= d) => IndexedLens' Int vector r","name":"zComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:zComponent"},{"display_html":"wComponent :: (Vector_ vector d r, 4 <= d) => IndexedLens' Int vector r","name":"wComponent","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:wComponent"},{"display_html":"head :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r","name":"head","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:head"},{"display_html":"last :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r","name":"last","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:last"},{"display_html":"prefix :: forall i d vector vector' r. (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector'","name":"prefix","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:prefix"},{"display_html":"suffix :: forall i d vector vector' r. (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector'","name":"suffix","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:suffix"},{"display_html":"cons :: forall vector' vector d r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => r -> vector -> vector'","name":"cons","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:cons"},{"display_html":"snoc :: forall vector' vector d r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector'","name":"snoc","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:snoc"},{"display_html":"uncons :: forall vector' vector d r. (Vector_ vector (d + 1) r, Vector_ vector' d r, 0 <= ((d + 1) - 1), d <= Dimension vector) => vector -> (r, vector')","name":"uncons","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:uncons"},{"display_html":"unsnoc :: forall vector' vector d r. (Vector_ vector (d + 1) r, Vector_ vector' d r, d <= ((d + 1) - 1), d <= Dimension vector) => vector -> (vector', r)","name":"unsnoc","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:unsnoc"},{"display_html":"class Vector_ vector d r => Additive_ vector d r where","name":"Additive_ liftU2 liftI2A","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Additive_"},{"display_html":"zero :: (Num r, Additive_ vector d r) => vector","name":"zero","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:zero"},{"display_html":"liftI2 :: Additive_ vector d r => (r -> r -> r) -> vector -> vector -> vector","name":"liftI2","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:liftI2"},{"display_html":"lerp :: (Num r, Additive_ vector d r) => r -> vector -> vector -> vector","name":"lerp","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:lerp"},{"display_html":"(^+^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector","name":"^+^","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--43--94-"},{"display_html":"(^-^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector","name":"^-^","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--45--94-"},{"display_html":"negated :: (Num r, Vector_ vector d r) => vector -> vector","name":"negated","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:negated"},{"display_html":"(*^) :: (Num r, Vector_ vector d r) => r -> vector -> vector","name":"*^","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-42--94-"},{"display_html":"(^*) :: (Num r, Vector_ vector d r) => vector -> r -> vector","name":"^*","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--42-"},{"display_html":"(^/) :: (Vector_ vector d r, Fractional r) => vector -> r -> vector","name":"^/","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:-94--47-"},{"display_html":"sumV :: (Foldable f, Additive_ vector d r, Num r) => f vector -> vector","name":"sumV","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:sumV"},{"display_html":"basis :: (Additive_ vector d r, Num r) => [vector]","name":"basis","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:basis"},{"display_html":"unit :: forall vector d r. (Additive_ vector d r, Num r) => vector","name":"unit","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:unit"},{"display_html":"foldMapZip :: (Additive_ vector d r, Semigroup m) => (r -> r -> m) -> vector -> vector -> m","name":"foldMapZip","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#v:foldMapZip"},{"display_html":"class Additive_ vector d r => Metric_ vector d r where","name":"Metric_ dot norm qd quadrance signorm","module":"HGeometry.Vector.Class","link":"hgeometry/vector/HGeometry-Vector-Class.html#t:Metric_"},{"display_html":"data family Vector (d :: Nat) (r :: Type)","name":"Vector Vector1 Vector2 Vector3 Vector4 MkVector1 MkVector2 MkVector3 MkVector4","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#t:Vector"},{"display_html":"class HasComponents vector vector' where","name":"HasComponents components","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#t:HasComponents"},{"display_html":"module HGeometry.Vector.Class","name":"","module":"HGeometry.Vector","link":"hgeometry/vector"},{"display_html":"isScalarMultipleOf :: (Eq r, Num r, Metric_ vector d r) => vector -> vector -> Bool","name":"isScalarMultipleOf","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:isScalarMultipleOf"},{"display_html":"scalarMultiple :: (Eq r, Fractional r, Additive_ vector d r) => vector -> vector -> Maybe r","name":"scalarMultiple","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:scalarMultiple"},{"display_html":"sameDirection :: (Additive_ vector d r, Num r, Eq r) => vector -> vector -> Bool","name":"sameDirection","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:sameDirection"},{"display_html":"cross :: Num r => Vector 3 r -> Vector 3 r -> Vector 3 r","name":"cross","module":"HGeometry.Vector","link":"hgeometry/vector/HGeometry-Vector.html#v:cross"},{"display_html":"binarySearchFirst :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchFirst","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirst"},{"display_html":"binarySearchLast :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchLast","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchLast"},{"display_html":"binarySearchUntil :: (Fractional r, Ord r) => r -> (r -> Bool) -> r -> r -> r","name":"binarySearchUntil","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchUntil"},{"display_html":"data BinarySearchResult a","name":"BinarySearchResult AllFalse AllTrue FlipsAt","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#t:BinarySearchResult"},{"display_html":"firstTrue :: BinarySearchResult a -> Maybe a","name":"firstTrue","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:firstTrue"},{"display_html":"lastFalse :: BinarySearchResult a -> Maybe a","name":"lastFalse","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:lastFalse"},{"display_html":"class BinarySearch v where","name":"BinarySearch Index Elem binarySearchIn binarySearchIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#t:BinarySearch"},{"display_html":"binarySearchFirstIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchFirstIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIn"},{"display_html":"binarySearchFirstIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchFirstIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIdxIn"},{"display_html":"binarySearchLastIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchLastIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIn"},{"display_html":"binarySearchLastIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchLastIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"hgeometry-combinatorial/HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIdxIn"},{"display_html":"divideAndConquer :: (Foldable f, Monoid s) => (a -> s) -> f a -> s","name":"divideAndConquer","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer"},{"display_html":"divideAndConquer1 :: (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s","name":"divideAndConquer1","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1"},{"display_html":"divideAndConquer1With :: Foldable1 f => (s -> s -> s) -> (a -> s) -> f a -> s","name":"divideAndConquer1With","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1With"},{"display_html":"mergeSorted :: Ord a => NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSorted","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSorted"},{"display_html":"mergeSortedLists :: Ord a => [a] -> [a] -> [a]","name":"mergeSortedLists","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedLists"},{"display_html":"mergeSortedBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSortedBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedBy"},{"display_html":"mergeSortedListsBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]","name":"mergeSortedListsBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"hgeometry-combinatorial/HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedListsBy"},{"display_html":"newtype InsertionOnly static a = InsertionOnly [Maybe (static a)]","name":"InsertionOnly InsertionOnly","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#t:InsertionOnly"},{"display_html":"empty :: InsertionOnly static a","name":"empty","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#v:empty"},{"display_html":"class LogarithmicMethodDS static a where","name":"LogarithmicMethodDS singleton build merge","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#t:LogarithmicMethodDS"},{"display_html":"insert :: LogarithmicMethodDS static a => a -> InsertionOnly static a -> InsertionOnly static a","name":"insert","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#v:insert"},{"display_html":"queryWith :: Monoid m => (static a -> m) -> InsertionOnly static a -> m","name":"queryWith","module":"HGeometry.Algorithms.LogarithmicMethod","link":"hgeometry-combinatorial/HGeometry-Algorithms-LogarithmicMethod.html#v:queryWith"},{"display_html":"insertOrd :: Ord a => a -> CList a -> CList a","name":"insertOrd","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:insertOrd"},{"display_html":"insertOrdBy :: (a -> a -> Ordering) -> a -> CList a -> CList a","name":"insertOrdBy","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:insertOrdBy"},{"display_html":"insertOrdBy' :: (a -> a -> Ordering) -> a -> [a] -> [a]","name":"insertOrdBy'","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:insertOrdBy-39-"},{"display_html":"splitIncr :: (a -> a -> Ordering) -> [a] -> ([a], [a])","name":"splitIncr","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:splitIncr"},{"display_html":"isShiftOf :: Eq a => CList a -> CList a -> Bool","name":"isShiftOf","module":"HGeometry.CircularList.Util","link":"hgeometry-combinatorial/HGeometry-CircularList-Util.html#v:isShiftOf"},{"display_html":"data STR a b c = STR !a !b !c","name":"STR STR","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:STR"},{"display_html":"type Three = V3","name":"Three","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:Three"},{"display_html":"pattern Three :: a -> a -> a -> Three a","name":"Three","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:Three"},{"display_html":"uniqueTriplets :: Foldable f => f a -> [Three a]","name":"uniqueTriplets","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:uniqueTriplets"},{"display_html":"data SP a b = SP !a !b","name":"SP SP","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:SP"},{"display_html":"type Two = V2","name":"Two","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#t:Two"},{"display_html":"pattern Two :: a -> a -> Two a","name":"Two","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:Two"},{"display_html":"uniquePairs :: Foldable f => f a -> [Two a]","name":"uniquePairs","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:uniquePairs"},{"display_html":"nonEmptyTails :: [a] -> [[a]]","name":"nonEmptyTails","module":"HGeometry.Combinatorial.Util","link":"hgeometry-combinatorial/HGeometry-Combinatorial-Util.html#v:nonEmptyTails"},{"display_html":"data core :+ extra = core :+ extra","name":":+ :+","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t::-43-"},{"display_html":"_core :: (core :+ extra) -> core","name":"_core","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:_core"},{"display_html":"_extra :: (core :+ extra) -> extra","name":"_extra","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:_extra"},{"display_html":"core :: Lens (core :+ extra) (core' :+ extra) core core'","name":"core","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:core"},{"display_html":"extra :: Lens (core :+ extra) (core :+ extra') extra extra'","name":"extra","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:extra"},{"display_html":"ext :: a -> a :+ ()","name":"ext","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:ext"},{"display_html":"class AsA t c | t -> c where","name":"AsA asCore","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t:AsA"},{"display_html":"type (:~) t c = t `AsA` c","name":":~","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t::-126-"},{"display_html":"pattern AsA :: t :~ c => c -> t","name":"AsA","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:AsA"},{"display_html":"class AsExt t where","name":"AsExt _Ext ExtraOf CoreOf","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#t:AsExt"},{"display_html":"asIndexedExt :: (Indexable i p, Functor f) => p (s :+ i) (f (t :+ j)) -> Indexed i s (f t)","name":"asIndexedExt","module":"HGeometry.Ext","link":"hgeometry-combinatorial/HGeometry-Ext.html#v:asIndexedExt"},{"display_html":"sortBy :: forall vector f a. (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a","name":"sortBy","module":"HGeometry.Foldable.Sort","link":"hgeometry-combinatorial/HGeometry-Foldable-Sort.html#v:sortBy"},{"display_html":"sort :: forall vector f a. (Foldable f, Vector vector a, Ord a) => f a -> vector a","name":"sort","module":"HGeometry.Foldable.Sort","link":"hgeometry-combinatorial/HGeometry-Foldable-Sort.html#v:sort"},{"display_html":"sortOnCheap :: forall vector f a b. (Foldable f, Vector vector a, Ord b) => (a -> b) -> f a -> vector a","name":"sortOnCheap","module":"HGeometry.Foldable.Sort","link":"hgeometry-combinatorial/HGeometry-Foldable-Sort.html#v:sortOnCheap"},{"display_html":"class HasFromFoldable f where","name":"HasFromFoldable fromList fromFoldable","module":"HGeometry.Foldable.Util","link":"hgeometry-combinatorial/HGeometry-Foldable-Util.html#t:HasFromFoldable"},{"display_html":"class HasFromFoldable1 f where","name":"HasFromFoldable1 fromNonEmpty fromFoldable1","module":"HGeometry.Foldable.Util","link":"hgeometry-combinatorial/HGeometry-Foldable-Util.html#t:HasFromFoldable1"},{"display_html":"class HasIndex a where","name":"HasIndex sosIndex","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#t:HasIndex"},{"display_html":"type Index = Int","name":"Index","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#t:Index"},{"display_html":"data WithIndex a = WithIndex !Index a","name":"WithIndex WithIndex","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#t:WithIndex"},{"display_html":"theValue :: Lens (WithIndex a) (WithIndex b) a b","name":"theValue","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:theValue"},{"display_html":"labelWithIndex :: Traversable t => t a -> t (WithIndex a)","name":"labelWithIndex","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:labelWithIndex"},{"display_html":"labelWith :: Traversable t => (Index -> a -> b) -> t a -> t b","name":"labelWith","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:labelWith"},{"display_html":"labelWith' :: forall t a b. Traversable t => (Index -> a -> b) -> t a -> (t b, Int)","name":"labelWith'","module":"HGeometry.Indexed","link":"hgeometry-combinatorial/HGeometry-Indexed.html#v:labelWith-39-"},{"display_html":"folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a","name":"folding1","module":"HGeometry.Lens.Util","link":"hgeometry-combinatorial/HGeometry-Lens-Util.html#v:folding1"},{"display_html":"ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) => (s -> f (i, a)) -> Over p g s t a b","name":"ifolding1","module":"HGeometry.Lens.Util","link":"hgeometry-combinatorial/HGeometry-Lens-Util.html#v:ifolding1"},{"display_html":"itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i, a)) s a -> s -> NonEmpty (i, a)","name":"itoNonEmptyOf","module":"HGeometry.Lens.Util","link":"hgeometry-combinatorial/HGeometry-Lens-Util.html#v:itoNonEmptyOf"},{"display_html":"data Zipper a = Zipper [a] [a]","name":"Zipper Zipper","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#t:Zipper"},{"display_html":"fromList :: [a] -> Zipper a","name":"fromList","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:fromList"},{"display_html":"goNext :: Zipper a -> Maybe (Zipper a)","name":"goNext","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:goNext"},{"display_html":"goPrev :: Zipper a -> Maybe (Zipper a)","name":"goPrev","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:goPrev"},{"display_html":"allNexts :: Zipper a -> [Zipper a]","name":"allNexts","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:allNexts"},{"display_html":"extractNext :: Zipper a -> Maybe (a, Zipper a)","name":"extractNext","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:extractNext"},{"display_html":"dropNext :: Zipper a -> Maybe (Zipper a)","name":"dropNext","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:dropNext"},{"display_html":"allNonEmptyNexts :: Zipper a -> [Zipper a]","name":"allNonEmptyNexts","module":"HGeometry.List.Zipper","link":"hgeometry-combinatorial/HGeometry-List-Zipper.html#v:allNonEmptyNexts"},{"display_html":"class Measured f a where","name":"Measured measure","module":"HGeometry.Measured.Class","link":"hgeometry-combinatorial/HGeometry-Measured-Class.html#t:Measured"},{"display_html":"class Measured f a => CanInsert f a where","name":"CanInsert insertMeasure","module":"HGeometry.Measured.Class","link":"hgeometry-combinatorial/HGeometry-Measured-Class.html#t:CanInsert"},{"display_html":"class Measured f a => CanDelete f a where","name":"CanDelete deleteMeasure","module":"HGeometry.Measured.Class","link":"hgeometry-combinatorial/HGeometry-Measured-Class.html#t:CanDelete"},{"display_html":"module HGeometry.Measured.Class","name":"","module":"HGeometry.Measured","link":"hgeometry-combinatorial"},{"display_html":"newtype Count a = Count Word","name":"Count Count","module":"HGeometry.Measured.Size","link":"hgeometry-combinatorial/HGeometry-Measured-Size.html#t:Count"},{"display_html":"data Sized a = Sized !(Count a) a","name":"Sized Sized","module":"HGeometry.Measured.Size","link":"hgeometry-combinatorial/HGeometry-Measured-Size.html#t:Sized"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a]","name":"extractMinimaBy","module":"HGeometry.NonEmpty.Util","link":"hgeometry-combinatorial/HGeometry-NonEmpty-Util.html#v:extractMinimaBy"},{"display_html":"leaveOutOne :: [a] -> [(a, [a])]","name":"leaveOutOne","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:leaveOutOne"},{"display_html":"minimumMaybe :: Ord a => [a] -> Maybe a","name":"minimumMaybe","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimumMaybe"},{"display_html":"maximumMaybe :: Ord a => [a] -> Maybe a","name":"maximumMaybe","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:maximumMaybe"},{"display_html":"minimumMaybeBy :: (a -> a -> Ordering) -> [a] -> Maybe a","name":"minimumMaybeBy","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimumMaybeBy"},{"display_html":"minimaOn :: Ord b => (a -> b) -> [a] -> [a]","name":"minimaOn","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimaOn"},{"display_html":"minimaBy :: (a -> a -> Ordering) -> [a] -> [a]","name":"minimaBy","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:minimaBy"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> [a] -> [a] :+ [a]","name":"extractMinimaBy","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:extractMinimaBy"},{"display_html":"partition3 :: Foldable f => (a -> Ordering) -> f a -> ([a], [a], [a])","name":"partition3","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:partition3"},{"display_html":"groupBy' :: (a -> a -> Ordering) -> [a] -> [NonEmpty a]","name":"groupBy'","module":"HGeometry.List.Util","link":"hgeometry-combinatorial/HGeometry-List-Util.html#v:groupBy-39-"},{"display_html":"class Num r => Radical r where","name":"Radical sqrt","module":"HGeometry.Number.Radical","link":"hgeometry-combinatorial/HGeometry-Number-Radical.html#t:Radical"},{"display_html":"data GRatio a","name":"GRatio","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#t:GRatio"},{"display_html":"(%) :: (Eq a, Num a) => a -> a -> GRatio a","name":"%","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#v:-37-"},{"display_html":"numerator :: GRatio a -> a","name":"numerator","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#v:numerator"},{"display_html":"denominator :: GRatio a -> a","name":"denominator","module":"HGeometry.Number.Ratio.Generalized","link":"hgeometry-combinatorial/HGeometry-Number-Ratio-Generalized.html#v:denominator"},{"display_html":"newtype RealNumber (p :: Nat) = RealNumber Rational","name":"RealNumber RealNumber","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#t:RealNumber"},{"display_html":"data AsFixed p","name":"AsFixed Exact Lossy","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#t:AsFixed"},{"display_html":"asFixed :: KnownNat p => RealNumber p -> AsFixed (NatPrec p)","name":"asFixed","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#v:asFixed"},{"display_html":"toFixed :: KnownNat p => RealNumber p -> Fixed (NatPrec p)","name":"toFixed","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#v:toFixed"},{"display_html":"fromFixed :: KnownNat p => Fixed (NatPrec p) -> RealNumber p","name":"fromFixed","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#v:fromFixed"},{"display_html":"type Nat = Natural","name":"Nat","module":"HGeometry.Number.Real.Rational","link":"hgeometry-combinatorial/HGeometry-Number-Real-Rational.html#t:Nat"},{"display_html":"newtype O (s :: Type) (a :: Type) = O {}","name":"O runO O","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#t:O"},{"display_html":"newtype OrdDict a = OrdDict {}","name":"OrdDict compare_ OrdDict","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#t:OrdDict"},{"display_html":"withOrd :: (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b","name":"withOrd","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:withOrd"},{"display_html":"extractOrd1 :: f (O s a) -> O s (f a)","name":"extractOrd1","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:extractOrd1"},{"display_html":"introOrd1 :: f a -> f (O s a)","name":"introOrd1","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:introOrd1"},{"display_html":"liftOrd1 :: (f (O s a) -> g (O s a)) -> f a -> O s (g a)","name":"liftOrd1","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:liftOrd1"},{"display_html":"extractOrd2 :: f (O s k) v -> O s (f k v)","name":"extractOrd2","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:extractOrd2"},{"display_html":"introOrd2 :: f k v -> f (O s k) v","name":"introOrd2","module":"HGeometry.Ord.Dynamic","link":"hgeometry-combinatorial/HGeometry-Ord-Dynamic.html#v:introOrd2"},{"display_html":"data Alternating f sep a = Alternating a (f (sep, a))","name":"Alternating Alternating","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#t:Alternating"},{"display_html":"fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a","name":"fromNonEmptyWith","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:fromNonEmptyWith"},{"display_html":"mapF :: (f (sep, a) -> g (sep', a)) -> Alternating f sep a -> Alternating g sep' a","name":"mapF","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:mapF"},{"display_html":"firstWithNeighbors :: Traversable f => (a -> sep -> a -> sep') -> Alternating f sep a -> Alternating f sep' a","name":"firstWithNeighbors","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:firstWithNeighbors"},{"display_html":"withNeighbours :: Foldable f => Alternating f sep a -> [(a, sep, a)]","name":"withNeighbours","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:withNeighbours"},{"display_html":"mergeAlternating :: Ord t => (t -> a -> b -> c) -> Alternating List t a -> Alternating List t b -> [(t, c)]","name":"mergeAlternating","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:mergeAlternating"},{"display_html":"insertBreakPoints :: Ord t => [t] -> Alternating List t a -> Alternating List t a","name":"insertBreakPoints","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:insertBreakPoints"},{"display_html":"reverse :: Alternating List b a -> Alternating List b a","name":"reverse","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:reverse"},{"display_html":"consElemWith :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> a -> Alternating f sep a -> Alternating f sep a","name":"consElemWith","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:consElemWith"},{"display_html":"unconsAlt :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a)","name":"unconsAlt","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:unconsAlt"},{"display_html":"snocElemWith :: Snoc (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> Alternating f sep a -> a -> Alternating f sep a","name":"snocElemWith","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:snocElemWith"},{"display_html":"separators :: Functor f => Alternating f sep a -> f sep","name":"separators","module":"HGeometry.Sequence.Alternating","link":"hgeometry-combinatorial/HGeometry-Sequence-Alternating.html#v:separators"},{"display_html":"data ViewL1 a = a :<< (Seq a)","name":"ViewL1 :<<","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#t:ViewL1"},{"display_html":"data ViewR1 a = (Seq a) :>> a","name":"ViewR1 :>>","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#t:ViewR1"},{"display_html":"viewl1 :: ViewR1 a -> ViewL1 a","name":"viewl1","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:viewl1"},{"display_html":"viewr1 :: ViewL1 a -> ViewR1 a","name":"viewr1","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:viewr1"},{"display_html":"(|>>) :: ViewR1 a -> a -> ViewR1 a","name":"|>>","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:-124--62--62-"},{"display_html":"(<>>) :: ViewR1 a -> Seq a -> ViewR1 a","name":"<>>","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:-60--62--62-"},{"display_html":"splitL1At :: Int -> ViewL1 a -> Maybe (Seq a, a, Seq a)","name":"splitL1At","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:splitL1At"},{"display_html":"splitR1At :: Int -> ViewR1 a -> Maybe (Seq a, a, Seq a)","name":"splitR1At","module":"HGeometry.Sequence.NonEmpty","link":"hgeometry-combinatorial/HGeometry-Sequence-NonEmpty.html#v:splitR1At"},{"display_html":"toggle :: Ord a => a -> Set a -> Set a","name":"toggle","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:toggle"},{"display_html":"splitOn :: Ord b => (a -> b) -> b -> Set a -> (Set a, Set a, Set a)","name":"splitOn","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:splitOn"},{"display_html":"splitBy :: (a -> Ordering) -> Set a -> (Set a, Set a, Set a)","name":"splitBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:splitBy"},{"display_html":"fromListBy :: (a -> a -> Ordering) -> [a] -> Set a","name":"fromListBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:fromListBy"},{"display_html":"join :: Set a -> Set a -> Set a","name":"join","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:join"},{"display_html":"insertBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"insertBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:insertBy"},{"display_html":"deleteAllBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"deleteAllBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:deleteAllBy"},{"display_html":"queryBy :: (a -> a -> Ordering) -> (forall b. Ord b => b -> Set b -> t b) -> a -> Set a -> t a","name":"queryBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:queryBy"},{"display_html":"toggleBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"toggleBy","module":"HGeometry.Set.Util","link":"hgeometry-combinatorial/HGeometry-Set-Util.html#v:toggleBy"},{"display_html":"data Sign","name":"Sign Positive Negative","module":"HGeometry.Sign","link":"hgeometry-combinatorial/HGeometry-Sign.html#t:Sign"},{"display_html":"flipSign :: Sign -> Sign","name":"flipSign","module":"HGeometry.Sign","link":"hgeometry-combinatorial/HGeometry-Sign.html#v:flipSign"},{"display_html":"signFromTerms :: (Num r, Eq r, Foldable1 f) => f r -> Maybe Sign","name":"signFromTerms","module":"HGeometry.Sign","link":"hgeometry-combinatorial/HGeometry-Sign.html#v:signFromTerms"},{"display_html":"data EpsFold i","name":"EpsFold","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:EpsFold"},{"display_html":"eps :: i -> EpsFold i","name":"eps","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:eps"},{"display_html":"mkEpsFold :: Ord i => [i] -> EpsFold i","name":"mkEpsFold","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:mkEpsFold"},{"display_html":"evalEps :: (Fractional r, Integral i, Integral j) => j -> r -> EpsFold i -> r","name":"evalEps","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:evalEps"},{"display_html":"hasNoPertubation :: EpsFold i -> Bool","name":"hasNoPertubation","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:hasNoPertubation"},{"display_html":"factors :: EpsFold i -> Bag i","name":"factors","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:factors"},{"display_html":"suitableBase :: EpsFold i -> Int","name":"suitableBase","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:suitableBase"},{"display_html":"data Term i r = Term !r (EpsFold i)","name":"Term Term","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:Term"},{"display_html":"term :: r -> i -> Term i r","name":"term","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:term"},{"display_html":"constantFactor :: Lens' (Term i r) r","name":"constantFactor","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:constantFactor"},{"display_html":"data Symbolic i r","name":"Symbolic","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:Symbolic"},{"display_html":"constant :: Ord i => r -> Symbolic i r","name":"constant","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:constant"},{"display_html":"symbolic :: Ord i => r -> i -> Symbolic i r","name":"symbolic","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:symbolic"},{"display_html":"perturb :: (Num r, Ord i) => r -> i -> Symbolic i r","name":"perturb","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:perturb"},{"display_html":"toTerms :: Symbolic i r -> [Term i r]","name":"toTerms","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:toTerms"},{"display_html":"signOf :: (Num r, Eq r) => Symbolic i r -> Maybe Sign","name":"signOf","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:signOf"},{"display_html":"roundToConstant :: Num r => Symbolic i r -> r","name":"roundToConstant","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:roundToConstant"},{"display_html":"type SoSRational i r = GRatio (Symbolic i r)","name":"SoSRational","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#t:SoSRational"},{"display_html":"sosRational :: (Ord i, Eq r, Num r) => Symbolic i r -> Symbolic i r -> SoSRational i r","name":"sosRational","module":"HGeometry.Number.Real.Symbolic","link":"hgeometry-combinatorial/HGeometry-Number-Real-Symbolic.html#v:sosRational"},{"display_html":"isSubStringOf :: (Eq a, Foldable p, Foldable t) => p a -> t a -> Maybe Int","name":"isSubStringOf","module":"HGeometry.StringSearch.KMP","link":"hgeometry-combinatorial/HGeometry-StringSearch-KMP.html#v:isSubStringOf"},{"display_html":"kmpMatch :: Eq a => Vector a -> Vector a -> Maybe Int","name":"kmpMatch","module":"HGeometry.StringSearch.KMP","link":"hgeometry-combinatorial/HGeometry-StringSearch-KMP.html#v:kmpMatch"},{"display_html":"buildFailureFunction :: forall a. Eq a => Vector a -> Vector Int","name":"buildFailureFunction","module":"HGeometry.StringSearch.KMP","link":"hgeometry-combinatorial/HGeometry-StringSearch-KMP.html#v:buildFailureFunction"},{"display_html":"data TreeNode v a","name":"TreeNode LeafNode InternalNode","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#t:TreeNode"},{"display_html":"_TreeNodeEither :: Iso' (TreeNode v p) (Either v p)","name":"_TreeNodeEither","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:_TreeNodeEither"},{"display_html":"data Zipper a = Zipper {}","name":"Zipper ancestors focus Zipper","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#t:Zipper"},{"display_html":"root :: Tree a -> Zipper a","name":"root","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:root"},{"display_html":"up :: Zipper a -> Maybe (Zipper a)","name":"up","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:up"},{"display_html":"firstChild :: Zipper a -> Maybe (Zipper a)","name":"firstChild","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:firstChild"},{"display_html":"nextSibling :: Zipper a -> Maybe (Zipper a)","name":"nextSibling","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:nextSibling"},{"display_html":"prevSibling :: Zipper a -> Maybe (Zipper a)","name":"prevSibling","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:prevSibling"},{"display_html":"allChildren :: Zipper a -> [Zipper a]","name":"allChildren","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:allChildren"},{"display_html":"allTrees :: Zipper a -> [Zipper a]","name":"allTrees","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:allTrees"},{"display_html":"unZipperLocal :: Zipper a -> Tree a","name":"unZipperLocal","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:unZipperLocal"},{"display_html":"constructTree :: [([Tree a], a, [Tree a])] -> Maybe (Tree a)","name":"constructTree","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:constructTree"},{"display_html":"findEvert :: (a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findEvert"},{"display_html":"findEvert' :: (Tree a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert'","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findEvert-39-"},{"display_html":"findPath :: (a -> Bool) -> (a -> Bool) -> Tree a -> Maybe [a]","name":"findPath","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findPath"},{"display_html":"findNode :: (a -> Bool) -> Tree a -> Maybe [a]","name":"findNode","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findNode"},{"display_html":"findNodes :: (Tree a -> Bool) -> Tree a -> [[a]]","name":"findNodes","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:findNodes"},{"display_html":"levels :: Tree a -> NonEmpty (NonEmpty a)","name":"levels","module":"HGeometry.Tree.Util","link":"hgeometry-combinatorial/HGeometry-Tree-Util.html#v:levels"},{"display_html":"data BinLeafTree v a","name":"BinLeafTree Node Leaf","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#t:BinLeafTree"},{"display_html":"node :: (Measured f a, Semigroup (f a)) => BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a","name":"node","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:node"},{"display_html":"asBalancedBinLeafTree :: Foldable1 f => f a -> BinLeafTree (Count a) a","name":"asBalancedBinLeafTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:asBalancedBinLeafTree"},{"display_html":"foldUp :: (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b","name":"foldUp","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:foldUp"},{"display_html":"foldUpData :: (w -> v -> w -> w) -> (a -> w) -> BinLeafTree v a -> BinLeafTree w a","name":"foldUpData","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:foldUpData"},{"display_html":"zipExactWith :: (u -> v -> w) -> (a -> b -> c) -> BinLeafTree u a -> BinLeafTree v b -> BinLeafTree w c","name":"zipExactWith","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:zipExactWith"},{"display_html":"toRoseTree :: BinLeafTree v a -> Tree (TreeNode v a)","name":"toRoseTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:toRoseTree"},{"display_html":"drawTree :: (Show v, Show a) => BinLeafTree v a -> String","name":"drawTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:drawTree"},{"display_html":"data BinaryTree a","name":"BinaryTree Internal Nil","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#t:BinaryTree"},{"display_html":"asBalancedBinTree :: forall f a. Foldable f => f a -> BinaryTree a","name":"asBalancedBinTree","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:asBalancedBinTree"},{"display_html":"access :: BinaryTree a -> Maybe a","name":"access","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:access"},{"display_html":"foldBinaryUp :: b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)","name":"foldBinaryUp","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:foldBinaryUp"},{"display_html":"toRoseTree' :: BinaryTree a -> Maybe (Tree a)","name":"toRoseTree'","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:toRoseTree-39-"},{"display_html":"drawTree' :: Show a => BinaryTree a -> String","name":"drawTree'","module":"HGeometry.Tree.Binary.Static","link":"hgeometry-combinatorial/HGeometry-Tree-Binary-Static.html#v:drawTree-39-"},{"display_html":"newtype Report a where","name":"Report Report MkReport","module":"HGeometry.Measured.Report","link":"hgeometry-combinatorial/HGeometry-Measured-Report.html#t:Report"},{"display_html":"newtype Report1 a = Report1 (BinLeafTree (Const () a) a)","name":"Report1 Report1","module":"HGeometry.Measured.Report","link":"hgeometry-combinatorial/HGeometry-Measured-Report.html#t:Report1"},{"display_html":"newtype ReportList a = ReportList [a]","name":"ReportList ReportList","module":"HGeometry.Measured.Report","link":"hgeometry-combinatorial/HGeometry-Measured-Report.html#t:ReportList"},{"display_html":"data Top a where","name":"Top ValT Top","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#t:Top"},{"display_html":"topToMaybe :: Top a -> Maybe a","name":"topToMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:topToMaybe"},{"display_html":"_ValT :: Prism (Top a) (Top b) a b","name":"_ValT","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_ValT"},{"display_html":"_Top :: Prism' (Top a) ()","name":"_Top","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_Top"},{"display_html":"_TopMaybe :: Iso' (Top a) (Maybe a)","name":"_TopMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_TopMaybe"},{"display_html":"data Bottom a where","name":"Bottom Bottom ValB","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#t:Bottom"},{"display_html":"bottomToMaybe :: Bottom a -> Maybe a","name":"bottomToMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:bottomToMaybe"},{"display_html":"_ValB :: Prism (Bottom a) (Bottom b) a b","name":"_ValB","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_ValB"},{"display_html":"_Bottom :: Prism' (Bottom a) ()","name":"_Bottom","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_Bottom"},{"display_html":"_BottomMaybe :: Iso' (Bottom a) (Maybe a)","name":"_BottomMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_BottomMaybe"},{"display_html":"data UnBounded a","name":"UnBounded MaxInfinity MinInfinity Val _unUnBounded","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#t:UnBounded"},{"display_html":"_Val :: Prism (UnBounded a) (UnBounded b) a b","name":"_Val","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:_Val"},{"display_html":"unBoundedToMaybe :: UnBounded a -> Maybe a","name":"unBoundedToMaybe","module":"HGeometry.Unbounded","link":"hgeometry-combinatorial/HGeometry-Unbounded.html#v:unBoundedToMaybe"},{"display_html":"data Permutation a = Permutation (NonEmptyVector (Orbit a)) (Vector (Int, Int))","name":"Permutation Permutation","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#t:Permutation"},{"display_html":"orbits :: Lens (Permutation a) (Permutation b) (NonEmptyVector (Orbit a)) (NonEmptyVector (Orbit b))","name":"orbits","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:orbits"},{"display_html":"indices :: (Indexable i p, Applicative f) => (i -> Bool) -> Optical' p (Indexed i) f a a","name":"indices","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:indices"},{"display_html":"type Orbit a = NonEmptyVector a","name":"Orbit","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#t:Orbit"},{"display_html":"elems :: Permutation a -> NonEmptyVector a","name":"elems","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:elems"},{"display_html":"size :: Permutation a -> Int","name":"size","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:size"},{"display_html":"cycleOf :: Enum a => Permutation a -> a -> Orbit a","name":"cycleOf","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:cycleOf"},{"display_html":"next :: NonEmptyVector a -> Int -> a","name":"next","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:next"},{"display_html":"previous :: NonEmptyVector a -> Int -> a","name":"previous","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:previous"},{"display_html":"lookupIdx :: Enum a => Permutation a -> a -> (Int, Int)","name":"lookupIdx","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:lookupIdx"},{"display_html":"apply :: Enum a => Permutation a -> a -> a","name":"apply","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:apply"},{"display_html":"orbitFrom :: Eq a => a -> (a -> a) -> NonEmpty a","name":"orbitFrom","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:orbitFrom"},{"display_html":"cycleRep :: (Enum a, Eq a) => NonEmptyVector a -> (a -> a) -> Permutation a","name":"cycleRep","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:cycleRep"},{"display_html":"toCycleRep :: Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a","name":"toCycleRep","module":"HGeometry.Permutation","link":"hgeometry-combinatorial/HGeometry-Permutation.html#v:toCycleRep"},{"display_html":"newtype Cyclic v a = Cyclic (v a)","name":"Cyclic Cyclic","module":"HGeometry.Cyclic","link":"hgeometry-combinatorial/HGeometry-Cyclic.html#t:Cyclic"},{"display_html":"class HasDirectedTraversals v where","name":"HasDirectedTraversals traverseRightFrom traverseLeftFrom","module":"HGeometry.Cyclic","link":"hgeometry-combinatorial/HGeometry-Cyclic.html#t:HasDirectedTraversals"},{"display_html":"class ShiftedEq t where","name":"ShiftedEq ElemCyclic isShiftOf","module":"HGeometry.Cyclic","link":"hgeometry-combinatorial/HGeometry-Cyclic.html#t:ShiftedEq"},{"display_html":"encodeYAML :: ToYAML a => a -> ByteString","name":"encodeYAML","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:encodeYAML"},{"display_html":"encodeYAMLFile :: ToYAML a => OsPath -> a -> IO ()","name":"encodeYAMLFile","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:encodeYAMLFile"},{"display_html":"decodeYAML :: FromYAML a => ByteString -> Either (Pos, String) a","name":"decodeYAML","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:decodeYAML"},{"display_html":"decodeYAMLFile :: FromYAML a => OsPath -> IO (Either (Pos, String) a)","name":"decodeYAMLFile","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:decodeYAMLFile"},{"display_html":"printYAML :: ToYAML a => a -> IO ()","name":"printYAML","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:printYAML"},{"display_html":"data Versioned a = Versioned Version a","name":"Versioned Versioned","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#t:Versioned"},{"display_html":"unversioned :: Versioned a -> a","name":"unversioned","module":"HGeometry.YAML","link":"hgeometry-combinatorial/HGeometry-YAML.html#v:unversioned"}] \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/HGeometry-Sequence-Alternating.html b/haddocks/hgeometry-combinatorial/HGeometry-Sequence-Alternating.html index 1e6fd89a1..2a15966d7 100644 --- a/haddocks/hgeometry-combinatorial/HGeometry-Sequence-Alternating.html +++ b/haddocks/hgeometry-combinatorial/HGeometry-Sequence-Alternating.html @@ -1,4 +1,4 @@ -HGeometry.Sequence.Alternating
hgeometry-combinatorial
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Sequence.Alternating

Description

A Type representing Alternating sequences. The sequence type itself is parameterized.

Synopsis

Documentation

data Alternating f sep a Source #

A (non-empty) alternating sequence of a's and sep's.

Constructors

Alternating a (f (sep, a)) 

Instances

Instances details
Foldable f => Bifoldable (Alternating f) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

bifold :: Monoid m => Alternating f m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Alternating f a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Alternating f a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Alternating f a b -> c #

Functor f => Bifunctor (Alternating f) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

bimap :: (a -> b) -> (c -> d) -> Alternating f a c -> Alternating f b d #

first :: (a -> b) -> Alternating f a c -> Alternating f b c #

second :: (b -> c) -> Alternating f a b -> Alternating f a c #

Traversable f => Bitraversable (Alternating f) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Alternating f a b -> f0 (Alternating f c d) #

Foldable f => Foldable (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

fold :: Monoid m => Alternating f sep m -> m #

foldMap :: Monoid m => (a -> m) -> Alternating f sep a -> m #

foldMap' :: Monoid m => (a -> m) -> Alternating f sep a -> m #

foldr :: (a -> b -> b) -> b -> Alternating f sep a -> b #

foldr' :: (a -> b -> b) -> b -> Alternating f sep a -> b #

foldl :: (b -> a -> b) -> b -> Alternating f sep a -> b #

foldl' :: (b -> a -> b) -> b -> Alternating f sep a -> b #

foldr1 :: (a -> a -> a) -> Alternating f sep a -> a #

foldl1 :: (a -> a -> a) -> Alternating f sep a -> a #

toList :: Alternating f sep a -> [a] #

null :: Alternating f sep a -> Bool #

length :: Alternating f sep a -> Int #

elem :: Eq a => a -> Alternating f sep a -> Bool #

maximum :: Ord a => Alternating f sep a -> a #

minimum :: Ord a => Alternating f sep a -> a #

sum :: Num a => Alternating f sep a -> a #

product :: Num a => Alternating f sep a -> a #

Foldable f => Foldable1 (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

fold1 :: Semigroup m => Alternating f sep m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Alternating f sep a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Alternating f sep a -> m #

toNonEmpty :: Alternating f sep a -> NonEmpty a #

maximum :: Ord a => Alternating f sep a -> a #

minimum :: Ord a => Alternating f sep a -> a #

head :: Alternating f sep a -> a #

last :: Alternating f sep a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Alternating f sep a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Alternating f sep a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Alternating f sep a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Alternating f sep a -> b #

Traversable f => Traversable (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alternating f sep a -> f0 (Alternating f sep b) #

sequenceA :: Applicative f0 => Alternating f sep (f0 a) -> f0 (Alternating f sep a) #

mapM :: Monad m => (a -> m b) -> Alternating f sep a -> m (Alternating f sep b) #

sequence :: Monad m => Alternating f sep (m a) -> m (Alternating f sep a) #

Functor f => Functor (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

fmap :: (a -> b) -> Alternating f sep a -> Alternating f sep b #

(<$) :: a -> Alternating f sep b -> Alternating f sep a #

Traversable f => Traversable1 (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Alternating f sep a -> f0 (Alternating f sep b) Source #

sequence1 :: Apply f0 => Alternating f sep (f0 b) -> f0 (Alternating f sep b) Source #

Generic (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Associated Types

type Rep (Alternating f sep a) :: Type -> Type #

Methods

from :: Alternating f sep a -> Rep (Alternating f sep a) x #

to :: Rep (Alternating f sep a) x -> Alternating f sep a #

(Show a, Show (f (sep, a))) => Show (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

showsPrec :: Int -> Alternating f sep a -> ShowS #

show :: Alternating f sep a -> String #

showList :: [Alternating f sep a] -> ShowS #

(NFData a, NFData (f (sep, a))) => NFData (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

rnf :: Alternating f sep a -> () #

(Eq a, Eq (f (sep, a))) => Eq (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

(==) :: Alternating f sep a -> Alternating f sep a -> Bool #

(/=) :: Alternating f sep a -> Alternating f sep a -> Bool #

(Ord a, Ord (f (sep, a))) => Ord (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

compare :: Alternating f sep a -> Alternating f sep a -> Ordering #

(<) :: Alternating f sep a -> Alternating f sep a -> Bool #

(<=) :: Alternating f sep a -> Alternating f sep a -> Bool #

(>) :: Alternating f sep a -> Alternating f sep a -> Bool #

(>=) :: Alternating f sep a -> Alternating f sep a -> Bool #

max :: Alternating f sep a -> Alternating f sep a -> Alternating f sep a #

min :: Alternating f sep a -> Alternating f sep a -> Alternating f sep a #

type Rep (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

type Rep (Alternating f sep a) = D1 ('MetaData "Alternating" "HGeometry.Sequence.Alternating" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons "Alternating" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f (sep, a)))))

fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a Source #

Given a separator, and some foldable structure, constructs an Alternating.

mapF :: (f (sep, a) -> g (sep', a)) -> Alternating f sep a -> Alternating g sep' a Source #

map some function changing the f into a g.

withNeighbours :: Foldable f => Alternating f sep a -> [(a, sep, a)] Source #

Computes a b with all its neighbours

>>> withNeighbours (Alternating 0 [('a', 1), ('b', 2), ('c',3)])
+HGeometry.Sequence.Alternating
hgeometry-combinatorial
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Sequence.Alternating

Description

A Type representing Alternating sequences. The sequence type itself is parameterized.

Synopsis

Documentation

data Alternating f sep a Source #

A (non-empty) alternating sequence of a's and sep's.

Constructors

Alternating a (f (sep, a)) 

Instances

Instances details
Foldable f => Bifoldable (Alternating f) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

bifold :: Monoid m => Alternating f m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Alternating f a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Alternating f a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Alternating f a b -> c #

Functor f => Bifunctor (Alternating f) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

bimap :: (a -> b) -> (c -> d) -> Alternating f a c -> Alternating f b d #

first :: (a -> b) -> Alternating f a c -> Alternating f b c #

second :: (b -> c) -> Alternating f a b -> Alternating f a c #

Traversable f => Bitraversable (Alternating f) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Alternating f a b -> f0 (Alternating f c d) #

Foldable f => Foldable (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

fold :: Monoid m => Alternating f sep m -> m #

foldMap :: Monoid m => (a -> m) -> Alternating f sep a -> m #

foldMap' :: Monoid m => (a -> m) -> Alternating f sep a -> m #

foldr :: (a -> b -> b) -> b -> Alternating f sep a -> b #

foldr' :: (a -> b -> b) -> b -> Alternating f sep a -> b #

foldl :: (b -> a -> b) -> b -> Alternating f sep a -> b #

foldl' :: (b -> a -> b) -> b -> Alternating f sep a -> b #

foldr1 :: (a -> a -> a) -> Alternating f sep a -> a #

foldl1 :: (a -> a -> a) -> Alternating f sep a -> a #

toList :: Alternating f sep a -> [a] #

null :: Alternating f sep a -> Bool #

length :: Alternating f sep a -> Int #

elem :: Eq a => a -> Alternating f sep a -> Bool #

maximum :: Ord a => Alternating f sep a -> a #

minimum :: Ord a => Alternating f sep a -> a #

sum :: Num a => Alternating f sep a -> a #

product :: Num a => Alternating f sep a -> a #

Foldable f => Foldable1 (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

fold1 :: Semigroup m => Alternating f sep m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Alternating f sep a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Alternating f sep a -> m #

toNonEmpty :: Alternating f sep a -> NonEmpty a #

maximum :: Ord a => Alternating f sep a -> a #

minimum :: Ord a => Alternating f sep a -> a #

head :: Alternating f sep a -> a #

last :: Alternating f sep a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Alternating f sep a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Alternating f sep a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Alternating f sep a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Alternating f sep a -> b #

Traversable f => Traversable (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alternating f sep a -> f0 (Alternating f sep b) #

sequenceA :: Applicative f0 => Alternating f sep (f0 a) -> f0 (Alternating f sep a) #

mapM :: Monad m => (a -> m b) -> Alternating f sep a -> m (Alternating f sep b) #

sequence :: Monad m => Alternating f sep (m a) -> m (Alternating f sep a) #

Functor f => Functor (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

fmap :: (a -> b) -> Alternating f sep a -> Alternating f sep b #

(<$) :: a -> Alternating f sep b -> Alternating f sep a #

Traversable f => Traversable1 (Alternating f sep) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Alternating f sep a -> f0 (Alternating f sep b) Source #

sequence1 :: Apply f0 => Alternating f sep (f0 b) -> f0 (Alternating f sep b) Source #

Generic (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Associated Types

type Rep (Alternating f sep a) :: Type -> Type #

Methods

from :: Alternating f sep a -> Rep (Alternating f sep a) x #

to :: Rep (Alternating f sep a) x -> Alternating f sep a #

(Show a, Show (f (sep, a))) => Show (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

showsPrec :: Int -> Alternating f sep a -> ShowS #

show :: Alternating f sep a -> String #

showList :: [Alternating f sep a] -> ShowS #

(NFData a, NFData (f (sep, a))) => NFData (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

rnf :: Alternating f sep a -> () #

(Eq a, Eq (f (sep, a))) => Eq (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

(==) :: Alternating f sep a -> Alternating f sep a -> Bool #

(/=) :: Alternating f sep a -> Alternating f sep a -> Bool #

(Ord a, Ord (f (sep, a))) => Ord (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

Methods

compare :: Alternating f sep a -> Alternating f sep a -> Ordering #

(<) :: Alternating f sep a -> Alternating f sep a -> Bool #

(<=) :: Alternating f sep a -> Alternating f sep a -> Bool #

(>) :: Alternating f sep a -> Alternating f sep a -> Bool #

(>=) :: Alternating f sep a -> Alternating f sep a -> Bool #

max :: Alternating f sep a -> Alternating f sep a -> Alternating f sep a #

min :: Alternating f sep a -> Alternating f sep a -> Alternating f sep a #

type Rep (Alternating f sep a) Source # 
Instance details

Defined in HGeometry.Sequence.Alternating

type Rep (Alternating f sep a) = D1 ('MetaData "Alternating" "HGeometry.Sequence.Alternating" "hgeometry-combinatorial-1.0.0.0-inplace" 'False) (C1 ('MetaCons "Alternating" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f (sep, a)))))

fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a Source #

Given a separator, and some foldable structure, constructs an Alternating.

mapF :: (f (sep, a) -> g (sep', a)) -> Alternating f sep a -> Alternating g sep' a Source #

map some function changing the f into a g.

firstWithNeighbors :: Traversable f => (a -> sep -> a -> sep') -> Alternating f sep a -> Alternating f sep' a Source #

Map over the separators of the alterating together with the neighbours

withNeighbours :: Foldable f => Alternating f sep a -> [(a, sep, a)] Source #

Computes a b with all its neighbours

>>> withNeighbours (Alternating 0 [('a', 1), ('b', 2), ('c',3)])
 [(0,'a',1),(1,'b',2),(2,'c',3)]
 

mergeAlternating :: Ord t => (t -> a -> b -> c) -> Alternating List t a -> Alternating List t b -> [(t, c)] Source #

Generic merging scheme that merges two Alternating Lists and applies the function 'f', with the current/new value at every event. So note that if the alternating @@ -29,4 +29,4 @@ Alternating 1 [(",",2),(",",3),(",",4),(",",5),(".",6)] >>> snocElemWith (\_ _ -> ".") (fromNonEmptyWith @[] "," (NonEmpty.fromList [1])) 6 Alternating 1 [(".",6)] -

\ No newline at end of file +

separators :: Functor f => Alternating f sep a -> f sep Source #

Get the separators out of the alternating

\ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/doc-index.json b/haddocks/hgeometry-combinatorial/doc-index.json index e1c644607..0d06c0121 100644 --- a/haddocks/hgeometry-combinatorial/doc-index.json +++ b/haddocks/hgeometry-combinatorial/doc-index.json @@ -1 +1 @@ -[{"display_html":"binarySearchFirst :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchFirst","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirst"},{"display_html":"binarySearchLast :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchLast","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchLast"},{"display_html":"binarySearchUntil :: (Fractional r, Ord r) => r -> (r -> Bool) -> r -> r -> r","name":"binarySearchUntil","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchUntil"},{"display_html":"data BinarySearchResult a","name":"BinarySearchResult AllFalse AllTrue FlipsAt","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#t:BinarySearchResult"},{"display_html":"firstTrue :: BinarySearchResult a -> Maybe a","name":"firstTrue","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:firstTrue"},{"display_html":"lastFalse :: BinarySearchResult a -> Maybe a","name":"lastFalse","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:lastFalse"},{"display_html":"class BinarySearch v where","name":"BinarySearch Index Elem binarySearchIn binarySearchIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#t:BinarySearch"},{"display_html":"binarySearchFirstIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchFirstIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIn"},{"display_html":"binarySearchFirstIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchFirstIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIdxIn"},{"display_html":"binarySearchLastIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchLastIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIn"},{"display_html":"binarySearchLastIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchLastIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIdxIn"},{"display_html":"divideAndConquer :: (Foldable f, Monoid s) => (a -> s) -> f a -> s","name":"divideAndConquer","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer"},{"display_html":"divideAndConquer1 :: (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s","name":"divideAndConquer1","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1"},{"display_html":"divideAndConquer1With :: Foldable1 f => (s -> s -> s) -> (a -> s) -> f a -> s","name":"divideAndConquer1With","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1With"},{"display_html":"mergeSorted :: Ord a => NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSorted","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSorted"},{"display_html":"mergeSortedLists :: Ord a => [a] -> [a] -> [a]","name":"mergeSortedLists","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedLists"},{"display_html":"mergeSortedBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSortedBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedBy"},{"display_html":"mergeSortedListsBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]","name":"mergeSortedListsBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedListsBy"},{"display_html":"newtype InsertionOnly static a = InsertionOnly [Maybe (static a)]","name":"InsertionOnly InsertionOnly","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#t:InsertionOnly"},{"display_html":"empty :: InsertionOnly static a","name":"empty","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#v:empty"},{"display_html":"class LogarithmicMethodDS static a where","name":"LogarithmicMethodDS singleton build merge","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#t:LogarithmicMethodDS"},{"display_html":"insert :: LogarithmicMethodDS static a => a -> InsertionOnly static a -> InsertionOnly static a","name":"insert","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#v:insert"},{"display_html":"queryWith :: Monoid m => (static a -> m) -> InsertionOnly static a -> m","name":"queryWith","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#v:queryWith"},{"display_html":"insertOrd :: Ord a => a -> CList a -> CList a","name":"insertOrd","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:insertOrd"},{"display_html":"insertOrdBy :: (a -> a -> Ordering) -> a -> CList a -> CList a","name":"insertOrdBy","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:insertOrdBy"},{"display_html":"insertOrdBy' :: (a -> a -> Ordering) -> a -> [a] -> [a]","name":"insertOrdBy'","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:insertOrdBy-39-"},{"display_html":"splitIncr :: (a -> a -> Ordering) -> [a] -> ([a], [a])","name":"splitIncr","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:splitIncr"},{"display_html":"isShiftOf :: Eq a => CList a -> CList a -> Bool","name":"isShiftOf","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:isShiftOf"},{"display_html":"data STR a b c = STR !a !b !c","name":"STR STR","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:STR"},{"display_html":"type Three = V3","name":"Three","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:Three"},{"display_html":"pattern Three :: a -> a -> a -> Three a","name":"Three","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:Three"},{"display_html":"uniqueTriplets :: Foldable f => f a -> [Three a]","name":"uniqueTriplets","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:uniqueTriplets"},{"display_html":"data SP a b = SP !a !b","name":"SP SP","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:SP"},{"display_html":"type Two = V2","name":"Two","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:Two"},{"display_html":"pattern Two :: a -> a -> Two a","name":"Two","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:Two"},{"display_html":"uniquePairs :: Foldable f => f a -> [Two a]","name":"uniquePairs","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:uniquePairs"},{"display_html":"nonEmptyTails :: [a] -> [[a]]","name":"nonEmptyTails","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:nonEmptyTails"},{"display_html":"data core :+ extra = core :+ extra","name":":+ :+","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t::-43-"},{"display_html":"_core :: (core :+ extra) -> core","name":"_core","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:_core"},{"display_html":"_extra :: (core :+ extra) -> extra","name":"_extra","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:_extra"},{"display_html":"core :: Lens (core :+ extra) (core' :+ extra) core core'","name":"core","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:core"},{"display_html":"extra :: Lens (core :+ extra) (core :+ extra') extra extra'","name":"extra","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:extra"},{"display_html":"ext :: a -> a :+ ()","name":"ext","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:ext"},{"display_html":"class AsA t c | t -> c where","name":"AsA asCore","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t:AsA"},{"display_html":"type (:~) t c = t `AsA` c","name":":~","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t::-126-"},{"display_html":"pattern AsA :: t :~ c => c -> t","name":"AsA","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:AsA"},{"display_html":"class AsExt t where","name":"AsExt _Ext ExtraOf CoreOf","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t:AsExt"},{"display_html":"asIndexedExt :: (Indexable i p, Functor f) => p (s :+ i) (f (t :+ j)) -> Indexed i s (f t)","name":"asIndexedExt","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:asIndexedExt"},{"display_html":"sortBy :: forall vector f a. (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a","name":"sortBy","module":"HGeometry.Foldable.Sort","link":"HGeometry-Foldable-Sort.html#v:sortBy"},{"display_html":"sort :: forall vector f a. (Foldable f, Vector vector a, Ord a) => f a -> vector a","name":"sort","module":"HGeometry.Foldable.Sort","link":"HGeometry-Foldable-Sort.html#v:sort"},{"display_html":"sortOnCheap :: forall vector f a b. (Foldable f, Vector vector a, Ord b) => (a -> b) -> f a -> vector a","name":"sortOnCheap","module":"HGeometry.Foldable.Sort","link":"HGeometry-Foldable-Sort.html#v:sortOnCheap"},{"display_html":"class HasFromFoldable f where","name":"HasFromFoldable fromList fromFoldable","module":"HGeometry.Foldable.Util","link":"HGeometry-Foldable-Util.html#t:HasFromFoldable"},{"display_html":"class HasFromFoldable1 f where","name":"HasFromFoldable1 fromNonEmpty fromFoldable1","module":"HGeometry.Foldable.Util","link":"HGeometry-Foldable-Util.html#t:HasFromFoldable1"},{"display_html":"class HasIndex a where","name":"HasIndex sosIndex","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#t:HasIndex"},{"display_html":"type Index = Int","name":"Index","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#t:Index"},{"display_html":"data WithIndex a = WithIndex !Index a","name":"WithIndex WithIndex","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#t:WithIndex"},{"display_html":"theValue :: Lens (WithIndex a) (WithIndex b) a b","name":"theValue","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:theValue"},{"display_html":"labelWithIndex :: Traversable t => t a -> t (WithIndex a)","name":"labelWithIndex","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:labelWithIndex"},{"display_html":"labelWith :: Traversable t => (Index -> a -> b) -> t a -> t b","name":"labelWith","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:labelWith"},{"display_html":"labelWith' :: forall t a b. Traversable t => (Index -> a -> b) -> t a -> (t b, Int)","name":"labelWith'","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:labelWith-39-"},{"display_html":"folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a","name":"folding1","module":"HGeometry.Lens.Util","link":"HGeometry-Lens-Util.html#v:folding1"},{"display_html":"ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) => (s -> f (i, a)) -> Over p g s t a b","name":"ifolding1","module":"HGeometry.Lens.Util","link":"HGeometry-Lens-Util.html#v:ifolding1"},{"display_html":"itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i, a)) s a -> s -> NonEmpty (i, a)","name":"itoNonEmptyOf","module":"HGeometry.Lens.Util","link":"HGeometry-Lens-Util.html#v:itoNonEmptyOf"},{"display_html":"data Zipper a = Zipper [a] [a]","name":"Zipper Zipper","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#t:Zipper"},{"display_html":"fromList :: [a] -> Zipper a","name":"fromList","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:fromList"},{"display_html":"goNext :: Zipper a -> Maybe (Zipper a)","name":"goNext","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:goNext"},{"display_html":"goPrev :: Zipper a -> Maybe (Zipper a)","name":"goPrev","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:goPrev"},{"display_html":"allNexts :: Zipper a -> [Zipper a]","name":"allNexts","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:allNexts"},{"display_html":"extractNext :: Zipper a -> Maybe (a, Zipper a)","name":"extractNext","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:extractNext"},{"display_html":"dropNext :: Zipper a -> Maybe (Zipper a)","name":"dropNext","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:dropNext"},{"display_html":"allNonEmptyNexts :: Zipper a -> [Zipper a]","name":"allNonEmptyNexts","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:allNonEmptyNexts"},{"display_html":"class Measured f a where","name":"Measured measure","module":"HGeometry.Measured.Class","link":"HGeometry-Measured-Class.html#t:Measured"},{"display_html":"class Measured f a => CanInsert f a where","name":"CanInsert insertMeasure","module":"HGeometry.Measured.Class","link":"HGeometry-Measured-Class.html#t:CanInsert"},{"display_html":"class Measured f a => CanDelete f a where","name":"CanDelete deleteMeasure","module":"HGeometry.Measured.Class","link":"HGeometry-Measured-Class.html#t:CanDelete"},{"display_html":"module HGeometry.Measured.Class","name":"","module":"HGeometry.Measured","link":""},{"display_html":"newtype Count a = Count Word","name":"Count Count","module":"HGeometry.Measured.Size","link":"HGeometry-Measured-Size.html#t:Count"},{"display_html":"data Sized a = Sized !(Count a) a","name":"Sized Sized","module":"HGeometry.Measured.Size","link":"HGeometry-Measured-Size.html#t:Sized"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a]","name":"extractMinimaBy","module":"HGeometry.NonEmpty.Util","link":"HGeometry-NonEmpty-Util.html#v:extractMinimaBy"},{"display_html":"leaveOutOne :: [a] -> [(a, [a])]","name":"leaveOutOne","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:leaveOutOne"},{"display_html":"minimumMaybe :: Ord a => [a] -> Maybe a","name":"minimumMaybe","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimumMaybe"},{"display_html":"maximumMaybe :: Ord a => [a] -> Maybe a","name":"maximumMaybe","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:maximumMaybe"},{"display_html":"minimumMaybeBy :: (a -> a -> Ordering) -> [a] -> Maybe a","name":"minimumMaybeBy","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimumMaybeBy"},{"display_html":"minimaOn :: Ord b => (a -> b) -> [a] -> [a]","name":"minimaOn","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimaOn"},{"display_html":"minimaBy :: (a -> a -> Ordering) -> [a] -> [a]","name":"minimaBy","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimaBy"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> [a] -> [a] :+ [a]","name":"extractMinimaBy","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:extractMinimaBy"},{"display_html":"partition3 :: Foldable f => (a -> Ordering) -> f a -> ([a], [a], [a])","name":"partition3","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:partition3"},{"display_html":"groupBy' :: (a -> a -> Ordering) -> [a] -> [NonEmpty a]","name":"groupBy'","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:groupBy-39-"},{"display_html":"class Num r => Radical r where","name":"Radical sqrt","module":"HGeometry.Number.Radical","link":"HGeometry-Number-Radical.html#t:Radical"},{"display_html":"data GRatio a","name":"GRatio","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#t:GRatio"},{"display_html":"(%) :: (Eq a, Num a) => a -> a -> GRatio a","name":"%","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#v:-37-"},{"display_html":"numerator :: GRatio a -> a","name":"numerator","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#v:numerator"},{"display_html":"denominator :: GRatio a -> a","name":"denominator","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#v:denominator"},{"display_html":"newtype RealNumber (p :: Nat) = RealNumber Rational","name":"RealNumber RealNumber","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#t:RealNumber"},{"display_html":"data AsFixed p","name":"AsFixed Exact Lossy","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#t:AsFixed"},{"display_html":"asFixed :: KnownNat p => RealNumber p -> AsFixed (NatPrec p)","name":"asFixed","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#v:asFixed"},{"display_html":"toFixed :: KnownNat p => RealNumber p -> Fixed (NatPrec p)","name":"toFixed","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#v:toFixed"},{"display_html":"fromFixed :: KnownNat p => Fixed (NatPrec p) -> RealNumber p","name":"fromFixed","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#v:fromFixed"},{"display_html":"type Nat = Natural","name":"Nat","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#t:Nat"},{"display_html":"newtype O (s :: Type) (a :: Type) = O {}","name":"O runO O","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#t:O"},{"display_html":"newtype OrdDict a = OrdDict {}","name":"OrdDict compare_ OrdDict","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#t:OrdDict"},{"display_html":"withOrd :: (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b","name":"withOrd","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:withOrd"},{"display_html":"extractOrd1 :: f (O s a) -> O s (f a)","name":"extractOrd1","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:extractOrd1"},{"display_html":"introOrd1 :: f a -> f (O s a)","name":"introOrd1","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:introOrd1"},{"display_html":"liftOrd1 :: (f (O s a) -> g (O s a)) -> f a -> O s (g a)","name":"liftOrd1","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:liftOrd1"},{"display_html":"extractOrd2 :: f (O s k) v -> O s (f k v)","name":"extractOrd2","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:extractOrd2"},{"display_html":"introOrd2 :: f k v -> f (O s k) v","name":"introOrd2","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:introOrd2"},{"display_html":"data Alternating f sep a = Alternating a (f (sep, a))","name":"Alternating Alternating","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#t:Alternating"},{"display_html":"fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a","name":"fromNonEmptyWith","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:fromNonEmptyWith"},{"display_html":"mapF :: (f (sep, a) -> g (sep', a)) -> Alternating f sep a -> Alternating g sep' a","name":"mapF","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:mapF"},{"display_html":"withNeighbours :: Foldable f => Alternating f sep a -> [(a, sep, a)]","name":"withNeighbours","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:withNeighbours"},{"display_html":"mergeAlternating :: Ord t => (t -> a -> b -> c) -> Alternating List t a -> Alternating List t b -> [(t, c)]","name":"mergeAlternating","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:mergeAlternating"},{"display_html":"insertBreakPoints :: Ord t => [t] -> Alternating List t a -> Alternating List t a","name":"insertBreakPoints","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:insertBreakPoints"},{"display_html":"reverse :: Alternating List b a -> Alternating List b a","name":"reverse","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:reverse"},{"display_html":"consElemWith :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> a -> Alternating f sep a -> Alternating f sep a","name":"consElemWith","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:consElemWith"},{"display_html":"unconsAlt :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a)","name":"unconsAlt","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:unconsAlt"},{"display_html":"snocElemWith :: Snoc (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> Alternating f sep a -> a -> Alternating f sep a","name":"snocElemWith","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:snocElemWith"},{"display_html":"data ViewL1 a = a :<< (Seq a)","name":"ViewL1 :<<","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#t:ViewL1"},{"display_html":"data ViewR1 a = (Seq a) :>> a","name":"ViewR1 :>>","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#t:ViewR1"},{"display_html":"viewl1 :: ViewR1 a -> ViewL1 a","name":"viewl1","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:viewl1"},{"display_html":"viewr1 :: ViewL1 a -> ViewR1 a","name":"viewr1","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:viewr1"},{"display_html":"(|>>) :: ViewR1 a -> a -> ViewR1 a","name":"|>>","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:-124--62--62-"},{"display_html":"(<>>) :: ViewR1 a -> Seq a -> ViewR1 a","name":"<>>","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:-60--62--62-"},{"display_html":"splitL1At :: Int -> ViewL1 a -> Maybe (Seq a, a, Seq a)","name":"splitL1At","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:splitL1At"},{"display_html":"splitR1At :: Int -> ViewR1 a -> Maybe (Seq a, a, Seq a)","name":"splitR1At","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:splitR1At"},{"display_html":"toggle :: Ord a => a -> Set a -> Set a","name":"toggle","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:toggle"},{"display_html":"splitOn :: Ord b => (a -> b) -> b -> Set a -> (Set a, Set a, Set a)","name":"splitOn","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:splitOn"},{"display_html":"splitBy :: (a -> Ordering) -> Set a -> (Set a, Set a, Set a)","name":"splitBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:splitBy"},{"display_html":"fromListBy :: (a -> a -> Ordering) -> [a] -> Set a","name":"fromListBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:fromListBy"},{"display_html":"join :: Set a -> Set a -> Set a","name":"join","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:join"},{"display_html":"insertBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"insertBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:insertBy"},{"display_html":"deleteAllBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"deleteAllBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:deleteAllBy"},{"display_html":"queryBy :: (a -> a -> Ordering) -> (forall b. Ord b => b -> Set b -> t b) -> a -> Set a -> t a","name":"queryBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:queryBy"},{"display_html":"toggleBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"toggleBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:toggleBy"},{"display_html":"data Sign","name":"Sign Positive Negative","module":"HGeometry.Sign","link":"HGeometry-Sign.html#t:Sign"},{"display_html":"flipSign :: Sign -> Sign","name":"flipSign","module":"HGeometry.Sign","link":"HGeometry-Sign.html#v:flipSign"},{"display_html":"signFromTerms :: (Num r, Eq r, Foldable1 f) => f r -> Maybe Sign","name":"signFromTerms","module":"HGeometry.Sign","link":"HGeometry-Sign.html#v:signFromTerms"},{"display_html":"data EpsFold i","name":"EpsFold","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:EpsFold"},{"display_html":"eps :: i -> EpsFold i","name":"eps","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:eps"},{"display_html":"mkEpsFold :: Ord i => [i] -> EpsFold i","name":"mkEpsFold","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:mkEpsFold"},{"display_html":"evalEps :: (Fractional r, Integral i, Integral j) => j -> r -> EpsFold i -> r","name":"evalEps","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:evalEps"},{"display_html":"hasNoPertubation :: EpsFold i -> Bool","name":"hasNoPertubation","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:hasNoPertubation"},{"display_html":"factors :: EpsFold i -> Bag i","name":"factors","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:factors"},{"display_html":"suitableBase :: EpsFold i -> Int","name":"suitableBase","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:suitableBase"},{"display_html":"data Term i r = Term !r (EpsFold i)","name":"Term Term","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:Term"},{"display_html":"term :: r -> i -> Term i r","name":"term","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:term"},{"display_html":"constantFactor :: Lens' (Term i r) r","name":"constantFactor","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:constantFactor"},{"display_html":"data Symbolic i r","name":"Symbolic","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:Symbolic"},{"display_html":"constant :: Ord i => r -> Symbolic i r","name":"constant","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:constant"},{"display_html":"symbolic :: Ord i => r -> i -> Symbolic i r","name":"symbolic","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:symbolic"},{"display_html":"perturb :: (Num r, Ord i) => r -> i -> Symbolic i r","name":"perturb","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:perturb"},{"display_html":"toTerms :: Symbolic i r -> [Term i r]","name":"toTerms","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:toTerms"},{"display_html":"signOf :: (Num r, Eq r) => Symbolic i r -> Maybe Sign","name":"signOf","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:signOf"},{"display_html":"roundToConstant :: Num r => Symbolic i r -> r","name":"roundToConstant","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:roundToConstant"},{"display_html":"type SoSRational i r = GRatio (Symbolic i r)","name":"SoSRational","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:SoSRational"},{"display_html":"sosRational :: (Ord i, Eq r, Num r) => Symbolic i r -> Symbolic i r -> SoSRational i r","name":"sosRational","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:sosRational"},{"display_html":"isSubStringOf :: (Eq a, Foldable p, Foldable t) => p a -> t a -> Maybe Int","name":"isSubStringOf","module":"HGeometry.StringSearch.KMP","link":"HGeometry-StringSearch-KMP.html#v:isSubStringOf"},{"display_html":"kmpMatch :: Eq a => Vector a -> Vector a -> Maybe Int","name":"kmpMatch","module":"HGeometry.StringSearch.KMP","link":"HGeometry-StringSearch-KMP.html#v:kmpMatch"},{"display_html":"buildFailureFunction :: forall a. Eq a => Vector a -> Vector Int","name":"buildFailureFunction","module":"HGeometry.StringSearch.KMP","link":"HGeometry-StringSearch-KMP.html#v:buildFailureFunction"},{"display_html":"data TreeNode v a","name":"TreeNode LeafNode InternalNode","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#t:TreeNode"},{"display_html":"_TreeNodeEither :: Iso' (TreeNode v p) (Either v p)","name":"_TreeNodeEither","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:_TreeNodeEither"},{"display_html":"data Zipper a = Zipper {}","name":"Zipper ancestors focus Zipper","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#t:Zipper"},{"display_html":"root :: Tree a -> Zipper a","name":"root","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:root"},{"display_html":"up :: Zipper a -> Maybe (Zipper a)","name":"up","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:up"},{"display_html":"firstChild :: Zipper a -> Maybe (Zipper a)","name":"firstChild","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:firstChild"},{"display_html":"nextSibling :: Zipper a -> Maybe (Zipper a)","name":"nextSibling","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:nextSibling"},{"display_html":"prevSibling :: Zipper a -> Maybe (Zipper a)","name":"prevSibling","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:prevSibling"},{"display_html":"allChildren :: Zipper a -> [Zipper a]","name":"allChildren","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:allChildren"},{"display_html":"allTrees :: Zipper a -> [Zipper a]","name":"allTrees","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:allTrees"},{"display_html":"unZipperLocal :: Zipper a -> Tree a","name":"unZipperLocal","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:unZipperLocal"},{"display_html":"constructTree :: [([Tree a], a, [Tree a])] -> Maybe (Tree a)","name":"constructTree","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:constructTree"},{"display_html":"findEvert :: (a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findEvert"},{"display_html":"findEvert' :: (Tree a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert'","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findEvert-39-"},{"display_html":"findPath :: (a -> Bool) -> (a -> Bool) -> Tree a -> Maybe [a]","name":"findPath","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findPath"},{"display_html":"findNode :: (a -> Bool) -> Tree a -> Maybe [a]","name":"findNode","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findNode"},{"display_html":"findNodes :: (Tree a -> Bool) -> Tree a -> [[a]]","name":"findNodes","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findNodes"},{"display_html":"levels :: Tree a -> NonEmpty (NonEmpty a)","name":"levels","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:levels"},{"display_html":"data BinLeafTree v a","name":"BinLeafTree Node Leaf","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#t:BinLeafTree"},{"display_html":"node :: (Measured f a, Semigroup (f a)) => BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a","name":"node","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:node"},{"display_html":"asBalancedBinLeafTree :: Foldable1 f => f a -> BinLeafTree (Count a) a","name":"asBalancedBinLeafTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:asBalancedBinLeafTree"},{"display_html":"foldUp :: (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b","name":"foldUp","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:foldUp"},{"display_html":"foldUpData :: (w -> v -> w -> w) -> (a -> w) -> BinLeafTree v a -> BinLeafTree w a","name":"foldUpData","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:foldUpData"},{"display_html":"zipExactWith :: (u -> v -> w) -> (a -> b -> c) -> BinLeafTree u a -> BinLeafTree v b -> BinLeafTree w c","name":"zipExactWith","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:zipExactWith"},{"display_html":"toRoseTree :: BinLeafTree v a -> Tree (TreeNode v a)","name":"toRoseTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:toRoseTree"},{"display_html":"drawTree :: (Show v, Show a) => BinLeafTree v a -> String","name":"drawTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:drawTree"},{"display_html":"data BinaryTree a","name":"BinaryTree Internal Nil","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#t:BinaryTree"},{"display_html":"asBalancedBinTree :: forall f a. Foldable f => f a -> BinaryTree a","name":"asBalancedBinTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:asBalancedBinTree"},{"display_html":"access :: BinaryTree a -> Maybe a","name":"access","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:access"},{"display_html":"foldBinaryUp :: b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)","name":"foldBinaryUp","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:foldBinaryUp"},{"display_html":"toRoseTree' :: BinaryTree a -> Maybe (Tree a)","name":"toRoseTree'","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:toRoseTree-39-"},{"display_html":"drawTree' :: Show a => BinaryTree a -> String","name":"drawTree'","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:drawTree-39-"},{"display_html":"newtype Report a where","name":"Report Report MkReport","module":"HGeometry.Measured.Report","link":"HGeometry-Measured-Report.html#t:Report"},{"display_html":"newtype Report1 a = Report1 (BinLeafTree (Const () a) a)","name":"Report1 Report1","module":"HGeometry.Measured.Report","link":"HGeometry-Measured-Report.html#t:Report1"},{"display_html":"newtype ReportList a = ReportList [a]","name":"ReportList ReportList","module":"HGeometry.Measured.Report","link":"HGeometry-Measured-Report.html#t:ReportList"},{"display_html":"data Top a where","name":"Top ValT Top","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#t:Top"},{"display_html":"topToMaybe :: Top a -> Maybe a","name":"topToMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:topToMaybe"},{"display_html":"_ValT :: Prism (Top a) (Top b) a b","name":"_ValT","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_ValT"},{"display_html":"_Top :: Prism' (Top a) ()","name":"_Top","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_Top"},{"display_html":"_TopMaybe :: Iso' (Top a) (Maybe a)","name":"_TopMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_TopMaybe"},{"display_html":"data Bottom a where","name":"Bottom Bottom ValB","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#t:Bottom"},{"display_html":"bottomToMaybe :: Bottom a -> Maybe a","name":"bottomToMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:bottomToMaybe"},{"display_html":"_ValB :: Prism (Bottom a) (Bottom b) a b","name":"_ValB","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_ValB"},{"display_html":"_Bottom :: Prism' (Bottom a) ()","name":"_Bottom","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_Bottom"},{"display_html":"_BottomMaybe :: Iso' (Bottom a) (Maybe a)","name":"_BottomMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_BottomMaybe"},{"display_html":"data UnBounded a","name":"UnBounded MaxInfinity MinInfinity Val _unUnBounded","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#t:UnBounded"},{"display_html":"_Val :: Prism (UnBounded a) (UnBounded b) a b","name":"_Val","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_Val"},{"display_html":"unBoundedToMaybe :: UnBounded a -> Maybe a","name":"unBoundedToMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:unBoundedToMaybe"},{"display_html":"data Permutation a = Permutation (NonEmptyVector (Orbit a)) (Vector (Int, Int))","name":"Permutation Permutation","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#t:Permutation"},{"display_html":"orbits :: Lens (Permutation a) (Permutation b) (NonEmptyVector (Orbit a)) (NonEmptyVector (Orbit b))","name":"orbits","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:orbits"},{"display_html":"indices :: (Indexable i p, Applicative f) => (i -> Bool) -> Optical' p (Indexed i) f a a","name":"indices","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:indices"},{"display_html":"type Orbit a = NonEmptyVector a","name":"Orbit","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#t:Orbit"},{"display_html":"elems :: Permutation a -> NonEmptyVector a","name":"elems","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:elems"},{"display_html":"size :: Permutation a -> Int","name":"size","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:size"},{"display_html":"cycleOf :: Enum a => Permutation a -> a -> Orbit a","name":"cycleOf","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:cycleOf"},{"display_html":"next :: NonEmptyVector a -> Int -> a","name":"next","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:next"},{"display_html":"previous :: NonEmptyVector a -> Int -> a","name":"previous","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:previous"},{"display_html":"lookupIdx :: Enum a => Permutation a -> a -> (Int, Int)","name":"lookupIdx","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:lookupIdx"},{"display_html":"apply :: Enum a => Permutation a -> a -> a","name":"apply","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:apply"},{"display_html":"orbitFrom :: Eq a => a -> (a -> a) -> NonEmpty a","name":"orbitFrom","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:orbitFrom"},{"display_html":"cycleRep :: (Enum a, Eq a) => NonEmptyVector a -> (a -> a) -> Permutation a","name":"cycleRep","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:cycleRep"},{"display_html":"toCycleRep :: Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a","name":"toCycleRep","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:toCycleRep"},{"display_html":"newtype Cyclic v a = Cyclic (v a)","name":"Cyclic Cyclic","module":"HGeometry.Cyclic","link":"HGeometry-Cyclic.html#t:Cyclic"},{"display_html":"class HasDirectedTraversals v where","name":"HasDirectedTraversals traverseRightFrom traverseLeftFrom","module":"HGeometry.Cyclic","link":"HGeometry-Cyclic.html#t:HasDirectedTraversals"},{"display_html":"class ShiftedEq t where","name":"ShiftedEq ElemCyclic isShiftOf","module":"HGeometry.Cyclic","link":"HGeometry-Cyclic.html#t:ShiftedEq"},{"display_html":"encodeYAML :: ToYAML a => a -> ByteString","name":"encodeYAML","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:encodeYAML"},{"display_html":"encodeYAMLFile :: ToYAML a => OsPath -> a -> IO ()","name":"encodeYAMLFile","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:encodeYAMLFile"},{"display_html":"decodeYAML :: FromYAML a => ByteString -> Either (Pos, String) a","name":"decodeYAML","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:decodeYAML"},{"display_html":"decodeYAMLFile :: FromYAML a => OsPath -> IO (Either (Pos, String) a)","name":"decodeYAMLFile","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:decodeYAMLFile"},{"display_html":"printYAML :: ToYAML a => a -> IO ()","name":"printYAML","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:printYAML"},{"display_html":"data Versioned a = Versioned Version a","name":"Versioned Versioned","module":"HGeometry.YAML","link":"HGeometry-YAML.html#t:Versioned"},{"display_html":"unversioned :: Versioned a -> a","name":"unversioned","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:unversioned"}] \ No newline at end of file +[{"display_html":"binarySearchFirst :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchFirst","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirst"},{"display_html":"binarySearchLast :: Integral a => (a -> Bool) -> a -> a -> a","name":"binarySearchLast","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchLast"},{"display_html":"binarySearchUntil :: (Fractional r, Ord r) => r -> (r -> Bool) -> r -> r -> r","name":"binarySearchUntil","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchUntil"},{"display_html":"data BinarySearchResult a","name":"BinarySearchResult AllFalse AllTrue FlipsAt","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#t:BinarySearchResult"},{"display_html":"firstTrue :: BinarySearchResult a -> Maybe a","name":"firstTrue","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:firstTrue"},{"display_html":"lastFalse :: BinarySearchResult a -> Maybe a","name":"lastFalse","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:lastFalse"},{"display_html":"class BinarySearch v where","name":"BinarySearch Index Elem binarySearchIn binarySearchIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#t:BinarySearch"},{"display_html":"binarySearchFirstIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchFirstIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIn"},{"display_html":"binarySearchFirstIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchFirstIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchFirstIdxIn"},{"display_html":"binarySearchLastIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v)","name":"binarySearchLastIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIn"},{"display_html":"binarySearchLastIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v)","name":"binarySearchLastIdxIn","module":"HGeometry.Algorithms.BinarySearch","link":"HGeometry-Algorithms-BinarySearch.html#v:binarySearchLastIdxIn"},{"display_html":"divideAndConquer :: (Foldable f, Monoid s) => (a -> s) -> f a -> s","name":"divideAndConquer","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer"},{"display_html":"divideAndConquer1 :: (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s","name":"divideAndConquer1","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1"},{"display_html":"divideAndConquer1With :: Foldable1 f => (s -> s -> s) -> (a -> s) -> f a -> s","name":"divideAndConquer1With","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:divideAndConquer1With"},{"display_html":"mergeSorted :: Ord a => NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSorted","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSorted"},{"display_html":"mergeSortedLists :: Ord a => [a] -> [a] -> [a]","name":"mergeSortedLists","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedLists"},{"display_html":"mergeSortedBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a","name":"mergeSortedBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedBy"},{"display_html":"mergeSortedListsBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a]","name":"mergeSortedListsBy","module":"HGeometry.Algorithms.DivideAndConquer","link":"HGeometry-Algorithms-DivideAndConquer.html#v:mergeSortedListsBy"},{"display_html":"newtype InsertionOnly static a = InsertionOnly [Maybe (static a)]","name":"InsertionOnly InsertionOnly","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#t:InsertionOnly"},{"display_html":"empty :: InsertionOnly static a","name":"empty","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#v:empty"},{"display_html":"class LogarithmicMethodDS static a where","name":"LogarithmicMethodDS singleton build merge","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#t:LogarithmicMethodDS"},{"display_html":"insert :: LogarithmicMethodDS static a => a -> InsertionOnly static a -> InsertionOnly static a","name":"insert","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#v:insert"},{"display_html":"queryWith :: Monoid m => (static a -> m) -> InsertionOnly static a -> m","name":"queryWith","module":"HGeometry.Algorithms.LogarithmicMethod","link":"HGeometry-Algorithms-LogarithmicMethod.html#v:queryWith"},{"display_html":"insertOrd :: Ord a => a -> CList a -> CList a","name":"insertOrd","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:insertOrd"},{"display_html":"insertOrdBy :: (a -> a -> Ordering) -> a -> CList a -> CList a","name":"insertOrdBy","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:insertOrdBy"},{"display_html":"insertOrdBy' :: (a -> a -> Ordering) -> a -> [a] -> [a]","name":"insertOrdBy'","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:insertOrdBy-39-"},{"display_html":"splitIncr :: (a -> a -> Ordering) -> [a] -> ([a], [a])","name":"splitIncr","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:splitIncr"},{"display_html":"isShiftOf :: Eq a => CList a -> CList a -> Bool","name":"isShiftOf","module":"HGeometry.CircularList.Util","link":"HGeometry-CircularList-Util.html#v:isShiftOf"},{"display_html":"data STR a b c = STR !a !b !c","name":"STR STR","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:STR"},{"display_html":"type Three = V3","name":"Three","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:Three"},{"display_html":"pattern Three :: a -> a -> a -> Three a","name":"Three","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:Three"},{"display_html":"uniqueTriplets :: Foldable f => f a -> [Three a]","name":"uniqueTriplets","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:uniqueTriplets"},{"display_html":"data SP a b = SP !a !b","name":"SP SP","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:SP"},{"display_html":"type Two = V2","name":"Two","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#t:Two"},{"display_html":"pattern Two :: a -> a -> Two a","name":"Two","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:Two"},{"display_html":"uniquePairs :: Foldable f => f a -> [Two a]","name":"uniquePairs","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:uniquePairs"},{"display_html":"nonEmptyTails :: [a] -> [[a]]","name":"nonEmptyTails","module":"HGeometry.Combinatorial.Util","link":"HGeometry-Combinatorial-Util.html#v:nonEmptyTails"},{"display_html":"data core :+ extra = core :+ extra","name":":+ :+","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t::-43-"},{"display_html":"_core :: (core :+ extra) -> core","name":"_core","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:_core"},{"display_html":"_extra :: (core :+ extra) -> extra","name":"_extra","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:_extra"},{"display_html":"core :: Lens (core :+ extra) (core' :+ extra) core core'","name":"core","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:core"},{"display_html":"extra :: Lens (core :+ extra) (core :+ extra') extra extra'","name":"extra","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:extra"},{"display_html":"ext :: a -> a :+ ()","name":"ext","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:ext"},{"display_html":"class AsA t c | t -> c where","name":"AsA asCore","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t:AsA"},{"display_html":"type (:~) t c = t `AsA` c","name":":~","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t::-126-"},{"display_html":"pattern AsA :: t :~ c => c -> t","name":"AsA","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:AsA"},{"display_html":"class AsExt t where","name":"AsExt _Ext ExtraOf CoreOf","module":"HGeometry.Ext","link":"HGeometry-Ext.html#t:AsExt"},{"display_html":"asIndexedExt :: (Indexable i p, Functor f) => p (s :+ i) (f (t :+ j)) -> Indexed i s (f t)","name":"asIndexedExt","module":"HGeometry.Ext","link":"HGeometry-Ext.html#v:asIndexedExt"},{"display_html":"sortBy :: forall vector f a. (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a","name":"sortBy","module":"HGeometry.Foldable.Sort","link":"HGeometry-Foldable-Sort.html#v:sortBy"},{"display_html":"sort :: forall vector f a. (Foldable f, Vector vector a, Ord a) => f a -> vector a","name":"sort","module":"HGeometry.Foldable.Sort","link":"HGeometry-Foldable-Sort.html#v:sort"},{"display_html":"sortOnCheap :: forall vector f a b. (Foldable f, Vector vector a, Ord b) => (a -> b) -> f a -> vector a","name":"sortOnCheap","module":"HGeometry.Foldable.Sort","link":"HGeometry-Foldable-Sort.html#v:sortOnCheap"},{"display_html":"class HasFromFoldable f where","name":"HasFromFoldable fromList fromFoldable","module":"HGeometry.Foldable.Util","link":"HGeometry-Foldable-Util.html#t:HasFromFoldable"},{"display_html":"class HasFromFoldable1 f where","name":"HasFromFoldable1 fromNonEmpty fromFoldable1","module":"HGeometry.Foldable.Util","link":"HGeometry-Foldable-Util.html#t:HasFromFoldable1"},{"display_html":"class HasIndex a where","name":"HasIndex sosIndex","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#t:HasIndex"},{"display_html":"type Index = Int","name":"Index","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#t:Index"},{"display_html":"data WithIndex a = WithIndex !Index a","name":"WithIndex WithIndex","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#t:WithIndex"},{"display_html":"theValue :: Lens (WithIndex a) (WithIndex b) a b","name":"theValue","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:theValue"},{"display_html":"labelWithIndex :: Traversable t => t a -> t (WithIndex a)","name":"labelWithIndex","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:labelWithIndex"},{"display_html":"labelWith :: Traversable t => (Index -> a -> b) -> t a -> t b","name":"labelWith","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:labelWith"},{"display_html":"labelWith' :: forall t a b. Traversable t => (Index -> a -> b) -> t a -> (t b, Int)","name":"labelWith'","module":"HGeometry.Indexed","link":"HGeometry-Indexed.html#v:labelWith-39-"},{"display_html":"folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a","name":"folding1","module":"HGeometry.Lens.Util","link":"HGeometry-Lens-Util.html#v:folding1"},{"display_html":"ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) => (s -> f (i, a)) -> Over p g s t a b","name":"ifolding1","module":"HGeometry.Lens.Util","link":"HGeometry-Lens-Util.html#v:ifolding1"},{"display_html":"itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i, a)) s a -> s -> NonEmpty (i, a)","name":"itoNonEmptyOf","module":"HGeometry.Lens.Util","link":"HGeometry-Lens-Util.html#v:itoNonEmptyOf"},{"display_html":"data Zipper a = Zipper [a] [a]","name":"Zipper Zipper","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#t:Zipper"},{"display_html":"fromList :: [a] -> Zipper a","name":"fromList","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:fromList"},{"display_html":"goNext :: Zipper a -> Maybe (Zipper a)","name":"goNext","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:goNext"},{"display_html":"goPrev :: Zipper a -> Maybe (Zipper a)","name":"goPrev","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:goPrev"},{"display_html":"allNexts :: Zipper a -> [Zipper a]","name":"allNexts","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:allNexts"},{"display_html":"extractNext :: Zipper a -> Maybe (a, Zipper a)","name":"extractNext","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:extractNext"},{"display_html":"dropNext :: Zipper a -> Maybe (Zipper a)","name":"dropNext","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:dropNext"},{"display_html":"allNonEmptyNexts :: Zipper a -> [Zipper a]","name":"allNonEmptyNexts","module":"HGeometry.List.Zipper","link":"HGeometry-List-Zipper.html#v:allNonEmptyNexts"},{"display_html":"class Measured f a where","name":"Measured measure","module":"HGeometry.Measured.Class","link":"HGeometry-Measured-Class.html#t:Measured"},{"display_html":"class Measured f a => CanInsert f a where","name":"CanInsert insertMeasure","module":"HGeometry.Measured.Class","link":"HGeometry-Measured-Class.html#t:CanInsert"},{"display_html":"class Measured f a => CanDelete f a where","name":"CanDelete deleteMeasure","module":"HGeometry.Measured.Class","link":"HGeometry-Measured-Class.html#t:CanDelete"},{"display_html":"module HGeometry.Measured.Class","name":"","module":"HGeometry.Measured","link":""},{"display_html":"newtype Count a = Count Word","name":"Count Count","module":"HGeometry.Measured.Size","link":"HGeometry-Measured-Size.html#t:Count"},{"display_html":"data Sized a = Sized !(Count a) a","name":"Sized Sized","module":"HGeometry.Measured.Size","link":"HGeometry-Measured-Size.html#t:Sized"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a]","name":"extractMinimaBy","module":"HGeometry.NonEmpty.Util","link":"HGeometry-NonEmpty-Util.html#v:extractMinimaBy"},{"display_html":"leaveOutOne :: [a] -> [(a, [a])]","name":"leaveOutOne","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:leaveOutOne"},{"display_html":"minimumMaybe :: Ord a => [a] -> Maybe a","name":"minimumMaybe","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimumMaybe"},{"display_html":"maximumMaybe :: Ord a => [a] -> Maybe a","name":"maximumMaybe","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:maximumMaybe"},{"display_html":"minimumMaybeBy :: (a -> a -> Ordering) -> [a] -> Maybe a","name":"minimumMaybeBy","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimumMaybeBy"},{"display_html":"minimaOn :: Ord b => (a -> b) -> [a] -> [a]","name":"minimaOn","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimaOn"},{"display_html":"minimaBy :: (a -> a -> Ordering) -> [a] -> [a]","name":"minimaBy","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:minimaBy"},{"display_html":"extractMinimaBy :: (a -> a -> Ordering) -> [a] -> [a] :+ [a]","name":"extractMinimaBy","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:extractMinimaBy"},{"display_html":"partition3 :: Foldable f => (a -> Ordering) -> f a -> ([a], [a], [a])","name":"partition3","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:partition3"},{"display_html":"groupBy' :: (a -> a -> Ordering) -> [a] -> [NonEmpty a]","name":"groupBy'","module":"HGeometry.List.Util","link":"HGeometry-List-Util.html#v:groupBy-39-"},{"display_html":"class Num r => Radical r where","name":"Radical sqrt","module":"HGeometry.Number.Radical","link":"HGeometry-Number-Radical.html#t:Radical"},{"display_html":"data GRatio a","name":"GRatio","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#t:GRatio"},{"display_html":"(%) :: (Eq a, Num a) => a -> a -> GRatio a","name":"%","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#v:-37-"},{"display_html":"numerator :: GRatio a -> a","name":"numerator","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#v:numerator"},{"display_html":"denominator :: GRatio a -> a","name":"denominator","module":"HGeometry.Number.Ratio.Generalized","link":"HGeometry-Number-Ratio-Generalized.html#v:denominator"},{"display_html":"newtype RealNumber (p :: Nat) = RealNumber Rational","name":"RealNumber RealNumber","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#t:RealNumber"},{"display_html":"data AsFixed p","name":"AsFixed Exact Lossy","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#t:AsFixed"},{"display_html":"asFixed :: KnownNat p => RealNumber p -> AsFixed (NatPrec p)","name":"asFixed","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#v:asFixed"},{"display_html":"toFixed :: KnownNat p => RealNumber p -> Fixed (NatPrec p)","name":"toFixed","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#v:toFixed"},{"display_html":"fromFixed :: KnownNat p => Fixed (NatPrec p) -> RealNumber p","name":"fromFixed","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#v:fromFixed"},{"display_html":"type Nat = Natural","name":"Nat","module":"HGeometry.Number.Real.Rational","link":"HGeometry-Number-Real-Rational.html#t:Nat"},{"display_html":"newtype O (s :: Type) (a :: Type) = O {}","name":"O runO O","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#t:O"},{"display_html":"newtype OrdDict a = OrdDict {}","name":"OrdDict compare_ OrdDict","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#t:OrdDict"},{"display_html":"withOrd :: (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b","name":"withOrd","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:withOrd"},{"display_html":"extractOrd1 :: f (O s a) -> O s (f a)","name":"extractOrd1","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:extractOrd1"},{"display_html":"introOrd1 :: f a -> f (O s a)","name":"introOrd1","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:introOrd1"},{"display_html":"liftOrd1 :: (f (O s a) -> g (O s a)) -> f a -> O s (g a)","name":"liftOrd1","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:liftOrd1"},{"display_html":"extractOrd2 :: f (O s k) v -> O s (f k v)","name":"extractOrd2","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:extractOrd2"},{"display_html":"introOrd2 :: f k v -> f (O s k) v","name":"introOrd2","module":"HGeometry.Ord.Dynamic","link":"HGeometry-Ord-Dynamic.html#v:introOrd2"},{"display_html":"data Alternating f sep a = Alternating a (f (sep, a))","name":"Alternating Alternating","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#t:Alternating"},{"display_html":"fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a","name":"fromNonEmptyWith","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:fromNonEmptyWith"},{"display_html":"mapF :: (f (sep, a) -> g (sep', a)) -> Alternating f sep a -> Alternating g sep' a","name":"mapF","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:mapF"},{"display_html":"firstWithNeighbors :: Traversable f => (a -> sep -> a -> sep') -> Alternating f sep a -> Alternating f sep' a","name":"firstWithNeighbors","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:firstWithNeighbors"},{"display_html":"withNeighbours :: Foldable f => Alternating f sep a -> [(a, sep, a)]","name":"withNeighbours","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:withNeighbours"},{"display_html":"mergeAlternating :: Ord t => (t -> a -> b -> c) -> Alternating List t a -> Alternating List t b -> [(t, c)]","name":"mergeAlternating","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:mergeAlternating"},{"display_html":"insertBreakPoints :: Ord t => [t] -> Alternating List t a -> Alternating List t a","name":"insertBreakPoints","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:insertBreakPoints"},{"display_html":"reverse :: Alternating List b a -> Alternating List b a","name":"reverse","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:reverse"},{"display_html":"consElemWith :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> a -> Alternating f sep a -> Alternating f sep a","name":"consElemWith","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:consElemWith"},{"display_html":"unconsAlt :: Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a)","name":"unconsAlt","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:unconsAlt"},{"display_html":"snocElemWith :: Snoc (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> Alternating f sep a -> a -> Alternating f sep a","name":"snocElemWith","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:snocElemWith"},{"display_html":"separators :: Functor f => Alternating f sep a -> f sep","name":"separators","module":"HGeometry.Sequence.Alternating","link":"HGeometry-Sequence-Alternating.html#v:separators"},{"display_html":"data ViewL1 a = a :<< (Seq a)","name":"ViewL1 :<<","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#t:ViewL1"},{"display_html":"data ViewR1 a = (Seq a) :>> a","name":"ViewR1 :>>","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#t:ViewR1"},{"display_html":"viewl1 :: ViewR1 a -> ViewL1 a","name":"viewl1","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:viewl1"},{"display_html":"viewr1 :: ViewL1 a -> ViewR1 a","name":"viewr1","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:viewr1"},{"display_html":"(|>>) :: ViewR1 a -> a -> ViewR1 a","name":"|>>","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:-124--62--62-"},{"display_html":"(<>>) :: ViewR1 a -> Seq a -> ViewR1 a","name":"<>>","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:-60--62--62-"},{"display_html":"splitL1At :: Int -> ViewL1 a -> Maybe (Seq a, a, Seq a)","name":"splitL1At","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:splitL1At"},{"display_html":"splitR1At :: Int -> ViewR1 a -> Maybe (Seq a, a, Seq a)","name":"splitR1At","module":"HGeometry.Sequence.NonEmpty","link":"HGeometry-Sequence-NonEmpty.html#v:splitR1At"},{"display_html":"toggle :: Ord a => a -> Set a -> Set a","name":"toggle","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:toggle"},{"display_html":"splitOn :: Ord b => (a -> b) -> b -> Set a -> (Set a, Set a, Set a)","name":"splitOn","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:splitOn"},{"display_html":"splitBy :: (a -> Ordering) -> Set a -> (Set a, Set a, Set a)","name":"splitBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:splitBy"},{"display_html":"fromListBy :: (a -> a -> Ordering) -> [a] -> Set a","name":"fromListBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:fromListBy"},{"display_html":"join :: Set a -> Set a -> Set a","name":"join","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:join"},{"display_html":"insertBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"insertBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:insertBy"},{"display_html":"deleteAllBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"deleteAllBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:deleteAllBy"},{"display_html":"queryBy :: (a -> a -> Ordering) -> (forall b. Ord b => b -> Set b -> t b) -> a -> Set a -> t a","name":"queryBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:queryBy"},{"display_html":"toggleBy :: (a -> a -> Ordering) -> a -> Set a -> Set a","name":"toggleBy","module":"HGeometry.Set.Util","link":"HGeometry-Set-Util.html#v:toggleBy"},{"display_html":"data Sign","name":"Sign Positive Negative","module":"HGeometry.Sign","link":"HGeometry-Sign.html#t:Sign"},{"display_html":"flipSign :: Sign -> Sign","name":"flipSign","module":"HGeometry.Sign","link":"HGeometry-Sign.html#v:flipSign"},{"display_html":"signFromTerms :: (Num r, Eq r, Foldable1 f) => f r -> Maybe Sign","name":"signFromTerms","module":"HGeometry.Sign","link":"HGeometry-Sign.html#v:signFromTerms"},{"display_html":"data EpsFold i","name":"EpsFold","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:EpsFold"},{"display_html":"eps :: i -> EpsFold i","name":"eps","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:eps"},{"display_html":"mkEpsFold :: Ord i => [i] -> EpsFold i","name":"mkEpsFold","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:mkEpsFold"},{"display_html":"evalEps :: (Fractional r, Integral i, Integral j) => j -> r -> EpsFold i -> r","name":"evalEps","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:evalEps"},{"display_html":"hasNoPertubation :: EpsFold i -> Bool","name":"hasNoPertubation","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:hasNoPertubation"},{"display_html":"factors :: EpsFold i -> Bag i","name":"factors","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:factors"},{"display_html":"suitableBase :: EpsFold i -> Int","name":"suitableBase","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:suitableBase"},{"display_html":"data Term i r = Term !r (EpsFold i)","name":"Term Term","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:Term"},{"display_html":"term :: r -> i -> Term i r","name":"term","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:term"},{"display_html":"constantFactor :: Lens' (Term i r) r","name":"constantFactor","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:constantFactor"},{"display_html":"data Symbolic i r","name":"Symbolic","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:Symbolic"},{"display_html":"constant :: Ord i => r -> Symbolic i r","name":"constant","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:constant"},{"display_html":"symbolic :: Ord i => r -> i -> Symbolic i r","name":"symbolic","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:symbolic"},{"display_html":"perturb :: (Num r, Ord i) => r -> i -> Symbolic i r","name":"perturb","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:perturb"},{"display_html":"toTerms :: Symbolic i r -> [Term i r]","name":"toTerms","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:toTerms"},{"display_html":"signOf :: (Num r, Eq r) => Symbolic i r -> Maybe Sign","name":"signOf","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:signOf"},{"display_html":"roundToConstant :: Num r => Symbolic i r -> r","name":"roundToConstant","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:roundToConstant"},{"display_html":"type SoSRational i r = GRatio (Symbolic i r)","name":"SoSRational","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#t:SoSRational"},{"display_html":"sosRational :: (Ord i, Eq r, Num r) => Symbolic i r -> Symbolic i r -> SoSRational i r","name":"sosRational","module":"HGeometry.Number.Real.Symbolic","link":"HGeometry-Number-Real-Symbolic.html#v:sosRational"},{"display_html":"isSubStringOf :: (Eq a, Foldable p, Foldable t) => p a -> t a -> Maybe Int","name":"isSubStringOf","module":"HGeometry.StringSearch.KMP","link":"HGeometry-StringSearch-KMP.html#v:isSubStringOf"},{"display_html":"kmpMatch :: Eq a => Vector a -> Vector a -> Maybe Int","name":"kmpMatch","module":"HGeometry.StringSearch.KMP","link":"HGeometry-StringSearch-KMP.html#v:kmpMatch"},{"display_html":"buildFailureFunction :: forall a. Eq a => Vector a -> Vector Int","name":"buildFailureFunction","module":"HGeometry.StringSearch.KMP","link":"HGeometry-StringSearch-KMP.html#v:buildFailureFunction"},{"display_html":"data TreeNode v a","name":"TreeNode LeafNode InternalNode","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#t:TreeNode"},{"display_html":"_TreeNodeEither :: Iso' (TreeNode v p) (Either v p)","name":"_TreeNodeEither","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:_TreeNodeEither"},{"display_html":"data Zipper a = Zipper {}","name":"Zipper ancestors focus Zipper","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#t:Zipper"},{"display_html":"root :: Tree a -> Zipper a","name":"root","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:root"},{"display_html":"up :: Zipper a -> Maybe (Zipper a)","name":"up","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:up"},{"display_html":"firstChild :: Zipper a -> Maybe (Zipper a)","name":"firstChild","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:firstChild"},{"display_html":"nextSibling :: Zipper a -> Maybe (Zipper a)","name":"nextSibling","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:nextSibling"},{"display_html":"prevSibling :: Zipper a -> Maybe (Zipper a)","name":"prevSibling","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:prevSibling"},{"display_html":"allChildren :: Zipper a -> [Zipper a]","name":"allChildren","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:allChildren"},{"display_html":"allTrees :: Zipper a -> [Zipper a]","name":"allTrees","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:allTrees"},{"display_html":"unZipperLocal :: Zipper a -> Tree a","name":"unZipperLocal","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:unZipperLocal"},{"display_html":"constructTree :: [([Tree a], a, [Tree a])] -> Maybe (Tree a)","name":"constructTree","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:constructTree"},{"display_html":"findEvert :: (a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findEvert"},{"display_html":"findEvert' :: (Tree a -> Bool) -> Tree a -> Maybe (Tree a)","name":"findEvert'","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findEvert-39-"},{"display_html":"findPath :: (a -> Bool) -> (a -> Bool) -> Tree a -> Maybe [a]","name":"findPath","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findPath"},{"display_html":"findNode :: (a -> Bool) -> Tree a -> Maybe [a]","name":"findNode","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findNode"},{"display_html":"findNodes :: (Tree a -> Bool) -> Tree a -> [[a]]","name":"findNodes","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:findNodes"},{"display_html":"levels :: Tree a -> NonEmpty (NonEmpty a)","name":"levels","module":"HGeometry.Tree.Util","link":"HGeometry-Tree-Util.html#v:levels"},{"display_html":"data BinLeafTree v a","name":"BinLeafTree Node Leaf","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#t:BinLeafTree"},{"display_html":"node :: (Measured f a, Semigroup (f a)) => BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a","name":"node","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:node"},{"display_html":"asBalancedBinLeafTree :: Foldable1 f => f a -> BinLeafTree (Count a) a","name":"asBalancedBinLeafTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:asBalancedBinLeafTree"},{"display_html":"foldUp :: (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b","name":"foldUp","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:foldUp"},{"display_html":"foldUpData :: (w -> v -> w -> w) -> (a -> w) -> BinLeafTree v a -> BinLeafTree w a","name":"foldUpData","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:foldUpData"},{"display_html":"zipExactWith :: (u -> v -> w) -> (a -> b -> c) -> BinLeafTree u a -> BinLeafTree v b -> BinLeafTree w c","name":"zipExactWith","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:zipExactWith"},{"display_html":"toRoseTree :: BinLeafTree v a -> Tree (TreeNode v a)","name":"toRoseTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:toRoseTree"},{"display_html":"drawTree :: (Show v, Show a) => BinLeafTree v a -> String","name":"drawTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:drawTree"},{"display_html":"data BinaryTree a","name":"BinaryTree Internal Nil","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#t:BinaryTree"},{"display_html":"asBalancedBinTree :: forall f a. Foldable f => f a -> BinaryTree a","name":"asBalancedBinTree","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:asBalancedBinTree"},{"display_html":"access :: BinaryTree a -> Maybe a","name":"access","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:access"},{"display_html":"foldBinaryUp :: b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)","name":"foldBinaryUp","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:foldBinaryUp"},{"display_html":"toRoseTree' :: BinaryTree a -> Maybe (Tree a)","name":"toRoseTree'","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:toRoseTree-39-"},{"display_html":"drawTree' :: Show a => BinaryTree a -> String","name":"drawTree'","module":"HGeometry.Tree.Binary.Static","link":"HGeometry-Tree-Binary-Static.html#v:drawTree-39-"},{"display_html":"newtype Report a where","name":"Report Report MkReport","module":"HGeometry.Measured.Report","link":"HGeometry-Measured-Report.html#t:Report"},{"display_html":"newtype Report1 a = Report1 (BinLeafTree (Const () a) a)","name":"Report1 Report1","module":"HGeometry.Measured.Report","link":"HGeometry-Measured-Report.html#t:Report1"},{"display_html":"newtype ReportList a = ReportList [a]","name":"ReportList ReportList","module":"HGeometry.Measured.Report","link":"HGeometry-Measured-Report.html#t:ReportList"},{"display_html":"data Top a where","name":"Top ValT Top","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#t:Top"},{"display_html":"topToMaybe :: Top a -> Maybe a","name":"topToMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:topToMaybe"},{"display_html":"_ValT :: Prism (Top a) (Top b) a b","name":"_ValT","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_ValT"},{"display_html":"_Top :: Prism' (Top a) ()","name":"_Top","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_Top"},{"display_html":"_TopMaybe :: Iso' (Top a) (Maybe a)","name":"_TopMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_TopMaybe"},{"display_html":"data Bottom a where","name":"Bottom Bottom ValB","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#t:Bottom"},{"display_html":"bottomToMaybe :: Bottom a -> Maybe a","name":"bottomToMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:bottomToMaybe"},{"display_html":"_ValB :: Prism (Bottom a) (Bottom b) a b","name":"_ValB","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_ValB"},{"display_html":"_Bottom :: Prism' (Bottom a) ()","name":"_Bottom","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_Bottom"},{"display_html":"_BottomMaybe :: Iso' (Bottom a) (Maybe a)","name":"_BottomMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_BottomMaybe"},{"display_html":"data UnBounded a","name":"UnBounded MaxInfinity MinInfinity Val _unUnBounded","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#t:UnBounded"},{"display_html":"_Val :: Prism (UnBounded a) (UnBounded b) a b","name":"_Val","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:_Val"},{"display_html":"unBoundedToMaybe :: UnBounded a -> Maybe a","name":"unBoundedToMaybe","module":"HGeometry.Unbounded","link":"HGeometry-Unbounded.html#v:unBoundedToMaybe"},{"display_html":"data Permutation a = Permutation (NonEmptyVector (Orbit a)) (Vector (Int, Int))","name":"Permutation Permutation","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#t:Permutation"},{"display_html":"orbits :: Lens (Permutation a) (Permutation b) (NonEmptyVector (Orbit a)) (NonEmptyVector (Orbit b))","name":"orbits","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:orbits"},{"display_html":"indices :: (Indexable i p, Applicative f) => (i -> Bool) -> Optical' p (Indexed i) f a a","name":"indices","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:indices"},{"display_html":"type Orbit a = NonEmptyVector a","name":"Orbit","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#t:Orbit"},{"display_html":"elems :: Permutation a -> NonEmptyVector a","name":"elems","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:elems"},{"display_html":"size :: Permutation a -> Int","name":"size","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:size"},{"display_html":"cycleOf :: Enum a => Permutation a -> a -> Orbit a","name":"cycleOf","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:cycleOf"},{"display_html":"next :: NonEmptyVector a -> Int -> a","name":"next","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:next"},{"display_html":"previous :: NonEmptyVector a -> Int -> a","name":"previous","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:previous"},{"display_html":"lookupIdx :: Enum a => Permutation a -> a -> (Int, Int)","name":"lookupIdx","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:lookupIdx"},{"display_html":"apply :: Enum a => Permutation a -> a -> a","name":"apply","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:apply"},{"display_html":"orbitFrom :: Eq a => a -> (a -> a) -> NonEmpty a","name":"orbitFrom","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:orbitFrom"},{"display_html":"cycleRep :: (Enum a, Eq a) => NonEmptyVector a -> (a -> a) -> Permutation a","name":"cycleRep","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:cycleRep"},{"display_html":"toCycleRep :: Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a","name":"toCycleRep","module":"HGeometry.Permutation","link":"HGeometry-Permutation.html#v:toCycleRep"},{"display_html":"newtype Cyclic v a = Cyclic (v a)","name":"Cyclic Cyclic","module":"HGeometry.Cyclic","link":"HGeometry-Cyclic.html#t:Cyclic"},{"display_html":"class HasDirectedTraversals v where","name":"HasDirectedTraversals traverseRightFrom traverseLeftFrom","module":"HGeometry.Cyclic","link":"HGeometry-Cyclic.html#t:HasDirectedTraversals"},{"display_html":"class ShiftedEq t where","name":"ShiftedEq ElemCyclic isShiftOf","module":"HGeometry.Cyclic","link":"HGeometry-Cyclic.html#t:ShiftedEq"},{"display_html":"encodeYAML :: ToYAML a => a -> ByteString","name":"encodeYAML","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:encodeYAML"},{"display_html":"encodeYAMLFile :: ToYAML a => OsPath -> a -> IO ()","name":"encodeYAMLFile","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:encodeYAMLFile"},{"display_html":"decodeYAML :: FromYAML a => ByteString -> Either (Pos, String) a","name":"decodeYAML","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:decodeYAML"},{"display_html":"decodeYAMLFile :: FromYAML a => OsPath -> IO (Either (Pos, String) a)","name":"decodeYAMLFile","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:decodeYAMLFile"},{"display_html":"printYAML :: ToYAML a => a -> IO ()","name":"printYAML","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:printYAML"},{"display_html":"data Versioned a = Versioned Version a","name":"Versioned Versioned","module":"HGeometry.YAML","link":"HGeometry-YAML.html#t:Versioned"},{"display_html":"unversioned :: Versioned a -> a","name":"unversioned","module":"HGeometry.YAML","link":"HGeometry-YAML.html#v:unversioned"}] \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/hgeometry-combinatorial.haddock b/haddocks/hgeometry-combinatorial/hgeometry-combinatorial.haddock index 008fc3322..798d8fe3e 100644 Binary files a/haddocks/hgeometry-combinatorial/hgeometry-combinatorial.haddock and b/haddocks/hgeometry-combinatorial/hgeometry-combinatorial.haddock differ diff --git a/haddocks/hgeometry-combinatorial/quickcheck/src/HGeometry.Combinatorial.Instances.html b/haddocks/hgeometry-combinatorial/quickcheck/src/HGeometry.Combinatorial.Instances.html index 3e155ac93..44c5984eb 100644 --- a/haddocks/hgeometry-combinatorial/quickcheck/src/HGeometry.Combinatorial.Instances.html +++ b/haddocks/hgeometry-combinatorial/quickcheck/src/HGeometry.Combinatorial.Instances.html @@ -25,9 +25,9 @@ -------------------------------------------------------------------------------- -instance (Arbitrary c, Arbitrary e) => Arbitrary (c :+ e) where - arbitrary :: Gen (c :+ e) -arbitrary = c -> e -> c :+ e +instance (Arbitrary c, Arbitrary e) => Arbitrary (c :+ e) where + arbitrary :: Gen (c :+ e) +arbitrary = c -> e -> c :+ e forall core extra. core -> extra -> core :+ extra (:+) (c -> e -> c :+ e) -> Gen c -> Gen (e -> c :+ e) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -39,8 +39,8 @@ <*> Gen e forall a. Arbitrary a => Gen a arbitrary - shrink :: (c :+ e) -> [c :+ e] -shrink = (c :+ e) -> [c :+ e] + shrink :: (c :+ e) -> [c :+ e] +shrink = (c :+ e) -> [c :+ e] forall a. (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a] @@ -53,8 +53,8 @@ -- liftArbitrary gen = generateA (const gen) -- -- I think this instance is unreachable, so let's comment it for now. -instance (Arbitrary a, Num a, Eq a) => Arbitrary (GRatio a) where - arbitrary :: Gen (GRatio a) +instance (Arbitrary a, Num a, Eq a) => Arbitrary (GRatio a) where + arbitrary :: Gen (GRatio a) arbitrary = GRatio a -> GRatio a -> GRatio a forall a. Fractional a => a -> a -> a (/) (GRatio a -> GRatio a -> GRatio a) @@ -73,30 +73,30 @@ forall a. Eq a => a -> a -> Bool /= GRatio a 0)) - shrink :: GRatio a -> [GRatio a] -shrink GRatio a -r = GRatio a + shrink :: GRatio a -> [GRatio a] +shrink GRatio a +r = GRatio a 0 GRatio a -> [GRatio a] -> [GRatio a] forall a. a -> [a] -> [a] : GRatio a 1 GRatio a -> [GRatio a] -> [GRatio a] forall a. a -> [a] -> [a] : [ a -a' a -> a -> GRatio a +a' a -> a -> GRatio a forall a. (Eq a, Num a) => a -> a -> GRatio a % a -b' - | a -a' <- a -> [a] +b' + | a +a' <- a -> [a] forall a. Arbitrary a => a -> [a] shrink (a -> [a]) -> a -> [a] forall a b. (a -> b) -> a -> b $ GRatio a -> a forall a. GRatio a -> a numerator GRatio a -r - , a -b' <- Integer -> a +r + , a +b' <- Integer -> a forall a. Num a => Integer -> a fromInteger Integer 1 a -> [a] -> [a] @@ -106,16 +106,16 @@ shrink (GRatio a -> a forall a. GRatio a -> a denominator GRatio a -r) +r) , a -b' a -> a -> Bool +b' a -> a -> Bool forall a. Eq a => a -> a -> Bool /= a 0 ] -instance KnownNat p => Arbitrary (RealNumber p) where - arbitrary :: Gen (RealNumber p) +instance KnownNat p => Arbitrary (RealNumber p) where + arbitrary :: Gen (RealNumber p) arbitrary = Fixed (NatPrec p) -> RealNumber p forall (p :: Nat). KnownNat p => Fixed (NatPrec p) -> RealNumber p fromFixed (Fixed (NatPrec p) -> RealNumber p) @@ -124,18 +124,18 @@ <$> Gen (Fixed (NatPrec p)) forall a. Arbitrary a => Gen a arbitrary - shrink :: RealNumber p -> [RealNumber p] + shrink :: RealNumber p -> [RealNumber p] shrink = RealNumber p -> [RealNumber p] forall a. (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a] genericShrink -instance Arbitrary Sign.Sign where - arbitrary :: Gen Sign -arbitrary = (\Bool -b -> if Bool -b then Sign +instance Arbitrary Sign.Sign where + arbitrary :: Gen Sign +arbitrary = (\Bool +b -> if Bool +b then Sign Sign.Positive else Sign Sign.Negative) (Bool -> Sign) -> Gen Bool -> Gen Sign forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -161,19 +161,19 @@ -------------------------------------------------------------------------------- -- * Binary tree instances -instance (Arbitrary a, Arbitrary v) => Arbitrary (BinLeafTree v a) where - arbitrary :: Gen (BinLeafTree v a) +instance (Arbitrary a, Arbitrary v) => Arbitrary (BinLeafTree v a) where + arbitrary :: Gen (BinLeafTree v a) arbitrary = (Int -> Gen (BinLeafTree v a)) -> Gen (BinLeafTree v a) forall a. (Int -> Gen a) -> Gen a sized Int -> Gen (BinLeafTree v a) forall {t} {a} {v}. (Ord t, Num t, Random t, Arbitrary a, Arbitrary v) => t -> Gen (BinLeafTree v a) -f - where f :: t -> Gen (BinLeafTree v a) -f t -n | t -n t -> t -> Bool +f + where f :: t -> Gen (BinLeafTree v a) +f t +n | t +n t -> t -> Bool forall a. Ord a => a -> a -> Bool <= t 0 = a -> BinLeafTree v a @@ -185,12 +185,12 @@ arbitrary | Bool otherwise = do - t -l <- (t, t) -> Gen t + t +l <- (t, t) -> Gen t forall a. Random a => (a, a) -> Gen a choose (t 0,t -nt -> t -> t +nt -> t -> t forall a. Num a => a -> a -> a -t 1) @@ -202,8 +202,8 @@ -> Gen (v -> BinLeafTree v a -> BinLeafTree v a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> t -> Gen (BinLeafTree v a) -f t -l Gen (v -> BinLeafTree v a -> BinLeafTree v a) +f t +l Gen (v -> BinLeafTree v a -> BinLeafTree v a) -> Gen v -> Gen (BinLeafTree v a -> BinLeafTree v a) forall a b. Gen (a -> b) -> Gen a -> Gen b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b @@ -214,29 +214,29 @@ forall a b. Gen (a -> b) -> Gen a -> Gen b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> t -> Gen (BinLeafTree v a) -f (t -nt -> t -> t +f (t +nt -> t -> t forall a. Num a => a -> a -> a -t -lt -> t -> t +lt -> t -> t forall a. Num a => a -> a -> a -t 1) -- shrink = genericShrink -instance Arbitrary a => Arbitrary (BinaryTree a) where - arbitrary :: Gen (BinaryTree a) +instance Arbitrary a => Arbitrary (BinaryTree a) where + arbitrary :: Gen (BinaryTree a) arbitrary = (Int -> Gen (BinaryTree a)) -> Gen (BinaryTree a) forall a. (Int -> Gen a) -> Gen a sized Int -> Gen (BinaryTree a) forall {t} {a}. (Ord t, Num t, Random t, Arbitrary a) => t -> Gen (BinaryTree a) -f - where f :: t -> Gen (BinaryTree a) -f t -n | t -n t -> t -> Bool +f + where f :: t -> Gen (BinaryTree a) +f t +n | t +n t -> t -> Bool forall a. Ord a => a -> a -> Bool <= t 0 = BinaryTree a -> Gen (BinaryTree a) @@ -247,12 +247,12 @@ Nil | Bool otherwise = do - t -l <- (t, t) -> Gen t + t +l <- (t, t) -> Gen t forall a. Random a => (a, a) -> Gen a choose (t 0,t -nt -> t -> t +nt -> t -> t forall a. Num a => a -> a -> a -t 1) @@ -262,8 +262,8 @@ -> Gen (BinaryTree a) -> Gen (a -> BinaryTree a -> BinaryTree a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> t -> Gen (BinaryTree a) -f t -l Gen (a -> BinaryTree a -> BinaryTree a) +f t +l Gen (a -> BinaryTree a -> BinaryTree a) -> Gen a -> Gen (BinaryTree a -> BinaryTree a) forall a b. Gen (a -> b) -> Gen a -> Gen b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b @@ -274,11 +274,11 @@ forall a b. Gen (a -> b) -> Gen a -> Gen b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> t -> Gen (BinaryTree a) -f (t -nt -> t -> t +f (t +nt -> t -> t forall a. Num a => a -> a -> a -t -lt -> t -> t +lt -> t -> t forall a. Num a => a -> a -> a -t 1) diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.BinarySearch.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.BinarySearch.html index ad18402db..089cc2396 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.BinarySearch.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.BinarySearch.html @@ -45,45 +45,45 @@ -- running time: \(O(\log(u - l))\) {-# SPECIALIZE binarySearchFirst :: (Int -> Bool) -> Int -> Int -> Int #-} {-# SPECIALIZE binarySearchFirst :: (Word -> Bool) -> Word -> Word -> Word #-} -binarySearchFirst :: Integral a => (a -> Bool) -> a -> a -> a +binarySearchFirst :: Integral a => (a -> Bool) -> a -> a -> a binarySearchFirst :: forall a. Integral a => (a -> Bool) -> a -> a -> a -binarySearchFirst a -> Bool -p = a -> a -> a -go +binarySearchFirst a -> Bool +p = a -> a -> a +go where - go :: a -> a -> a -go a -l a -u = let d :: a -d = a -u a -> a -> a + go :: a -> a -> a +go a +l a +u = let d :: a +d = a +u a -> a -> a forall a. Num a => a -> a -> a - a -l - m :: a -m = a -l a -> a -> a +l + m :: a +m = a +l a -> a -> a forall a. Num a => a -> a -> a + (a -d a -> a -> a +d a -> a -> a forall a. Integral a => a -> a -> a `div` a 2) in if a -d a -> a -> Bool +d a -> a -> Bool forall a. Eq a => a -> a -> Bool == a 1 then a -u else if a -> Bool -p a -m then a -> a -> a -go a -l a -m +u else if a -> Bool +p a +m then a -> a -> a +go a +l a +m else a -> a -> a -go a -m a -u +go a +m a +u -- | Given a monotonic predicate p, a lower bound l, and an upper bound u, with: -- p l = False @@ -100,17 +100,17 @@ -- running time: \(O(\log(u - l))\) {-# SPECIALIZE binarySearchLast :: (Int -> Bool) -> Int -> Int -> Int #-} {-# SPECIALIZE binarySearchLast :: (Word -> Bool) -> Word -> Word -> Word #-} -binarySearchLast :: (Integral a) => (a -> Bool) -> a -> a -> a +binarySearchLast :: (Integral a) => (a -> Bool) -> a -> a -> a binarySearchLast :: forall a. Integral a => (a -> Bool) -> a -> a -> a -binarySearchLast a -> Bool -p a -l a -u = ((a -> Bool) -> a -> a -> a +binarySearchLast a -> Bool +p a +l a +u = ((a -> Bool) -> a -> a -> a forall a. Integral a => (a -> Bool) -> a -> a -> a binarySearchFirst a -> Bool -p a -l a -u) a -> a -> a +p a +l a +u) a -> a -> a forall a. Num a => a -> a -> a - a 1 @@ -135,46 +135,46 @@ -- 0.5625 -- >>> binarySearchUntil (0.01) (>= 0.51) 0 (1 :: Double) -- 0.515625 -binarySearchUntil :: (Fractional r, Ord r) - => r - -> (r -> Bool) -> r -> r -> r +binarySearchUntil :: (Fractional r, Ord r) + => r + -> (r -> Bool) -> r -> r -> r binarySearchUntil :: forall r. (Fractional r, Ord r) => r -> (r -> Bool) -> r -> r -> r -binarySearchUntil r -eps r -> Bool -p = r -> r -> r -go +binarySearchUntil r +eps r -> Bool +p = r -> r -> r +go where - go :: r -> r -> r -go r -l r -u | r -u r -> r -> r + go :: r -> r -> r +go r +l r +u | r +u r -> r -> r forall a. Num a => a -> a -> a - r -l r -> r -> Bool +l r -> r -> Bool forall a. Ord a => a -> a -> Bool < r -eps = r -u +eps = r +u | Bool -otherwise = let m :: r -m = (r -l r -> r -> r +otherwise = let m :: r +m = (r +l r -> r -> r forall a. Num a => a -> a -> a + r -u) r -> r -> r +u) r -> r -> r forall a. Fractional a => a -> a -> a / r 2 in if r -> Bool -p r -m then r -> r -> r -go r -l r -m else r -> r -> r -go r -m r -u +p r +m then r -> r -> r +go r +l r +m else r -> r -> r +go r +m r +u {-# INLINABLE binarySearchUntil #-} @@ -182,10 +182,10 @@ -- * Binary Searching in some data structure -- | Data type representing the result of a binary search -data BinarySearchResult a = AllTrue a - | FlipsAt a a -- ^ the last false elem and the first true elem - | AllFalse (Maybe a) -- ^ A maybe, since the collection may be empty - deriving (Int -> BinarySearchResult a -> ShowS +data BinarySearchResult a = AllTrue a + | FlipsAt a a -- ^ the last false elem and the first true elem + | AllFalse (Maybe a) -- ^ A maybe, since the collection may be empty + deriving (Int -> BinarySearchResult a -> ShowS [BinarySearchResult a] -> ShowS BinarySearchResult a -> String (Int -> BinarySearchResult a -> ShowS) @@ -203,7 +203,7 @@ show :: BinarySearchResult a -> String $cshowList :: forall a. Show a => [BinarySearchResult a] -> ShowS showList :: [BinarySearchResult a] -> ShowS -Show,BinarySearchResult a -> BinarySearchResult a -> Bool +Show,BinarySearchResult a -> BinarySearchResult a -> Bool (BinarySearchResult a -> BinarySearchResult a -> Bool) -> (BinarySearchResult a -> BinarySearchResult a -> Bool) -> Eq (BinarySearchResult a) @@ -219,7 +219,7 @@ Eq a => BinarySearchResult a -> BinarySearchResult a -> Bool /= :: BinarySearchResult a -> BinarySearchResult a -> Bool -Eq,(forall a b. +Eq,(forall a b. (a -> b) -> BinarySearchResult a -> BinarySearchResult b) -> (forall a b. a -> BinarySearchResult b -> BinarySearchResult a) -> Functor BinarySearchResult @@ -235,7 +235,7 @@ (a -> b) -> BinarySearchResult a -> BinarySearchResult b $c<$ :: forall a b. a -> BinarySearchResult b -> BinarySearchResult a <$ :: forall a b. a -> BinarySearchResult b -> BinarySearchResult a -Functor,(forall m. Monoid m => BinarySearchResult m -> m) +Functor,(forall m. Monoid m => BinarySearchResult m -> m) -> (forall m a. Monoid m => (a -> m) -> BinarySearchResult a -> m) -> (forall m a. Monoid m => (a -> m) -> BinarySearchResult a -> m) -> (forall a b. (a -> b -> b) -> b -> BinarySearchResult a -> b) @@ -317,7 +317,7 @@ sum :: forall a. Num a => BinarySearchResult a -> a $cproduct :: forall a. Num a => BinarySearchResult a -> a product :: forall a. Num a => BinarySearchResult a -> a -Foldable,Functor BinarySearchResult +Foldable,Functor BinarySearchResult Foldable BinarySearchResult (Functor BinarySearchResult, Foldable BinarySearchResult) => (forall (f :: * -> *) a b. @@ -390,50 +390,50 @@ -- AllFalse Nothing -> l -- _ -> r -firstTrue :: BinarySearchResult a -> Maybe a +firstTrue :: BinarySearchResult a -> Maybe a firstTrue :: forall a. BinarySearchResult a -> Maybe a firstTrue = \case - AllTrue a -x -> a -> Maybe a + AllTrue a +x -> a -> Maybe a forall a. a -> Maybe a Just a -x +x FlipsAt a -_ a -x -> a -> Maybe a +_ a +x -> a -> Maybe a forall a. a -> Maybe a Just a -x +x AllFalse Maybe a _ -> Maybe a forall a. Maybe a Nothing -lastFalse :: BinarySearchResult a -> Maybe a +lastFalse :: BinarySearchResult a -> Maybe a lastFalse :: forall a. BinarySearchResult a -> Maybe a lastFalse = \case AllTrue a _ -> Maybe a forall a. Maybe a Nothing - FlipsAt a -x a + FlipsAt a +x a _ -> a -> Maybe a forall a. a -> Maybe a Just a -x - AllFalse Maybe a -mx -> Maybe a -mx +x + AllFalse Maybe a +mx -> Maybe a +mx ---------------------------------------- -- | Containers storing elements on which we can binary search. -class BinarySearch v where +class BinarySearch v where -- | The type of the elements of the container - type Elem v :: Type + type Elem v :: Type -- | The type of indices used in the container. - type Index v :: Type + type Index v :: Type -- | Given a monotonic predicate p and a data structure v, find the pair of -- elements (v[h], v[h+1]) such that that @@ -444,7 +444,7 @@ -- -- running time: \(O(T*\log n)\), where \(T\) is the time to execute the -- predicate. - binarySearchIn :: (Elem v -> Bool) -> v -> BinarySearchResult (Elem v) + binarySearchIn :: (Elem v -> Bool) -> v -> BinarySearchResult (Elem v) -- | Given a monotonic predicate p and a data structure v, find the -- index h such that that @@ -454,7 +454,7 @@ -- -- running time: \(O(T*\log n)\), where \(T\) is the time to execute the -- predicate. - binarySearchIdxIn :: (Elem v -> Bool) -> v -> BinarySearchResult (Index v) + binarySearchIdxIn :: (Elem v -> Bool) -> v -> BinarySearchResult (Index v) ---------------------------------------- @@ -468,10 +468,10 @@ -- -- running time: \(O(T*\log n)\), where \(T\) is the time to execute the -- predicate. -binarySearchFirstIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) +binarySearchFirstIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) binarySearchFirstIn :: forall v. BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) -binarySearchFirstIn Elem v -> Bool -p = BinarySearchResult (Elem v) -> Maybe (Elem v) +binarySearchFirstIn Elem v -> Bool +p = BinarySearchResult (Elem v) -> Maybe (Elem v) forall a. BinarySearchResult a -> Maybe a firstTrue (BinarySearchResult (Elem v) -> Maybe (Elem v)) -> (v -> BinarySearchResult (Elem v)) -> v -> Maybe (Elem v) @@ -481,7 +481,7 @@ BinarySearch v => (Elem v -> Bool) -> v -> BinarySearchResult (Elem v) binarySearchIn Elem v -> Bool -p +p {-# INLINE binarySearchFirstIn #-} -- | Given a monotonic predicate p and a data structure v, find the @@ -494,12 +494,12 @@ -- -- running time: \(O(T*\log n)\), where \(T\) is the time to execute the -- predicate. -binarySearchFirstIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v) +binarySearchFirstIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v) binarySearchFirstIdxIn :: forall v. BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v) -binarySearchFirstIdxIn Elem v -> Bool -p = BinarySearchResult (Index v) -> Maybe (Index v) +binarySearchFirstIdxIn Elem v -> Bool +p = BinarySearchResult (Index v) -> Maybe (Index v) forall a. BinarySearchResult a -> Maybe a firstTrue (BinarySearchResult (Index v) -> Maybe (Index v)) -> (v -> BinarySearchResult (Index v)) -> v -> Maybe (Index v) @@ -509,7 +509,7 @@ BinarySearch v => (Elem v -> Bool) -> v -> BinarySearchResult (Index v) binarySearchIdxIn Elem v -> Bool -p +p {-# INLINE binarySearchFirstIdxIn #-} -- | Given a monotonic predicate p and a data structure v, find the @@ -522,10 +522,10 @@ -- -- running time: \(O(T*\log n)\), where \(T\) is the time to execute the -- predicate. -binarySearchLastIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) +binarySearchLastIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) binarySearchLastIn :: forall v. BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) -binarySearchLastIn Elem v -> Bool -p = BinarySearchResult (Elem v) -> Maybe (Elem v) +binarySearchLastIn Elem v -> Bool +p = BinarySearchResult (Elem v) -> Maybe (Elem v) forall a. BinarySearchResult a -> Maybe a lastFalse (BinarySearchResult (Elem v) -> Maybe (Elem v)) -> (v -> BinarySearchResult (Elem v)) -> v -> Maybe (Elem v) @@ -535,7 +535,7 @@ BinarySearch v => (Elem v -> Bool) -> v -> BinarySearchResult (Elem v) binarySearchIn Elem v -> Bool -p +p {-# INLINE binarySearchLastIn #-} -- | Given a monotonic predicate p and a data structure v, find the @@ -548,12 +548,12 @@ -- -- running time: \(O(T*\log n)\), where \(T\) is the time to execute the -- predicate. -binarySearchLastIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v) +binarySearchLastIdxIn :: BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v) binarySearchLastIdxIn :: forall v. BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Index v) -binarySearchLastIdxIn Elem v -> Bool -p = BinarySearchResult (Index v) -> Maybe (Index v) +binarySearchLastIdxIn Elem v -> Bool +p = BinarySearchResult (Index v) -> Maybe (Index v) forall a. BinarySearchResult a -> Maybe a lastFalse (BinarySearchResult (Index v) -> Maybe (Index v)) -> (v -> BinarySearchResult (Index v)) -> v -> Maybe (Index v) @@ -563,25 +563,25 @@ BinarySearch v => (Elem v -> Bool) -> v -> BinarySearchResult (Index v) binarySearchIdxIn Elem v -> Bool -p +p {-# INLINE binarySearchLastIdxIn #-} -------------------------------------------------------------------------------- -- * Searching on a Sequence -instance BinarySearch (Seq a) where - type Index (Seq a) = Int - type Elem (Seq a) = a +instance BinarySearch (Seq a) where + type Index (Seq a) = Int + type Elem (Seq a) = a -- ^ runs in \(O(T*\log^2 n)\) time. - binarySearchIn :: (Elem (Seq a) -> Bool) + binarySearchIn :: (Elem (Seq a) -> Bool) -> Seq a -> BinarySearchResult (Elem (Seq a)) -binarySearchIn Elem (Seq a) -> Bool -p Seq a -s = Seq a -> Int -> a +binarySearchIn Elem (Seq a) -> Bool +p Seq a +s = Seq a -> Int -> a forall a. Seq a -> Int -> a Seq.index Seq a -s (Int -> a) -> BinarySearchResult Int -> BinarySearchResult a +s (Int -> a) -> BinarySearchResult Int -> BinarySearchResult a forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (Elem (Seq a) -> Bool) -> Seq a -> BinarySearchResult (Index (Seq a)) @@ -589,19 +589,19 @@ BinarySearch v => (Elem v -> Bool) -> v -> BinarySearchResult (Index v) binarySearchIdxIn Elem (Seq a) -> Bool -p Seq a -s +p Seq a +s {-# INLINABLE binarySearchIn #-} -- ^ runs in \(O(T*\log^2 n)\) time. - binarySearchIdxIn :: (Elem (Seq a) -> Bool) + binarySearchIdxIn :: (Elem (Seq a) -> Bool) -> Seq a -> BinarySearchResult (Index (Seq a)) -binarySearchIdxIn Elem (Seq a) -> Bool -p Seq a -s = case Seq a -> ViewR a +binarySearchIdxIn Elem (Seq a) -> Bool +p Seq a +s = case Seq a -> ViewR a forall a. Seq a -> ViewR a Seq.viewr Seq a -s of +s of ViewR a EmptyR -> Maybe Int -> BinarySearchResult Int forall a. Maybe a -> BinarySearchResult a @@ -609,29 +609,29 @@ forall a. Maybe a Nothing (Seq a -_ :> a -x) | Elem (Seq a) -> Bool -p a +_ :> a +x) | Elem (Seq a) -> Bool +p a Elem (Seq a) -x -> case Seq a -> ViewL a +x -> case Seq a -> ViewL a forall a. Seq a -> ViewL a Seq.viewl Seq a -s of - (a -y :< Seq a +s of + (a +y :< Seq a _) | Elem (Seq a) -> Bool -p a +p a Elem (Seq a) -y -> Int -> BinarySearchResult Int +y -> Int -> BinarySearchResult Int forall a. a -> BinarySearchResult a AllTrue Int 0 ViewL a _ -> (Int -> Bool) -> Int -> Int -> BinarySearchResult Int binarySearch Int -> Bool -p' Int +p' Int 0 Int -u +u | Bool otherwise -> Maybe (Index (Seq a)) -> BinarySearchResult (Index (Seq a)) forall a. Maybe a -> BinarySearchResult a @@ -644,25 +644,25 @@ forall a. Seq a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Seq a -s Int -> Int -> Int +s Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1) where - p' :: Int -> Bool -p' = a -> Bool + p' :: Int -> Bool +p' = a -> Bool Elem (Seq a) -> Bool -p (a -> Bool) -> (Int -> a) -> Int -> Bool +p (a -> Bool) -> (Int -> a) -> Int -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . Seq a -> Int -> a forall a. Seq a -> Int -> a Seq.index Seq a -s - u :: Int -u = Seq a -> Int +s + u :: Int +u = Seq a -> Int forall a. Seq a -> Int Seq.length Seq a -s Int -> Int -> Int +s Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1 @@ -671,37 +671,37 @@ binarySearch :: (Int -> Bool) -> Int -> Int -> BinarySearchResult Int binarySearch :: (Int -> Bool) -> Int -> Int -> BinarySearchResult Int -binarySearch Int -> Bool -p Int -l Int -u = let h' :: Int -h' = (Int -> Bool) -> Int -> Int -> Int +binarySearch Int -> Bool +p Int +l Int +u = let h' :: Int +h' = (Int -> Bool) -> Int -> Int -> Int forall a. Integral a => (a -> Bool) -> a -> a -> a binarySearchFirst Int -> Bool -p Int -l Int -u +p Int +l Int +u in Int -> Int -> BinarySearchResult Int forall a. a -> a -> BinarySearchResult a FlipsAt (Int -h'Int -> Int -> Int +h'Int -> Int -> Int forall a. Num a => a -> a -> a -Int 1) Int -h' +h' -instance {-# OVERLAPPABLE #-} V.Vector v a => BinarySearch (v a) where - type Index (v a) = Int - type Elem (v a) = a +instance {-# OVERLAPPABLE #-} V.Vector v a => BinarySearch (v a) where + type Index (v a) = Int + type Elem (v a) = a - binarySearchIdxIn :: (Elem (v a) -> Bool) -> v a -> BinarySearchResult (Index (v a)) -binarySearchIdxIn Elem (v a) -> Bool -p' v a -v | v a -> Bool + binarySearchIdxIn :: (Elem (v a) -> Bool) -> v a -> BinarySearchResult (Index (v a)) +binarySearchIdxIn Elem (v a) -> Bool +p' v a +v | v a -> Bool forall (v :: * -> *) a. Vector v a => v a -> Bool V.null v a -v = Maybe Int -> BinarySearchResult Int +v = Maybe Int -> BinarySearchResult Int forall a. Maybe a -> BinarySearchResult a AllFalse Maybe Int forall a. Maybe a @@ -710,70 +710,70 @@ not (Bool -> Bool) -> Bool -> Bool forall a b. (a -> b) -> a -> b $ Int -> Bool -p Int -n' = Maybe Int -> BinarySearchResult Int +p Int +n' = Maybe Int -> BinarySearchResult Int forall a. Maybe a -> BinarySearchResult a AllFalse (Int -> Maybe Int forall a. a -> Maybe a Just Int -n') +n') | Bool otherwise = if Int -> Bool -p Int +p Int 0 then Int -> BinarySearchResult Int forall a. a -> BinarySearchResult a AllTrue Int 0 else (Int -> Bool) -> Int -> Int -> BinarySearchResult Int binarySearch Int -> Bool -p Int +p Int 0 Int -n' +n' where - n' :: Int -n' = v a -> Int + n' :: Int +n' = v a -> Int forall (v :: * -> *) a. Vector v a => v a -> Int V.length v a -v Int -> Int -> Int +v Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1 - p :: Int -> Bool -p = a -> Bool + p :: Int -> Bool +p = a -> Bool Elem (v a) -> Bool -p' (a -> Bool) -> (Int -> a) -> Int -> Bool +p' (a -> Bool) -> (Int -> a) -> Int -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . (v a -v V.!) +v V.!) {-# INLINABLE binarySearchIn #-} - binarySearchIn :: (Elem (v a) -> Bool) -> v a -> BinarySearchResult (Elem (v a)) -binarySearchIn Elem (v a) -> Bool -p v a -v = (v a -v V.!) (Int -> a) -> BinarySearchResult Int -> BinarySearchResult a + binarySearchIn :: (Elem (v a) -> Bool) -> v a -> BinarySearchResult (Elem (v a)) +binarySearchIn Elem (v a) -> Bool +p v a +v = (v a +v V.!) (Int -> a) -> BinarySearchResult Int -> BinarySearchResult a forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (Elem (v a) -> Bool) -> v a -> BinarySearchResult (Index (v a)) forall v. BinarySearch v => (Elem v -> Bool) -> v -> BinarySearchResult (Index v) binarySearchIdxIn Elem (v a) -> Bool -p v a -v +p v a +v {-# INLINABLE binarySearchIdxIn #-} -instance BinarySearch (Set a) where - type Index (Set a) = Int - type Elem (Set a) = a +instance BinarySearch (Set a) where + type Index (Set a) = Int + type Elem (Set a) = a - binarySearchIn :: (Elem (Set a) -> Bool) + binarySearchIn :: (Elem (Set a) -> Bool) -> Set a -> BinarySearchResult (Elem (Set a)) -binarySearchIn Elem (Set a) -> Bool -p = Set a -> BinarySearchResult a +binarySearchIn Elem (Set a) -> Bool +p = Set a -> BinarySearchResult a Set a -> BinarySearchResult (Elem (Set a)) -go +go where - go :: Set a -> BinarySearchResult a -go = \case + go :: Set a -> BinarySearchResult a +go = \case Set a Set.Tip -> Maybe a -> BinarySearchResult a forall a. Maybe a -> BinarySearchResult a @@ -781,54 +781,54 @@ forall a. Maybe a Nothing Set.Bin Int -_ a -k Set a -l Set a -r | Elem (Set a) -> Bool -p a +_ a +k Set a +l Set a +r | Elem (Set a) -> Bool +p a Elem (Set a) -k -> case Set a -> BinarySearchResult a -go Set a -l of +k -> case Set a -> BinarySearchResult a +go Set a +l of AllFalse Maybe a Nothing -> a -> BinarySearchResult a forall a. a -> BinarySearchResult a AllTrue a -k - AllFalse (Just a -x) -> a -> a -> BinarySearchResult a +k + AllFalse (Just a +x) -> a -> a -> BinarySearchResult a forall a. a -> a -> BinarySearchResult a FlipsAt a -x a -k - BinarySearchResult a -res -> BinarySearchResult a -res +x a +k + BinarySearchResult a +res -> BinarySearchResult a +res | Bool otherwise -> case Set a -> BinarySearchResult a -go Set a -r of +go Set a +r of AllFalse Maybe a Nothing -> Maybe a -> BinarySearchResult a forall a. Maybe a -> BinarySearchResult a AllFalse (a -> Maybe a forall a. a -> Maybe a Just a -k) - BinarySearchResult a -res -> BinarySearchResult a -res +k) + BinarySearchResult a +res -> BinarySearchResult a +res {-# INLINABLE binarySearchIn #-} - binarySearchIdxIn :: (Elem (Set a) -> Bool) + binarySearchIdxIn :: (Elem (Set a) -> Bool) -> Set a -> BinarySearchResult (Index (Set a)) -binarySearchIdxIn Elem (Set a) -> Bool -p = Set a -> BinarySearchResult Int +binarySearchIdxIn Elem (Set a) -> Bool +p = Set a -> BinarySearchResult Int Set a -> BinarySearchResult (Index (Set a)) -go +go where - go :: Set a -> BinarySearchResult Int -go = \case + go :: Set a -> BinarySearchResult Int +go = \case Set a Set.Tip -> Maybe Int -> BinarySearchResult Int forall a. Maybe a -> BinarySearchResult a @@ -836,44 +836,44 @@ forall a. Maybe a Nothing Set.Bin Int -_ a -k Set a -l Set a -r | Elem (Set a) -> Bool -p a +_ a +k Set a +l Set a +r | Elem (Set a) -> Bool +p a Elem (Set a) -k -> case Set a -> BinarySearchResult Int -go Set a -l of +k -> case Set a -> BinarySearchResult Int +go Set a +l of AllFalse Maybe Int Nothing -> Int -> BinarySearchResult Int forall a. a -> BinarySearchResult a AllTrue Int 0 - AllFalse (Just Int -h) -> Int -> Int -> BinarySearchResult Int + AllFalse (Just Int +h) -> Int -> Int -> BinarySearchResult Int forall a. a -> a -> BinarySearchResult a FlipsAt Int -h (Int -hInt -> Int -> Int +h (Int +hInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) - BinarySearchResult Int -res -> BinarySearchResult Int -res + BinarySearchResult Int +res -> BinarySearchResult Int +res | Bool -otherwise -> let h :: Int -h = Int +otherwise -> let h :: Int +h = Int 1 Int -> Int -> Int forall a. Num a => a -> a -> a + Set a -> Int forall a. Set a -> Int Set.size Set a -l +l in case Set a -> BinarySearchResult Int -go Set a -r of +go Set a +r of AllFalse Maybe Int Nothing -> Maybe Int -> BinarySearchResult Int forall a. Maybe a -> BinarySearchResult a @@ -883,15 +883,15 @@ $ Int -> Maybe Int forall a. a -> Maybe a Just Int -h - BinarySearchResult Int -res -> (Int -> Int -> Int +h + BinarySearchResult Int +res -> (Int -> Int -> Int forall a. Num a => a -> a -> a +Int -h) (Int -> Int) -> BinarySearchResult Int -> BinarySearchResult Int +h) (Int -> Int) -> BinarySearchResult Int -> BinarySearchResult Int forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> BinarySearchResult Int -res +res {-# INLINABLE binarySearchIdxIn #-} diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.DivideAndConquer.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.DivideAndConquer.html index 98e443a62..542598ef5 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.DivideAndConquer.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.DivideAndConquer.html @@ -30,7 +30,7 @@ -- where M(n) is the time corresponding to the semigroup operation of s on n elements. -- -- -divideAndConquer1 :: (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s +divideAndConquer1 :: (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s divideAndConquer1 :: forall (f :: * -> *) s a. (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s @@ -43,12 +43,12 @@ (<>) -- | Divide and conquer strategy. See 'divideAndConquer1'. -divideAndConquer :: (Foldable f, Monoid s) => (a -> s) -> f a -> s +divideAndConquer :: (Foldable f, Monoid s) => (a -> s) -> f a -> s divideAndConquer :: forall (f :: * -> *) s a. (Foldable f, Monoid s) => (a -> s) -> f a -> s -divideAndConquer a -> s -g = s -> (NonEmpty a -> s) -> Maybe (NonEmpty a) -> s +divideAndConquer a -> s +g = s -> (NonEmpty a -> s) -> Maybe (NonEmpty a) -> s forall b a. b -> (a -> b) -> Maybe a -> b maybe s forall a. Monoid a => a @@ -57,7 +57,7 @@ (Foldable1 f, Semigroup s) => (a -> s) -> f a -> s divideAndConquer1 a -> s -g) (Maybe (NonEmpty a) -> s) +g) (Maybe (NonEmpty a) -> s) -> (f a -> Maybe (NonEmpty a)) -> f a -> s forall b c a. (b -> c) -> (a -> b) -> a -> c . [a] -> Maybe (NonEmpty a) @@ -77,22 +77,22 @@ -- -- where M(n) is the time corresponding to the semigroup operation of s on n elements. -- -divideAndConquer1With :: Foldable1 f => (s -> s -> s) -> (a -> s) -> f a -> s +divideAndConquer1With :: Foldable1 f => (s -> s -> s) -> (a -> s) -> f a -> s divideAndConquer1With :: forall (f :: * -> *) s a. Foldable1 f => (s -> s -> s) -> (a -> s) -> f a -> s -divideAndConquer1With s -> s -> s -(<.>) a -> s -g = (NonEmpty s -> NonEmpty s) -> NonEmpty s -> s +divideAndConquer1With s -> s -> s +(<.>) a -> s +g = (NonEmpty s -> NonEmpty s) -> NonEmpty s -> s forall {a}. (NonEmpty a -> NonEmpty a) -> NonEmpty a -> a -repeatedly NonEmpty s -> NonEmpty s -merge (NonEmpty s -> s) -> (f a -> NonEmpty s) -> f a -> s +repeatedly NonEmpty s -> NonEmpty s +merge (NonEmpty s -> s) -> (f a -> NonEmpty s) -> f a -> s forall b c a. (b -> c) -> (a -> b) -> a -> c . (a -> s) -> NonEmpty a -> NonEmpty s forall a b. (a -> b) -> NonEmpty a -> NonEmpty b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> s -g (NonEmpty a -> NonEmpty s) +g (NonEmpty a -> NonEmpty s) -> (f a -> NonEmpty a) -> f a -> NonEmpty s forall b c a. (b -> c) -> (a -> b) -> a -> c . f a -> NonEmpty a @@ -100,54 +100,54 @@ forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty where - repeatedly :: (NonEmpty a -> NonEmpty a) -> NonEmpty a -> a -repeatedly NonEmpty a -> NonEmpty a -_ (a -t :| []) = a -t - repeatedly NonEmpty a -> NonEmpty a -f NonEmpty a -ts = (NonEmpty a -> NonEmpty a) -> NonEmpty a -> a -repeatedly NonEmpty a -> NonEmpty a -f (NonEmpty a -> a) -> NonEmpty a -> a + repeatedly :: (NonEmpty a -> NonEmpty a) -> NonEmpty a -> a +repeatedly NonEmpty a -> NonEmpty a +_ (a +t :| []) = a +t + repeatedly NonEmpty a -> NonEmpty a +f NonEmpty a +ts = (NonEmpty a -> NonEmpty a) -> NonEmpty a -> a +repeatedly NonEmpty a -> NonEmpty a +f (NonEmpty a -> a) -> NonEmpty a -> a forall a b. (a -> b) -> a -> b $ NonEmpty a -> NonEmpty a -f NonEmpty a -ts +f NonEmpty a +ts - merge :: NonEmpty s -> NonEmpty s -merge ts :: NonEmpty s -ts@(s + merge :: NonEmpty s -> NonEmpty s +merge ts :: NonEmpty s +ts@(s _ :| []) = NonEmpty s -ts - merge (s -l :| s -r : []) = s -l s -> s -> s -<.> s -r s -> [s] -> NonEmpty s +ts + merge (s +l :| s +r : []) = s +l s -> s -> s +<.> s +r s -> [s] -> NonEmpty s forall a. a -> [a] -> NonEmpty a :| [] - merge (s -l :| s -r : [s] -ts) = s -l s -> s -> s -<.> s -r s -> NonEmpty s -> NonEmpty s + merge (s +l :| s +r : [s] +ts) = s +l s -> s -> s +<.> s +r s -> NonEmpty s -> NonEmpty s forall a. a -> NonEmpty a -> NonEmpty a <| NonEmpty s -> NonEmpty s -merge ([s] -> NonEmpty s +merge ([s] -> NonEmpty s forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList [s] -ts) +ts) -------------------------------------------------------------------------------- -- * Merging NonEmpties/Sorted lists -- | Merges two sorted non-Empty lists in linear time. -mergeSorted :: Ord a => NonEmpty a -> NonEmpty a -> NonEmpty a +mergeSorted :: Ord a => NonEmpty a -> NonEmpty a -> NonEmpty a mergeSorted :: forall a. Ord a => NonEmpty a -> NonEmpty a -> NonEmpty a mergeSorted = (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a forall a. @@ -157,7 +157,7 @@ compare -- | Merges two sorted lists in linear time. -mergeSortedLists :: Ord a => [a] -> [a] -> [a] +mergeSortedLists :: Ord a => [a] -> [a] -> [a] mergeSortedLists :: forall a. Ord a => [a] -> [a] -> [a] mergeSortedLists = (a -> a -> Ordering) -> [a] -> [a] -> [a] forall a. (a -> a -> Ordering) -> [a] -> [a] -> [a] @@ -170,13 +170,13 @@ -- -- running time: \(O(n*T)\), where \(n\) is the length of the list, -- and \(T\) the time required to compare two elements. -mergeSortedBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a +mergeSortedBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a mergeSortedBy :: forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a -mergeSortedBy a -> a -> Ordering -cmp NonEmpty a -ls NonEmpty a -rs = [a] -> NonEmpty a +mergeSortedBy a -> a -> Ordering +cmp NonEmpty a +ls NonEmpty a +rs = [a] -> NonEmpty a forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList ([a] -> NonEmpty a) -> [a] -> NonEmpty a @@ -184,64 +184,64 @@ $ (a -> a -> Ordering) -> [a] -> [a] -> [a] forall a. (a -> a -> Ordering) -> [a] -> [a] -> [a] mergeSortedListsBy a -> a -> Ordering -cmp (NonEmpty a -> [a] +cmp (NonEmpty a -> [a] forall a. NonEmpty a -> [a] NonEmpty.toList NonEmpty a -ls) (NonEmpty a -> [a] +ls) (NonEmpty a -> [a] forall a. NonEmpty a -> [a] NonEmpty.toList NonEmpty a -rs) +rs) -- | Given an ordering and two nonempty sequences ordered according to that -- ordering, merge them -- -- running time: \(O(n*T)\), where \(n\) is the length of the list, -- and \(T\) the time required to compare two elements. -mergeSortedListsBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a] +mergeSortedListsBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a] mergeSortedListsBy :: forall a. (a -> a -> Ordering) -> [a] -> [a] -> [a] -mergeSortedListsBy a -> a -> Ordering -cmp = [a] -> [a] -> [a] -go +mergeSortedListsBy a -> a -> Ordering +cmp = [a] -> [a] -> [a] +go where - go :: [a] -> [a] -> [a] -go [] [a] -ys = [a] -ys - go [a] -xs [] = [a] -xs - go xs :: [a] -xs@(a -x:[a] -xs') ys :: [a] -ys@(a -y:[a] -ys') = case a -x a -> a -> Ordering -`cmp` a -y of + go :: [a] -> [a] -> [a] +go [] [a] +ys = [a] +ys + go [a] +xs [] = [a] +xs + go xs :: [a] +xs@(a +x:[a] +xs') ys :: [a] +ys@(a +y:[a] +ys') = case a +x a -> a -> Ordering +`cmp` a +y of Ordering LT -> a -x a -> [a] -> [a] +x a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -> [a] -> [a] -go [a] -xs' [a] -ys +go [a] +xs' [a] +ys Ordering EQ -> a -x a -> [a] -> [a] +x a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -> [a] -> [a] -go [a] -xs' [a] -ys +go [a] +xs' [a] +ys Ordering GT -> a -y a -> [a] -> [a] +y a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -> [a] -> [a] -go [a] -xs [a] -ys' +go [a] +xs [a] +ys' \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.LogarithmicMethod.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.LogarithmicMethod.html index 28c0b0c36..7f6216b48 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.LogarithmicMethod.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Algorithms.LogarithmicMethod.html @@ -26,8 +26,8 @@ -- -- In particular, we maintain \(O(\log n)\) static data structures of -- sizes \(2^i\), for \(i \in [0..c\log n]\). -newtype InsertionOnly static a = InsertionOnly [Maybe (static a)] - deriving (Int -> InsertionOnly static a -> ShowS +newtype InsertionOnly static a = InsertionOnly [Maybe (static a)] + deriving (Int -> InsertionOnly static a -> ShowS [InsertionOnly static a] -> ShowS InsertionOnly static a -> String (Int -> InsertionOnly static a -> ShowS) @@ -57,7 +57,7 @@ Show (static a) => [InsertionOnly static a] -> ShowS showList :: [InsertionOnly static a] -> ShowS -Show,InsertionOnly static a -> InsertionOnly static a -> Bool +Show,InsertionOnly static a -> InsertionOnly static a -> Bool (InsertionOnly static a -> InsertionOnly static a -> Bool) -> (InsertionOnly static a -> InsertionOnly static a -> Bool) -> Eq (InsertionOnly static a) @@ -73,7 +73,7 @@ Eq (static a) => InsertionOnly static a -> InsertionOnly static a -> Bool /= :: InsertionOnly static a -> InsertionOnly static a -> Bool -Eq,Eq (InsertionOnly static a) +Eq,Eq (InsertionOnly static a) Eq (InsertionOnly static a) => (InsertionOnly static a -> InsertionOnly static a -> Ordering) -> (InsertionOnly static a -> InsertionOnly static a -> Bool) @@ -147,19 +147,19 @@ Ord) -- | Builds an empty structure -empty :: InsertionOnly static a +empty :: InsertionOnly static a empty :: forall {k} (static :: k -> *) (a :: k). InsertionOnly static a empty = [Maybe (static a)] -> InsertionOnly static a forall {k} (static :: k -> *) (a :: k). [Maybe (static a)] -> InsertionOnly static a InsertionOnly [] -instance Functor static => Functor (InsertionOnly static) where - fmap :: forall a b. +instance Functor static => Functor (InsertionOnly static) where + fmap :: forall a b. (a -> b) -> InsertionOnly static a -> InsertionOnly static b -fmap a -> b -f (InsertionOnly [Maybe (static a)] -dss) = [Maybe (static b)] -> InsertionOnly static b +fmap a -> b +f (InsertionOnly [Maybe (static a)] +dss) = [Maybe (static b)] -> InsertionOnly static b forall {k} (static :: k -> *) (a :: k). [Maybe (static a)] -> InsertionOnly static a InsertionOnly ([Maybe (static b)] -> InsertionOnly static b) @@ -175,16 +175,16 @@ forall a b. (a -> b) -> static a -> static b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f)) [Maybe (static a)] -dss +f)) [Maybe (static a)] +dss -instance Traversable static => Traversable (InsertionOnly static) where - traverse :: forall (f :: * -> *) a b. +instance Traversable static => Traversable (InsertionOnly static) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> InsertionOnly static a -> f (InsertionOnly static b) -traverse a -> f b -f (InsertionOnly [Maybe (static a)] -dss) = [Maybe (static b)] -> InsertionOnly static b +traverse a -> f b +f (InsertionOnly [Maybe (static a)] +dss) = [Maybe (static b)] -> InsertionOnly static b forall {k} (static :: k -> *) (a :: k). [Maybe (static a)] -> InsertionOnly static a InsertionOnly ([Maybe (static b)] -> InsertionOnly static b) @@ -214,13 +214,13 @@ Applicative f => (a -> f b) -> static a -> f (static b) traverse a -> f b -f)) [Maybe (static a)] -dss +f)) [Maybe (static a)] +dss -instance Foldable static => Foldable (InsertionOnly static) where - foldMap :: forall m a. Monoid m => (a -> m) -> InsertionOnly static a -> m -foldMap a -> m -f = (static a -> m) -> InsertionOnly static a -> m +instance Foldable static => Foldable (InsertionOnly static) where + foldMap :: forall m a. Monoid m => (a -> m) -> InsertionOnly static a -> m +foldMap a -> m +f = (static a -> m) -> InsertionOnly static a -> m forall {k} m (static :: k -> *) (a :: k). Monoid m => (static a -> m) -> InsertionOnly static a -> m @@ -230,9 +230,9 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f) - length :: forall a. InsertionOnly static a -> Int -length = [Int] -> Int +f) + length :: forall a. InsertionOnly static a -> Int +length = [Int] -> Int forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a sum ([Int] -> Int) @@ -260,12 +260,12 @@ InsertionOnly static a -> [(i, Maybe (static a))] withSizes -instance LogarithmicMethodDS static a => Semigroup (InsertionOnly static a) where - (InsertionOnly [Maybe (static a)] -ds1) <> :: InsertionOnly static a +instance LogarithmicMethodDS static a => Semigroup (InsertionOnly static a) where + (InsertionOnly [Maybe (static a)] +ds1) <> :: InsertionOnly static a -> InsertionOnly static a -> InsertionOnly static a -<> (InsertionOnly [Maybe (static a)] -ds2) = [Maybe (static a)] -> InsertionOnly static a +<> (InsertionOnly [Maybe (static a)] +ds2) = [Maybe (static a)] -> InsertionOnly static a forall {k} (static :: k -> *) (a :: k). [Maybe (static a)] -> InsertionOnly static a InsertionOnly ([Maybe (static a)] -> InsertionOnly static a) @@ -288,13 +288,13 @@ runMergeWith Maybe (static a) forall a. Maybe a Nothing [Maybe (static a)] -ds1 Power +ds1 Power 0 [Maybe (static a)] -ds2 Power +ds2 Power 0 -instance LogarithmicMethodDS static a => Monoid (InsertionOnly static a) where - mempty :: InsertionOnly static a +instance LogarithmicMethodDS static a => Monoid (InsertionOnly static a) where + mempty :: InsertionOnly static a mempty = InsertionOnly static a forall {k} (static :: k -> *) (a :: k). InsertionOnly static a empty @@ -302,11 +302,11 @@ -- | Class representing data structures that can be constructed using -- the Logarithmic method. -class LogarithmicMethodDS static a where +class LogarithmicMethodDS static a where {-# MINIMAL build #-} -- | Create a new static data structure storing only one value. - singleton :: a -> static a - singleton = NonEmpty a -> static a + singleton :: a -> static a + singleton = NonEmpty a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => NonEmpty a -> static a @@ -317,15 +317,15 @@ :| []) -- | Given a NonEmpty list of a's build a static a. - build :: NonEmpty a -> static a + build :: NonEmpty a -> static a -- | Merges two structurs of the same size. Has a default -- implementation via build in case the static structure is Foldable1. - merge :: static a -> static a -> static a - default merge :: Foldable1 static => static a -> static a -> static a - merge static a -as static a -bs = NonEmpty a -> static a + merge :: static a -> static a -> static a + default merge :: Foldable1 static => static a -> static a -> static a + merge static a +as static a +bs = NonEmpty a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => NonEmpty a -> static a @@ -335,58 +335,58 @@ forall a. static a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty static a -as NonEmpty a -> NonEmpty a -> NonEmpty a +as NonEmpty a -> NonEmpty a -> NonEmpty a forall a. Semigroup a => a -> a -> a <> static a -> NonEmpty a forall a. static a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty static a -bs +bs type Power = Word -- | 2^h, for whatever value h. -pow2 :: Integral i => Power -> i +pow2 :: Integral i => Power -> i pow2 :: forall i. Integral i => Power -> i -pow2 Power -h = i +pow2 Power +h = i 2 i -> Power -> i forall a b. (Num a, Integral b) => a -> b -> a ^ Power -h +h -- | Annotate the data structures with their sizes -withSizes :: Integral i => InsertionOnly static a -> [(i,Maybe (static a))] +withSizes :: Integral i => InsertionOnly static a -> [(i,Maybe (static a))] withSizes :: forall {k} i (static :: k -> *) (a :: k). Integral i => InsertionOnly static a -> [(i, Maybe (static a))] -withSizes (InsertionOnly [Maybe (static a)] -dss) = (Power -> Maybe (static a) -> (i, Maybe (static a))) +withSizes (InsertionOnly [Maybe (static a)] +dss) = (Power -> Maybe (static a) -> (i, Maybe (static a))) -> [Power] -> [Maybe (static a)] -> [(i, Maybe (static a))] forall a b c. (a -> b -> c) -> [a] -> [b] -> [c] -zipWith (\Power -i Maybe (static a) -ds -> (Power -> i +zipWith (\Power +i Maybe (static a) +ds -> (Power -> i forall i. Integral i => Power -> i pow2 Power -i,Maybe (static a) -ds)) [Power +i,Maybe (static a) +ds)) [Power 0..] [Maybe (static a)] -dss +dss -- | Inserts an element into the data structure -- -- running time: \(O(M(n)\log n / n)\), where \(M(n)\) is the time -- required to merge two data structures of size \(n\). -insert :: LogarithmicMethodDS static a - => a -> InsertionOnly static a -> InsertionOnly static a +insert :: LogarithmicMethodDS static a + => a -> InsertionOnly static a -> InsertionOnly static a insert :: forall (static :: * -> *) a. LogarithmicMethodDS static a => a -> InsertionOnly static a -> InsertionOnly static a -insert a -x (InsertionOnly [Maybe (static a)] -dss) = [Maybe (static a)] -> InsertionOnly static a +insert a +x (InsertionOnly [Maybe (static a)] +dss) = [Maybe (static a)] -> InsertionOnly static a forall {k} (static :: k -> *) (a :: k). [Maybe (static a)] -> InsertionOnly static a InsertionOnly ([Maybe (static a)] -> InsertionOnly static a) @@ -403,60 +403,60 @@ LogarithmicMethodDS static a => a -> static a singleton a -x) Power +x) Power 0 Power 0 [Maybe (static a)] -dss +dss -- | Runs the merging procedure. If there are two data structures of -- the same size they are merged. -runMerge :: LogarithmicMethodDS static a - => static a -- ^ ds1 +runMerge :: LogarithmicMethodDS static a + => static a -- ^ ds1 -> Power -- ^ ds1 has size 2^i -> Power -- ^ the first entry in the next list corresponds to size 2^j - -> [Maybe (static a)] -> [Maybe (static a)] + -> [Maybe (static a)] -> [Maybe (static a)] runMerge :: forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> Power -> Power -> [Maybe (static a)] -> [Maybe (static a)] -runMerge static a -ds1 Power -i Power -j = \case +runMerge static a +ds1 Power +i Power +j = \case [] -> [static a -> Maybe (static a) forall a. a -> Maybe a Just static a -ds1] - dss :: [Maybe (static a)] -dss@(Maybe (static a) -Nothing : [Maybe (static a)] -dss') | Power -i Power -> Power -> Bool +ds1] + dss :: [Maybe (static a)] +dss@(Maybe (static a) +Nothing : [Maybe (static a)] +dss') | Power +i Power -> Power -> Bool forall a. Eq a => a -> a -> Bool == Power -j -> static a -> Maybe (static a) +j -> static a -> Maybe (static a) forall a. a -> Maybe a Just static a -ds1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +ds1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : [Maybe (static a)] -dss' -- replace +dss' -- replace | Bool otherwise -> static a -> Maybe (static a) forall a. a -> Maybe a Just static a -ds1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +ds1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : [Maybe (static a)] -dss -- cons - dss :: [Maybe (static a)] -dss@(Just static a -ds2 : [Maybe (static a)] -dss') | Power -i Power -> Power -> Bool +dss -- cons + dss :: [Maybe (static a)] +dss@(Just static a +ds2 : [Maybe (static a)] +dss') | Power +i Power -> Power -> Bool forall a. Eq a => a -> a -> Bool == Power -j -> Maybe (static a) +j -> Maybe (static a) forall a. Maybe a Nothing Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] @@ -467,41 +467,41 @@ static a -> Power -> Power -> [Maybe (static a)] -> [Maybe (static a)] runMerge (static a -ds1 static a -> static a -> static a +ds1 static a -> static a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> static a -> static a `merge` static a -ds2) (Power -iPower -> Power -> Power +ds2) (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) (Power -jPower -> Power -> Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -dss' +dss' | Bool otherwise -> static a -> Maybe (static a) forall a. a -> Maybe a Just static a -ds1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +ds1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : [Maybe (static a)] -dss -- cons -- I don't think insert can ever +dss -- cons -- I don't think insert can ever -- trigger this scenario. -- | merges two structures (potentially with a carry) -- -- invariant: size carry == size ds1 <= size ds2 -runMergeWith :: LogarithmicMethodDS static a - => Maybe (static a) -- ^ carry, if it exists - -> [Maybe (static a)] -> Power +runMergeWith :: LogarithmicMethodDS static a + => Maybe (static a) -- ^ carry, if it exists + -> [Maybe (static a)] -> Power -- ^ size of the first ds - -> [Maybe (static a)] -> Power + -> [Maybe (static a)] -> Power -- ^ size of the second ds - -> [Maybe (static a)] + -> [Maybe (static a)] runMergeWith :: forall (static :: * -> *) a. LogarithmicMethodDS static a => Maybe (static a) @@ -510,61 +510,61 @@ -> [Maybe (static a)] -> Power -> [Maybe (static a)] -runMergeWith Maybe (static a) -mc [Maybe (static a)] -ds1 Power -i [Maybe (static a)] -ds2 Power -j = case ([Maybe (static a)] -ds1,[Maybe (static a)] -ds2) of +runMergeWith Maybe (static a) +mc [Maybe (static a)] +ds1 Power +i [Maybe (static a)] +ds2 Power +j = case ([Maybe (static a)] +ds1,[Maybe (static a)] +ds2) of ([],[Maybe (static a)] _) -> case Maybe (static a) -mc of +mc of Maybe (static a) Nothing -> [Maybe (static a)] -ds2 - Just static a -c -> static a +ds2 + Just static a +c -> static a -> Power -> Power -> [Maybe (static a)] -> [Maybe (static a)] forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> Power -> Power -> [Maybe (static a)] -> [Maybe (static a)] runMerge static a -c Power -i Power -j [Maybe (static a)] -ds2 +c Power +i Power +j [Maybe (static a)] +ds2 ([Maybe (static a)] _,[]) -> case Maybe (static a) -mc of +mc of Maybe (static a) Nothing -> [Maybe (static a)] -ds1 - Just static a -c -> static a +ds1 + Just static a +c -> static a -> Power -> Power -> [Maybe (static a)] -> [Maybe (static a)] forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> Power -> Power -> [Maybe (static a)] -> [Maybe (static a)] runMerge static a -c Power -i Power -i [Maybe (static a)] -ds1 - (Maybe (static a) -m1:[Maybe (static a)] -ds1',Maybe (static a) -m2:[Maybe (static a)] -ds2') -> case (Maybe (static a) -m1,Maybe (static a) -m2) of +c Power +i Power +i [Maybe (static a)] +ds1 + (Maybe (static a) +m1:[Maybe (static a)] +ds1',Maybe (static a) +m2:[Maybe (static a)] +ds2') -> case (Maybe (static a) +m1,Maybe (static a) +m2) of (Maybe (static a) Nothing,Maybe (static a) Nothing) -> Maybe (static a) -mc Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +mc Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : Maybe (static a) -> [Maybe (static a)] @@ -583,27 +583,27 @@ runMergeWith Maybe (static a) forall a. Maybe a Nothing [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2' (Power -jPower -> Power -> Power +ds2' (Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) (Maybe (static a) -Nothing,Just static a -d2) -> case Maybe (static a) -mc of +Nothing,Just static a +d2) -> case Maybe (static a) +mc of Maybe (static a) Nothing | Power -i Power -> Power -> Bool +i Power -> Power -> Bool forall a. Eq a => a -> a -> Bool == Power -j -> Maybe (static a) -m2 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +j -> Maybe (static a) +m2 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : Maybe (static a) -> [Maybe (static a)] @@ -622,19 +622,19 @@ runMergeWith Maybe (static a) forall a. Maybe a Nothing [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2' (Power -jPower -> Power -> Power +ds2' (Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) | Bool otherwise -> Maybe (static a) -m1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +m1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : Maybe (static a) -> [Maybe (static a)] @@ -653,19 +653,19 @@ runMergeWith Maybe (static a) forall a. Maybe a Nothing [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2 Power -j - Just static a -c | Power -i Power -> Power -> Bool +ds2 Power +j + Just static a +c | Power +i Power -> Power -> Bool forall a. Eq a => a -> a -> Bool == Power -j -> Maybe (static a) +j -> Maybe (static a) forall a. Maybe a Nothing Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] @@ -688,25 +688,25 @@ Just (static a -> Maybe (static a)) -> static a -> Maybe (static a) forall a b. (a -> b) -> a -> b $ static a -c static a -> static a -> static a +c static a -> static a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> static a -> static a `merge` static a -d2) [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +d2) [Maybe (static a)] +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2' (Power -jPower -> Power -> Power +ds2' (Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) | Bool otherwise -> Maybe (static a) -mc Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +mc Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : Maybe (static a) -> [Maybe (static a)] @@ -725,22 +725,22 @@ runMergeWith Maybe (static a) forall a. Maybe a Nothing [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2 Power -j +ds2 Power +j -- i < j, so invariant (i+1) <= j again holds holds - (Just static a -d1,Maybe (static a) + (Just static a +d1,Maybe (static a) Nothing) -> case Maybe (static a) -mc of +mc of Maybe (static a) Nothing -> Maybe (static a) -m1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +m1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : Maybe (static a) -> [Maybe (static a)] @@ -759,18 +759,18 @@ runMergeWith Maybe (static a) forall a. Maybe a Nothing [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2' (Power -jPower -> Power -> Power +ds2' (Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) - Just static a -c -> Maybe (static a) + Just static a +c -> Maybe (static a) forall a. Maybe a Nothing Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] @@ -793,33 +793,33 @@ Just (static a -> Maybe (static a)) -> static a -> Maybe (static a) forall a b. (a -> b) -> a -> b $ static a -c static a -> static a -> static a +c static a -> static a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> static a -> static a `merge` static a -d1) [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +d1) [Maybe (static a)] +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2' (Power -jPower -> Power -> Power +ds2' (Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) - (Just static a -d1,Just static a -d2) -> case Maybe (static a) -mc of + (Just static a +d1,Just static a +d2) -> case Maybe (static a) +mc of Maybe (static a) Nothing | Power -i Power -> Power -> Bool +i Power -> Power -> Bool forall a. Eq a => a -> a -> Bool == Power -j -> Maybe (static a) +j -> Maybe (static a) forall a. Maybe a Nothing Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] @@ -842,25 +842,25 @@ Just (static a -> Maybe (static a)) -> static a -> Maybe (static a) forall a b. (a -> b) -> a -> b $ static a -d1 static a -> static a -> static a +d1 static a -> static a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> static a -> static a `merge` static a -d2) [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +d2) [Maybe (static a)] +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2' (Power -jPower -> Power -> Power +ds2' (Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) | Bool otherwise -> Maybe (static a) -m1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +m1 Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : Maybe (static a) -> [Maybe (static a)] @@ -879,21 +879,21 @@ runMergeWith Maybe (static a) forall a. Maybe a Nothing [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2 Power -j +ds2 Power +j - Just static a -c | Power -i Power -> Power -> Bool + Just static a +c | Power +i Power -> Power -> Bool forall a. Eq a => a -> a -> Bool == Power -j -> Maybe (static a) -mc Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] +j -> Maybe (static a) +mc Maybe (static a) -> [Maybe (static a)] -> [Maybe (static a)] forall a. a -> [a] -> [a] : Maybe (static a) -> [Maybe (static a)] @@ -914,19 +914,19 @@ Just (static a -> Maybe (static a)) -> static a -> Maybe (static a) forall a b. (a -> b) -> a -> b $ static a -d1 static a -> static a -> static a +d1 static a -> static a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> static a -> static a `merge` static a -d2) [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +d2) [Maybe (static a)] +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2' (Power -jPower -> Power -> Power +ds2' (Power +jPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) @@ -954,19 +954,19 @@ Just (static a -> Maybe (static a)) -> static a -> Maybe (static a) forall a b. (a -> b) -> a -> b $ static a -c static a -> static a -> static a +c static a -> static a -> static a forall (static :: * -> *) a. LogarithmicMethodDS static a => static a -> static a -> static a `merge` static a -d1) [Maybe (static a)] -ds1' (Power -iPower -> Power -> Power +d1) [Maybe (static a)] +ds1' (Power +iPower -> Power -> Power forall a. Num a => a -> a -> a +Power 1) [Maybe (static a)] -ds2 Power -j +ds2 Power +j -- i < j, so invariant holds -- | Given a decomposable query algorithm for the static structure, @@ -979,13 +979,13 @@ -- -- running time: \(O(Q(n)\log n)\), where \(Q(n)\) is the query time -- on the static structure. -queryWith :: Monoid m => (static a -> m) -> InsertionOnly static a -> m +queryWith :: Monoid m => (static a -> m) -> InsertionOnly static a -> m queryWith :: forall {k} m (static :: k -> *) (a :: k). Monoid m => (static a -> m) -> InsertionOnly static a -> m -queryWith static a -> m -query (InsertionOnly [Maybe (static a)] -dss) = (Maybe (static a) -> m) -> [Maybe (static a)] -> m +queryWith static a -> m +query (InsertionOnly [Maybe (static a)] +dss) = (Maybe (static a) -> m) -> [Maybe (static a)] -> m forall m a. Monoid m => (a -> m) -> [a] -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => @@ -996,6 +996,6 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap static a -> m -query) [Maybe (static a)] -dss +query) [Maybe (static a)] +dss \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.CircularList.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.CircularList.Util.html index ba74a2509..b4bd21599 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.CircularList.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.CircularList.Util.html @@ -39,7 +39,7 @@ -- fromList [5,6,10,20,30,1,2,3,4] -- >>> insertOrd 11 ordList -- fromList [5,6,10,11,20,30,1,2,3] -insertOrd :: Ord a => a -> C.CList a -> C.CList a +insertOrd :: Ord a => a -> C.CList a -> C.CList a insertOrd :: forall a. Ord a => a -> CList a -> CList a insertOrd = (a -> a -> Ordering) -> a -> CList a -> CList a forall a. (a -> a -> Ordering) -> a -> CList a -> CList a @@ -49,19 +49,19 @@ -- | Insert an element into an increasingly ordered circular list, with -- specified compare operator. -insertOrdBy :: (a -> a -> Ordering) -> a -> C.CList a -> C.CList a +insertOrdBy :: (a -> a -> Ordering) -> a -> C.CList a -> C.CList a insertOrdBy :: forall a. (a -> a -> Ordering) -> a -> CList a -> CList a -insertOrdBy a -> a -> Ordering -cmp a -x = [a] -> CList a +insertOrdBy a -> a -> Ordering +cmp a +x = [a] -> CList a forall a. [a] -> CList a C.fromList ([a] -> CList a) -> (CList a -> [a]) -> CList a -> CList a forall b c a. (b -> c) -> (a -> b) -> a -> c . (a -> a -> Ordering) -> a -> [a] -> [a] forall a. (a -> a -> Ordering) -> a -> [a] -> [a] insertOrdBy' a -> a -> Ordering -cmp a -x ([a] -> [a]) -> (CList a -> [a]) -> CList a -> [a] +cmp a +x ([a] -> [a]) -> (CList a -> [a]) -> CList a -> [a] forall b c a. (b -> c) -> (a -> b) -> a -> c . CList a -> [a] forall a. CList a -> [a] @@ -69,79 +69,79 @@ -- | List version of insertOrdBy; i.e. the list contains the elements in -- cirulcar order. Again produces a list that has the items in circular order. -insertOrdBy' :: (a -> a -> Ordering) -> a -> [a] -> [a] +insertOrdBy' :: (a -> a -> Ordering) -> a -> [a] -> [a] insertOrdBy' :: forall a. (a -> a -> Ordering) -> a -> [a] -> [a] -insertOrdBy' a -> a -> Ordering -cmp a -x [a] -xs = case [a] -> Maybe (NonEmpty a) +insertOrdBy' a -> a -> Ordering +cmp a +x [a] +xs = case [a] -> Maybe (NonEmpty a) forall a. [a] -> Maybe (NonEmpty a) NonEmpty.nonEmpty [a] -rest of +rest of Maybe (NonEmpty a) Nothing -> (a -> a -> Ordering) -> a -> [a] -> [a] forall a. (a -> a -> Ordering) -> a -> [a] -> [a] List.insertBy a -> a -> Ordering -cmp a -x [a] -pref - Just (a -z:|[a] -zs) -> case a -x a -> a -> Ordering -`cmp` a -z of +cmp a +x [a] +pref + Just (a +z:|[a] +zs) -> case a +x a -> a -> Ordering +`cmp` a +z of Ordering GT -> a -z a -> [a] -> [a] +z a -> [a] -> [a] forall a. a -> [a] -> [a] : (a -> a -> Ordering) -> a -> [a] -> [a] forall a. (a -> a -> Ordering) -> a -> [a] -> [a] List.insertBy a -> a -> Ordering -cmp a -x [a] -zs [a] -> [a] -> [a] +cmp a +x [a] +zs [a] -> [a] -> [a] forall a. [a] -> [a] -> [a] ++ [a] -pref +pref Ordering EQ -> a -x a -> [a] -> [a] +x a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -xs -- == x : rest ++ pref +xs -- == x : rest ++ pref Ordering LT -> [a] -rest [a] -> [a] -> [a] +rest [a] -> [a] -> [a] forall a. [a] -> [a] -> [a] ++ (a -> a -> Ordering) -> a -> [a] -> [a] forall a. (a -> a -> Ordering) -> a -> [a] -> [a] List.insertBy a -> a -> Ordering -cmp a -x [a] -pref +cmp a +x [a] +pref where -- split the list at its maximum. - ([a] -pref,[a] -rest) = (a -> a -> Ordering) -> [a] -> ([a], [a]) + ([a] +pref,[a] +rest) = (a -> a -> Ordering) -> [a] -> ([a], [a]) forall a. (a -> a -> Ordering) -> [a] -> ([a], [a]) splitIncr a -> a -> Ordering -cmp [a] -xs +cmp [a] +xs -- | Given a list of elements that is supposedly a a cyclic-shift of a list of -- increasing items, find the splitting point. I.e. returns a pair of lists -- (ys,zs) such that xs = zs ++ ys, and ys ++ zs is (supposedly) in sorted -- order. -splitIncr :: (a -> a -> Ordering) -> [a] -> ([a],[a]) +splitIncr :: (a -> a -> Ordering) -> [a] -> ([a],[a]) splitIncr :: forall a. (a -> a -> Ordering) -> [a] -> ([a], [a]) splitIncr a -> a -> Ordering _ [] = ([],[]) -splitIncr a -> a -> Ordering -cmp xs :: [a] -xs@(a -x:[a] +splitIncr a -> a -> Ordering +cmp xs :: [a] +xs@(a +x:[a] _) = ([a], [a]) -> ([a], [a]) forall a b. (a, b) -> (b, a) swap (([a], [a]) -> ([a], [a])) @@ -167,12 +167,12 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . ((a, a) -> Bool) -> [(a, a)] -> ([(a, a)], [(a, a)]) forall a. (a -> Bool) -> [a] -> ([a], [a]) -List.break (\(a -a,a -b) -> (a -a a -> a -> Ordering -`cmp` a -b) Ordering -> Ordering -> Bool +List.break (\(a +a,a +b) -> (a +a a -> a -> Ordering +`cmp` a +b) Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering GT) ([(a, a)] -> ([a], [a])) -> [(a, a)] -> ([a], [a]) @@ -180,41 +180,41 @@ $ [a] -> [a] -> [(a, a)] forall a b. [a] -> [b] -> [(a, b)] zip (a -xa -> [a] -> [a] +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -xs) [a] -xs +xs) [a] +xs -- | Test if the circular list is a cyclic shift of the second list. -- Running time: O(n), where n is the size of the smallest list -isShiftOf :: Eq a => C.CList a -> C.CList a -> Bool -CList a -xs isShiftOf :: forall a. Eq a => CList a -> CList a -> Bool -`isShiftOf` CList a -ys = let rest :: CList a -> [a] -rest = CList a -> [a] +isShiftOf :: Eq a => C.CList a -> C.CList a -> Bool +CList a +xs isShiftOf :: forall a. Eq a => CList a -> CList a -> Bool +`isShiftOf` CList a +ys = let rest :: CList a -> [a] +rest = CList a -> [a] forall a. CList a -> [a] C.leftElements in Bool -> (CList a -> Bool) -> Maybe (CList a) -> Bool forall b a. b -> (a -> b) -> Maybe a -> b maybe Bool -False (\CList a -xs' -> CList a -> [a] +False (\CList a +xs' -> CList a -> [a] forall a. CList a -> [a] -rest CList a -xs' [a] -> [a] -> Bool +rest CList a +xs' [a] -> [a] -> Bool forall a. Eq a => a -> a -> Bool == CList a -> [a] forall a. CList a -> [a] -rest CList a -ys) (Maybe (CList a) -> Bool) -> Maybe (CList a) -> Bool +rest CList a +ys) (Maybe (CList a) -> Bool) -> Maybe (CList a) -> Bool forall a b. (a -> b) -> a -> b $ CList a -> Maybe a forall a. CList a -> Maybe a C.focus CList a -ys Maybe a -> (a -> Maybe (CList a)) -> Maybe (CList a) +ys Maybe a -> (a -> Maybe (CList a)) -> Maybe (CList a) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= (a -> CList a -> Maybe (CList a)) @@ -223,5 +223,5 @@ flip a -> CList a -> Maybe (CList a) forall a. Eq a => a -> CList a -> Maybe (CList a) C.rotateTo CList a -xs +xs \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Combinatorial.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Combinatorial.Util.html index 0afabffb5..7983998a4 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Combinatorial.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Combinatorial.Util.html @@ -22,7 +22,7 @@ -- * Strict Triples -- | strict triple -data STR a b c = STR !a !b !c deriving (Int -> STR a b c -> ShowS +data STR a b c = STR !a !b !c deriving (Int -> STR a b c -> ShowS [STR a b c] -> ShowS STR a b c -> String (Int -> STR a b c -> ShowS) @@ -40,7 +40,7 @@ show :: STR a b c -> String $cshowList :: forall a b c. (Show a, Show b, Show c) => [STR a b c] -> ShowS showList :: [STR a b c] -> ShowS -Show,STR a b c -> STR a b c -> Bool +Show,STR a b c -> STR a b c -> Bool (STR a b c -> STR a b c -> Bool) -> (STR a b c -> STR a b c -> Bool) -> Eq (STR a b c) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -49,7 +49,7 @@ == :: STR a b c -> STR a b c -> Bool $c/= :: forall a b c. (Eq a, Eq b, Eq c) => STR a b c -> STR a b c -> Bool /= :: STR a b c -> STR a b c -> Bool -Eq,Eq (STR a b c) +Eq,Eq (STR a b c) Eq (STR a b c) => (STR a b c -> STR a b c -> Ordering) -> (STR a b c -> STR a b c -> Bool) @@ -110,7 +110,7 @@ (Ord a, Ord b, Ord c) => STR a b c -> STR a b c -> STR a b c min :: STR a b c -> STR a b c -> STR a b c -Ord,(forall a b. (a -> b) -> STR a b a -> STR a b b) +Ord,(forall a b. (a -> b) -> STR a b a -> STR a b b) -> (forall a b. a -> STR a b b -> STR a b a) -> Functor (STR a b) forall a b. a -> STR a b b -> STR a b a forall a b. (a -> b) -> STR a b a -> STR a b b @@ -123,7 +123,7 @@ fmap :: forall a b. (a -> b) -> STR a b a -> STR a b b $c<$ :: forall a b a b. a -> STR a b b -> STR a b a <$ :: forall a b. a -> STR a b b -> STR a b a -Functor,(forall x. STR a b c -> Rep (STR a b c) x) +Functor,(forall x. STR a b c -> Rep (STR a b c) x) -> (forall x. Rep (STR a b c) x -> STR a b c) -> Generic (STR a b c) forall x. Rep (STR a b c) x -> STR a b c @@ -138,33 +138,33 @@ to :: forall x. Rep (STR a b c) x -> STR a b c Generic) -instance (Semigroup a, Semigroup b, Semigroup c) => Semigroup (STR a b c) where - (STR a -a b -b c -c) <> :: STR a b c -> STR a b c -> STR a b c -<> (STR a -d b -e c -f) = a -> b -> c -> STR a b c +instance (Semigroup a, Semigroup b, Semigroup c) => Semigroup (STR a b c) where + (STR a +a b +b c +c) <> :: STR a b c -> STR a b c -> STR a b c +<> (STR a +d b +e c +f) = a -> b -> c -> STR a b c forall a b c. a -> b -> c -> STR a b c STR (a -a a -> a -> a +a a -> a -> a forall a. Semigroup a => a -> a -> a <> a -d) (b -b b -> b -> b +d) (b +b b -> b -> b forall a. Semigroup a => a -> a -> a <> b -e) (c -c c -> c -> c +e) (c +c c -> c -> c forall a. Semigroup a => a -> a -> a <> c -f) +f) -instance (Semigroup a, Semigroup b, Semigroup c - , Monoid a, Monoid b, Monoid c) => Monoid (STR a b c) where - mempty :: STR a b c +instance (Semigroup a, Semigroup b, Semigroup c + , Monoid a, Monoid b, Monoid c) => Monoid (STR a b c) where + mempty :: STR a b c mempty = a -> b -> c -> STR a b c forall a b c. a -> b -> c -> STR a b c STR a @@ -174,75 +174,75 @@ mempty c forall a. Monoid a => a mempty - mappend :: STR a b c -> STR a b c -> STR a b c + mappend :: STR a b c -> STR a b c -> STR a b c mappend = STR a b c -> STR a b c -> STR a b c forall a. Semigroup a => a -> a -> a (<>) -instance (NFData a, NFData b, NFData c) => NFData (STR a b c) +instance (NFData a, NFData b, NFData c) => NFData (STR a b c) -instance Field1 (STR a b c) (STR d b c) a d where - _1 :: Lens (STR a b c) (STR d b c) a d -_1 = (STR a b c -> a) +instance Field1 (STR a b c) (STR d b c) a d where + _1 :: Lens (STR a b c) (STR d b c) a d +_1 = (STR a b c -> a) -> (STR a b c -> d -> STR d b c) -> Lens (STR a b c) (STR d b c) a d forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(STR a -a b +lens (\(STR a +a b _ c _) -> a -a) (\(STR a -_ b -b c -c) d -d -> d -> b -> c -> STR d b c +a) (\(STR a +_ b +b c +c) d +d -> d -> b -> c -> STR d b c forall a b c. a -> b -> c -> STR a b c STR d -d b -b c -c) +d b +b c +c) -instance Field2 (STR a b c) (STR a d c) b d where - _2 :: Lens (STR a b c) (STR a d c) b d -_2 = (STR a b c -> b) +instance Field2 (STR a b c) (STR a d c) b d where + _2 :: Lens (STR a b c) (STR a d c) b d +_2 = (STR a b c -> b) -> (STR a b c -> d -> STR a d c) -> Lens (STR a b c) (STR a d c) b d forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(STR a -_ b -b c +_ b +b c _) -> b -b) (\(STR a -a b -_ c -c) d -d -> a -> d -> c -> STR a d c +b) (\(STR a +a b +_ c +c) d +d -> a -> d -> c -> STR a d c forall a b c. a -> b -> c -> STR a b c STR a -a d -d c -c) +a d +d c +c) -instance Field3 (STR a b c) (STR a b d) c d where - _3 :: Lens (STR a b c) (STR a b d) c d -_3 = (STR a b c -> c) +instance Field3 (STR a b c) (STR a b d) c d where + _3 :: Lens (STR a b c) (STR a b d) c d +_3 = (STR a b c -> c) -> (STR a b c -> d -> STR a b d) -> Lens (STR a b c) (STR a b d) c d forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(STR a _ b -_ c -c) -> c -c) (\(STR a -a b -b c -_) d -d -> a -> b -> d -> STR a b d +_ c +c) -> c +c) (\(STR a +a b +b c +_) d +d -> a -> b -> d -> STR a b d forall a b c. a -> b -> c -> STR a b c STR a -a b -b d -d) +a b +b d +d) -------------------------------------------------------------------------------- @@ -251,10 +251,10 @@ type Three = V3 -- | Pattern synonym for strict triples. -pattern Three :: a -> a -> a -> Three a +pattern Three :: a -> a -> a -> Three a pattern $bThree :: forall a. a -> a -> a -> Three a $mThree :: forall {r} {a}. Three a -> (a -> a -> a -> r) -> ((# #) -> r) -> r -Three a b c = V3 a b c +Three a b c = V3 a b c {-# COMPLETE Three #-} -- | Generate All unique unordered triplets. @@ -264,36 +264,36 @@ -- V3 'a' 'b' 'd' -- V3 'a' 'c' 'd' -- V3 'b' 'c' 'd' -uniqueTriplets :: Foldable f => f a -> [Three a] +uniqueTriplets :: Foldable f => f a -> [Three a] uniqueTriplets :: forall (f :: * -> *) a. Foldable f => f a -> [Three a] uniqueTriplets (f a -> [a] forall a. f a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] -F.toList -> [a] -xs) = +F.toList -> [a] +xs) = [ a -> a -> a -> Three a forall a. a -> a -> a -> Three a Three a -x a -y a -z | (a -x:[a] -ys) <- [a] -> [[a]] +x a +y a +z | (a +x:[a] +ys) <- [a] -> [[a]] forall a. [a] -> [[a]] nonEmptyTails [a] -xs, Two a -y a -z <- [a] -> [Two a] +xs, Two a +y a +z <- [a] -> [Two a] forall (f :: * -> *) a. Foldable f => f a -> [Two a] uniquePairs [a] -ys] +ys] -------------------------------------------------------------------------------- -- * Strict Pairs -- | Strict pair -data SP a b = SP !a !b deriving (Int -> SP a b -> ShowS +data SP a b = SP !a !b deriving (Int -> SP a b -> ShowS [SP a b] -> ShowS SP a b -> String (Int -> SP a b -> ShowS) @@ -309,7 +309,7 @@ show :: SP a b -> String $cshowList :: forall a b. (Show a, Show b) => [SP a b] -> ShowS showList :: [SP a b] -> ShowS -Show,SP a b -> SP a b -> Bool +Show,SP a b -> SP a b -> Bool (SP a b -> SP a b -> Bool) -> (SP a b -> SP a b -> Bool) -> Eq (SP a b) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -318,7 +318,7 @@ == :: SP a b -> SP a b -> Bool $c/= :: forall a b. (Eq a, Eq b) => SP a b -> SP a b -> Bool /= :: SP a b -> SP a b -> Bool -Eq,Eq (SP a b) +Eq,Eq (SP a b) Eq (SP a b) => (SP a b -> SP a b -> Ordering) -> (SP a b -> SP a b -> Bool) @@ -359,7 +359,7 @@ max :: SP a b -> SP a b -> SP a b $cmin :: forall a b. (Ord a, Ord b) => SP a b -> SP a b -> SP a b min :: SP a b -> SP a b -> SP a b -Ord,(forall a b. (a -> b) -> SP a a -> SP a b) +Ord,(forall a b. (a -> b) -> SP a a -> SP a b) -> (forall a b. a -> SP a b -> SP a a) -> Functor (SP a) forall a b. a -> SP a b -> SP a a forall a b. (a -> b) -> SP a a -> SP a b @@ -372,7 +372,7 @@ fmap :: forall a b. (a -> b) -> SP a a -> SP a b $c<$ :: forall a a b. a -> SP a b -> SP a a <$ :: forall a b. a -> SP a b -> SP a a -Functor,(forall x. SP a b -> Rep (SP a b) x) +Functor,(forall x. SP a b -> Rep (SP a b) x) -> (forall x. Rep (SP a b) x -> SP a b) -> Generic (SP a b) forall x. Rep (SP a b) x -> SP a b forall x. SP a b -> Rep (SP a b) x @@ -386,26 +386,26 @@ to :: forall x. Rep (SP a b) x -> SP a b Generic) -instance (Semigroup a, Semigroup b) => Semigroup (SP a b) where - (SP a -a b -b) <> :: SP a b -> SP a b -> SP a b -<> (SP a -c b -d) = a -> b -> SP a b +instance (Semigroup a, Semigroup b) => Semigroup (SP a b) where + (SP a +a b +b) <> :: SP a b -> SP a b -> SP a b +<> (SP a +c b +d) = a -> b -> SP a b forall a b. a -> b -> SP a b SP (a -a a -> a -> a +a a -> a -> a forall a. Semigroup a => a -> a -> a <> a -c) (b -b b -> b -> b +c) (b +b b -> b -> b forall a. Semigroup a => a -> a -> a <> b -d) +d) -instance (Semigroup a, Semigroup b, Monoid a, Monoid b) => Monoid (SP a b) where - mempty :: SP a b +instance (Semigroup a, Semigroup b, Monoid a, Monoid b) => Monoid (SP a b) where + mempty :: SP a b mempty = a -> b -> SP a b forall a b. a -> b -> SP a b SP a @@ -413,61 +413,61 @@ mempty b forall a. Monoid a => a mempty - mappend :: SP a b -> SP a b -> SP a b + mappend :: SP a b -> SP a b -> SP a b mappend = SP a b -> SP a b -> SP a b forall a. Semigroup a => a -> a -> a (<>) -instance (NFData a, NFData b) => NFData (SP a b) +instance (NFData a, NFData b) => NFData (SP a b) -instance Field1 (SP a b) (SP c b) a c where - _1 :: Lens (SP a b) (SP c b) a c +instance Field1 (SP a b) (SP c b) a c where + _1 :: Lens (SP a b) (SP c b) a c _1 = (SP a b -> a) -> (SP a b -> c -> SP c b) -> Lens (SP a b) (SP c b) a c forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(SP a -a b +lens (\(SP a +a b _) -> a -a) (\(SP a -_ b -b) c -c -> c -> b -> SP c b +a) (\(SP a +_ b +b) c +c -> c -> b -> SP c b forall a b. a -> b -> SP a b SP c -c b -b) +c b +b) -instance Field2 (SP a b) (SP a c) b c where - _2 :: Lens (SP a b) (SP a c) b c +instance Field2 (SP a b) (SP a c) b c where + _2 :: Lens (SP a b) (SP a c) b c _2 = (SP a b -> b) -> (SP a b -> c -> SP a c) -> Lens (SP a b) (SP a c) b c forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(SP a -_ b -b) -> b -b) (\(SP a -a b -_) c -c -> a -> c -> SP a c +_ b +b) -> b +b) (\(SP a +a b +_) c +c -> a -> c -> SP a c forall a b. a -> b -> SP a b SP a -a c -c) +a c +c) -instance Bifunctor SP where - bimap :: forall a b c d. (a -> b) -> (c -> d) -> SP a c -> SP b d -bimap a -> b -f c -> d -g (SP a -a c -b) = b -> d -> SP b d +instance Bifunctor SP where + bimap :: forall a b c d. (a -> b) -> (c -> d) -> SP a c -> SP b d +bimap a -> b +f c -> d +g (SP a +a c +b) = b -> d -> SP b d forall a b. a -> b -> SP a b SP (a -> b -f a -a) (c -> d -g c -b) +f a +a) (c -> d +g c +b) -------------------------------------------------------------------------------- -- | * Strict pair whose elements are of the same type. @@ -476,10 +476,10 @@ type Two = V2 -- | Pattern synonym for strict pairs. -pattern Two :: a -> a -> Two a +pattern Two :: a -> a -> Two a pattern $bTwo :: forall a. a -> a -> Two a $mTwo :: forall {r} {a}. Two a -> (a -> a -> r) -> ((# #) -> r) -> r -Two a b = V2 a b +Two a b = V2 a b {-# COMPLETE Two #-} -- | Given a list xs, generate all unique (unordered) pairs. @@ -495,29 +495,29 @@ -- V2 'c' 'd' -- V2 'c' 'e' -- V2 'd' 'e' -uniquePairs :: Foldable f => f a -> [Two a] +uniquePairs :: Foldable f => f a -> [Two a] uniquePairs :: forall (f :: * -> *) a. Foldable f => f a -> [Two a] uniquePairs (f a -> [a] forall a. f a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] -F.toList -> [a] -xs) = [ a -> a -> Two a +F.toList -> [a] +xs) = [ a -> a -> Two a forall a. a -> a -> Two a Two a -x a -y | (a -x:[a] -ys) <- [a] -> [[a]] +x a +y | (a +x:[a] +ys) <- [a] -> [[a]] forall a. [a] -> [[a]] nonEmptyTails [a] -xs, a -y <- [a] -ys ] +xs, a +y <- [a] +ys ] -------------------------------------------------------------------------------- -- | A version of List.tails in which we remove the emptylist -nonEmptyTails :: [a] -> [[a]] +nonEmptyTails :: [a] -> [[a]] nonEmptyTails :: forall a. [a] -> [[a]] nonEmptyTails = [[a]] -> [[a]] forall a. HasCallStack => [a] -> [a] diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Cyclic.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Cyclic.html index 055bb3a3c..fad289efb 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Cyclic.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Cyclic.html @@ -40,8 +40,8 @@ -------------------------------------------------------------------------------- -- | A cyclic sequence type -newtype Cyclic v a = Cyclic (v a) - deriving newtype ((forall a b. (a -> b) -> Cyclic v a -> Cyclic v b) +newtype Cyclic v a = Cyclic (v a) + deriving newtype ((forall a b. (a -> b) -> Cyclic v a -> Cyclic v b) -> (forall a b. a -> Cyclic v b -> Cyclic v a) -> Functor (Cyclic v) forall a b. a -> Cyclic v b -> Cyclic v a @@ -63,7 +63,7 @@ Functor v => a -> Cyclic v b -> Cyclic v a <$ :: forall a b. a -> Cyclic v b -> Cyclic v a -Functor,(forall m. Monoid m => Cyclic v m -> m) +Functor,(forall m. Monoid m => Cyclic v m -> m) -> (forall m a. Monoid m => (a -> m) -> Cyclic v a -> m) -> (forall m a. Monoid m => (a -> m) -> Cyclic v a -> m) -> (forall a b. (a -> b -> b) -> b -> Cyclic v a -> b) @@ -184,7 +184,7 @@ sum :: forall a. Num a => Cyclic v a -> a $cproduct :: forall (v :: * -> *) a. (Foldable v, Num a) => Cyclic v a -> a product :: forall a. Num a => Cyclic v a -> a -Foldable,Foldable (Cyclic v) +Foldable,Foldable (Cyclic v) Foldable (Cyclic v) => (forall m. Semigroup m => Cyclic v m -> m) -> (forall m a. Semigroup m => (a -> m) -> Cyclic v a -> m) @@ -275,13 +275,13 @@ Foldable1 v => (a -> b) -> (a -> b -> b) -> Cyclic v a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Cyclic v a -> b -Foldable1,Cyclic v a -> () +Foldable1,Cyclic v a -> () (Cyclic v a -> ()) -> NFData (Cyclic v a) forall a. (a -> ()) -> NFData a forall k (v :: k -> *) (a :: k). NFData (v a) => Cyclic v a -> () $crnf :: forall k (v :: k -> *) (a :: k). NFData (v a) => Cyclic v a -> () rnf :: Cyclic v a -> () -NFData,Cyclic v a -> Cyclic v a -> Bool +NFData,Cyclic v a -> Cyclic v a -> Bool (Cyclic v a -> Cyclic v a -> Bool) -> (Cyclic v a -> Cyclic v a -> Bool) -> Eq (Cyclic v a) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -296,7 +296,7 @@ Eq (v a) => Cyclic v a -> Cyclic v a -> Bool /= :: Cyclic v a -> Cyclic v a -> Bool -Eq,[Cyclic v a] -> Value +Eq,[Cyclic v a] -> Value [Cyclic v a] -> Encoding Cyclic v a -> Bool Cyclic v a -> Value @@ -345,7 +345,7 @@ toEncodingList :: [Cyclic v a] -> Encoding $comitField :: forall k (v :: k -> *) (a :: k). ToJSON (v a) => Cyclic v a -> Bool omitField :: Cyclic v a -> Bool -ToJSON,Maybe (Cyclic v a) +ToJSON,Maybe (Cyclic v a) Value -> Parser [Cyclic v a] Value -> Parser (Cyclic v a) (Value -> Parser (Cyclic v a)) @@ -377,7 +377,7 @@ Maybe (Cyclic v a) omittedField :: Maybe (Cyclic v a) FromJSON) - deriving stock ((forall x. Cyclic v a -> Rep (Cyclic v a) x) + deriving stock ((forall x. Cyclic v a -> Rep (Cyclic v a) x) -> (forall x. Rep (Cyclic v a) x -> Cyclic v a) -> Generic (Cyclic v a) forall x. Rep (Cyclic v a) x -> Cyclic v a @@ -394,13 +394,13 @@ -- not sure if we want this Eq instance or not . -instance Traversable1 v => Traversable1 (Cyclic v) where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 v => Traversable1 (Cyclic v) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Cyclic v a -> f (Cyclic v b) -traverse1 a -> f b -f (Cyclic v a -v) = v b -> Cyclic v b +traverse1 a -> f b +f (Cyclic v a +v) = v b -> Cyclic v b forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v b -> Cyclic v b) -> f (v b) -> f (Cyclic v b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -410,15 +410,15 @@ (a -> f b) -> t a -> f (t b) forall (f :: * -> *) a b. Apply f => (a -> f b) -> v a -> f (v b) traverse1 a -> f b -f v a -v -instance Traversable v => Traversable (Cyclic v) where - traverse :: forall (f :: * -> *) a b. +f v a +v +instance Traversable v => Traversable (Cyclic v) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Cyclic v a -> f (Cyclic v b) -traverse a -> f b -f (Cyclic v a -v) = v b -> Cyclic v b +traverse a -> f b +f (Cyclic v a +v) = v b -> Cyclic v b forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v b -> Cyclic v b) -> f (v b) -> f (Cyclic v b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -430,15 +430,15 @@ Applicative f => (a -> f b) -> v a -> f (v b) traverse a -> f b -f v a -v +f v a +v -instance FunctorWithIndex i v => FunctorWithIndex i (Cyclic v) where - imap :: forall a b. (i -> a -> b) -> Cyclic v a -> Cyclic v b -imap i -> a -> b -f (Cyclic v a -v) = v b -> Cyclic v b +instance FunctorWithIndex i v => FunctorWithIndex i (Cyclic v) where + imap :: forall a b. (i -> a -> b) -> Cyclic v a -> Cyclic v b +imap i -> a -> b +f (Cyclic v a +v) = v b -> Cyclic v b forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v b -> Cyclic v b) -> v b -> Cyclic v b forall a b. (a -> b) -> a -> b @@ -448,27 +448,27 @@ FunctorWithIndex i f => (i -> a -> b) -> f a -> f b imap i -> a -> b -f v a -v -instance FoldableWithIndex i v => FoldableWithIndex i (Cyclic v) where - ifoldMap :: forall m a. Monoid m => (i -> a -> m) -> Cyclic v a -> m -ifoldMap i -> a -> m -f (Cyclic v a -v) = (i -> a -> m) -> v a -> m +f v a +v +instance FoldableWithIndex i v => FoldableWithIndex i (Cyclic v) where + ifoldMap :: forall m a. Monoid m => (i -> a -> m) -> Cyclic v a -> m +ifoldMap i -> a -> m +f (Cyclic v a +v) = (i -> a -> m) -> v a -> m forall m a. Monoid m => (i -> a -> m) -> v a -> m forall i (f :: * -> *) m a. (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m ifoldMap i -> a -> m -f v a -v -instance TraversableWithIndex i v => TraversableWithIndex i (Cyclic v) where - itraverse :: forall (f :: * -> *) a b. +f v a +v +instance TraversableWithIndex i v => TraversableWithIndex i (Cyclic v) where + itraverse :: forall (f :: * -> *) a b. Applicative f => (i -> a -> f b) -> Cyclic v a -> f (Cyclic v b) -itraverse i -> a -> f b -f (Cyclic v a -v) = v b -> Cyclic v b +itraverse i -> a -> f b +f (Cyclic v a +v) = v b -> Cyclic v b forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v b -> Cyclic v b) -> f (v b) -> f (Cyclic v b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -480,12 +480,12 @@ Applicative f => (i -> a -> f b) -> v a -> f (v b) itraverse i -> a -> f b -f v a -v +f v a +v -instance HasFromFoldable v => HasFromFoldable (Cyclic v) where - fromFoldable :: forall (g :: * -> *) a. Foldable g => g a -> Cyclic v a -fromFoldable = v a -> Cyclic v a +instance HasFromFoldable v => HasFromFoldable (Cyclic v) where + fromFoldable :: forall (g :: * -> *) a. Foldable g => g a -> Cyclic v a +fromFoldable = v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> Cyclic v a) -> (g a -> v a) -> g a -> Cyclic v a forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -495,8 +495,8 @@ g a -> f a forall (g :: * -> *) a. Foldable g => g a -> v a fromFoldable - fromList :: forall a. [a] -> Cyclic v a -fromList = v a -> Cyclic v a + fromList :: forall a. [a] -> Cyclic v a +fromList = v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> Cyclic v a) -> ([a] -> v a) -> [a] -> Cyclic v a forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -505,9 +505,9 @@ forall (f :: * -> *) a. HasFromFoldable f => [a] -> f a fromList -instance HasFromFoldable1 v => HasFromFoldable1 (Cyclic v) where - fromFoldable1 :: forall (g :: * -> *) a. Foldable1 g => g a -> Cyclic v a -fromFoldable1 = v a -> Cyclic v a +instance HasFromFoldable1 v => HasFromFoldable1 (Cyclic v) where + fromFoldable1 :: forall (g :: * -> *) a. Foldable1 g => g a -> Cyclic v a +fromFoldable1 = v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> Cyclic v a) -> (g a -> v a) -> g a -> Cyclic v a forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -517,8 +517,8 @@ g a -> f a forall (g :: * -> *) a. Foldable1 g => g a -> v a fromFoldable1 - fromNonEmpty :: forall a. NonEmpty a -> Cyclic v a -fromNonEmpty = v a -> Cyclic v a + fromNonEmpty :: forall a. NonEmpty a -> Cyclic v a +fromNonEmpty = v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> Cyclic v a) -> (NonEmpty a -> v a) -> NonEmpty a -> Cyclic v a @@ -528,21 +528,21 @@ forall (f :: * -> *) a. HasFromFoldable1 f => NonEmpty a -> f a fromNonEmpty -type instance Index (Cyclic v a) = Index (v a) -type instance IxValue (Cyclic v a) = IxValue (v a) +type instance Index (Cyclic v a) = Index (v a) +type instance IxValue (Cyclic v a) = IxValue (v a) -instance (Index (v a) ~ Int, Foldable v, Ixed (v a)) => Ixed (Cyclic v a) where - ix :: Index (Cyclic v a) +instance (Index (v a) ~ Int, Foldable v, Ixed (v a)) => Ixed (Cyclic v a) where + ix :: Index (Cyclic v a) -> Traversal' (Cyclic v a) (IxValue (Cyclic v a)) -ix Index (Cyclic v a) -i = \IxValue (Cyclic v a) -> f (IxValue (Cyclic v a)) -f (Cyclic v a -v) -> let n :: Int -n = v a -> Int +ix Index (Cyclic v a) +i = \IxValue (Cyclic v a) -> f (IxValue (Cyclic v a)) +f (Cyclic v a +v) -> let n :: Int +n = v a -> Int forall a. v a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length v a -v +v in v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> Cyclic v a) -> f (v a) -> f (Cyclic v a) @@ -551,45 +551,45 @@ forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix (Int Index (Cyclic v a) -i Int -> Int -> Int +i Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n) IxValue (v a) -> f (IxValue (v a)) +n) IxValue (v a) -> f (IxValue (v a)) IxValue (Cyclic v a) -> f (IxValue (Cyclic v a)) -f v a -v +f v a +v -instance Reversing (v a) => Reversing (Cyclic v a) where - reversing :: Cyclic v a -> Cyclic v a -reversing (Cyclic v a -v) = v a -> Cyclic v a +instance Reversing (v a) => Reversing (Cyclic v a) where + reversing :: Cyclic v a -> Cyclic v a +reversing (Cyclic v a +v) = v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> v a forall t. Reversing t => t -> t reversing v a -v) +v) -- | Class that models that some type has a cyclic traversal starting -- from a particular index. -class HasDirectedTraversals v where +class HasDirectedTraversals v where -- | A rightward-traversal over all elements starting from the given one. -- -- running time : \(O(n)\) - traverseRightFrom :: Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a + traverseRightFrom :: Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a -- | A rightward-traversal over all elements starting from the given one. -- -- running time : \(O(n)\) - traverseLeftFrom :: Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a + traverseLeftFrom :: Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a -instance HasDirectedTraversals v => HasDirectedTraversals (Cyclic v) where - traverseRightFrom :: forall a. +instance HasDirectedTraversals v => HasDirectedTraversals (Cyclic v) where + traverseRightFrom :: forall a. Index (Cyclic v a) -> IndexedTraversal1' (Index (Cyclic v a)) (Cyclic v a) a -traverseRightFrom Index (Cyclic v a) -s p a (f a) -paFa (Cyclic v a -v) = v a -> Cyclic v a +traverseRightFrom Index (Cyclic v a) +s p a (f a) +paFa (Cyclic v a +v) = v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> Cyclic v a) -> f (v a) -> f (Cyclic v a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -600,16 +600,16 @@ Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a traverseRightFrom Index (v a) Index (Cyclic v a) -s p a (f a) -paFa v a -v - traverseLeftFrom :: forall a. +s p a (f a) +paFa v a +v + traverseLeftFrom :: forall a. Index (Cyclic v a) -> IndexedTraversal1' (Index (Cyclic v a)) (Cyclic v a) a -traverseLeftFrom Index (Cyclic v a) -s p a (f a) -paFa (Cyclic v a -v) = v a -> Cyclic v a +traverseLeftFrom Index (Cyclic v a) +s p a (f a) +paFa (Cyclic v a +v) = v a -> Cyclic v a forall {k} (v :: k -> *) (a :: k). v a -> Cyclic v a Cyclic (v a -> Cyclic v a) -> f (v a) -> f (Cyclic v a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -620,90 +620,90 @@ Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a traverseLeftFrom Index (v a) Index (Cyclic v a) -s p a (f a) -paFa v a -v +s p a (f a) +paFa v a +v instance HasDirectedTraversals NV.NonEmptyVector where - traverseRightFrom :: forall a. + traverseRightFrom :: forall a. Index (NonEmptyVector a) -> IndexedTraversal1' (Index (NonEmptyVector a)) (NonEmptyVector a) a -traverseRightFrom Index (NonEmptyVector a) -s p a (f a) -paFa NonEmptyVector a -v = NonEmpty Int -> IndexedTraversal1' Int (NonEmptyVector a) a +traverseRightFrom Index (NonEmptyVector a) +s p a (f a) +paFa NonEmptyVector a +v = NonEmpty Int -> IndexedTraversal1' Int (NonEmptyVector a) a forall a. NonEmpty Int -> IndexedTraversal1' Int (NonEmptyVector a) a traverseByOrder NonEmpty Int -indices' p a (f a) -paFa NonEmptyVector a -v +indices' p a (f a) +paFa NonEmptyVector a +v where - n :: Int -n = NonEmptyVector a -> Int + n :: Int +n = NonEmptyVector a -> Int forall a. NonEmptyVector a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length NonEmptyVector a -v - indices' :: NonEmpty Int -indices' = [Int] -> NonEmpty Int +v + indices' :: NonEmpty Int +indices' = [Int] -> NonEmpty Int forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList [Int Index (NonEmptyVector a) -s..(Int +s..(Int Index (NonEmptyVector a) -sInt -> Int -> Int +sInt -> Int -> Int forall a. Num a => a -> a -> a +Int -nInt -> Int -> Int +nInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1)] - traverseLeftFrom :: forall a. + traverseLeftFrom :: forall a. Index (NonEmptyVector a) -> IndexedTraversal1' (Index (NonEmptyVector a)) (NonEmptyVector a) a -traverseLeftFrom Index (NonEmptyVector a) -s p a (f a) -paFa NonEmptyVector a -v = NonEmpty Int -> IndexedTraversal1' Int (NonEmptyVector a) a +traverseLeftFrom Index (NonEmptyVector a) +s p a (f a) +paFa NonEmptyVector a +v = NonEmpty Int -> IndexedTraversal1' Int (NonEmptyVector a) a forall a. NonEmpty Int -> IndexedTraversal1' Int (NonEmptyVector a) a traverseByOrder NonEmpty Int -indices' p a (f a) -paFa NonEmptyVector a -v +indices' p a (f a) +paFa NonEmptyVector a +v where - n :: Int -n = NonEmptyVector a -> Int + n :: Int +n = NonEmptyVector a -> Int forall a. NonEmptyVector a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length NonEmptyVector a -v - indices' :: NonEmpty Int -indices' = [Int] -> NonEmpty Int +v + indices' :: NonEmpty Int +indices' = [Int] -> NonEmpty Int forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList [Int Index (NonEmptyVector a) -s,Int +s,Int Index (NonEmptyVector a) -sInt -> Int -> Int +sInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1..(Int Index (NonEmptyVector a) -sInt -> Int -> Int +sInt -> Int -> Int forall a. Num a => a -> a -> a -Int -nInt -> Int -> Int +nInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1)] -- | Helper to build traversal1's -wrapMaybeApply :: (Indexable Int p, Apply f) => p a (f b) -> p a (MaybeApply f b) +wrapMaybeApply :: (Indexable Int p, Apply f) => p a (f b) -> p a (MaybeApply f b) wrapMaybeApply :: forall (p :: * -> * -> *) (f :: * -> *) a b. (Indexable Int p, Apply f) => p a (f b) -> p a (MaybeApply f b) @@ -723,46 +723,46 @@ instance HasDirectedTraversals ViewL1 where - traverseRightFrom :: forall a. + traverseRightFrom :: forall a. Index (ViewL1 a) -> IndexedTraversal1' (Index (ViewL1 a)) (ViewL1 a) a -traverseRightFrom Index (ViewL1 a) -i = \p a (f a) -paFb ViewL1 a -xs -> let i' :: Int -i' = Int +traverseRightFrom Index (ViewL1 a) +i = \p a (f a) +paFb ViewL1 a +xs -> let i' :: Int +i' = Int Index (ViewL1 a) -i Int -> Int -> Int +i Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` ViewL1 a -> Int forall a. ViewL1 a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length ViewL1 a -xs - paFb' :: p a (MaybeApply f a) -paFb' = p a (f a) -> p a (MaybeApply f a) +xs + paFb' :: p a (MaybeApply f a) +paFb' = p a (f a) -> p a (MaybeApply f a) forall (p :: * -> * -> *) (f :: * -> *) a b. (Indexable Int p, Apply f) => p a (f b) -> p a (MaybeApply f b) wrapMaybeApply p a (f a) -paFb - combine :: ViewL1 a -> Seq a -> ViewL1 a -combine (a -x :<< Seq a -sa) Seq a -sb = a -x a -> Seq a -> ViewL1 a +paFb + combine :: ViewL1 a -> Seq a -> ViewL1 a +combine (a +x :<< Seq a +sa) Seq a +sb = a +x a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< (Seq a -sa Seq a -> Seq a -> Seq a +sa Seq a -> Seq a -> Seq a forall a. Semigroup a => a -> a -> a <> Seq a -sb) +sb) in case Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) forall a. Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) splitL1At Int -i' ViewL1 a -xs of +i' ViewL1 a +xs of Maybe (Seq a, a, Seq a) Nothing -> p a (f a) -> ViewL1 a -> f (ViewL1 a) forall (f :: * -> *) a b. @@ -770,14 +770,14 @@ IndexedTraversal1 Int (f a) (f b) a b IndexedTraversal1 Int (ViewL1 a) (ViewL1 a) a a traversed1 p a (f a) -paFb ViewL1 a -xs - Just (Seq a -pref,a -x,Seq a -suff) -> ViewL1 a -> Seq a -> ViewL1 a +paFb ViewL1 a +xs + Just (Seq a +pref,a +x,Seq a +suff) -> ViewL1 a -> Seq a -> ViewL1 a forall {a}. ViewL1 a -> Seq a -> ViewL1 a -combine (ViewL1 a -> Seq a -> ViewL1 a) +combine (ViewL1 a -> Seq a -> ViewL1 a) -> f (ViewL1 a) -> f (Seq a -> ViewL1 a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (Int -> Int) @@ -791,17 +791,17 @@ reindexed (Int -> Int -> Int forall a. Num a => a -> a -> a +Int -i') Indexed Int a (f a) -> ViewL1 a -> f (ViewL1 a) +i') Indexed Int a (f a) -> ViewL1 a -> f (ViewL1 a) forall (f :: * -> *) a b. Traversable1 f => IndexedTraversal1 Int (f a) (f b) a b IndexedTraversal1 Int (ViewL1 a) (ViewL1 a) a a traversed1 p a (f a) -paFb (a -x a -> Seq a -> ViewL1 a +paFb (a +x a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< Seq a -suff) +suff) f (Seq a -> ViewL1 a) -> MaybeApply f (Seq a) -> f (ViewL1 a) forall (f :: * -> *) a b. Apply f => @@ -812,50 +812,50 @@ IndexedTraversal i (t a) (t b) a b IndexedTraversal Int (Seq a) (Seq a) a a itraversed p a (MaybeApply f a) -paFb' Seq a -pref +paFb' Seq a +pref - traverseLeftFrom :: forall a. + traverseLeftFrom :: forall a. Index (ViewL1 a) -> IndexedTraversal1' (Index (ViewL1 a)) (ViewL1 a) a -traverseLeftFrom Index (ViewL1 a) -i = \p a (f a) -paFb ViewL1 a -xs -> - let i' :: Int -i' = Int +traverseLeftFrom Index (ViewL1 a) +i = \p a (f a) +paFb ViewL1 a +xs -> + let i' :: Int +i' = Int Index (ViewL1 a) -i Int -> Int -> Int +i Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` ViewL1 a -> Int forall a. ViewL1 a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length ViewL1 a -xs - paFb' :: p a (MaybeApply f a) -paFb' = p a (f a) -> p a (MaybeApply f a) +xs + paFb' :: p a (MaybeApply f a) +paFb' = p a (f a) -> p a (MaybeApply f a) forall (p :: * -> * -> *) (f :: * -> *) a b. (Indexable Int p, Apply f) => p a (f b) -> p a (MaybeApply f b) wrapMaybeApply p a (f a) -paFb - combine :: ViewR1 a -> Seq a -> ViewL1 a -combine ViewR1 a -r1 Seq a -rs = ViewR1 a -> ViewL1 a +paFb + combine :: ViewR1 a -> Seq a -> ViewL1 a +combine ViewR1 a +r1 Seq a +rs = ViewR1 a -> ViewL1 a forall a. ViewR1 a -> ViewL1 a viewl1 (ViewR1 a -> ViewL1 a) -> ViewR1 a -> ViewL1 a forall a b. (a -> b) -> a -> b $ ViewR1 a -r1 ViewR1 a -> Seq a -> ViewR1 a +r1 ViewR1 a -> Seq a -> ViewR1 a forall a. ViewR1 a -> Seq a -> ViewR1 a <>> Seq a -rs +rs in case Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) forall a. Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) splitL1At Int -i' ViewL1 a -xs of +i' ViewL1 a +xs of Maybe (Seq a, a, Seq a) Nothing -> Optical p (->) (Backwards f) (ViewL1 a) (ViewL1 a) a a -> p a (f a) -> ViewL1 a -> f (ViewL1 a) @@ -868,14 +868,14 @@ IndexedTraversal1 Int (f a) (f b) a b IndexedTraversal1 Int (ViewL1 a) (ViewL1 a) a a traversed1 p a (f a) -paFb ViewL1 a -xs - Just (Seq a -pref,a -x,Seq a -suff) -> ViewR1 a -> Seq a -> ViewL1 a +paFb ViewL1 a +xs + Just (Seq a +pref,a +x,Seq a +suff) -> ViewR1 a -> Seq a -> ViewL1 a forall {a}. ViewR1 a -> Seq a -> ViewL1 a -combine (ViewR1 a -> Seq a -> ViewL1 a) +combine (ViewR1 a -> Seq a -> ViewL1 a) -> f (ViewR1 a) -> f (Seq a -> ViewL1 a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Optical p (->) (Backwards f) (ViewR1 a) (ViewR1 a) a a @@ -889,11 +889,11 @@ IndexedTraversal1 Int (f a) (f b) a b IndexedTraversal1 Int (ViewR1 a) (ViewR1 a) a a traversed1 p a (f a) -paFb (Seq a -pref Seq a -> a -> ViewR1 a +paFb (Seq a +pref Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -x) +x) f (Seq a -> ViewL1 a) -> MaybeApply f (Seq a) -> f (ViewL1 a) forall (f :: * -> *) a b. Apply f => @@ -910,15 +910,15 @@ forall j (p :: * -> * -> *) i a b r. Indexable j p => (i -> j) -> (Indexed i a b -> r) -> p a b -> r -reindexed (\Int -j -> Int +reindexed (\Int +j -> Int 1 Int -> Int -> Int forall a. Num a => a -> a -> a + Int -i' Int -> Int -> Int +i' Int -> Int -> Int forall a. Num a => a -> a -> a + Int -j) Indexed Int a (Backwards (MaybeApply f) a) +j) Indexed Int a (Backwards (MaybeApply f) a) -> Seq a -> Backwards (MaybeApply f) (Seq a) forall i (t :: * -> *) a b. TraversableWithIndex i t => @@ -926,47 +926,47 @@ IndexedTraversal Int (Seq a) (Seq a) a a itraversed) p a (MaybeApply f a) -paFb' Seq a -suff +paFb' Seq a +suff -- | traverse the vector in the given order -traverseByOrder :: NonEmpty.NonEmpty Int - -> IndexedTraversal1' Int (NV.NonEmptyVector a) a +traverseByOrder :: NonEmpty.NonEmpty Int + -> IndexedTraversal1' Int (NV.NonEmptyVector a) a traverseByOrder :: forall a. NonEmpty Int -> IndexedTraversal1' Int (NonEmptyVector a) a -traverseByOrder NonEmpty Int -indices' p a (f a) -paFa NonEmptyVector a -v = NonEmpty (Int, a) -> NonEmptyVector a -build (NonEmpty (Int, a) -> NonEmptyVector a) +traverseByOrder NonEmpty Int +indices' p a (f a) +paFa NonEmptyVector a +v = NonEmpty (Int, a) -> NonEmptyVector a +build (NonEmpty (Int, a) -> NonEmptyVector a) -> f (NonEmpty (Int, a)) -> f (NonEmptyVector a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> f (NonEmpty (Int, a)) -xs +xs where - n :: Int -n = NonEmptyVector a -> Int + n :: Int +n = NonEmptyVector a -> Int forall a. NonEmptyVector a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length NonEmptyVector a -v - xs :: f (NonEmpty (Int, a)) -xs = (Int -> f (Int, a)) -> NonEmpty Int -> f (NonEmpty (Int, a)) +v + xs :: f (NonEmpty (Int, a)) +xs = (Int -> f (Int, a)) -> NonEmpty Int -> f (NonEmpty (Int, a)) forall (t :: * -> *) (f :: * -> *) a b. (Traversable1 t, Apply f) => (a -> f b) -> t a -> f (t b) forall (f :: * -> *) a b. Apply f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) -traverse1 (\Int -i' -> let i :: Int -i = Int -i' Int -> Int -> Int +traverse1 (\Int +i' -> let i :: Int +i = Int +i' Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n +n in (Int -i,) (a -> (Int, a)) -> f a -> f (Int, a) +i,) (a -> (Int, a)) -> f a -> f (Int, a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p a (f a) -> Int -> a -> f a forall a b. p a b -> Int -> a -> b @@ -974,17 +974,17 @@ Indexable i p => p a b -> i -> a -> b indexed p a (f a) -paFa Int -i (NonEmptyVector a -v NonEmptyVector a -> Int -> a +paFa Int +i (NonEmptyVector a +v NonEmptyVector a -> Int -> a forall a. NonEmptyVector a -> Int -> a NV.! Int -i) +i) ) NonEmpty Int -indices' - build :: NonEmpty (Int, a) -> NonEmptyVector a -build NonEmpty (Int, a) -ys = Vector a -> NonEmptyVector a +indices' + build :: NonEmpty (Int, a) -> NonEmptyVector a +build NonEmpty (Int, a) +ys = Vector a -> NonEmptyVector a forall a. Vector a -> NonEmptyVector a NV.unsafeFromVector (Vector a -> NonEmptyVector a) -> Vector a -> NonEmptyVector a forall a b. (a -> b) -> a -> b @@ -994,67 +994,67 @@ -> (forall s. ST s (MVector s a)) -> Vector a forall a b. (a -> b) -> a -> b $ do - MVector s a -v' <- Int -> ST s (MVector (PrimState (ST s)) a) + MVector s a +v' <- Int -> ST s (MVector (PrimState (ST s)) a) forall (m :: * -> *) a. PrimMonad m => Int -> m (MVector (PrimState m) a) MV.unsafeNew Int -n +n NonEmpty (Int, a) -> ((Int, a) -> ST s ()) -> ST s () forall (t :: * -> *) (m :: * -> *) a b. (Foldable t, Monad m) => t a -> (a -> m b) -> m () forM_ NonEmpty (Int, a) -ys (((Int, a) -> ST s ()) -> ST s ()) +ys (((Int, a) -> ST s ()) -> ST s ()) -> ((Int, a) -> ST s ()) -> ST s () forall a b. (a -> b) -> a -> b -$ \(Int -i,a -y) -> +$ \(Int +i,a +y) -> MVector (PrimState (ST s)) a -> Int -> a -> ST s () forall (m :: * -> *) a. PrimMonad m => MVector (PrimState m) a -> Int -> a -> m () MV.write MVector s a MVector (PrimState (ST s)) a -v' Int -i a -y +v' Int +i a +y MVector s a -> ST s (MVector s a) forall a. a -> ST s a forall (f :: * -> *) a. Applicative f => a -> f a pure MVector s a -v' +v' -- | Test if the circular list is a cyclic shift of the second -- list. -- -- Running time: \(O(n+m)\), where \(n\) and \(m\) are the sizes of -- the lists. -isShiftOfI :: (Eq a, Foldable1 v) => Cyclic v a -> Cyclic v a -> Bool -Cyclic v a -xs isShiftOfI :: forall a (v :: * -> *). +isShiftOfI :: (Eq a, Foldable1 v) => Cyclic v a -> Cyclic v a -> Bool +Cyclic v a +xs isShiftOfI :: forall a (v :: * -> *). (Eq a, Foldable1 v) => Cyclic v a -> Cyclic v a -> Bool -`isShiftOfI` Cyclic v a -ys = let twice :: Cyclic v a -> NonEmptyVector a -twice Cyclic v a -zs = let zs' :: NonEmptyVector a -zs' = Cyclic v a -> NonEmptyVector a +`isShiftOfI` Cyclic v a +ys = let twice :: Cyclic v a -> NonEmptyVector a +twice Cyclic v a +zs = let zs' :: NonEmptyVector a +zs' = Cyclic v a -> NonEmptyVector a forall {a}. Cyclic v a -> NonEmptyVector a -leftElements Cyclic v a -zs in NonEmptyVector a -zs' NonEmptyVector a -> NonEmptyVector a -> NonEmptyVector a +leftElements Cyclic v a +zs in NonEmptyVector a +zs' NonEmptyVector a -> NonEmptyVector a -> NonEmptyVector a forall a. Semigroup a => a -> a -> a <> NonEmptyVector a -zs' - once :: Cyclic v a -> NonEmptyVector a -once = Cyclic v a -> NonEmptyVector a +zs' + once :: Cyclic v a -> NonEmptyVector a +once = Cyclic v a -> NonEmptyVector a forall {a}. Cyclic v a -> NonEmptyVector a -leftElements - leftElements :: Cyclic v a -> NonEmptyVector a -leftElements = NonEmpty a -> NonEmptyVector a +leftElements + leftElements :: Cyclic v a -> NonEmptyVector a +leftElements = NonEmpty a -> NonEmptyVector a forall a. NonEmpty a -> NonEmptyVector a NV.fromNonEmpty (NonEmpty a -> NonEmptyVector a) -> (Cyclic v a -> NonEmpty a) -> Cyclic v a -> NonEmptyVector a @@ -1063,54 +1063,54 @@ forall a. Cyclic v a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty - check :: Cyclic v a -> Cyclic v a -> Bool -check Cyclic v a -as Cyclic v a -bs = Maybe Int -> Bool + check :: Cyclic v a -> Cyclic v a -> Bool +check Cyclic v a +as Cyclic v a +bs = Maybe Int -> Bool forall a. Maybe a -> Bool isJust (Maybe Int -> Bool) -> Maybe Int -> Bool forall a b. (a -> b) -> a -> b $ Cyclic v a -> NonEmptyVector a -once Cyclic v a -as NonEmptyVector a -> NonEmptyVector a -> Maybe Int +once Cyclic v a +as NonEmptyVector a -> NonEmptyVector a -> Maybe Int forall a (p :: * -> *) (t :: * -> *). (Eq a, Foldable p, Foldable t) => p a -> t a -> Maybe Int `isSubStringOf` Cyclic v a -> NonEmptyVector a -twice Cyclic v a -bs +twice Cyclic v a +bs in Cyclic v a -> Int forall a. Cyclic v a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Cyclic v a -xs Int -> Int -> Bool +xs Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Cyclic v a -> Int forall a. Cyclic v a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Cyclic v a -ys Bool -> Bool -> Bool +ys Bool -> Bool -> Bool && Cyclic v a -> Cyclic v a -> Bool -check Cyclic v a -xs Cyclic v a -ys +check Cyclic v a +xs Cyclic v a +ys -------------------------------------------------------------------------------- -- | Class for types that have an Equality test up to cyclic shifts -class ShiftedEq t where +class ShiftedEq t where -- | The type of the elements stored in this cyclic container. - type ElemCyclic t + type ElemCyclic t -- | Given a and b, test if a is a shifted version of the other. - isShiftOf :: Eq (ElemCyclic t) => t -> t -> Bool + isShiftOf :: Eq (ElemCyclic t) => t -> t -> Bool -- TODO: It may be nice to have a version that actually returns the index, if it is a -- shift. -instance Foldable1 v => ShiftedEq (Cyclic v a) where - type ElemCyclic (Cyclic v a) = a +instance Foldable1 v => ShiftedEq (Cyclic v a) where + type ElemCyclic (Cyclic v a) = a -- ^ runs in linear time in the inputs. - isShiftOf :: Eq (ElemCyclic (Cyclic v a)) => Cyclic v a -> Cyclic v a -> Bool + isShiftOf :: Eq (ElemCyclic (Cyclic v a)) => Cyclic v a -> Cyclic v a -> Bool isShiftOf = Cyclic v a -> Cyclic v a -> Bool forall a (v :: * -> *). (Eq a, Foldable1 v) => diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Ext.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Ext.html index 4cb16c523..346c4eb7a 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Ext.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Ext.html @@ -34,7 +34,7 @@ -- | Our Ext type that represents the core datatype core extended with extra -- information of type 'extra'. -data core :+ extra = core :+ extra deriving (Int -> (core :+ extra) -> ShowS +data core :+ extra = core :+ extra deriving (Int -> (core :+ extra) -> ShowS [core :+ extra] -> ShowS (core :+ extra) -> String (Int -> (core :+ extra) -> ShowS) @@ -64,7 +64,7 @@ (Show core, Show extra) => [core :+ extra] -> ShowS showList :: [core :+ extra] -> ShowS -Show,ReadPrec [core :+ extra] +Show,ReadPrec [core :+ extra] ReadPrec (core :+ extra) Int -> ReadS (core :+ extra) ReadS [core :+ extra] @@ -100,7 +100,7 @@ (Read core, Read extra) => ReadPrec [core :+ extra] readListPrec :: ReadPrec [core :+ extra] -Read,(core :+ extra) -> (core :+ extra) -> Bool +Read,(core :+ extra) -> (core :+ extra) -> Bool ((core :+ extra) -> (core :+ extra) -> Bool) -> ((core :+ extra) -> (core :+ extra) -> Bool) -> Eq (core :+ extra) @@ -116,7 +116,7 @@ (Eq core, Eq extra) => (core :+ extra) -> (core :+ extra) -> Bool /= :: (core :+ extra) -> (core :+ extra) -> Bool -Eq,Eq (core :+ extra) +Eq,Eq (core :+ extra) Eq (core :+ extra) => ((core :+ extra) -> (core :+ extra) -> Ordering) -> ((core :+ extra) -> (core :+ extra) -> Bool) @@ -177,7 +177,7 @@ (Ord core, Ord extra) => (core :+ extra) -> (core :+ extra) -> core :+ extra min :: (core :+ extra) -> (core :+ extra) -> core :+ extra -Ord,core :+ extra +Ord,core :+ extra (core :+ extra) -> (core :+ extra) -> Bounded (core :+ extra) forall a. a -> a -> Bounded a forall core extra. (Bounded core, Bounded extra) => core :+ extra @@ -185,7 +185,7 @@ minBound :: core :+ extra $cmaxBound :: forall core extra. (Bounded core, Bounded extra) => core :+ extra maxBound :: core :+ extra -Bounded,(forall x. (core :+ extra) -> Rep (core :+ extra) x) +Bounded,(forall x. (core :+ extra) -> Rep (core :+ extra) x) -> (forall x. Rep (core :+ extra) x -> core :+ extra) -> Generic (core :+ extra) forall x. Rep (core :+ extra) x -> core :+ extra @@ -198,7 +198,7 @@ from :: forall x. (core :+ extra) -> Rep (core :+ extra) x $cto :: forall core extra x. Rep (core :+ extra) x -> core :+ extra to :: forall x. Rep (core :+ extra) x -> core :+ extra -Generic,(core :+ extra) -> () +Generic,(core :+ extra) -> () ((core :+ extra) -> ()) -> NFData (core :+ extra) forall a. (a -> ()) -> NFData a forall core extra. @@ -211,157 +211,157 @@ NFData) infixr 1 :+ -instance Functor ((:+) c) where - fmap :: forall a b. (a -> b) -> (c :+ a) -> c :+ b -fmap a -> b -f (c -c :+ a -e) = c -c c -> b -> c :+ b +instance Functor ((:+) c) where + fmap :: forall a b. (a -> b) -> (c :+ a) -> c :+ b +fmap a -> b +f (c +c :+ a +e) = c +c c -> b -> c :+ b forall core extra. core -> extra -> core :+ extra :+ a -> b -f a -e +f a +e {-# INLINE fmap #-} -instance Foldable ((:+) c) where - foldMap :: forall m a. Monoid m => (a -> m) -> (c :+ a) -> m -foldMap a -> m -f (c -_ :+ a -e) = a -> m -f a -e +instance Foldable ((:+) c) where + foldMap :: forall m a. Monoid m => (a -> m) -> (c :+ a) -> m +foldMap a -> m +f (c +_ :+ a +e) = a -> m +f a +e {-# INLINE foldMap #-} -instance Traversable ((:+) c) where - traverse :: forall (f :: * -> *) a b. +instance Traversable ((:+) c) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> (c :+ a) -> f (c :+ b) -traverse a -> f b -f (c -c :+ a -e) = c -> b -> c :+ b +traverse a -> f b +f (c +c :+ a +e) = c -> b -> c :+ b forall core extra. core -> extra -> core :+ extra (:+) c -c (b -> c :+ b) -> f b -> f (c :+ b) +c (b -> c :+ b) -> f b -> f (c :+ b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -e +f a +e {-# INLINE traverse #-} -instance Bifunctor (:+) where - bimap :: forall a b c d. (a -> b) -> (c -> d) -> (a :+ c) -> b :+ d -bimap a -> b -f c -> d -g (a -c :+ c -e) = a -> b -f a -c b -> d -> b :+ d +instance Bifunctor (:+) where + bimap :: forall a b c d. (a -> b) -> (c -> d) -> (a :+ c) -> b :+ d +bimap a -> b +f c -> d +g (a +c :+ c +e) = a -> b +f a +c b -> d -> b :+ d forall core extra. core -> extra -> core :+ extra :+ c -> d -g c -e +g c +e {-# INLINE bimap #-} -instance Biapply (:+) where - (a -> b -f :+ c -> d -g) <<.>> :: forall a b c d. ((a -> b) :+ (c -> d)) -> (a :+ c) -> b :+ d -<<.>> (a -c :+ c -e) = a -> b -f a -c b -> d -> b :+ d +instance Biapply (:+) where + (a -> b +f :+ c -> d +g) <<.>> :: forall a b c d. ((a -> b) :+ (c -> d)) -> (a :+ c) -> b :+ d +<<.>> (a +c :+ c +e) = a -> b +f a +c b -> d -> b :+ d forall core extra. core -> extra -> core :+ extra :+ c -> d -g c -e +g c +e {-# INLINE (<<.>>) #-} -instance Biapplicative (:+) where - bipure :: forall core extra. core -> extra -> core :+ extra -bipure = a -> b -> a :+ b +instance Biapplicative (:+) where + bipure :: forall core extra. core -> extra -> core :+ extra +bipure = a -> b -> a :+ b forall core extra. core -> extra -> core :+ extra (:+) {-# INLINE bipure #-} - (a -> b -f :+ c -> d -g) <<*>> :: forall a b c d. ((a -> b) :+ (c -> d)) -> (a :+ c) -> b :+ d -<<*>> (a -c :+ c -e) = a -> b -f a -c b -> d -> b :+ d + (a -> b +f :+ c -> d +g) <<*>> :: forall a b c d. ((a -> b) :+ (c -> d)) -> (a :+ c) -> b :+ d +<<*>> (a +c :+ c +e) = a -> b +f a +c b -> d -> b :+ d forall core extra. core -> extra -> core :+ extra :+ c -> d -g c -e +g c +e {-# INLINE (<<*>>) #-} -instance Bifoldable (:+) where - bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> (a :+ b) -> m -bifoldMap a -> m -f b -> m -g (a -c :+ b -e) = a -> m -f a -c m -> m -> m +instance Bifoldable (:+) where + bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> (a :+ b) -> m +bifoldMap a -> m +f b -> m +g (a +c :+ b +e) = a -> m +f a +c m -> m -> m forall a. Monoid a => a -> a -> a `mappend` b -> m -g b -e +g b +e {-# INLINE bifoldMap #-} instance Bitraversable (:+) where - bitraverse :: forall (f :: * -> *) a c b d. + bitraverse :: forall (f :: * -> *) a c b d. Applicative f => (a -> f c) -> (b -> f d) -> (a :+ b) -> f (c :+ d) -bitraverse a -> f c -f b -> f d -g (a -c :+ b -e) = c -> d -> c :+ d +bitraverse a -> f c +f b -> f d +g (a +c :+ b +e) = c -> d -> c :+ d forall core extra. core -> extra -> core :+ extra (:+) (c -> d -> c :+ d) -> f c -> f (d -> c :+ d) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f c -f a -c f (d -> c :+ d) -> f d -> f (c :+ d) +f a +c f (d -> c :+ d) -> f d -> f (c :+ d) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> b -> f d -g b -e +g b +e {-# INLINE bitraverse #-} -instance Bifoldable1 (:+) where - bifoldMap1 :: forall m a b. Semigroup m => (a -> m) -> (b -> m) -> (a :+ b) -> m -bifoldMap1 a -> m -f b -> m -g (a -c :+ b -e) = a -> m -f a -c m -> m -> m +instance Bifoldable1 (:+) where + bifoldMap1 :: forall m a b. Semigroup m => (a -> m) -> (b -> m) -> (a :+ b) -> m +bifoldMap1 a -> m +f b -> m +g (a +c :+ b +e) = a -> m +f a +c m -> m -> m forall a. Semigroup a => a -> a -> a <> b -> m -g b -e +g b +e {-# INLINE bifoldMap1 #-} -instance Bitraversable1 (:+) where - bitraverse1 :: forall (f :: * -> *) a b c d. +instance Bitraversable1 (:+) where + bitraverse1 :: forall (f :: * -> *) a b c d. Apply f => (a -> f b) -> (c -> f d) -> (a :+ c) -> f (b :+ d) -bitraverse1 a -> f b -f c -> f d -g (a -c :+ c -e) = (b -> d -> b :+ d) -> f b -> f d -> f (b :+ d) +bitraverse1 a -> f b +f c -> f d +g (a +c :+ c +e) = (b -> d -> b :+ d) -> f b -> f d -> f (b :+ d) forall a b c. (a -> b -> c) -> f a -> f b -> f c forall (f :: * -> *) a b c. Apply f => @@ -369,78 +369,78 @@ liftF2 b -> d -> b :+ d forall core extra. core -> extra -> core :+ extra (:+) (a -> f b -f a -c) (c -> f d -g c -e) +f a +c) (c -> f d +g c +e) {-# INLINE bitraverse1 #-} -instance (Semigroup core, Semigroup extra) => Semigroup (core :+ extra) where - (core -c :+ extra -e) <> :: (core :+ extra) -> (core :+ extra) -> core :+ extra -<> (core -c' :+ extra -e') = core -c core -> core -> core +instance (Semigroup core, Semigroup extra) => Semigroup (core :+ extra) where + (core +c :+ extra +e) <> :: (core :+ extra) -> (core :+ extra) -> core :+ extra +<> (core +c' :+ extra +e') = core +c core -> core -> core forall a. Semigroup a => a -> a -> a <> core -c' core -> extra -> core :+ extra +c' core -> extra -> core :+ extra forall core extra. core -> extra -> core :+ extra :+ extra -e extra -> extra -> extra +e extra -> extra -> extra forall a. Semigroup a => a -> a -> a <> extra -e' +e' {-# INLINE (<>) #-} -instance (ToJSON core, ToJSON extra) => ToJSON (core :+ extra) where +instance (ToJSON core, ToJSON extra) => ToJSON (core :+ extra) where -- toJSON (c :+ e) = toJSON (c,e) -- toEncoding (c :+ e) = toEncoding (c,e) - toJSON :: (core :+ extra) -> Value -toJSON (core -c :+ extra -e) = [Pair] -> Value + toJSON :: (core :+ extra) -> Value +toJSON (core +c :+ extra +e) = [Pair] -> Value object [Key "core" Key -> core -> Pair forall v. ToJSON v => Key -> v -> Pair forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv .= core -c, Key +c, Key "extra" Key -> extra -> Pair forall v. ToJSON v => Key -> v -> Pair forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv .= extra -e] - toEncoding :: (core :+ extra) -> Encoding -toEncoding (core -c :+ extra -e) = Series -> Encoding +e] + toEncoding :: (core :+ extra) -> Encoding +toEncoding (core +c :+ extra +e) = Series -> Encoding pairs (Key "core" Key -> core -> Series forall v. ToJSON v => Key -> v -> Series forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv .= core -c Series -> Series -> Series +c Series -> Series -> Series forall a. Semigroup a => a -> a -> a <> Key "extra" Key -> extra -> Series forall v. ToJSON v => Key -> v -> Series forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv .= extra -e) +e) -instance (FromJSON core, FromJSON extra) => FromJSON (core :+ extra) where +instance (FromJSON core, FromJSON extra) => FromJSON (core :+ extra) where -- parseJSON = fmap (\(c,e) -> c :+ e) . parseJSON - parseJSON :: Value -> Parser (core :+ extra) -parseJSON (Object Object -v) = core -> extra -> core :+ extra + parseJSON :: Value -> Parser (core :+ extra) +parseJSON (Object Object +v) = core -> extra -> core :+ extra forall core extra. core -> extra -> core :+ extra (:+) (core -> extra -> core :+ extra) -> Parser core -> Parser (extra -> core :+ extra) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Object -v Object -> Key -> Parser core +v Object -> Key -> Parser core forall a. FromJSON a => Object -> Key -> Parser a .: Key "core" Parser (extra -> core :+ extra) @@ -448,29 +448,29 @@ forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Object -v Object -> Key -> Parser extra +v Object -> Key -> Parser extra forall a. FromJSON a => Object -> Key -> Parser a .: Key "extra" - parseJSON Value -invalid = String -> Value -> Parser (core :+ extra) + parseJSON Value +invalid = String -> Value -> Parser (core :+ extra) forall a. String -> Value -> Parser a typeMismatch String "Ext (:+)" Value -invalid +invalid -instance (Uniform core, Uniform extra) => Uniform (core :+ extra) +instance (Uniform core, Uniform extra) => Uniform (core :+ extra) -instance (UniformRange core, UniformRange extra) => UniformRange (core :+ extra) where - uniformRM :: forall g (m :: * -> *). +instance (UniformRange core, UniformRange extra) => UniformRange (core :+ extra) where + uniformRM :: forall g (m :: * -> *). StatefulGen g m => (core :+ extra, core :+ extra) -> g -> m (core :+ extra) -uniformRM (core -lc :+ extra -le, core -hc :+ extra -he) g -g = core -> extra -> core :+ extra +uniformRM (core +lc :+ extra +le, core +hc :+ extra +he) g +g = core -> extra -> core :+ extra forall core extra. core -> extra -> core :+ extra (:+) (core -> extra -> core :+ extra) -> m core -> m (extra -> core :+ extra) @@ -483,9 +483,9 @@ StatefulGen g m => (core, core) -> g -> m core uniformRM (core -lc, core -hc) g -g m (extra -> core :+ extra) -> m extra -> m (core :+ extra) +lc, core +hc) g +g m (extra -> core :+ extra) -> m extra -> m (core :+ extra) forall a b. m (a -> b) -> m a -> m b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> (extra, extra) -> g -> m extra @@ -496,13 +496,13 @@ StatefulGen g m => (extra, extra) -> g -> m extra uniformRM (extra -le,extra -he) g -g +le,extra +he) g +g -instance (Default core, Default extra) => Default (core :+ extra) where - def :: core :+ extra -def = core +instance (Default core, Default extra) => Default (core :+ extra) where + def :: core :+ extra +def = core forall a. Default a => a def core -> extra -> core :+ extra forall core extra. core -> extra -> core :+ extra @@ -511,25 +511,25 @@ def -- | Access the core of an extended value. -_core :: (core :+ extra) -> core +_core :: (core :+ extra) -> core _core :: forall core extra. (core :+ extra) -> core -_core (core -c :+ extra +_core (core +c :+ extra _) = core -c +c {-# INLINE _core #-} -- | Access the extra part of an extended value. -_extra :: (core :+ extra) -> extra +_extra :: (core :+ extra) -> extra _extra :: forall core extra. (core :+ extra) -> extra _extra (core -_ :+ extra -e) = extra -e +_ :+ extra +e) = extra +e {-# INLINE _extra #-} -- | Lens access to the core of an extended value. -core :: Lens (core :+ extra) (core' :+ extra) core core' +core :: Lens (core :+ extra) (core' :+ extra) core core' core :: forall core extra core' (f :: * -> *). Functor f => (core -> f core') -> (core :+ extra) -> f (core' :+ extra) @@ -540,17 +540,17 @@ lens (core :+ extra) -> core forall core extra. (core :+ extra) -> core _core (\(core -_ :+ extra -e) core' -c -> core' -c core' -> extra -> core' :+ extra +_ :+ extra +e) core' +c -> core' +c core' -> extra -> core' :+ extra forall core extra. core -> extra -> core :+ extra :+ extra -e) +e) {-# INLINE core #-} -- | Lens access to the extra part of an extended value. -extra :: Lens (core :+ extra) (core :+ extra') extra extra' +extra :: Lens (core :+ extra) (core :+ extra') extra extra' extra :: forall core extra extra' (f :: * -> *). Functor f => (extra -> f extra') -> (core :+ extra) -> f (core :+ extra') @@ -560,22 +560,22 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (core :+ extra) -> extra forall core extra. (core :+ extra) -> extra -_extra (\(core -c :+ extra -_) extra' -e -> core -c core -> extra' -> core :+ extra' +_extra (\(core +c :+ extra +_) extra' +e -> core +c core -> extra' -> core :+ extra' forall core extra. core -> extra -> core :+ extra :+ extra' -e) +e) {-# INLINE extra #-} -- | Tag a value with the unit type. -ext :: a -> a :+ () +ext :: a -> a :+ () ext :: forall a. a -> a :+ () -ext a -x = a -x a -> () -> a :+ () +ext a +x = a +x a -> () -> a :+ () forall core extra. core -> extra -> core :+ extra :+ () {-# INLINE ext #-} @@ -585,22 +585,22 @@ -- | A class for types that can behave as a c. Mostly for types t that -- "extend" a 'core' type c. -class AsA t c | t -> c where +class AsA t c | t -> c where -- | Get the core from the t. - asCore :: t -> c + asCore :: t -> c -- | infifx shorthand for AsA -type t :~ c = t `AsA` c +type t :~ c = t `AsA` c -- | Pattern to get the core. -pattern AsA :: t :~ c => c -> t +pattern AsA :: t :~ c => c -> t pattern $mAsA :: forall {r} {t} {c}. (t :~ c) => t -> (c -> r) -> ((# #) -> r) -> r -AsA c <- (asCore -> c) +AsA c <- (asCore -> c) {-# INLINE AsA #-} -- | Everything can act as itself -instance (t ~ c) => AsA t c where - asCore :: t -> c +instance (t ~ c) => AsA t c where + asCore :: t -> c asCore = t -> t t -> c forall a. a -> a @@ -608,8 +608,8 @@ {-# INLINE asCore #-} -- | An Ext can act as its core. -instance {-# OVERLAPPING #-} AsA (c :+ e) c where - asCore :: (c :+ e) -> c +instance {-# OVERLAPPING #-} AsA (c :+ e) c where + asCore :: (c :+ e) -> c asCore = Getting c (c :+ e) c -> (c :+ e) -> c forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view Getting c (c :+ e) c @@ -622,16 +622,16 @@ -------------------------------------------------------------------------------- -- | Types that can be decomposed into an Ext -class AsExt t where - type CoreOf t - type ExtraOf t +class AsExt t where + type CoreOf t + type ExtraOf t -- | Convert between this type and an Ext - _Ext :: Iso' t (CoreOf t :+ ExtraOf t) + _Ext :: Iso' t (CoreOf t :+ ExtraOf t) -instance AsExt (c :+ e) where - type CoreOf (c :+ e) = c - type ExtraOf (c :+ e) = e - _Ext :: Iso' (c :+ e) (CoreOf (c :+ e) :+ ExtraOf (c :+ e)) +instance AsExt (c :+ e) where + type CoreOf (c :+ e) = c + type ExtraOf (c :+ e) = e + _Ext :: Iso' (c :+ e) (CoreOf (c :+ e) :+ ExtraOf (c :+ e)) _Ext = ((c :+ e) -> c :+ e) -> ((c :+ e) -> c :+ e) -> Iso (c :+ e) (c :+ e) (c :+ e) (c :+ e) forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b @@ -656,21 +656,21 @@ -- -- >>> "foobar" ^.. ifolded . asIndexedExt -- ['f' :+ 0,'o' :+ 1,'o' :+ 2,'b' :+ 3,'a' :+ 4,'r' :+ 5] -asIndexedExt :: (Indexable i p, Functor f) - => p (s :+ i) (f (t :+ j)) - -> Indexed i s (f t) +asIndexedExt :: (Indexable i p, Functor f) + => p (s :+ i) (f (t :+ j)) + -> Indexed i s (f t) asIndexedExt :: forall i (p :: * -> * -> *) (f :: * -> *) s t j. (Indexable i p, Functor f) => p (s :+ i) (f (t :+ j)) -> Indexed i s (f t) -asIndexedExt p (s :+ i) (f (t :+ j)) -f = (i -> s -> f t) -> Indexed i s (f t) +asIndexedExt p (s :+ i) (f (t :+ j)) +f = (i -> s -> f t) -> Indexed i s (f t) forall i a b. (i -> a -> b) -> Indexed i a b Indexed ((i -> s -> f t) -> Indexed i s (f t)) -> (i -> s -> f t) -> Indexed i s (f t) forall a b. (a -> b) -> a -> b -$ \i -i s -a -> Getting t (t :+ j) t -> (t :+ j) -> t +$ \i +i s +a -> Getting t (t :+ j) t -> (t :+ j) -> t forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view Getting t (t :+ j) t forall core extra core' (f :: * -> *). @@ -684,11 +684,11 @@ Indexable i p => p a b -> i -> a -> b indexed p (s :+ i) (f (t :+ j)) -f i -i (s -a s -> i -> s :+ i +f i +i (s +a s -> i -> s :+ i forall core extra. core -> extra -> core :+ extra :+ i -i) +i) {-# INLINE asIndexedExt #-} \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Sort.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Sort.html index 3f838c3c3..c5c06a16a 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Sort.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Sort.html @@ -27,11 +27,11 @@ -- | Sort the given collection using intro sort. -- -- \(O(n\log n)\) -sort :: forall vector f a. ( Foldable f - , Vector.Vector vector a - , Ord a +sort :: forall vector f a. ( Foldable f + , Vector.Vector vector a + , Ord a ) - => f a -> vector a + => f a -> vector a sort :: forall (vector :: * -> *) (f :: * -> *) a. (Foldable f, Vector vector a, Ord a) => f a -> vector a @@ -48,43 +48,43 @@ -- function f is called at every comparison -- -- \(O(Tn\log n)\), where \(T\) is the time required to evaluate the function -sortOnCheap :: forall vector f a b. ( Foldable f - , Vector.Vector vector a - , Ord b +sortOnCheap :: forall vector f a b. ( Foldable f + , Vector.Vector vector a + , Ord b ) - => (a -> b) -> f a -> vector a + => (a -> b) -> f a -> vector a sortOnCheap :: forall (vector :: * -> *) (f :: * -> *) a b. (Foldable f, Vector vector a, Ord b) => (a -> b) -> f a -> vector a -sortOnCheap a -> b -f = (a -> a -> Ordering) -> f a -> vector a +sortOnCheap a -> b +f = (a -> a -> Ordering) -> f a -> vector a forall (vector :: * -> *) (f :: * -> *) a. (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a sortBy ((a -> b) -> a -> a -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing a -> b -f) +f) {-# INLINE sortOnCheap #-} -- | Sort a collection using the given comparator using intro-sort (essentially quicksort). -- -- \(O(T n\log n)\), where \(T\) is the time to do a comparison. -sortBy :: forall vector f a. ( Foldable f - , Vector.Vector vector a) - => (a -> a -> Ordering) -> f a -> vector a +sortBy :: forall vector f a. ( Foldable f + , Vector.Vector vector a) + => (a -> a -> Ordering) -> f a -> vector a sortBy :: forall (vector :: * -> *) (f :: * -> *) a. (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a -sortBy a -> a -> Ordering -cmp f a -xs = (forall s. ST s (vector a)) -> vector a +sortBy a -> a -> Ordering +cmp f a +xs = (forall s. ST s (vector a)) -> vector a forall a. (forall s. ST s a) -> a runST ((forall s. ST s (vector a)) -> vector a) -> (forall s. ST s (vector a)) -> vector a forall a b. (a -> b) -> a -> b -$ do Mutable vector s a -v <- Builder a -> ST s (Mutable vector s a) +$ do Mutable vector s a +v <- Builder a -> ST s (Mutable vector s a) forall (vector :: * -> * -> *) element s. MVector vector element => Builder element -> ST s (vector s element) @@ -96,22 +96,22 @@ Foldable foldable => foldable element -> Builder element Builder.foldable f a -xs +xs (a -> a -> Ordering) -> Mutable vector (PrimState (ST s)) a -> ST s () forall (m :: * -> *) (v :: * -> * -> *) e. (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> m () Intro.sortBy a -> a -> Ordering -cmp Mutable vector s a +cmp Mutable vector s a Mutable vector (PrimState (ST s)) a -v +v Mutable vector (PrimState (ST s)) a -> ST s (vector a) forall (m :: * -> *) (v :: * -> *) a. (PrimMonad m, Vector v a) => Mutable v (PrimState m) a -> m (v a) Vector.unsafeFreeze Mutable vector s a Mutable vector (PrimState (ST s)) a -v +v {-# INLINABLE sortBy #-} \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Util.html index a7416187f..2621ee1db 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Foldable.Util.html @@ -25,10 +25,10 @@ -------------------------------------------------------------------------------- -- | Types that can be built from foldable collections -class HasFromFoldable f where +class HasFromFoldable f where -- | Build the data structure from something that is foldable. - fromFoldable :: Foldable g => g a -> f a - fromFoldable = [a] -> f a + fromFoldable :: Foldable g => g a -> f a + fromFoldable = [a] -> f a forall a. [a] -> f a forall (f :: * -> *) a. HasFromFoldable f => [a] -> f a fromList ([a] -> f a) -> (g a -> [a]) -> g a -> f a @@ -39,15 +39,15 @@ F.toList -- | Build the data structure from a list of elements - fromList :: [a] -> f a + fromList :: [a] -> f a {-# MINIMAL fromList #-} -- | Types that can be built from non-empty foldable collections -class HasFromFoldable1 f where +class HasFromFoldable1 f where -- | Build the data structure from something that is foldable and -- has at least one element. - fromFoldable1 :: Foldable1 g => g a -> f a - fromFoldable1 = NonEmpty a -> f a + fromFoldable1 :: Foldable1 g => g a -> f a + fromFoldable1 = NonEmpty a -> f a forall a. NonEmpty a -> f a forall (f :: * -> *) a. HasFromFoldable1 f => NonEmpty a -> f a fromNonEmpty (NonEmpty a -> f a) -> (g a -> NonEmpty a) -> g a -> f a @@ -58,27 +58,27 @@ toNonEmpty -- | Build the data structure from a non-empty list of elements - fromNonEmpty :: NonEmpty a -> f a + fromNonEmpty :: NonEmpty a -> f a {-# MINIMAL fromNonEmpty #-} -------------------------------------------------------------------------------- -- * Instances -instance HasFromFoldable [] where - fromList :: forall a. [a] -> [a] +instance HasFromFoldable [] where + fromList :: forall a. [a] -> [a] fromList = [a] -> [a] forall a. a -> a id -instance HasFromFoldable Seq.Seq where - fromList :: forall a. [a] -> Seq a +instance HasFromFoldable Seq.Seq where + fromList :: forall a. [a] -> Seq a fromList = [a] -> Seq a forall a. [a] -> Seq a Seq.fromList -instance Monoid c => HasFromFoldable (Const c) where - fromList :: forall a. [a] -> Const c a +instance Monoid c => HasFromFoldable (Const c) where + fromList :: forall a. [a] -> Const c a fromList [a] _ = c -> Const c a forall {k} a (b :: k). a -> Const a b @@ -86,14 +86,14 @@ forall a. Monoid a => a mempty -instance HasFromFoldable1 NonEmpty where - fromNonEmpty :: forall a. NonEmpty a -> NonEmpty a +instance HasFromFoldable1 NonEmpty where + fromNonEmpty :: forall a. NonEmpty a -> NonEmpty a fromNonEmpty = NonEmpty a -> NonEmpty a forall a. a -> a id -instance HasFromFoldable1 Seq.Seq where - fromNonEmpty :: forall a. NonEmpty a -> Seq a +instance HasFromFoldable1 Seq.Seq where + fromNonEmpty :: forall a. NonEmpty a -> Seq a fromNonEmpty = [a] -> Seq a forall a. [a] -> Seq a Seq.fromList ([a] -> Seq a) -> (NonEmpty a -> [a]) -> NonEmpty a -> Seq a @@ -103,15 +103,15 @@ forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList -instance HasFromFoldable Vector.Vector where - fromList :: forall a. [a] -> Vector a +instance HasFromFoldable Vector.Vector where + fromList :: forall a. [a] -> Vector a fromList = [a] -> Vector a forall a. [a] -> Vector a Vector.fromList -instance HasFromFoldable1 NonEmptyVector where - fromNonEmpty :: forall a. NonEmpty a -> NonEmptyVector a +instance HasFromFoldable1 NonEmptyVector where + fromNonEmpty :: forall a. NonEmpty a -> NonEmptyVector a fromNonEmpty = NonEmpty a -> NonEmptyVector a forall a. NonEmpty a -> NonEmptyVector a NonEmptyVector.fromNonEmpty diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Indexed.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Indexed.html index 36ce0b6a5..14ee5906f 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Indexed.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Indexed.html @@ -26,13 +26,13 @@ type Index = Int -- | Types that have an index. -class HasIndex a where +class HasIndex a where -- | Get the index of a given 'a' - sosIndex :: a -> Index + sosIndex :: a -> Index -- | Associate a value of type 'a' with an Index. -data WithIndex a = WithIndex {-# UNPACK #-} !Index a - deriving (Int -> WithIndex a -> ShowS +data WithIndex a = WithIndex {-# UNPACK #-} !Index a + deriving (Int -> WithIndex a -> ShowS [WithIndex a] -> ShowS WithIndex a -> String (Int -> WithIndex a -> ShowS) @@ -53,7 +53,7 @@ Show) -- | Lens to manipulate the value of the 'WithIndex' -theValue :: Lens (WithIndex a) (WithIndex b) a b +theValue :: Lens (WithIndex a) (WithIndex b) a b theValue :: forall a b (f :: * -> *). Functor f => (a -> f b) -> WithIndex a -> f (WithIndex b) @@ -62,31 +62,31 @@ -> Lens (WithIndex a) (WithIndex b) a b forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(WithIndex Int -_ a -x) -> a -x) (\(WithIndex Int -i a -_) b -y -> Int -> b -> WithIndex b +_ a +x) -> a +x) (\(WithIndex Int +i a +_) b +y -> Int -> b -> WithIndex b forall a. Int -> a -> WithIndex a WithIndex Int -i b -y) +i b +y) -instance Field1 (WithIndex a) (WithIndex b) a b where - _1 :: Lens (WithIndex a) (WithIndex b) a b +instance Field1 (WithIndex a) (WithIndex b) a b where + _1 :: Lens (WithIndex a) (WithIndex b) a b _1 = (a -> f b) -> WithIndex a -> f (WithIndex b) forall a b (f :: * -> *). Functor f => (a -> f b) -> WithIndex a -> f (WithIndex b) theValue -instance HasIndex (WithIndex a) where - sosIndex :: WithIndex a -> Int -sosIndex (WithIndex Int -i a +instance HasIndex (WithIndex a) where + sosIndex :: WithIndex a -> Int +sosIndex (WithIndex Int +i a _) = Int -i +i {-# INLINE sosIndex #-} -- instance Eq a => Eq (WithIndex a) where @@ -101,7 +101,7 @@ -------------------------------------------------------------------------------- -- | Label each element with its index. -labelWithIndex :: Traversable t => t a -> t (WithIndex a) +labelWithIndex :: Traversable t => t a -> t (WithIndex a) labelWithIndex :: forall (t :: * -> *) a. Traversable t => t a -> t (WithIndex a) labelWithIndex = (Int -> a -> WithIndex a) -> t a -> t (WithIndex a) forall (t :: * -> *) a b. @@ -113,12 +113,12 @@ -- | Label each element with its index using the given labelling -- function. -labelWith :: Traversable t => (Index -> a -> b) -> t a -> t b +labelWith :: Traversable t => (Index -> a -> b) -> t a -> t b labelWith :: forall (t :: * -> *) a b. Traversable t => (Int -> a -> b) -> t a -> t b -labelWith Int -> a -> b -f = (t b, Int) -> t b +labelWith Int -> a -> b +f = (t b, Int) -> t b forall a b. (a, b) -> a fst ((t b, Int) -> t b) -> (t a -> (t b, Int)) -> t a -> t b forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -127,18 +127,18 @@ Traversable t => (Int -> a -> b) -> t a -> (t b, Int) labelWith' Int -> a -> b -f +f -- | Label each element with its index using the given labelling -- function. Returns the new collection as well as its size. -labelWith' :: forall t a b. Traversable t - => (Index -> a -> b) -> t a - -> (t b, Int) +labelWith' :: forall t a b. Traversable t + => (Index -> a -> b) -> t a + -> (t b, Int) labelWith' :: forall (t :: * -> *) a b. Traversable t => (Int -> a -> b) -> t a -> (t b, Int) -labelWith' Int -> a -> b -withIndex = (State Int (t b) -> Int -> (t b, Int)) +labelWith' Int -> a -> b +withIndex = (State Int (t b) -> Int -> (t b, Int)) -> Int -> State Int (t b) -> (t b, Int) forall a b c. (a -> b -> c) -> b -> a -> c flip State Int (t b) -> Int -> (t b, Int) @@ -155,13 +155,13 @@ Applicative f => (a -> f b) -> t a -> f (t b) traverse a -> StateT Int Identity b -lbl +lbl where - lbl :: a -> State Int b - lbl :: a -> StateT Int Identity b -lbl a -x = do Int -i <- StateT Int Identity Int + lbl :: a -> State Int b + lbl :: a -> StateT Int Identity b +lbl a +x = do Int +i <- StateT Int Identity Int forall s (m :: * -> *). MonadState s m => m s get Int -> StateT Int Identity () @@ -169,7 +169,7 @@ put (Int -> StateT Int Identity ()) -> Int -> StateT Int Identity () forall a b. (a -> b) -> a -> b $ Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1 @@ -177,7 +177,7 @@ forall a. a -> StateT Int Identity a forall (f :: * -> *) a. Applicative f => a -> f a pure (Int -> a -> b -withIndex Int -i a -x) +withIndex Int +i a +x) \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Lens.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Lens.Util.html index efcec8d5d..e9c335d51 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Lens.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Lens.Util.html @@ -28,11 +28,11 @@ -- taken and modified directly from lens -- | construct a Fold1 from a function that produces a Foldable1 -folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a +folding1 :: Foldable1 f => (s -> f a) -> Fold1 s a folding1 :: forall (f :: * -> *) s a. Foldable1 f => (s -> f a) -> Fold1 s a -folding1 s -> f a -sfa a -> f a -agb = f () -> f s +folding1 s -> f a +sfa a -> f a +agb = f () -> f s forall (f :: * -> *) a b. (Functor f, Contravariant f) => f a -> f b @@ -43,21 +43,21 @@ (Foldable1 t, Apply f) => (a -> f b) -> t a -> f () traverse1_ a -> f a -agb (f a -> f ()) -> (s -> f a) -> s -> f () +agb (f a -> f ()) -> (s -> f a) -> s -> f () forall b c a. (b -> c) -> (a -> b) -> a -> c . s -> f a -sfa +sfa {-# INLINE folding1 #-} -- | Version of ifolding to build an 'IndexedFold1' -ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) - => (s -> f (i, a)) -> Over p g s t a b +ifolding1 :: (Foldable1 f, Indexable i p, Contravariant g, Apply g) + => (s -> f (i, a)) -> Over p g s t a b ifolding1 :: forall (f :: * -> *) i (p :: * -> * -> *) (g :: * -> *) s a t b. (Foldable1 f, Indexable i p, Contravariant g, Apply g) => (s -> f (i, a)) -> Over p g s t a b -ifolding1 s -> f (i, a) -sfa p a (g b) -f = g () -> g t +ifolding1 s -> f (i, a) +sfa p a (g b) +f = g () -> g t forall (f :: * -> *) a b. (Functor f, Contravariant f) => f a -> f b @@ -81,18 +81,18 @@ Indexable i p => p a b -> i -> a -> b indexed p a (g b) -f)) (f (i, a) -> g ()) -> (s -> f (i, a)) -> s -> g () +f)) (f (i, a) -> g ()) -> (s -> f (i, a)) -> s -> g () forall b c a. (b -> c) -> (a -> b) -> a -> c . s -> f (i, a) -sfa +sfa {-# INLINE ifolding1 #-} -- | indexed version of 'toNonEmptyOf' -itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i,a)) s a -> s -> NonEmpty (i,a) +itoNonEmptyOf :: IndexedGetting i (NonEmptyDList (i,a)) s a -> s -> NonEmpty (i,a) itoNonEmptyOf :: forall i a s. IndexedGetting i (NonEmptyDList (i, a)) s a -> s -> NonEmpty (i, a) -itoNonEmptyOf IndexedGetting i (NonEmptyDList (i, a)) s a -l = (NonEmptyDList (i, a) -> [(i, a)] -> NonEmpty (i, a)) +itoNonEmptyOf IndexedGetting i (NonEmptyDList (i, a)) s a +l = (NonEmptyDList (i, a) -> [(i, a)] -> NonEmpty (i, a)) -> [(i, a)] -> NonEmptyDList (i, a) -> NonEmpty (i, a) forall a b c. (a -> b -> c) -> b -> a -> c flip NonEmptyDList (i, a) -> [(i, a)] -> NonEmpty (i, a) @@ -104,12 +104,12 @@ -> (i -> a -> NonEmptyDList (i, a)) -> s -> NonEmptyDList (i, a) forall i m s a. IndexedGetting i m s a -> (i -> a -> m) -> s -> m ifoldMapOf IndexedGetting i (NonEmptyDList (i, a)) s a -l (\i -i a -a -> ([(i, a)] -> NonEmpty (i, a)) -> NonEmptyDList (i, a) +l (\i +i a +a -> ([(i, a)] -> NonEmpty (i, a)) -> NonEmptyDList (i, a) forall a. ([a] -> NonEmpty a) -> NonEmptyDList a NonEmptyDList ((i -i,a -a) :|)) +i,a +a) :|)) {-# INLINE itoNonEmptyOf #-} \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.List.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.List.Util.html index fc4aa2d7e..bfdf7d1fb 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.List.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.List.Util.html @@ -33,10 +33,10 @@ -- [] -- >>> leaveOutOne [1] -- [(1,[])] -leaveOutOne :: [a] -> [(a,[a])] +leaveOutOne :: [a] -> [(a,[a])] leaveOutOne :: forall a. [a] -> [(a, [a])] -leaveOutOne [a] -xs = (Zipper a -> [a]) -> (a, Zipper a) -> (a, [a]) +leaveOutOne [a] +xs = (Zipper a -> [a]) -> (a, Zipper a) -> (a, [a]) forall b c a. (b -> c) -> (a, b) -> (a, c) forall (p :: * -> * -> *) b c a. Bifunctor p => @@ -62,7 +62,7 @@ allNonEmptyNexts ([a] -> Zipper a forall a. [a] -> Zipper a Zipper.fromList [a] -xs) +xs) -------------------------------------------------------------------------------- @@ -74,7 +74,7 @@ -- Nothing -- >>> minimumMaybe [1,2,3] -- Just 1 -minimumMaybe :: Ord a => [a] -> Maybe a +minimumMaybe :: Ord a => [a] -> Maybe a minimumMaybe :: forall a. Ord a => [a] -> Maybe a minimumMaybe = (a -> a -> Ordering) -> [a] -> Maybe a forall a. (a -> a -> Ordering) -> [a] -> Maybe a @@ -88,7 +88,7 @@ -- Nothing -- >>> maximumMaybe [1,2,3] -- Just 3 -maximumMaybe :: Ord a => [a] -> Maybe a +maximumMaybe :: Ord a => [a] -> Maybe a maximumMaybe :: forall a. Ord a => [a] -> Maybe a maximumMaybe = (a -> a -> Ordering) -> [a] -> Maybe a forall a. (a -> a -> Ordering) -> [a] -> Maybe a @@ -104,15 +104,15 @@ -- Nothing -- >>> minimumMaybeBy (comparing abs) [1,-2,3] -- Just 1 -minimumMaybeBy :: (a -> a -> Ordering) -> [a] -> Maybe a +minimumMaybeBy :: (a -> a -> Ordering) -> [a] -> Maybe a minimumMaybeBy :: forall a. (a -> a -> Ordering) -> [a] -> Maybe a -minimumMaybeBy a -> a -> Ordering -cmp = \case +minimumMaybeBy a -> a -> Ordering +cmp = \case [] -> Maybe a forall a. Maybe a Nothing - [a] -xs -> a -> Maybe a + [a] +xs -> a -> Maybe a forall a. a -> Maybe a Just (a -> Maybe a) -> a -> Maybe a forall a b. (a -> b) -> a -> b @@ -121,35 +121,35 @@ Foldable t => (a -> a -> Ordering) -> t a -> a List.minimumBy a -> a -> Ordering -cmp [a] -xs +cmp [a] +xs -- | Computes all minima by comparing some property. -- -- >>> minimaOn (max 2) [1,2,3,4,5,-1] -- [-1,2,1] -minimaOn :: Ord b => (a -> b) -> [a] -> [a] +minimaOn :: Ord b => (a -> b) -> [a] -> [a] minimaOn :: forall b a. Ord b => (a -> b) -> [a] -> [a] -minimaOn a -> b -f = (a -> a -> Ordering) -> [a] -> [a] +minimaOn a -> b +f = (a -> a -> Ordering) -> [a] -> [a] forall a. (a -> a -> Ordering) -> [a] -> [a] minimaBy ((a -> b) -> a -> a -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing a -> b -f) +f) -- | Computes all minima. -- -- >>> minimaBy (comparing abs) [1,2,3,2,1,-1] -- [-1,1,1] -minimaBy :: (a -> a -> Ordering) -> [a] -> [a] +minimaBy :: (a -> a -> Ordering) -> [a] -> [a] minimaBy :: forall a. (a -> a -> Ordering) -> [a] -> [a] -minimaBy a -> a -> Ordering -cmp = \case +minimaBy a -> a -> Ordering +cmp = \case [] -> [] - (a -x:[a] -xs) -> NonEmpty a -> [a] + (a +x:[a] +xs) -> NonEmpty a -> [a] forall a. NonEmpty a -> [a] NonEmpty.toList (NonEmpty a -> [a]) -> NonEmpty a -> [a] forall a b. (a -> b) -> a -> b @@ -158,33 +158,33 @@ forall (t :: * -> *) b a. Foldable t => (b -> a -> b) -> b -> t a -> b -List.foldl' (\mins :: NonEmpty a -mins@(a -m:|[a] -_) a -y -> case a -m a -> a -> Ordering -`cmp` a -y of +List.foldl' (\mins :: NonEmpty a +mins@(a +m:|[a] +_) a +y -> case a +m a -> a -> Ordering +`cmp` a +y of Ordering LT -> NonEmpty a -mins +mins Ordering EQ -> a -y a -> NonEmpty a -> NonEmpty a +y a -> NonEmpty a -> NonEmpty a forall a. a -> NonEmpty a -> NonEmpty a NonEmpty.<| NonEmpty a -mins +mins Ordering GT -> a -ya -> [a] -> NonEmpty a +ya -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :|[] ) (a -xa -> [a] -> NonEmpty a +xa -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :|[]) [a] -xs +xs -- | Extracts all minima from the list. The result consists of the -- list of minima, and all remaining points. Both lists are returned @@ -192,20 +192,20 @@ -- -- >>> extractMinimaBy compare [1,2,3,0,1,2,3,0,1,2,0,2] -- [0,0,0] :+ [2,3,1,2,3,1,2,1,2] -extractMinimaBy :: (a -> a -> Ordering) -> [a] -> [a] :+ [a] +extractMinimaBy :: (a -> a -> Ordering) -> [a] -> [a] :+ [a] extractMinimaBy :: forall a. (a -> a -> Ordering) -> [a] -> [a] :+ [a] -extractMinimaBy a -> a -> Ordering -cmp [a] -xs = case [a] -> Maybe (NonEmpty a) +extractMinimaBy a -> a -> Ordering +cmp [a] +xs = case [a] -> Maybe (NonEmpty a) forall a. [a] -> Maybe (NonEmpty a) NonEmpty.nonEmpty [a] -xs of +xs of Maybe (NonEmpty a) Nothing -> [] [a] -> [a] -> [a] :+ [a] forall core extra. core -> extra -> core :+ extra :+ [] - Just NonEmpty a -xs' -> (NonEmpty a -> [a]) -> (NonEmpty a :+ [a]) -> [a] :+ [a] + Just NonEmpty a +xs' -> (NonEmpty a -> [a]) -> (NonEmpty a :+ [a]) -> [a] :+ [a] forall a b c. (a -> b) -> (a :+ c) -> b :+ c forall (p :: * -> * -> *) a b c. Bifunctor p => @@ -218,8 +218,8 @@ $ (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] NonEmptyUtil.extractMinimaBy a -> a -> Ordering -cmp NonEmpty a -xs' +cmp NonEmpty a +xs' -- (x:xs) -> $ foldr (\y (mins@(m:|_) :+ rest) -> -- case m `cmp` y of -- LT -> mins :+ y:rest @@ -241,89 +241,89 @@ -- >>> partition3 (compare 4) [0,1,2,2,3,4,5,5,6,6,7,7,7,7,7,8] -- ([5,5,6,6,7,7,7,7,7,8],[4],[0,1,2,2,3]) -- -partition3 :: Foldable f => (a -> Ordering) -> f a -> ([a],[a],[a]) +partition3 :: Foldable f => (a -> Ordering) -> f a -> ([a],[a],[a]) partition3 :: forall (f :: * -> *) a. Foldable f => (a -> Ordering) -> f a -> ([a], [a], [a]) -partition3 a -> Ordering -f = (a -> ([a], [a], [a]) -> ([a], [a], [a])) +partition3 a -> Ordering +f = (a -> ([a], [a], [a]) -> ([a], [a], [a])) -> ([a], [a], [a]) -> f a -> ([a], [a], [a]) forall a b. (a -> b -> b) -> b -> f a -> b forall (t :: * -> *) a b. Foldable t => (a -> b -> b) -> b -> t a -> b foldr a -> ([a], [a], [a]) -> ([a], [a], [a]) -g ([],[],[]) +g ([],[],[]) where - g :: a -> ([a], [a], [a]) -> ([a], [a], [a]) -g a -x ([a] -lts,[a] -eqs,[a] -gts) = case a -> Ordering -f a -x of + g :: a -> ([a], [a], [a]) -> ([a], [a], [a]) +g a +x ([a] +lts,[a] +eqs,[a] +gts) = case a -> Ordering +f a +x of Ordering LT -> (a -xa -> [a] -> [a] +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -lts, [a] -eqs, [a] -gts) +lts, [a] +eqs, [a] +gts) Ordering EQ -> ( [a] -lts, a -xa -> [a] -> [a] +lts, a +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -eqs, [a] -gts) +eqs, [a] +gts) Ordering GT -> ( [a] -lts, [a] -eqs,a -xa -> [a] -> [a] +lts, [a] +eqs,a +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -gts) +gts) -- | A version of groupBy that uses the given Ordering to group -- consecutive Equal items -- -- >>> groupBy' compare [0,1,2,2,3,4,5,5,6,6,7,7,7,7,7,8] -- [0 :| [],1 :| [],2 :| [2],3 :| [],4 :| [],5 :| [5],6 :| [6],7 :| [7,7,7,7],8 :| []] -groupBy' :: (a -> a -> Ordering) -> [a] -> [NonEmpty a] +groupBy' :: (a -> a -> Ordering) -> [a] -> [NonEmpty a] groupBy' :: forall a. (a -> a -> Ordering) -> [a] -> [NonEmpty a] -groupBy' a -> a -> Ordering -cmp = [a] -> [NonEmpty a] -go +groupBy' a -> a -> Ordering +cmp = [a] -> [NonEmpty a] +go where - go :: [a] -> [NonEmpty a] -go = \case + go :: [a] -> [NonEmpty a] +go = \case [] -> [] - (a -x:[a] -xs) -> let ([a] -pref,[a] -rest) = (a -> Bool) -> [a] -> ([a], [a]) + (a +x:[a] +xs) -> let ([a] +pref,[a] +rest) = (a -> Bool) -> [a] -> ([a], [a]) forall a. (a -> Bool) -> [a] -> ([a], [a]) -List.span (\a -y -> a -x a -> a -> Ordering -`cmp` a -y Ordering -> Ordering -> Bool +List.span (\a +y -> a +x a -> a -> Ordering +`cmp` a +y Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering EQ) [a] -xs +xs in (a -x a -> [a] -> NonEmpty a +x a -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :| [a] -pref) NonEmpty a -> [NonEmpty a] -> [NonEmpty a] +pref) NonEmpty a -> [NonEmpty a] -> [NonEmpty a] forall a. a -> [a] -> [a] : [a] -> [NonEmpty a] -go [a] -rest +go [a] +rest \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.List.Zipper.html b/haddocks/hgeometry-combinatorial/src/HGeometry.List.Zipper.html index 0461f58d6..b9c458c1b 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.List.Zipper.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.List.Zipper.html @@ -12,7 +12,7 @@ -------------------------------------------------------------------------------- -- | Simple Zipper for Lists. -data Zipper a = Zipper [a] [a] deriving (Int -> Zipper a -> ShowS +data Zipper a = Zipper [a] [a] deriving (Int -> Zipper a -> ShowS [Zipper a] -> ShowS Zipper a -> String (Int -> Zipper a -> ShowS) @@ -28,7 +28,7 @@ show :: Zipper a -> String $cshowList :: forall a. Show a => [Zipper a] -> ShowS showList :: [Zipper a] -> ShowS -Show,Zipper a -> Zipper a -> Bool +Show,Zipper a -> Zipper a -> Bool (Zipper a -> Zipper a -> Bool) -> (Zipper a -> Zipper a -> Bool) -> Eq (Zipper a) forall a. Eq a => Zipper a -> Zipper a -> Bool @@ -37,7 +37,7 @@ == :: Zipper a -> Zipper a -> Bool $c/= :: forall a. Eq a => Zipper a -> Zipper a -> Bool /= :: Zipper a -> Zipper a -> Bool -Eq,(forall a b. (a -> b) -> Zipper a -> Zipper b) +Eq,(forall a b. (a -> b) -> Zipper a -> Zipper b) -> (forall a b. a -> Zipper b -> Zipper a) -> Functor Zipper forall a b. a -> Zipper b -> Zipper a forall a b. (a -> b) -> Zipper a -> Zipper b @@ -50,22 +50,22 @@ <$ :: forall a b. a -> Zipper b -> Zipper a Functor) -instance Foldable Zipper where +instance Foldable Zipper where -- Folds like it it is a normal list - foldMap :: forall m a. Monoid m => (a -> m) -> Zipper a -> m -foldMap a -> m -f (Zipper [a] -ls [a] -rs) = (a -> m) -> [a] -> m + foldMap :: forall m a. Monoid m => (a -> m) -> Zipper a -> m +foldMap a -> m +f (Zipper [a] +ls [a] +rs) = (a -> m) -> [a] -> m forall m a. Monoid m => (a -> m) -> [a] -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f ([a] -> [a] +f ([a] -> [a] forall a. [a] -> [a] reverse [a] -ls) m -> m -> m +ls) m -> m -> m forall a. Semigroup a => a -> a -> a <> (a -> m) -> [a] -> m forall m a. Monoid m => (a -> m) -> [a] -> m @@ -73,14 +73,14 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f [a] -rs +f [a] +rs -- | Construct a Zipper from a list -- -- running time: \(O(1)\) -fromList :: [a] -> Zipper a +fromList :: [a] -> Zipper a fromList :: forall a. [a] -> Zipper a fromList = [a] -> [a] -> Zipper a forall a. [a] -> [a] -> Zipper a @@ -89,56 +89,56 @@ -- | Go to the Next Element -- -- running time: \(O(1)\) -goNext :: Zipper a -> Maybe (Zipper a) +goNext :: Zipper a -> Maybe (Zipper a) goNext :: forall a. Zipper a -> Maybe (Zipper a) -goNext (Zipper [a] -xs [a] -ys) = case [a] -ys of +goNext (Zipper [a] +xs [a] +ys) = case [a] +ys of [] -> Maybe (Zipper a) forall a. Maybe a Nothing - a -x:[a] -ys' -> Zipper a -> Maybe (Zipper a) + a +x:[a] +ys' -> Zipper a -> Maybe (Zipper a) forall a. a -> Maybe a Just (Zipper a -> Maybe (Zipper a)) -> Zipper a -> Maybe (Zipper a) forall a b. (a -> b) -> a -> b $ [a] -> [a] -> Zipper a forall a. [a] -> [a] -> Zipper a Zipper (a -xa -> [a] -> [a] +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -xs) [a] -ys' +xs) [a] +ys' -- | Go to the previous Element -- -- running time: \(O(1)\) -goPrev :: Zipper a -> Maybe (Zipper a) +goPrev :: Zipper a -> Maybe (Zipper a) goPrev :: forall a. Zipper a -> Maybe (Zipper a) -goPrev (Zipper [a] -xs [a] -ys) = case [a] -xs of +goPrev (Zipper [a] +xs [a] +ys) = case [a] +xs of [] -> Maybe (Zipper a) forall a. Maybe a Nothing - a -x:[a] -xs' -> Zipper a -> Maybe (Zipper a) + a +x:[a] +xs' -> Zipper a -> Maybe (Zipper a) forall a. a -> Maybe a Just (Zipper a -> Maybe (Zipper a)) -> Zipper a -> Maybe (Zipper a) forall a b. (a -> b) -> a -> b $ [a] -> [a] -> Zipper a forall a. [a] -> [a] -> Zipper a Zipper [a] -xs' (a -xa -> [a] -> [a] +xs' (a +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -ys) +ys) -- | Computes all nexts, even one that has no elements initially or at -- the end. @@ -150,7 +150,7 @@ -- Zipper [3,2,1] [4,5] -- Zipper [4,3,2,1] [5] -- Zipper [5,4,3,2,1] [] -allNexts :: Zipper a -> [Zipper a] +allNexts :: Zipper a -> [Zipper a] allNexts :: forall a. Zipper a -> [Zipper a] allNexts = (Maybe (Zipper a) -> Maybe (Zipper a, Maybe (Zipper a))) -> Maybe (Zipper a) -> [Zipper a] @@ -159,12 +159,12 @@ -> Maybe (Zipper a) -> Maybe (Zipper a, Maybe (Zipper a)) forall a b. (a -> b) -> Maybe a -> Maybe b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\Zipper a -z -> (Zipper a -z,Zipper a -> Maybe (Zipper a) +fmap (\Zipper a +z -> (Zipper a +z,Zipper a -> Maybe (Zipper a) forall a. Zipper a -> Maybe (Zipper a) goNext Zipper a -z))) (Maybe (Zipper a) -> [Zipper a]) +z))) (Maybe (Zipper a) -> [Zipper a]) -> (Zipper a -> Maybe (Zipper a)) -> Zipper a -> [Zipper a] forall b c a. (b -> c) -> (a -> b) -> a -> c . Zipper a -> Maybe (Zipper a) @@ -172,31 +172,31 @@ Just -- | Returns the next element, and the zipper without it -extractNext :: Zipper a -> Maybe (a, Zipper a) +extractNext :: Zipper a -> Maybe (a, Zipper a) extractNext :: forall a. Zipper a -> Maybe (a, Zipper a) -extractNext (Zipper [a] -xs [a] -ys) = case [a] -ys of +extractNext (Zipper [a] +xs [a] +ys) = case [a] +ys of [] -> Maybe (a, Zipper a) forall a. Maybe a Nothing - (a -y:[a] -ys') -> (a, Zipper a) -> Maybe (a, Zipper a) + (a +y:[a] +ys') -> (a, Zipper a) -> Maybe (a, Zipper a) forall a. a -> Maybe a Just (a -y,[a] -> [a] -> Zipper a +y,[a] -> [a] -> Zipper a forall a. [a] -> [a] -> Zipper a Zipper [a] -xs [a] -ys') +xs [a] +ys') -- | Drops the next element in the zipper. -- -- running time: \(O(1)\) -dropNext :: Zipper a -> Maybe (Zipper a) +dropNext :: Zipper a -> Maybe (Zipper a) dropNext :: forall a. Zipper a -> Maybe (Zipper a) dropNext = ((a, Zipper a) -> Zipper a) -> Maybe (a, Zipper a) -> Maybe (Zipper a) @@ -221,17 +221,17 @@ -- Zipper [2,1] [3,4,5] -- Zipper [3,2,1] [4,5] -- Zipper [4,3,2,1] [5] -allNonEmptyNexts :: Zipper a -> [Zipper a] +allNonEmptyNexts :: Zipper a -> [Zipper a] allNonEmptyNexts :: forall a. Zipper a -> [Zipper a] allNonEmptyNexts = (Zipper a -> Maybe (Zipper a, Zipper a)) -> Zipper a -> [Zipper a] forall b a. (b -> Maybe (a, b)) -> b -> [a] -List.unfoldr (\Zipper a -z -> (Zipper a -z,) (Zipper a -> (Zipper a, Zipper a)) +List.unfoldr (\Zipper a +z -> (Zipper a +z,) (Zipper a -> (Zipper a, Zipper a)) -> Maybe (Zipper a) -> Maybe (Zipper a, Zipper a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Zipper a -> Maybe (Zipper a) forall a. Zipper a -> Maybe (Zipper a) goNext Zipper a -z) +z) \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Class.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Class.html index 595c3b6a8..4ce110a27 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Class.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Class.html @@ -14,29 +14,29 @@ ) where -- | Things that can be measured. -class Measured f a where +class Measured f a where -- | Given a single a, measure it into someting of type 'f a'. - measure :: a -> f a + measure :: a -> f a -- | Things that can be inserted. -class Measured f a => CanInsert f a where +class Measured f a => CanInsert f a where {-# MINIMAL #-} -- | Delete an element form the associated structure - insertMeasure :: a -> f a -> f a - default insertMeasure :: (Semigroup (f a)) => a -> f a -> f a - insertMeasure a -x f a -m = a -> f a + insertMeasure :: a -> f a -> f a + default insertMeasure :: (Semigroup (f a)) => a -> f a -> f a + insertMeasure a +x f a +m = a -> f a forall (f :: * -> *) a. Measured f a => a -> f a measure a -x f a -> f a -> f a +x f a -> f a -> f a forall a. Semigroup a => a -> a -> a <> f a -m +m -- | Things that can be deleted. -class Measured f a => CanDelete f a where +class Measured f a => CanDelete f a where -- | Delete the element from the structure. Returns a Maybe since the structure may be -- empty after deletion (and that may not be representable by f). - deleteMeasure :: a -> f a -> Maybe (f a) + deleteMeasure :: a -> f a -> Maybe (f a) \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Report.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Report.html index 1f2f51a57..c03056821 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Report.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Report.html @@ -28,8 +28,8 @@ -- -- The result is internally represented as a binary tree, so that we can guarantee O(1) -- time and space (<>). -newtype Report a = MkReport (Maybe (Report1 a)) - deriving (Int -> Report a -> ShowS +newtype Report a = MkReport (Maybe (Report1 a)) + deriving (Int -> Report a -> ShowS [Report a] -> ShowS Report a -> String (Int -> Report a -> ShowS) @@ -45,7 +45,7 @@ show :: Report a -> String $cshowList :: forall a. Show a => [Report a] -> ShowS showList :: [Report a] -> ShowS -Show,Report a -> Report a -> Bool +Show,Report a -> Report a -> Bool (Report a -> Report a -> Bool) -> (Report a -> Report a -> Bool) -> Eq (Report a) forall a. Eq a => Report a -> Report a -> Bool @@ -54,7 +54,7 @@ == :: Report a -> Report a -> Bool $c/= :: forall a. Eq a => Report a -> Report a -> Bool /= :: Report a -> Report a -> Bool -Eq,Eq (Report a) +Eq,Eq (Report a) Eq (Report a) => (Report a -> Report a -> Ordering) -> (Report a -> Report a -> Bool) @@ -95,7 +95,7 @@ max :: Report a -> Report a -> Report a $cmin :: forall a. Ord a => Report a -> Report a -> Report a min :: Report a -> Report a -> Report a -Ord,(forall a b. (a -> b) -> Report a -> Report b) +Ord,(forall a b. (a -> b) -> Report a -> Report b) -> (forall a b. a -> Report b -> Report a) -> Functor Report forall a b. a -> Report b -> Report a forall a b. (a -> b) -> Report a -> Report b @@ -106,7 +106,7 @@ fmap :: forall a b. (a -> b) -> Report a -> Report b $c<$ :: forall a b. a -> Report b -> Report a <$ :: forall a b. a -> Report b -> Report a -Functor,(forall m. Monoid m => Report m -> m) +Functor,(forall m. Monoid m => Report m -> m) -> (forall m a. Monoid m => (a -> m) -> Report a -> m) -> (forall m a. Monoid m => (a -> m) -> Report a -> m) -> (forall a b. (a -> b -> b) -> b -> Report a -> b) @@ -188,7 +188,7 @@ sum :: forall a. Num a => Report a -> a $cproduct :: forall a. Num a => Report a -> a product :: forall a. Num a => Report a -> a -Foldable,Functor Report +Foldable,Functor Report Foldable Report (Functor Report, Foldable Report) => (forall (f :: * -> *) a b. @@ -248,22 +248,22 @@ Traversable) -- | Get the results of a Report as a list. -pattern Report :: [a] -> Report a +pattern Report :: [a] -> Report a pattern $mReport :: forall {r} {a}. Report a -> ([a] -> r) -> ((# #) -> r) -> r -Report xs <- (F.toList -> xs) +Report xs <- (F.toList -> xs) {-# COMPLETE Report #-} -instance Semigroup (Report a) where - (MkReport Maybe (Report1 a) -m) <> :: Report a -> Report a -> Report a -<> (MkReport Maybe (Report1 a) -m') = Maybe (Report1 a) -> Report a +instance Semigroup (Report a) where + (MkReport Maybe (Report1 a) +m) <> :: Report a -> Report a -> Report a +<> (MkReport Maybe (Report1 a) +m') = Maybe (Report1 a) -> Report a forall a. Maybe (Report1 a) -> Report a MkReport (Maybe (Report1 a) -> Report a) -> Maybe (Report1 a) -> Report a forall a b. (a -> b) -> a -> b $ case (Maybe (Report1 a) -m,Maybe (Report1 a) -m') of +m,Maybe (Report1 a) +m') of (Maybe (Report1 a) Nothing, Maybe (Report1 a) Nothing) -> Maybe (Report1 a) @@ -272,34 +272,34 @@ (Maybe (Report1 a) Nothing, Just Report1 a _) -> Maybe (Report1 a) -m' +m' (Just Report1 a _, Maybe (Report1 a) Nothing) -> Maybe (Report1 a) -m - (Just Report1 a -l, Just Report1 a -r) -> Report1 a -> Maybe (Report1 a) +m + (Just Report1 a +l, Just Report1 a +r) -> Report1 a -> Maybe (Report1 a) forall a. a -> Maybe a Just (Report1 a -> Maybe (Report1 a)) -> Report1 a -> Maybe (Report1 a) forall a b. (a -> b) -> a -> b $ Report1 a -l Report1 a -> Report1 a -> Report1 a +l Report1 a -> Report1 a -> Report1 a forall a. Semigroup a => a -> a -> a <> Report1 a -r +r -instance Monoid (Report a) where - mempty :: Report a +instance Monoid (Report a) where + mempty :: Report a mempty = Maybe (Report1 a) -> Report a forall a. Maybe (Report1 a) -> Report a MkReport Maybe (Report1 a) forall a. Maybe a Nothing -instance Measured Report a where - measure :: a -> Report a -measure = Maybe (Report1 a) -> Report a +instance Measured Report a where + measure :: a -> Report a +measure = Maybe (Report1 a) -> Report a forall a. Maybe (Report1 a) -> Report a MkReport (Maybe (Report1 a) -> Report a) -> (a -> Maybe (Report1 a)) -> a -> Report a @@ -313,19 +313,19 @@ forall (f :: * -> *) a. Measured f a => a -> f a measure -instance CanInsert Report a where - insertMeasure :: a -> Report a -> Report a -insertMeasure a -x (MkReport Maybe (Report1 a) -m) = case Maybe (Report1 a) -m of +instance CanInsert Report a where + insertMeasure :: a -> Report a -> Report a +insertMeasure a +x (MkReport Maybe (Report1 a) +m) = case Maybe (Report1 a) +m of Maybe (Report1 a) Nothing -> a -> Report a forall (f :: * -> *) a. Measured f a => a -> f a measure a -x - Just Report1 a -xs -> Maybe (Report1 a) -> Report a +x + Just Report1 a +xs -> Maybe (Report1 a) -> Report a forall a. Maybe (Report1 a) -> Report a MkReport (Maybe (Report1 a) -> Report a) -> (Report1 a -> Maybe (Report1 a)) -> Report1 a -> Report a @@ -337,15 +337,15 @@ $ a -> Report1 a -> Report1 a forall (f :: * -> *) a. CanInsert f a => a -> f a -> f a insertMeasure a -x Report1 a -xs +x Report1 a +xs -------------------------------------------------------------------------------- -- | Type to represent reporting elements. The result is represented as a binary tree so -- that we can support O(1) time and space (<>) -newtype Report1 a = Report1 (BinLeafTree (Const () a) a) - deriving (Int -> Report1 a -> ShowS +newtype Report1 a = Report1 (BinLeafTree (Const () a) a) + deriving (Int -> Report1 a -> ShowS [Report1 a] -> ShowS Report1 a -> String (Int -> Report1 a -> ShowS) @@ -363,7 +363,7 @@ show :: Report1 a -> String $cshowList :: forall a. Show a => [Report1 a] -> ShowS showList :: [Report1 a] -> ShowS -Show,Report1 a -> Report1 a -> Bool +Show,Report1 a -> Report1 a -> Bool (Report1 a -> Report1 a -> Bool) -> (Report1 a -> Report1 a -> Bool) -> Eq (Report1 a) forall a. Eq a => Report1 a -> Report1 a -> Bool @@ -372,7 +372,7 @@ == :: Report1 a -> Report1 a -> Bool $c/= :: forall a. Eq a => Report1 a -> Report1 a -> Bool /= :: Report1 a -> Report1 a -> Bool -Eq,Eq (Report1 a) +Eq,Eq (Report1 a) Eq (Report1 a) => (Report1 a -> Report1 a -> Ordering) -> (Report1 a -> Report1 a -> Bool) @@ -415,11 +415,11 @@ min :: Report1 a -> Report1 a -> Report1 a Ord) -instance Semigroup (Report1 a) where - (Report1 BinLeafTree (Const () a) a -l) <> :: Report1 a -> Report1 a -> Report1 a -<> (Report1 BinLeafTree (Const () a) a -r) = BinLeafTree (Const () a) a -> Report1 a +instance Semigroup (Report1 a) where + (Report1 BinLeafTree (Const () a) a +l) <> :: Report1 a -> Report1 a -> Report1 a +<> (Report1 BinLeafTree (Const () a) a +r) = BinLeafTree (Const () a) a -> Report1 a forall a. BinLeafTree (Const () a) a -> Report1 a Report1 (BinLeafTree (Const () a) a -> Report1 a) -> BinLeafTree (Const () a) a -> Report1 a @@ -431,16 +431,16 @@ forall v a. BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a Node BinLeafTree (Const () a) a -l Const () a +l Const () a forall a. Monoid a => a mempty BinLeafTree (Const () a) a -r +r -instance Functor Report1 where - fmap :: forall a b. (a -> b) -> Report1 a -> Report1 b -fmap a -> b -f (Report1 BinLeafTree (Const () a) a -t) = BinLeafTree (Const () b) b -> Report1 b +instance Functor Report1 where + fmap :: forall a b. (a -> b) -> Report1 a -> Report1 b +fmap a -> b +f (Report1 BinLeafTree (Const () a) a +t) = BinLeafTree (Const () b) b -> Report1 b forall a. BinLeafTree (Const () a) a -> Report1 a Report1 (BinLeafTree (Const () b) b -> Report1 b) -> (BinLeafTree (Const () a) b -> BinLeafTree (Const () b) b) @@ -459,27 +459,27 @@ -> BinLeafTree (Const () a) a -> BinLeafTree (Const () a) b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f BinLeafTree (Const () a) a -t +f BinLeafTree (Const () a) a +t -instance Foldable Report1 where - foldMap :: forall m a. Monoid m => (a -> m) -> Report1 a -> m -foldMap a -> m -f (Report1 BinLeafTree (Const () a) a -t) = (a -> m) -> BinLeafTree (Const () a) a -> m +instance Foldable Report1 where + foldMap :: forall m a. Monoid m => (a -> m) -> Report1 a -> m +foldMap a -> m +f (Report1 BinLeafTree (Const () a) a +t) = (a -> m) -> BinLeafTree (Const () a) a -> m forall m a. Monoid m => (a -> m) -> BinLeafTree (Const () a) a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f BinLeafTree (Const () a) a -t +f BinLeafTree (Const () a) a +t -instance Foldable1 Report1 where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> Report1 a -> m -foldMap1 a -> m -f (Report1 BinLeafTree (Const () a) a -t) = (a -> m) -> BinLeafTree (Const () a) a -> m +instance Foldable1 Report1 where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> Report1 a -> m +foldMap1 a -> m +f (Report1 BinLeafTree (Const () a) a +t) = (a -> m) -> BinLeafTree (Const () a) a -> m forall m a. Semigroup m => (a -> m) -> BinLeafTree (Const () a) a -> m @@ -487,16 +487,16 @@ (Foldable1 t, Semigroup m) => (a -> m) -> t a -> m foldMap1 a -> m -f BinLeafTree (Const () a) a -t +f BinLeafTree (Const () a) a +t -instance Traversable Report1 where - traverse :: forall (f :: * -> *) a b. +instance Traversable Report1 where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Report1 a -> f (Report1 b) -traverse a -> f b -f (Report1 BinLeafTree (Const () a) a -t) = BinLeafTree (Const () b) b -> Report1 b +traverse a -> f b +f (Report1 BinLeafTree (Const () a) a +t) = BinLeafTree (Const () b) b -> Report1 b forall a. BinLeafTree (Const () a) a -> Report1 a Report1 (BinLeafTree (Const () b) b -> Report1 b) -> (BinLeafTree (Const () a) b -> BinLeafTree (Const () b) b) @@ -518,16 +518,16 @@ (a -> f b) -> BinLeafTree (Const () a) a -> f (BinLeafTree (Const () a) b) traverse a -> f b -f BinLeafTree (Const () a) a -t +f BinLeafTree (Const () a) a +t -instance Traversable1 Report1 where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 Report1 where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Report1 a -> f (Report1 b) -traverse1 a -> f b -f (Report1 BinLeafTree (Const () a) a -t) = BinLeafTree (Const () b) b -> Report1 b +traverse1 a -> f b +f (Report1 BinLeafTree (Const () a) a +t) = BinLeafTree (Const () b) b -> Report1 b forall a. BinLeafTree (Const () a) a -> Report1 a Report1 (BinLeafTree (Const () b) b -> Report1 b) -> (BinLeafTree (Const () a) b -> BinLeafTree (Const () b) b) @@ -549,12 +549,12 @@ (a -> f b) -> BinLeafTree (Const () a) a -> f (BinLeafTree (Const () a) b) traverse1 a -> f b -f BinLeafTree (Const () a) a -t +f BinLeafTree (Const () a) a +t -instance Measured Report1 a where - measure :: a -> Report1 a +instance Measured Report1 a where + measure :: a -> Report1 a measure = BinLeafTree (Const () a) a -> Report1 a forall a. BinLeafTree (Const () a) a -> Report1 a Report1 (BinLeafTree (Const () a) a -> Report1 a) @@ -564,11 +564,11 @@ forall v a. a -> BinLeafTree v a Leaf -instance CanInsert Report1 a where - insertMeasure :: a -> Report1 a -> Report1 a -insertMeasure a -x (Report1 BinLeafTree (Const () a) a -xs) = BinLeafTree (Const () a) a -> Report1 a +instance CanInsert Report1 a where + insertMeasure :: a -> Report1 a -> Report1 a +insertMeasure a +x (Report1 BinLeafTree (Const () a) a +xs) = BinLeafTree (Const () a) a -> Report1 a forall a. BinLeafTree (Const () a) a -> Report1 a Report1 (BinLeafTree (Const () a) a -> Report1 a) -> BinLeafTree (Const () a) a -> Report1 a @@ -582,18 +582,18 @@ Node (a -> BinLeafTree (Const () a) a forall v a. a -> BinLeafTree v a Leaf a -x) Const () a +x) Const () a forall a. Monoid a => a mempty BinLeafTree (Const () a) a -xs +xs -------------------------------------------------------------------------------- -- | Report is a type to be used for reporting/collecting all results of a query. The -- result is directly represented as a list. -newtype ReportList a = ReportList [a] - deriving (Int -> ReportList a -> ShowS +newtype ReportList a = ReportList [a] + deriving (Int -> ReportList a -> ShowS [ReportList a] -> ShowS ReportList a -> String (Int -> ReportList a -> ShowS) @@ -611,7 +611,7 @@ show :: ReportList a -> String $cshowList :: forall a. Show a => [ReportList a] -> ShowS showList :: [ReportList a] -> ShowS -Show,ReportList a -> ReportList a -> Bool +Show,ReportList a -> ReportList a -> Bool (ReportList a -> ReportList a -> Bool) -> (ReportList a -> ReportList a -> Bool) -> Eq (ReportList a) forall a. Eq a => ReportList a -> ReportList a -> Bool @@ -620,7 +620,7 @@ == :: ReportList a -> ReportList a -> Bool $c/= :: forall a. Eq a => ReportList a -> ReportList a -> Bool /= :: ReportList a -> ReportList a -> Bool -Eq,Eq (ReportList a) +Eq,Eq (ReportList a) Eq (ReportList a) => (ReportList a -> ReportList a -> Ordering) -> (ReportList a -> ReportList a -> Bool) @@ -661,7 +661,7 @@ max :: ReportList a -> ReportList a -> ReportList a $cmin :: forall a. Ord a => ReportList a -> ReportList a -> ReportList a min :: ReportList a -> ReportList a -> ReportList a -Ord,NonEmpty (ReportList a) -> ReportList a +Ord,NonEmpty (ReportList a) -> ReportList a ReportList a -> ReportList a -> ReportList a (ReportList a -> ReportList a -> ReportList a) -> (NonEmpty (ReportList a) -> ReportList a) @@ -682,7 +682,7 @@ sconcat :: NonEmpty (ReportList a) -> ReportList a $cstimes :: forall a b. Integral b => b -> ReportList a -> ReportList a stimes :: forall b. Integral b => b -> ReportList a -> ReportList a -Semigroup,Semigroup (ReportList a) +Semigroup,Semigroup (ReportList a) ReportList a Semigroup (ReportList a) => ReportList a @@ -704,7 +704,7 @@ mappend :: ReportList a -> ReportList a -> ReportList a $cmconcat :: forall a. [ReportList a] -> ReportList a mconcat :: [ReportList a] -> ReportList a -Monoid,(forall a b. (a -> b) -> ReportList a -> ReportList b) +Monoid,(forall a b. (a -> b) -> ReportList a -> ReportList b) -> (forall a b. a -> ReportList b -> ReportList a) -> Functor ReportList forall a b. a -> ReportList b -> ReportList a @@ -716,7 +716,7 @@ fmap :: forall a b. (a -> b) -> ReportList a -> ReportList b $c<$ :: forall a b. a -> ReportList b -> ReportList a <$ :: forall a b. a -> ReportList b -> ReportList a -Functor,(forall m. Monoid m => ReportList m -> m) +Functor,(forall m. Monoid m => ReportList m -> m) -> (forall m a. Monoid m => (a -> m) -> ReportList a -> m) -> (forall m a. Monoid m => (a -> m) -> ReportList a -> m) -> (forall a b. (a -> b -> b) -> b -> ReportList a -> b) @@ -798,7 +798,7 @@ sum :: forall a. Num a => ReportList a -> a $cproduct :: forall a. Num a => ReportList a -> a product :: forall a. Num a => ReportList a -> a -Foldable,Functor ReportList +Foldable,Functor ReportList Foldable ReportList (Functor ReportList, Foldable ReportList) => (forall (f :: * -> *) a b. @@ -863,8 +863,8 @@ ReportList (m a) -> m (ReportList a) Traversable) -instance Measured ReportList a where - measure :: a -> ReportList a +instance Measured ReportList a where + measure :: a -> ReportList a measure = [a] -> ReportList a forall a. [a] -> ReportList a ReportList ([a] -> ReportList a) -> (a -> [a]) -> a -> ReportList a @@ -873,24 +873,24 @@ forall a. a -> [a] -> [a] :[]) -instance CanInsert ReportList a where - insertMeasure :: a -> ReportList a -> ReportList a -insertMeasure a -x (ReportList [a] -xs) = [a] -> ReportList a +instance CanInsert ReportList a where + insertMeasure :: a -> ReportList a -> ReportList a +insertMeasure a +x (ReportList [a] +xs) = [a] -> ReportList a forall a. [a] -> ReportList a ReportList (a -xa -> [a] -> [a] +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -xs) +xs) -instance Eq a => CanDelete ReportList a where +instance Eq a => CanDelete ReportList a where -- | Removes the first occurance of the element - deleteMeasure :: a -> ReportList a -> Maybe (ReportList a) -deleteMeasure a -x (ReportList [a] -xs) = ReportList a -> Maybe (ReportList a) + deleteMeasure :: a -> ReportList a -> Maybe (ReportList a) +deleteMeasure a +x (ReportList [a] +xs) = ReportList a -> Maybe (ReportList a) forall a. a -> Maybe a Just (ReportList a -> Maybe (ReportList a)) -> ([a] -> ReportList a) -> [a] -> Maybe (ReportList a) @@ -902,6 +902,6 @@ $ a -> [a] -> [a] forall a. Eq a => a -> [a] -> [a] List.delete a -x [a] -xs +x [a] +xs \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Size.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Size.html index eb78ec248..e269840e5 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Size.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Measured.Size.html @@ -19,8 +19,8 @@ -------------------------------------------------------------------------------- -- | Measured size or count. The result is always non-negative. -newtype Count a = Count Word - deriving stock (Int -> Count a -> ShowS +newtype Count a = Count Word + deriving stock (Int -> Count a -> ShowS [Count a] -> ShowS Count a -> String (Int -> Count a -> ShowS) @@ -36,7 +36,7 @@ show :: Count a -> String $cshowList :: forall k (a :: k). [Count a] -> ShowS showList :: [Count a] -> ShowS -Show,ReadPrec [Count a] +Show,ReadPrec [Count a] ReadPrec (Count a) Int -> ReadS (Count a) ReadS [Count a] @@ -60,7 +60,7 @@ readPrec :: ReadPrec (Count a) $creadListPrec :: forall k (a :: k). ReadPrec [Count a] readListPrec :: ReadPrec [Count a] -Read,Count a -> Count a -> Bool +Read,Count a -> Count a -> Bool (Count a -> Count a -> Bool) -> (Count a -> Count a -> Bool) -> Eq (Count a) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -69,7 +69,7 @@ == :: Count a -> Count a -> Bool $c/= :: forall k (a :: k). Count a -> Count a -> Bool /= :: Count a -> Count a -> Bool -Eq,Eq (Count a) +Eq,Eq (Count a) Eq (Count a) => (Count a -> Count a -> Ordering) -> (Count a -> Count a -> Bool) @@ -110,7 +110,7 @@ max :: Count a -> Count a -> Count a $cmin :: forall k (a :: k). Count a -> Count a -> Count a min :: Count a -> Count a -> Count a -Ord,(forall x. Count a -> Rep (Count a) x) +Ord,(forall x. Count a -> Rep (Count a) x) -> (forall x. Rep (Count a) x -> Count a) -> Generic (Count a) forall x. Rep (Count a) x -> Count a forall x. Count a -> Rep (Count a) x @@ -123,14 +123,14 @@ $cto :: forall k (a :: k) x. Rep (Count a) x -> Count a to :: forall x. Rep (Count a) x -> Count a Generic) - deriving newtype (Count a -> () + deriving newtype (Count a -> () (Count a -> ()) -> NFData (Count a) forall a. (a -> ()) -> NFData a forall k (a :: k). Count a -> () $crnf :: forall k (a :: k). Count a -> () rnf :: Count a -> () NFData) - deriving (NonEmpty (Count a) -> Count a + deriving (NonEmpty (Count a) -> Count a Count a -> Count a -> Count a (Count a -> Count a -> Count a) -> (NonEmpty (Count a) -> Count a) @@ -151,7 +151,7 @@ sconcat :: NonEmpty (Count a) -> Count a $cstimes :: forall k (a :: k) b. Integral b => b -> Count a -> Count a stimes :: forall b. Integral b => b -> Count a -> Count a -Semigroup,Semigroup (Count a) +Semigroup,Semigroup (Count a) Count a Semigroup (Count a) => Count a @@ -175,9 +175,9 @@ mconcat :: [Count a] -> Count a Monoid) via Sum Word -instance Measured Count a where - measure :: a -> Count a -measure = Count a -> a -> Count a +instance Measured Count a where + measure :: a -> Count a +measure = Count a -> a -> Count a forall a b. a -> b -> a const (Count a -> a -> Count a) -> Count a -> a -> Count a forall a b. (a -> b) -> a -> b @@ -186,23 +186,23 @@ Count Word 1 -instance CanInsert Count a where - insertMeasure :: a -> Count a -> Count a -insertMeasure a -_ (Count Word -n) = Word -> Count a +instance CanInsert Count a where + insertMeasure :: a -> Count a -> Count a +insertMeasure a +_ (Count Word +n) = Word -> Count a forall {k} (a :: k). Word -> Count a Count (Word -nWord -> Word -> Word +nWord -> Word -> Word forall a. Num a => a -> a -> a +Word 1) -instance CanDelete Count a where - deleteMeasure :: a -> Count a -> Maybe (Count a) -deleteMeasure a -_ (Count Word -n) = Count a -> Maybe (Count a) +instance CanDelete Count a where + deleteMeasure :: a -> Count a -> Maybe (Count a) +deleteMeasure a +_ (Count Word +n) = Count a -> Maybe (Count a) forall a. a -> Maybe a Just (Count a -> Maybe (Count a)) -> (Word -> Count a) -> Word -> Maybe (Count a) @@ -215,7 +215,7 @@ forall a. Ord a => a -> a -> a max Word 0 (Word -nWord -> Word -> Word +nWord -> Word -> Word forall a. Num a => a -> a -> a -Word 1) @@ -232,8 +232,8 @@ -------------------------------------------------------------------------------- -- | Things that have a size -data Sized a = Sized {-# UNPACK #-} !(Count a) a - deriving (Int -> Sized a -> ShowS +data Sized a = Sized {-# UNPACK #-} !(Count a) a + deriving (Int -> Sized a -> ShowS [Sized a] -> ShowS Sized a -> String (Int -> Sized a -> ShowS) @@ -249,7 +249,7 @@ show :: Sized a -> String $cshowList :: forall a. Show a => [Sized a] -> ShowS showList :: [Sized a] -> ShowS -Show,Sized a -> Sized a -> Bool +Show,Sized a -> Sized a -> Bool (Sized a -> Sized a -> Bool) -> (Sized a -> Sized a -> Bool) -> Eq (Sized a) forall a. Eq a => Sized a -> Sized a -> Bool @@ -258,7 +258,7 @@ == :: Sized a -> Sized a -> Bool $c/= :: forall a. Eq a => Sized a -> Sized a -> Bool /= :: Sized a -> Sized a -> Bool -Eq,Eq (Sized a) +Eq,Eq (Sized a) Eq (Sized a) => (Sized a -> Sized a -> Ordering) -> (Sized a -> Sized a -> Bool) @@ -299,7 +299,7 @@ max :: Sized a -> Sized a -> Sized a $cmin :: forall a. Ord a => Sized a -> Sized a -> Sized a min :: Sized a -> Sized a -> Sized a -Ord,(forall x. Sized a -> Rep (Sized a) x) +Ord,(forall x. Sized a -> Rep (Sized a) x) -> (forall x. Rep (Sized a) x -> Sized a) -> Generic (Sized a) forall x. Rep (Sized a) x -> Sized a forall x. Sized a -> Rep (Sized a) x @@ -312,67 +312,67 @@ $cto :: forall a x. Rep (Sized a) x -> Sized a to :: forall x. Rep (Sized a) x -> Sized a Generic) -instance NFData a => NFData (Sized a) +instance NFData a => NFData (Sized a) -instance Functor Sized where - fmap :: forall a b. (a -> b) -> Sized a -> Sized b -fmap a -> b -f (Sized Count a -c a -a) = Count b -> b -> Sized b +instance Functor Sized where + fmap :: forall a b. (a -> b) -> Sized a -> Sized b +fmap a -> b +f (Sized Count a +c a +a) = Count b -> b -> Sized b forall a. Count a -> a -> Sized a Sized (Count a -> Count b forall a b. Coercible a b => a -> b coerce Count a -c) (a -> b -f a -a) -instance Foldable Sized where - foldMap :: forall m a. Monoid m => (a -> m) -> Sized a -> m -foldMap a -> m -f (Sized Count a -_ a -a) = a -> m -f a -a -instance Traversable Sized where - traverse :: forall (f :: * -> *) a b. +c) (a -> b +f a +a) +instance Foldable Sized where + foldMap :: forall m a. Monoid m => (a -> m) -> Sized a -> m +foldMap a -> m +f (Sized Count a +_ a +a) = a -> m +f a +a +instance Traversable Sized where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Sized a -> f (Sized b) -traverse a -> f b -f (Sized Count a -c a -a) = Count b -> b -> Sized b +traverse a -> f b +f (Sized Count a +c a +a) = Count b -> b -> Sized b forall a. Count a -> a -> Sized a Sized (Count a -> Count b forall a b. Coercible a b => a -> b coerce Count a -c) (b -> Sized b) -> f b -> f (Sized b) +c) (b -> Sized b) -> f b -> f (Sized b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -a +f a +a -instance Semigroup a => Semigroup (Sized a) where - (Sized Count a -i a -a) <> :: Sized a -> Sized a -> Sized a -<> (Sized Count a -j a -b) = Count a -> a -> Sized a +instance Semigroup a => Semigroup (Sized a) where + (Sized Count a +i a +a) <> :: Sized a -> Sized a -> Sized a +<> (Sized Count a +j a +b) = Count a -> a -> Sized a forall a. Count a -> a -> Sized a Sized (Count a -i Count a -> Count a -> Count a +i Count a -> Count a -> Count a forall a. Semigroup a => a -> a -> a <> Count a -j) (a -a a -> a -> a +j) (a +a a -> a -> a forall a. Semigroup a => a -> a -> a <> a -b) +b) -instance Monoid a => Monoid (Sized a) where - mempty :: Sized a +instance Monoid a => Monoid (Sized a) where + mempty :: Sized a mempty = Count a -> a -> Sized a forall a. Count a -> a -> Sized a Sized Count a diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.NonEmpty.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.NonEmpty.Util.html index ca04e4283..b498c8aa7 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.NonEmpty.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.NonEmpty.Util.html @@ -21,64 +21,64 @@ -- -- >>> extractMinimaBy compare $ NonEmpty.fromList [1,2,3,0,1,2,3,0,1,2,0,2] -- 0 :| [0,0] :+ [2,3,1,2,3,1,2,1,2] -extractMinimaBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] +extractMinimaBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] extractMinimaBy :: forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] -extractMinimaBy a -> a -> Ordering -cmp (a -x:|[a] -xs) = (a -> (NonEmpty a :+ [a]) -> NonEmpty a :+ [a]) +extractMinimaBy a -> a -> Ordering +cmp (a +x:|[a] +xs) = (a -> (NonEmpty a :+ [a]) -> NonEmpty a :+ [a]) -> (NonEmpty a :+ [a]) -> [a] -> NonEmpty a :+ [a] forall a b. (a -> b -> b) -> b -> [a] -> b forall (t :: * -> *) a b. Foldable t => (a -> b -> b) -> b -> t a -> b -foldr (\a -y (mins :: NonEmpty a -mins@(a -m:|[a] -_) :+ [a] -rest) -> case a -m a -> a -> Ordering -`cmp` a -y of +foldr (\a +y (mins :: NonEmpty a +mins@(a +m:|[a] +_) :+ [a] +rest) -> case a +m a -> a -> Ordering +`cmp` a +y of Ordering LT -> NonEmpty a -mins NonEmpty a -> [a] -> NonEmpty a :+ [a] +mins NonEmpty a -> [a] -> NonEmpty a :+ [a] forall core extra. core -> extra -> core :+ extra :+ a -ya -> [a] -> [a] +ya -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -rest +rest Ordering EQ -> (a -y a -> NonEmpty a -> NonEmpty a +y a -> NonEmpty a -> NonEmpty a forall a. a -> NonEmpty a -> NonEmpty a NonEmpty.<| NonEmpty a -mins) NonEmpty a -> [a] -> NonEmpty a :+ [a] +mins) NonEmpty a -> [a] -> NonEmpty a :+ [a] forall core extra. core -> extra -> core :+ extra :+ [a] -rest +rest Ordering GT -> (a -ya -> [a] -> NonEmpty a +ya -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :|[]) NonEmpty a -> [a] -> NonEmpty a :+ [a] forall core extra. core -> extra -> core :+ extra :+ NonEmpty a -> [a] forall a. NonEmpty a -> [a] NonEmpty.toList NonEmpty a -mins [a] -> [a] -> [a] +mins [a] -> [a] -> [a] forall a. Semigroup a => a -> a -> a <> [a] -rest +rest ) ((a -xa -> [a] -> NonEmpty a +xa -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :|[]) NonEmpty a -> [a] -> NonEmpty a :+ [a] forall core extra. core -> extra -> core :+ extra :+ []) [a] -xs +xs -- TODO: This is actually a good scenario for testing how much slower :+ is compared -- to doing nothing. i..e compare minimaBy and extractMinimaBy -- note that I'm using foldr here, and foldl' before diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Radical.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Radical.html index a2c84a81a..7a9177f18 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Radical.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Radical.html @@ -20,16 +20,16 @@ -------------------------------------------------------------------------------- -- | Types that support taking a square root. -class Num r => Radical r where +class Num r => Radical r where -- | Computes the square root of the number - sqrt :: r -> r - default sqrt :: Floating r => r -> r - sqrt = r -> r + sqrt :: r -> r + default sqrt :: Floating r => r -> r + sqrt = r -> r forall a. Floating a => a -> a Prelude.sqrt -instance Radical Float -instance Radical Double +instance Radical Float +instance Radical Double -- instance Radical (DoubleRelAbs abs rel) -- instance Radical (SDouble n) -- instance Radical Shaman diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Ratio.Generalized.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Ratio.Generalized.html index afd666169..bbc6ef7e6 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Ratio.Generalized.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Ratio.Generalized.html @@ -24,8 +24,8 @@ -- quickly! -- -- invariant: the denominator is not zero -data GRatio a = !a :% !a - deriving (Int -> GRatio a -> ShowS +data GRatio a = !a :% !a + deriving (Int -> GRatio a -> ShowS [GRatio a] -> ShowS GRatio a -> String (Int -> GRatio a -> ShowS) @@ -44,219 +44,219 @@ Show) -- | Get the numerator -numerator :: GRatio a -> a +numerator :: GRatio a -> a numerator :: forall a. GRatio a -> a -numerator (a -a :% a +numerator (a +a :% a _) = a -a +a -- | Get the denominator -denominator :: GRatio a -> a +denominator :: GRatio a -> a denominator :: forall a. GRatio a -> a denominator (a -_ :% a -b) = a -b +_ :% a +b) = a +b -- | smart constructor to construct a GRatio. Throws an exception if -- the denominator is zero. -(%) :: (Eq a, Num a) => a -> a -> GRatio a +(%) :: (Eq a, Num a) => a -> a -> GRatio a a _ % :: forall a. (Eq a, Num a) => a -> a -> GRatio a % a 0 = GRatio a forall a. a Ratio.ratioZeroDenominatorError -a -a % a -b = a -a a -> a -> GRatio a +a +a % a +b = a +a a -> a -> GRatio a forall a. a -> a -> GRatio a :% a -b +b -instance (Eq a, Num a) => Eq (GRatio a) where - (a -a :% a -b) == :: GRatio a -> GRatio a -> Bool -== (a -c :% a -d) = a -aa -> a -> a +instance (Eq a, Num a) => Eq (GRatio a) where + (a +a :% a +b) == :: GRatio a -> GRatio a -> Bool +== (a +c :% a +d) = a +aa -> a -> a forall a. Num a => a -> a -> a *a -d a -> a -> Bool +d a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -ba -> a -> a +ba -> a -> a forall a. Num a => a -> a -> a *a -c -- by invariant b and d are non-zero +c -- by invariant b and d are non-zero {-# INLINABLE (==) #-} -instance (Ord a, Num a) => Ord (GRatio a) where - (a -a :% a -b) compare :: GRatio a -> GRatio a -> Ordering -`compare` (a -c :% a -d) +instance (Ord a, Num a) => Ord (GRatio a) where + (a +a :% a +b) compare :: GRatio a -> GRatio a -> Ordering +`compare` (a +c :% a +d) | a -> a forall a. Num a => a -> a signum a -b a -> a -> Bool +b a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -> a forall a. Num a => a -> a signum a -d = (a -aa -> a -> a +d = (a +aa -> a -> a forall a. Num a => a -> a -> a *a -d) a -> a -> Ordering +d) a -> a -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (a -ba -> a -> a +ba -> a -> a forall a. Num a => a -> a -> a *a -c) -- by invariant b and d are non-zero +c) -- by invariant b and d are non-zero | Bool otherwise = (a -ba -> a -> a +ba -> a -> a forall a. Num a => a -> a -> a *a -c) a -> a -> Ordering +c) a -> a -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (a -aa -> a -> a +aa -> a -> a forall a. Num a => a -> a -> a *a -d) -- by invariant b and d are non-zero +d) -- by invariant b and d are non-zero -instance (Num a, Eq a) => Num (GRatio a) where - (a -a :% a -b) + :: GRatio a -> GRatio a -> GRatio a -+ (a -c :% a -d) = (a -aa -> a -> a +instance (Num a, Eq a) => Num (GRatio a) where + (a +a :% a +b) + :: GRatio a -> GRatio a -> GRatio a ++ (a +c :% a +d) = (a +aa -> a -> a forall a. Num a => a -> a -> a *a -d a -> a -> a +d a -> a -> a forall a. Num a => a -> a -> a + a -ba -> a -> a +ba -> a -> a forall a. Num a => a -> a -> a *a -c) a -> a -> GRatio a +c) a -> a -> GRatio a forall a. a -> a -> GRatio a :% (a -ba -> a -> a +ba -> a -> a forall a. Num a => a -> a -> a *a -d) +d) -- since b and d where non-zero, b*d is also non-zero - negate :: GRatio a -> GRatio a -negate (a -a :% a -b) = a -> a + negate :: GRatio a -> GRatio a +negate (a +a :% a +b) = a -> a forall a. Num a => a -> a negate a -a a -> a -> GRatio a +a a -> a -> GRatio a forall a. a -> a -> GRatio a :% a -b +b -- b was non-zero, it remains non-zero - (a -a :% a -b) * :: GRatio a -> GRatio a -> GRatio a -* (a -c :% a -d) = (a -aa -> a -> a + (a +a :% a +b) * :: GRatio a -> GRatio a -> GRatio a +* (a +c :% a +d) = (a +aa -> a -> a forall a. Num a => a -> a -> a *a -c) a -> a -> GRatio a +c) a -> a -> GRatio a forall a. a -> a -> GRatio a :% (a -ba -> a -> a +ba -> a -> a forall a. Num a => a -> a -> a *a -d) +d) -- since b and d where non-zero, b*d is also non-zero - fromInteger :: Integer -> GRatio a -fromInteger Integer -x = Integer -> a + fromInteger :: Integer -> GRatio a +fromInteger Integer +x = Integer -> a forall a. Num a => Integer -> a fromInteger Integer -x a -> a -> GRatio a +x a -> a -> GRatio a forall a. a -> a -> GRatio a :% a 1 - signum :: GRatio a -> GRatio a -signum (a -a :% a -b) = (a -> a + signum :: GRatio a -> GRatio a +signum (a +a :% a +b) = (a -> a forall a. Num a => a -> a signum a -a a -> a -> a +a a -> a -> a forall a. Num a => a -> a -> a * a -> a forall a. Num a => a -> a signum a -b) a -> a -> GRatio a +b) a -> a -> GRatio a forall a. a -> a -> GRatio a :% a 1 -- by invariant b cannot be zero, so signum b cannot be zero either. - abs :: GRatio a -> GRatio a -abs GRatio a -x | GRatio a -> GRatio a + abs :: GRatio a -> GRatio a +abs GRatio a +x | GRatio a -> GRatio a forall a. Num a => a -> a signum GRatio a -x GRatio a -> GRatio a -> Bool +x GRatio a -> GRatio a -> Bool forall a. Eq a => a -> a -> Bool == -GRatio a 1 = (-GRatio a 1)GRatio a -> GRatio a -> GRatio a forall a. Num a => a -> a -> a *GRatio a -x +x | Bool otherwise = GRatio a -x +x -instance (Num a, Eq a) => Fractional (GRatio a) where - fromRational :: Rational -> GRatio a -fromRational (Integer -a Ratio.:% Integer -b)= Integer -> a +instance (Num a, Eq a) => Fractional (GRatio a) where + fromRational :: Rational -> GRatio a +fromRational (Integer +a Ratio.:% Integer +b)= Integer -> a forall a. Num a => Integer -> a fromInteger Integer -a a -> a -> GRatio a +a a -> a -> GRatio a forall a. a -> a -> GRatio a :% Integer -> a forall a. Num a => Integer -> a fromInteger Integer -b - (a -a :% a -b) / :: GRatio a -> GRatio a -> GRatio a -/ (a -c :% a -d) = (a -aa -> a -> a +b + (a +a :% a +b) / :: GRatio a -> GRatio a -> GRatio a +/ (a +c :% a +d) = (a +aa -> a -> a forall a. Num a => a -> a -> a *a -d) a -> a -> GRatio a +d) a -> a -> GRatio a forall a. (Eq a, Num a) => a -> a -> GRatio a % (a -ba -> a -> a +ba -> a -> a forall a. Num a => a -> a -> a *a -c) +c) -- b is non-zero, but c may be zero, so in that case we would be -- dividing by zero. however, if c is zero then (c % d) would be -- zero, so there is no need to explicitly handle that; i.e. that diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Rational.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Rational.html index 6c11b4111..54cf663ee 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Rational.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Rational.html @@ -1,4 +1,4 @@ -
{-# LANGUAGE DeriveDataTypeable #-}
+
{-# LANGUAGE DeriveDataTypeable #-}
 --------------------------------------------------------------------------------
 -- |
 -- Module      :  HGeometry.Number.Real.Rational
@@ -38,8 +38,8 @@
 --
 -- If the number cannot be displayed exactly a '~' is printed after
 -- the number.
-newtype RealNumber (p :: Nat) = RealNumber Rational
-  deriving (RealNumber p -> RealNumber p -> Bool
+newtype RealNumber (p :: Nat) = RealNumber Rational
+  deriving (RealNumber p -> RealNumber p -> Bool
 (RealNumber p -> RealNumber p -> Bool)
 -> (RealNumber p -> RealNumber p -> Bool) -> Eq (RealNumber p)
 forall (p :: Nat). RealNumber p -> RealNumber p -> Bool
@@ -48,7 +48,7 @@
 == :: RealNumber p -> RealNumber p -> Bool
 $c/= :: forall (p :: Nat). RealNumber p -> RealNumber p -> Bool
 /= :: RealNumber p -> RealNumber p -> Bool
-Eq,Eq (RealNumber p)
+Eq,Eq (RealNumber p)
 Eq (RealNumber p) =>
 (RealNumber p -> RealNumber p -> Ordering)
 -> (RealNumber p -> RealNumber p -> Bool)
@@ -89,7 +89,7 @@
 max :: RealNumber p -> RealNumber p -> RealNumber p
 $cmin :: forall (p :: Nat). RealNumber p -> RealNumber p -> RealNumber p
 min :: RealNumber p -> RealNumber p -> RealNumber p
-Ord,Typeable (RealNumber p)
+Ord,Typeable (RealNumber p)
 Typeable (RealNumber p) =>
 (forall (c :: * -> *).
  (forall d b. Data d => c (d -> b) -> d -> c b)
@@ -306,7 +306,7 @@
 gmapMo :: forall (m :: * -> *).
 MonadPlus m =>
 (forall d. Data d => d -> m d) -> RealNumber p -> m (RealNumber p)
-Data,Integer -> RealNumber p
+Data,Integer -> RealNumber p
 RealNumber p -> RealNumber p
 RealNumber p -> RealNumber p -> RealNumber p
 (RealNumber p -> RealNumber p -> RealNumber p)
@@ -343,7 +343,7 @@
 signum :: RealNumber p -> RealNumber p
 $cfromInteger :: forall (p :: Nat). Integer -> RealNumber p
 fromInteger :: Integer -> RealNumber p
-Num,Num (RealNumber p)
+Num,Num (RealNumber p)
 Num (RealNumber p) =>
 (RealNumber p -> RealNumber p -> RealNumber p)
 -> (RealNumber p -> RealNumber p)
@@ -365,7 +365,7 @@
 recip :: RealNumber p -> RealNumber p
 $cfromRational :: forall (p :: Nat). Rational -> RealNumber p
 fromRational :: Rational -> RealNumber p
-Fractional,Num (RealNumber p)
+Fractional,Num (RealNumber p)
 Ord (RealNumber p)
 (Num (RealNumber p), Ord (RealNumber p)) =>
 (RealNumber p -> Rational) -> Real (RealNumber p)
@@ -376,7 +376,7 @@
 forall a. (Num a, Ord a) => (a -> Rational) -> Real a
 $ctoRational :: forall (p :: Nat). RealNumber p -> Rational
 toRational :: RealNumber p -> Rational
-Real,Fractional (RealNumber p)
+Real,Fractional (RealNumber p)
 Real (RealNumber p)
 (Real (RealNumber p), Fractional (RealNumber p)) =>
 (forall b. Integral b => RealNumber p -> (b, RealNumber p))
@@ -413,7 +413,7 @@
 ceiling :: forall b. Integral b => RealNumber p -> b
 $cfloor :: forall (p :: Nat) b. Integral b => RealNumber p -> b
 floor :: forall b. Integral b => RealNumber p -> b
-RealFrac,(forall x. RealNumber p -> Rep (RealNumber p) x)
+RealFrac,(forall x. RealNumber p -> Rep (RealNumber p) x)
 -> (forall x. Rep (RealNumber p) x -> RealNumber p)
 -> Generic (RealNumber p)
 forall (p :: Nat) x. Rep (RealNumber p) x -> RealNumber p
@@ -426,7 +426,7 @@
 from :: forall x. RealNumber p -> Rep (RealNumber p) x
 $cto :: forall (p :: Nat) x. Rep (RealNumber p) x -> RealNumber p
 to :: forall x. Rep (RealNumber p) x -> RealNumber p
-Generic,[RealNumber p] -> Value
+Generic,[RealNumber p] -> Value
 [RealNumber p] -> Encoding
 RealNumber p -> Bool
 RealNumber p -> Value
@@ -459,7 +459,7 @@
 toEncodingList :: [RealNumber p] -> Encoding
 $comitField :: forall (p :: Nat). RealNumber p -> Bool
 omitField :: RealNumber p -> Bool
-ToJSON,Maybe (RealNumber p)
+ToJSON,Maybe (RealNumber p)
 Value -> Parser [RealNumber p]
 Value -> Parser (RealNumber p)
 (Value -> Parser (RealNumber p))
@@ -478,7 +478,7 @@
 parseJSONList :: Value -> Parser [RealNumber p]
 $comittedField :: forall (p :: Nat). Maybe (RealNumber p)
 omittedField :: Maybe (RealNumber p)
-FromJSON,RealNumber p -> ()
+FromJSON,RealNumber p -> ()
 (RealNumber p -> ()) -> NFData (RealNumber p)
 forall (p :: Nat). RealNumber p -> ()
 forall a. (a -> ()) -> NFData a
@@ -486,11 +486,11 @@
 rnf :: RealNumber p -> ()
 NFData)
 
-data NatPrec (p :: Nat) = NatPrec
+data NatPrec (p :: Nat) = NatPrec
 
-instance KnownNat p => HasResolution (NatPrec p) where
-  resolution :: forall (p :: * -> *). p (NatPrec p) -> Integer
-resolution p (NatPrec p)
+instance KnownNat p => HasResolution (NatPrec p) where
+  resolution :: forall (p :: * -> *). p (NatPrec p) -> Integer
+resolution p (NatPrec p)
 _ = Integer
 10 Integer -> Integer -> Integer
 forall a b. (Num a, Integral b) => a -> b -> a
@@ -499,21 +499,21 @@
 KnownNat n =>
 proxy n -> Integer
 natVal (forall (p :: Nat). NatPrec p
-NatPrec @p))
+NatPrec @p))
 
 
-instance KnownNat p => Show (RealNumber p) where
-  showsPrec :: Int -> RealNumber p -> ShowS
-showsPrec Int
-d RealNumber p
-r = Bool -> ShowS -> ShowS
+instance KnownNat p => Show (RealNumber p) where
+  showsPrec :: Int -> RealNumber p -> ShowS
+showsPrec Int
+d RealNumber p
+r = Bool -> ShowS -> ShowS
 showParen (Int
-d Int -> Int -> Bool
+d Int -> Int -> Bool
 forall a. Ord a => a -> a -> Bool
 > Int
-app_prec Bool -> Bool -> Bool
+app_prec Bool -> Bool -> Bool
 && RealNumber p
-r RealNumber p -> RealNumber p -> Bool
+r RealNumber p -> RealNumber p -> Bool
 forall a. Ord a => a -> a -> Bool
 < RealNumber p
 0) (ShowS -> ShowS) -> ShowS -> ShowS
@@ -524,9 +524,9 @@
 KnownNat p =>
 RealNumber p -> AsFixed (NatPrec p)
 asFixed RealNumber p
-r of
-      Exact Fixed (NatPrec p)
-p -> String -> ShowS
+r of
+      Exact Fixed (NatPrec p)
+p -> String -> ShowS
 showString ((Char -> Bool) -> ShowS
 forall a. (a -> Bool) -> [a] -> [a]
 dropWhileEnd (Char -> Char -> Bool
@@ -548,75 +548,75 @@
 show (Fixed (NatPrec p) -> String) -> Fixed (NatPrec p) -> String
 forall a b. (a -> b) -> a -> b
 $ Fixed (NatPrec p)
-p)
-      Lossy Fixed (NatPrec p)
-p -> Fixed (NatPrec p) -> ShowS
+p)
+      Lossy Fixed (NatPrec p)
+p -> Fixed (NatPrec p) -> ShowS
 forall a. Show a => a -> ShowS
 shows Fixed (NatPrec p)
-p ShowS -> ShowS -> ShowS
+p ShowS -> ShowS -> ShowS
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Char -> ShowS
 showChar Char
 '~'
     where
-      app_prec :: Int
-app_prec = Int
+      app_prec :: Int
+app_prec = Int
 10
 
-instance KnownNat p => Read (RealNumber p) where
-  readsPrec :: Int -> ReadS (RealNumber p)
-readsPrec Int
-i = ((Fixed (NatPrec p), String) -> (RealNumber p, String))
+instance KnownNat p => Read (RealNumber p) where
+  readsPrec :: Int -> ReadS (RealNumber p)
+readsPrec Int
+i = ((Fixed (NatPrec p), String) -> (RealNumber p, String))
 -> [(Fixed (NatPrec p), String)] -> [(RealNumber p, String)]
 forall a b. (a -> b) -> [a] -> [b]
 map (Fixed (NatPrec p), String) -> (RealNumber p, String)
 forall {a} {p :: Nat}.
 Real a =>
 (a, String) -> (RealNumber p, String)
-wrap ([(Fixed (NatPrec p), String)] -> [(RealNumber p, String)])
+wrap ([(Fixed (NatPrec p), String)] -> [(RealNumber p, String)])
 -> (String -> [(Fixed (NatPrec p), String)])
 -> ReadS (RealNumber p)
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . forall a. Read a => Int -> ReadS a
-readsPrec @(Fixed (NatPrec p)) Int
-i
+readsPrec @(Fixed (NatPrec p)) Int
+i
     where
-      wrap :: (a, String) -> (RealNumber p, String)
-wrap (Rational -> RealNumber p
+      wrap :: (a, String) -> (RealNumber p, String)
+wrap (Rational -> RealNumber p
 forall (p :: Nat). Rational -> RealNumber p
 RealNumber (Rational -> RealNumber p) -> (a -> Rational) -> a -> RealNumber p
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . a -> Rational
 forall a b. (Real a, Fractional b) => a -> b
-realToFrac -> RealNumber p
-x,String
-s') = case String
-s' of
+realToFrac -> RealNumber p
+x,String
+s') = case String
+s' of
                                                  Char
-'~':String
-s'' -> (RealNumber p
-x,String
-s'')
+'~':String
+s'' -> (RealNumber p
+x,String
+s'')
                                                  String
 _       -> (RealNumber p
-x,String
-s')
+x,String
+s')
 
-instance Random (RealNumber p) where
+instance Random (RealNumber p) where
   -- Generate a random number between a and b with 'maxBound `div` 2 :: Int' discrete increments.
-  randomR :: forall g.
+  randomR :: forall g.
 RandomGen g =>
 (RealNumber p, RealNumber p) -> g -> (RealNumber p, g)
-randomR (RealNumber p
-a,RealNumber p
-b) = Rand g (RealNumber p) -> g -> (RealNumber p, g)
+randomR (RealNumber p
+a,RealNumber p
+b) = Rand g (RealNumber p) -> g -> (RealNumber p, g)
 forall g a. Rand g a -> g -> (a, g)
 runRand (Rand g (RealNumber p) -> g -> (RealNumber p, g))
 -> Rand g (RealNumber p) -> g -> (RealNumber p, g)
 forall a b. (a -> b) -> a -> b
 $ do
-    RealNumber p
-v <- Rand g (RealNumber p)
+    RealNumber p
+v <- Rand g (RealNumber p)
 forall a. Random a => RandT g Identity a
 forall (m :: * -> *) a. (MonadRandom m, Random a) => m a
 getRandom
@@ -627,33 +627,33 @@
 -> RealNumber p -> Rand g (RealNumber p)
 forall a b. (a -> b) -> a -> b
 $ (RealNumber p
-bRealNumber p -> RealNumber p -> RealNumber p
+bRealNumber p -> RealNumber p -> RealNumber p
 forall a. Num a => a -> a -> a
 -RealNumber p
-a)RealNumber p -> RealNumber p -> RealNumber p
+a)RealNumber p -> RealNumber p -> RealNumber p
 forall a. Num a => a -> a -> a
 *RealNumber p -> RealNumber p
 forall a. Num a => a -> a
 abs RealNumber p
-v RealNumber p -> RealNumber p -> RealNumber p
+v RealNumber p -> RealNumber p -> RealNumber p
 forall a. Num a => a -> a -> a
 + RealNumber p
-a
+a
   -- Generate a random number between -1 and +1 with 'maxBound::Int' discrete increments.
-  random :: forall g. RandomGen g => g -> (RealNumber p, g)
-random = Rand g (RealNumber p) -> g -> (RealNumber p, g)
+  random :: forall g. RandomGen g => g -> (RealNumber p, g)
+random = Rand g (RealNumber p) -> g -> (RealNumber p, g)
 forall g a. Rand g a -> g -> (a, g)
 runRand (Rand g (RealNumber p) -> g -> (RealNumber p, g))
 -> Rand g (RealNumber p) -> g -> (RealNumber p, g)
 forall a b. (a -> b) -> a -> b
 $ do
-    Int
-v <- RandT g Identity Int
+    Int
+v <- RandT g Identity Int
 forall a. Random a => RandT g Identity a
 forall (m :: * -> *) a. (MonadRandom m, Random a) => m a
 getRandom
-    let fromInt :: Int -> Integer; fromInt :: Int -> Integer
-fromInt = Int -> Integer
+    let fromInt :: Int -> Integer; fromInt :: Int -> Integer
+fromInt = Int -> Integer
 forall a b. (Integral a, Num b) => a -> b
 fromIntegral
     RealNumber p -> Rand g (RealNumber p)
@@ -667,11 +667,11 @@
 RealNumber (Rational -> RealNumber p) -> Rational -> RealNumber p
 forall a b. (a -> b) -> a -> b
 $ Int -> Integer
-fromInt Int
-v Integer -> Integer -> Rational
+fromInt Int
+v Integer -> Integer -> Rational
 forall a. Integral a => a -> a -> Ratio a
 % Int -> Integer
-fromInt Int
+fromInt Int
 forall a. Bounded a => a
 maxBound
 
@@ -682,7 +682,7 @@
 -- | Fixed-precision representation of a 'RealNumber'. If there's insufficient
 --   precision to accurately represent the 'RealNumber' then the 'Lossy' constructor
 --   will be used.
-data AsFixed p = Exact !(Fixed p) | Lossy !(Fixed p) deriving (Int -> AsFixed p -> ShowS
+data AsFixed p = Exact !(Fixed p) | Lossy !(Fixed p) deriving (Int -> AsFixed p -> ShowS
 [AsFixed p] -> ShowS
 AsFixed p -> String
 (Int -> AsFixed p -> ShowS)
@@ -700,7 +700,7 @@
 show :: AsFixed p -> String
 $cshowList :: forall k (p :: k). HasResolution p => [AsFixed p] -> ShowS
 showList :: [AsFixed p] -> ShowS
-Show,AsFixed p -> AsFixed p -> Bool
+Show,AsFixed p -> AsFixed p -> Bool
 (AsFixed p -> AsFixed p -> Bool)
 -> (AsFixed p -> AsFixed p -> Bool) -> Eq (AsFixed p)
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -713,14 +713,14 @@
 
 -- | Cast 'RealNumber' to a fixed-precision number. Data is silently lost if there's
 --   insufficient precision.
-toFixed :: KnownNat p => RealNumber p -> Fixed (NatPrec p)
+toFixed :: KnownNat p => RealNumber p -> Fixed (NatPrec p)
 toFixed :: forall (p :: Nat). KnownNat p => RealNumber p -> Fixed (NatPrec p)
 toFixed = RealNumber p -> Fixed (NatPrec p)
 forall a b. (Real a, Fractional b) => a -> b
 realToFrac
 
 -- | Cast a fixed-precision number to a 'RealNumber'.
-fromFixed :: KnownNat p => Fixed (NatPrec p) -> RealNumber p
+fromFixed :: KnownNat p => Fixed (NatPrec p) -> RealNumber p
 fromFixed :: forall (p :: Nat). KnownNat p => Fixed (NatPrec p) -> RealNumber p
 fromFixed = Fixed (NatPrec p) -> RealNumber p
 forall a b. (Real a, Fractional b) => a -> b
@@ -728,26 +728,26 @@
 
 -- | Cast 'RealNumber' to a fixed-precision number. Data-loss caused by insufficient
 --   precision will be marked by the 'Lossy' constructor.
-asFixed   :: KnownNat p => RealNumber p -> AsFixed (NatPrec p)
+asFixed   :: KnownNat p => RealNumber p -> AsFixed (NatPrec p)
 asFixed :: forall (p :: Nat).
 KnownNat p =>
 RealNumber p -> AsFixed (NatPrec p)
-asFixed RealNumber p
-r = let p :: Fixed (NatPrec p)
-p = RealNumber p -> Fixed (NatPrec p)
+asFixed RealNumber p
+r = let p :: Fixed (NatPrec p)
+p = RealNumber p -> Fixed (NatPrec p)
 forall (p :: Nat). KnownNat p => RealNumber p -> Fixed (NatPrec p)
 toFixed RealNumber p
-r in if RealNumber p
-r RealNumber p -> RealNumber p -> Bool
+r in if RealNumber p
+r RealNumber p -> RealNumber p -> Bool
 forall a. Eq a => a -> a -> Bool
 == Fixed (NatPrec p) -> RealNumber p
 forall (p :: Nat). KnownNat p => Fixed (NatPrec p) -> RealNumber p
 fromFixed Fixed (NatPrec p)
-p then Fixed (NatPrec p) -> AsFixed (NatPrec p)
+p then Fixed (NatPrec p) -> AsFixed (NatPrec p)
 forall {k} (p :: k). Fixed p -> AsFixed p
 Exact Fixed (NatPrec p)
-p else Fixed (NatPrec p) -> AsFixed (NatPrec p)
+p else Fixed (NatPrec p) -> AsFixed (NatPrec p)
 forall {k} (p :: k). Fixed p -> AsFixed p
 Lossy Fixed (NatPrec p)
-p
+p
 
\ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Symbolic.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Symbolic.html index c7c3b5f8f..0c91c911a 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Symbolic.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Number.Real.Symbolic.html @@ -130,7 +130,7 @@ \(e_1 > e_2\) if and only if \(j < k\). -}
-newtype EpsFold i = Pi (Bag i) deriving (NonEmpty (EpsFold i) -> EpsFold i +newtype EpsFold i = Pi (Bag i) deriving (NonEmpty (EpsFold i) -> EpsFold i EpsFold i -> EpsFold i -> EpsFold i (EpsFold i -> EpsFold i -> EpsFold i) -> (NonEmpty (EpsFold i) -> EpsFold i) @@ -151,7 +151,7 @@ sconcat :: NonEmpty (EpsFold i) -> EpsFold i $cstimes :: forall i b. (Ord i, Integral b) => b -> EpsFold i -> EpsFold i stimes :: forall b. Integral b => b -> EpsFold i -> EpsFold i -Semigroup,Semigroup (EpsFold i) +Semigroup,Semigroup (EpsFold i) EpsFold i Semigroup (EpsFold i) => EpsFold i @@ -176,14 +176,14 @@ Monoid) -- | Gets the factors -factors :: EpsFold i -> Bag i +factors :: EpsFold i -> Bag i factors :: forall i. EpsFold i -> Bag i -factors (Pi Bag i -is) = Bag i -is +factors (Pi Bag i +is) = Bag i +is -- | Creates the term \(\varepsilon(i)\) -eps :: i -> EpsFold i +eps :: i -> EpsFold i eps :: forall i. i -> EpsFold i eps = Bag i -> EpsFold i forall i. Bag i -> EpsFold i @@ -194,7 +194,7 @@ singleton -- | Constructs an epsfold from a list of elements -mkEpsFold :: Ord i => [i] -> EpsFold i +mkEpsFold :: Ord i => [i] -> EpsFold i mkEpsFold :: forall i. Ord i => [i] -> EpsFold i mkEpsFold = Bag i -> EpsFold i forall i. Bag i -> EpsFold i @@ -213,7 +213,7 @@ -- | computes a base 'd' that can be used as: -- -- \( \varepsilon(i) = \varepsilon^{d^i} \) -suitableBase :: EpsFold i -> Int +suitableBase :: EpsFold i -> Int suitableBase :: forall i. EpsFold i -> Int suitableBase = Int -> Int -> Int forall a. Ord a => a -> a -> a @@ -240,25 +240,25 @@ -- 6.25e-2 -- >>> evalEps 2 (1/2) $ mkEpsFold [1,2] -- 1.5625e-2 -evalEps :: (Fractional r, Integral i, Integral j) => j -> r -> EpsFold i -> r +evalEps :: (Fractional r, Integral i, Integral j) => j -> r -> EpsFold i -> r evalEps :: forall r i j. (Fractional r, Integral i, Integral j) => j -> r -> EpsFold i -> r -evalEps j -d r -delta EpsFold i -ef = r -delta r -> j -> r +evalEps j +d r +delta EpsFold i +ef = r +delta r -> j -> r forall a b. (Num a, Integral b) => a -> b -> a ^ [j] -> j forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a sum [ j -d j -> i -> j +d j -> i -> j forall a b. (Num a, Integral b) => a -> b -> a ^ i -i | i -i <- Bag i -> [i] +i | i +i <- Bag i -> [i] forall a. Bag a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] toList (Bag i -> [i]) -> Bag i -> [i] @@ -266,19 +266,19 @@ $ EpsFold i -> Bag i forall i. EpsFold i -> Bag i factors EpsFold i -ef] +ef] -instance Show i => Show (EpsFold i) where - showsPrec :: Int -> EpsFold i -> ShowS -showsPrec Int -d (Pi Bag i -b) = Bool -> ShowS -> ShowS +instance Show i => Show (EpsFold i) where + showsPrec :: Int -> EpsFold i -> ShowS +showsPrec Int +d (Pi Bag i +b) = Bool -> ShowS -> ShowS showParen (Int -d Int -> Int -> Bool +d Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ShowS -> ShowS) -> ShowS -> ShowS +app_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ String -> ShowS @@ -288,60 +288,60 @@ . Int -> [i] -> ShowS forall a. Show a => Int -> a -> ShowS showsPrec Int -d (Bag i -> [i] +d (Bag i -> [i] forall a. Bag a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] toList Bag i -b) +b) where - app_prec :: Int -app_prec = Int + app_prec :: Int +app_prec = Int 10 -instance Ord i => Eq (EpsFold i) where - EpsFold i -e1 == :: EpsFold i -> EpsFold i -> Bool -== EpsFold i -e2 = (EpsFold i -e1 EpsFold i -> EpsFold i -> Ordering +instance Ord i => Eq (EpsFold i) where + EpsFold i +e1 == :: EpsFold i -> EpsFold i -> Bool +== EpsFold i +e2 = (EpsFold i +e1 EpsFold i -> EpsFold i -> Ordering forall a. Ord a => a -> a -> Ordering `compare` EpsFold i -e2) Ordering -> Ordering -> Bool +e2) Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering EQ -instance Ord i => Ord (EpsFold i) where - (Pi Bag i -e1) compare :: EpsFold i -> EpsFold i -> Ordering -`compare` (Pi Bag i -e2) = Maybe i -k Maybe i -> Maybe i -> Ordering +instance Ord i => Ord (EpsFold i) where + (Pi Bag i +e1) compare :: EpsFold i -> EpsFold i -> Ordering +`compare` (Pi Bag i +e2) = Maybe i +k Maybe i -> Maybe i -> Ordering forall a. Ord a => a -> a -> Ordering `compare` Maybe i -j -- note that k and j are flipped here +j -- note that k and j are flipped here where - j :: Maybe i -j = Bag i -> Maybe i + j :: Maybe i +j = Bag i -> Maybe i forall b. Bag b -> Maybe b maximum' (Bag i -> Maybe i) -> Bag i -> Maybe i forall a b. (a -> b) -> a -> b $ Bag i -e1 Bag i -> Bag i -> Bag i +e1 Bag i -> Bag i -> Bag i forall a. Ord a => Bag a -> Bag a -> Bag a `difference` Bag i -e2 - k :: Maybe i -k = Bag i -> Maybe i +e2 + k :: Maybe i +k = Bag i -> Maybe i forall b. Bag b -> Maybe b maximum' (Bag i -> Maybe i) -> Bag i -> Maybe i forall a b. (a -> b) -> a -> b $ Bag i -e2 Bag i -> Bag i -> Bag i +e2 Bag i -> Bag i -> Bag i forall a. Ord a => Bag a -> Bag a -> Bag a `difference` Bag i -e1 +e1 -- note: If the terms are all the same, the difference of the bags is empty -- and thus both e1e2 and e2e1 are Nothing and thus equal. @@ -353,14 +353,14 @@ -- | Test if the epsfold has no pertubation at all (i.e. if it is \(\Pi_{\emptyset}\) -hasNoPertubation :: EpsFold i -> Bool +hasNoPertubation :: EpsFold i -> Bool hasNoPertubation :: forall i. EpsFold i -> Bool -hasNoPertubation (Pi Bag i -b) = Bag i -> Bool +hasNoPertubation (Pi Bag i +b) = Bag i -> Bool forall a. Bag a -> Bool forall (t :: * -> *) a. Foldable t => t a -> Bool null Bag i -b +b -------------------------------------------------------------------------------- @@ -373,7 +373,7 @@ -- -- for a constant c and an arbitrarily small value \(\varepsilon\), -- parameterized by i. -data Term i r = Term !r (EpsFold i) deriving (Term i r -> Term i r -> Bool +data Term i r = Term !r (EpsFold i) deriving (Term i r -> Term i r -> Bool (Term i r -> Term i r -> Bool) -> (Term i r -> Term i r -> Bool) -> Eq (Term i r) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -382,7 +382,7 @@ == :: Term i r -> Term i r -> Bool $c/= :: forall i r. (Ord i, Eq r) => Term i r -> Term i r -> Bool /= :: Term i r -> Term i r -> Bool -Eq,(forall a b. (a -> b) -> Term i a -> Term i b) +Eq,(forall a b. (a -> b) -> Term i a -> Term i b) -> (forall a b. a -> Term i b -> Term i a) -> Functor (Term i) forall a b. a -> Term i b -> Term i a forall a b. (a -> b) -> Term i a -> Term i b @@ -398,47 +398,47 @@ Functor) -- | Lens to access the constant 'c' in the term. -constantFactor :: Lens' (Term i r) r +constantFactor :: Lens' (Term i r) r constantFactor :: forall i r (f :: * -> *). Functor f => (r -> f r) -> Term i r -> f (Term i r) constantFactor = (Term i r -> r) -> (Term i r -> r -> Term i r) -> Lens (Term i r) (Term i r) r r forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(Term r -c EpsFold i +lens (\(Term r +c EpsFold i _) -> r -c) (\(Term r -_ EpsFold i -es) r -c -> r -> EpsFold i -> Term i r +c) (\(Term r +_ EpsFold i +es) r +c -> r -> EpsFold i -> Term i r forall i r. r -> EpsFold i -> Term i r Term r -c EpsFold i -es) +c EpsFold i +es) -instance (Show i, Show r) => Show (Term i r) where - showsPrec :: Int -> Term i r -> ShowS -showsPrec Int -d (Term r -c EpsFold i -es) = Bool -> ShowS -> ShowS +instance (Show i, Show r) => Show (Term i r) where + showsPrec :: Int -> Term i r -> ShowS +showsPrec Int +d (Term r +c EpsFold i +es) = Bool -> ShowS -> ShowS showParen (Int -d Int -> Int -> Bool +d Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -up_prec) (ShowS -> ShowS) -> ShowS -> ShowS +up_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ Int -> r -> ShowS forall a. Show a => Int -> a -> ShowS showsPrec (Int -up_prec Int -> Int -> Int +up_prec Int -> Int -> Int forall a. Num a => a -> a -> a + Int 1) r -c +c ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . String -> ShowS @@ -449,71 +449,71 @@ . Int -> EpsFold i -> ShowS forall a. Show a => Int -> a -> ShowS showsPrec (Int -up_prec Int -> Int -> Int +up_prec Int -> Int -> Int forall a. Num a => a -> a -> a + Int 1) EpsFold i -es +es where - up_prec :: Int -up_prec = Int + up_prec :: Int +up_prec = Int 5 -- | Creates a singleton term -term :: r -> i -> Term i r +term :: r -> i -> Term i r term :: forall r i. r -> i -> Term i r -term r -r i -i = r -> EpsFold i -> Term i r +term r +r i +i = r -> EpsFold i -> Term i r forall i r. r -> EpsFold i -> Term i r Term r -r (EpsFold i -> Term i r) -> EpsFold i -> Term i r +r (EpsFold i -> Term i r) -> EpsFold i -> Term i r forall a b. (a -> b) -> a -> b $ i -> EpsFold i forall i. i -> EpsFold i eps i -i +i -instance (Ord i, Ord r, Num r) => Ord (Term i r) where - (Term r -c EpsFold i -e1) compare :: Term i r -> Term i r -> Ordering -`compare` (Term r -d EpsFold i -e2) = case (EpsFold i -> Bool +instance (Ord i, Ord r, Num r) => Ord (Term i r) where + (Term r +c EpsFold i +e1) compare :: Term i r -> Term i r -> Ordering +`compare` (Term r +d EpsFold i +e2) = case (EpsFold i -> Bool forall i. EpsFold i -> Bool hasNoPertubation EpsFold i -e1, EpsFold i -> Bool +e1, EpsFold i -> Bool forall i. EpsFold i -> Bool hasNoPertubation EpsFold i -e2) of +e2) of (Bool True,Bool True) -> r -c r -> r -> Ordering +c r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r -d +d (Bool, Bool) _ -> case (r -> r forall a. Num a => a -> a signum r -c, r -> r +c, r -> r forall a. Num a => a -> a signum r -d) of +d) of (-1,-1) -> EpsFold i -e2 EpsFold i -> EpsFold i -> Ordering +e2 EpsFold i -> EpsFold i -> Ordering forall a. Ord a => a -> a -> Ordering `compare` EpsFold i -e1 Ordering -> Ordering -> Ordering +e1 Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> r -c r -> r -> Ordering +c r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r -d +d -- note that the e2 and e1 are flipped; -- i.e. if the numbers are negative this -- reverses the ordering of the eps-values @@ -527,16 +527,16 @@ (r 1,r 1) -> EpsFold i -e1 EpsFold i -> EpsFold i -> Ordering +e1 EpsFold i -> EpsFold i -> Ordering forall a. Ord a => a -> a -> Ordering `compare` EpsFold i -e2 Ordering -> Ordering -> Ordering +e2 Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> r -c r -> r -> Ordering +c r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r -d +d (-1,r _) -> Ordering @@ -594,7 +594,7 @@ -- - they contain *only* a constant term (that is equal) -- - they contain the exact same \(\varepsilon\)-fold. -- -newtype Symbolic i r = Sum (Map.Map (EpsFold i) r) deriving ((forall a b. (a -> b) -> Symbolic i a -> Symbolic i b) +newtype Symbolic i r = Sum (Map.Map (EpsFold i) r) deriving ((forall a b. (a -> b) -> Symbolic i a -> Symbolic i b) -> (forall a b. a -> Symbolic i b -> Symbolic i a) -> Functor (Symbolic i) forall a b. a -> Symbolic i b -> Symbolic i a @@ -612,18 +612,18 @@ -- | Produces a list of terms, in decreasing order of significance -toTerms :: Symbolic i r -> [Term i r] +toTerms :: Symbolic i r -> [Term i r] toTerms :: forall i r. Symbolic i r -> [Term i r] -toTerms (Sum Map (EpsFold i) r -m) = ((EpsFold i, r) -> Term i r) -> [(EpsFold i, r)] -> [Term i r] +toTerms (Sum Map (EpsFold i) r +m) = ((EpsFold i, r) -> Term i r) -> [(EpsFold i, r)] -> [Term i r] forall a b. (a -> b) -> [a] -> [b] -map (\(EpsFold i -i,r -c) -> r -> EpsFold i -> Term i r +map (\(EpsFold i +i,r +c) -> r -> EpsFold i -> Term i r forall i r. r -> EpsFold i -> Term i r Term r -c EpsFold i -i) ([(EpsFold i, r)] -> [Term i r]) +c EpsFold i +i) ([(EpsFold i, r)] -> [Term i r]) -> (Map (EpsFold i) r -> [(EpsFold i, r)]) -> Map (EpsFold i) r -> [Term i r] @@ -634,13 +634,13 @@ -> Map (EpsFold i) r -> [Term i r] forall a b. (a -> b) -> a -> b $ Map (EpsFold i) r -m +m -- | Computing the Sign of an expression. (Nothing represents zero) -signOf :: (Num r, Eq r) => Symbolic i r -> Maybe Sign +signOf :: (Num r, Eq r) => Symbolic i r -> Maybe Sign signOf :: forall r i. (Num r, Eq r) => Symbolic i r -> Maybe Sign -signOf Symbolic i r -e = case (r -> Bool) -> [r] -> [r] +signOf Symbolic i r +e = case (r -> Bool) -> [r] -> [r] forall a. (a -> Bool) -> [a] -> [a] List.dropWhile (r -> r -> Bool forall a. Eq a => a -> a -> Bool @@ -649,17 +649,17 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . (Term i r -> r) -> [Term i r] -> [r] forall a b. (a -> b) -> [a] -> [b] -map (\(Term r -c EpsFold i +map (\(Term r +c EpsFold i _) -> r -> r forall a. Num a => a -> a signum r -c) ([Term i r] -> [r]) -> [Term i r] -> [r] +c) ([Term i r] -> [r]) -> [Term i r] -> [r] forall a b. (a -> b) -> a -> b $ Symbolic i r -> [Term i r] forall i r. Symbolic i r -> [Term i r] toTerms Symbolic i r -e of +e of [] -> Maybe Sign forall a. Maybe a Nothing @@ -675,53 +675,53 @@ Positive -- | Drops all the epsilon terms -roundToConstant :: Num r => Symbolic i r -> r +roundToConstant :: Num r => Symbolic i r -> r roundToConstant :: forall r i. Num r => Symbolic i r -> r -roundToConstant Symbolic i r -s = case Symbolic i r -> [Term i r] +roundToConstant Symbolic i r +s = case Symbolic i r -> [Term i r] forall i r. Symbolic i r -> [Term i r] toTerms Symbolic i r -s of - (Term r -c EpsFold i -e:[Term i r] +s of + (Term r +c EpsFold i +e:[Term i r] _) | EpsFold i -> Bool forall i. EpsFold i -> Bool hasNoPertubation EpsFold i -e -> r -c +e -> r +c [Term i r] _ -> r 0 -instance (Ord i, Eq r, Num r) => Eq (Symbolic i r) where - Symbolic i r -e1 == :: Symbolic i r -> Symbolic i r -> Bool -== Symbolic i r -e2 = Maybe Sign -> Bool +instance (Ord i, Eq r, Num r) => Eq (Symbolic i r) where + Symbolic i r +e1 == :: Symbolic i r -> Symbolic i r -> Bool +== Symbolic i r +e2 = Maybe Sign -> Bool forall a. Maybe a -> Bool isNothing (Maybe Sign -> Bool) -> Maybe Sign -> Bool forall a b. (a -> b) -> a -> b $ Symbolic i r -> Maybe Sign forall r i. (Num r, Eq r) => Symbolic i r -> Maybe Sign signOf (Symbolic i r -e1 Symbolic i r -> Symbolic i r -> Symbolic i r +e1 Symbolic i r -> Symbolic i r -> Symbolic i r forall a. Num a => a -> a -> a - Symbolic i r -e2) +e2) -instance (Ord i, Ord r, Num r) => Ord (Symbolic i r) where - Symbolic i r -e1 compare :: Symbolic i r -> Symbolic i r -> Ordering -`compare` Symbolic i r -e2 = case Symbolic i r -> Maybe Sign +instance (Ord i, Ord r, Num r) => Ord (Symbolic i r) where + Symbolic i r +e1 compare :: Symbolic i r -> Symbolic i r -> Ordering +`compare` Symbolic i r +e2 = case Symbolic i r -> Maybe Sign forall r i. (Num r, Eq r) => Symbolic i r -> Maybe Sign signOf (Symbolic i r -e1 Symbolic i r -> Symbolic i r -> Symbolic i r +e1 Symbolic i r -> Symbolic i r -> Symbolic i r forall a. Num a => a -> a -> a - Symbolic i r -e2) of +e2) of Maybe Sign Nothing -> Ordering EQ @@ -732,11 +732,11 @@ Positive -> Ordering GT -instance (Ord i, Num r, Eq r) => Num (Symbolic i r) where - (Sum Map (EpsFold i) r -e1) + :: Symbolic i r -> Symbolic i r -> Symbolic i r -+ (Sum Map (EpsFold i) r -e2) = Map (EpsFold i) r -> Symbolic i r +instance (Ord i, Num r, Eq r) => Num (Symbolic i r) where + (Sum Map (EpsFold i) r +e1) + :: Symbolic i r -> Symbolic i r -> Symbolic i r ++ (Sum Map (EpsFold i) r +e2) = Map (EpsFold i) r -> Symbolic i r forall i r. Map (EpsFold i) r -> Symbolic i r Sum (Map (EpsFold i) r -> Symbolic i r) -> Map (EpsFold i) r -> Symbolic i r @@ -763,40 +763,40 @@ Map.preserveMissing -- insert things only in e2 SimpleWhenMatched (EpsFold i) r r r forall {k}. WhenMatched Identity k r r r -combine +combine Map (EpsFold i) r -e1 Map (EpsFold i) r -e2 +e1 Map (EpsFold i) r +e2 where -- if things are in both e1 and e2, we add the constant terms. If they are non-zero -- we use this value in the map. Otherwise we drop it. - combine :: WhenMatched Identity k r r r -combine = (k -> r -> r -> Maybe r) -> WhenMatched Identity k r r r + combine :: WhenMatched Identity k r r r +combine = (k -> r -> r -> Maybe r) -> WhenMatched Identity k r r r forall (f :: * -> *) k x y z. Applicative f => (k -> x -> y -> Maybe z) -> WhenMatched f k x y z Map.zipWithMaybeMatched (\k -_ r -c r -d -> let x :: r -x = r -c r -> r -> r +_ r +c r +d -> let x :: r +x = r +c r -> r -> r forall a. Num a => a -> a -> a + r -d in if r -x r -> r -> Bool +d in if r +x r -> r -> Bool forall a. Eq a => a -> a -> Bool /= r 0 then r -> Maybe r forall a. a -> Maybe a Just r -x else Maybe r +x else Maybe r forall a. Maybe a Nothing) -- Symbolic $ Map.unionWith (+) ts ts' - negate :: Symbolic i r -> Symbolic i r + negate :: Symbolic i r -> Symbolic i r negate = (r -> r) -> Symbolic i r -> Symbolic i r forall a b. (a -> b) -> Symbolic i a -> Symbolic i b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -804,10 +804,10 @@ forall a. Num a => a -> a negate - (Sum Map (EpsFold i) r -ts) * :: Symbolic i r -> Symbolic i r -> Symbolic i r -* (Sum Map (EpsFold i) r -ts') = Map (EpsFold i) r -> Symbolic i r + (Sum Map (EpsFold i) r +ts) * :: Symbolic i r -> Symbolic i r -> Symbolic i r +* (Sum Map (EpsFold i) r +ts') = Map (EpsFold i) r -> Symbolic i r forall i r. Map (EpsFold i) r -> Symbolic i r Sum (Map (EpsFold i) r -> Symbolic i r) -> Map (EpsFold i) r -> Symbolic i r @@ -817,51 +817,51 @@ Map.fromListWith r -> r -> r forall a. Num a => a -> a -> a (+) [ (EpsFold i -es EpsFold i -> EpsFold i -> EpsFold i +es EpsFold i -> EpsFold i -> EpsFold i forall a. Semigroup a => a -> a -> a <> EpsFold i -es',r -cr -> r -> r +es',r +cr -> r -> r forall a. Num a => a -> a -> a *r -d) - | (EpsFold i -es, r -c) <- Map (EpsFold i) r -> [(EpsFold i, r)] +d) + | (EpsFold i +es, r +c) <- Map (EpsFold i) r -> [(EpsFold i, r)] forall k a. Map k a -> [(k, a)] Map.toList Map (EpsFold i) r -ts - , (EpsFold i -es',r -d) <- Map (EpsFold i) r -> [(EpsFold i, r)] +ts + , (EpsFold i +es',r +d) <- Map (EpsFold i) r -> [(EpsFold i, r)] forall k a. Map k a -> [(k, a)] Map.toList Map (EpsFold i) r -ts' +ts' , r -cr -> r -> r +cr -> r -> r forall a. Num a => a -> a -> a *r -d r -> r -> Bool +d r -> r -> Bool forall a. Eq a => a -> a -> Bool /= r 0 ] - fromInteger :: Integer -> Symbolic i r -fromInteger Integer -x = r -> Symbolic i r + fromInteger :: Integer -> Symbolic i r +fromInteger Integer +x = r -> Symbolic i r forall i r. Ord i => r -> Symbolic i r constant (Integer -> r forall a. Num a => Integer -> a fromInteger Integer -x) +x) - signum :: Symbolic i r -> Symbolic i r -signum Symbolic i r -s = case Symbolic i r -> Maybe Sign + signum :: Symbolic i r -> Symbolic i r +signum Symbolic i r +s = case Symbolic i r -> Maybe Sign forall r i. (Num r, Eq r) => Symbolic i r -> Maybe Sign signOf Symbolic i r -s of +s of Maybe Sign Nothing -> Symbolic i r 0 @@ -872,34 +872,34 @@ Positive -> Symbolic i r 1 - abs :: Symbolic i r -> Symbolic i r -abs Symbolic i r -x | Symbolic i r -> Symbolic i r + abs :: Symbolic i r -> Symbolic i r +abs Symbolic i r +x | Symbolic i r -> Symbolic i r forall a. Num a => a -> a signum Symbolic i r -x Symbolic i r -> Symbolic i r -> Bool +x Symbolic i r -> Symbolic i r -> Bool forall a. Eq a => a -> a -> Bool == -Symbolic i r 1 = (-Symbolic i r 1)Symbolic i r -> Symbolic i r -> Symbolic i r forall a. Num a => a -> a -> a *Symbolic i r -x +x | Bool otherwise = Symbolic i r -x +x -instance (Show i, Show r) => Show (Symbolic i r) where - showsPrec :: Int -> Symbolic i r -> ShowS -showsPrec Int -d Symbolic i r -s = Bool -> ShowS -> ShowS +instance (Show i, Show r) => Show (Symbolic i r) where + showsPrec :: Int -> Symbolic i r -> ShowS +showsPrec Int +d Symbolic i r +s = Bool -> ShowS -> ShowS showParen (Int -d Int -> Int -> Bool +d Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ShowS -> ShowS) -> ShowS -> ShowS +app_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ String -> ShowS @@ -909,13 +909,13 @@ . Int -> [Term i r] -> ShowS forall a. Show a => Int -> a -> ShowS showsPrec Int -d (Symbolic i r -> [Term i r] +d (Symbolic i r -> [Term i r] forall i r. Symbolic i r -> [Term i r] toTerms Symbolic i r -s) +s) where - app_prec :: Int -app_prec = Int + app_prec :: Int +app_prec = Int 10 @@ -925,10 +925,10 @@ ---------------------------------------- -- | Creates a constant symbolic value -constant :: Ord i => r -> Symbolic i r +constant :: Ord i => r -> Symbolic i r constant :: forall i r. Ord i => r -> Symbolic i r -constant r -c = Map (EpsFold i) r -> Symbolic i r +constant r +c = Map (EpsFold i) r -> Symbolic i r forall i r. Map (EpsFold i) r -> Symbolic i r Sum (Map (EpsFold i) r -> Symbolic i r) -> Map (EpsFold i) r -> Symbolic i r @@ -938,14 +938,14 @@ Map.singleton EpsFold i forall a. Monoid a => a mempty r -c +c -- | Creates a symbolic vlaue with a single indexed term. If you just need a constant (i.e. non-indexed), use 'constant' -symbolic :: Ord i => r -> i -> Symbolic i r +symbolic :: Ord i => r -> i -> Symbolic i r symbolic :: forall i r. Ord i => r -> i -> Symbolic i r -symbolic r -r i -i = Map (EpsFold i) r -> Symbolic i r +symbolic r +r i +i = Map (EpsFold i) r -> Symbolic i r forall i r. Map (EpsFold i) r -> Symbolic i r Sum (Map (EpsFold i) r -> Symbolic i r) -> Map (EpsFold i) r -> Symbolic i r @@ -955,16 +955,16 @@ Map.singleton (i -> EpsFold i forall i. i -> EpsFold i eps i -i) r -r +i) r +r -- | given the value c and the index i, creates the perturbed value -- \(c + \varepsilon(i)\) -perturb :: (Num r, Ord i) => r -> i -> Symbolic i r +perturb :: (Num r, Ord i) => r -> i -> Symbolic i r perturb :: forall r i. (Num r, Ord i) => r -> i -> Symbolic i r -perturb r -c i -i = Map (EpsFold i) r -> Symbolic i r +perturb r +c i +i = Map (EpsFold i) r -> Symbolic i r forall i r. Map (EpsFold i) r -> Symbolic i r Sum (Map (EpsFold i) r -> Symbolic i r) -> Map (EpsFold i) r -> Symbolic i r @@ -974,18 +974,18 @@ Map.fromAscList [ (i -> EpsFold i forall i. i -> EpsFold i eps i -i,r +i,r 1) , (EpsFold i forall a. Monoid a => a mempty,r -c) ] +c) ] -- note that the empty epsfold is more significant than any other epsfold -------------------------------------------------------------------------------- -- | The word specifiies how many *duplicates* there are. I.e. If the -- Bag maps k to i, then k has multiplicity i+1. -newtype Bag a = Bag (Map.Map a Int) deriving (Int -> Bag a -> ShowS +newtype Bag a = Bag (Map.Map a Int) deriving (Int -> Bag a -> ShowS [Bag a] -> ShowS Bag a -> String (Int -> Bag a -> ShowS) @@ -1001,7 +1001,7 @@ show :: Bag a -> String $cshowList :: forall a. Show a => [Bag a] -> ShowS showList :: [Bag a] -> ShowS -Show,Bag a -> Bag a -> Bool +Show,Bag a -> Bag a -> Bool (Bag a -> Bag a -> Bool) -> (Bag a -> Bag a -> Bool) -> Eq (Bag a) forall a. Eq a => Bag a -> Bag a -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -1009,7 +1009,7 @@ == :: Bag a -> Bag a -> Bool $c/= :: forall a. Eq a => Bag a -> Bag a -> Bool /= :: Bag a -> Bag a -> Bool -Eq,Eq (Bag a) +Eq,Eq (Bag a) Eq (Bag a) => (Bag a -> Bag a -> Ordering) -> (Bag a -> Bag a -> Bool) @@ -1053,78 +1053,78 @@ Ord) -- | Construct a singleton bag -singleton :: k -> Bag k +singleton :: k -> Bag k singleton :: forall k. k -> Bag k -singleton k -x = Map k Int -> Bag k +singleton k +x = Map k Int -> Bag k forall a. Map a Int -> Bag a Bag (Map k Int -> Bag k) -> Map k Int -> Bag k forall a b. (a -> b) -> a -> b $ k -> Int -> Map k Int forall k a. k -> a -> Map k a Map.singleton k -x Int +x Int 0 -instance Foldable Bag where +instance Foldable Bag where -- ^ Takes multiplicity into account. - foldMap :: forall m a. Monoid m => (a -> m) -> Bag a -> m -foldMap a -> m -f (Bag Map a Int -m) = + foldMap :: forall m a. Monoid m => (a -> m) -> Bag a -> m +foldMap a -> m +f (Bag Map a Int +m) = (a -> Int -> m) -> Map a Int -> m forall m k a. Monoid m => (k -> a -> m) -> Map k a -> m -Map.foldMapWithKey (\a -k Int -d -> (a -> m) -> [a] -> m +Map.foldMapWithKey (\a +k Int +d -> (a -> m) -> [a] -> m forall m a. Monoid m => (a -> m) -> [a] -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f (Int -> a -> [a] +f (Int -> a -> [a] forall a. Int -> a -> [a] List.replicate (Int -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral Int -dInt -> Int -> Int +dInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) a -k)) Map a Int -m - null :: forall a. Bag a -> Bool -null (Bag Map a Int -m) = Map a Int -> Bool +k)) Map a Int +m + null :: forall a. Bag a -> Bool +null (Bag Map a Int +m) = Map a Int -> Bool forall k a. Map k a -> Bool Map.null Map a Int -m +m -instance Ord k => Semigroup (Bag k) where - (Bag Map k Int -m) <> :: Bag k -> Bag k -> Bag k -<> (Bag Map k Int -m') = Map k Int -> Bag k +instance Ord k => Semigroup (Bag k) where + (Bag Map k Int +m) <> :: Bag k -> Bag k -> Bag k +<> (Bag Map k Int +m') = Map k Int -> Bag k forall a. Map a Int -> Bag a Bag (Map k Int -> Bag k) -> Map k Int -> Bag k forall a b. (a -> b) -> a -> b $ (Int -> Int -> Int) -> Map k Int -> Map k Int -> Map k Int forall k a. Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a -Map.unionWith (\Int -d Int -d' -> Int -d Int -> Int -> Int +Map.unionWith (\Int +d Int +d' -> Int +d Int -> Int -> Int forall a. Num a => a -> a -> a + Int -d' Int -> Int -> Int +d' Int -> Int -> Int forall a. Num a => a -> a -> a + Int 1) Map k Int -m Map k Int -m' +m Map k Int +m' -instance Ord k => Monoid (Bag k) where - mempty :: Bag k +instance Ord k => Monoid (Bag k) where + mempty :: Bag k mempty = Map k Int -> Bag k forall a. Map a Int -> Bag a Bag Map k Int @@ -1135,11 +1135,11 @@ -- | Computes the difference of the two maps -difference :: Ord a => Bag a -> Bag a -> Bag a +difference :: Ord a => Bag a -> Bag a -> Bag a difference :: forall a. Ord a => Bag a -> Bag a -> Bag a -difference (Bag Map a Int -m1) (Bag Map a Int -m2) = Map a Int -> Bag a +difference (Bag Map a Int +m1) (Bag Map a Int +m2) = Map a Int -> Bag a forall a. Map a Int -> Bag a Bag (Map a Int -> Bag a) -> Map a Int -> Bag a forall a b. (a -> b) -> a -> b @@ -1149,21 +1149,21 @@ (a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a Map.differenceWith Int -> Int -> Maybe Int forall {a}. (Num a, Ord a) => a -> a -> Maybe a -updateCount Map a Int -m1 Map a Int -m2 +updateCount Map a Int +m1 Map a Int +m2 where - updateCount :: a -> a -> Maybe a -updateCount a -i a -j = let d :: a -d = a -i a -> a -> a + updateCount :: a -> a -> Maybe a +updateCount a +i a +j = let d :: a +d = a +i a -> a -> a forall a. Num a => a -> a -> a - a -j -- note that we should actually compare (i+1) and (j+1) +j -- note that we should actually compare (i+1) and (j+1) in if a -d a -> a -> Bool +d a -> a -> Bool forall a. Ord a => a -> a -> Bool <= a 0 then Maybe a @@ -1174,17 +1174,17 @@ Just (a -> Maybe a) -> a -> Maybe a forall a b. (a -> b) -> a -> b $ a -d a -> a -> a +d a -> a -> a forall a. Num a => a -> a -> a - a 1 -- | Get the maximum in the bag -maximum' :: Bag b -> Maybe b +maximum' :: Bag b -> Maybe b maximum' :: forall b. Bag b -> Maybe b -maximum' (Bag Map b Int -m) = ((b, Int) -> b) -> Maybe (b, Int) -> Maybe b +maximum' (Bag Map b Int +m) = ((b, Int) -> b) -> Maybe (b, Int) -> Maybe b forall a b. (a -> b) -> Maybe a -> Maybe b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap (b, Int) -> b @@ -1197,14 +1197,14 @@ Map.lookupMax (Map b Int -> Maybe b) -> Map b Int -> Maybe b forall a b. (a -> b) -> a -> b $ Map b Int -m +m -- | maximum multiplicity of an element in the bag -maxMultiplicity :: Bag a -> Int +maxMultiplicity :: Bag a -> Int maxMultiplicity :: forall a. Bag a -> Int -maxMultiplicity (Bag Map a Int -m) = [Int] -> Int +maxMultiplicity (Bag Map a Int +m) = [Int] -> Int forall a. Ord a => [a] -> a forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a maximum ([Int] -> Int) -> (Map a Int -> [Int]) -> Map a Int -> Int @@ -1222,16 +1222,16 @@ Map.elems (Map a Int -> Int) -> Map a Int -> Int forall a b. (a -> b) -> a -> b $ Map a Int -m +m -------------------------------------------------------------------------------- -- | Number type representing -type SoSRational i r = GRatio (Symbolic i r) +type SoSRational i r = GRatio (Symbolic i r) -- | Helper to construct sosRationals -sosRational :: (Ord i, Eq r, Num r) => Symbolic i r -> Symbolic i r -> SoSRational i r +sosRational :: (Ord i, Eq r, Num r) => Symbolic i r -> Symbolic i r -> SoSRational i r sosRational :: forall i r. (Ord i, Eq r, Num r) => Symbolic i r -> Symbolic i r -> SoSRational i r diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Ord.Dynamic.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Ord.Dynamic.html index d8b135ea9..e6cecbea0 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Ord.Dynamic.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Ord.Dynamic.html @@ -19,8 +19,8 @@ -- https://www.schoolofhaskell.com/user/thoughtpolice/using-reflection -- | Values of type '@a@' in our dynamically constructed 'Ord' instance -newtype O (s :: Type) (a :: Type) = O { forall s a. O s a -> a -runO :: a } deriving (Int -> O s a -> ShowS +newtype O (s :: Type) (a :: Type) = O { forall s a. O s a -> a +runO :: a } deriving (Int -> O s a -> ShowS [O s a] -> ShowS O s a -> String (Int -> O s a -> ShowS) @@ -39,15 +39,15 @@ Show) -- | An Ord Dictionary -newtype OrdDict a = OrdDict { forall a. OrdDict a -> a -> a -> Ordering -compare_ :: a -> a -> Ordering } +newtype OrdDict a = OrdDict { forall a. OrdDict a -> a -> a -> Ordering +compare_ :: a -> a -> Ordering } -instance Reifies s (OrdDict a) => Eq (O s a) where - (O a -l) == :: O s a -> O s a -> Bool -== (O a -r) = let cmp :: a -> a -> Ordering -cmp = OrdDict a -> a -> a -> Ordering +instance Reifies s (OrdDict a) => Eq (O s a) where + (O a +l) == :: O s a -> O s a -> Bool +== (O a +r) = let cmp :: a -> a -> Ordering +cmp = OrdDict a -> a -> a -> Ordering forall a. OrdDict a -> a -> a -> Ordering compare_ (OrdDict a -> a -> a -> Ordering) -> OrdDict a -> a -> a -> Ordering @@ -59,11 +59,11 @@ forall (proxy :: * -> *). proxy s -> OrdDict a reflect (Proxy s forall {k} (t :: k). Proxy t -Proxy :: Proxy s) +Proxy :: Proxy s) in case a -l a -> a -> Ordering -`cmp` a -r of +l a -> a -> Ordering +`cmp` a +r of Ordering EQ -> Bool True @@ -71,12 +71,12 @@ _ -> Bool False -instance (Eq (O s a), Reifies s (OrdDict a)) => Ord (O s a) where - (O a -l) compare :: O s a -> O s a -> Ordering -`compare` (O a -r) = let cmp :: a -> a -> Ordering -cmp = OrdDict a -> a -> a -> Ordering +instance (Eq (O s a), Reifies s (OrdDict a)) => Ord (O s a) where + (O a +l) compare :: O s a -> O s a -> Ordering +`compare` (O a +r) = let cmp :: a -> a -> Ordering +cmp = OrdDict a -> a -> a -> Ordering forall a. OrdDict a -> a -> a -> Ordering compare_ (OrdDict a -> a -> a -> Ordering) -> OrdDict a -> a -> a -> Ordering @@ -88,42 +88,42 @@ forall (proxy :: * -> *). proxy s -> OrdDict a reflect (Proxy s forall {k} (t :: k). Proxy t -Proxy :: Proxy s) +Proxy :: Proxy s) in a -l a -> a -> Ordering -`cmp` a -r +l a -> a -> Ordering +`cmp` a +r -- | Run a computation with a given ordering -withOrd :: (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b +withOrd :: (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b withOrd :: forall a b. (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b -withOrd a -> a -> Ordering -cmp forall s. Reifies s (OrdDict a) => O s b -v = OrdDict a -> (forall s. Reifies s (OrdDict a) => Proxy s -> b) -> b +withOrd a -> a -> Ordering +cmp forall s. Reifies s (OrdDict a) => O s b +v = OrdDict a -> (forall s. Reifies s (OrdDict a) => Proxy s -> b) -> b forall a r. a -> (forall s. Reifies s a => Proxy s -> r) -> r reify ((a -> a -> Ordering) -> OrdDict a forall a. (a -> a -> Ordering) -> OrdDict a OrdDict a -> a -> Ordering -cmp) (O s b -> b +cmp) (O s b -> b forall s a. O s a -> a runO (O s b -> b) -> (Proxy s -> O s b) -> Proxy s -> b forall b c a. (b -> c) -> (a -> b) -> a -> c . O s b -> Proxy s -> O s b forall {k} {k} (f :: k -> k -> *) (s :: k) (a :: k). f s a -> Proxy s -> f s a -asProxyOf O s b +asProxyOf O s b forall s. Reifies s (OrdDict a) => O s b -v) +v) where - asProxyOf :: f s a -> Proxy s -> f s a - asProxyOf :: forall {k} {k} (f :: k -> k -> *) (s :: k) (a :: k). + asProxyOf :: f s a -> Proxy s -> f s a + asProxyOf :: forall {k} {k} (f :: k -> k -> *) (s :: k) (a :: k). f s a -> Proxy s -> f s a -asProxyOf f s a -v' Proxy s +asProxyOf f s a +v' Proxy s _ = f s a -v' +v' -------------------------------------------------------------------------------- -- * Introducing and removing the dynamic order type @@ -133,7 +133,7 @@ -- more general computation in that produces a '@f a@' (depending on s). -- -- running time: \(O(1)\) -extractOrd1 :: f (O s a) -> O s (f a) +extractOrd1 :: f (O s a) -> O s (f a) extractOrd1 :: forall (f :: * -> *) s a. f (O s a) -> O s (f a) extractOrd1 = f (O s a) -> O s (f a) forall a b. a -> b @@ -143,7 +143,7 @@ -- | Introduce dynamic order in a container '@f@'. -- -- running time: \(O(1)\) -introOrd1 :: f a -> f (O s a) +introOrd1 :: f a -> f (O s a) introOrd1 :: forall (f :: * -> *) a s. f a -> f (O s a) introOrd1 = f a -> f (O s a) forall a b. a -> b @@ -151,17 +151,17 @@ -- | Lifts a function that works on a container '@f@' of -- orderable-things into one that works on dynamically ordered ones. -liftOrd1 :: (f (O s a) -> g (O s a)) - -> f a -> O s (g a) +liftOrd1 :: (f (O s a) -> g (O s a)) + -> f a -> O s (g a) liftOrd1 :: forall (f :: * -> *) s a (g :: * -> *). (f (O s a) -> g (O s a)) -> f a -> O s (g a) -liftOrd1 f (O s a) -> g (O s a) -f = g (O s a) -> O s (g a) +liftOrd1 f (O s a) -> g (O s a) +f = g (O s a) -> O s (g a) forall (f :: * -> *) s a. f (O s a) -> O s (f a) extractOrd1 (g (O s a) -> O s (g a)) -> (f a -> g (O s a)) -> f a -> O s (g a) forall b c a. (b -> c) -> (a -> b) -> a -> c . f (O s a) -> g (O s a) -f (f (O s a) -> g (O s a)) -> (f a -> f (O s a)) -> f a -> g (O s a) +f (f (O s a) -> g (O s a)) -> (f a -> f (O s a)) -> f a -> g (O s a) forall b c a. (b -> c) -> (a -> b) -> a -> c . f a -> f (O s a) forall (f :: * -> *) a s. f a -> f (O s a) @@ -172,7 +172,7 @@ -- more general computation in that produces a @`f k v`@ (depending on s). -- -- running time: \(O(1)\) -extractOrd2 :: f (O s k) v -> O s (f k v) +extractOrd2 :: f (O s k) v -> O s (f k v) extractOrd2 :: forall {k} (f :: * -> k -> *) s k (v :: k). f (O s k) v -> O s (f k v) extractOrd2 = f (O s k) v -> O s (f k v) @@ -183,7 +183,7 @@ -- k. -- -- running time: \(O(1)\) -introOrd2 :: f k v -> f (O s k) v +introOrd2 :: f k v -> f (O s k) v introOrd2 :: forall {k} (f :: * -> k -> *) k (v :: k) s. f k v -> f (O s k) v introOrd2 = f k v -> f (O s k) v forall a b. a -> b diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Permutation.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Permutation.html index c9619fec7..79a8a3b0f 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Permutation.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Permutation.html @@ -43,18 +43,18 @@ -------------------------------------------------------------------------------- -- | Orbits (Cycles) are represented by vectors -type Orbit a = NonEmptyVector a +type Orbit a = NonEmptyVector a -- | Cyclic representation of a non-empty permutation. -data Permutation a = Permutation { forall a. Permutation a -> NonEmptyVector (Orbit a) -_orbits :: NonEmptyVector (Orbit a) +data Permutation a = Permutation { forall a. Permutation a -> NonEmptyVector (Orbit a) +_orbits :: NonEmptyVector (Orbit a) , forall a. Permutation a -> Vector (Int, Int) _indexes :: UV.Vector (Int,Int) -- ^ idxes (fromEnum a) = (i,j) -- implies that a is the j^th -- item in the i^th orbit } - deriving (Int -> Permutation a -> ShowS + deriving (Int -> Permutation a -> ShowS [Permutation a] -> ShowS Permutation a -> String (Int -> Permutation a -> ShowS) @@ -72,7 +72,7 @@ show :: Permutation a -> String $cshowList :: forall a. Show a => [Permutation a] -> ShowS showList :: [Permutation a] -> ShowS -Show,Permutation a -> Permutation a -> Bool +Show,Permutation a -> Permutation a -> Bool (Permutation a -> Permutation a -> Bool) -> (Permutation a -> Permutation a -> Bool) -> Eq (Permutation a) forall a. Eq a => Permutation a -> Permutation a -> Bool @@ -81,7 +81,7 @@ == :: Permutation a -> Permutation a -> Bool $c/= :: forall a. Eq a => Permutation a -> Permutation a -> Bool /= :: Permutation a -> Permutation a -> Bool -Eq,(forall x. Permutation a -> Rep (Permutation a) x) +Eq,(forall x. Permutation a -> Rep (Permutation a) x) -> (forall x. Rep (Permutation a) x -> Permutation a) -> Generic (Permutation a) forall x. Rep (Permutation a) x -> Permutation a @@ -94,7 +94,7 @@ from :: forall x. Permutation a -> Rep (Permutation a) x $cto :: forall a x. Rep (Permutation a) x -> Permutation a to :: forall x. Rep (Permutation a) x -> Permutation a -Generic,(forall a b. (a -> b) -> Permutation a -> Permutation b) +Generic,(forall a b. (a -> b) -> Permutation a -> Permutation b) -> (forall a b. a -> Permutation b -> Permutation a) -> Functor Permutation forall a b. a -> Permutation b -> Permutation a @@ -106,7 +106,7 @@ fmap :: forall a b. (a -> b) -> Permutation a -> Permutation b $c<$ :: forall a b. a -> Permutation b -> Permutation a <$ :: forall a b. a -> Permutation b -> Permutation a -Functor,(forall m. Monoid m => Permutation m -> m) +Functor,(forall m. Monoid m => Permutation m -> m) -> (forall m a. Monoid m => (a -> m) -> Permutation a -> m) -> (forall m a. Monoid m => (a -> m) -> Permutation a -> m) -> (forall a b. (a -> b -> b) -> b -> Permutation a -> b) @@ -191,7 +191,7 @@ Foldable) -- | Lens to access the orbits of the permutation -orbits :: Lens (Permutation a) (Permutation b) (NonEmptyVector (Orbit a)) (NonEmptyVector (Orbit b)) +orbits :: Lens (Permutation a) (Permutation b) (NonEmptyVector (Orbit a)) (NonEmptyVector (Orbit b)) orbits :: forall a b (f :: * -> *). Functor f => (NonEmptyVector (Orbit a) -> f (NonEmptyVector (Orbit b))) @@ -206,16 +206,16 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Permutation a -> NonEmptyVector (Orbit a) forall a. Permutation a -> NonEmptyVector (Orbit a) -_orbits (\Permutation a -p NonEmptyVector (Orbit b) -os -> Permutation a -p { _orbits = os }) +_orbits (\Permutation a +p NonEmptyVector (Orbit b) +os -> Permutation a +p { _orbits = os }) -- | Lens to access the indexes of the permutation. -- -- idxes (fromEnum a) = (i,j) implies that a is the j^th item in the -- i^th orbit -indexes :: Lens' (Permutation a) (UV.Vector (Int,Int)) +indexes :: Lens' (Permutation a) (UV.Vector (Int,Int)) indexes :: forall a (f :: * -> *). Functor f => (Vector (Int, Int) -> f (Vector (Int, Int))) @@ -230,29 +230,29 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Permutation a -> Vector (Int, Int) forall a. Permutation a -> Vector (Int, Int) -_indexes (\Permutation a -p Vector (Int, Int) -ixs -> Permutation a -p { _indexes = ixs }) +_indexes (\Permutation a +p Vector (Int, Int) +ixs -> Permutation a +p { _indexes = ixs }) -instance NFData a => NFData (Permutation a) +instance NFData a => NFData (Permutation a) -instance Traversable Permutation where - traverse :: forall (f :: * -> *) a b. +instance Traversable Permutation where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Permutation a -> f (Permutation b) -traverse a -> f b -f (Permutation NonEmptyVector (Orbit a) -os Vector (Int, Int) -is) = (NonEmptyVector (Orbit b) -> Vector (Int, Int) -> Permutation b) +traverse a -> f b +f (Permutation NonEmptyVector (Orbit a) +os Vector (Int, Int) +is) = (NonEmptyVector (Orbit b) -> Vector (Int, Int) -> Permutation b) -> Vector (Int, Int) -> NonEmptyVector (Orbit b) -> Permutation b forall a b c. (a -> b -> c) -> b -> a -> c flip NonEmptyVector (Orbit b) -> Vector (Int, Int) -> Permutation b forall a. NonEmptyVector (Orbit a) -> Vector (Int, Int) -> Permutation a Permutation Vector (Int, Int) -is (NonEmptyVector (Orbit b) -> Permutation b) +is (NonEmptyVector (Orbit b) -> Permutation b) -> f (NonEmptyVector (Orbit b)) -> f (Permutation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (Orbit a -> f (Orbit b)) @@ -271,11 +271,11 @@ Applicative f => (a -> f b) -> NonEmptyVector a -> f (NonEmptyVector b) traverse a -> f b -f) NonEmptyVector (Orbit a) -os +f) NonEmptyVector (Orbit a) +os -- | Get the elements of the permutation -elems :: Permutation a -> NonEmptyVector a +elems :: Permutation a -> NonEmptyVector a elems :: forall a. Permutation a -> NonEmptyVector a elems = (NonEmptyVector a -> NonEmptyVector a) -> NonEmptyVector (NonEmptyVector a) -> NonEmptyVector a @@ -295,13 +295,13 @@ -- | Get the size of a permutation -- -- running time: \(O(1)\) -size :: Permutation a -> Int +size :: Permutation a -> Int size :: forall a. Permutation a -> Int -size Permutation a -perm = Vector (Int, Int) -> Int +size Permutation a +perm = Vector (Int, Int) -> Int forall a. Unbox a => Vector a -> Int UV.length (Permutation a -permPermutation a +permPermutation a -> Getting (Vector (Int, Int)) (Permutation a) (Vector (Int, Int)) -> Vector (Int, Int) forall s a. s -> Getting a s a -> a @@ -313,12 +313,12 @@ indexes) -- | The cycle containing a given item -cycleOf :: Enum a => Permutation a -> a -> Orbit a +cycleOf :: Enum a => Permutation a -> a -> Orbit a cycleOf :: forall a. Enum a => Permutation a -> a -> Orbit a -cycleOf Permutation a -perm a -x = Permutation a -permPermutation a +cycleOf Permutation a +perm a +x = Permutation a +permPermutation a -> Getting (Endo (Orbit a)) (Permutation a) (Orbit a) -> Orbit a forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!(NonEmptyVector (Orbit a) @@ -341,7 +341,7 @@ (NonEmptyVector (Orbit a)) (IxValue (NonEmptyVector (Orbit a))) forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix (Permutation a -permPermutation a -> Getting (Endo Int) (Permutation a) Int -> Int +permPermutation a -> Getting (Endo Int) (Permutation a) Int -> Int forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!(Vector (Int, Int) -> Const (Endo Int) (Vector (Int, Int))) -> Permutation a -> Const (Endo Int) (Permutation a) @@ -361,7 +361,7 @@ ix (a -> Int forall a. Enum a => a -> Int fromEnum a -x)(((Int, Int) -> Const (Endo Int) (Int, Int)) +x)(((Int, Int) -> Const (Endo Int) (Int, Int)) -> Vector (Int, Int) -> Const (Endo Int) (Vector (Int, Int))) -> ((Int -> Const (Endo Int) Int) -> (Int, Int) -> Const (Endo Int) (Int, Int)) @@ -377,57 +377,57 @@ -- | Next item in a cyclic permutation -next :: NonEmptyVector a -> Int -> a +next :: NonEmptyVector a -> Int -> a next :: forall a. NonEmptyVector a -> Int -> a -next NonEmptyVector a -v Int -i = let n :: Int -n = NonEmptyVector a -> Int +next NonEmptyVector a +v Int +i = let n :: Int +n = NonEmptyVector a -> Int forall a. NonEmptyVector a -> Int NonEmptyV.length NonEmptyVector a -v in NonEmptyVector a -v NonEmptyVector a -> Int -> a +v in NonEmptyVector a +v NonEmptyVector a -> Int -> a forall a. NonEmptyVector a -> Int -> a NonEmptyV.! ((Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n) +n) -- | Previous item in a cyclic permutation -previous :: NonEmptyVector a -> Int -> a +previous :: NonEmptyVector a -> Int -> a previous :: forall a. NonEmptyVector a -> Int -> a -previous NonEmptyVector a -v Int -i = let n :: Int -n = NonEmptyVector a -> Int +previous NonEmptyVector a +v Int +i = let n :: Int +n = NonEmptyVector a -> Int forall a. NonEmptyVector a -> Int NonEmptyV.length NonEmptyVector a -v in NonEmptyVector a -v NonEmptyVector a -> Int -> a +v in NonEmptyVector a +v NonEmptyVector a -> Int -> a forall a. NonEmptyVector a -> Int -> a NonEmptyV.! ((Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n) +n) -- | Lookup the indices of an element, i.e. in which orbit the item is, and the -- index within the orbit. -- -- runnign time: \(O(1)\) -lookupIdx :: Enum a => Permutation a -> a -> (Int,Int) +lookupIdx :: Enum a => Permutation a -> a -> (Int,Int) lookupIdx :: forall a. Enum a => Permutation a -> a -> (Int, Int) -lookupIdx Permutation a -perm a -x = Permutation a -permPermutation a +lookupIdx Permutation a +perm a +x = Permutation a +permPermutation a -> Getting (Endo (Int, Int)) (Permutation a) (Int, Int) -> (Int, Int) forall s a. HasCallStack => s -> Getting (Endo a) s a -> a @@ -450,24 +450,24 @@ ix (a -> Int forall a. Enum a => a -> Int fromEnum a -x) +x) -- | Apply the permutation, i.e. consider the permutation as a function. -apply :: Enum a => Permutation a -> a -> a +apply :: Enum a => Permutation a -> a -> a apply :: forall a. Enum a => Permutation a -> a -> a -apply Permutation a -perm a -x = let (Int -c,Int -i) = Permutation a -> a -> (Int, Int) +apply Permutation a +perm a +x = let (Int +c,Int +i) = Permutation a -> a -> (Int, Int) forall a. Enum a => Permutation a -> a -> (Int, Int) lookupIdx Permutation a -perm a -x +perm a +x in NonEmptyVector a -> Int -> a forall a. NonEmptyVector a -> Int -> a next (Permutation a -permPermutation a +permPermutation a -> Getting (Endo (NonEmptyVector a)) (Permutation a) (NonEmptyVector a) -> NonEmptyVector a @@ -500,24 +500,24 @@ forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix Int Index (NonEmptyVector (NonEmptyVector a)) -c) Int -i +c) Int +i -- | Find the cycle in the permutation starting at element s -orbitFrom :: Eq a => a -> (a -> a) -> NonEmpty a +orbitFrom :: Eq a => a -> (a -> a) -> NonEmpty a orbitFrom :: forall a. Eq a => a -> (a -> a) -> NonEmpty a -orbitFrom a -s a -> a -p = a -s a -> [a] -> NonEmpty a +orbitFrom a +s a -> a +p = a +s a -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :| ((a -> Bool) -> [a] -> [a] forall a. (a -> Bool) -> [a] -> [a] takeWhile (a -> a -> Bool forall a. Eq a => a -> a -> Bool /= a -s) ([a] -> [a]) -> (NonEmpty a -> [a]) -> NonEmpty a -> [a] +s) ([a] -> [a]) -> (NonEmpty a -> [a]) -> NonEmpty a -> [a] forall b c a. (b -> c) -> (a -> b) -> a -> c . NonEmpty a -> [a] forall a. NonEmpty a -> [a] @@ -526,22 +526,22 @@ $ (a -> a) -> a -> NonEmpty a forall a. (a -> a) -> a -> NonEmpty a NonEmpty.iterate a -> a -p a -s) +p a +s) -- | Given a vector with items in the permutation, and a permutation (by its -- functional representation) construct the cyclic representation of the -- permutation. -cycleRep :: (Enum a, Eq a) => NonEmptyVector a -> (a -> a) -> Permutation a +cycleRep :: (Enum a, Eq a) => NonEmptyVector a -> (a -> a) -> Permutation a cycleRep :: forall a. (Enum a, Eq a) => NonEmptyVector a -> (a -> a) -> Permutation a -cycleRep NonEmptyVector a -v a -> a -perm = Int -> NonEmpty (NonEmpty a) -> Permutation a +cycleRep NonEmptyVector a +v a -> a +perm = Int -> NonEmpty (NonEmpty a) -> Permutation a forall a. Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a toCycleRep Int -n (NonEmpty (NonEmpty a) -> Permutation a) +n (NonEmpty (NonEmpty a) -> Permutation a) -> NonEmpty (NonEmpty a) -> Permutation a forall a b. (a -> b) -> a -> b $ (forall s. ST s (NonEmpty (NonEmpty a))) -> NonEmpty (NonEmpty a) @@ -551,70 +551,70 @@ -> NonEmpty (NonEmpty a) forall a b. (a -> b) -> a -> b $ do - MVector s Bool -bv <- Int -> Bool -> ST s (MVector (PrimState (ST s)) Bool) + MVector s Bool +bv <- Int -> Bool -> ST s (MVector (PrimState (ST s)) Bool) forall (m :: * -> *) a. (PrimMonad m, Unbox a) => Int -> a -> m (MVector (PrimState m) a) UMV.replicate Int -n Bool +n Bool False -- bit vector of marks - [Maybe (NonEmpty a)] -morbs <- [Int] + [Maybe (NonEmpty a)] +morbs <- [Int] -> (Int -> ST s (Maybe (NonEmpty a))) -> ST s [Maybe (NonEmpty a)] forall (t :: * -> *) (m :: * -> *) a b. (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) forM [Int 0..(Int -n Int -> Int -> Int +n Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1)] ((Int -> ST s (Maybe (NonEmpty a))) -> ST s [Maybe (NonEmpty a)]) -> (Int -> ST s (Maybe (NonEmpty a))) -> ST s [Maybe (NonEmpty a)] forall a b. (a -> b) -> a -> b -$ \Int -i -> do - Bool -m <- MVector (PrimState (ST s)) Bool -> Int -> ST s Bool +$ \Int +i -> do + Bool +m <- MVector (PrimState (ST s)) Bool -> Int -> ST s Bool forall (m :: * -> *) a. (PrimMonad m, Unbox a) => MVector (PrimState m) a -> Int -> m a UMV.read MVector s Bool MVector (PrimState (ST s)) Bool -bv (a -> Int +bv (a -> Int forall a. Enum a => a -> Int fromEnum (a -> Int) -> a -> Int forall a b. (a -> b) -> a -> b $ NonEmptyVector a -v NonEmptyVector a -> Int -> a +v NonEmptyVector a -> Int -> a forall a. NonEmptyVector a -> Int -> a NonEmptyV.! Int -i) +i) if Bool -m then Maybe (NonEmpty a) -> ST s (Maybe (NonEmpty a)) +m then Maybe (NonEmpty a) -> ST s (Maybe (NonEmpty a)) forall a. a -> ST s a forall (f :: * -> *) a. Applicative f => a -> f a pure Maybe (NonEmpty a) forall a. Maybe a Nothing -- already visited else do - let xs :: NonEmpty a -xs = a -> (a -> a) -> NonEmpty a + let xs :: NonEmpty a +xs = a -> (a -> a) -> NonEmpty a forall a. Eq a => a -> (a -> a) -> NonEmpty a orbitFrom (NonEmptyVector a -v NonEmptyVector a -> Int -> a +v NonEmptyVector a -> Int -> a forall a. NonEmptyVector a -> Int -> a NonEmptyV.! Int -i) a -> a -perm +i) a -> a +perm MVector (PrimState (ST s)) Bool -> NonEmpty Int -> ST s () forall {t :: * -> *} {m :: * -> *}. (Foldable t, PrimMonad m) => MVector (PrimState m) Bool -> t Int -> m () -markAll MVector s Bool +markAll MVector s Bool MVector (PrimState (ST s)) Bool -bv (NonEmpty Int -> ST s ()) -> NonEmpty Int -> ST s () +bv (NonEmpty Int -> ST s ()) -> NonEmpty Int -> ST s () forall a b. (a -> b) -> a -> b $ (a -> Int) -> NonEmpty a -> NonEmpty Int forall a b. (a -> b) -> NonEmpty a -> NonEmpty b @@ -622,7 +622,7 @@ fmap a -> Int forall a. Enum a => a -> Int fromEnum NonEmpty a -xs +xs Maybe (NonEmpty a) -> ST s (Maybe (NonEmpty a)) forall a. a -> ST s a forall (f :: * -> *) a. Applicative f => a -> f a @@ -637,7 +637,7 @@ -> NonEmpty a -> ST s (Maybe (NonEmpty a)) forall a b. (a -> b) -> a -> b $ NonEmpty a -xs +xs NonEmpty (NonEmpty a) -> ST s (NonEmpty (NonEmpty a)) forall a. a -> ST s a forall (f :: * -> *) a. Applicative f => a -> f a @@ -659,28 +659,28 @@ -> [Maybe (NonEmpty a)] -> ST s (NonEmpty (NonEmpty a)) forall a b. (a -> b) -> a -> b $ [Maybe (NonEmpty a)] -morbs +morbs where - n :: Int -n = NonEmptyVector a -> Int + n :: Int +n = NonEmptyVector a -> Int forall a. NonEmptyVector a -> Int NonEmptyV.length NonEmptyVector a -v +v - mark :: MVector (PrimState m) Bool -> Int -> m () -mark MVector (PrimState m) Bool -bv Int -i = MVector (PrimState m) Bool -> Int -> Bool -> m () + mark :: MVector (PrimState m) Bool -> Int -> m () +mark MVector (PrimState m) Bool +bv Int +i = MVector (PrimState m) Bool -> Int -> Bool -> m () forall (m :: * -> *) a. (PrimMonad m, Unbox a) => MVector (PrimState m) a -> Int -> a -> m () UMV.write MVector (PrimState m) Bool -bv Int -i Bool +bv Int +i Bool True - markAll :: MVector (PrimState m) Bool -> t Int -> m () -markAll MVector (PrimState m) Bool -bv = (Int -> m ()) -> t Int -> m () + markAll :: MVector (PrimState m) Bool -> t Int -> m () +markAll MVector (PrimState m) Bool +bv = (Int -> m ()) -> t Int -> m () forall (t :: * -> *) (m :: * -> *) a b. (Foldable t, Monad m) => (a -> m b) -> t a -> m () @@ -688,16 +688,16 @@ forall {m :: * -> *}. PrimMonad m => MVector (PrimState m) Bool -> Int -> m () -mark MVector (PrimState m) Bool -bv) +mark MVector (PrimState m) Bool +bv) -- | Given the size n, and a list of Cycles, turns the cycles into a -- cyclic representation of the Permutation. -toCycleRep :: Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a +toCycleRep :: Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a toCycleRep :: forall a. Enum a => Int -> NonEmpty (NonEmpty a) -> Permutation a -toCycleRep Int -n NonEmpty (NonEmpty a) -os = NonEmptyVector (Orbit a) -> Vector (Int, Int) -> Permutation a +toCycleRep Int +n NonEmpty (NonEmpty a) +os = NonEmptyVector (Orbit a) -> Vector (Int, Int) -> Permutation a forall a. NonEmptyVector (Orbit a) -> Vector (Int, Int) -> Permutation a Permutation (NonEmpty (Orbit a) -> NonEmptyVector (Orbit a) @@ -717,35 +717,35 @@ -> NonEmpty (NonEmpty a) -> NonEmptyVector (Orbit a) forall a b. (a -> b) -> a -> b $ NonEmpty (NonEmpty a) -os) +os) (Int -> NonEmpty (NonEmpty a) -> Vector (Int, Int) forall a. Enum a => Int -> NonEmpty (NonEmpty a) -> Vector (Int, Int) genIndexes Int -n NonEmpty (NonEmpty a) -os) +n NonEmpty (NonEmpty a) +os) -- | Helper function to generate the indices of a permutation -genIndexes :: Enum a => Int -> NonEmpty (NonEmpty a) -> UV.Vector (Int,Int) +genIndexes :: Enum a => Int -> NonEmpty (NonEmpty a) -> UV.Vector (Int,Int) genIndexes :: forall a. Enum a => Int -> NonEmpty (NonEmpty a) -> Vector (Int, Int) -genIndexes Int -n NonEmpty (NonEmpty a) -os = (forall s. ST s (MVector s (Int, Int))) -> Vector (Int, Int) +genIndexes Int +n NonEmpty (NonEmpty a) +os = (forall s. ST s (MVector s (Int, Int))) -> Vector (Int, Int) forall a. Unbox a => (forall s. ST s (MVector s a)) -> Vector a UV.create ((forall s. ST s (MVector s (Int, Int))) -> Vector (Int, Int)) -> (forall s. ST s (MVector s (Int, Int))) -> Vector (Int, Int) forall a b. (a -> b) -> a -> b $ do - MVector s (Int, Int) -v <- Int -> ST s (MVector (PrimState (ST s)) (Int, Int)) + MVector s (Int, Int) +v <- Int -> ST s (MVector (PrimState (ST s)) (Int, Int)) forall (m :: * -> *) a. (PrimMonad m, Unbox a) => Int -> m (MVector (PrimState m) a) UMV.new Int -n +n ((Int, (Int, Int)) -> ST s ()) -> [(Int, (Int, Int))] -> ST s () forall (t :: * -> *) (m :: * -> *) a b. (Foldable t, Monad m) => @@ -762,34 +762,34 @@ MVector (PrimState m) a -> Int -> a -> m () UMV.write MVector s (Int, Int) MVector (PrimState (ST s)) (Int, Int) -v) [(Int, (Int, Int))] -ixes' +v) [(Int, (Int, Int))] +ixes' MVector s (Int, Int) -> ST s (MVector s (Int, Int)) forall a. a -> ST s a forall (f :: * -> *) a. Applicative f => a -> f a pure MVector s (Int, Int) -v +v where - f :: a -> t a -> [(Int, (a, b))] -f a -i t a -c = (a -> b -> (Int, (a, b))) -> [a] -> [b] -> [(Int, (a, b))] + f :: a -> t a -> [(Int, (a, b))] +f a +i t a +c = (a -> b -> (Int, (a, b))) -> [a] -> [b] -> [(Int, (a, b))] forall a b c. (a -> b -> c) -> [a] -> [b] -> [c] -zipWith (\a -x b -j -> (a -> Int +zipWith (\a +x b +j -> (a -> Int forall a. Enum a => a -> Int fromEnum a -x,(a -i,b -j))) (t a -> [a] +x,(a +i,b +j))) (t a -> [a] forall a. t a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList t a -c) [b +c) [b 0..] - ixes' :: [(Int, (Int, Int))] -ixes' = [[(Int, (Int, Int))]] -> [(Int, (Int, Int))] + ixes' :: [(Int, (Int, Int))] +ixes' = [[(Int, (Int, Int))]] -> [(Int, (Int, Int))] forall (t :: * -> *) a. Foldable t => t [a] -> [a] concat ([[(Int, (Int, Int))]] -> [(Int, (Int, Int))]) -> [[(Int, (Int, Int))]] -> [(Int, (Int, Int))] @@ -801,10 +801,10 @@ forall {t :: * -> *} {b} {a} {a}. (Foldable t, Num b, Enum a, Enum b) => a -> t a -> [(Int, (a, b))] -f [Int +f [Int 0..] (NonEmpty (NonEmpty a) -> [NonEmpty a] forall a. NonEmpty a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList NonEmpty (NonEmpty a) -os) +os)
\ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.Alternating.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.Alternating.html index ce727a8ad..ee1190911 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.Alternating.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.Alternating.html @@ -13,36 +13,38 @@
( Alternating(..) , fromNonEmptyWith , mapF - , withNeighbours - , mergeAlternating - , insertBreakPoints - , reverse - - , consElemWith - , unconsAlt - , snocElemWith - ) where - -import Control.DeepSeq -import Control.Lens -import Data.Bifoldable -import Data.Bitraversable -import qualified Data.Foldable as F -import Data.Foldable1 -import Data.Functor.Apply ((<.*>)) -import qualified Data.List as List -import Data.List.NonEmpty (NonEmpty(..)) -import qualified Data.List.NonEmpty as NonEmpty -import Data.Semigroup.Traversable -import GHC.Generics (Generic) -import HGeometry.Foldable.Util -import Prelude hiding (reverse) - --------------------------------------------------------------------------------- + , firstWithNeighbors + , withNeighbours + , mergeAlternating + , insertBreakPoints + , reverse + + , consElemWith + , unconsAlt + , snocElemWith + , separators + ) where + +import Control.DeepSeq +import Control.Lens +import Data.Bifoldable +import Data.Bitraversable +import qualified Data.Foldable as F +import Data.Foldable1 +import Data.Functor.Apply ((<.*>)) +import qualified Data.List as List +import Data.List.NonEmpty (NonEmpty(..)) +import qualified Data.List.NonEmpty as NonEmpty +import Data.Semigroup.Traversable +import GHC.Generics (Generic) +import HGeometry.Foldable.Util +import Prelude hiding (reverse) --- | A (non-empty) alternating sequence of @a@\'s and @sep@'s. -data Alternating f sep a = Alternating a (f (sep, a)) - deriving ((forall x. Alternating f sep a -> Rep (Alternating f sep a) x) +-------------------------------------------------------------------------------- + +-- | A (non-empty) alternating sequence of @a@\'s and @sep@'s. +data Alternating f sep a = Alternating a (f (sep, a)) + deriving ((forall x. Alternating f sep a -> Rep (Alternating f sep a) x) -> (forall x. Rep (Alternating f sep a) x -> Alternating f sep a) -> Generic (Alternating f sep a) forall x. Rep (Alternating f sep a) x -> Alternating f sep a @@ -60,24 +62,24 @@ Rep (Alternating f sep a) x -> Alternating f sep a to :: forall x. Rep (Alternating f sep a) x -> Alternating f sep a Generic) - -deriving instance (Show a, Show (f (sep, a))) => Show (Alternating f sep a) -deriving instance (Eq a, Eq (f (sep, a))) => Eq (Alternating f sep a) -deriving instance (Ord a, Ord (f (sep, a))) => Ord (Alternating f sep a) - -instance (NFData a, NFData (f (sep, a))) => NFData (Alternating f sep a) + +deriving instance (Show a, Show (f (sep, a))) => Show (Alternating f sep a) +deriving instance (Eq a, Eq (f (sep, a))) => Eq (Alternating f sep a) +deriving instance (Ord a, Ord (f (sep, a))) => Ord (Alternating f sep a) - -instance Functor f => Functor (Alternating f sep) where - fmap :: forall a b. (a -> b) -> Alternating f sep a -> Alternating f sep b -fmap a -> b -f (Alternating a -x f (sep, a) -xs) = b -> f (sep, b) -> Alternating f sep b +instance (NFData a, NFData (f (sep, a))) => NFData (Alternating f sep a) + + +instance Functor f => Functor (Alternating f sep) where + fmap :: forall a b. (a -> b) -> Alternating f sep a -> Alternating f sep b +fmap a -> b +f (Alternating a +x f (sep, a) +xs) = b -> f (sep, b) -> Alternating f sep b forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating (a -> b -f a -x) (f (sep, b) -> Alternating f sep b) +f a +x) (f (sep, b) -> Alternating f sep b) -> f (sep, b) -> Alternating f sep b forall a b. (a -> b) -> a -> b $ ((sep, a) -> (sep, b)) -> f (sep, a) -> f (sep, b) @@ -87,16 +89,16 @@ forall a b. (a -> b) -> (sep, a) -> (sep, b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f) f (sep, a) -xs -instance Foldable f => Foldable (Alternating f sep) where - foldMap :: forall m a. Monoid m => (a -> m) -> Alternating f sep a -> m -foldMap a -> m -f (Alternating a -x f (sep, a) -xs) = a -> m -f a -x m -> m -> m +f) f (sep, a) +xs +instance Foldable f => Foldable (Alternating f sep) where + foldMap :: forall m a. Monoid m => (a -> m) -> Alternating f sep a -> m +foldMap a -> m +f (Alternating a +x f (sep, a) +xs) = a -> m +f a +x m -> m -> m forall a. Semigroup a => a -> a -> a <> ((sep, a) -> m) -> f (sep, a) -> m forall m a. Monoid m => (a -> m) -> f a -> m @@ -104,27 +106,27 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap (a -> m -f (a -> m) -> ((sep, a) -> a) -> (sep, a) -> m +f (a -> m) -> ((sep, a) -> a) -> (sep, a) -> m forall b c a. (b -> c) -> (a -> b) -> a -> c . (sep, a) -> a forall a b. (a, b) -> b snd) f (sep, a) -xs -instance Traversable f => Traversable (Alternating f sep) where - traverse :: forall (f :: * -> *) a b. +xs +instance Traversable f => Traversable (Alternating f sep) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Alternating f sep a -> f (Alternating f sep b) -traverse a -> f b -f (Alternating a -x f (sep, a) -xs) = b -> f (sep, b) -> Alternating f sep b +traverse a -> f b +f (Alternating a +x f (sep, a) +xs) = b -> f (sep, b) -> Alternating f sep b forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating (b -> f (sep, b) -> Alternating f sep b) -> f b -> f (f (sep, b) -> Alternating f sep b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -x f (f (sep, b) -> Alternating f sep b) +f a +x f (f (sep, b) -> Alternating f sep b) -> f (f (sep, b)) -> f (Alternating f sep b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b @@ -143,15 +145,15 @@ Applicative f => (a -> f b) -> (sep, a) -> f (sep, b) traverse a -> f b -f) f (sep, a) -xs - -instance Foldable f => Foldable1 (Alternating f sep) where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> Alternating f sep a -> m -foldMap1 a -> m -f (Alternating a -x f (sep, a) -xs) = case ((sep, a) -> Maybe m) -> f (sep, a) -> Maybe m +f) f (sep, a) +xs + +instance Foldable f => Foldable1 (Alternating f sep) where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> Alternating f sep a -> m +foldMap1 a -> m +f (Alternating a +x f (sep, a) +xs) = case ((sep, a) -> Maybe m) -> f (sep, a) -> Maybe m forall m a. Monoid m => (a -> m) -> f a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => @@ -161,39 +163,39 @@ Just (m -> Maybe m) -> ((sep, a) -> m) -> (sep, a) -> Maybe m forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> m -f (a -> m) -> ((sep, a) -> a) -> (sep, a) -> m +f (a -> m) -> ((sep, a) -> a) -> (sep, a) -> m forall b c a. (b -> c) -> (a -> b) -> a -> c . (sep, a) -> a forall a b. (a, b) -> b snd) f (sep, a) -xs of - Maybe m +xs of + Maybe m Nothing -> a -> m -f a -x - Just m -r -> a -> m -f a -x m -> m -> m +f a +x + Just m +r -> a -> m +f a +x m -> m -> m forall a. Semigroup a => a -> a -> a <> m -r - -instance Traversable f => Traversable1 (Alternating f sep) where - traverse1 :: forall (f :: * -> *) a b. +r + +instance Traversable f => Traversable1 (Alternating f sep) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Alternating f sep a -> f (Alternating f sep b) -traverse1 a -> f b -f (Alternating a -x f (sep, a) -xs) = b -> f (sep, b) -> Alternating f sep b +traverse1 a -> f b +f (Alternating a +x f (sep, a) +xs) = b -> f (sep, b) -> Alternating f sep b forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating (b -> f (sep, b) -> Alternating f sep b) -> f b -> f (f (sep, b) -> Alternating f sep b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -x f (f (sep, b) -> Alternating f sep b) +f a +x f (f (sep, b) -> Alternating f sep b) -> MaybeApply f (f (sep, b)) -> f (Alternating f sep b) forall (f :: * -> *) a b. Apply f => @@ -210,21 +212,21 @@ Apply f => (a -> f b) -> (sep, a) -> f (sep, b) traverse1 a -> f b -f) f (sep, a) -xs - -instance Functor f => Bifunctor (Alternating f) where - bimap :: forall a b c d. +f) f (sep, a) +xs + +instance Functor f => Bifunctor (Alternating f) where + bimap :: forall a b c d. (a -> b) -> (c -> d) -> Alternating f a c -> Alternating f b d -bimap a -> b -f c -> d -g (Alternating c -x f (a, c) -xs) = d -> f (b, d) -> Alternating f b d +bimap a -> b +f c -> d +g (Alternating c +x f (a, c) +xs) = d -> f (b, d) -> Alternating f b d forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating (c -> d -g c -x) (f (b, d) -> Alternating f b d) -> f (b, d) -> Alternating f b d +g c +x) (f (b, d) -> Alternating f b d) -> f (b, d) -> Alternating f b d forall a b. (a -> b) -> a -> b $ ((a, c) -> (b, d)) -> f (a, c) -> f (b, d) forall a b. (a -> b) -> f a -> f b @@ -235,21 +237,21 @@ Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d bimap a -> b -f c -> d -g) f (a, c) -xs - -instance Foldable f => Bifoldable (Alternating f) where - bifoldMap :: forall m a b. +f c -> d +g) f (a, c) +xs + +instance Foldable f => Bifoldable (Alternating f) where + bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> Alternating f a b -> m -bifoldMap a -> m -f b -> m -g (Alternating b -x f (a, b) -xs) = b -> m -g b -x m -> m -> m +bifoldMap a -> m +f b -> m +g (Alternating b +x f (a, b) +xs) = b -> m +g b +x m -> m -> m forall a. Semigroup a => a -> a -> a <> ((a, b) -> m) -> f (a, b) -> m forall m a. Monoid m => (a -> m) -> f a -> m @@ -262,27 +264,27 @@ (Bifoldable p, Monoid m) => (a -> m) -> (b -> m) -> p a b -> m bifoldMap a -> m -f b -> m -g) f (a, b) -xs - -instance Traversable f => Bitraversable (Alternating f) where - bitraverse :: forall (f :: * -> *) a c b d. +f b -> m +g) f (a, b) +xs + +instance Traversable f => Bitraversable (Alternating f) where + bitraverse :: forall (f :: * -> *) a c b d. Applicative f => (a -> f c) -> (b -> f d) -> Alternating f a b -> f (Alternating f c d) -bitraverse a -> f c -f b -> f d -g (Alternating b -x f (a, b) -xs) = d -> f (c, d) -> Alternating f c d +bitraverse a -> f c +f b -> f d +g (Alternating b +x f (a, b) +xs) = d -> f (c, d) -> Alternating f c d forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating (d -> f (c, d) -> Alternating f c d) -> f d -> f (f (c, d) -> Alternating f c d) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> b -> f d -g b -x f (f (c, d) -> Alternating f c d) +g b +x f (f (c, d) -> Alternating f c d) -> f (f (c, d)) -> f (Alternating f c d) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b @@ -301,29 +303,29 @@ (Bitraversable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f (t c d) bitraverse a -> f c -f b -> f d -g) f (a, b) -xs - - --- | Given a separator, and some foldable structure, constructs an Alternating. -fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a -fromNonEmptyWith :: forall (g :: * -> *) (f :: * -> *) sep a. +f b -> f d +g) f (a, b) +xs + + +-- | Given a separator, and some foldable structure, constructs an Alternating. +fromNonEmptyWith :: (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a +fromNonEmptyWith :: forall (g :: * -> *) (f :: * -> *) sep a. (HasFromFoldable g, Foldable1 f) => sep -> f a -> Alternating g sep a -fromNonEmptyWith sep -sep f a -xs = let (a -x0 :| [a] -xs') = f a -> NonEmpty a +fromNonEmptyWith sep +sep f a +xs = let (a +x0 :| [a] +xs') = f a -> NonEmpty a forall a. f a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty f a -xs - in a -> g (sep, a) -> Alternating g sep a +xs + in a -> g (sep, a) -> Alternating g sep a forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating a -x0 (g (sep, a) -> Alternating g sep a) +x0 (g (sep, a) -> Alternating g sep a) -> g (sep, a) -> Alternating g sep a forall a b. (a -> b) -> a -> b $ [(sep, a)] -> g (sep, a) @@ -332,202 +334,202 @@ fromList ((a -> (sep, a)) -> [a] -> [(sep, a)] forall a b. (a -> b) -> [a] -> [b] map (sep -sep,) [a] -xs') - - --- | map some function changing the f into a g. -mapF :: (f (sep, a) -> g (sep', a)) - -> Alternating f sep a -> Alternating g sep' a -mapF :: forall (f :: * -> *) sep a (g :: * -> *) sep'. +sep,) [a] +xs') + + +-- | map some function changing the f into a g. +mapF :: (f (sep, a) -> g (sep', a)) + -> Alternating f sep a -> Alternating g sep' a +mapF :: forall (f :: * -> *) sep a (g :: * -> *) sep'. (f (sep, a) -> g (sep', a)) -> Alternating f sep a -> Alternating g sep' a -mapF f (sep, a) -> g (sep', a) -f (Alternating a -x f (sep, a) -xs) = a -> g (sep', a) -> Alternating g sep' a +mapF f (sep, a) -> g (sep', a) +f (Alternating a +x f (sep, a) +xs) = a -> g (sep', a) -> Alternating g sep' a forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating a -x (g (sep', a) -> Alternating g sep' a) +x (g (sep', a) -> Alternating g sep' a) -> g (sep', a) -> Alternating g sep' a forall a b. (a -> b) -> a -> b $ f (sep, a) -> g (sep', a) -f f (sep, a) -xs - - --- | Computes a b with all its neighbours --- --- >>> withNeighbours (Alternating 0 [('a', 1), ('b', 2), ('c',3)]) --- [(0,'a',1),(1,'b',2),(2,'c',3)] -withNeighbours :: Foldable f => Alternating f sep a -> [(a,sep,a)] -withNeighbours :: forall (f :: * -> *) sep a. +f f (sep, a) +xs + + +-- | Computes a b with all its neighbours +-- +-- >>> withNeighbours (Alternating 0 [('a', 1), ('b', 2), ('c',3)]) +-- [(0,'a',1),(1,'b',2),(2,'c',3)] +withNeighbours :: Foldable f => Alternating f sep a -> [(a,sep,a)] +withNeighbours :: forall (f :: * -> *) sep a. Foldable f => Alternating f sep a -> [(a, sep, a)] -withNeighbours xs :: Alternating f sep a -xs@(Alternating a -_ f (sep, a) -ys) = - (a -> (sep, a) -> (a, sep, a)) +withNeighbours xs :: Alternating f sep a +xs@(Alternating a +_ f (sep, a) +ys) = + (a -> (sep, a) -> (a, sep, a)) -> [a] -> [(sep, a)] -> [(a, sep, a)] forall a b c. (a -> b -> c) -> [a] -> [b] -> [c] -zipWith (\a -a (sep -s,a -a') -> (a -a,sep -s,a -a')) (Alternating f sep a -> [a] +zipWith (\a +a (sep +s,a +a') -> (a +a,sep +s,a +a')) (Alternating f sep a -> [a] forall a. Alternating f sep a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList Alternating f sep a -xs) (f (sep, a) -> [(sep, a)] +xs) (f (sep, a) -> [(sep, a)] forall a. f a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList f (sep, a) -ys) - - --- | Generic merging scheme that merges two Alternating Lists and applies the function --- '@f@', with the current/new value at every event. So note that if the alternating --- consists of 'Alternating a0 [(t1,a2)]' then the function is applied to a1, not to a0 --- (i.e. every value ai is considered alive on the interval [ti,t(i+1)) --- --- >>> let odds = Alternating "a" [(3,"c"), (5,"e"), (7,"g")] --- >>> let evens = Alternating "b" [(4,"d"), (6,"f"), (8,"h")] --- >>> mergeAlternating (\_ a b -> a <> b) odds evens --- [(3,"cb"),(4,"cd"),(5,"ed"),(6,"ef"),(7,"gf"),(8,"gh")] --- >>> mergeAlternating (\t a b -> if t `mod` 2 == 0 then a else b) odds evens --- [(3,"b"),(4,"c"),(5,"d"),(6,"e"),(7,"f"),(8,"g")] --- >>> mergeAlternating (\_ a b -> a <> b) odds (Alternating "b" [(0,"d"), (5,"e"), (8,"h")]) --- [(0,"ad"),(3,"cd"),(5,"ee"),(7,"ge"),(8,"gh")] -mergeAlternating :: Ord t - => (t -> a -> b -> c) - -> Alternating [] t a -> Alternating [] t b - -> [(t,c)] -mergeAlternating :: forall t a b c. +ys) + + +-- | Generic merging scheme that merges two Alternating Lists and applies the function +-- '@f@', with the current/new value at every event. So note that if the alternating +-- consists of 'Alternating a0 [(t1,a2)]' then the function is applied to a1, not to a0 +-- (i.e. every value ai is considered alive on the interval [ti,t(i+1)) +-- +-- >>> let odds = Alternating "a" [(3,"c"), (5,"e"), (7,"g")] +-- >>> let evens = Alternating "b" [(4,"d"), (6,"f"), (8,"h")] +-- >>> mergeAlternating (\_ a b -> a <> b) odds evens +-- [(3,"cb"),(4,"cd"),(5,"ed"),(6,"ef"),(7,"gf"),(8,"gh")] +-- >>> mergeAlternating (\t a b -> if t `mod` 2 == 0 then a else b) odds evens +-- [(3,"b"),(4,"c"),(5,"d"),(6,"e"),(7,"f"),(8,"g")] +-- >>> mergeAlternating (\_ a b -> a <> b) odds (Alternating "b" [(0,"d"), (5,"e"), (8,"h")]) +-- [(0,"ad"),(3,"cd"),(5,"ee"),(7,"ge"),(8,"gh")] +mergeAlternating :: Ord t + => (t -> a -> b -> c) + -> Alternating [] t a -> Alternating [] t b + -> [(t,c)] +mergeAlternating :: forall t a b c. Ord t => (t -> a -> b -> c) -> Alternating [] t a -> Alternating [] t b -> [(t, c)] -mergeAlternating t -> a -> b -> c -f (Alternating a -a00 [(t, a)] -as0) - (Alternating b -b00 [(t, b)] -bs0) = a -> b -> [(t, a)] -> [(t, b)] -> [(t, c)] -go a -a00 b -b00 [(t, a)] -as0 [(t, b)] -bs0 - where - go :: a -> b -> [(t, a)] -> [(t, b)] -> [(t, c)] -go a -a b -_ [] [(t, b)] -bs = ((t, b) -> (t, c)) -> [(t, b)] -> [(t, c)] +mergeAlternating t -> a -> b -> c +f (Alternating a +a00 [(t, a)] +as0) + (Alternating b +b00 [(t, b)] +bs0) = a -> b -> [(t, a)] -> [(t, b)] -> [(t, c)] +go a +a00 b +b00 [(t, a)] +as0 [(t, b)] +bs0 + where + go :: a -> b -> [(t, a)] -> [(t, b)] -> [(t, c)] +go a +a b +_ [] [(t, b)] +bs = ((t, b) -> (t, c)) -> [(t, b)] -> [(t, c)] forall a b. (a -> b) -> [a] -> [b] -map (\(t -t,b -b) -> (t -t, t -> a -> b -> c -f t -t a -a b -b)) [(t, b)] -bs - go a -_ b -b [(t, a)] -as [] = ((t, a) -> (t, c)) -> [(t, a)] -> [(t, c)] +map (\(t +t,b +b) -> (t +t, t -> a -> b -> c +f t +t a +a b +b)) [(t, b)] +bs + go a +_ b +b [(t, a)] +as [] = ((t, a) -> (t, c)) -> [(t, a)] -> [(t, c)] forall a b. (a -> b) -> [a] -> [b] -map (\(t -t,a -a) -> (t -t, t -> a -> b -> c -f t -t a -a b -b)) [(t, a)] -as - go a -a0 b -b0 as :: [(t, a)] -as@((t -t, a -a):[(t, a)] -as') bs :: [(t, b)] -bs@((t -t', b -b):[(t, b)] -bs') = case t -t t -> t -> Ordering +map (\(t +t,a +a) -> (t +t, t -> a -> b -> c +f t +t a +a b +b)) [(t, a)] +as + go a +a0 b +b0 as :: [(t, a)] +as@((t +t, a +a):[(t, a)] +as') bs :: [(t, b)] +bs@((t +t', b +b):[(t, b)] +bs') = case t +t t -> t -> Ordering forall a. Ord a => a -> a -> Ordering `compare` t -t' of - Ordering +t' of + Ordering LT -> (t -t , t -> a -> b -> c -f t -t a -a b -b0) (t, c) -> [(t, c)] -> [(t, c)] +t , t -> a -> b -> c +f t +t a +a b +b0) (t, c) -> [(t, c)] -> [(t, c)] forall a. a -> [a] -> [a] : a -> b -> [(t, a)] -> [(t, b)] -> [(t, c)] -go a -a b -b0 [(t, a)] -as' [(t, b)] -bs - Ordering +go a +a b +b0 [(t, a)] +as' [(t, b)] +bs + Ordering EQ -> (t -t , t -> a -> b -> c -f t -t a -a b -b) (t, c) -> [(t, c)] -> [(t, c)] +t , t -> a -> b -> c +f t +t a +a b +b) (t, c) -> [(t, c)] -> [(t, c)] forall a. a -> [a] -> [a] : a -> b -> [(t, a)] -> [(t, b)] -> [(t, c)] -go a -a b -b [(t, a)] -as' [(t, b)] -bs' - Ordering +go a +a b +b [(t, a)] +as' [(t, b)] +bs' + Ordering GT -> (t -t', t -> a -> b -> c -f t -t' a -a0 b -b) (t, c) -> [(t, c)] -> [(t, c)] +t', t -> a -> b -> c +f t +t' a +a0 b +b) (t, c) -> [(t, c)] -> [(t, c)] forall a. a -> [a] -> [a] : a -> b -> [(t, a)] -> [(t, b)] -> [(t, c)] -go a -a0 b -b [(t, a)] -as [(t, b)] -bs' - --- | Adds additional t-values in the alternating, (in sorted order). I.e. if we insert a --- "breakpoint" at time t the current '@a@' value is used at that time. --- --- >>> insertBreakPoints [0,2,4,6,8,10] $ Alternating "a" [(3, "c"), (5, "e"), (7,"g")] --- Alternating "a" [(0,"a"),(2,"a"),(3,"c"),(4,"c"),(5,"e"),(6,"e"),(7,"g"),(8,"g"),(10,"g")] -insertBreakPoints :: Ord t - => [t] -> Alternating [] t a -> Alternating [] t a -insertBreakPoints :: forall t a. +go a +a0 b +b [(t, a)] +as [(t, b)] +bs' + +-- | Adds additional t-values in the alternating, (in sorted order). I.e. if we insert a +-- "breakpoint" at time t the current '@a@' value is used at that time. +-- +-- >>> insertBreakPoints [0,2,4,6,8,10] $ Alternating "a" [(3, "c"), (5, "e"), (7,"g")] +-- Alternating "a" [(0,"a"),(2,"a"),(3,"c"),(4,"c"),(5,"e"),(6,"e"),(7,"g"),(8,"g"),(10,"g")] +insertBreakPoints :: Ord t + => [t] -> Alternating [] t a -> Alternating [] t a +insertBreakPoints :: forall t a. Ord t => [t] -> Alternating [] t a -> Alternating [] t a -insertBreakPoints [t] -ts a :: Alternating [] t a -a@(Alternating a -a0 [(t, a)] +insertBreakPoints [t] +ts a :: Alternating [] t a +a@(Alternating a +a0 [(t, a)] _) = - a -> [(t, a)] -> Alternating [] t a + a -> [(t, a)] -> Alternating [] t a forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating a -a0 ([(t, a)] -> Alternating [] t a) -> [(t, a)] -> Alternating [] t a +a0 ([(t, a)] -> Alternating [] t a) -> [(t, a)] -> Alternating [] t a forall a b. (a -> b) -> a -> b $ (t -> () -> a -> a) -> Alternating [] t () -> Alternating [] t a -> [(t, a)] @@ -537,100 +539,100 @@ -> Alternating [] t a -> Alternating [] t b -> [(t, c)] mergeAlternating (\t _ () -_ a -a' -> a -a') (() -> [(t, ())] -> Alternating [] t () +_ a +a' -> a +a') (() -> [(t, ())] -> Alternating [] t () forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating () forall a. HasCallStack => a undefined ((t -> (t, ())) -> [t] -> [(t, ())] forall a b. (a -> b) -> [a] -> [b] map (,()) [t] -ts)) Alternating [] t a -a - - --- | Reverses an alternating list. --- --- >>> reverse $ Alternating "a" [(3, "c"), (5, "e"), (7, "g")] --- Alternating "g" [(7,"e"),(5,"c"),(3,"a")] -reverse :: Alternating [] b a -> Alternating [] b a -reverse :: forall b a. Alternating [] b a -> Alternating [] b a -reverse p :: Alternating [] b a -p@(Alternating a -s [(b, a)] -xs) = case [(b, a)] -> Maybe (NonEmpty (b, a)) +ts)) Alternating [] t a +a + + +-- | Reverses an alternating list. +-- +-- >>> reverse $ Alternating "a" [(3, "c"), (5, "e"), (7, "g")] +-- Alternating "g" [(7,"e"),(5,"c"),(3,"a")] +reverse :: Alternating [] b a -> Alternating [] b a +reverse :: forall b a. Alternating [] b a -> Alternating [] b a +reverse p :: Alternating [] b a +p@(Alternating a +s [(b, a)] +xs) = case [(b, a)] -> Maybe (NonEmpty (b, a)) forall a. [a] -> Maybe (NonEmpty a) NonEmpty.nonEmpty [(b, a)] -xs of - Maybe (NonEmpty (b, a)) +xs of + Maybe (NonEmpty (b, a)) Nothing -> Alternating [] b a -p - Just xs1 :: NonEmpty (b, a) -xs1@((b -e1,a -_):|[(b, a)] -tl) -> let ys :: [(b, a)] -ys = (b -e1, a -s) (b, a) -> [(b, a)] -> [(b, a)] +p + Just xs1 :: NonEmpty (b, a) +xs1@((b +e1,a +_):|[(b, a)] +tl) -> let ys :: [(b, a)] +ys = (b +e1, a +s) (b, a) -> [(b, a)] -> [(b, a)] forall a. a -> [a] -> [a] : ((b, a) -> (b, a) -> (b, a)) -> [(b, a)] -> [(b, a)] -> [(b, a)] forall a b c. (a -> b -> c) -> [a] -> [b] -> [c] List.zipWith (\(b -_, a -v) (b -e, a +_, a +v) (b +e, a _) -> (b -e, a -v)) [(b, a)] -xs [(b, a)] -tl - (b -_,a -t) = NonEmpty (b, a) -> (b, a) +e, a +v)) [(b, a)] +xs [(b, a)] +tl + (b +_,a +t) = NonEmpty (b, a) -> (b, a) forall a. NonEmpty a -> a NonEmpty.last NonEmpty (b, a) -xs1 - in a -> [(b, a)] -> Alternating [] b a +xs1 + in a -> [(b, a)] -> Alternating [] b a forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating a -t ([(b, a)] -> [(b, a)] +t ([(b, a)] -> [(b, a)] forall a. [a] -> [a] List.reverse [(b, a)] -ys) - - --------------------------------------------------------------------------------- +ys) + --- | Given a function f that takes the new element y and the (current) first element x and --- computes the new separating element s, conses y and the the separator onto alternating --- list. --- --- >>> consElemWith (\_ _ -> ".") 0 (fromNonEmptyWith @[] "," (NonEmpty.fromList [1..5])) --- Alternating 0 [(".",1),(",",2),(",",3),(",",4),(",",5)] --- >>> consElemWith (\_ _ -> ".") 0 (fromNonEmptyWith @[] "," (NonEmpty.fromList [1])) --- Alternating 0 [(".",1)] -consElemWith :: Cons (f (sep,a)) (f (sep,a)) (sep,a) (sep,a) - => (a -> a -> sep) - -> a - -> Alternating f sep a -> Alternating f sep a -consElemWith :: forall (f :: * -> *) sep a. +-------------------------------------------------------------------------------- + +-- | Given a function f that takes the new element y and the (current) first element x and +-- computes the new separating element s, conses y and the the separator onto alternating +-- list. +-- +-- >>> consElemWith (\_ _ -> ".") 0 (fromNonEmptyWith @[] "," (NonEmpty.fromList [1..5])) +-- Alternating 0 [(".",1),(",",2),(",",3),(",",4),(",",5)] +-- >>> consElemWith (\_ _ -> ".") 0 (fromNonEmptyWith @[] "," (NonEmpty.fromList [1])) +-- Alternating 0 [(".",1)] +consElemWith :: Cons (f (sep,a)) (f (sep,a)) (sep,a) (sep,a) + => (a -> a -> sep) + -> a + -> Alternating f sep a -> Alternating f sep a +consElemWith :: forall (f :: * -> *) sep a. Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> a -> Alternating f sep a -> Alternating f sep a -consElemWith a -> a -> sep -f a -y (Alternating a -x0 f (sep, a) -xs) = let s :: sep -s = a -> a -> sep -f a -y a -x0 in - a -> f (sep, a) -> Alternating f sep a +consElemWith a -> a -> sep +f a +y (Alternating a +x0 f (sep, a) +xs) = let s :: sep +s = a -> a -> sep +f a +y a +x0 in + a -> f (sep, a) -> Alternating f sep a forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating a -y (f (sep, a) -> Alternating f sep a) +y (f (sep, a) -> Alternating f sep a) -> f (sep, a) -> Alternating f sep a forall a b. (a -> b) -> a -> b $ Getting (f (sep, a)) ((sep, a), f (sep, a)) (f (sep, a)) @@ -647,23 +649,23 @@ ((sep, a), f (sep, a)) ((sep, a), f (sep, a)) _Cons) ((sep -s,a -x0), f (sep, a) -xs) - -- a 're _Cons' is essentially something that when given a tuple (z,zs) turns it into a - -- z `cons` zs - --- | Uncons the Alternating, getting either just the first element (if there was only one), --- or the first element, the first separator, and the remaining alternating. -unconsAlt :: Cons (f (sep,a)) (f (sep,a)) (sep,a) (sep,a) - => Alternating f sep a -> Either a ((a,sep), Alternating f sep a) -unconsAlt :: forall (f :: * -> *) sep a. +s,a +x0), f (sep, a) +xs) + -- a 're _Cons' is essentially something that when given a tuple (z,zs) turns it into a + -- z `cons` zs + +-- | Uncons the Alternating, getting either just the first element (if there was only one), +-- or the first element, the first separator, and the remaining alternating. +unconsAlt :: Cons (f (sep,a)) (f (sep,a)) (sep,a) (sep,a) + => Alternating f sep a -> Either a ((a,sep), Alternating f sep a) +unconsAlt :: forall (f :: * -> *) sep a. Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a) -unconsAlt (Alternating a -x0 f (sep, a) -xs) = case f (sep, a) -xsf (sep, a) +unconsAlt (Alternating a +x0 f (sep, a) +xs) = case f (sep, a) +xsf (sep, a) -> Getting (First ((sep, a), f (sep, a))) (f (sep, a)) ((sep, a), f (sep, a)) -> Maybe ((sep, a), f (sep, a)) @@ -677,49 +679,49 @@ ((sep, a), f (sep, a)) ((sep, a), f (sep, a)) _Cons of - Maybe ((sep, a), f (sep, a)) + Maybe ((sep, a), f (sep, a)) Nothing -> a -> Either a ((a, sep), Alternating f sep a) forall a b. a -> Either a b Left a -x0 - Just ((sep -s,a -x1),f (sep, a) -xs') -> ((a, sep), Alternating f sep a) +x0 + Just ((sep +s,a +x1),f (sep, a) +xs') -> ((a, sep), Alternating f sep a) -> Either a ((a, sep), Alternating f sep a) forall a b. b -> Either a b Right ((a -x0,sep -s), a -> f (sep, a) -> Alternating f sep a +x0,sep +s), a -> f (sep, a) -> Alternating f sep a forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating a -x1 f (sep, a) -xs') - --------------------------------------------------------------------------------- +x1 f (sep, a) +xs') --- | Given a function f that takes the (current) last element x, and the new element y, --- and computes the new separating element s, snocs the separator and y onto the --- alternating list. --- --- >>> snocElemWith (\_ _ -> ".") (fromNonEmptyWith @[] "," (NonEmpty.fromList [1..5])) 6 --- Alternating 1 [(",",2),(",",3),(",",4),(",",5),(".",6)] --- >>> snocElemWith (\_ _ -> ".") (fromNonEmptyWith @[] "," (NonEmpty.fromList [1])) 6 --- Alternating 1 [(".",6)] -snocElemWith :: Snoc (f (sep,a)) (f (sep,a)) (sep,a) (sep,a) - => (a -> a -> sep) - -> Alternating f sep a -> a -> Alternating f sep a -snocElemWith :: forall (f :: * -> *) sep a. +-------------------------------------------------------------------------------- + +-- | Given a function f that takes the (current) last element x, and the new element y, +-- and computes the new separating element s, snocs the separator and y onto the +-- alternating list. +-- +-- >>> snocElemWith (\_ _ -> ".") (fromNonEmptyWith @[] "," (NonEmpty.fromList [1..5])) 6 +-- Alternating 1 [(",",2),(",",3),(",",4),(",",5),(".",6)] +-- >>> snocElemWith (\_ _ -> ".") (fromNonEmptyWith @[] "," (NonEmpty.fromList [1])) 6 +-- Alternating 1 [(".",6)] +snocElemWith :: Snoc (f (sep,a)) (f (sep,a)) (sep,a) (sep,a) + => (a -> a -> sep) + -> Alternating f sep a -> a -> Alternating f sep a +snocElemWith :: forall (f :: * -> *) sep a. Snoc (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => (a -> a -> sep) -> Alternating f sep a -> a -> Alternating f sep a -snocElemWith a -> a -> sep -f (Alternating a -x0 f (sep, a) -xs) a -y = a -> f (sep, a) -> Alternating f sep a +snocElemWith a -> a -> sep +f (Alternating a +x0 f (sep, a) +xs) a +y = a -> f (sep, a) -> Alternating f sep a forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating a -x0 (f (sep, a) -> Alternating f sep a) +x0 (f (sep, a) -> Alternating f sep a) -> f (sep, a) -> Alternating f sep a forall a b. (a -> b) -> a -> b $ Getting (f (sep, a)) (f (sep, a), (sep, a)) (f (sep, a)) @@ -736,30 +738,86 @@ (f (sep, a), (sep, a)) (f (sep, a), (sep, a)) _Snoc) (f (sep, a) -xs, (sep -s,a -y)) - -- a 're _Snoc' is essentially something that when given a tuple (zs,z) turns it into a - -- zs `snoc` z - where - s :: sep -s = case f (sep, a) -xsf (sep, a) +xs, (sep +s,a +y)) + -- a 're _Snoc' is essentially something that when given a tuple (zs,z) turns it into a + -- zs `snoc` z + where + s :: sep +s = case f (sep, a) +xsf (sep, a) -> Getting (First (sep, a)) (f (sep, a)) (sep, a) -> Maybe (sep, a) forall s a. s -> Getting (First a) s a -> Maybe a ^?Getting (First (sep, a)) (f (sep, a)) (sep, a) forall s a. Snoc s s a a => Traversal' s a Traversal' (f (sep, a)) (sep, a) _last of - Maybe (sep, a) + Maybe (sep, a) Nothing -> a -> a -> sep -f a -x0 a -y - Just (sep -_,a -x) -> a -> a -> sep -f a -x a -y - \ No newline at end of file +f a +x0 a +y + Just (sep +_,a +x) -> a -> a -> sep +f a +x a +y + + +-------------------------------------------------------------------------------- + +-- | Map over the separators of the alterating together with the neighbours +firstWithNeighbors :: Traversable f + => (a -> sep -> a -> sep') + -> Alternating f sep a -> Alternating f sep' a +firstWithNeighbors :: forall (f :: * -> *) a sep sep'. +Traversable f => +(a -> sep -> a -> sep') +-> Alternating f sep a -> Alternating f sep' a +firstWithNeighbors a -> sep -> a -> sep' +f (Alternating a +x0 f (sep, a) +xs) = a -> f (sep', a) -> Alternating f sep' a +forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a +Alternating a +x0 f (sep', a) +xs' + where + (a +_, f (sep', a) +xs') = (a -> (sep, a) -> (a, (sep', a))) +-> a -> f (sep, a) -> (a, f (sep', a)) +forall (t :: * -> *) s a b. +Traversable t => +(s -> a -> (s, b)) -> s -> t a -> (s, t b) +List.mapAccumL (\a +x (sep +sep,a +y) -> (a +y, (a -> sep -> a -> sep' +f a +x sep +sep a +y, a +y))) a +x0 f (sep, a) +xs + + +-- | Get the separators out of the alternating +separators :: Functor f => Alternating f sep a -> f sep +separators :: forall (f :: * -> *) sep a. +Functor f => +Alternating f sep a -> f sep +separators (Alternating a +_ f (sep, a) +xs) = ((sep, a) -> sep) -> f (sep, a) -> f sep +forall a b. (a -> b) -> f a -> f b +forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b +fmap (sep, a) -> sep +forall a b. (a, b) -> a +fst f (sep, a) +xs + \ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.NonEmpty.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.NonEmpty.html index 1d37bcde6..744c503b8 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.NonEmpty.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Sequence.NonEmpty.html @@ -36,8 +36,8 @@ -------------------------------------------------------------------------------- -- | NonEmpty ViewL -data ViewL1 a = a :<< Seq a - deriving stock (Int -> ViewL1 a -> ShowS +data ViewL1 a = a :<< Seq a + deriving stock (Int -> ViewL1 a -> ShowS [ViewL1 a] -> ShowS ViewL1 a -> String (Int -> ViewL1 a -> ShowS) @@ -53,7 +53,7 @@ show :: ViewL1 a -> String $cshowList :: forall a. Show a => [ViewL1 a] -> ShowS showList :: [ViewL1 a] -> ShowS -Show,ReadPrec [ViewL1 a] +Show,ReadPrec [ViewL1 a] ReadPrec (ViewL1 a) Int -> ReadS (ViewL1 a) ReadS [ViewL1 a] @@ -77,7 +77,7 @@ readPrec :: ReadPrec (ViewL1 a) $creadListPrec :: forall a. Read a => ReadPrec [ViewL1 a] readListPrec :: ReadPrec [ViewL1 a] -Read,ViewL1 a -> ViewL1 a -> Bool +Read,ViewL1 a -> ViewL1 a -> Bool (ViewL1 a -> ViewL1 a -> Bool) -> (ViewL1 a -> ViewL1 a -> Bool) -> Eq (ViewL1 a) forall a. Eq a => ViewL1 a -> ViewL1 a -> Bool @@ -86,7 +86,7 @@ == :: ViewL1 a -> ViewL1 a -> Bool $c/= :: forall a. Eq a => ViewL1 a -> ViewL1 a -> Bool /= :: ViewL1 a -> ViewL1 a -> Bool -Eq,Eq (ViewL1 a) +Eq,Eq (ViewL1 a) Eq (ViewL1 a) => (ViewL1 a -> ViewL1 a -> Ordering) -> (ViewL1 a -> ViewL1 a -> Bool) @@ -127,7 +127,7 @@ max :: ViewL1 a -> ViewL1 a -> ViewL1 a $cmin :: forall a. Ord a => ViewL1 a -> ViewL1 a -> ViewL1 a min :: ViewL1 a -> ViewL1 a -> ViewL1 a -Ord,(forall a b. (a -> b) -> ViewL1 a -> ViewL1 b) +Ord,(forall a b. (a -> b) -> ViewL1 a -> ViewL1 b) -> (forall a b. a -> ViewL1 b -> ViewL1 a) -> Functor ViewL1 forall a b. a -> ViewL1 b -> ViewL1 a forall a b. (a -> b) -> ViewL1 a -> ViewL1 b @@ -138,7 +138,7 @@ fmap :: forall a b. (a -> b) -> ViewL1 a -> ViewL1 b $c<$ :: forall a b. a -> ViewL1 b -> ViewL1 a <$ :: forall a b. a -> ViewL1 b -> ViewL1 a -Functor,Functor ViewL1 +Functor,Functor ViewL1 Foldable ViewL1 (Functor ViewL1, Foldable ViewL1) => (forall (f :: * -> *) a b. @@ -195,7 +195,7 @@ (a -> m b) -> ViewL1 a -> m (ViewL1 b) $csequence :: forall (m :: * -> *) a. Monad m => ViewL1 (m a) -> m (ViewL1 a) sequence :: forall (m :: * -> *) a. Monad m => ViewL1 (m a) -> m (ViewL1 a) -Traversable,(forall x. ViewL1 a -> Rep (ViewL1 a) x) +Traversable,(forall x. ViewL1 a -> Rep (ViewL1 a) x) -> (forall x. Rep (ViewL1 a) x -> ViewL1 a) -> Generic (ViewL1 a) forall x. Rep (ViewL1 a) x -> ViewL1 a forall x. ViewL1 a -> Rep (ViewL1 a) x @@ -209,57 +209,57 @@ to :: forall x. Rep (ViewL1 a) x -> ViewL1 a Generic) -instance NFData a => NFData (ViewL1 a) +instance NFData a => NFData (ViewL1 a) -type instance Index (ViewL1 a) = Int -type instance IxValue (ViewL1 a) = a +type instance Index (ViewL1 a) = Int +type instance IxValue (ViewL1 a) = a -instance Ixed (ViewL1 a) where - ix :: Index (ViewL1 a) -> Traversal' (ViewL1 a) (IxValue (ViewL1 a)) -ix Index (ViewL1 a) -i IxValue (ViewL1 a) -> f (IxValue (ViewL1 a)) -f (a -x :<< Seq a -xs) +instance Ixed (ViewL1 a) where + ix :: Index (ViewL1 a) -> Traversal' (ViewL1 a) (IxValue (ViewL1 a)) +ix Index (ViewL1 a) +i IxValue (ViewL1 a) -> f (IxValue (ViewL1 a)) +f (a +x :<< Seq a +xs) | Int Index (ViewL1 a) -i Int -> Int -> Bool +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int 0 = (a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< Seq a -xs) (a -> ViewL1 a) -> f a -> f (ViewL1 a) +xs) (a -> ViewL1 a) -> f a -> f (ViewL1 a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (ViewL1 a) -> f (IxValue (ViewL1 a)) -f a +f a IxValue (ViewL1 a) -x +x | Bool otherwise = (a -x :<<) (Seq a -> ViewL1 a) -> f (Seq a) -> f (ViewL1 a) +x :<<) (Seq a -> ViewL1 a) -> f (Seq a) -> f (ViewL1 a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Index (Seq a) -> Traversal' (Seq a) (IxValue (Seq a)) forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix (Int Index (ViewL1 a) -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) IxValue (Seq a) -> f (IxValue (Seq a)) IxValue (ViewL1 a) -> f (IxValue (ViewL1 a)) -f Seq a -xs +f Seq a +xs {-# INLINE ix #-} -instance Foldable ViewL1 where - foldMap :: forall m a. Monoid m => (a -> m) -> ViewL1 a -> m -foldMap a -> m -f (a -x :<< Seq a -xs) = a -> m -f a -x m -> m -> m +instance Foldable ViewL1 where + foldMap :: forall m a. Monoid m => (a -> m) -> ViewL1 a -> m +foldMap a -> m +f (a +x :<< Seq a +xs) = a -> m +f a +x m -> m -> m forall a. Semigroup a => a -> a -> a <> (a -> m) -> Seq a -> m forall m a. Monoid m => (a -> m) -> Seq a -> m @@ -267,33 +267,33 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f Seq a -xs +f Seq a +xs {-# INLINE foldMap #-} - length :: forall a. ViewL1 a -> Int -length (a -_ :<< Seq a -xs) = Int + length :: forall a. ViewL1 a -> Int +length (a +_ :<< Seq a +xs) = Int 1 Int -> Int -> Int forall a. Num a => a -> a -> a + Seq a -> Int forall a. Seq a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Seq a -xs +xs {-# INLINE length #-} - null :: forall a. ViewL1 a -> Bool -null ViewL1 a + null :: forall a. ViewL1 a -> Bool +null ViewL1 a _ = Bool False {-# INLINE null #-} -instance Foldable1 ViewL1 where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> ViewL1 a -> m -foldMap1 a -> m -f (a -a :<< Seq a -as) = case (a -> Maybe m) -> Seq a -> Maybe m +instance Foldable1 ViewL1 where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> ViewL1 a -> m +foldMap1 a -> m +f (a +a :<< Seq a +as) = case (a -> Maybe m) -> Seq a -> Maybe m forall m a. Monoid m => (a -> m) -> Seq a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => @@ -303,35 +303,35 @@ Just (m -> Maybe m) -> (a -> m) -> a -> Maybe m forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> m -f) Seq a -as of +f) Seq a +as of Maybe m Nothing -> a -> m -f a -a - Just m -b -> a -> m -f a -a m -> m -> m +f a +a + Just m +b -> a -> m +f a +a m -> m -> m forall a. Semigroup a => a -> a -> a <> m -b +b {-# INLINE foldMap1 #-} -instance Traversable1 ViewL1 where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 ViewL1 where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> ViewL1 a -> f (ViewL1 b) -traverse1 a -> f b -f (a -a :<< Seq a -as) = b -> Seq b -> ViewL1 b +traverse1 a -> f b +f (a +a :<< Seq a +as) = b -> Seq b -> ViewL1 b forall a. a -> Seq a -> ViewL1 a (:<<) (b -> Seq b -> ViewL1 b) -> f b -> f (Seq b -> ViewL1 b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -a f (Seq b -> ViewL1 b) -> MaybeApply f (Seq b) -> f (ViewL1 b) +f a +a f (Seq b -> ViewL1 b) -> MaybeApply f (Seq b) -> f (ViewL1 b) forall (f :: * -> *) a b. Apply f => f (a -> b) -> MaybeApply f a -> f b @@ -340,97 +340,97 @@ (Traversable t, Apply f) => (a -> f b) -> t a -> MaybeApply f (t b) traverse1Maybe a -> f b -f Seq a -as +f Seq a +as {-# INLINE traverse1 #-} -instance FunctorWithIndex Int ViewL1 -instance FoldableWithIndex Int ViewL1 -instance TraversableWithIndex Int ViewL1 +instance FunctorWithIndex Int ViewL1 +instance FoldableWithIndex Int ViewL1 +instance TraversableWithIndex Int ViewL1 -instance Foldable1WithIndex Int ViewL1 where - ifoldMap1 :: forall m a. Semigroup m => (Int -> a -> m) -> ViewL1 a -> m -ifoldMap1 Int -> a -> m -f (a -a :<< Seq a -as) = case (Int -> a -> Maybe m) -> Seq a -> Maybe m +instance Foldable1WithIndex Int ViewL1 where + ifoldMap1 :: forall m a. Semigroup m => (Int -> a -> m) -> ViewL1 a -> m +ifoldMap1 Int -> a -> m +f (a +a :<< Seq a +as) = case (Int -> a -> Maybe m) -> Seq a -> Maybe m forall m a. Monoid m => (Int -> a -> m) -> Seq a -> m forall i (f :: * -> *) m a. (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m -ifoldMap (\Int -i -> m -> Maybe m +ifoldMap (\Int +i -> m -> Maybe m forall a. a -> Maybe a Just (m -> Maybe m) -> (a -> m) -> a -> Maybe m forall b c a. (b -> c) -> (a -> b) -> a -> c . Int -> a -> m -f (Int -iInt -> Int -> Int +f (Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1)) Seq a -as of +as of Maybe m Nothing -> Int -> a -> m -f Int +f Int 0 a -a - Just m -b -> Int -> a -> m -f Int +a + Just m +b -> Int -> a -> m +f Int 0 a -a m -> m -> m +a m -> m -> m forall a. Semigroup a => a -> a -> a <> m -b +b {-# INLINE ifoldMap1 #-} -- instance Traversable1WithIndex Int ViewL1 -instance Semigroup (ViewL1 a) where - (a -a :<< Seq a -as) <> :: ViewL1 a -> ViewL1 a -> ViewL1 a -<> (a -b :<< Seq a -bs) = a -a a -> Seq a -> ViewL1 a +instance Semigroup (ViewL1 a) where + (a +a :<< Seq a +as) <> :: ViewL1 a -> ViewL1 a -> ViewL1 a +<> (a +b :<< Seq a +bs) = a +a a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< (Seq a -as Seq a -> Seq a -> Seq a +as Seq a -> Seq a -> Seq a forall a. Semigroup a => a -> a -> a <> (a -b a -> Seq a -> Seq a +b a -> Seq a -> Seq a forall a. a -> Seq a -> Seq a :<| Seq a -bs)) +bs)) {-# INLINE (<>) #-} -instance HasFromFoldable1 ViewL1 where - fromNonEmpty :: forall a. NonEmpty a -> ViewL1 a -fromNonEmpty (a -a :| [a] -as) = a -a a -> Seq a -> ViewL1 a +instance HasFromFoldable1 ViewL1 where + fromNonEmpty :: forall a. NonEmpty a -> ViewL1 a +fromNonEmpty (a +a :| [a] +as) = a +a a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< [Item (Seq a)] -> Seq a forall l. IsList l => [Item l] -> l fromList [a] [Item (Seq a)] -as +as {-# INLINE fromNonEmpty #-} -instance IsList (ViewL1 a) where - type Item (ViewL1 a) = a - toList :: ViewL1 a -> [Item (ViewL1 a)] +instance IsList (ViewL1 a) where + type Item (ViewL1 a) = a + toList :: ViewL1 a -> [Item (ViewL1 a)] toList = ViewL1 a -> [a] ViewL1 a -> [Item (ViewL1 a)] forall a. ViewL1 a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList {-# INLINE toList #-} - fromList :: [Item (ViewL1 a)] -> ViewL1 a + fromList :: [Item (ViewL1 a)] -> ViewL1 a fromList = ViewL1 a -> (NonEmpty a -> ViewL1 a) -> Maybe (NonEmpty a) -> ViewL1 a forall b a. b -> (a -> b) -> Maybe a -> b @@ -448,27 +448,27 @@ NonEmpty.nonEmpty {-# INLINE fromList #-} -instance Reversing (ViewL1 a) where - reversing :: ViewL1 a -> ViewL1 a -reversing (a -x :<< Seq a -s) = ViewR1 a -> ViewL1 a +instance Reversing (ViewL1 a) where + reversing :: ViewL1 a -> ViewL1 a +reversing (a +x :<< Seq a +s) = ViewR1 a -> ViewL1 a forall a. ViewR1 a -> ViewL1 a viewl1 (ViewR1 a -> ViewL1 a) -> ViewR1 a -> ViewL1 a forall a b. (a -> b) -> a -> b $ Seq a -> Seq a forall a. Seq a -> Seq a Sequence.reverse Seq a -s Seq a -> a -> ViewR1 a +s Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -x +x -------------------------------------------------------------------------------- -- | NonEmpty ViewR -data ViewR1 a = Seq a :>> a - deriving stock (Int -> ViewR1 a -> ShowS +data ViewR1 a = Seq a :>> a + deriving stock (Int -> ViewR1 a -> ShowS [ViewR1 a] -> ShowS ViewR1 a -> String (Int -> ViewR1 a -> ShowS) @@ -484,7 +484,7 @@ show :: ViewR1 a -> String $cshowList :: forall a. Show a => [ViewR1 a] -> ShowS showList :: [ViewR1 a] -> ShowS -Show,ReadPrec [ViewR1 a] +Show,ReadPrec [ViewR1 a] ReadPrec (ViewR1 a) Int -> ReadS (ViewR1 a) ReadS [ViewR1 a] @@ -508,7 +508,7 @@ readPrec :: ReadPrec (ViewR1 a) $creadListPrec :: forall a. Read a => ReadPrec [ViewR1 a] readListPrec :: ReadPrec [ViewR1 a] -Read,ViewR1 a -> ViewR1 a -> Bool +Read,ViewR1 a -> ViewR1 a -> Bool (ViewR1 a -> ViewR1 a -> Bool) -> (ViewR1 a -> ViewR1 a -> Bool) -> Eq (ViewR1 a) forall a. Eq a => ViewR1 a -> ViewR1 a -> Bool @@ -517,7 +517,7 @@ == :: ViewR1 a -> ViewR1 a -> Bool $c/= :: forall a. Eq a => ViewR1 a -> ViewR1 a -> Bool /= :: ViewR1 a -> ViewR1 a -> Bool -Eq,Eq (ViewR1 a) +Eq,Eq (ViewR1 a) Eq (ViewR1 a) => (ViewR1 a -> ViewR1 a -> Ordering) -> (ViewR1 a -> ViewR1 a -> Bool) @@ -558,7 +558,7 @@ max :: ViewR1 a -> ViewR1 a -> ViewR1 a $cmin :: forall a. Ord a => ViewR1 a -> ViewR1 a -> ViewR1 a min :: ViewR1 a -> ViewR1 a -> ViewR1 a -Ord,(forall a b. (a -> b) -> ViewR1 a -> ViewR1 b) +Ord,(forall a b. (a -> b) -> ViewR1 a -> ViewR1 b) -> (forall a b. a -> ViewR1 b -> ViewR1 a) -> Functor ViewR1 forall a b. a -> ViewR1 b -> ViewR1 a forall a b. (a -> b) -> ViewR1 a -> ViewR1 b @@ -569,7 +569,7 @@ fmap :: forall a b. (a -> b) -> ViewR1 a -> ViewR1 b $c<$ :: forall a b. a -> ViewR1 b -> ViewR1 a <$ :: forall a b. a -> ViewR1 b -> ViewR1 a -Functor,Functor ViewR1 +Functor,Functor ViewR1 Foldable ViewR1 (Functor ViewR1, Foldable ViewR1) => (forall (f :: * -> *) a b. @@ -626,7 +626,7 @@ (a -> m b) -> ViewR1 a -> m (ViewR1 b) $csequence :: forall (m :: * -> *) a. Monad m => ViewR1 (m a) -> m (ViewR1 a) sequence :: forall (m :: * -> *) a. Monad m => ViewR1 (m a) -> m (ViewR1 a) -Traversable,(forall x. ViewR1 a -> Rep (ViewR1 a) x) +Traversable,(forall x. ViewR1 a -> Rep (ViewR1 a) x) -> (forall x. Rep (ViewR1 a) x -> ViewR1 a) -> Generic (ViewR1 a) forall x. Rep (ViewR1 a) x -> ViewR1 a forall x. ViewR1 a -> Rep (ViewR1 a) x @@ -640,70 +640,70 @@ to :: forall x. Rep (ViewR1 a) x -> ViewR1 a Generic) -instance NFData a => NFData (ViewR1 a) +instance NFData a => NFData (ViewR1 a) -type instance Index (ViewR1 a) = Int -type instance IxValue (ViewR1 a) = a +type instance Index (ViewR1 a) = Int +type instance IxValue (ViewR1 a) = a -instance Ixed (ViewR1 a) where - ix :: Index (ViewR1 a) -> Traversal' (ViewR1 a) (IxValue (ViewR1 a)) -ix Index (ViewR1 a) -i IxValue (ViewR1 a) -> f (IxValue (ViewR1 a)) -f (Seq a -xs :>> a -x) +instance Ixed (ViewR1 a) where + ix :: Index (ViewR1 a) -> Traversal' (ViewR1 a) (IxValue (ViewR1 a)) +ix Index (ViewR1 a) +i IxValue (ViewR1 a) -> f (IxValue (ViewR1 a)) +f (Seq a +xs :>> a +x) | Int Index (ViewR1 a) -i Int -> Int -> Bool +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Seq a -> Int forall a. Seq a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Seq a -xs = (Seq a -xs :>>) (a -> ViewR1 a) -> f a -> f (ViewR1 a) +xs = (Seq a +xs :>>) (a -> ViewR1 a) -> f a -> f (ViewR1 a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (ViewR1 a) -> f (IxValue (ViewR1 a)) -f a +f a IxValue (ViewR1 a) -x +x | Bool otherwise = (Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -x) (Seq a -> ViewR1 a) -> f (Seq a) -> f (ViewR1 a) +x) (Seq a -> ViewR1 a) -> f (Seq a) -> f (ViewR1 a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Index (Seq a) -> Traversal' (Seq a) (IxValue (Seq a)) forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix Index (Seq a) Index (ViewR1 a) -i IxValue (Seq a) -> f (IxValue (Seq a)) +i IxValue (Seq a) -> f (IxValue (Seq a)) IxValue (ViewR1 a) -> f (IxValue (ViewR1 a)) -f Seq a -xs +f Seq a +xs {-# INLINE ix #-} -instance Foldable ViewR1 where - foldMap :: forall m a. Monoid m => (a -> m) -> ViewR1 a -> m -foldMap a -> m -f (Seq a -xs :>> a -x) = (a -> m) -> Seq a -> m +instance Foldable ViewR1 where + foldMap :: forall m a. Monoid m => (a -> m) -> ViewR1 a -> m +foldMap a -> m +f (Seq a +xs :>> a +x) = (a -> m) -> Seq a -> m forall m a. Monoid m => (a -> m) -> Seq a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f Seq a -xs m -> m -> m +f Seq a +xs m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -x +f a +x {-# INLINE foldMap #-} - length :: forall a. ViewR1 a -> Int -length (Seq a -xs :>> a + length :: forall a. ViewR1 a -> Int +length (Seq a +xs :>> a _) = Int 1 Int -> Int -> Int forall a. Num a => a -> a -> a @@ -711,20 +711,20 @@ forall a. Seq a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Seq a -xs +xs {-# INLINE length #-} - null :: forall a. ViewR1 a -> Bool + null :: forall a. ViewR1 a -> Bool null ViewR1 a _ = Bool False {-# INLINE null #-} -instance Foldable1 ViewR1 where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> ViewR1 a -> m -foldMap1 a -> m -f (Seq a -as :>> a -a) = case (a -> Maybe m) -> Seq a -> Maybe m +instance Foldable1 ViewR1 where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> ViewR1 a -> m +foldMap1 a -> m +f (Seq a +as :>> a +a) = case (a -> Maybe m) -> Seq a -> Maybe m forall m a. Monoid m => (a -> m) -> Seq a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => @@ -734,29 +734,29 @@ Just (m -> Maybe m) -> (a -> m) -> a -> Maybe m forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> m -f) Seq a -as of +f) Seq a +as of Maybe m Nothing -> a -> m -f a -a - Just m -b -> m -b m -> m -> m +f a +a + Just m +b -> m +b m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -a +f a +a {-# INLINE foldMap1 #-} -instance Traversable1 ViewR1 where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 ViewR1 where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> ViewR1 a -> f (ViewR1 b) -traverse1 a -> f b -f (Seq a -as :>> a -a) = Seq b -> b -> ViewR1 b +traverse1 a -> f b +f (Seq a +as :>> a +a) = Seq b -> b -> ViewR1 b forall a. Seq a -> a -> ViewR1 a (:>>) (Seq b -> b -> ViewR1 b) -> MaybeApply f (Seq b) -> MaybeApply f (b -> ViewR1 b) @@ -766,84 +766,84 @@ (Traversable t, Apply f) => (a -> f b) -> t a -> MaybeApply f (t b) traverse1Maybe a -> f b -f Seq a -as MaybeApply f (b -> ViewR1 b) -> f b -> f (ViewR1 b) +f Seq a +as MaybeApply f (b -> ViewR1 b) -> f b -> f (ViewR1 b) forall (f :: * -> *) a b. Apply f => MaybeApply f (a -> b) -> f a -> f b <*.> a -> f b -f a -a +f a +a {-# INLINE traverse1 #-} -instance FunctorWithIndex Int ViewR1 -instance FoldableWithIndex Int ViewR1 -instance TraversableWithIndex Int ViewR1 +instance FunctorWithIndex Int ViewR1 +instance FoldableWithIndex Int ViewR1 +instance TraversableWithIndex Int ViewR1 -instance Foldable1WithIndex Int ViewR1 where - ifoldMap1 :: forall m a. Semigroup m => (Int -> a -> m) -> ViewR1 a -> m -ifoldMap1 Int -> a -> m -f (Seq a -as :>> a -a) = case (Int -> a -> Maybe m) -> Seq a -> Maybe m +instance Foldable1WithIndex Int ViewR1 where + ifoldMap1 :: forall m a. Semigroup m => (Int -> a -> m) -> ViewR1 a -> m +ifoldMap1 Int -> a -> m +f (Seq a +as :>> a +a) = case (Int -> a -> Maybe m) -> Seq a -> Maybe m forall m a. Monoid m => (Int -> a -> m) -> Seq a -> m forall i (f :: * -> *) m a. (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m -ifoldMap (\Int -i -> m -> Maybe m +ifoldMap (\Int +i -> m -> Maybe m forall a. a -> Maybe a Just (m -> Maybe m) -> (a -> m) -> a -> Maybe m forall b c a. (b -> c) -> (a -> b) -> a -> c . Int -> a -> m -f Int -i) Seq a -as of +f Int +i) Seq a +as of Maybe m Nothing -> Int -> a -> m -f Int +f Int 0 a -a - Just m -b -> m -b m -> m -> m +a + Just m +b -> m +b m -> m -> m forall a. Semigroup a => a -> a -> a <> Int -> a -> m -f (Seq a -> Int +f (Seq a -> Int forall a. Seq a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Seq a -as) a -a +as) a +a {-# INLINE ifoldMap1 #-} -- instance Traversable1WithIndex Int ViewR1 -instance Semigroup (ViewR1 a) where - (Seq a -as :>> a -a) <> :: ViewR1 a -> ViewR1 a -> ViewR1 a -<> (Seq a -bs :>> a -b) = ((Seq a -as Seq a -> a -> Seq a +instance Semigroup (ViewR1 a) where + (Seq a +as :>> a +a) <> :: ViewR1 a -> ViewR1 a -> ViewR1 a +<> (Seq a +bs :>> a +b) = ((Seq a +as Seq a -> a -> Seq a forall a. Seq a -> a -> Seq a :|> a -a) Seq a -> Seq a -> Seq a +a) Seq a -> Seq a -> Seq a forall a. Semigroup a => a -> a -> a <> Seq a -bs) Seq a -> a -> ViewR1 a +bs) Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -b +b {-# INLINE (<>) #-} -instance HasFromFoldable1 ViewR1 where - fromNonEmpty :: forall a. NonEmpty a -> ViewR1 a -fromNonEmpty (a -a :| [a] -as) = case NonEmpty a -> ViewR1 a +instance HasFromFoldable1 ViewR1 where + fromNonEmpty :: forall a. NonEmpty a -> ViewR1 a +fromNonEmpty (a +a :| [a] +as) = case NonEmpty a -> ViewR1 a forall a. NonEmpty a -> ViewR1 a forall (f :: * -> *) a. HasFromFoldable1 f => NonEmpty a -> f a fromNonEmpty (NonEmpty a -> ViewR1 a) -> Maybe (NonEmpty a) -> Maybe (ViewR1 a) @@ -851,36 +851,36 @@ <$> [a] -> Maybe (NonEmpty a) forall a. [a] -> Maybe (NonEmpty a) NonEmpty.nonEmpty [a] -as of +as of Maybe (ViewR1 a) Nothing -> Seq a forall a. Seq a Sequence.empty Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -a - Just (Seq a -as' :>> a -x) -> (a -a a -> Seq a -> Seq a +a + Just (Seq a +as' :>> a +x) -> (a +a a -> Seq a -> Seq a forall a. a -> Seq a -> Seq a :<| Seq a -as') Seq a -> a -> ViewR1 a +as') Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -x +x {-# INLINE fromNonEmpty #-} -instance IsList (ViewR1 a) where - type Item (ViewR1 a) = a - toList :: ViewR1 a -> [Item (ViewR1 a)] +instance IsList (ViewR1 a) where + type Item (ViewR1 a) = a + toList :: ViewR1 a -> [Item (ViewR1 a)] toList = ViewR1 a -> [a] ViewR1 a -> [Item (ViewR1 a)] forall a. ViewR1 a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList {-# INLINE toList #-} - fromList :: [Item (ViewR1 a)] -> ViewR1 a + fromList :: [Item (ViewR1 a)] -> ViewR1 a fromList = ViewR1 a -> (NonEmpty a -> ViewR1 a) -> Maybe (NonEmpty a) -> ViewR1 a forall b a. b -> (a -> b) -> Maybe a -> b @@ -898,159 +898,159 @@ NonEmpty.nonEmpty {-# INLINE fromList #-} -instance Reversing (ViewR1 a) where - reversing :: ViewR1 a -> ViewR1 a -reversing (Seq a -s :>> a -x) = ViewL1 a -> ViewR1 a +instance Reversing (ViewR1 a) where + reversing :: ViewR1 a -> ViewR1 a +reversing (Seq a +s :>> a +x) = ViewL1 a -> ViewR1 a forall a. ViewL1 a -> ViewR1 a viewr1 (ViewL1 a -> ViewR1 a) -> ViewL1 a -> ViewR1 a forall a b. (a -> b) -> a -> b $ a -x a -> Seq a -> ViewL1 a +x a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< Seq a -> Seq a forall a. Seq a -> Seq a Sequence.reverse Seq a -s +s -- | snoc an element to the right -(|>>) :: ViewR1 a -> a -> ViewR1 a -(Seq a -ys :>> a -y) |>> :: forall a. ViewR1 a -> a -> ViewR1 a -|>> a -x = (Seq a -ys Seq a -> a -> Seq a +(|>>) :: ViewR1 a -> a -> ViewR1 a +(Seq a +ys :>> a +y) |>> :: forall a. ViewR1 a -> a -> ViewR1 a +|>> a +x = (Seq a +ys Seq a -> a -> Seq a forall a. Seq a -> a -> Seq a :|> a -y) Seq a -> a -> ViewR1 a +y) Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -x +x infixl 5 |>> infixl 5 <>> -- | Append a Sequence to a ViewR1 -(<>>) :: ViewR1 a -> Seq a -> ViewR1 a -l :: ViewR1 a -l@(Seq a -ys :>> a -y) <>> :: forall a. ViewR1 a -> Seq a -> ViewR1 a -<>> Seq a -rs = case Seq a -> ViewR a +(<>>) :: ViewR1 a -> Seq a -> ViewR1 a +l :: ViewR1 a +l@(Seq a +ys :>> a +y) <>> :: forall a. ViewR1 a -> Seq a -> ViewR1 a +<>> Seq a +rs = case Seq a -> ViewR a forall a. Seq a -> ViewR a Sequence.viewr Seq a -rs of +rs of ViewR a Sequence.EmptyR -> ViewR1 a -l - Seq a -rs' Sequence.:> a -r -> (Seq a -ys Seq a -> Seq a -> Seq a +l + Seq a +rs' Sequence.:> a +r -> (Seq a +ys Seq a -> Seq a -> Seq a forall a. Semigroup a => a -> a -> a <> (a -y a -> Seq a -> Seq a +y a -> Seq a -> Seq a forall a. a -> Seq a -> Seq a :<| Seq a -rs')) Seq a -> a -> ViewR1 a +rs')) Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -r +r -- | View the leftmost element -viewl1 :: ViewR1 a -> ViewL1 a +viewl1 :: ViewR1 a -> ViewL1 a viewl1 :: forall a. ViewR1 a -> ViewL1 a -viewl1 (Seq a -xs :>> a -r) = case Seq a -> ViewL a +viewl1 (Seq a +xs :>> a +r) = case Seq a -> ViewL a forall a. Seq a -> ViewL a Sequence.viewl Seq a -xs of +xs of ViewL a Sequence.EmptyL -> a -r a -> Seq a -> ViewL1 a +r a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< Seq a forall a. Seq a Sequence.empty - a -l Sequence.:< Seq a -mid -> a -l a -> Seq a -> ViewL1 a + a +l Sequence.:< Seq a +mid -> a +l a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< (Seq a -mid Seq a -> a -> Seq a +mid Seq a -> a -> Seq a forall a. Seq a -> a -> Seq a :|> a -r) +r) -- | View the rightmost element -viewr1 :: ViewL1 a -> ViewR1 a +viewr1 :: ViewL1 a -> ViewR1 a viewr1 :: forall a. ViewL1 a -> ViewR1 a -viewr1 (a -l :<< Seq a -ls) = case Seq a -> ViewR a +viewr1 (a +l :<< Seq a +ls) = case Seq a -> ViewR a forall a. Seq a -> ViewR a Sequence.viewr Seq a -ls of +ls of ViewR a Sequence.EmptyR -> Seq a forall a. Seq a Sequence.empty Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -l - Seq a -mid Sequence.:> a -r -> (a -l a -> Seq a -> Seq a +l + Seq a +mid Sequence.:> a +r -> (a +l a -> Seq a -> Seq a forall a. a -> Seq a -> Seq a :<| Seq a -mid) Seq a -> a -> ViewR1 a +mid) Seq a -> a -> ViewR1 a forall a. Seq a -> a -> ViewR1 a :>> a -r +r -------------------------------------------------------------------------------- -- | Given an index i, and a viewL1 s, attempts to split s at index i. Returns nothing if -- the index is out of range. -splitL1At :: Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) +splitL1At :: Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) splitL1At :: forall a. Int -> ViewL1 a -> Maybe (Seq a, a, Seq a) -splitL1At Int -i (a -x :<< Seq a -s) = Int -> Seq a -> Maybe (Seq a) +splitL1At Int +i (a +x :<< Seq a +s) = Int -> Seq a -> Maybe (Seq a) forall (t :: * -> *) a. Foldable t => Int -> t a -> Maybe (t a) clampRange Int -i (a -x a -> Seq a -> Seq a +i (a +x a -> Seq a -> Seq a forall s a. Cons s s a a => a -> s -> s <| Seq a -s) Maybe (Seq a) +s) Maybe (Seq a) -> (Seq a -> (Seq a, a, Seq a)) -> Maybe (Seq a, a, Seq a) forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b -<&> \Seq a -s' -> case Int -> Seq a -> (Seq a, Seq a) +<&> \Seq a +s' -> case Int -> Seq a -> (Seq a, Seq a) forall a. Int -> Seq a -> (Seq a, Seq a) Sequence.splitAt Int -i Seq a -s' of - (Seq a -pref, a -y :<| Seq a -suff) -> (Seq a -pref, a -y, Seq a -suff) +i Seq a +s' of + (Seq a +pref, a +y :<| Seq a +suff) -> (Seq a +pref, a +y, Seq a +suff) (Seq a, Seq a) _ -> String -> (Seq a, a, Seq a) forall a. HasCallStack => String -> a @@ -1059,34 +1059,34 @@ -- | Given an index i, and a viewL1 s, attempts to split s at index i. Returns nothing if -- the index is out of range. -splitR1At :: Int -> ViewR1 a -> Maybe (Seq a, a, Seq a) +splitR1At :: Int -> ViewR1 a -> Maybe (Seq a, a, Seq a) splitR1At :: forall a. Int -> ViewR1 a -> Maybe (Seq a, a, Seq a) -splitR1At Int -i (Seq a -s :>> a -x) = Int -> Seq a -> Maybe (Seq a) +splitR1At Int +i (Seq a +s :>> a +x) = Int -> Seq a -> Maybe (Seq a) forall (t :: * -> *) a. Foldable t => Int -> t a -> Maybe (t a) clampRange Int -i (Seq a -s Seq a -> a -> Seq a +i (Seq a +s Seq a -> a -> Seq a forall s a. Snoc s s a a => s -> a -> s |> a -x) Maybe (Seq a) +x) Maybe (Seq a) -> (Seq a -> (Seq a, a, Seq a)) -> Maybe (Seq a, a, Seq a) forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b -<&> \Seq a -s' -> case Int -> Seq a -> (Seq a, Seq a) +<&> \Seq a +s' -> case Int -> Seq a -> (Seq a, Seq a) forall a. Int -> Seq a -> (Seq a, Seq a) Sequence.splitAt Int -i Seq a -s' of - (Seq a -pref, a -y :<| Seq a -suff) -> (Seq a -pref, a -y, Seq a -suff) +i Seq a +s' of + (Seq a +pref, a +y :<| Seq a +suff) -> (Seq a +pref, a +y, Seq a +suff) (Seq a, Seq a) _ -> String -> (Seq a, a, Seq a) forall a. HasCallStack => String -> a @@ -1094,33 +1094,33 @@ "splitR1At: absurd" -- | Helper to make sure the index is within range. -clampRange :: Foldable t => Int -> t a -> Maybe (t a) +clampRange :: Foldable t => Int -> t a -> Maybe (t a) clampRange :: forall (t :: * -> *) a. Foldable t => Int -> t a -> Maybe (t a) -clampRange Int -i t a -s +clampRange Int +i t a +s | Int -i Int -> Int -> Bool +i Int -> Int -> Bool forall a. Ord a => a -> a -> Bool < Int 0 = Maybe (t a) forall a. Maybe a Nothing | Int -i Int -> Int -> Bool +i Int -> Int -> Bool forall a. Ord a => a -> a -> Bool >= t a -> Int forall a. t a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length t a -s = Maybe (t a) +s = Maybe (t a) forall a. Maybe a Nothing | Bool otherwise = t a -> Maybe (t a) forall a. a -> Maybe a Just t a -s +s -------------------------------------------------------------------------------- diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Set.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Set.Util.html index 299e2d653..807526101 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Set.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Set.Util.html @@ -31,10 +31,10 @@ -- fromList [1,2,3,5,6] -- >>> toggle 5 $ Set.fromList [1,2,3,5,6] -- fromList [1,2,3,6] -toggle :: Ord a => a -> Set a -> Set a +toggle :: Ord a => a -> Set a -> Set a toggle :: forall a. Ord a => a -> Set a -> Set a -toggle a -x = Identity (Set a) -> Set a +toggle
a +x = Identity (Set a) -> Set a forall a. Identity a -> a runIdentity (Identity (Set a) -> Set a) -> (Set a -> Identity (Set a)) -> Set a -> Set a @@ -49,7 +49,7 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . Bool -> Bool not) a -x +x
-------------------------------------------------------------------------------- @@ -73,50 +73,50 @@ -- * all (\y -> f y > x) r -- -- running time: \(O(\log n)\) -splitOn :: Ord b => (a -> b) -> b -> Set a -> (Set a, Set a, Set a) +splitOn :: Ord b => (a -> b) -> b -> Set a -> (Set a, Set a, Set a) splitOn :: forall b a. Ord b => (a -> b) -> b -> Set a -> (Set a, Set a, Set a) -splitOn a -> b -f b -x Set a -s = let (Set a -l,Set a -s') = (a -> Bool) -> Set a -> (Set a, Set a) +splitOn
a -> b +f b +x Set a +s = let (Set a +l,Set a +s') = (a -> Bool) -> Set a -> (Set a, Set a) forall a. (a -> Bool) -> Set a -> (Set a, Set a) Set.spanAntitone (Ordering -> b -> Bool -g Ordering +g Ordering LT (b -> Bool) -> (a -> b) -> a -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> b -f) Set a -s - (Set a -m,Set a -r) = (a -> Bool) -> Set a -> (Set a, Set a) +f) Set a +s + (Set a +m,Set a +r) = (a -> Bool) -> Set a -> (Set a, Set a) forall a. (a -> Bool) -> Set a -> (Set a, Set a) Set.spanAntitone (Ordering -> b -> Bool -g Ordering +g Ordering EQ (b -> Bool) -> (a -> b) -> a -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> b -f) Set a -s' - g :: Ordering -> b -> Bool -g Ordering -c b -y = b -y b -> b -> Ordering +f) Set a +s' + g :: Ordering -> b -> Bool +g Ordering +c b +y = b +y b -> b -> Ordering forall a. Ord a => a -> a -> Ordering `compare` b -x Ordering -> Ordering -> Bool +x Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering -c +c
in (Set a -l,Set a -m,Set a -r) +l
,Set a +m,Set a +r) -- | Given a monotonic function f that orders @a@, split the sequence @s@ -- into three parts. I.e. the result (lt,eq,gt) is such that @@ -125,13 +125,13 @@ -- * all (\x -> f x == GT) gt -- -- running time: \(O(\log n)\) -splitBy :: (a -> Ordering) -> Set a -> (Set a, Set a, Set a) +splitBy :: (a -> Ordering) -> Set a -> (Set a, Set a, Set a) splitBy :: forall a. (a -> Ordering) -> Set a -> (Set a, Set a, Set a) -splitBy a -> Ordering -f Set a -s = let (Set a -l,Set a -s') = (a -> Bool) -> Set a -> (Set a, Set a) +splitBy
a -> Ordering +f Set a +s = let (Set a +l,Set a +s') = (a -> Bool) -> Set a -> (Set a, Set a) forall a. (a -> Bool) -> Set a -> (Set a, Set a) Set.spanAntitone (Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool @@ -139,11 +139,11 @@ LT (Ordering -> Bool) -> (a -> Ordering) -> a -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> Ordering -f) Set a -s - (Set a -m,Set a -r) = (a -> Bool) -> Set a -> (Set a, Set a) +f) Set a +s + (Set a +m,Set a +r) = (a -> Bool) -> Set a -> (Set a, Set a) forall a. (a -> Bool) -> Set a -> (Set a, Set a) Set.spanAntitone (Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool @@ -151,12 +151,12 @@ EQ (Ordering -> Bool) -> (a -> Ordering) -> a -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> Ordering -f) Set a -s' +f
) Set a +s' in (Set a -l,Set a -m,Set a -r) +l
,Set a +m,Set a +r) -- | Constructs a Set using the given Order. -- @@ -164,17 +164,17 @@ -- ordering expected of such sets. -- -- running time: \(O(n\log n)\) -fromListBy :: (a -> a -> Ordering) -> [a] -> Set a +fromListBy :: (a -> a -> Ordering) -> [a] -> Set a fromListBy :: forall a. (a -> a -> Ordering) -> [a] -> Set a -fromListBy a -> a -> Ordering -cmp [a] -xs = (a -> a -> Ordering) +fromListBy
a -> a -> Ordering +cmp [a] +xs = (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s (Set a)) -> Set a forall a b. (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b withOrd a -> a -> Ordering -cmp (Set (O s a) -> O s (Set a) +cmp (Set (O s a) -> O s (Set a) forall (f :: * -> *) s a. f (O s a) -> O s (f a) extractOrd1 (Set (O s a) -> O s (Set a)) -> ([a] -> Set (O s a)) -> [a] -> O s (Set a) @@ -190,13 +190,13 @@ O ([a] -> O s (Set a)) -> [a] -> O s (Set a) forall a b. (a -> b) -> a -> b $ [a] -xs) +xs
) -- | Given two sets l and r, such that all elements of l occur before -- r, join the two sets into a combined set. -- -- running time: \(O(\log n)\) -join :: Set a -> Set a -> Set a +join :: Set a -> Set a -> Set a join :: forall a. Set a -> Set a -> Set a join = Set a -> Set a -> Set a forall a. Set a -> Set a -> Set a @@ -217,18 +217,18 @@ -- fromList [S "a",S "cc",S "dddd"] -- -- running time: \(O(\log n)\) -insertBy :: (a -> a -> Ordering) -> a -> Set a -> Set a +insertBy :: (a -> a -> Ordering) -> a -> Set a -> Set a insertBy :: forall a. (a -> a -> Ordering) -> a -> Set a -> Set a -insertBy a -> a -> Ordering -cmp a -x Set a -s = (a -> a -> Ordering) +insertBy a -> a -> Ordering +cmp a +x Set a +s = (a -> a -> Ordering) -> (forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a forall a b. (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b withOrd a -> a -> Ordering -cmp ((forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a) +cmp ((forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a) -> (forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a forall a b. (a -> b) -> a -> b $ (Set (O s a) -> Set (O s a)) -> Set a -> O s (Set a) @@ -242,8 +242,8 @@ $ a -> O s a forall s a. a -> O s a O a -x) Set a -s +x
) Set a +s -- | Deletes an element from the set, assuming the set is ordered by @@ -255,18 +255,18 @@ -- fromList [S "a",S "dddd"] -- -- running time: \(O(\log n)\) -deleteAllBy :: (a -> a -> Ordering) -> a -> Set a -> Set a +deleteAllBy :: (a -> a -> Ordering) -> a -> Set a -> Set a deleteAllBy :: forall a. (a -> a -> Ordering) -> a -> Set a -> Set a -deleteAllBy a -> a -> Ordering -cmp a -x Set a -s = (a -> a -> Ordering) +deleteAllBy
a -> a -> Ordering +cmp a +x Set a +s = (a -> a -> Ordering) -> (forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a forall a b. (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b withOrd a -> a -> Ordering -cmp ((forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a) +cmp ((forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a) -> (forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a forall a b. (a -> b) -> a -> b $ (Set (O s a) -> Set (O s a)) -> Set a -> O s (Set a) @@ -280,22 +280,22 @@ $ a -> O s a forall s a. a -> O s a O a -x) Set a -s +x
) Set a +s -- | Flips an element by the given order -toggleBy :: (a -> a -> Ordering) -> a -> Set a -> Set a +toggleBy :: (a -> a -> Ordering) -> a -> Set a -> Set a toggleBy :: forall a. (a -> a -> Ordering) -> a -> Set a -> Set a -toggleBy a -> a -> Ordering -cmp a -x Set a -s = (a -> a -> Ordering) +toggleBy
a -> a -> Ordering +cmp a +x Set a +s = (a -> a -> Ordering) -> (forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a forall a b. (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b withOrd a -> a -> Ordering -cmp ((forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a) +cmp ((forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a) -> (forall {s}. Reifies s (OrdDict a) => O s (Set a)) -> Set a forall a b. (a -> b) -> a -> b $ (Set (O s a) -> Set (O s a)) -> Set a -> O s (Set a) @@ -309,8 +309,8 @@ $ a -> O s a forall s a. a -> O s a O a -x) Set a -s +x
) Set a +s -- | Run a query, eg. lookupGE, on the set with the given ordering. -- @@ -323,23 +323,23 @@ -- Just (S "a") -- >>> queryBy cmpS Set.lookupGE (S "333") $ fromListBy cmpS [S "a" , S "bbb" , S "ddddddd"] -- Just (S "bbb") -queryBy :: (a -> a -> Ordering) - -> (forall b. Ord b => b -> Set b -> t b) - -> a -> Set a -> t a +queryBy :: (a -> a -> Ordering) + -> (forall b. Ord b => b -> Set b -> t b) + -> a -> Set a -> t a queryBy :: forall a (t :: * -> *). (a -> a -> Ordering) -> (forall b. Ord b => b -> Set b -> t b) -> a -> Set a -> t a -queryBy a -> a -> Ordering -cmp forall b. Ord b => b -> Set b -> t b -fs a -q Set a -s = (a -> a -> Ordering) +queryBy
a -> a -> Ordering +cmp forall b. Ord b => b -> Set b -> t b +fs a +q Set a +s = (a -> a -> Ordering) -> (forall {s}. Reifies s (OrdDict a) => O s (t a)) -> t a forall a b. (a -> a -> Ordering) -> (forall s. Reifies s (OrdDict a) => O s b) -> b withOrd a -> a -> Ordering -cmp ((forall {s}. Reifies s (OrdDict a) => O s (t a)) -> t a) +cmp ((forall {s}. Reifies s (OrdDict a) => O s (t a)) -> t a) -> (forall {s}. Reifies s (OrdDict a) => O s (t a)) -> t a forall a b. (a -> b) -> a -> b $ (Set (O s a) -> t (O s a)) -> Set a -> O s (t a) @@ -347,14 +347,14 @@ (f (O s a) -> g (O s a)) -> f a -> O s (g a) liftOrd1 (O s a -> Set (O s a) -> t (O s a) forall b. Ord b => b -> Set b -> t b -fs (O s a -> Set (O s a) -> t (O s a)) +fs (O s a -> Set (O s a) -> t (O s a)) -> O s a -> Set (O s a) -> t (O s a) forall a b. (a -> b) -> a -> b $ a -> O s a forall s a. a -> O s a O a -q) Set a -s +q
) Set a +s diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Sign.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Sign.html index 9447764d4..1119247ac 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Sign.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Sign.html @@ -1,4 +1,4 @@ -
--------------------------------------------------------------------------------
+
--------------------------------------------------------------------------------
 -- |
 -- Module      :  HGeometry.Sign
 -- Copyright   :  (C) Frank Staals
@@ -15,7 +15,7 @@
 --------------------------------------------------------------------------------
 
 -- | The sign of an expression
-data Sign = Negative | Positive deriving (Int -> Sign -> ShowS
+data Sign = Negative | Positive deriving (Int -> Sign -> ShowS
 [Sign] -> ShowS
 Sign -> String
 (Int -> Sign -> ShowS)
@@ -28,14 +28,14 @@
 show :: Sign -> String
 $cshowList :: [Sign] -> ShowS
 showList :: [Sign] -> ShowS
-Show,Sign -> Sign -> Bool
+Show,Sign -> Sign -> Bool
 (Sign -> Sign -> Bool) -> (Sign -> Sign -> Bool) -> Eq Sign
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
 $c== :: Sign -> Sign -> Bool
 == :: Sign -> Sign -> Bool
 $c/= :: Sign -> Sign -> Bool
 /= :: Sign -> Sign -> Bool
-Eq,Eq Sign
+Eq,Eq Sign
 Eq Sign =>
 (Sign -> Sign -> Ordering)
 -> (Sign -> Sign -> Bool)
@@ -72,7 +72,7 @@
 max :: Sign -> Sign -> Sign
 $cmin :: Sign -> Sign -> Sign
 min :: Sign -> Sign -> Sign
-Ord,Int -> Sign
+Ord,Int -> Sign
 Sign -> Int
 Sign -> [Sign]
 Sign -> Sign
@@ -113,7 +113,7 @@
 enumFromTo :: Sign -> Sign -> [Sign]
 $cenumFromThenTo :: Sign -> Sign -> Sign -> [Sign]
 enumFromThenTo :: Sign -> Sign -> Sign -> [Sign]
-Enum,Sign
+Enum,Sign
 Sign -> Sign -> Bounded Sign
 forall a. a -> a -> Bounded a
 $cminBound :: Sign
@@ -138,7 +138,7 @@
 -- | Given the terms, in decreasing order of significance, computes the sign
 --
 -- i.e. expects a list of terms, we base the sign on the sign of the first non-zero term.
-signFromTerms :: (Num r, Eq r, Foldable1 f) => f r -> Maybe Sign
+signFromTerms :: (Num r, Eq r, Foldable1 f) => f r -> Maybe Sign
 signFromTerms :: forall r (f :: * -> *).
 (Num r, Eq r, Foldable1 f) =>
 f r -> Maybe Sign
@@ -158,14 +158,14 @@
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . r -> Maybe Sign
 forall {a}. (Num a, Eq a) => a -> Maybe Sign
-signum')
+signum')
   where
-    signum' :: a -> Maybe Sign
-signum' a
-x = case a -> a
+    signum' :: a -> Maybe Sign
+signum' a
+x = case a -> a
 forall a. Num a => a -> a
 signum a
-x of
+x of
                   -1 -> Sign -> Maybe Sign
 forall a. a -> Maybe a
 Just Sign
diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.StringSearch.KMP.html b/haddocks/hgeometry-combinatorial/src/HGeometry.StringSearch.KMP.html
index c5f91cd6c..7f522fe92 100644
--- a/haddocks/hgeometry-combinatorial/src/HGeometry.StringSearch.KMP.html
+++ b/haddocks/hgeometry-combinatorial/src/HGeometry.StringSearch.KMP.html
@@ -30,71 +30,71 @@
 -- | Constructs the failure function.
 --
 -- running time: \(O(m)\).
-buildFailureFunction   :: forall a. Eq a => V.Vector a -> UV.Vector Int
+buildFailureFunction   :: forall a. Eq a => V.Vector a -> UV.Vector Int
 buildFailureFunction :: forall a. Eq a => Vector a -> Vector Int
-buildFailureFunction Vector a
-p = (forall s. ST s (MVector s Int)) -> Vector Int
+buildFailureFunction Vector a
+p = (forall s. ST s (MVector s Int)) -> Vector Int
 forall a. Unbox a => (forall s. ST s (MVector s a)) -> Vector a
 UV.create ((forall s. ST s (MVector s Int)) -> Vector Int)
 -> (forall s. ST s (MVector s Int)) -> Vector Int
 forall a b. (a -> b) -> a -> b
 $ do
-                           MVector s Int
-f <- Int -> ST s (MVector (PrimState (ST s)) Int)
+                           MVector s Int
+f <- Int -> ST s (MVector (PrimState (ST s)) Int)
 forall (m :: * -> *) a.
 (PrimMonad m, Unbox a) =>
 Int -> m (MVector (PrimState m) a)
 UMV.new Int
-m
+m
                            MVector s Int -> Int -> Int -> ST s (MVector s Int)
 forall s. MVector s Int -> Int -> Int -> ST s (MVector s Int)
-go MVector s Int
-f Int
+go MVector s Int
+f Int
 1 Int
 0
    where
-     m :: Int
-m = Vector a -> Int
+     m :: Int
+m = Vector a -> Int
 forall a. Vector a -> Int
 V.length Vector a
-p
-     go                        :: UMV.MVector s Int -> Int -> Int -> ST s (UMV.MVector s Int)
-     go :: forall s. MVector s Int -> Int -> Int -> ST s (MVector s Int)
-go MVector s Int
-f Int
-i Int
-j | Int
-i Int -> Int -> Bool
+p
+     go                        :: UMV.MVector s Int -> Int -> Int -> ST s (UMV.MVector s Int)
+     go :: forall s. MVector s Int -> Int -> Int -> ST s (MVector s Int)
+go MVector s Int
+f Int
+i Int
+j | Int
+i Int -> Int -> Bool
 forall a. Eq a => a -> a -> Bool
 == Int
-m         = MVector s Int -> ST s (MVector s Int)
+m         = MVector s Int -> ST s (MVector s Int)
 forall a. a -> ST s a
 forall (f :: * -> *) a. Applicative f => a -> f a
 pure MVector s Int
-f
+f
               | Vector a
-p Vector a -> Int -> a
+p Vector a -> Int -> a
 forall (v :: * -> *) a.
 (HasCallStack, Vector v a) =>
 v a -> Int -> a
 ! Int
-j a -> a -> Bool
+j a -> a -> Bool
 forall a. Eq a => a -> a -> Bool
 == Vector a
-p Vector a -> Int -> a
+p Vector a -> Int -> a
 forall (v :: * -> *) a.
 (HasCallStack, Vector v a) =>
 v a -> Int -> a
 ! Int
-i = MVector (PrimState (ST s)) Int -> Int -> Int -> ST s ()
+i = MVector (PrimState (ST s)) Int -> Int -> Int -> ST s ()
 forall (m :: * -> *) a.
 (PrimMonad m, Unbox a) =>
 MVector (PrimState m) a -> Int -> a -> m ()
 UMV.write MVector s Int
 MVector (PrimState (ST s)) Int
-f Int
-i (Int
-jInt -> Int -> Int
+f Int
+i (Int
+jInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1) ST s () -> ST s (MVector s Int) -> ST s (MVector s Int)
@@ -102,18 +102,18 @@
 forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
 >>  MVector s Int -> Int -> Int -> ST s (MVector s Int)
 forall s. MVector s Int -> Int -> Int -> ST s (MVector s Int)
-go MVector s Int
-f (Int
-iInt -> Int -> Int
+go MVector s Int
+f (Int
+iInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1) (Int
-jInt -> Int -> Int
+jInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1)
               | Int
-j Int -> Int -> Bool
+j Int -> Int -> Bool
 forall a. Ord a => a -> a -> Bool
 > Int
 0          = MVector (PrimState (ST s)) Int -> Int -> ST s Int
@@ -122,8 +122,8 @@
 MVector (PrimState m) a -> Int -> m a
 UMV.read  MVector s Int
 MVector (PrimState (ST s)) Int
-f (Int
-jInt -> Int -> Int
+f (Int
+jInt -> Int -> Int
 forall a. Num a => a -> a -> a
 -Int
 1)   ST s Int -> (Int -> ST s (MVector s Int)) -> ST s (MVector s Int)
@@ -131,9 +131,9 @@
 forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
 >>= MVector s Int -> Int -> Int -> ST s (MVector s Int)
 forall s. MVector s Int -> Int -> Int -> ST s (MVector s Int)
-go MVector s Int
-f Int
-i
+go MVector s Int
+f Int
+i
               | Bool
 otherwise      = MVector (PrimState (ST s)) Int -> Int -> Int -> ST s ()
 forall (m :: * -> *) a.
@@ -141,16 +141,16 @@
 MVector (PrimState m) a -> Int -> a -> m ()
 UMV.write MVector s Int
 MVector (PrimState (ST s)) Int
-f Int
-i Int
+f Int
+i Int
 0     ST s () -> ST s (MVector s Int) -> ST s (MVector s Int)
 forall a b. ST s a -> ST s b -> ST s b
 forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
 >>  MVector s Int -> Int -> Int -> ST s (MVector s Int)
 forall s. MVector s Int -> Int -> Int -> ST s (MVector s Int)
-go MVector s Int
-f (Int
-iInt -> Int -> Int
+go MVector s Int
+f (Int
+iInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1) Int
@@ -159,13 +159,13 @@
 -- | Test if the first argument, the pattern p, occurs as a consecutive subsequence in t.
 --
 -- running time: \(O(n+m)\), where p has length \(m\) and t has length \(n\).
-isSubStringOf       :: (Eq a, Foldable p, Foldable t) => p a -> t a -> Maybe Int
-p a
-p isSubStringOf :: forall a (p :: * -> *) (t :: * -> *).
+isSubStringOf       :: (Eq a, Foldable p, Foldable t) => p a -> t a -> Maybe Int
+p a
+p isSubStringOf :: forall a (p :: * -> *) (t :: * -> *).
 (Eq a, Foldable p, Foldable t) =>
 p a -> t a -> Maybe Int
-`isSubStringOf` t a
-t = Vector a -> Vector a -> Maybe Int
+`isSubStringOf` t a
+t = Vector a -> Vector a -> Maybe Int
 forall a. Eq a => Vector a -> Vector a -> Maybe Int
 kmpMatch (Builder a -> Vector a
 forall (vector :: * -> *) element.
@@ -180,7 +180,7 @@
 Builder.foldable (p a -> Vector a) -> p a -> Vector a
 forall a b. (a -> b) -> a -> b
 $ p a
-p)
+p)
                                (Builder a -> Vector a
 forall (vector :: * -> *) element.
 Vector vector element =>
@@ -194,18 +194,18 @@
 Builder.foldable (t a -> Vector a) -> t a -> Vector a
 forall a b. (a -> b) -> a -> b
 $ t a
-t)
+t)
 
 
 -- | Test if the first argument, the pattern p, occurs as a consecutive subsequence in t.
 --
 -- running time: \(O(n+m)\), where p has length \(m\) and t has length \(n\).
-kmpMatch                 :: Eq a => V.Vector a -> V.Vector a -> Maybe Int
+kmpMatch                 :: Eq a => V.Vector a -> V.Vector a -> Maybe Int
 kmpMatch :: forall a. Eq a => Vector a -> Vector a -> Maybe Int
-kmpMatch Vector a
-p Vector a
-t | Int
-m Int -> Int -> Bool
+kmpMatch Vector a
+p Vector a
+t | Int
+m Int -> Int -> Bool
 forall a. Eq a => a -> a -> Bool
 == Int
 0    = Int -> Maybe Int
@@ -214,97 +214,97 @@
 0
              | Bool
 otherwise = Int -> Int -> Maybe Int
-kmp Int
+kmp Int
 0 Int
 0
   where
-    m :: Int
-m = Vector a -> Int
+    m :: Int
+m = Vector a -> Int
 forall a. Vector a -> Int
 V.length Vector a
-p
-    n :: Int
-n = Vector a -> Int
+p
+    n :: Int
+n = Vector a -> Int
 forall a. Vector a -> Int
 V.length Vector a
-t
-    f :: Vector Int
-f = Vector a -> Vector Int
+t
+    f :: Vector Int
+f = Vector a -> Vector Int
 forall a. Eq a => Vector a -> Vector Int
 buildFailureFunction Vector a
-p
+p
 
-    kmp :: Int -> Int -> Maybe Int
-kmp Int
-i Int
-j | Int
-i Int -> Int -> Bool
+    kmp :: Int -> Int -> Maybe Int
+kmp Int
+i Int
+j | Int
+i Int -> Int -> Bool
 forall a. Eq a => a -> a -> Bool
 == Int
-n         = Maybe Int
+n         = Maybe Int
 forall a. Maybe a
 Nothing
             | Vector a
-p Vector a -> Int -> a
+p Vector a -> Int -> a
 forall (v :: * -> *) a.
 (HasCallStack, Vector v a) =>
 v a -> Int -> a
 ! Int
-j a -> a -> Bool
+j a -> a -> Bool
 forall a. Eq a => a -> a -> Bool
 == Vector a
-t Vector a -> Int -> a
+t Vector a -> Int -> a
 forall (v :: * -> *) a.
 (HasCallStack, Vector v a) =>
 v a -> Int -> a
 ! Int
-i = if Int
-j Int -> Int -> Bool
+i = if Int
+j Int -> Int -> Bool
 forall a. Eq a => a -> a -> Bool
 == Int
-m Int -> Int -> Int
+m Int -> Int -> Int
 forall a. Num a => a -> a -> a
 - Int
 1 then Int -> Maybe Int
 forall a. a -> Maybe a
 Just (Int
-i Int -> Int -> Int
+i Int -> Int -> Int
 forall a. Num a => a -> a -> a
 - Int
-m Int -> Int -> Int
+m Int -> Int -> Int
 forall a. Num a => a -> a -> a
 + Int
 1)
                                              else Int -> Int -> Maybe Int
-kmp (Int
-iInt -> Int -> Int
+kmp (Int
+iInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1) (Int
-jInt -> Int -> Int
+jInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1)
             | Int
-j Int -> Int -> Bool
+j Int -> Int -> Bool
 forall a. Ord a => a -> a -> Bool
 > Int
 0          = Int -> Int -> Maybe Int
-kmp Int
-i     (Vector Int
-f Vector Int -> Int -> Int
+kmp Int
+i     (Vector Int
+f Vector Int -> Int -> Int
 forall (v :: * -> *) a.
 (HasCallStack, Vector v a) =>
 v a -> Int -> a
 ! (Int
-j Int -> Int -> Int
+j Int -> Int -> Int
 forall a. Num a => a -> a -> a
 - Int
 1))
             | Bool
 otherwise      = Int -> Int -> Maybe Int
-kmp (Int
-iInt -> Int -> Int
+kmp (Int
+iInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1) Int
diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Binary.Static.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Binary.Static.html
index e4b28248e..457d91fce 100644
--- a/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Binary.Static.html
+++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Binary.Static.html
@@ -45,9 +45,9 @@
 
 -- | Binary tree that stores its values (of type a) in the leaves. Internal
 -- nodes store something of type v.
-data BinLeafTree v a = Leaf !a
-                     | Node (BinLeafTree v a) !v (BinLeafTree v a)
-                     deriving (Int -> BinLeafTree v a -> ShowS
+data BinLeafTree v a = Leaf !a
+                     | Node (BinLeafTree v a) !v (BinLeafTree v a)
+                     deriving (Int -> BinLeafTree v a -> ShowS
 [BinLeafTree v a] -> ShowS
 BinLeafTree v a -> String
 (Int -> BinLeafTree v a -> ShowS)
@@ -65,7 +65,7 @@
 show :: BinLeafTree v a -> String
 $cshowList :: forall v a. (Show a, Show v) => [BinLeafTree v a] -> ShowS
 showList :: [BinLeafTree v a] -> ShowS
-Show,ReadPrec [BinLeafTree v a]
+Show,ReadPrec [BinLeafTree v a]
 ReadPrec (BinLeafTree v a)
 Int -> ReadS (BinLeafTree v a)
 ReadS [BinLeafTree v a]
@@ -89,7 +89,7 @@
 readPrec :: ReadPrec (BinLeafTree v a)
 $creadListPrec :: forall v a. (Read a, Read v) => ReadPrec [BinLeafTree v a]
 readListPrec :: ReadPrec [BinLeafTree v a]
-Read,BinLeafTree v a -> BinLeafTree v a -> Bool
+Read,BinLeafTree v a -> BinLeafTree v a -> Bool
 (BinLeafTree v a -> BinLeafTree v a -> Bool)
 -> (BinLeafTree v a -> BinLeafTree v a -> Bool)
 -> Eq (BinLeafTree v a)
@@ -105,7 +105,7 @@
 (Eq a, Eq v) =>
 BinLeafTree v a -> BinLeafTree v a -> Bool
 /= :: BinLeafTree v a -> BinLeafTree v a -> Bool
-Eq,Eq (BinLeafTree v a)
+Eq,Eq (BinLeafTree v a)
 Eq (BinLeafTree v a) =>
 (BinLeafTree v a -> BinLeafTree v a -> Ordering)
 -> (BinLeafTree v a -> BinLeafTree v a -> Bool)
@@ -166,7 +166,7 @@
 (Ord a, Ord v) =>
 BinLeafTree v a -> BinLeafTree v a -> BinLeafTree v a
 min :: BinLeafTree v a -> BinLeafTree v a -> BinLeafTree v a
-Ord,(forall x. BinLeafTree v a -> Rep (BinLeafTree v a) x)
+Ord,(forall x. BinLeafTree v a -> Rep (BinLeafTree v a) x)
 -> (forall x. Rep (BinLeafTree v a) x -> BinLeafTree v a)
 -> Generic (BinLeafTree v a)
 forall x. Rep (BinLeafTree v a) x -> BinLeafTree v a
@@ -179,7 +179,7 @@
 from :: forall x. BinLeafTree v a -> Rep (BinLeafTree v a) x
 $cto :: forall v a x. Rep (BinLeafTree v a) x -> BinLeafTree v a
 to :: forall x. Rep (BinLeafTree v a) x -> BinLeafTree v a
-Generic,(forall a b. (a -> b) -> BinLeafTree v a -> BinLeafTree v b)
+Generic,(forall a b. (a -> b) -> BinLeafTree v a -> BinLeafTree v b)
 -> (forall a b. a -> BinLeafTree v b -> BinLeafTree v a)
 -> Functor (BinLeafTree v)
 forall a b. a -> BinLeafTree v b -> BinLeafTree v a
@@ -193,7 +193,7 @@
 fmap :: forall a b. (a -> b) -> BinLeafTree v a -> BinLeafTree v b
 $c<$ :: forall v a b. a -> BinLeafTree v b -> BinLeafTree v a
 <$ :: forall a b. a -> BinLeafTree v b -> BinLeafTree v a
-Functor,(forall m. Monoid m => BinLeafTree v m -> m)
+Functor,(forall m. Monoid m => BinLeafTree v m -> m)
 -> (forall m a. Monoid m => (a -> m) -> BinLeafTree v a -> m)
 -> (forall m a. Monoid m => (a -> m) -> BinLeafTree v a -> m)
 -> (forall a b. (a -> b -> b) -> b -> BinLeafTree v a -> b)
@@ -286,7 +286,7 @@
 sum :: forall a. Num a => BinLeafTree v a -> a
 $cproduct :: forall v a. Num a => BinLeafTree v a -> a
 product :: forall a. Num a => BinLeafTree v a -> a
-Foldable,Functor (BinLeafTree v)
+Foldable,Functor (BinLeafTree v)
 Foldable (BinLeafTree v)
 (Functor (BinLeafTree v), Foldable (BinLeafTree v)) =>
 (forall (f :: * -> *) a b.
@@ -365,51 +365,51 @@
 BinLeafTree v (m a) -> m (BinLeafTree v a)
 Traversable)
 
-instance (NFData v, NFData a) => NFData (BinLeafTree v a)
+instance (NFData v, NFData a) => NFData (BinLeafTree v a)
 
 -- | smart constructor
-node     :: ( Measured f a, Semigroup (f a)
-            ) => BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
+node     :: ( Measured f a, Semigroup (f a)
+            ) => BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
 node :: forall (f :: * -> *) a.
 (Measured f a, Semigroup (f a)) =>
 BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
-node BinLeafTree (f a) a
-l BinLeafTree (f a) a
-r = BinLeafTree (f a) a
+node BinLeafTree (f a) a
+l BinLeafTree (f a) a
+r = BinLeafTree (f a) a
 -> f a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
 forall v a.
 BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a
 Node BinLeafTree (f a) a
-l (BinLeafTree (f a) a -> f a
+l (BinLeafTree (f a) a -> f a
 forall (f :: * -> *) a. Measured f a => BinLeafTree (f a) a -> f a
 getMeasure BinLeafTree (f a) a
-l f a -> f a -> f a
+l f a -> f a -> f a
 forall a. Semigroup a => a -> a -> a
 <> BinLeafTree (f a) a -> f a
 forall (f :: * -> *) a. Measured f a => BinLeafTree (f a) a -> f a
 getMeasure BinLeafTree (f a) a
-r) BinLeafTree (f a) a
-r
+r) BinLeafTree (f a) a
+r
 
 
-instance Bifunctor BinLeafTree where
-  bimap :: forall a b c d.
+instance Bifunctor BinLeafTree where
+  bimap :: forall a b c d.
 (a -> b) -> (c -> d) -> BinLeafTree a c -> BinLeafTree b d
-bimap a -> b
-f c -> d
-g = \case
-    Leaf c
-x     -> d -> BinLeafTree b d
+bimap a -> b
+f c -> d
+g = \case
+    Leaf c
+x     -> d -> BinLeafTree b d
 forall v a. a -> BinLeafTree v a
 Leaf (d -> BinLeafTree b d) -> d -> BinLeafTree b d
 forall a b. (a -> b) -> a -> b
 $ c -> d
-g c
-x
-    Node BinLeafTree a c
-l a
-k BinLeafTree a c
-r -> BinLeafTree b d -> b -> BinLeafTree b d -> BinLeafTree b d
+g c
+x
+    Node BinLeafTree a c
+l a
+k BinLeafTree a c
+r -> BinLeafTree b d -> b -> BinLeafTree b d -> BinLeafTree b d
 forall v a.
 BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a
 Node ((a -> b) -> (c -> d) -> BinLeafTree a c -> BinLeafTree b d
@@ -419,55 +419,55 @@
 Bifunctor p =>
 (a -> b) -> (c -> d) -> p a c -> p b d
 bimap a -> b
-f c -> d
-g BinLeafTree a c
-l) (a -> b
-f a
-k) ((a -> b) -> (c -> d) -> BinLeafTree a c -> BinLeafTree b d
+f c -> d
+g BinLeafTree a c
+l) (a -> b
+f a
+k) ((a -> b) -> (c -> d) -> BinLeafTree a c -> BinLeafTree b d
 forall a b c d.
 (a -> b) -> (c -> d) -> BinLeafTree a c -> BinLeafTree b d
 forall (p :: * -> * -> *) a b c d.
 Bifunctor p =>
 (a -> b) -> (c -> d) -> p a c -> p b d
 bimap a -> b
-f c -> d
-g BinLeafTree a c
-r)
+f c -> d
+g BinLeafTree a c
+r)
 
 -- | Get the measure of a subtree
-getMeasure :: Measured f a => BinLeafTree (f a) a -> f a
+getMeasure :: Measured f a => BinLeafTree (f a) a -> f a
 getMeasure :: forall (f :: * -> *) a. Measured f a => BinLeafTree (f a) a -> f a
 getMeasure = \case
-  Leaf a
-x     -> a -> f a
+  Leaf a
+x     -> a -> f a
 forall (f :: * -> *) a. Measured f a => a -> f a
 measure a
-x
+x
   Node BinLeafTree (f a) a
-_ f a
-v BinLeafTree (f a) a
+_ f a
+v BinLeafTree (f a) a
 _ -> f a
-v
+v
 
-instance Foldable1 (BinLeafTree v) where
-  foldMap1 :: forall m a. Semigroup m => (a -> m) -> BinLeafTree v a -> m
-foldMap1 a -> m
-f = \case
-    Leaf a
-x     -> a -> m
-f a
-x
-    Node BinLeafTree v a
-l v
-_ BinLeafTree v a
-r -> (a -> m) -> BinLeafTree v a -> m
+instance Foldable1 (BinLeafTree v) where
+  foldMap1 :: forall m a. Semigroup m => (a -> m) -> BinLeafTree v a -> m
+foldMap1 a -> m
+f = \case
+    Leaf a
+x     -> a -> m
+f a
+x
+    Node BinLeafTree v a
+l v
+_ BinLeafTree v a
+r -> (a -> m) -> BinLeafTree v a -> m
 forall m a. Semigroup m => (a -> m) -> BinLeafTree v a -> m
 forall (t :: * -> *) m a.
 (Foldable1 t, Semigroup m) =>
 (a -> m) -> t a -> m
 foldMap1 a -> m
-f BinLeafTree v a
-l m -> m -> m
+f BinLeafTree v a
+l m -> m -> m
 forall a. Semigroup a => a -> a -> a
 <> (a -> m) -> BinLeafTree v a -> m
 forall m a. Semigroup m => (a -> m) -> BinLeafTree v a -> m
@@ -475,68 +475,68 @@
 (Foldable1 t, Semigroup m) =>
 (a -> m) -> t a -> m
 foldMap1 a -> m
-f BinLeafTree v a
-r
+f BinLeafTree v a
+r
 
-instance Traversable1 (BinLeafTree v) where
-  traverse1 :: forall (f :: * -> *) a b.
+instance Traversable1 (BinLeafTree v) where
+  traverse1 :: forall (f :: * -> *) a b.
 Apply f =>
 (a -> f b) -> BinLeafTree v a -> f (BinLeafTree v b)
-traverse1 a -> f b
-f = BinLeafTree v a -> f (BinLeafTree v b)
-go
+traverse1 a -> f b
+f = BinLeafTree v a -> f (BinLeafTree v b)
+go
     where
-      go :: BinLeafTree v a -> f (BinLeafTree v b)
-go = \case
-        Leaf a
-x     -> b -> BinLeafTree v b
+      go :: BinLeafTree v a -> f (BinLeafTree v b)
+go = \case
+        Leaf a
+x     -> b -> BinLeafTree v b
 forall v a. a -> BinLeafTree v a
 Leaf (b -> BinLeafTree v b) -> f b -> f (BinLeafTree v b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> a -> f b
-f a
-x
-        Node BinLeafTree v a
-l v
-v BinLeafTree v a
-r -> (\BinLeafTree v b
-l' BinLeafTree v b
-r' -> BinLeafTree v b -> v -> BinLeafTree v b -> BinLeafTree v b
+f a
+x
+        Node BinLeafTree v a
+l v
+v BinLeafTree v a
+r -> (\BinLeafTree v b
+l' BinLeafTree v b
+r' -> BinLeafTree v b -> v -> BinLeafTree v b -> BinLeafTree v b
 forall v a.
 BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a
 Node BinLeafTree v b
-l' v
-v BinLeafTree v b
-r') (BinLeafTree v b -> BinLeafTree v b -> BinLeafTree v b)
+l' v
+v BinLeafTree v b
+r') (BinLeafTree v b -> BinLeafTree v b -> BinLeafTree v b)
 -> f (BinLeafTree v b) -> f (BinLeafTree v b -> BinLeafTree v b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> BinLeafTree v a -> f (BinLeafTree v b)
-go BinLeafTree v a
-l f (BinLeafTree v b -> BinLeafTree v b)
+go BinLeafTree v a
+l f (BinLeafTree v b -> BinLeafTree v b)
 -> f (BinLeafTree v b) -> f (BinLeafTree v b)
 forall a b. f (a -> b) -> f a -> f b
 forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b
 Apply.<.> BinLeafTree v a -> f (BinLeafTree v b)
-go BinLeafTree v a
-r
+go BinLeafTree v a
+r
 
-instance (Measured f a, Semigroup (f a)) => Semigroup (BinLeafTree (f a) a) where
-  BinLeafTree (f a) a
-l <> :: BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
-<> BinLeafTree (f a) a
-r = BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
+instance (Measured f a, Semigroup (f a)) => Semigroup (BinLeafTree (f a) a) where
+  BinLeafTree (f a) a
+l <> :: BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
+<> BinLeafTree (f a) a
+r = BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
 forall (f :: * -> *) a.
 (Measured f a, Semigroup (f a)) =>
 BinLeafTree (f a) a -> BinLeafTree (f a) a -> BinLeafTree (f a) a
 node BinLeafTree (f a) a
-l BinLeafTree (f a) a
-r
+l BinLeafTree (f a) a
+r
 
 -- | Create a balanced tree, i.e. a tree of height \(O(\log n)\) with the
 -- elements in the leaves.
 --
 -- \(O(n)\) time.
-asBalancedBinLeafTree :: Foldable1 f => f a -> BinLeafTree (Count a) a
+asBalancedBinLeafTree :: Foldable1 f => f a -> BinLeafTree (Count a) a
 asBalancedBinLeafTree :: forall (f :: * -> *) a.
 Foldable1 f =>
 f a -> BinLeafTree (Count a) a
@@ -558,88 +558,88 @@
 
 -- | Given a function to combine internal nodes into b's and leafs into b's,
 -- traverse the tree bottom up, and combine everything into one b.
-foldUp                  :: (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
+foldUp                  :: (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
 foldUp :: forall b v a.
 (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
 foldUp b -> v -> b -> b
-_ a -> b
-g (Leaf a
-x)     = a -> b
-g a
-x
-foldUp b -> v -> b -> b
-f a -> b
-g (Node BinLeafTree v a
-l v
-x BinLeafTree v a
-r) = b -> v -> b -> b
-f ((b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
+_ a -> b
+g (Leaf a
+x)     = a -> b
+g a
+x
+foldUp b -> v -> b -> b
+f a -> b
+g (Node BinLeafTree v a
+l v
+x BinLeafTree v a
+r) = b -> v -> b -> b
+f ((b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
 forall b v a.
 (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
 foldUp b -> v -> b -> b
-f a -> b
-g BinLeafTree v a
-l) v
-x ((b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
+f a -> b
+g BinLeafTree v a
+l) v
+x ((b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
 forall b v a.
 (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
 foldUp b -> v -> b -> b
-f a -> b
-g BinLeafTree v a
-r)
+f a -> b
+g BinLeafTree v a
+r)
 
 
 -- | Traverses the tree bottom up, recomputing the assocated values.
-foldUpData     :: (w -> v -> w -> w) -> (a -> w) -> BinLeafTree v a -> BinLeafTree w a
+foldUpData     :: (w -> v -> w -> w) -> (a -> w) -> BinLeafTree v a -> BinLeafTree w a
 foldUpData :: forall w v a.
 (w -> v -> w -> w)
 -> (a -> w) -> BinLeafTree v a -> BinLeafTree w a
-foldUpData w -> v -> w -> w
-f a -> w
-g = (BinLeafTree w a -> v -> BinLeafTree w a -> BinLeafTree w a)
+foldUpData w -> v -> w -> w
+f a -> w
+g = (BinLeafTree w a -> v -> BinLeafTree w a -> BinLeafTree w a)
 -> (a -> BinLeafTree w a) -> BinLeafTree v a -> BinLeafTree w a
 forall b v a.
 (b -> v -> b -> b) -> (a -> b) -> BinLeafTree v a -> b
 foldUp BinLeafTree w a -> v -> BinLeafTree w a -> BinLeafTree w a
-f' a -> BinLeafTree w a
+f' a -> BinLeafTree w a
 forall v a. a -> BinLeafTree v a
 Leaf
   where
-    f' :: BinLeafTree w a -> v -> BinLeafTree w a -> BinLeafTree w a
-f' BinLeafTree w a
-l v
-v BinLeafTree w a
-r = BinLeafTree w a -> w -> BinLeafTree w a -> BinLeafTree w a
+    f' :: BinLeafTree w a -> v -> BinLeafTree w a -> BinLeafTree w a
+f' BinLeafTree w a
+l v
+v BinLeafTree w a
+r = BinLeafTree w a -> w -> BinLeafTree w a -> BinLeafTree w a
 forall v a.
 BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a
 Node BinLeafTree w a
-l (w -> v -> w -> w
-f (BinLeafTree w a -> w
-access' BinLeafTree w a
-l) v
-v (BinLeafTree w a -> w
-access' BinLeafTree w a
-r)) BinLeafTree w a
-r
+l (w -> v -> w -> w
+f (BinLeafTree w a -> w
+access' BinLeafTree w a
+l) v
+v (BinLeafTree w a -> w
+access' BinLeafTree w a
+r)) BinLeafTree w a
+r
 
-    access' :: BinLeafTree w a -> w
-access' (Leaf a
-x)     = a -> w
-g a
-x
-    access' (Node BinLeafTree w a
-_ w
-v BinLeafTree w a
+    access' :: BinLeafTree w a -> w
+access' (Leaf a
+x)     = a -> w
+g a
+x
+    access' (Node BinLeafTree w a
+_ w
+v BinLeafTree w a
 _) = w
-v
+v
 
 -- | Takes two trees, that have the same structure, and uses the provided
 -- functions to "zip" them together
-zipExactWith                                  :: (u -> v -> w)
-                                              -> (a -> b -> c)
-                                              -> BinLeafTree u a
-                                              -> BinLeafTree v b
-                                              -> BinLeafTree w c
+zipExactWith                                  :: (u -> v -> w)
+                                              -> (a -> b -> c)
+                                              -> BinLeafTree u a
+                                              -> BinLeafTree v b
+                                              -> BinLeafTree w c
 zipExactWith :: forall u v w a b c.
 (u -> v -> w)
 -> (a -> b -> c)
@@ -647,24 +647,24 @@
 -> BinLeafTree v b
 -> BinLeafTree w c
 zipExactWith u -> v -> w
-_ a -> b -> c
-g (Leaf a
-x)     (Leaf b
-y)        = c -> BinLeafTree w c
+_ a -> b -> c
+g (Leaf a
+x)     (Leaf b
+y)        = c -> BinLeafTree w c
 forall v a. a -> BinLeafTree v a
 Leaf (a
-x a -> b -> c
-`g` b
-y)
-zipExactWith u -> v -> w
-f a -> b -> c
-g (Node BinLeafTree u a
-l u
-m BinLeafTree u a
-r) (Node BinLeafTree v b
-l' v
-m' BinLeafTree v b
-r') = BinLeafTree w c -> w -> BinLeafTree w c -> BinLeafTree w c
+x a -> b -> c
+`g` b
+y)
+zipExactWith u -> v -> w
+f a -> b -> c
+g (Node BinLeafTree u a
+l u
+m BinLeafTree u a
+r) (Node BinLeafTree v b
+l' v
+m' BinLeafTree v b
+r') = BinLeafTree w c -> w -> BinLeafTree w c -> BinLeafTree w c
 forall v a.
 BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a
 Node ((u -> v -> w)
@@ -679,14 +679,14 @@
 -> BinLeafTree v b
 -> BinLeafTree w c
 zipExactWith u -> v -> w
-f a -> b -> c
-g BinLeafTree u a
-l BinLeafTree v b
-l')
+f a -> b -> c
+g BinLeafTree u a
+l BinLeafTree v b
+l')
                                                      (u
-m u -> v -> w
-`f` v
-m')
+m u -> v -> w
+`f` v
+m')
                                                      ((u -> v -> w)
 -> (a -> b -> c)
 -> BinLeafTree u a
@@ -699,10 +699,10 @@
 -> BinLeafTree v b
 -> BinLeafTree w c
 zipExactWith u -> v -> w
-f a -> b -> c
-g BinLeafTree u a
-r BinLeafTree v b
-r')
+f a -> b -> c
+g BinLeafTree u a
+r BinLeafTree v b
+r')
 zipExactWith u -> v -> w
 _ a -> b -> c
 _ BinLeafTree u a
@@ -719,34 +719,34 @@
 -- * Converting into a Data.Tree
 
 -- | \( O(n) \) Convert binary tree to a rose tree, aka 'Tree.Tree'.
-toRoseTree              :: BinLeafTree v a -> Tree.Tree (TreeNode v a)
+toRoseTree              :: BinLeafTree v a -> Tree.Tree (TreeNode v a)
 toRoseTree :: forall v a. BinLeafTree v a -> Tree (TreeNode v a)
-toRoseTree (Leaf a
-x)     = TreeNode v a -> [Tree (TreeNode v a)] -> Tree (TreeNode v a)
+toRoseTree (Leaf a
+x)     = TreeNode v a -> [Tree (TreeNode v a)] -> Tree (TreeNode v a)
 forall a. a -> [Tree a] -> Tree a
 Tree.Node (a -> TreeNode v a
 forall v a. a -> TreeNode v a
 LeafNode a
-x) []
-toRoseTree (Node BinLeafTree v a
-l v
-v BinLeafTree v a
-r) = TreeNode v a -> [Tree (TreeNode v a)] -> Tree (TreeNode v a)
+x) []
+toRoseTree (Node BinLeafTree v a
+l v
+v BinLeafTree v a
+r) = TreeNode v a -> [Tree (TreeNode v a)] -> Tree (TreeNode v a)
 forall a. a -> [Tree a] -> Tree a
 Tree.Node (v -> TreeNode v a
 forall v a. v -> TreeNode v a
 InternalNode v
-v) ((BinLeafTree v a -> Tree (TreeNode v a))
+v) ((BinLeafTree v a -> Tree (TreeNode v a))
 -> [BinLeafTree v a] -> [Tree (TreeNode v a)]
 forall a b. (a -> b) -> [a] -> [b]
 map BinLeafTree v a -> Tree (TreeNode v a)
 forall v a. BinLeafTree v a -> Tree (TreeNode v a)
 toRoseTree [BinLeafTree v a
-l,BinLeafTree v a
-r])
+l,BinLeafTree v a
+r])
 
 -- | 2-dimensional ASCII drawing of a tree.
-drawTree :: (Show v, Show a) => BinLeafTree v a -> String
+drawTree :: (Show v, Show a) => BinLeafTree v a -> String
 drawTree :: forall v a. (Show v, Show a) => BinLeafTree v a -> String
 drawTree = Tree String -> String
 Tree.drawTree (Tree String -> String)
@@ -770,9 +770,9 @@
 -- * Internal Node Tree
 
 -- | Binary tree in which we store the values of type a in internal nodes.
-data BinaryTree a = Nil
-                  | Internal (BinaryTree a) !a (BinaryTree a)
-                  deriving (Int -> BinaryTree a -> ShowS
+data BinaryTree a = Nil
+                  | Internal (BinaryTree a) !a (BinaryTree a)
+                  deriving (Int -> BinaryTree a -> ShowS
 [BinaryTree a] -> ShowS
 BinaryTree a -> String
 (Int -> BinaryTree a -> ShowS)
@@ -790,7 +790,7 @@
 show :: BinaryTree a -> String
 $cshowList :: forall a. Show a => [BinaryTree a] -> ShowS
 showList :: [BinaryTree a] -> ShowS
-Show,ReadPrec [BinaryTree a]
+Show,ReadPrec [BinaryTree a]
 ReadPrec (BinaryTree a)
 Int -> ReadS (BinaryTree a)
 ReadS [BinaryTree a]
@@ -814,7 +814,7 @@
 readPrec :: ReadPrec (BinaryTree a)
 $creadListPrec :: forall a. Read a => ReadPrec [BinaryTree a]
 readListPrec :: ReadPrec [BinaryTree a]
-Read,BinaryTree a -> BinaryTree a -> Bool
+Read,BinaryTree a -> BinaryTree a -> Bool
 (BinaryTree a -> BinaryTree a -> Bool)
 -> (BinaryTree a -> BinaryTree a -> Bool) -> Eq (BinaryTree a)
 forall a. Eq a => BinaryTree a -> BinaryTree a -> Bool
@@ -823,7 +823,7 @@
 == :: BinaryTree a -> BinaryTree a -> Bool
 $c/= :: forall a. Eq a => BinaryTree a -> BinaryTree a -> Bool
 /= :: BinaryTree a -> BinaryTree a -> Bool
-Eq,Eq (BinaryTree a)
+Eq,Eq (BinaryTree a)
 Eq (BinaryTree a) =>
 (BinaryTree a -> BinaryTree a -> Ordering)
 -> (BinaryTree a -> BinaryTree a -> Bool)
@@ -864,7 +864,7 @@
 max :: BinaryTree a -> BinaryTree a -> BinaryTree a
 $cmin :: forall a. Ord a => BinaryTree a -> BinaryTree a -> BinaryTree a
 min :: BinaryTree a -> BinaryTree a -> BinaryTree a
-Ord,(forall a b. (a -> b) -> BinaryTree a -> BinaryTree b)
+Ord,(forall a b. (a -> b) -> BinaryTree a -> BinaryTree b)
 -> (forall a b. a -> BinaryTree b -> BinaryTree a)
 -> Functor BinaryTree
 forall a b. a -> BinaryTree b -> BinaryTree a
@@ -876,7 +876,7 @@
 fmap :: forall a b. (a -> b) -> BinaryTree a -> BinaryTree b
 $c<$ :: forall a b. a -> BinaryTree b -> BinaryTree a
 <$ :: forall a b. a -> BinaryTree b -> BinaryTree a
-Functor,(forall m. Monoid m => BinaryTree m -> m)
+Functor,(forall m. Monoid m => BinaryTree m -> m)
 -> (forall m a. Monoid m => (a -> m) -> BinaryTree a -> m)
 -> (forall m a. Monoid m => (a -> m) -> BinaryTree a -> m)
 -> (forall a b. (a -> b -> b) -> b -> BinaryTree a -> b)
@@ -958,7 +958,7 @@
 sum :: forall a. Num a => BinaryTree a -> a
 $cproduct :: forall a. Num a => BinaryTree a -> a
 product :: forall a. Num a => BinaryTree a -> a
-Foldable,Functor BinaryTree
+Foldable,Functor BinaryTree
 Foldable BinaryTree
 (Functor BinaryTree, Foldable BinaryTree) =>
 (forall (f :: * -> *) a b.
@@ -1021,7 +1021,7 @@
 sequence :: forall (m :: * -> *) a.
 Monad m =>
 BinaryTree (m a) -> m (BinaryTree a)
-Traversable,(forall x. BinaryTree a -> Rep (BinaryTree a) x)
+Traversable,(forall x. BinaryTree a -> Rep (BinaryTree a) x)
 -> (forall x. Rep (BinaryTree a) x -> BinaryTree a)
 -> Generic (BinaryTree a)
 forall x. Rep (BinaryTree a) x -> BinaryTree a
@@ -1035,32 +1035,32 @@
 $cto :: forall a x. Rep (BinaryTree a) x -> BinaryTree a
 to :: forall x. Rep (BinaryTree a) x -> BinaryTree a
 Generic)
-instance NFData a => NFData (BinaryTree a)
+instance NFData a => NFData (BinaryTree a)
 
 
 -- | Get the element stored at the root, if it exists
-access                  :: BinaryTree a -> Maybe a
+access                  :: BinaryTree a -> Maybe a
 access :: forall a. BinaryTree a -> Maybe a
 access BinaryTree a
 Nil              = Maybe a
 forall a. Maybe a
 Nothing
 access (Internal BinaryTree a
-_ a
-x BinaryTree a
+_ a
+x BinaryTree a
 _) = a -> Maybe a
 forall a. a -> Maybe a
 Just a
-x
+x
 
 -- | Create a balanced binary tree.
 --
 -- running time: \(O(n)\)
-asBalancedBinTree :: forall f a. Foldable f => f a -> BinaryTree a
+asBalancedBinTree :: forall f a. Foldable f => f a -> BinaryTree a
 asBalancedBinTree :: forall (f :: * -> *) a. Foldable f => f a -> BinaryTree a
 asBalancedBinTree = Vector a -> BinaryTree a
 forall {a}. Vector a -> BinaryTree a
-mkTree (Vector a -> BinaryTree a)
+mkTree (Vector a -> BinaryTree a)
 -> (f a -> Vector a) -> f a -> BinaryTree a
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . forall (f :: * -> *) (g :: * -> *) a.
@@ -1068,27 +1068,27 @@
 g a -> f a
 fromFoldable @V.Vector
   where
-    mkTree :: Vector a -> BinaryTree a
-mkTree Vector a
-v = let n :: Int
-n = Vector a -> Int
+    mkTree :: Vector a -> BinaryTree a
+mkTree Vector a
+v = let n :: Int
+n = Vector a -> Int
 forall a. Vector a -> Int
 V.length Vector a
-v
-                   h :: Int
-h = Int
-n Int -> Int -> Int
+v
+                   h :: Int
+h = Int
+n Int -> Int -> Int
 forall a. Integral a => a -> a -> a
 `div` Int
 2
-                   x :: a
-x = Vector a
-v Vector a -> Int -> a
+                   x :: a
+x = Vector a
+v Vector a -> Int -> a
 forall a. Vector a -> Int -> a
 V.! Int
-h
+h
                in if Int
-n Int -> Int -> Bool
+n Int -> Int -> Bool
 forall a. Eq a => a -> a -> Bool
 == Int
 0 then BinaryTree a
@@ -1097,37 +1097,37 @@
                             else BinaryTree a -> a -> BinaryTree a -> BinaryTree a
 forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a
 Internal (Vector a -> BinaryTree a
-mkTree (Vector a -> BinaryTree a) -> Vector a -> BinaryTree a
+mkTree (Vector a -> BinaryTree a) -> Vector a -> BinaryTree a
 forall a b. (a -> b) -> a -> b
 $ Int -> Int -> Vector a -> Vector a
 forall a. Int -> Int -> Vector a -> Vector a
 V.slice Int
 0 Int
-h Vector a
-v) a
-x
+h Vector a
+v) a
+x
                                           (Vector a -> BinaryTree a
-mkTree (Vector a -> BinaryTree a) -> Vector a -> BinaryTree a
+mkTree (Vector a -> BinaryTree a) -> Vector a -> BinaryTree a
 forall a b. (a -> b) -> a -> b
 $ Int -> Int -> Vector a -> Vector a
 forall a. Int -> Int -> Vector a -> Vector a
 V.slice (Int
-hInt -> Int -> Int
+hInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1) (Int
-n Int -> Int -> Int
+n Int -> Int -> Int
 forall a. Num a => a -> a -> a
 - Int
-h Int -> Int -> Int
+h Int -> Int -> Int
 forall a. Num a => a -> a -> a
 -Int
 1) Vector a
-v)
+v)
 
 -- | Fold function for folding over a binary tree.
-foldBinaryUp                      :: b -> (a -> b -> b -> b)
-                                  -> BinaryTree a -> BinaryTree (a,b)
+foldBinaryUp                      :: b -> (a -> b -> b -> b)
+                                  -> BinaryTree a -> BinaryTree (a,b)
 foldBinaryUp :: forall b a.
 b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)
 foldBinaryUp b
@@ -1136,32 +1136,32 @@
 Nil              = BinaryTree (a, b)
 forall a. BinaryTree a
 Nil
-foldBinaryUp b
-e a -> b -> b -> b
-f (Internal BinaryTree a
-l a
-x BinaryTree a
-r) = let l' :: BinaryTree (a, b)
-l' = b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)
+foldBinaryUp b
+e a -> b -> b -> b
+f (Internal BinaryTree a
+l a
+x BinaryTree a
+r) = let l' :: BinaryTree (a, b)
+l' = b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)
 forall b a.
 b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)
 foldBinaryUp b
-e a -> b -> b -> b
-f BinaryTree a
-l
-                                        r' :: BinaryTree (a, b)
-r' = b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)
+e a -> b -> b -> b
+f BinaryTree a
+l
+                                        r' :: BinaryTree (a, b)
+r' = b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)
 forall b a.
 b -> (a -> b -> b -> b) -> BinaryTree a -> BinaryTree (a, b)
 foldBinaryUp b
-e a -> b -> b -> b
-f BinaryTree a
-r
-                                        g :: BinaryTree (a, b) -> b
-g  = b -> ((a, b) -> b) -> Maybe (a, b) -> b
+e a -> b -> b -> b
+f BinaryTree a
+r
+                                        g :: BinaryTree (a, b) -> b
+g  = b -> ((a, b) -> b) -> Maybe (a, b) -> b
 forall b a. b -> (a -> b) -> Maybe a -> b
 maybe b
-e (a, b) -> b
+e (a, b) -> b
 forall a b. (a, b) -> b
 snd (Maybe (a, b) -> b)
 -> (BinaryTree (a, b) -> Maybe (a, b)) -> BinaryTree (a, b) -> b
@@ -1169,52 +1169,52 @@
 . BinaryTree (a, b) -> Maybe (a, b)
 forall a. BinaryTree a -> Maybe a
 access
-                                        b :: b
-b  = a -> b -> b -> b
-f a
-x (BinaryTree (a, b) -> b
-g BinaryTree (a, b)
-l') (BinaryTree (a, b) -> b
-g BinaryTree (a, b)
-r')
+                                        b :: b
+b  = a -> b -> b -> b
+f a
+x (BinaryTree (a, b) -> b
+g BinaryTree (a, b)
+l') (BinaryTree (a, b) -> b
+g BinaryTree (a, b)
+r')
                                     in BinaryTree (a, b)
 -> (a, b) -> BinaryTree (a, b) -> BinaryTree (a, b)
 forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a
 Internal BinaryTree (a, b)
-l' (a
-x,b
-b) BinaryTree (a, b)
-r'
+l' (a
+x,b
+b) BinaryTree (a, b)
+r'
 
 -- | Convert a @BinaryTree@ into a RoseTree
-toRoseTree'                  :: BinaryTree a -> Maybe (Tree.Tree a)
+toRoseTree'                  :: BinaryTree a -> Maybe (Tree.Tree a)
 toRoseTree' :: forall a. BinaryTree a -> Maybe (Tree a)
 toRoseTree' BinaryTree a
 Nil              = Maybe (Tree a)
 forall a. Maybe a
 Nothing
-toRoseTree' (Internal BinaryTree a
-l a
-v BinaryTree a
-r) = Tree a -> Maybe (Tree a)
+toRoseTree' (Internal BinaryTree a
+l a
+v BinaryTree a
+r) = Tree a -> Maybe (Tree a)
 forall a. a -> Maybe a
 Just (Tree a -> Maybe (Tree a)) -> Tree a -> Maybe (Tree a)
 forall a b. (a -> b) -> a -> b
 $ a -> [Tree a] -> Tree a
 forall a. a -> [Tree a] -> Tree a
 Tree.Node a
-v ([Tree a] -> Tree a) -> [Tree a] -> Tree a
+v ([Tree a] -> Tree a) -> [Tree a] -> Tree a
 forall a b. (a -> b) -> a -> b
 $ (BinaryTree a -> Maybe (Tree a)) -> [BinaryTree a] -> [Tree a]
 forall a b. (a -> Maybe b) -> [a] -> [b]
 mapMaybe BinaryTree a -> Maybe (Tree a)
 forall a. BinaryTree a -> Maybe (Tree a)
 toRoseTree' [BinaryTree a
-l,BinaryTree a
-r]
+l,BinaryTree a
+r]
 
 -- | Draw a binary tree.
-drawTree' :: Show a => BinaryTree a -> String
+drawTree' :: Show a => BinaryTree a -> String
 drawTree' :: forall a. Show a => BinaryTree a -> String
 drawTree' = String -> (Tree a -> String) -> Maybe (Tree a) -> String
 forall b a. b -> (a -> b) -> Maybe a -> b
diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Util.html
index 55a0c2003..aa9272fdc 100644
--- a/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Util.html
+++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Tree.Util.html
@@ -27,7 +27,7 @@
 --------------------------------------------------------------------------------
 
 -- | Nodes in a tree are typically either an internal node or a leaf node
-data TreeNode v a = InternalNode v | LeafNode a deriving (Int -> TreeNode v a -> ShowS
+data TreeNode v a = InternalNode v | LeafNode a deriving (Int -> TreeNode v a -> ShowS
 [TreeNode v a] -> ShowS
 TreeNode v a -> String
 (Int -> TreeNode v a -> ShowS)
@@ -45,7 +45,7 @@
 show :: TreeNode v a -> String
 $cshowList :: forall v a. (Show v, Show a) => [TreeNode v a] -> ShowS
 showList :: [TreeNode v a] -> ShowS
-Show,TreeNode v a -> TreeNode v a -> Bool
+Show,TreeNode v a -> TreeNode v a -> Bool
 (TreeNode v a -> TreeNode v a -> Bool)
 -> (TreeNode v a -> TreeNode v a -> Bool) -> Eq (TreeNode v a)
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -56,23 +56,23 @@
 /= :: TreeNode v a -> TreeNode v a -> Bool
 Eq)
 
-instance Functor (TreeNode a) where
-  fmap :: forall a b. (a -> b) -> TreeNode a a -> TreeNode a b
+instance Functor (TreeNode a) where
+  fmap :: forall a b. (a -> b) -> TreeNode a a -> TreeNode a b
 fmap = (a -> b) -> TreeNode a a -> TreeNode a b
 forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
 fmapDefault
-instance Foldable (TreeNode a) where
-  foldMap :: forall m a. Monoid m => (a -> m) -> TreeNode a a -> m
-foldMap = (a -> m) -> TreeNode a a -> m
+instance Foldable (TreeNode a) where
+  foldMap :: forall m a. Monoid m => (a -> m) -> TreeNode a a -> m
+foldMap = (a -> m) -> TreeNode a a -> m
 forall (t :: * -> *) m a.
 (Traversable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMapDefault
-instance Traversable (TreeNode a) where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable (TreeNode a) where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> TreeNode a a -> f (TreeNode a b)
-traverse = (a -> f a) -> (a -> f b) -> TreeNode a a -> f (TreeNode a b)
+traverse = (a -> f a) -> (a -> f b) -> TreeNode a a -> f (TreeNode a b)
 forall (f :: * -> *) a c b d.
 Applicative f =>
 (a -> f c) -> (b -> f d) -> TreeNode a b -> f (TreeNode c d)
@@ -84,47 +84,47 @@
 forall (f :: * -> *) a. Applicative f => a -> f a
 pure
 
-instance Bifunctor TreeNode where
-  bimap :: forall a b c d.
+instance Bifunctor TreeNode where
+  bimap :: forall a b c d.
 (a -> b) -> (c -> d) -> TreeNode a c -> TreeNode b d
-bimap = (a -> b) -> (c -> d) -> TreeNode a c -> TreeNode b d
+bimap = (a -> b) -> (c -> d) -> TreeNode a c -> TreeNode b d
 forall (t :: * -> * -> *) a b c d.
 Bitraversable t =>
 (a -> b) -> (c -> d) -> t a c -> t b d
 bimapDefault
-instance Bifoldable TreeNode where
-  bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> TreeNode a b -> m
-bifoldMap = (a -> m) -> (b -> m) -> TreeNode a b -> m
+instance Bifoldable TreeNode where
+  bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> TreeNode a b -> m
+bifoldMap = (a -> m) -> (b -> m) -> TreeNode a b -> m
 forall (t :: * -> * -> *) m a b.
 (Bitraversable t, Monoid m) =>
 (a -> m) -> (b -> m) -> t a b -> m
 bifoldMapDefault
 instance Bitraversable TreeNode where
-  bitraverse :: forall (f :: * -> *) a c b d.
+  bitraverse :: forall (f :: * -> *) a c b d.
 Applicative f =>
 (a -> f c) -> (b -> f d) -> TreeNode a b -> f (TreeNode c d)
-bitraverse a -> f c
-f b -> f d
-g = \case
-    InternalNode a
-v -> c -> TreeNode c d
+bitraverse a -> f c
+f b -> f d
+g = \case
+    InternalNode a
+v -> c -> TreeNode c d
 forall v a. v -> TreeNode v a
 InternalNode (c -> TreeNode c d) -> f c -> f (TreeNode c d)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> a -> f c
-f a
-v
-    LeafNode b
-l     -> d -> TreeNode c d
+f a
+v
+    LeafNode b
+l     -> d -> TreeNode c d
 forall v a. a -> TreeNode v a
 LeafNode     (d -> TreeNode c d) -> f d -> f (TreeNode c d)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> b -> f d
-g b
-l
+g b
+l
 
 -- | A TreeNode is isomorphic to Either
-_TreeNodeEither :: Iso' (TreeNode v p) (Either v p)
+_TreeNodeEither :: Iso' (TreeNode v p) (Either v p)
 _TreeNodeEither :: forall v p (p :: * -> * -> *) (f :: * -> *).
 (Profunctor p, Functor f) =>
 p (Either v p) (f (Either v p))
@@ -135,24 +135,24 @@
 forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
 iso TreeNode v p -> Either v p
 forall {a} {b}. TreeNode a b -> Either a b
-tne Either v p -> TreeNode v p
+tne Either v p -> TreeNode v p
 forall {a} {a}. Either a a -> TreeNode a a
-etn
+etn
   where
-    tne :: TreeNode a b -> Either a b
-tne = \case
-      InternalNode a
-v -> a -> Either a b
+    tne :: TreeNode a b -> Either a b
+tne = \case
+      InternalNode a
+v -> a -> Either a b
 forall a b. a -> Either a b
 Left a
-v
-      LeafNode b
-l     -> b -> Either a b
+v
+      LeafNode b
+l     -> b -> Either a b
 forall a b. b -> Either a b
 Right b
-l
-    etn :: Either a a -> TreeNode a a
-etn = (a -> TreeNode a a)
+l
+    etn :: Either a a -> TreeNode a a
+etn = (a -> TreeNode a a)
 -> (a -> TreeNode a a) -> Either a a -> TreeNode a a
 forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
 either a -> TreeNode a a
@@ -165,12 +165,12 @@
 -- * Zipper on rose trees
 
 -- | Zipper for rose trees
-data Zipper a = Zipper { forall a. Zipper a -> Tree a
-focus      :: Tree a
+data Zipper a = Zipper { forall a. Zipper a -> Tree a
+focus      :: Tree a
                        , forall a. Zipper a -> [([Tree a], a, [Tree a])]
-ancestors  :: [([Tree a], a, [Tree a])] -- left siblings in reverse order
+ancestors  :: [([Tree a], a, [Tree a])] -- left siblings in reverse order
                        }
-              deriving (Int -> Zipper a -> ShowS
+              deriving (Int -> Zipper a -> ShowS
 [Zipper a] -> ShowS
 Zipper a -> String
 (Int -> Zipper a -> ShowS)
@@ -186,7 +186,7 @@
 show :: Zipper a -> String
 $cshowList :: forall a. Show a => [Zipper a] -> ShowS
 showList :: [Zipper a] -> ShowS
-Show,Zipper a -> Zipper a -> Bool
+Show,Zipper a -> Zipper a -> Bool
 (Zipper a -> Zipper a -> Bool)
 -> (Zipper a -> Zipper a -> Bool) -> Eq (Zipper a)
 forall a. Eq a => Zipper a -> Zipper a -> Bool
@@ -198,7 +198,7 @@
 Eq)
 
 -- | Create a new zipper focussiong on the root.
-root :: Tree a -> Zipper a
+root :: Tree a -> Zipper a
 root :: forall a. Tree a -> Zipper a
 root = (Tree a -> [([Tree a], a, [Tree a])] -> Zipper a)
 -> [([Tree a], a, [Tree a])] -> Tree a -> Zipper a
@@ -208,20 +208,20 @@
 Zipper []
 
 -- | Move the focus to the parent of this node.
-up               :: Zipper a -> Maybe (Zipper a)
+up               :: Zipper a -> Maybe (Zipper a)
 up :: forall a. Zipper a -> Maybe (Zipper a)
-up (Zipper Tree a
-t [([Tree a], a, [Tree a])]
-as) = case [([Tree a], a, [Tree a])]
-as of
+up (Zipper Tree a
+t [([Tree a], a, [Tree a])]
+as) = case [([Tree a], a, [Tree a])]
+as of
                      []              -> Maybe (Zipper a)
 forall a. Maybe a
 Nothing
-                     (([Tree a]
-ls,a
-p,[Tree a]
-rs):[([Tree a], a, [Tree a])]
-as') -> Zipper a -> Maybe (Zipper a)
+                     (([Tree a]
+ls,a
+p,[Tree a]
+rs):[([Tree a], a, [Tree a])]
+as') -> Zipper a -> Maybe (Zipper a)
 forall a. a -> Maybe a
 Just (Zipper a -> Maybe (Zipper a)) -> Zipper a -> Maybe (Zipper a)
 forall a b. (a -> b) -> a -> b
@@ -230,59 +230,59 @@
 Zipper (a -> [Tree a] -> Tree a
 forall a. a -> [Tree a] -> Tree a
 Node a
-p ([Tree a] -> [Tree a]
+p ([Tree a] -> [Tree a]
 forall a. [a] -> [a]
 reverse [Tree a]
-ls [Tree a] -> [Tree a] -> [Tree a]
+ls [Tree a] -> [Tree a] -> [Tree a]
 forall a. Semigroup a => a -> a -> a
 <> [Tree a
-t] [Tree a] -> [Tree a] -> [Tree a]
+t] [Tree a] -> [Tree a] -> [Tree a]
 forall a. Semigroup a => a -> a -> a
 <> [Tree a]
-rs)) [([Tree a], a, [Tree a])]
-as'
+rs)) [([Tree a], a, [Tree a])]
+as'
 
 -- | Move the focus to the first child of this node.
 --
 -- >>> firstChild $ root myTree
 -- Just (Zipper {focus = Node {rootLabel = 1, subForest = []}, ancestors = [([],0,[Node {rootLabel = 2, subForest = []},Node {rootLabel = 3, subForest = [Node {rootLabel = 4, subForest = []}]}])]})
-firstChild                          :: Zipper a -> Maybe (Zipper a)
+firstChild                          :: Zipper a -> Maybe (Zipper a)
 firstChild :: forall a. Zipper a -> Maybe (Zipper a)
-firstChild (Zipper (Node a
-x [Tree a]
-chs) [([Tree a], a, [Tree a])]
-as) = case [Tree a]
-chs of
+firstChild (Zipper (Node a
+x [Tree a]
+chs) [([Tree a], a, [Tree a])]
+as) = case [Tree a]
+chs of
                                         []       -> Maybe (Zipper a)
 forall a. Maybe a
 Nothing
-                                        (Tree a
-c:[Tree a]
-chs') -> Zipper a -> Maybe (Zipper a)
+                                        (Tree a
+c:[Tree a]
+chs') -> Zipper a -> Maybe (Zipper a)
 forall a. a -> Maybe a
 Just (Zipper a -> Maybe (Zipper a)) -> Zipper a -> Maybe (Zipper a)
 forall a b. (a -> b) -> a -> b
 $ Tree a -> [([Tree a], a, [Tree a])] -> Zipper a
 forall a. Tree a -> [([Tree a], a, [Tree a])] -> Zipper a
 Zipper Tree a
-c (([],a
-x,[Tree a]
-chs')([Tree a], a, [Tree a])
+c (([],a
+x,[Tree a]
+chs')([Tree a], a, [Tree a])
 -> [([Tree a], a, [Tree a])] -> [([Tree a], a, [Tree a])]
 forall a. a -> [a] -> [a]
 :[([Tree a], a, [Tree a])]
-as)
+as)
 
 -- | Move the focus to the next sibling of this node
 --
 -- >>> (firstChild $ root myTree) >>= nextSibling
 -- Just (Zipper {focus = Node {rootLabel = 2, subForest = []}, ancestors = [([Node {rootLabel = 1, subForest = []}],0,[Node {rootLabel = 3, subForest = [Node {rootLabel = 4, subForest = []}]}])]})
-nextSibling               :: Zipper a -> Maybe (Zipper a)
+nextSibling               :: Zipper a -> Maybe (Zipper a)
 nextSibling :: forall a. Zipper a -> Maybe (Zipper a)
-nextSibling (Zipper Tree a
-t [([Tree a], a, [Tree a])]
-as) = case [([Tree a], a, [Tree a])]
-as of
+nextSibling (Zipper Tree a
+t [([Tree a], a, [Tree a])]
+as) = case [([Tree a], a, [Tree a])]
+as of
                               []                -> Maybe (Zipper a)
 forall a. Maybe a
 Nothing -- no parent
@@ -292,37 +292,37 @@
 _)      -> Maybe (Zipper a)
 forall a. Maybe a
 Nothing -- no next sibling
-                              (([Tree a]
-ls,a
-p,Tree a
-r:[Tree a]
-rs):[([Tree a], a, [Tree a])]
-as') -> Zipper a -> Maybe (Zipper a)
+                              (([Tree a]
+ls,a
+p,Tree a
+r:[Tree a]
+rs):[([Tree a], a, [Tree a])]
+as') -> Zipper a -> Maybe (Zipper a)
 forall a. a -> Maybe a
 Just (Zipper a -> Maybe (Zipper a)) -> Zipper a -> Maybe (Zipper a)
 forall a b. (a -> b) -> a -> b
 $ Tree a -> [([Tree a], a, [Tree a])] -> Zipper a
 forall a. Tree a -> [([Tree a], a, [Tree a])] -> Zipper a
 Zipper Tree a
-r ((Tree a
-tTree a -> [Tree a] -> [Tree a]
+r ((Tree a
+tTree a -> [Tree a] -> [Tree a]
 forall a. a -> [a] -> [a]
 :[Tree a]
-ls,a
-p,[Tree a]
-rs)([Tree a], a, [Tree a])
+ls,a
+p,[Tree a]
+rs)([Tree a], a, [Tree a])
 -> [([Tree a], a, [Tree a])] -> [([Tree a], a, [Tree a])]
 forall a. a -> [a] -> [a]
 :[([Tree a], a, [Tree a])]
-as')
+as')
 
 -- | Move the focus to the next sibling of this node
-prevSibling               :: Zipper a -> Maybe (Zipper a)
+prevSibling               :: Zipper a -> Maybe (Zipper a)
 prevSibling :: forall a. Zipper a -> Maybe (Zipper a)
-prevSibling (Zipper Tree a
-t [([Tree a], a, [Tree a])]
-as) = case [([Tree a], a, [Tree a])]
-as of
+prevSibling (Zipper Tree a
+t [([Tree a], a, [Tree a])]
+as) = case [([Tree a], a, [Tree a])]
+as of
                               []                -> Maybe (Zipper a)
 forall a. Maybe a
 Nothing -- no parent
@@ -332,43 +332,43 @@
 _)      -> Maybe (Zipper a)
 forall a. Maybe a
 Nothing -- no prev sibling
-                              ((Tree a
-l:[Tree a]
-ls,a
-p,[Tree a]
-rs):[([Tree a], a, [Tree a])]
-as') -> Zipper a -> Maybe (Zipper a)
+                              ((Tree a
+l:[Tree a]
+ls,a
+p,[Tree a]
+rs):[([Tree a], a, [Tree a])]
+as') -> Zipper a -> Maybe (Zipper a)
 forall a. a -> Maybe a
 Just (Zipper a -> Maybe (Zipper a)) -> Zipper a -> Maybe (Zipper a)
 forall a b. (a -> b) -> a -> b
 $ Tree a -> [([Tree a], a, [Tree a])] -> Zipper a
 forall a. Tree a -> [([Tree a], a, [Tree a])] -> Zipper a
 Zipper Tree a
-l (([Tree a]
-ls,a
-p,Tree a
-tTree a -> [Tree a] -> [Tree a]
+l (([Tree a]
+ls,a
+p,Tree a
+tTree a -> [Tree a] -> [Tree a]
 forall a. a -> [a] -> [a]
 :[Tree a]
-rs)([Tree a], a, [Tree a])
+rs)([Tree a], a, [Tree a])
 -> [([Tree a], a, [Tree a])] -> [([Tree a], a, [Tree a])]
 forall a. a -> [a] -> [a]
 :[([Tree a], a, [Tree a])]
-as')
+as')
 
 -- | Given a zipper that focussses on some subtree t, construct a list with
 -- zippers that focus on each child.
-allChildren :: Zipper a -> [Zipper a]
+allChildren :: Zipper a -> [Zipper a]
 allChildren :: forall a. Zipper a -> [Zipper a]
 allChildren = (Maybe (Zipper a) -> Maybe (Zipper a, Maybe (Zipper a)))
 -> Maybe (Zipper a) -> [Zipper a]
 forall b a. (b -> Maybe (a, b)) -> b -> [a]
-List.unfoldr ((\Zipper a
-ch -> (Zipper a
-ch, Zipper a -> Maybe (Zipper a)
+List.unfoldr ((\Zipper a
+ch -> (Zipper a
+ch, Zipper a -> Maybe (Zipper a)
 forall a. Zipper a -> Maybe (Zipper a)
 nextSibling Zipper a
-ch)) <$>) (Maybe (Zipper a) -> [Zipper a])
+ch)) <$>) (Maybe (Zipper a) -> [Zipper a])
 -> (Zipper a -> Maybe (Zipper a)) -> Zipper a -> [Zipper a]
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Zipper a -> Maybe (Zipper a)
@@ -377,11 +377,11 @@
 
 -- | Given a zipper that focussses on some subtree t, construct a list with
 -- zippers that focus on each of the nodes in the subtree of t.
-allTrees   :: Zipper a -> [Zipper a]
+allTrees   :: Zipper a -> [Zipper a]
 allTrees :: forall a. Zipper a -> [Zipper a]
-allTrees Zipper a
-r = Zipper a
-r Zipper a -> [Zipper a] -> [Zipper a]
+allTrees Zipper a
+r = Zipper a
+r Zipper a -> [Zipper a] -> [Zipper a]
 forall a. a -> [a] -> [a]
 : (Zipper a -> [Zipper a]) -> [Zipper a] -> [Zipper a]
 forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
@@ -390,30 +390,30 @@
 allTrees (Zipper a -> [Zipper a]
 forall a. Zipper a -> [Zipper a]
 allChildren Zipper a
-r)
+r)
 
 -- | Creates a new tree from the zipper that thas the current node as root. The
 -- ancestorTree (if there is any) forms the first child in this new root.
-unZipperLocal                          :: Zipper a -> Tree a
+unZipperLocal                          :: Zipper a -> Tree a
 unZipperLocal :: forall a. Zipper a -> Tree a
-unZipperLocal (Zipper (Node a
-x [Tree a]
-chs) [([Tree a], a, [Tree a])]
-as) = a -> [Tree a] -> Tree a
+unZipperLocal (Zipper (Node a
+x [Tree a]
+chs) [([Tree a], a, [Tree a])]
+as) = a -> [Tree a] -> Tree a
 forall a. a -> [Tree a] -> Tree a
 Node a
-x (Maybe (Tree a) -> [Tree a]
+x (Maybe (Tree a) -> [Tree a]
 forall a. Maybe a -> [a]
 maybeToList ([([Tree a], a, [Tree a])] -> Maybe (Tree a)
 forall a. [([Tree a], a, [Tree a])] -> Maybe (Tree a)
 constructTree [([Tree a], a, [Tree a])]
-as) [Tree a] -> [Tree a] -> [Tree a]
+as) [Tree a] -> [Tree a] -> [Tree a]
 forall a. Semigroup a => a -> a -> a
 <> [Tree a]
-chs)
+chs)
 
 -- | Constructs a tree from the list of ancestors (if there are any)
-constructTree :: [([Tree a],a,[Tree a])] -> Maybe (Tree a)
+constructTree :: [([Tree a],a,[Tree a])] -> Maybe (Tree a)
 constructTree :: forall a. [([Tree a], a, [Tree a])] -> Maybe (Tree a)
 constructTree = [Tree a] -> Maybe (Tree a)
 forall a. [a] -> Maybe a
@@ -429,23 +429,23 @@
 forall (t :: * -> *) a b.
 Foldable t =>
 (a -> b -> b) -> b -> t a -> b
-foldr (\([Tree a]
-ls,a
-p,[Tree a]
-rs) [Tree a]
-tas -> [a -> [Tree a] -> Tree a
+foldr (\([Tree a]
+ls,a
+p,[Tree a]
+rs) [Tree a]
+tas -> [a -> [Tree a] -> Tree a
 forall a. a -> [Tree a] -> Tree a
 Node a
-p ([Tree a]
-tas [Tree a] -> [Tree a] -> [Tree a]
+p ([Tree a]
+tas [Tree a] -> [Tree a] -> [Tree a]
 forall a. Semigroup a => a -> a -> a
 <> [Tree a] -> [Tree a]
 forall a. [a] -> [a]
 reverse [Tree a]
-ls [Tree a] -> [Tree a] -> [Tree a]
+ls [Tree a] -> [Tree a] -> [Tree a]
 forall a. Semigroup a => a -> a -> a
 <> [Tree a]
-rs)]) []
+rs)]) []
 
 
 --------------------------------------------------------------------------------
@@ -460,13 +460,13 @@
 -- Just (Node {rootLabel = 4, subForest = [Node {rootLabel = 3, subForest = [Node {rootLabel = 0, subForest = [Node {rootLabel = 1, subForest = []},Node {rootLabel = 2, subForest = []}]}]}]})
 -- >>> findEvert (== 5) myTree
 -- Nothing
-findEvert   :: (a -> Bool) -> Tree a -> Maybe (Tree a)
+findEvert   :: (a -> Bool) -> Tree a -> Maybe (Tree a)
 findEvert :: forall a. (a -> Bool) -> Tree a -> Maybe (Tree a)
-findEvert a -> Bool
-p = (Tree a -> Bool) -> Tree a -> Maybe (Tree a)
+findEvert a -> Bool
+p = (Tree a -> Bool) -> Tree a -> Maybe (Tree a)
 forall a. (Tree a -> Bool) -> Tree a -> Maybe (Tree a)
 findEvert' (a -> Bool
-p (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool
+p (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Tree a -> a
 forall a. Tree a -> a
@@ -477,10 +477,10 @@
 --
 -- running time: \(O(nT(n))\) where \(n\) is the size of the tree, and \(T(m)\) is
 -- the time to evaluate a predicate on a subtree of size \(m\).
-findEvert'   :: (Tree a -> Bool) -> Tree a -> Maybe (Tree a)
+findEvert'   :: (Tree a -> Bool) -> Tree a -> Maybe (Tree a)
 findEvert' :: forall a. (Tree a -> Bool) -> Tree a -> Maybe (Tree a)
-findEvert' Tree a -> Bool
-p = (Zipper a -> Tree a) -> Maybe (Zipper a) -> Maybe (Tree a)
+findEvert' Tree a -> Bool
+p = (Zipper a -> Tree a) -> Maybe (Zipper a) -> Maybe (Tree a)
 forall a b. (a -> b) -> Maybe a -> Maybe b
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 fmap Zipper a -> Tree a
@@ -491,7 +491,7 @@
 . (Zipper a -> Bool) -> [Zipper a] -> Maybe (Zipper a)
 forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Maybe a
 List.find (Tree a -> Bool
-p (Tree a -> Bool) -> (Zipper a -> Tree a) -> Zipper a -> Bool
+p (Tree a -> Bool) -> (Zipper a -> Tree a) -> Zipper a -> Bool
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Zipper a -> Tree a
 forall a. Zipper a -> Tree a
@@ -526,16 +526,16 @@
 -- Just [1,0,2]
 -- >>>  findPath (== 4) (==2) myTree
 -- Just [4,3,0,2]
-findPath               :: (a -> Bool) -- ^ is this node a starting node
-                          -> (a -> Bool) -- ^ is this node an ending node
-                          -> Tree a -> Maybe [a]
+findPath               :: (a -> Bool) -- ^ is this node a starting node
+                          -> (a -> Bool) -- ^ is this node an ending node
+                          -> Tree a -> Maybe [a]
 findPath :: forall a. (a -> Bool) -> (a -> Bool) -> Tree a -> Maybe [a]
-findPath a -> Bool
-isStart a -> Bool
-isEnd = (a -> Bool) -> Tree a -> Maybe (Tree a)
+findPath a -> Bool
+isStart a -> Bool
+isEnd = (a -> Bool) -> Tree a -> Maybe (Tree a)
 forall a. (a -> Bool) -> Tree a -> Maybe (Tree a)
 findEvert a -> Bool
-isStart (Tree a -> Maybe (Tree a))
+isStart (Tree a -> Maybe (Tree a))
 -> (Tree a -> Maybe [a]) -> Tree a -> Maybe [a]
 forall (m :: * -> *) a b c.
 Monad m =>
@@ -543,23 +543,23 @@
 >=> (a -> Bool) -> Tree a -> Maybe [a]
 forall a. (a -> Bool) -> Tree a -> Maybe [a]
 findNode a -> Bool
-isEnd
+isEnd
 
 -- | Given a predicate on a, find (the path to) a node that satisfies the predicate.
 --
 -- >>> findNode (== 4) myTree
 -- Just [0,3,4]
-findNode   :: (a -> Bool) -> Tree a -> Maybe [a]
+findNode   :: (a -> Bool) -> Tree a -> Maybe [a]
 findNode :: forall a. (a -> Bool) -> Tree a -> Maybe [a]
-findNode a -> Bool
-p = [[a]] -> Maybe [a]
+findNode a -> Bool
+p = [[a]] -> Maybe [a]
 forall a. [a] -> Maybe a
 listToMaybe ([[a]] -> Maybe [a]) -> (Tree a -> [[a]]) -> Tree a -> Maybe [a]
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . (Tree a -> Bool) -> Tree a -> [[a]]
 forall a. (Tree a -> Bool) -> Tree a -> [[a]]
 findNodes (a -> Bool
-p (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool
+p (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Tree a -> a
 forall a. Tree a -> a
@@ -576,105 +576,105 @@
 -- [[0],[0,2],[0,3,4]]
 -- >>> let size = length in findNodes ((> 1) . size) myTree
 -- [[0],[0,3]]
-findNodes   :: (Tree a -> Bool) -> Tree a -> [[a]]
+findNodes   :: (Tree a -> Bool) -> Tree a -> [[a]]
 findNodes :: forall a. (Tree a -> Bool) -> Tree a -> [[a]]
-findNodes Tree a -> Bool
-p = Tree a -> [[a]]
-go
+findNodes Tree a -> Bool
+p = Tree a -> [[a]]
+go
   where
-    go :: Tree a -> [[a]]
-go Tree a
-t = let mh :: [[a]]
-mh = [ [] | Tree a -> Bool
-p Tree a
-t ] -- [[]] iff 'p t'
+    go :: Tree a -> [[a]]
+go Tree a
+t = let mh :: [[a]]
+mh = [ [] | Tree a -> Bool
+p Tree a
+t ] -- [[]] iff 'p t'
            in ([a] -> [a]) -> [[a]] -> [[a]]
 forall a b. (a -> b) -> [a] -> [b]
 map (Tree a -> a
 forall a. Tree a -> a
 rootLabel Tree a
-t:) ([[a]] -> [[a]]) -> [[a]] -> [[a]]
+t:) ([[a]] -> [[a]]) -> [[a]] -> [[a]]
 forall a b. (a -> b) -> a -> b
 $ [[a]]
-mh [[a]] -> [[a]] -> [[a]]
+mh [[a]] -> [[a]] -> [[a]]
 forall a. Semigroup a => a -> a -> a
 <> (Tree a -> [[a]]) -> [Tree a] -> [[a]]
 forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
 concatMap Tree a -> [[a]]
-go (Tree a -> [Tree a]
+go (Tree a -> [Tree a]
 forall a. Plated a => a -> [a]
 children Tree a
-t)
+t)
 
 
 -- | BFS Traversal of the rose tree that decomposes it into levels.
 --
 -- running time: \(O(n)\)
-levels :: Tree a -> NonEmpty (NonEmpty a)
+levels :: Tree a -> NonEmpty (NonEmpty a)
 levels :: forall a. Tree a -> NonEmpty (NonEmpty a)
 levels = NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
 forall a. NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
-go1 (NonEmpty (Tree a) -> NonEmpty (NonEmpty a))
+go1 (NonEmpty (Tree a) -> NonEmpty (NonEmpty a))
 -> (Tree a -> NonEmpty (Tree a)) -> Tree a -> NonEmpty (NonEmpty a)
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . (Tree a -> [Tree a] -> NonEmpty (Tree a)
 forall a. a -> [a] -> NonEmpty a
 :| [])
   where
-    go0   :: [Tree a] -> [NonEmpty a]
-    go0 :: forall a. [Tree a] -> [NonEmpty a]
-go0 [Tree a]
-q = case [Tree a] -> Maybe (NonEmpty (Tree a))
+    go0   :: [Tree a] -> [NonEmpty a]
+    go0 :: forall a. [Tree a] -> [NonEmpty a]
+go0 [Tree a]
+q = case [Tree a] -> Maybe (NonEmpty (Tree a))
 forall a. [a] -> Maybe (NonEmpty a)
 NonEmpty.nonEmpty [Tree a]
-q of
+q of
               Maybe (NonEmpty (Tree a))
 Nothing -> []
-              Just NonEmpty (Tree a)
-q1 -> NonEmpty (NonEmpty a) -> [NonEmpty a]
+              Just NonEmpty (Tree a)
+q1 -> NonEmpty (NonEmpty a) -> [NonEmpty a]
 forall a. NonEmpty a -> [a]
 NonEmpty.toList (NonEmpty (NonEmpty a) -> [NonEmpty a])
 -> NonEmpty (NonEmpty a) -> [NonEmpty a]
 forall a b. (a -> b) -> a -> b
 $ NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
 forall a. NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
-go1 NonEmpty (Tree a)
-q1
-    {-# INLINE go0 #-}
+go1 NonEmpty (Tree a)
+q1
+    {-# INLINE go0 #-}
 
     -- all work essentially happens here: given a bunch of trees whose
     -- root elements all have the same level, extract the values
     -- stored at these root nodes, collect all children in a big list,
     -- and explore those recursively.
-    go1    :: NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
-    go1 :: forall a. NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
-go1 NonEmpty (Tree a)
-qs = (Tree a -> a) -> NonEmpty (Tree a) -> NonEmpty a
+    go1    :: NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
+    go1 :: forall a. NonEmpty (Tree a) -> NonEmpty (NonEmpty a)
+go1 NonEmpty (Tree a)
+qs = (Tree a -> a) -> NonEmpty (Tree a) -> NonEmpty a
 forall a b. (a -> b) -> NonEmpty a -> NonEmpty b
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 fmap Tree a -> a
 forall a. Tree a -> a
-root' NonEmpty (Tree a)
-qs NonEmpty a -> [NonEmpty a] -> NonEmpty (NonEmpty a)
+root' NonEmpty (Tree a)
+qs NonEmpty a -> [NonEmpty a] -> NonEmpty (NonEmpty a)
 forall a. a -> [a] -> NonEmpty a
 :| [Tree a] -> [NonEmpty a]
 forall a. [Tree a] -> [NonEmpty a]
-go0 ((Tree a -> [Tree a]) -> NonEmpty (Tree a) -> [Tree a]
+go0 ((Tree a -> [Tree a]) -> NonEmpty (Tree a) -> [Tree a]
 forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
 concatMap Tree a -> [Tree a]
 forall {a}. Tree a -> [Tree a]
-children' NonEmpty (Tree a)
-qs)
-    {-# INLINE go1 #-}
+children' NonEmpty (Tree a)
+qs)
+    {-# INLINE go1 #-}
 
-    root' :: Tree a -> a
-root'     (Node a
-x [Tree a]
+    root' :: Tree a -> a
+root'     (Node a
+x [Tree a]
 _)   = a
-x
-    children' :: Tree a -> [Tree a]
-children' (Node a
-_ [Tree a]
-chs) = [Tree a]
-chs
+x
+    children' :: Tree a -> [Tree a]
+children' (Node a
+_ [Tree a]
+chs) = [Tree a]
+chs
 
\ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Unbounded.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Unbounded.html index 9d033a9f0..03f166f39 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Unbounded.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Unbounded.html @@ -35,8 +35,8 @@
-- that is greater than any other element. We can think of `Top a` being defined as: -- -- >>> data Top a = ValT a | Top -newtype Top a = GTop (Maybe a) - deriving (Top a -> Top a -> Bool +newtype Top a = GTop (Maybe a) + deriving (Top a -> Top a -> Bool (Top a -> Top a -> Bool) -> (Top a -> Top a -> Bool) -> Eq (Top a) forall a. Eq a => Top a -> Top a -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -44,7 +44,7 @@ == :: Top a -> Top a -> Bool $c/= :: forall a. Eq a => Top a -> Top a -> Bool /= :: Top a -> Top a -> Bool -Eq,(forall a b. (a -> b) -> Top a -> Top b) +Eq,(forall a b. (a -> b) -> Top a -> Top b) -> (forall a b. a -> Top b -> Top a) -> Functor Top forall a b. a -> Top b -> Top a forall a b. (a -> b) -> Top a -> Top b @@ -55,7 +55,7 @@ fmap :: forall a b. (a -> b) -> Top a -> Top b $c<$ :: forall a b. a -> Top b -> Top a <$ :: forall a b. a -> Top b -> Top a -Functor,(forall m. Monoid m => Top m -> m) +Functor,(forall m. Monoid m => Top m -> m) -> (forall m a. Monoid m => (a -> m) -> Top a -> m) -> (forall m a. Monoid m => (a -> m) -> Top a -> m) -> (forall a b. (a -> b -> b) -> b -> Top a -> b) @@ -137,7 +137,7 @@ sum :: forall a. Num a => Top a -> a $cproduct :: forall a. Num a => Top a -> a product :: forall a. Num a => Top a -> a -F.Foldable,Functor Top +F.Foldable,Functor Top Foldable Top (Functor Top, Foldable Top) => (forall (f :: * -> *) a b. @@ -186,7 +186,7 @@ (a -> m b) -> Top a -> m (Top b) $csequence :: forall (m :: * -> *) a. Monad m => Top (m a) -> m (Top a) sequence :: forall (m :: * -> *) a. Monad m => Top (m a) -> m (Top a) -T.Traversable,Functor Top +T.Traversable,Functor Top Functor Top => (forall a. a -> Top a) -> (forall a b. Top (a -> b) -> Top a -> Top b) @@ -217,7 +217,7 @@ *> :: forall a b. Top a -> Top b -> Top b $c<* :: forall a b. Top a -> Top b -> Top a <* :: forall a b. Top a -> Top b -> Top a -Applicative,Applicative Top +Applicative,Applicative Top Applicative Top => (forall a b. Top a -> (a -> Top b) -> Top b) -> (forall a b. Top a -> Top b -> Top b) @@ -238,7 +238,7 @@ >> :: forall a b. Top a -> Top b -> Top b $creturn :: forall a. a -> Top a return :: forall a. a -> Top a -Monad,(forall a. Eq a => Eq (Top a)) => +Monad,(forall a. Eq a => Eq (Top a)) => (forall a b. (a -> b -> Bool) -> Top a -> Top b -> Bool) -> Eq1 Top forall a. Eq a => Eq (Top a) forall a b. (a -> b -> Bool) -> Top a -> Top b -> Bool @@ -248,7 +248,7 @@ $cliftEq :: forall a b. (a -> b -> Bool) -> Top a -> Top b -> Bool liftEq :: forall a b. (a -> b -> Bool) -> Top a -> Top b -> Bool Eq1) - deriving newtype (NonEmpty (Top a) -> Top a + deriving newtype (NonEmpty (Top a) -> Top a Top a -> Top a -> Top a (Top a -> Top a -> Top a) -> (NonEmpty (Top a) -> Top a) @@ -269,7 +269,7 @@ sconcat :: NonEmpty (Top a) -> Top a $cstimes :: forall a b. (Semigroup a, Integral b) => b -> Top a -> Top a stimes :: forall b. Integral b => b -> Top a -> Top a -Semigroup,Semigroup (Top a) +Semigroup,Semigroup (Top a) Top a Semigroup (Top a) => Top a @@ -294,18 +294,18 @@ Monoid) -- | @Top a@ values are isomorphing to @Maybe a@ values. -topToMaybe :: Top a -> Maybe a +topToMaybe :: Top a -> Maybe a topToMaybe :: forall a. Top a -> Maybe a -topToMaybe (GTop Maybe a -mb) = Maybe a -mb +topToMaybe (GTop Maybe a +mb) = Maybe a +mb -pattern ValT :: a -> Top a +pattern ValT :: a -> Top a pattern $bValT :: forall a. a -> Top a $mValT :: forall {r} {a}. Top a -> (a -> r) -> ((# #) -> r) -> r -ValT x = GTop (Just x) +ValT x = GTop (Just x) -pattern Top :: Top a +pattern Top :: Top a pattern $bTop :: forall a. Top a $mTop :: forall {r} {a}. Top a -> ((# #) -> r) -> ((# #) -> r) -> r Top = GTop Nothing @@ -316,8 +316,8 @@ instance Ord1 Top where - liftCompare :: forall a b. (a -> b -> Ordering) -> Top a -> Top b -> Ordering -liftCompare a -> b -> Ordering + liftCompare :: forall a b. (a -> b -> Ordering) -> Top a -> Top b -> Ordering +liftCompare a -> b -> Ordering _ Top a Top Top b Top = Ordering @@ -332,33 +332,33 @@ Top Top b _ = Ordering GT - liftCompare a -> b -> Ordering -cmp (ValT a -x) (ValT b -y) = a -x a -> b -> Ordering -`cmp` b -y + liftCompare a -> b -> Ordering +cmp (ValT a +x) (ValT b +y) = a +x a -> b -> Ordering +`cmp` b +y -instance Ord a => Ord (Top a) where - compare :: Top a -> Top a -> Ordering -compare = Top a -> Top a -> Ordering +instance Ord a => Ord (Top a) where + compare :: Top a -> Top a -> Ordering +compare = Top a -> Top a -> Ordering forall (f :: * -> *) a. (Ord1 f, Ord a) => f a -> f a -> Ordering compare1 -instance Show a => Show (Top a) where - show :: Top a -> String -show Top a +instance Show a => Show (Top a) where + show :: Top a -> String +show Top a Top = String "Top" - show (ValT a -x) = String + show (ValT a +x) = String "ValT " String -> ShowS forall a. [a] -> [a] -> [a] ++ a -> String forall a. Show a => a -> String show a -x +x -- | 'ValT' prism. Can be used to access the non-bottom element if it exists: -- @@ -367,7 +367,7 @@ -- -- >>> Top & _ValT %~ not -- Top -_ValT :: Prism (Top a) (Top b) a b +_ValT :: Prism (Top a) (Top b) a b _ValT :: forall a b (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p a (f b) -> p (Top a) (f (Top b)) @@ -381,14 +381,14 @@ forall a b. a -> Either a b Left Top b forall a. Top a -Top ; ValT a -x -> a -> Either (Top b) a +Top ; ValT a +x -> a -> Either (Top b) a forall a b. b -> Either a b Right a -x) +x) -- | t'Top' prism. -_Top :: Prism' (Top a) () +_Top :: Prism' (Top a) () _Top :: forall a (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p () (f ()) -> p (Top a) (f (Top a)) @@ -418,7 +418,7 @@ -- Nothing -- >>> Nothing ^.re _TopMaybe -- Top -_TopMaybe :: Iso' (Top a) (Maybe a) +_TopMaybe :: Iso' (Top a) (Maybe a) _TopMaybe :: forall a (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Maybe a) (f (Maybe a)) -> p (Top a) (f (Top a)) @@ -438,8 +438,8 @@ -- @`Bottom a`@ being defined as: -- -- >>> data Bottom a = Bottom | ValB a -newtype Bottom a = GBottom (Maybe a) - deriving (Bottom a -> Bottom a -> Bool +newtype Bottom a = GBottom (Maybe a) + deriving (Bottom a -> Bottom a -> Bool (Bottom a -> Bottom a -> Bool) -> (Bottom a -> Bottom a -> Bool) -> Eq (Bottom a) forall a. Eq a => Bottom a -> Bottom a -> Bool @@ -448,7 +448,7 @@ == :: Bottom a -> Bottom a -> Bool $c/= :: forall a. Eq a => Bottom a -> Bottom a -> Bool /= :: Bottom a -> Bottom a -> Bool -Eq,Eq (Bottom a) +Eq,Eq (Bottom a) Eq (Bottom a) => (Bottom a -> Bottom a -> Ordering) -> (Bottom a -> Bottom a -> Bool) @@ -489,7 +489,7 @@ max :: Bottom a -> Bottom a -> Bottom a $cmin :: forall a. Ord a => Bottom a -> Bottom a -> Bottom a min :: Bottom a -> Bottom a -> Bottom a -Ord,(forall a b. (a -> b) -> Bottom a -> Bottom b) +Ord,(forall a b. (a -> b) -> Bottom a -> Bottom b) -> (forall a b. a -> Bottom b -> Bottom a) -> Functor Bottom forall a b. a -> Bottom b -> Bottom a forall a b. (a -> b) -> Bottom a -> Bottom b @@ -500,7 +500,7 @@ fmap :: forall a b. (a -> b) -> Bottom a -> Bottom b $c<$ :: forall a b. a -> Bottom b -> Bottom a <$ :: forall a b. a -> Bottom b -> Bottom a -Functor,(forall m. Monoid m => Bottom m -> m) +Functor,(forall m. Monoid m => Bottom m -> m) -> (forall m a. Monoid m => (a -> m) -> Bottom a -> m) -> (forall m a. Monoid m => (a -> m) -> Bottom a -> m) -> (forall a b. (a -> b -> b) -> b -> Bottom a -> b) @@ -582,7 +582,7 @@ sum :: forall a. Num a => Bottom a -> a $cproduct :: forall a. Num a => Bottom a -> a product :: forall a. Num a => Bottom a -> a -F.Foldable,Functor Bottom +F.Foldable,Functor Bottom Foldable Bottom (Functor Bottom, Foldable Bottom) => (forall (f :: * -> *) a b. @@ -639,7 +639,7 @@ (a -> m b) -> Bottom a -> m (Bottom b) $csequence :: forall (m :: * -> *) a. Monad m => Bottom (m a) -> m (Bottom a) sequence :: forall (m :: * -> *) a. Monad m => Bottom (m a) -> m (Bottom a) -T.Traversable,Functor Bottom +T.Traversable,Functor Bottom Functor Bottom => (forall a. a -> Bottom a) -> (forall a b. Bottom (a -> b) -> Bottom a -> Bottom b) @@ -671,7 +671,7 @@ *> :: forall a b. Bottom a -> Bottom b -> Bottom b $c<* :: forall a b. Bottom a -> Bottom b -> Bottom a <* :: forall a b. Bottom a -> Bottom b -> Bottom a -Applicative,Applicative Bottom +Applicative,Applicative Bottom Applicative Bottom => (forall a b. Bottom a -> (a -> Bottom b) -> Bottom b) -> (forall a b. Bottom a -> Bottom b -> Bottom b) @@ -692,7 +692,7 @@ >> :: forall a b. Bottom a -> Bottom b -> Bottom b $creturn :: forall a. a -> Bottom a return :: forall a. a -> Bottom a -Monad,(forall a. Eq a => Eq (Bottom a)) => +Monad,(forall a. Eq a => Eq (Bottom a)) => (forall a b. (a -> b -> Bool) -> Bottom a -> Bottom b -> Bool) -> Eq1 Bottom forall a. Eq a => Eq (Bottom a) @@ -702,7 +702,7 @@ (forall a b. (a -> b -> Bool) -> f a -> f b -> Bool) -> Eq1 f $cliftEq :: forall a b. (a -> b -> Bool) -> Bottom a -> Bottom b -> Bool liftEq :: forall a b. (a -> b -> Bool) -> Bottom a -> Bottom b -> Bool -Eq1,Eq1 Bottom +Eq1,Eq1 Bottom (Eq1 Bottom, forall a. Ord a => Ord (Bottom a)) => (forall a b. (a -> b -> Ordering) -> Bottom a -> Bottom b -> Ordering) @@ -719,7 +719,7 @@ liftCompare :: forall a b. (a -> b -> Ordering) -> Bottom a -> Bottom b -> Ordering Ord1) - deriving newtype (NonEmpty (Bottom a) -> Bottom a + deriving newtype (NonEmpty (Bottom a) -> Bottom a Bottom a -> Bottom a -> Bottom a (Bottom a -> Bottom a -> Bottom a) -> (NonEmpty (Bottom a) -> Bottom a) @@ -740,7 +740,7 @@ sconcat :: NonEmpty (Bottom a) -> Bottom a $cstimes :: forall a b. (Semigroup a, Integral b) => b -> Bottom a -> Bottom a stimes :: forall b. Integral b => b -> Bottom a -> Bottom a -Semigroup,Semigroup (Bottom a) +Semigroup,Semigroup (Bottom a) Bottom a Semigroup (Bottom a) => Bottom a @@ -765,37 +765,37 @@ Monoid) -- | `Bottom a` values are isomorphing to `Maybe a` values. -bottomToMaybe :: Bottom a -> Maybe a +bottomToMaybe :: Bottom a -> Maybe a bottomToMaybe :: forall a. Bottom a -> Maybe a -bottomToMaybe (GBottom Maybe a -mb) = Maybe a -mb +bottomToMaybe (GBottom Maybe a +mb) = Maybe a +mb -pattern Bottom :: Bottom a +pattern Bottom :: Bottom a pattern $bBottom :: forall a. Bottom a $mBottom :: forall {r} {a}. Bottom a -> ((# #) -> r) -> ((# #) -> r) -> r Bottom = GBottom Nothing -pattern ValB :: a -> Bottom a +pattern ValB :: a -> Bottom a pattern $bValB :: forall a. a -> Bottom a $mValB :: forall {r} {a}. Bottom a -> (a -> r) -> ((# #) -> r) -> r -ValB x = GBottom (Just x) +ValB x = GBottom (Just x) {-# COMPLETE Bottom, ValB #-} -instance Show a => Show (Bottom a) where - show :: Bottom a -> String +instance Show a => Show (Bottom a) where + show :: Bottom a -> String show Bottom a Bottom = String "Bottom" - show (ValB a -x) = String + show (ValB a +x) = String "ValB " String -> ShowS forall a. [a] -> [a] -> [a] ++ a -> String forall a. Show a => a -> String show a -x +x -- | 'ValB' prism. Can be used to access the non-bottom element if it exists: -- @@ -804,7 +804,7 @@ -- -- >>> Bottom & _ValB %~ not -- Bottom -_ValB :: Prism (Bottom a) (Bottom b) a b +_ValB :: Prism (Bottom a) (Bottom b) a b _ValB :: forall a b (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p a (f b) -> p (Bottom a) (f (Bottom b)) @@ -819,14 +819,14 @@ forall a b. a -> Either a b Left Bottom b forall a. Bottom a -Bottom ; ValB a -x -> a -> Either (Bottom b) a +Bottom ; ValB a +x -> a -> Either (Bottom b) a forall a b. b -> Either a b Right a -x) +x) -- | t'Bottom' prism. -_Bottom :: Prism' (Bottom a) () +_Bottom :: Prism' (Bottom a) () _Bottom :: forall a (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p () (f ()) -> p (Bottom a) (f (Bottom a)) @@ -856,7 +856,7 @@ -- Nothing -- >>> Nothing ^.re _BottomMaybe -- Bottom -_BottomMaybe :: Iso' (Bottom a) (Maybe a) +_BottomMaybe :: Iso' (Bottom a) (Maybe a) _BottomMaybe :: forall a (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Maybe a) (f (Maybe a)) -> p (Bottom a) (f (Bottom a)) @@ -875,9 +875,9 @@ -- | `UnBounded a` represents the type a, together with an element -- `MaxInfinity` larger than any other element, and an element `MinInfinity`, -- smaller than any other element. -data UnBounded a = MinInfinity | Val { forall a. UnBounded a -> a -_unUnBounded :: a } | MaxInfinity - deriving (UnBounded a -> UnBounded a -> Bool +data UnBounded a = MinInfinity | Val { forall a. UnBounded a -> a +_unUnBounded :: a } | MaxInfinity + deriving (UnBounded a -> UnBounded a -> Bool (UnBounded a -> UnBounded a -> Bool) -> (UnBounded a -> UnBounded a -> Bool) -> Eq (UnBounded a) forall a. Eq a => UnBounded a -> UnBounded a -> Bool @@ -886,7 +886,7 @@ == :: UnBounded a -> UnBounded a -> Bool $c/= :: forall a. Eq a => UnBounded a -> UnBounded a -> Bool /= :: UnBounded a -> UnBounded a -> Bool -Eq,Eq (UnBounded a) +Eq,Eq (UnBounded a) Eq (UnBounded a) => (UnBounded a -> UnBounded a -> Ordering) -> (UnBounded a -> UnBounded a -> Bool) @@ -927,7 +927,7 @@ max :: UnBounded a -> UnBounded a -> UnBounded a $cmin :: forall a. Ord a => UnBounded a -> UnBounded a -> UnBounded a min :: UnBounded a -> UnBounded a -> UnBounded a -Ord,(forall a b. (a -> b) -> UnBounded a -> UnBounded b) +Ord,(forall a b. (a -> b) -> UnBounded a -> UnBounded b) -> (forall a b. a -> UnBounded b -> UnBounded a) -> Functor UnBounded forall a b. a -> UnBounded b -> UnBounded a @@ -939,7 +939,7 @@ fmap :: forall a b. (a -> b) -> UnBounded a -> UnBounded b $c<$ :: forall a b. a -> UnBounded b -> UnBounded a <$ :: forall a b. a -> UnBounded b -> UnBounded a -Functor,(forall m. Monoid m => UnBounded m -> m) +Functor,(forall m. Monoid m => UnBounded m -> m) -> (forall m a. Monoid m => (a -> m) -> UnBounded a -> m) -> (forall m a. Monoid m => (a -> m) -> UnBounded a -> m) -> (forall a b. (a -> b -> b) -> b -> UnBounded a -> b) @@ -1021,7 +1021,7 @@ sum :: forall a. Num a => UnBounded a -> a $cproduct :: forall a. Num a => UnBounded a -> a product :: forall a. Num a => UnBounded a -> a -F.Foldable,Functor UnBounded +F.Foldable,Functor UnBounded Foldable UnBounded (Functor UnBounded, Foldable UnBounded) => (forall (f :: * -> *) a b. @@ -1099,7 +1099,7 @@ -- -- >>> MaxInfinity & _Val %~ not -- MaxInfinity -_Val :: Prism (UnBounded a) (UnBounded b) a b +_Val :: Prism (UnBounded a) (UnBounded b) a b _Val :: forall a b (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p a (f b) -> p (UnBounded a) (f (UnBounded b)) @@ -1111,48 +1111,48 @@ forall a. a -> UnBounded a Val UnBounded a -> Either (UnBounded b) a forall {b} {a}. UnBounded b -> Either (UnBounded a) b -fromUnBounded +fromUnBounded where - fromUnBounded :: UnBounded b -> Either (UnBounded a) b -fromUnBounded UnBounded b + fromUnBounded :: UnBounded b -> Either (UnBounded a) b +fromUnBounded UnBounded b MinInfinity = UnBounded a -> Either (UnBounded a) b forall a b. a -> Either a b Left UnBounded a forall a. UnBounded a MinInfinity - fromUnBounded UnBounded b + fromUnBounded UnBounded b MaxInfinity = UnBounded a -> Either (UnBounded a) b forall a b. a -> Either a b Left UnBounded a forall a. UnBounded a MaxInfinity - fromUnBounded (Val b -v) = b -> Either (UnBounded a) b + fromUnBounded (Val b +v) = b -> Either (UnBounded a) b forall a b. b -> Either a b Right b -v +v -instance Show a => Show (UnBounded a) where - show :: UnBounded a -> String +instance Show a => Show (UnBounded a) where + show :: UnBounded a -> String show UnBounded a MinInfinity = String "MinInfinity" - show (Val a -x) = String + show (Val a +x) = String "Val " String -> ShowS forall a. [a] -> [a] -> [a] ++ a -> String forall a. Show a => a -> String show a -x +x show UnBounded a MaxInfinity = String "MaxInfinity" -instance Num a => Num (UnBounded a) where +instance Num a => Num (UnBounded a) where UnBounded a -MinInfinity + :: UnBounded a -> UnBounded a -> UnBounded a -+ UnBounded a +MinInfinity + :: UnBounded a -> UnBounded a -> UnBounded a ++ UnBounded a _ = UnBounded a forall a. UnBounded a MinInfinity @@ -1161,17 +1161,17 @@ MinInfinity = UnBounded a forall a. UnBounded a MinInfinity - (Val a -x) + (Val a -y) = a -> UnBounded a + (Val a +x) + (Val a +y) = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> a -> UnBounded a forall a b. (a -> b) -> a -> b $ a -x a -> a -> a +x a -> a -> a forall a. Num a => a -> a -> a + a -y +y UnBounded a _ + UnBounded a MaxInfinity = UnBounded a @@ -1185,8 +1185,8 @@ UnBounded a -MinInfinity * :: UnBounded a -> UnBounded a -> UnBounded a -* UnBounded a +MinInfinity * :: UnBounded a -> UnBounded a -> UnBounded a +* UnBounded a _ = UnBounded a forall a. UnBounded a MinInfinity @@ -1196,17 +1196,17 @@ forall a. UnBounded a MinInfinity - (Val a -x) * (Val a -y) = a -> UnBounded a + (Val a +x) * (Val a +y) = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> a -> UnBounded a forall a b. (a -> b) -> a -> b $ a -x a -> a -> a +x a -> a -> a forall a. Num a => a -> a -> a * a -y +y UnBounded a _ * UnBounded a MaxInfinity = UnBounded a @@ -1218,43 +1218,43 @@ forall a. UnBounded a MaxInfinity - abs :: UnBounded a -> UnBounded a -abs UnBounded a + abs :: UnBounded a -> UnBounded a +abs UnBounded a MinInfinity = UnBounded a forall a. UnBounded a MinInfinity - abs (Val a -x) = a -> UnBounded a + abs (Val a +x) = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> a -> UnBounded a forall a b. (a -> b) -> a -> b $ a -> a forall a. Num a => a -> a abs a -x +x abs UnBounded a MaxInfinity = UnBounded a forall a. UnBounded a MaxInfinity - signum :: UnBounded a -> UnBounded a -signum UnBounded a + signum :: UnBounded a -> UnBounded a +signum UnBounded a MinInfinity = -UnBounded a 1 - signum (Val a -x) = a -> UnBounded a + signum (Val a +x) = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> a -> UnBounded a forall a b. (a -> b) -> a -> b $ a -> a forall a. Num a => a -> a signum a -x +x signum UnBounded a MaxInfinity = UnBounded a 1 - fromInteger :: Integer -> UnBounded a + fromInteger :: Integer -> UnBounded a fromInteger = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> (Integer -> a) -> Integer -> UnBounded a @@ -1263,43 +1263,43 @@ forall a. Num a => Integer -> a fromInteger - negate :: UnBounded a -> UnBounded a + negate :: UnBounded a -> UnBounded a negate UnBounded a MinInfinity = UnBounded a forall a. UnBounded a MaxInfinity - negate (Val a -x) = a -> UnBounded a + negate (Val a +x) = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> a -> UnBounded a forall a b. (a -> b) -> a -> b $ a -> a forall a. Num a => a -> a negate a -x +x negate UnBounded a MaxInfinity = UnBounded a forall a. UnBounded a MinInfinity -instance Fractional a => Fractional (UnBounded a) where +instance Fractional a => Fractional (UnBounded a) where UnBounded a -MinInfinity / :: UnBounded a -> UnBounded a -> UnBounded a -/ UnBounded a +MinInfinity / :: UnBounded a -> UnBounded a -> UnBounded a +/ UnBounded a _ = UnBounded a forall a. UnBounded a MinInfinity - (Val a -x) / (Val a -y) = a -> UnBounded a + (Val a +x) / (Val a +y) = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> a -> UnBounded a forall a b. (a -> b) -> a -> b $ a -x a -> a -> a +x a -> a -> a forall a. Fractional a => a -> a -> a / a -y +y (Val a _) / UnBounded a _ = UnBounded a @@ -1310,7 +1310,7 @@ forall a. UnBounded a MaxInfinity - fromRational :: Rational -> UnBounded a + fromRational :: Rational -> UnBounded a fromRational = a -> UnBounded a forall a. a -> UnBounded a Val (a -> UnBounded a) -> (Rational -> a) -> Rational -> UnBounded a @@ -1327,13 +1327,13 @@ -- Nothing -- >>> unBoundedToMaybe MaxInfinity -- Nothing -unBoundedToMaybe :: UnBounded a -> Maybe a +unBoundedToMaybe :: UnBounded a -> Maybe a unBoundedToMaybe :: forall a. UnBounded a -> Maybe a -unBoundedToMaybe (Val a -x) = a -> Maybe a +unBoundedToMaybe (Val a +x) = a -> Maybe a forall a. a -> Maybe a Just a -x +x unBoundedToMaybe UnBounded a _ = Maybe a forall a. Maybe a diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.Vector.NonEmpty.Util.html b/haddocks/hgeometry-combinatorial/src/HGeometry.Vector.NonEmpty.Util.html index 7ee0745e7..e08532e78 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.Vector.NonEmpty.Util.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.Vector.NonEmpty.Util.html @@ -28,16 +28,16 @@ -------------------------------------------------------------------------------- -type instance Index (NonEmptyVector a) = Int -type instance IxValue (NonEmptyVector a) = a +type instance Index (NonEmptyVector a) = Int +type instance IxValue (NonEmptyVector a) = a -instance Ixed (NonEmptyVector a) where - ix :: Index (NonEmptyVector a) +instance Ixed (NonEmptyVector a) where + ix :: Index (NonEmptyVector a) -> Traversal' (NonEmptyVector a) (IxValue (NonEmptyVector a)) -ix Index (NonEmptyVector a) -i IxValue (NonEmptyVector a) -> f (IxValue (NonEmptyVector a)) -f (NonEmptyVector Vector a -v) = Vector a -> NonEmptyVector a +ix Index (NonEmptyVector a) +i IxValue (NonEmptyVector a) -> f (IxValue (NonEmptyVector a)) +f (NonEmptyVector Vector a +v) = Vector a -> NonEmptyVector a forall a. Vector a -> NonEmptyVector a NonEmptyVector (Vector a -> NonEmptyVector a) -> f (Vector a) -> f (NonEmptyVector a) @@ -46,17 +46,17 @@ forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix Index (Vector a) Index (NonEmptyVector a) -i IxValue (Vector a) -> f (IxValue (Vector a)) +i IxValue (Vector a) -> f (IxValue (Vector a)) IxValue (NonEmptyVector a) -> f (IxValue (NonEmptyVector a)) -f Vector a -v +f Vector a +v {-# INLINE ix #-} -instance Foldable1WithIndex Int NonEmptyVector where - ifoldMap1 :: forall m a. Semigroup m => (Int -> a -> m) -> NonEmptyVector a -> m -ifoldMap1 Int -> a -> m -f = NonEmptyVector m -> m +instance Foldable1WithIndex Int NonEmptyVector where + ifoldMap1 :: forall m a. Semigroup m => (Int -> a -> m) -> NonEmptyVector a -> m +ifoldMap1 Int -> a -> m +f = NonEmptyVector m -> m forall m. Semigroup m => NonEmptyVector m -> m forall (t :: * -> *) m. (Foldable1 t, Semigroup m) => t m -> m fold1 (NonEmptyVector m -> m) @@ -65,7 +65,7 @@ . (Int -> a -> m) -> NonEmptyVector a -> NonEmptyVector m forall a b. (Int -> a -> b) -> NonEmptyVector a -> NonEmptyVector b NonEmptyV.imap Int -> a -> m -f +f {-# INLINE ifoldMap1 #-} -- -- | ifoldMap1. This will appear in indexedtraversal as of next release -- ifoldMap1 :: Semigroup m => (Int -> a -> m) -> NonEmptyV.NonEmptyVector a -> m @@ -77,20 +77,20 @@ -- in Vector.foldr (\x' a -> f x' <> a) (f x) v' -- {-# INLINE foldMap1 #-} -instance Traversable1 NonEmptyVector where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 NonEmptyVector where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> NonEmptyVector a -> f (NonEmptyVector b) -traverse1 a -> f b -f (NonEmptyVector Vector a -v) = +traverse1 a -> f b +f (NonEmptyVector Vector a +v) = -- Get the length of the vector in /O(1)/ time - let !n :: Int -n = Vector a -> Int + let !n :: Int +n = Vector a -> Int forall a. Vector a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length Vector a -v +v -- Use fromListN to be more efficient in construction of resulting vector -- Also behaves better with compact regions, preventing runtime exceptions in Vector b -> NonEmptyVector b @@ -101,7 +101,7 @@ . Int -> [b] -> Vector b forall a. Int -> [a] -> Vector a Vector.fromListN Int -n ([b] -> Vector b) -> (NonEmpty b -> [b]) -> NonEmpty b -> Vector b +n ([b] -> Vector b) -> (NonEmpty b -> [b]) -> NonEmpty b -> Vector b forall b c a. (b -> c) -> (a -> b) -> a -> c . NonEmpty b -> [b] forall a. NonEmpty a -> [a] @@ -118,7 +118,7 @@ Apply f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) traverse1 a -> f b -f ([a] -> NonEmpty a +f ([a] -> NonEmpty a forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList ([a] -> NonEmpty a) -> [a] -> NonEmpty a forall a b. (a -> b) -> a -> b @@ -126,15 +126,15 @@ forall a. Vector a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList Vector a -v) +v) -- notice that NonEmpty.fromList is suposedly safe since the vector is NonEmpty... {-# INLINE traverse1 #-} instance FunctorWithIndex Int NonEmptyVector where - imap :: forall a b. (Int -> a -> b) -> NonEmptyVector a -> NonEmptyVector b -imap Int -> a -> b -f (NonEmptyVector Vector a -v) = Vector b -> NonEmptyVector b + imap :: forall a b. (Int -> a -> b) -> NonEmptyVector a -> NonEmptyVector b +imap Int -> a -> b +f (NonEmptyVector Vector a +v) = Vector b -> NonEmptyVector b forall a. Vector a -> NonEmptyVector a NonEmptyVector (Vector b -> NonEmptyVector b) -> Vector b -> NonEmptyVector b forall a b. (a -> b) -> a -> b @@ -144,29 +144,29 @@ FunctorWithIndex i f => (i -> a -> b) -> f a -> f b imap Int -> a -> b -f Vector a -v +f Vector a +v {-# INLINE imap #-} -instance FoldableWithIndex Int NonEmptyVector where - ifoldMap :: forall m a. Monoid m => (Int -> a -> m) -> NonEmptyVector a -> m -ifoldMap Int -> a -> m -f (NonEmptyVector Vector a -v) = (Int -> a -> m) -> Vector a -> m +instance FoldableWithIndex Int NonEmptyVector where + ifoldMap :: forall m a. Monoid m => (Int -> a -> m) -> NonEmptyVector a -> m +ifoldMap Int -> a -> m +f (NonEmptyVector Vector a +v) = (Int -> a -> m) -> Vector a -> m forall m a. Monoid m => (Int -> a -> m) -> Vector a -> m forall i (f :: * -> *) m a. (FoldableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m ifoldMap Int -> a -> m -f Vector a -v +f Vector a +v {-# INLINE ifoldMap #-} instance TraversableWithIndex Int NonEmptyVector where - itraverse :: forall (f :: * -> *) a b. + itraverse :: forall (f :: * -> *) a b. Applicative f => (Int -> a -> f b) -> NonEmptyVector a -> f (NonEmptyVector b) -itraverse Int -> a -> f b -f (NonEmptyVector Vector a -v) = Vector b -> NonEmptyVector b +itraverse Int -> a -> f b +f (NonEmptyVector Vector a +v) = Vector b -> NonEmptyVector b forall a. Vector a -> NonEmptyVector a NonEmptyVector (Vector b -> NonEmptyVector b) -> f (Vector b) -> f (NonEmptyVector b) @@ -179,7 +179,7 @@ Applicative f => (Int -> a -> f b) -> Vector a -> f (Vector b) itraverse Int -> a -> f b -f Vector a -v +f Vector a +v {-# INLINE itraverse #-}
\ No newline at end of file diff --git a/haddocks/hgeometry-combinatorial/src/HGeometry.YAML.html b/haddocks/hgeometry-combinatorial/src/HGeometry.YAML.html index b9350abc8..cf3172c5c 100644 --- a/haddocks/hgeometry-combinatorial/src/HGeometry.YAML.html +++ b/haddocks/hgeometry-combinatorial/src/HGeometry.YAML.html @@ -28,14 +28,14 @@
-------------------------------------------------------------------------------- -- | Write the output to yaml -encodeYAML :: ToYAML a => a -> ByteString +encodeYAML :: ToYAML a => a -> ByteString encodeYAML :: forall a. ToYAML a => a -> ByteString encodeYAML = a -> ByteString forall a. ToYAML a => a -> ByteString encode1Strict -- | Prints the yaml -printYAML :: ToYAML a => a -> IO () +printYAML :: ToYAML a => a -> IO () printYAML :: forall a. ToYAML a => a -> IO () printYAML = ByteString -> IO () Char8.putStrLn (ByteString -> IO ()) -> (a -> ByteString) -> a -> IO () @@ -45,14 +45,14 @@ encodeYAML -- | alias for decodeEither' from the YAML Package -decodeYAML :: FromYAML a => ByteString -> Either (Pos, String) a +decodeYAML :: FromYAML a => ByteString -> Either (Pos, String) a decodeYAML :: forall a. FromYAML a => ByteString -> Either (Pos, [Char]) a decodeYAML = ByteString -> Either (Pos, [Char]) a forall a. FromYAML a => ByteString -> Either (Pos, [Char]) a decode1Strict -- | alias for reading a yaml file -decodeYAMLFile :: FromYAML a => OsPath -> IO (Either (Pos, String) a) +decodeYAMLFile :: FromYAML a => OsPath -> IO (Either (Pos, String) a) decodeYAMLFile :: forall a. FromYAML a => OsPath -> IO (Either (Pos, [Char]) a) decodeYAMLFile = (ByteString -> Either (Pos, [Char]) a) -> IO ByteString -> IO (Either (Pos, [Char]) a) @@ -69,12 +69,12 @@ File.readFile' -- | Encode a yaml file -encodeYAMLFile :: ToYAML a => OsPath -> a -> IO () +encodeYAMLFile :: ToYAML a => OsPath -> a -> IO () encodeYAMLFile :: forall a. ToYAML a => OsPath -> a -> IO () -encodeYAMLFile OsPath -fp = OsPath -> ByteString -> IO () +encodeYAMLFile
OsPath +fp = OsPath -> ByteString -> IO () File.writeFile' OsPath -fp (ByteString -> IO ()) -> (a -> ByteString) -> a -> IO () +fp (ByteString -> IO ()) -> (a -> ByteString) -> a -> IO () forall b c a. (b -> c) -> (a -> b) -> a -> c . a -> ByteString forall a. ToYAML a => a -> ByteString @@ -83,11 +83,11 @@ -------------------------------------------------------------------------------- -- | Data type for things that have a version -data Versioned a = Versioned { forall a. Versioned a -> Version +data Versioned a = Versioned { forall a. Versioned a -> Version version :: Version , forall a. Versioned a -> a -content :: a - } deriving (Int -> Versioned a -> ShowS +content :: a + } deriving (Int -> Versioned a -> ShowS [Versioned a] -> ShowS Versioned a -> [Char] (Int -> Versioned a -> ShowS) @@ -105,7 +105,7 @@ show :: Versioned a -> [Char] $cshowList :: forall a. Show a => [Versioned a] -> ShowS showList :: [Versioned a] -> ShowS -Show,ReadPrec [Versioned a] +Show,ReadPrec [Versioned a] ReadPrec (Versioned a) Int -> ReadS (Versioned a) ReadS [Versioned a] @@ -129,7 +129,7 @@ readPrec :: ReadPrec (Versioned a) $creadListPrec :: forall a. Read a => ReadPrec [Versioned a] readListPrec :: ReadPrec [Versioned a] -Read,(forall x. Versioned a -> Rep (Versioned a) x) +Read,(forall x. Versioned a -> Rep (Versioned a) x) -> (forall x. Rep (Versioned a) x -> Versioned a) -> Generic (Versioned a) forall x. Rep (Versioned a) x -> Versioned a @@ -142,7 +142,7 @@ from :: forall x. Versioned a -> Rep (Versioned a) x $cto :: forall a x. Rep (Versioned a) x -> Versioned a to :: forall x. Rep (Versioned a) x -> Versioned a -Generic,Versioned a -> Versioned a -> Bool +Generic,Versioned a -> Versioned a -> Bool (Versioned a -> Versioned a -> Bool) -> (Versioned a -> Versioned a -> Bool) -> Eq (Versioned a) forall a. Eq a => Versioned a -> Versioned a -> Bool @@ -151,7 +151,7 @@ == :: Versioned a -> Versioned a -> Bool $c/= :: forall a. Eq a => Versioned a -> Versioned a -> Bool /= :: Versioned a -> Versioned a -> Bool -Eq,(forall a b. (a -> b) -> Versioned a -> Versioned b) +Eq,(forall a b. (a -> b) -> Versioned a -> Versioned b) -> (forall a b. a -> Versioned b -> Versioned a) -> Functor Versioned forall a b. a -> Versioned b -> Versioned a @@ -163,7 +163,7 @@ fmap :: forall a b. (a -> b) -> Versioned a -> Versioned b $c<$ :: forall a b. a -> Versioned b -> Versioned a <$ :: forall a b. a -> Versioned b -> Versioned a -Functor,(forall m. Monoid m => Versioned m -> m) +Functor,(forall m. Monoid m => Versioned m -> m) -> (forall m a. Monoid m => (a -> m) -> Versioned a -> m) -> (forall m a. Monoid m => (a -> m) -> Versioned a -> m) -> (forall a b. (a -> b -> b) -> b -> Versioned a -> b) @@ -245,7 +245,7 @@ sum :: forall a. Num a => Versioned a -> a $cproduct :: forall a. Num a => Versioned a -> a product :: forall a. Num a => Versioned a -> a -Foldable,Functor Versioned +Foldable,Functor Versioned Foldable Versioned (Functor Versioned, Foldable Versioned) => (forall (f :: * -> *) a b. @@ -311,34 +311,34 @@ Traversable) -- | Unpack versioned data type. -unversioned :: Versioned a -> a +unversioned :: Versioned a -> a unversioned :: forall a. Versioned a -> a unversioned = Versioned a -> a forall a. Versioned a -> a content -instance ToYAML a => ToYAML (Versioned a) where - toYAML :: Versioned a -> Node () -toYAML (Versioned Version -v a -x) = [Pair] -> Node () +instance ToYAML a => ToYAML (Versioned a) where + toYAML :: Versioned a -> Node () +toYAML (Versioned Version +v a +x) = [Pair] -> Node () mapping [ Text "version" Text -> Text -> Pair forall a. ToYAML a => Text -> a -> Pair .= [Char] -> Text Text.pack (Version -> [Char] showVersion Version -v) +v) , Text "content" Text -> a -> Pair forall a. ToYAML a => Text -> a -> Pair .= a -x +x ] -instance FromYAML a => FromYAML (Versioned a) where - parseYAML :: Node Pos -> Parser (Versioned a) -parseYAML = [Char] +instance FromYAML a => FromYAML (Versioned a) where + parseYAML :: Node Pos -> Parser (Versioned a) +parseYAML = [Char] -> (Mapping Pos -> Parser (Versioned a)) -> Node Pos -> Parser (Versioned a) @@ -351,8 +351,8 @@ -> Node Pos -> Parser (Versioned a) forall a b. (a -> b) -> a -> b -$ \Mapping Pos -m -> Version -> a -> Versioned a +$ \Mapping Pos +m -> Version -> a -> Versioned a forall a. Version -> a -> Versioned a Versioned (Version -> a -> Versioned a) -> Parser Version -> Parser (a -> Versioned a) @@ -361,7 +361,7 @@ unV (V -> Version) -> Parser V -> Parser Version forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Mapping Pos -m Mapping Pos -> Text -> Parser V +m Mapping Pos -> Text -> Parser V forall a. FromYAML a => Mapping Pos -> Text -> Parser a .: Text "version") @@ -369,7 +369,7 @@ forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Mapping Pos -m Mapping Pos -> Text -> Parser a +m Mapping Pos -> Text -> Parser a forall a. FromYAML a => Mapping Pos -> Text -> Parser a .: Text "content" @@ -392,8 +392,8 @@ parseVersion' :: Text.Text -> Parser V parseVersion' :: Text -> Parser V -parseVersion' Text -t = case ((Version, [Char]) -> Bool) +parseVersion' Text +t = case ((Version, [Char]) -> Bool) -> [(Version, [Char])] -> [(Version, [Char])] forall a. (a -> Bool) -> [a] -> [a] filter ([Char] -> Bool @@ -411,9 +411,9 @@ forall a b. (a -> b) -> a -> b $ Text -> [Char] Text.unpack Text -t) of - ((Version -v,[Char] +t) of + ((Version +v,[Char] ""):[(Version, [Char])] _) -> V -> Parser V forall a. a -> Parser a @@ -422,7 +422,7 @@ forall a b. (a -> b) -> a -> b $ Version -> V V Version -v +v [(Version, [Char])] _ -> [Char] -> Parser V forall a. [Char] -> Parser a @@ -435,13 +435,13 @@ <> Text -> [Char] forall a. Show a => a -> [Char] show Text -t [Char] -> ShowS +t [Char] -> ShowS forall a. Semigroup a => a -> a -> a <> [Char] " into a version failed" instance FromYAML V where - parseYAML :: Node Pos -> Parser V + parseYAML :: Node Pos -> Parser V parseYAML = [Char] -> (Text -> Parser V) -> Node Pos -> Parser V forall a. [Char] -> (Text -> Parser a) -> Node Pos -> Parser a withStr [Char] diff --git a/haddocks/hgeometry/HGeometry-ConvexHull-R3-Naive-Dual.html b/haddocks/hgeometry/HGeometry-ConvexHull-R3-Naive-Dual.html deleted file mode 100644 index 673086aaf..000000000 --- a/haddocks/hgeometry/HGeometry-ConvexHull-R3-Naive-Dual.html +++ /dev/null @@ -1 +0,0 @@ -HGeometry.ConvexHull.R3.Naive.Dual
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.ConvexHull.R3.Naive.Dual

Synopsis

Documentation

type UpperHull point = LowerEnvelope (NonVerticalHyperPlane 3 (NumType point) :+ point) Source #

upperHull :: (Point_ point 3 r, Ord r, Fractional r, Foldable1 f, Functor f, Show point, Show r, Ord point) => f point -> UpperHull point Source #

Computes the upper hull of a set of points in R^3

O(n^4)

type Facet point = [point] Source #

facets :: UpperHull point -> [Facet point] Source #

Outputs the facet sof the upper hull.

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-ConvexHull-R3-Naive.html b/haddocks/hgeometry/HGeometry-ConvexHull-R3-Naive.html deleted file mode 100644 index e7f23607f..000000000 --- a/haddocks/hgeometry/HGeometry-ConvexHull-R3-Naive.html +++ /dev/null @@ -1,15 +0,0 @@ -HGeometry.ConvexHull.R3.Naive
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.ConvexHull.R3.Naive

Description

 
Synopsis

Documentation

type ConvexHull point = [Triangle point] Source #

lowerHull' :: forall point r. (Ord r, Fractional r, Show r, Point_ point 3 r) => NonEmpty point -> ConvexHull point Source #

Computes the lower hull without its vertical triangles.

pre: The points are in general position. In particular, no four - points should be coplanar.

running time: \(O(n^4)\)

lowerHullAll :: (Ord r, Fractional r, Show r, Point_ point 3 r) => NonEmpty point -> ConvexHull point Source #

Generates a set of triangles to be used to construct a complete - convex hull. In particular, it may contain vertical triangles.

pre: The points are in general position. In particular, no four - points should be coplanar.

running time: \(O(n^4)\)

isValidTriangle :: (Num r, Ord r, Point_ point 3 r) => Triangle point -> [point] -> Maybe point Source #

Tests if this is a valid triangle for the lower envelope. That - is, if all point lie above the plane through these points. Returns - a Maybe; if the result is a Nothing the triangle is valid, if not - it returns a counter example.

>>> let t = (Triangle origin (Point3 1 0 0) (Point3 0 1 0))
->>> isValidTriangle t [Point3 5 5 0]
-Nothing
->>> let t = (Triangle origin (Point3 1 0 0) (Point3 0 1 0))
->>> isValidTriangle t [Point3 5 5 (-10)]
-Just (Point3 5 5 (-10))
-

upperHalfSpaceOf :: (Ord r, Num r, Point_ point 3 r) => Triangle point -> HalfSpace 3 r Source #

Computes the halfspace above the triangle.

>>> upperHalfSpaceOf (Triangle origin (Point3 10 0 0) (Point3 0 10 0))
-HalfSpace Positive (HyperPlane [0,0,0,-100])
-
\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Line-LowerEnvelope.html b/haddocks/hgeometry/HGeometry-Line-LowerEnvelope.html index f21de56cf..f47f49262 100644 --- a/haddocks/hgeometry/HGeometry-Line-LowerEnvelope.html +++ b/haddocks/hgeometry/HGeometry-Line-LowerEnvelope.html @@ -1,3 +1,3 @@ HGeometry.Line.LowerEnvelope
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Line.LowerEnvelope

Description

Compute the lower envelope of a set of lines. The particular algorithm used here - dualizes the lines to points, computes the upper hull, and dualizes everything back.

Synopsis

Documentation

newtype LowerEnvelopeF f vertex line Source #

The lower envelope of a set of lines

Constructors

LowerEnvelope (Alternating f vertex line) 

Instances

Instances details
Functor f => Bifunctor (LowerEnvelopeF f) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

bimap :: (a -> b) -> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d #

first :: (a -> b) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b c #

second :: (b -> c) -> LowerEnvelopeF f a b -> LowerEnvelopeF f a c #

Functor f => Functor (LowerEnvelopeF f r) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

fmap :: (a -> b) -> LowerEnvelopeF f r a -> LowerEnvelopeF f r b #

(<$) :: a -> LowerEnvelopeF f r b -> LowerEnvelopeF f r a #

(Show line, Show (f (vertex, line))) => Show (LowerEnvelopeF f vertex line) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

showsPrec :: Int -> LowerEnvelopeF f vertex line -> ShowS #

show :: LowerEnvelopeF f vertex line -> String #

showList :: [LowerEnvelopeF f vertex line] -> ShowS #

(Eq line, Eq (f (vertex, line))) => Eq (LowerEnvelopeF f vertex line) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

(==) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(/=) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(Ord line, Ord (f (vertex, line))) => Ord (LowerEnvelopeF f vertex line) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

compare :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Ordering #

(<) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(<=) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(>) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(>=) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

max :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line #

min :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line #

type LowerEnvelope = LowerEnvelopeF Vector Source #

A lower envelope, where the data structure is a vector.

_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') (Alternating f vertex line) (Alternating f' vertex' line') Source #

projection function that turns a lower envelope into an alternating "list" of lines + dualizes the lines to points, computes the upper hull, and dualizes everything back.

Synopsis

Documentation

newtype LowerEnvelopeF f vertex line Source #

The lower envelope of a set of lines

Constructors

LowerEnvelope (Alternating f vertex line) 

Instances

Instances details
Functor f => Bifunctor (LowerEnvelopeF f) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

bimap :: (a -> b) -> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d #

first :: (a -> b) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b c #

second :: (b -> c) -> LowerEnvelopeF f a b -> LowerEnvelopeF f a c #

Foldable f => Foldable (LowerEnvelopeF f vertex) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

fold :: Monoid m => LowerEnvelopeF f vertex m -> m #

foldMap :: Monoid m => (a -> m) -> LowerEnvelopeF f vertex a -> m #

foldMap' :: Monoid m => (a -> m) -> LowerEnvelopeF f vertex a -> m #

foldr :: (a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b #

foldr' :: (a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b #

foldl :: (b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b #

foldl' :: (b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b #

foldr1 :: (a -> a -> a) -> LowerEnvelopeF f vertex a -> a #

foldl1 :: (a -> a -> a) -> LowerEnvelopeF f vertex a -> a #

toList :: LowerEnvelopeF f vertex a -> [a] #

null :: LowerEnvelopeF f vertex a -> Bool #

length :: LowerEnvelopeF f vertex a -> Int #

elem :: Eq a => a -> LowerEnvelopeF f vertex a -> Bool #

maximum :: Ord a => LowerEnvelopeF f vertex a -> a #

minimum :: Ord a => LowerEnvelopeF f vertex a -> a #

sum :: Num a => LowerEnvelopeF f vertex a -> a #

product :: Num a => LowerEnvelopeF f vertex a -> a #

Functor f => Functor (LowerEnvelopeF f vertex) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

fmap :: (a -> b) -> LowerEnvelopeF f vertex a -> LowerEnvelopeF f vertex b #

(<$) :: a -> LowerEnvelopeF f vertex b -> LowerEnvelopeF f vertex a #

(Show line, Show (f (vertex, line))) => Show (LowerEnvelopeF f vertex line) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

showsPrec :: Int -> LowerEnvelopeF f vertex line -> ShowS #

show :: LowerEnvelopeF f vertex line -> String #

showList :: [LowerEnvelopeF f vertex line] -> ShowS #

(Eq line, Eq (f (vertex, line))) => Eq (LowerEnvelopeF f vertex line) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

(==) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(/=) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(Ord line, Ord (f (vertex, line))) => Ord (LowerEnvelopeF f vertex line) Source # 
Instance details

Defined in HGeometry.Line.LowerEnvelope

Methods

compare :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Ordering #

(<) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(<=) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(>) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

(>=) :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> Bool #

max :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line #

min :: LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line -> LowerEnvelopeF f vertex line #

type LowerEnvelope = LowerEnvelopeF Vector Source #

A lower envelope, where the data structure is a vector.

_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') (Alternating f vertex line) (Alternating f' vertex' line') Source #

projection function that turns a lower envelope into an alternating "list" of lines and vertices.

lowerEnvelope :: forall g f line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, Functor f, IsIntersectableWith line line, Intersection line line ~ Maybe (LineLineIntersection line), HasFromFoldable g) => f line -> LowerEnvelopeF g (Point 2 r) line Source #

Computes the lower envelope of a set of \(n\) lines.

pre: the input is a set (so no duplicates)

running time: \(O(n\log n)\)

lineAt :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> line Source #

Commputes the line directly above the query point x

lookupLEVertex :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line) Source #

returns the rightmost vertex v for which v_x < x.

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html deleted file mode 100644 index d2acee5e7..000000000 --- a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-AdjListForm.html +++ /dev/null @@ -1,7 +0,0 @@ -HGeometry.Plane.LowerEnvelope.AdjListForm
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.AdjListForm

Description

A Representation of the Lower envelope of planes in Adjacency-list - form.

Synopsis

Documentation

data LowerEnvelope plane Source #

The lower enevelope of planes in R^3. (Or rather, its minimization diagram)

Instances

Instances details
(Show plane, Show (NumType plane)) => Show (LowerEnvelope plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

Methods

showsPrec :: Int -> LowerEnvelope plane -> ShowS #

show :: LowerEnvelope plane -> String #

showList :: [LowerEnvelope plane] -> ShowS #

(Eq plane, Eq (NumType plane)) => Eq (LowerEnvelope plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

Methods

(==) :: LowerEnvelope plane -> LowerEnvelope plane -> Bool #

(/=) :: LowerEnvelope plane -> LowerEnvelope plane -> Bool #

type Dimension (LowerEnvelope plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

type Dimension (LowerEnvelope plane) = 3
type NumType (LowerEnvelope plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

type NumType (LowerEnvelope plane) = NumType plane

data LowerEnvelope' plane Source #

A connected lower envelope in adjacencylist form.

invariant: there is always at least one bounded vertex.

Constructors

LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane)) 

Instances

Instances details
(Show plane, Show (NumType plane)) => Show (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

showsPrec :: Int -> LowerEnvelope' plane -> ShowS #

show :: LowerEnvelope' plane -> String #

showList :: [LowerEnvelope' plane] -> ShowS #

(Eq plane, Eq (NumType plane)) => Eq (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

(==) :: LowerEnvelope' plane -> LowerEnvelope' plane -> Bool #

(/=) :: LowerEnvelope' plane -> LowerEnvelope' plane -> Bool #

(Ord (NumType plane), Num (NumType plane)) => IsBoxable (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (LowerEnvelope' plane), r ~ NumType (LowerEnvelope' plane), Ord r) => LowerEnvelope' plane -> Box (Point d r)

HasDarts' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type DartIx (LowerEnvelope' plane) Source #

type Dart (LowerEnvelope' plane) Source #

HasEdges' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type Edge (LowerEnvelope' plane) Source #

type EdgeIx (LowerEnvelope' plane) Source #

HasVertices' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type Vertex (LowerEnvelope' plane) Source #

type VertexIx (LowerEnvelope' plane) Source #

HasUnboundedEdges (LowerEnvelope' plane) (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

unboundedEdges :: Lens' (LowerEnvelope' plane) (Seq (LEEdge plane)) Source #

HasDarts (LowerEnvelope' plane) (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasEdges (LowerEnvelope' plane) (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasVertices (LowerEnvelope' plane) (LowerEnvelope' plane') Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dimension (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dimension (LowerEnvelope' plane) = 3
type NumType (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type NumType (LowerEnvelope' plane) = NumType plane
type Dart (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dart (LowerEnvelope' plane) = LEEdge plane
type DartIx (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Edge (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Edge (LowerEnvelope' plane) = LEEdge plane
type EdgeIx (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Vertex (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Vertex (LowerEnvelope' plane)
type VertexIx (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

data ParallelPlane plane Source #

Just a newtype around plane, to be used to model parallel strips in the Lower envelope.

Instances

Instances details
Show plane => Show (ParallelPlane plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

Methods

showsPrec :: Int -> ParallelPlane plane -> ShowS #

show :: ParallelPlane plane -> String #

showList :: [ParallelPlane plane] -> ShowS #

Eq plane => Eq (ParallelPlane plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

Methods

(==) :: ParallelPlane plane -> ParallelPlane plane -> Bool #

(/=) :: ParallelPlane plane -> ParallelPlane plane -> Bool #

Wrapped (ParallelPlane plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

Associated Types

type Unwrapped (ParallelPlane plane) Source #

type Unwrapped (ParallelPlane plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.AdjListForm

type Unwrapped (ParallelPlane plane) = plane

theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane) Source #

lens to access the unbounded vertex

boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane)) Source #

Lens to access the sequence of bounded vertices.

singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane Source #

Given a single Vertex, construct a LowerEnvelope' out of it.

fromVertexForm :: forall f plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r, Foldable1 f) => f plane -> VertexForm plane -> LowerEnvelope plane Source #

Given a Lower envelope in vertex form, construct the AdjacencyList representation out - of it.

\(O(n\log n)\)

data BoundedVertexF f plane Source #

Data type representing the bounded vertices of the lower - envelope.

In the vertexform, the f will be Const (), i.e. we don't have - adjacency information. But in case of Adjacencylist form we can - implement it using a Sequence.

Constructors

Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane)) 

Instances

Instances details
(Show plane, Show (NumType plane), Show (f (LEEdge plane))) => Show (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

showsPrec :: Int -> BoundedVertexF f plane -> ShowS #

show :: BoundedVertexF f plane -> String #

showList :: [BoundedVertexF f plane] -> ShowS #

(Eq plane, Eq (NumType plane), Eq (f (LEEdge plane))) => Eq (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

(==) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

(/=) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r) Source #

The location of the vertex

definers :: Lens' (BoundedVertexF f plane) (Set plane) Source #

The three planes defining the vertex

location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r) Source #

Projected 2d location of the point

newtype UnboundedVertex plane Source #

The unbounded vertex.

Constructors

UnboundedVertex (Seq (LEEdge plane)) 

Instances

Instances details
Foldable UnboundedVertex Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

fold :: Monoid m => UnboundedVertex m -> m #

foldMap :: Monoid m => (a -> m) -> UnboundedVertex a -> m #

foldMap' :: Monoid m => (a -> m) -> UnboundedVertex a -> m #

foldr :: (a -> b -> b) -> b -> UnboundedVertex a -> b #

foldr' :: (a -> b -> b) -> b -> UnboundedVertex a -> b #

foldl :: (b -> a -> b) -> b -> UnboundedVertex a -> b #

foldl' :: (b -> a -> b) -> b -> UnboundedVertex a -> b #

foldr1 :: (a -> a -> a) -> UnboundedVertex a -> a #

foldl1 :: (a -> a -> a) -> UnboundedVertex a -> a #

toList :: UnboundedVertex a -> [a] #

null :: UnboundedVertex a -> Bool #

length :: UnboundedVertex a -> Int #

elem :: Eq a => a -> UnboundedVertex a -> Bool #

maximum :: Ord a => UnboundedVertex a -> a #

minimum :: Ord a => UnboundedVertex a -> a #

sum :: Num a => UnboundedVertex a -> a #

product :: Num a => UnboundedVertex a -> a #

Traversable UnboundedVertex Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

traverse :: Applicative f => (a -> f b) -> UnboundedVertex a -> f (UnboundedVertex b) #

sequenceA :: Applicative f => UnboundedVertex (f a) -> f (UnboundedVertex a) #

mapM :: Monad m => (a -> m b) -> UnboundedVertex a -> m (UnboundedVertex b) #

sequence :: Monad m => UnboundedVertex (m a) -> m (UnboundedVertex a) #

Functor UnboundedVertex Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

fmap :: (a -> b) -> UnboundedVertex a -> UnboundedVertex b #

(<$) :: a -> UnboundedVertex b -> UnboundedVertex a #

Show plane => Show (UnboundedVertex plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Eq plane => Eq (UnboundedVertex plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

(==) :: UnboundedVertex plane -> UnboundedVertex plane -> Bool #

(/=) :: UnboundedVertex plane -> UnboundedVertex plane -> Bool #

unboundedVertexId :: VertexID Source #

The vertexID of the unbounded vertex

class HasUnboundedEdges t e | t -> e where Source #

Methods

unboundedEdges :: Lens' t (Seq e) Source #

Lens to access the unbounded edges.

Instances

Instances details
HasUnboundedEdges (LowerEnvelope' plane) (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

unboundedEdges :: Lens' (LowerEnvelope' plane) (Seq (LEEdge plane)) Source #

type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point) Source #

Edges are either halflines or Linesegments

projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r)) Source #

Get the projected geometries (halflines and edges line segments ) representing the - edges.

projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r) Source #

Computes the (projected) LineSegment or HalfLine representing a given edge.

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html index d5c583e22..cc24f9826 100644 --- a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html +++ b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected-Graph.html @@ -1,3 +1,3 @@ -HGeometry.Plane.LowerEnvelope.Connected.Graph
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.Connected.Graph

Description

A Representation of the Lower envelope of planes as a bunch of convex regions

Synopsis

Documentation

type PlaneGraph k v e = Map k (Map e k, v) Source #

A Plane graph storing vertices of type v that are identified by keys of type k, and - some ordered sequence of edges (which are ordered using e).

newtype E r Source #

Constructors

E (Vector 2 r) 

Instances

Instances details
Show r => Show (E r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Graph

Methods

showsPrec :: Int -> E r -> ShowS #

show :: E r -> String #

showList :: [E r] -> ShowS #

(Ord r, Num r) => Eq (E r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Graph

Methods

(==) :: E r -> E r -> Bool #

(/=) :: E r -> E r -> Bool #

(Ord r, Num r) => Ord (E r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Graph

Methods

compare :: E r -> E r -> Ordering #

(<) :: E r -> E r -> Bool #

(<=) :: E r -> E r -> Bool #

(>) :: E r -> E r -> Bool #

(>=) :: E r -> E r -> Bool #

max :: E r -> E r -> E r #

min :: E r -> E r -> E r #

toPlaneGraph :: (Plane_ plane r, Num r, Ord r) => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r) Source #

Produce a triangulated plane graph on the bounded vertices. every vertex is +HGeometry.Plane.LowerEnvelope.Connected.Graph

Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.Connected.Graph

Description

A Representation of the Lower envelope of planes as a bunch of convex regions

Synopsis

Documentation

type PlaneGraph k v e = Map k (Map e k, v) Source #

A Plane graph storing vertices of type v that are identified by keys of type k, and + some ordered sequence of edges (which are ordered using e).

newtype E r Source #

Constructors

E (Vector 2 r) 

Instances

Instances details
Show r => Show (E r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Graph

Methods

showsPrec :: Int -> E r -> ShowS #

show :: E r -> String #

showList :: [E r] -> ShowS #

(Ord r, Num r) => Eq (E r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Graph

Methods

(==) :: E r -> E r -> Bool #

(/=) :: E r -> E r -> Bool #

(Ord r, Num r) => Ord (E r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Graph

Methods

compare :: E r -> E r -> Ordering #

(<) :: E r -> E r -> Bool #

(<=) :: E r -> E r -> Bool #

(>) :: E r -> E r -> Bool #

(>=) :: E r -> E r -> Bool #

max :: E r -> E r -> E r #

min :: E r -> E r -> E r #

toPlaneGraph :: (Plane_ plane r, Num r, Ord r) => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r) Source #

Produce a triangulated plane graph on the bounded vertices. every vertex is represented by its point, it stores a list of its outgoing edges, and some data.

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html index 3190a0bcd..38c468285 100644 --- a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html +++ b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Connected.html @@ -1,7 +1,12 @@ -HGeometry.Plane.LowerEnvelope.Connected
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.Connected

Description

A Representation of the Lower envelope of planes in Adjacency-list - form.

Synopsis

Documentation

data LowerEnvelope' plane Source #

A connected lower envelope in adjacencylist form.

invariant: there is always at least one bounded vertex.

Constructors

LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane)) 

Instances

Instances details
(Show plane, Show (NumType plane)) => Show (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

showsPrec :: Int -> LowerEnvelope' plane -> ShowS #

show :: LowerEnvelope' plane -> String #

showList :: [LowerEnvelope' plane] -> ShowS #

(Eq plane, Eq (NumType plane)) => Eq (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

(==) :: LowerEnvelope' plane -> LowerEnvelope' plane -> Bool #

(/=) :: LowerEnvelope' plane -> LowerEnvelope' plane -> Bool #

(Ord (NumType plane), Num (NumType plane)) => IsBoxable (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (LowerEnvelope' plane), r ~ NumType (LowerEnvelope' plane), Ord r) => LowerEnvelope' plane -> Box (Point d r)

HasDarts' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type DartIx (LowerEnvelope' plane) Source #

type Dart (LowerEnvelope' plane) Source #

HasEdges' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type Edge (LowerEnvelope' plane) Source #

type EdgeIx (LowerEnvelope' plane) Source #

HasVertices' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type Vertex (LowerEnvelope' plane) Source #

type VertexIx (LowerEnvelope' plane) Source #

HasUnboundedEdges (LowerEnvelope' plane) (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

unboundedEdges :: Lens' (LowerEnvelope' plane) (Seq (LEEdge plane)) Source #

HasDarts (LowerEnvelope' plane) (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasEdges (LowerEnvelope' plane) (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasVertices (LowerEnvelope' plane) (LowerEnvelope' plane') Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dimension (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dimension (LowerEnvelope' plane) = 3
type NumType (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type NumType (LowerEnvelope' plane) = NumType plane
type Dart (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dart (LowerEnvelope' plane) = LEEdge plane
type DartIx (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Edge (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Edge (LowerEnvelope' plane) = LEEdge plane
type EdgeIx (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Vertex (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Vertex (LowerEnvelope' plane)
type VertexIx (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane) Source #

lens to access the unbounded vertex

boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane)) Source #

Lens to access the sequence of bounded vertices.

singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane Source #

Given a single Vertex, construct a LowerEnvelope' out of it.

fromVertexForm' :: forall plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r) => VertexForm plane -> LowerEnvelope' plane Source #

Given a Lower envelope in vertex form, construct the AdjacencyList representation out - of it.

pre: The set of vertices is non-empty

\(O(n\log n)\)

data BoundedVertexF f plane Source #

Data type representing the bounded vertices of the lower - envelope.

In the vertexform, the f will be Const (), i.e. we don't have - adjacency information. But in case of Adjacencylist form we can - implement it using a Sequence.

Constructors

Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane)) 

Instances

Instances details
(Show plane, Show (NumType plane), Show (f (LEEdge plane))) => Show (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

showsPrec :: Int -> BoundedVertexF f plane -> ShowS #

show :: BoundedVertexF f plane -> String #

showList :: [BoundedVertexF f plane] -> ShowS #

(Eq plane, Eq (NumType plane), Eq (f (LEEdge plane))) => Eq (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

(==) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

(/=) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r) Source #

The location of the vertex

definers :: Lens' (BoundedVertexF f plane) (Set plane) Source #

The three planes defining the vertex

location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r) Source #

Projected 2d location of the point

newtype UnboundedVertex plane Source #

The unbounded vertex.

Constructors

UnboundedVertex (Seq (LEEdge plane)) 

Instances

Instances details
Foldable UnboundedVertex Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

fold :: Monoid m => UnboundedVertex m -> m #

foldMap :: Monoid m => (a -> m) -> UnboundedVertex a -> m #

foldMap' :: Monoid m => (a -> m) -> UnboundedVertex a -> m #

foldr :: (a -> b -> b) -> b -> UnboundedVertex a -> b #

foldr' :: (a -> b -> b) -> b -> UnboundedVertex a -> b #

foldl :: (b -> a -> b) -> b -> UnboundedVertex a -> b #

foldl' :: (b -> a -> b) -> b -> UnboundedVertex a -> b #

foldr1 :: (a -> a -> a) -> UnboundedVertex a -> a #

foldl1 :: (a -> a -> a) -> UnboundedVertex a -> a #

toList :: UnboundedVertex a -> [a] #

null :: UnboundedVertex a -> Bool #

length :: UnboundedVertex a -> Int #

elem :: Eq a => a -> UnboundedVertex a -> Bool #

maximum :: Ord a => UnboundedVertex a -> a #

minimum :: Ord a => UnboundedVertex a -> a #

sum :: Num a => UnboundedVertex a -> a #

product :: Num a => UnboundedVertex a -> a #

Traversable UnboundedVertex Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

traverse :: Applicative f => (a -> f b) -> UnboundedVertex a -> f (UnboundedVertex b) #

sequenceA :: Applicative f => UnboundedVertex (f a) -> f (UnboundedVertex a) #

mapM :: Monad m => (a -> m b) -> UnboundedVertex a -> m (UnboundedVertex b) #

sequence :: Monad m => UnboundedVertex (m a) -> m (UnboundedVertex a) #

Functor UnboundedVertex Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

fmap :: (a -> b) -> UnboundedVertex a -> UnboundedVertex b #

(<$) :: a -> UnboundedVertex b -> UnboundedVertex a #

Show plane => Show (UnboundedVertex plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Eq plane => Eq (UnboundedVertex plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

(==) :: UnboundedVertex plane -> UnboundedVertex plane -> Bool #

(/=) :: UnboundedVertex plane -> UnboundedVertex plane -> Bool #

unboundedVertexId :: VertexID Source #

The vertexID of the unbounded vertex

class HasUnboundedEdges t e | t -> e where Source #

Methods

unboundedEdges :: Lens' t (Seq e) Source #

Lens to access the unbounded edges.

Instances

Instances details
HasUnboundedEdges (LowerEnvelope' plane) (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

unboundedEdges :: Lens' (LowerEnvelope' plane) (Seq (LEEdge plane)) Source #

type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point) Source #

Edges are either halflines or Linesegments

projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r)) Source #

Get the projected geometries (halflines and edges line segments ) representing the - edges.

projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r) Source #

Computes the (projected) LineSegment or HalfLine representing a given edge.

\ No newline at end of file +HGeometry.Plane.LowerEnvelope.Connected
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.Connected

Description

A Representation of the Lower envelope of planes as a bunch of convex regions

Synopsis

Documentation

data MinimizationDiagram r plane Source #

A minimization daigram just maps every plane on the lower envelope to the region + above which it is minimal. Every plane has at most one such a region.

Instances

Instances details
CFunctor (MinimizationDiagram r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Constrained (MinimizationDiagram r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type Dom (MinimizationDiagram r) a Source #

(Show plane, Show r) => Show (MinimizationDiagram r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

(Eq plane, Eq r) => Eq (MinimizationDiagram r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

(==) :: MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool #

(/=) :: MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool #

type Dom (MinimizationDiagram r) plane Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dom (MinimizationDiagram r) plane = (Ord plane, NumType plane ~ r)
type Dimension (MinimizationDiagram r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dimension (MinimizationDiagram r plane) = 2
type NumType (MinimizationDiagram r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type NumType (MinimizationDiagram r plane) = r

asMap :: MinimizationDiagram r plane -> Map plane (Region r (Point 2 r)) Source #

Get the underlying Map that relates every plane in the envelope to its projected region

data Region r point Source #

A region in the minimization diagram. The boundary is given in CCW order; i.e. the + region is to the left of the boundary.

Constructors

Bounded (CircularList point) 
Unbounded 

Fields

  • (Vector 2 r)

    vector indicating the direction of the unbounded edge + incident to the first vertex. Note that this vector + thus points INTO vertex v.

  • (NonEmpty point)

    the vertices in CCW order,

  • (Vector 2 r)

    the vector indicating the direction of the unbounded + edge incident to the last vertex. The vector points + away from the vertex (i.e. towards +infty).

Instances

Instances details
Foldable (Region r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

fold :: Monoid m => Region r m -> m #

foldMap :: Monoid m => (a -> m) -> Region r a -> m #

foldMap' :: Monoid m => (a -> m) -> Region r a -> m #

foldr :: (a -> b -> b) -> b -> Region r a -> b #

foldr' :: (a -> b -> b) -> b -> Region r a -> b #

foldl :: (b -> a -> b) -> b -> Region r a -> b #

foldl' :: (b -> a -> b) -> b -> Region r a -> b #

foldr1 :: (a -> a -> a) -> Region r a -> a #

foldl1 :: (a -> a -> a) -> Region r a -> a #

toList :: Region r a -> [a] #

null :: Region r a -> Bool #

length :: Region r a -> Int #

elem :: Eq a => a -> Region r a -> Bool #

maximum :: Ord a => Region r a -> a #

minimum :: Ord a => Region r a -> a #

sum :: Num a => Region r a -> a #

product :: Num a => Region r a -> a #

Traversable (Region r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

traverse :: Applicative f => (a -> f b) -> Region r a -> f (Region r b) #

sequenceA :: Applicative f => Region r (f a) -> f (Region r a) #

mapM :: Monad m => (a -> m b) -> Region r a -> m (Region r b) #

sequence :: Monad m => Region r (m a) -> m (Region r a) #

Functor (Region r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

fmap :: (a -> b) -> Region r a -> Region r b #

(<$) :: a -> Region r b -> Region r a #

(Show point, Show r) => Show (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

showsPrec :: Int -> Region r point -> ShowS #

show :: Region r point -> String #

showList :: [Region r point] -> ShowS #

(Eq point, Eq r) => Eq (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

(==) :: Region r point -> Region r point -> Bool #

(/=) :: Region r point -> Region r point -> Bool #

type Dimension (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type Dimension (Region r point) = Dimension point
type NumType (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

type NumType (Region r point) = r

type CircularList a = [a] Source #

bounded regions are really circular lists, but we just represent them as lists for + now.

intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r) Source #

Computes there the three planes intersect

intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r) Source #

Given two planes, computes the line in which they intersect.

intersectionVector :: (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) Source #

Computes the direction vector v of the directed line l in which the two planes h and h' + intersect, and so that h will be to the left of the directed line

fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) => VertexForm r plane -> MinimizationDiagram r plane Source #

Given the vertices of the lower envelope; compute the minimization diagram.

\(O(h\log h)\) assuming that the input is degenerate.

data Definers plane Source #

in CCW order, starting with the plane that is minimal at the vertical up direction + from their common vertex.

Instances

Instances details
Foldable Definers Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.VertexForm

Methods

fold :: Monoid m => Definers m -> m #

foldMap :: Monoid m => (a -> m) -> Definers a -> m #

foldMap' :: Monoid m => (a -> m) -> Definers a -> m #

foldr :: (a -> b -> b) -> b -> Definers a -> b #

foldr' :: (a -> b -> b) -> b -> Definers a -> b #

foldl :: (b -> a -> b) -> b -> Definers a -> b #

foldl' :: (b -> a -> b) -> b -> Definers a -> b #

foldr1 :: (a -> a -> a) -> Definers a -> a #

foldl1 :: (a -> a -> a) -> Definers a -> a #

toList :: Definers a -> [a] #

null :: Definers a -> Bool #

length :: Definers a -> Int #

elem :: Eq a => a -> Definers a -> Bool #

maximum :: Ord a => Definers a -> a #

minimum :: Ord a => Definers a -> a #

sum :: Num a => Definers a -> a #

product :: Num a => Definers a -> a #

Functor Definers Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.VertexForm

Methods

fmap :: (a -> b) -> Definers a -> Definers b #

(<$) :: a -> Definers b -> Definers a #

Show plane => Show (Definers plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.VertexForm

Methods

showsPrec :: Int -> Definers plane -> ShowS #

show :: Definers plane -> String #

showList :: [Definers plane] -> ShowS #

Eq plane => Eq (Definers plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.VertexForm

Methods

(==) :: Definers plane -> Definers plane -> Bool #

(/=) :: Definers plane -> Definers plane -> Bool #

Ord plane => Ord (Definers plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.VertexForm

Methods

compare :: Definers plane -> Definers plane -> Ordering #

(<) :: Definers plane -> Definers plane -> Bool #

(<=) :: Definers plane -> Definers plane -> Bool #

(>) :: Definers plane -> Definers plane -> Bool #

(>=) :: Definers plane -> Definers plane -> Bool #

max :: Definers plane -> Definers plane -> Definers plane #

min :: Definers plane -> Definers plane -> Definers plane #

fromCCWList :: [plane] -> Definers plane Source #

Given the planes in order, starting with the one that is closest in the up direction, + construct the Definers.

definers :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r, Definers plane) Source #

Smart constructor for creating the definers of three planes

mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane Source #

Merge two lists of definers.

O(n^2), since we are using incremental insertion.

type VertexForm r plane = Map (Point 3 r) (Definers plane) Source #

The vertices of a lower envelope is just a Map with every vertex its definers, + i.e. the planes that define the vertex in CCW order around it.

bruteForceLowerEnvelope :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> MinimizationDiagram r plane Source #

Computes the lower envelope in O(n^4) time.

computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane Source #

Computes the vertices of the lower envelope

O(n^4) time.

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html deleted file mode 100644 index 8f8a402b7..000000000 --- a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-ConnectedNew.html +++ /dev/null @@ -1,12 +0,0 @@ -HGeometry.Plane.LowerEnvelope.ConnectedNew
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.ConnectedNew

Description

A Representation of the Lower envelope of planes as a bunch of convex regions

Synopsis

Documentation

intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r) Source #

Computes there the three planes intersect

intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r) Source #

Given two planes, computes the line in which they intersect.

intersectionVector :: (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) Source #

Computes the direction vector v of the directed line l in which the two planes h and h' - intersect, and so that h will be to the left of the directed line

type MinimizationDiagram r plane = Map plane (Region r (Point 2 r)) Source #

A minimization daigram just maps every plane on the lower envelope to the region - above which it is minimal. Every plane has at most one such a region.

data Region r point Source #

A region in the minimization diagram. The boundary is given in CCW order; i.e. the - region is to the left of the boundary.

Constructors

Bounded (CircularList point) 
Unbounded 

Fields

  • (Vector 2 r)

    vector indicating the direction of the unbounded edge - incident to the first vertex. Note that this vector - thus points INTO vertex v.

  • (NonEmpty point)

    the vertices in CCW order,

  • (Vector 2 r)

    the vector indicating the direction of the unbounded - edge incident to the last vertex. The vector points - away from the vertex (i.e. towards +infty).

Instances

Instances details
Foldable (Region r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

fold :: Monoid m => Region r m -> m #

foldMap :: Monoid m => (a -> m) -> Region r a -> m #

foldMap' :: Monoid m => (a -> m) -> Region r a -> m #

foldr :: (a -> b -> b) -> b -> Region r a -> b #

foldr' :: (a -> b -> b) -> b -> Region r a -> b #

foldl :: (b -> a -> b) -> b -> Region r a -> b #

foldl' :: (b -> a -> b) -> b -> Region r a -> b #

foldr1 :: (a -> a -> a) -> Region r a -> a #

foldl1 :: (a -> a -> a) -> Region r a -> a #

toList :: Region r a -> [a] #

null :: Region r a -> Bool #

length :: Region r a -> Int #

elem :: Eq a => a -> Region r a -> Bool #

maximum :: Ord a => Region r a -> a #

minimum :: Ord a => Region r a -> a #

sum :: Num a => Region r a -> a #

product :: Num a => Region r a -> a #

Traversable (Region r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

traverse :: Applicative f => (a -> f b) -> Region r a -> f (Region r b) #

sequenceA :: Applicative f => Region r (f a) -> f (Region r a) #

mapM :: Monad m => (a -> m b) -> Region r a -> m (Region r b) #

sequence :: Monad m => Region r (m a) -> m (Region r a) #

Functor (Region r) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

fmap :: (a -> b) -> Region r a -> Region r b #

(<$) :: a -> Region r b -> Region r a #

(Show point, Show r) => Show (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

showsPrec :: Int -> Region r point -> ShowS #

show :: Region r point -> String #

showList :: [Region r point] -> ShowS #

(Eq point, Eq r) => Eq (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

(==) :: Region r point -> Region r point -> Bool #

(/=) :: Region r point -> Region r point -> Bool #

type Dimension (MinimizationDiagram r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

type Dimension (MinimizationDiagram r plane) = 2
type Dimension (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

type Dimension (Region r point) = Dimension point
type NumType (MinimizationDiagram r plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

type NumType (MinimizationDiagram r plane) = r
type NumType (Region r point) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

type NumType (Region r point) = r

type CircularList a = [a] Source #

bounded regions are really circular lists, but we just represent them as lists for - now.

fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) => VertexForm r plane -> MinimizationDiagram r plane Source #

Given the vertices of the lower envelope; compute the minimization diagram.

\(O(h\log h)\) assuming that the input is degenerate.

data Definers plane Source #

in CCW order, starting with the plane that is minimal at the vertical up direction - from their common vertex.

Instances

Instances details
Foldable Definers Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

fold :: Monoid m => Definers m -> m #

foldMap :: Monoid m => (a -> m) -> Definers a -> m #

foldMap' :: Monoid m => (a -> m) -> Definers a -> m #

foldr :: (a -> b -> b) -> b -> Definers a -> b #

foldr' :: (a -> b -> b) -> b -> Definers a -> b #

foldl :: (b -> a -> b) -> b -> Definers a -> b #

foldl' :: (b -> a -> b) -> b -> Definers a -> b #

foldr1 :: (a -> a -> a) -> Definers a -> a #

foldl1 :: (a -> a -> a) -> Definers a -> a #

toList :: Definers a -> [a] #

null :: Definers a -> Bool #

length :: Definers a -> Int #

elem :: Eq a => a -> Definers a -> Bool #

maximum :: Ord a => Definers a -> a #

minimum :: Ord a => Definers a -> a #

sum :: Num a => Definers a -> a #

product :: Num a => Definers a -> a #

Functor Definers Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

fmap :: (a -> b) -> Definers a -> Definers b #

(<$) :: a -> Definers b -> Definers a #

Show plane => Show (Definers plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

showsPrec :: Int -> Definers plane -> ShowS #

show :: Definers plane -> String #

showList :: [Definers plane] -> ShowS #

Eq plane => Eq (Definers plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

(==) :: Definers plane -> Definers plane -> Bool #

(/=) :: Definers plane -> Definers plane -> Bool #

Ord plane => Ord (Definers plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Regions

Methods

compare :: Definers plane -> Definers plane -> Ordering #

(<) :: Definers plane -> Definers plane -> Bool #

(<=) :: Definers plane -> Definers plane -> Bool #

(>) :: Definers plane -> Definers plane -> Bool #

(>=) :: Definers plane -> Definers plane -> Bool #

max :: Definers plane -> Definers plane -> Definers plane #

min :: Definers plane -> Definers plane -> Definers plane #

fromCCWList :: [plane] -> Definers plane Source #

Given the planes in order, starting with the one that is closest in the up direction, - construct the Definers.

definers :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r, Definers plane) Source #

Smart constructor for creating the definers of three planes

mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane Source #

Merge two lists of definers.

O(n^2), since we are using incremental insertion.

type VertexForm r plane = Map (Point 3 r) (Definers plane) Source #

The vertices of a lower envelope is just a Map with every vertex its definers, - i.e. the planes that define the vertex in CCW order around it.

bruteForceLowerEnvelope :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> MinimizationDiagram r plane Source #

Computes the lower envelope in O(n^4) time.

computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane Source #

Computes the vertices of the lower envelope

O(n^4) time.

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html index c1bc2b471..ff1a37012 100644 --- a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html +++ b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-Naive.html @@ -1,5 +1,6 @@ -HGeometry.Plane.LowerEnvelope.Naive
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.Naive

Synopsis

Documentation

lowerEnvelope :: (Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f, Ord plane, Show plane, Show r) => f plane -> LowerEnvelope plane Source #

Brute force implementation that computes the lower envelope, by explicitly - considering every triple of planes.

pre: the input forms a *set* of planes, i.e. no duplicates

running time: \(O(n^4 )\)

lowerEnvelopeVertexForm :: (Plane_ plane r, Ord r, Fractional r, Foldable f, Ord plane) => f plane -> VertexForm plane Source #

Brute force implementation that computes the vertex form of the - lower envelope, by explicitly considering every triple of planes.

pre: the input forms a *set* of planes, i.e. no duplicates

general position assumptions: None. Though keep in mind that - e.g. if all planes are parallel there are no vertices.

running time: \(O(n^4 )\)

asVertex :: (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) => f plane -> Three plane -> Maybe (LEVertex plane) Source #

Given all planes, and a triple, computes if the triple defines a - vertex of the lower envelope, and if so returns it.

belowAll :: (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool Source #

test if v lies below (or on) all the planes in hs

\ No newline at end of file +HGeometry.Plane.LowerEnvelope.Naive
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.Naive

Synopsis

Documentation

lowerEnvelope :: (Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f, Ord plane, Show plane, Show r) => f plane -> LowerEnvelope plane Source #

Brute force implementation that computes the lower envelope, by explicitly + considering every triple of planes.

pre: the input forms a *set* of planes, i.e. no duplicates

running time: \(O(n^4 )\)

lowerEnvelopeWith :: forall nonEmpty plane r. (Plane_ plane r, Ord r, Fractional r, Foldable1 nonEmpty) => (NonEmpty plane -> MinimizationDiagram r plane) -> nonEmpty plane -> LowerEnvelope plane Source #

Computes the lower envelope of the planes; possibly using the given function to + construct the minimization diagram.

In particular, we distinguish whether the planes define a connected lower envelope + (in that case, we actually call the algorithm on it). Or that the planes are degenerate + and are all parallel and thus define parallel strips. In that case, we use a two dimensional + lower envelope algorithm to compute the lower envelope of the (parallel) planes.

\(O(T(n) + n \log n)\).

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html deleted file mode 100644 index bc426cada..000000000 --- a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope-VertexForm.html +++ /dev/null @@ -1,6 +0,0 @@ -HGeometry.Plane.LowerEnvelope.VertexForm
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope.VertexForm

Description

A Representation of the Lower envelope of planes in vertex form; - i.e. storing only the vertices.

Synopsis

Documentation

newtype VertexForm plane Source #

The lower envelope in vertex form

Constructors

VertexForm (Map (Point 3 (NumType plane)) (Definers plane)) 

Instances

Instances details
(Ord (NumType plane), Ord plane) => Monoid (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

Methods

mempty :: VertexForm plane #

mappend :: VertexForm plane -> VertexForm plane -> VertexForm plane #

mconcat :: [VertexForm plane] -> VertexForm plane #

(Ord (NumType plane), Ord plane) => Semigroup (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

Methods

(<>) :: VertexForm plane -> VertexForm plane -> VertexForm plane #

sconcat :: NonEmpty (VertexForm plane) -> VertexForm plane #

stimes :: Integral b => b -> VertexForm plane -> VertexForm plane #

(Show plane, Show (NumType plane)) => Show (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

Methods

showsPrec :: Int -> VertexForm plane -> ShowS #

show :: VertexForm plane -> String #

showList :: [VertexForm plane] -> ShowS #

(Eq plane, Eq (NumType plane)) => Eq (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

Methods

(==) :: VertexForm plane -> VertexForm plane -> Bool #

(/=) :: VertexForm plane -> VertexForm plane -> Bool #

Ord (NumType plane) => HasVertices' (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

Associated Types

type Vertex (VertexForm plane) Source #

type VertexIx (VertexForm plane) Source #

type Vertex (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

type Vertex (VertexForm plane) = Definers plane
type VertexIx (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

type VertexIx (VertexForm plane) = Point 3 (NumType plane)

hasVertices :: VertexForm plane -> Bool Source #

Test if there are vertices

vertices' :: IndexedTraversal' (VertexIx (VertexForm plane)) (VertexForm plane) (Vertex (VertexForm plane)) Source #

Traversal (rather than a traversal1) of the vertices.

singleton :: LEVertex plane -> VertexForm plane Source #

Computes a lower envelope consisting of a single vertex.

type LEVertex = BoundedVertexF (Const ()) Source #

Vertices of a lower envelope in vertex form.

pattern LEVertex :: Point 3 (NumType plane) -> Definers plane -> LEVertex plane Source #

Convenience Constructor for computing vertices of the lower - envelope that are in Vertex form.

type Definers plane = Set plane Source #

The definers of a vertex.

data BoundedVertexF f plane Source #

Data type representing the bounded vertices of the lower - envelope.

In the vertexform, the f will be Const (), i.e. we don't have - adjacency information. But in case of Adjacencylist form we can - implement it using a Sequence.

Constructors

Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane)) 

Instances

Instances details
(Show plane, Show (NumType plane), Show (f (LEEdge plane))) => Show (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

showsPrec :: Int -> BoundedVertexF f plane -> ShowS #

show :: BoundedVertexF f plane -> String #

showList :: [BoundedVertexF f plane] -> ShowS #

(Eq plane, Eq (NumType plane), Eq (f (LEEdge plane))) => Eq (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

(==) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

(/=) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r) Source #

The location of the vertex

definers :: Lens' (BoundedVertexF f plane) (Set plane) Source #

The three planes defining the vertex

location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r) Source #

Projected 2d location of the point

intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r) Source #

Given two planes, computes the line in which they intersect.

intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r) Source #

Computes there the three planes intersect

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope.html b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope.html index 5bc703afc..43ab30725 100644 --- a/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope.html +++ b/haddocks/hgeometry/HGeometry-Plane-LowerEnvelope.html @@ -1,5 +1 @@ -HGeometry.Plane.LowerEnvelope
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope

Description

Computing the lower envelope of a set of planes

Synopsis

Documentation

type VertexID = Int Source #

VertexIds are just ints

data BoundedVertexF f plane Source #

Data type representing the bounded vertices of the lower - envelope.

In the vertexform, the f will be Const (), i.e. we don't have - adjacency information. But in case of Adjacencylist form we can - implement it using a Sequence.

Constructors

Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane)) 

Instances

Instances details
(Show plane, Show (NumType plane), Show (f (LEEdge plane))) => Show (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

showsPrec :: Int -> BoundedVertexF f plane -> ShowS #

show :: BoundedVertexF f plane -> String #

showList :: [BoundedVertexF f plane] -> ShowS #

(Eq plane, Eq (NumType plane), Eq (f (LEEdge plane))) => Eq (BoundedVertexF f plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

(==) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

(/=) :: BoundedVertexF f plane -> BoundedVertexF f plane -> Bool #

location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r) Source #

The location of the vertex

definers :: Lens' (BoundedVertexF f plane) (Set plane) Source #

The three planes defining the vertex

location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r) Source #

Projected 2d location of the point

incidentEdgesB :: Lens (BoundedVertexF f plane) (BoundedVertexF g plane) (f (LEEdge plane)) (g (LEEdge plane)) Source #

Lens to access the incident edges of a vertex

traverseBoundedV :: (Traversable f, Applicative g, NumType plane ~ NumType plane', Ord plane') => (plane -> g plane') -> BoundedVertexF f plane -> g (BoundedVertexF f plane') Source #

Traverse the bounded vertex.

\(O(k\log k)\), where \(k\) is the number of definers of v.

data LEEdge plane Source #

An (half)Edge in the Lower envelope

Constructors

Edge !VertexID plane plane 

Instances

Instances details
Foldable LEEdge Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

fold :: Monoid m => LEEdge m -> m #

foldMap :: Monoid m => (a -> m) -> LEEdge a -> m #

foldMap' :: Monoid m => (a -> m) -> LEEdge a -> m #

foldr :: (a -> b -> b) -> b -> LEEdge a -> b #

foldr' :: (a -> b -> b) -> b -> LEEdge a -> b #

foldl :: (b -> a -> b) -> b -> LEEdge a -> b #

foldl' :: (b -> a -> b) -> b -> LEEdge a -> b #

foldr1 :: (a -> a -> a) -> LEEdge a -> a #

foldl1 :: (a -> a -> a) -> LEEdge a -> a #

toList :: LEEdge a -> [a] #

null :: LEEdge a -> Bool #

length :: LEEdge a -> Int #

elem :: Eq a => a -> LEEdge a -> Bool #

maximum :: Ord a => LEEdge a -> a #

minimum :: Ord a => LEEdge a -> a #

sum :: Num a => LEEdge a -> a #

product :: Num a => LEEdge a -> a #

Traversable LEEdge Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

traverse :: Applicative f => (a -> f b) -> LEEdge a -> f (LEEdge b) #

sequenceA :: Applicative f => LEEdge (f a) -> f (LEEdge a) #

mapM :: Monad m => (a -> m b) -> LEEdge a -> m (LEEdge b) #

sequence :: Monad m => LEEdge (m a) -> m (LEEdge a) #

Functor LEEdge Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

fmap :: (a -> b) -> LEEdge a -> LEEdge b #

(<$) :: a -> LEEdge b -> LEEdge a #

Show plane => Show (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

showsPrec :: Int -> LEEdge plane -> ShowS #

show :: LEEdge plane -> String #

showList :: [LEEdge plane] -> ShowS #

Eq plane => Eq (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

(==) :: LEEdge plane -> LEEdge plane -> Bool #

(/=) :: LEEdge plane -> LEEdge plane -> Bool #

Ord plane => Ord (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

compare :: LEEdge plane -> LEEdge plane -> Ordering #

(<) :: LEEdge plane -> LEEdge plane -> Bool #

(<=) :: LEEdge plane -> LEEdge plane -> Bool #

(>) :: LEEdge plane -> LEEdge plane -> Bool #

(>=) :: LEEdge plane -> LEEdge plane -> Bool #

max :: LEEdge plane -> LEEdge plane -> LEEdge plane #

min :: LEEdge plane -> LEEdge plane -> LEEdge plane #

HasUnboundedEdges (LowerEnvelope' plane) (LEEdge plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Methods

unboundedEdges :: Lens' (LowerEnvelope' plane) (Seq (LEEdge plane)) Source #

destination :: Getter (LEEdge plane) VertexID Source #

Getter to access the destination field of an edge.

leftPlane :: Lens' (LEEdge plane) plane Source #

Lens to access the plane left of/above the edge

rightPlane :: Lens' (LEEdge plane) plane Source #

Lens to access the plane right of/below the edge

flipEdge :: VertexID -> LEEdge plane -> LEEdge plane Source #

Given some vertex u and an edge e from u towards some other - vertex v, flip the edge e, s othat it is the edge from v to u.

\ No newline at end of file +HGeometry.Plane.LowerEnvelope
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Plane.LowerEnvelope

Description

Computing the lower envelope of a set of planes

Synopsis

Documentation

data LowerEnvelope plane Source #

The lower enevelope of planes in R^3. (Or rather, its minimization diagram)

Constructors

ParallelStrips !(Alternating Vector (VerticalOrLineEQ (NumType plane)) plane) 
ConnectedEnvelope !(MinimizationDiagram (NumType plane) plane) 

Instances

Instances details
(Show plane, Show (NumType plane)) => Show (LowerEnvelope plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

showsPrec :: Int -> LowerEnvelope plane -> ShowS #

show :: LowerEnvelope plane -> String #

showList :: [LowerEnvelope plane] -> ShowS #

(Eq plane, Eq (NumType plane)) => Eq (LowerEnvelope plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Type

Methods

(==) :: LowerEnvelope plane -> LowerEnvelope plane -> Bool #

(/=) :: LowerEnvelope plane -> LowerEnvelope plane -> Bool #

pointLocateParallel :: (Plane_ plane r, Point_ point 2 r, Ord r, Num r) => point -> Alternating Vector (VerticalOrLineEQ r) plane -> plane Source #

Point locates the given point among the parralel strips.

\(O(\log h)\), where \(h\) is the number of planes on the lower envelope

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-PolyLine.html b/haddocks/hgeometry/HGeometry-PolyLine.html index 0499e6ca3..233cebc9c 100644 --- a/haddocks/hgeometry/HGeometry-PolyLine.html +++ b/haddocks/hgeometry/HGeometry-PolyLine.html @@ -1 +1 @@ -HGeometry.PolyLine
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.PolyLine

Description

A Polyline and some basic functions to interact with them.

Synopsis

Documentation

newtype PolyLineF f point Source #

Simple polygons just store their vertices in CCCW order

Constructors

PolyLine (f point) 

Instances

Instances details
Foldable f => Foldable (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

fold :: Monoid m => PolyLineF f m -> m #

foldMap :: Monoid m => (a -> m) -> PolyLineF f a -> m #

foldMap' :: Monoid m => (a -> m) -> PolyLineF f a -> m #

foldr :: (a -> b -> b) -> b -> PolyLineF f a -> b #

foldr' :: (a -> b -> b) -> b -> PolyLineF f a -> b #

foldl :: (b -> a -> b) -> b -> PolyLineF f a -> b #

foldl' :: (b -> a -> b) -> b -> PolyLineF f a -> b #

foldr1 :: (a -> a -> a) -> PolyLineF f a -> a #

foldl1 :: (a -> a -> a) -> PolyLineF f a -> a #

toList :: PolyLineF f a -> [a] #

null :: PolyLineF f a -> Bool #

length :: PolyLineF f a -> Int #

elem :: Eq a => a -> PolyLineF f a -> Bool #

maximum :: Ord a => PolyLineF f a -> a #

minimum :: Ord a => PolyLineF f a -> a #

sum :: Num a => PolyLineF f a -> a #

product :: Num a => PolyLineF f a -> a #

Foldable1 f => Foldable1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

fold1 :: Semigroup m => PolyLineF f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> PolyLineF f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> PolyLineF f a -> m #

toNonEmpty :: PolyLineF f a -> NonEmpty a #

maximum :: Ord a => PolyLineF f a -> a #

minimum :: Ord a => PolyLineF f a -> a #

head :: PolyLineF f a -> a #

last :: PolyLineF f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> PolyLineF f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> PolyLineF f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> PolyLineF f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> PolyLineF f a -> b #

Eq1 f => Eq1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

liftEq :: (a -> b -> Bool) -> PolyLineF f a -> PolyLineF f b -> Bool #

Ord1 f => Ord1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

liftCompare :: (a -> b -> Ordering) -> PolyLineF f a -> PolyLineF f b -> Ordering #

Traversable f => Traversable (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

traverse :: Applicative f0 => (a -> f0 b) -> PolyLineF f a -> f0 (PolyLineF f b) #

sequenceA :: Applicative f0 => PolyLineF f (f0 a) -> f0 (PolyLineF f a) #

mapM :: Monad m => (a -> m b) -> PolyLineF f a -> m (PolyLineF f b) #

sequence :: Monad m => PolyLineF f (m a) -> m (PolyLineF f a) #

Functor f => Functor (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

fmap :: (a -> b) -> PolyLineF f a -> PolyLineF f b #

(<$) :: a -> PolyLineF f b -> PolyLineF f a #

Traversable1 f => Traversable1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> PolyLineF f a -> f0 (PolyLineF f b) Source #

sequence1 :: Apply f0 => PolyLineF f (f0 b) -> f0 (PolyLineF f b) Source #

Generic (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Associated Types

type Rep (PolyLineF f point) :: Type -> Type #

Methods

from :: PolyLineF f point -> Rep (PolyLineF f point) x #

to :: Rep (PolyLineF f point) x -> PolyLineF f point #

Read (f point) => Read (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

readsPrec :: Int -> ReadS (PolyLineF f point) #

readList :: ReadS [PolyLineF f point] #

readPrec :: ReadPrec (PolyLineF f point) #

readListPrec :: ReadPrec [PolyLineF f point] #

Show (f point) => Show (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

showsPrec :: Int -> PolyLineF f point -> ShowS #

show :: PolyLineF f point -> String #

showList :: [PolyLineF f point] -> ShowS #

NFData (f point) => NFData (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

rnf :: PolyLineF f point -> () #

Eq (f point) => Eq (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

(==) :: PolyLineF f point -> PolyLineF f point -> Bool #

(/=) :: PolyLineF f point -> PolyLineF f point -> Bool #

Ord (f point) => Ord (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

compare :: PolyLineF f point -> PolyLineF f point -> Ordering #

(<) :: PolyLineF f point -> PolyLineF f point -> Bool #

(<=) :: PolyLineF f point -> PolyLineF f point -> Bool #

(>) :: PolyLineF f point -> PolyLineF f point -> Bool #

(>=) :: PolyLineF f point -> PolyLineF f point -> Bool #

max :: PolyLineF f point -> PolyLineF f point -> PolyLineF f point #

min :: PolyLineF f point -> PolyLineF f point -> PolyLineF f point #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), Point_ point 2 r) => IsBoxable (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (PolyLineF f point), r ~ NumType (PolyLineF f point), Ord r) => PolyLineF f point -> Box (Point d r)

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), DefaultTransformByConstraints (PolyLineF f point) 2 r, Point_ point 2 r) => IsTransformable (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

transformBy :: Transformation (Dimension (PolyLineF f point)) (NumType (PolyLineF f point)) -> PolyLineF f point -> PolyLineF f point

(TraversableWithIndex Int f, Traversable1 f, Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int) => HasVertices' (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Associated Types

type Vertex (PolyLineF f point) Source #

type VertexIx (PolyLineF f point) Source #

Methods

vertexAt :: VertexIx (PolyLineF f point) -> IndexedTraversal' (VertexIx (PolyLineF f point)) (PolyLineF f point) (Vertex (PolyLineF f point)) Source #

numVertices :: PolyLineF f point -> Int Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), HasFromFoldable1 f, Point_ point d r, TraversableWithIndex Int f) => ConstructablePolyLine_ (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

polyLineFromPoints :: Foldable1 f0 => f0 point -> PolyLineF f point Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), HasFromFoldable1 f, Point_ point d r, TraversableWithIndex Int f) => PolyLine_ (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Traversable1 f => HasEnd (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

end :: Lens' (PolyLineF f point) point

Traversable1 f => HasStart (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

start :: Lens' (PolyLineF f point) point

(TraversableWithIndex Int f, Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (PolyLineF f point) (PolyLineF f point') Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

vertices :: IndexedTraversal1 (VertexIx (PolyLineF f point)) (PolyLineF f point) (PolyLineF f point') (Vertex (PolyLineF f point)) (Vertex (PolyLineF f point')) Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasPoints (PolyLineF f point) (PolyLineF f point') point point' Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (PolyLineF f point) ~ r, NumType (PolyLineF f point') ~ r', Dimension (PolyLineF f point) ~ d, Dimension (PolyLineF f point') ~ d) => Traversal1 (PolyLineF f point) (PolyLineF f point') point point'

type Rep (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type Rep (PolyLineF f point) = D1 ('MetaData "PolyLineF" "HGeometry.PolyLine" "hgeometry-1.0.0.0-inplace" 'True) (C1 ('MetaCons "PolyLine" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f point))))
type Dimension (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type Dimension (PolyLineF f point) = Dimension point
type NumType (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type NumType (PolyLineF f point) = NumType point
type Vertex (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type Vertex (PolyLineF f point) = point
type VertexIx (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type VertexIx (PolyLineF f point) = Int

type PolyLine = PolyLineF NonEmptyVector Source #

By default we store simple poylline as non-empty vectors.

_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') (f point) (f' point') Source #

Access the container

class HasVertices' graph => HasVertices graph graph' where Source #

Class that expresses that we have a non-empty type changing traversal of all vertices.

Methods

vertices :: IndexedTraversal1 (VertexIx graph) graph graph' (Vertex graph) (Vertex graph') Source #

Traversal of all vertices in the graph

Instances

Instances details
HasVertices Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasVertices (LowerEnvelope' plane) (LowerEnvelope' plane') Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasVertices (Triangle point) (Triangle point') 
Instance details

Defined in HGeometry.Triangle

Methods

vertices :: IndexedTraversal1 (VertexIx (Triangle point)) (Triangle point) (Triangle point') (Vertex (Triangle point)) (Vertex (Triangle point')) Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (BezierSplineF f point) (BezierSplineF f point') Source # 
Instance details

Defined in HGeometry.BezierSpline

Methods

vertices :: IndexedTraversal1 (VertexIx (BezierSplineF f point)) (BezierSplineF f point) (BezierSplineF f point') (Vertex (BezierSplineF f point)) (Vertex (BezierSplineF f point')) Source #

HasVertices graph graph' => HasVertices (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

vertices :: IndexedTraversal1 (VertexIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Vertex (graph :+ extra)) (Vertex (graph' :+ extra)) Source #

(TraversableWithIndex Int f, Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (PolyLineF f point) (PolyLineF f point') Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

vertices :: IndexedTraversal1 (VertexIx (PolyLineF f point)) (PolyLineF f point) (PolyLineF f point') (Vertex (PolyLineF f point)) (Vertex (PolyLineF f point')) Source #

HasVertices (SimplePolygonF f point) (SimplePolygonF f point') => HasVertices (ConvexPolygonF f point) (ConvexPolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

VertexContainer f point => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(HoleContainer h f point, VertexContainer f point) => HasVertices (PolygonalDomainF h f point) (PolygonalDomainF h f point') Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Methods

vertices :: IndexedTraversal1 (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (PolygonalDomainF h f point') (Vertex (PolygonalDomainF h f point)) (Vertex (PolygonalDomainF h f point')) Source #

HasVertices (PlaneGraph s v e f) (PlaneGraph s v' e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

vertices :: IndexedTraversal1 (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v' e f) (Vertex (PlaneGraph s v e f)) (Vertex (PlaneGraph s v' e f)) Source #

class HasEdges' graph => HasEdges graph graph' where Source #

Class for types that have a type changing traversal of the edges

Methods

edges :: IndexedTraversal (EdgeIx graph) graph graph' (Edge graph) (Edge graph') Source #

Traversal of all edges in the graph

Instances

Instances details
HasEdges Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasEdges (LowerEnvelope' plane) (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasEdges graph graph' => HasEdges (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

edges :: IndexedTraversal (EdgeIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Edge (graph :+ extra)) (Edge (graph' :+ extra)) Source #

HasEdges (PlaneGraph s v e f) (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

edges :: IndexedTraversal (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) (Edge (PlaneGraph s v e f)) Source #

\ No newline at end of file +HGeometry.PolyLine
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.PolyLine

Description

A Polyline and some basic functions to interact with them.

Synopsis

Documentation

newtype PolyLineF f point Source #

Simple polygons just store their vertices in CCCW order

Constructors

PolyLine (f point) 

Instances

Instances details
Foldable f => Foldable (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

fold :: Monoid m => PolyLineF f m -> m #

foldMap :: Monoid m => (a -> m) -> PolyLineF f a -> m #

foldMap' :: Monoid m => (a -> m) -> PolyLineF f a -> m #

foldr :: (a -> b -> b) -> b -> PolyLineF f a -> b #

foldr' :: (a -> b -> b) -> b -> PolyLineF f a -> b #

foldl :: (b -> a -> b) -> b -> PolyLineF f a -> b #

foldl' :: (b -> a -> b) -> b -> PolyLineF f a -> b #

foldr1 :: (a -> a -> a) -> PolyLineF f a -> a #

foldl1 :: (a -> a -> a) -> PolyLineF f a -> a #

toList :: PolyLineF f a -> [a] #

null :: PolyLineF f a -> Bool #

length :: PolyLineF f a -> Int #

elem :: Eq a => a -> PolyLineF f a -> Bool #

maximum :: Ord a => PolyLineF f a -> a #

minimum :: Ord a => PolyLineF f a -> a #

sum :: Num a => PolyLineF f a -> a #

product :: Num a => PolyLineF f a -> a #

Foldable1 f => Foldable1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

fold1 :: Semigroup m => PolyLineF f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> PolyLineF f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> PolyLineF f a -> m #

toNonEmpty :: PolyLineF f a -> NonEmpty a #

maximum :: Ord a => PolyLineF f a -> a #

minimum :: Ord a => PolyLineF f a -> a #

head :: PolyLineF f a -> a #

last :: PolyLineF f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> PolyLineF f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> PolyLineF f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> PolyLineF f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> PolyLineF f a -> b #

Eq1 f => Eq1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

liftEq :: (a -> b -> Bool) -> PolyLineF f a -> PolyLineF f b -> Bool #

Ord1 f => Ord1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

liftCompare :: (a -> b -> Ordering) -> PolyLineF f a -> PolyLineF f b -> Ordering #

Traversable f => Traversable (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

traverse :: Applicative f0 => (a -> f0 b) -> PolyLineF f a -> f0 (PolyLineF f b) #

sequenceA :: Applicative f0 => PolyLineF f (f0 a) -> f0 (PolyLineF f a) #

mapM :: Monad m => (a -> m b) -> PolyLineF f a -> m (PolyLineF f b) #

sequence :: Monad m => PolyLineF f (m a) -> m (PolyLineF f a) #

Functor f => Functor (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

fmap :: (a -> b) -> PolyLineF f a -> PolyLineF f b #

(<$) :: a -> PolyLineF f b -> PolyLineF f a #

Traversable1 f => Traversable1 (PolyLineF f) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> PolyLineF f a -> f0 (PolyLineF f b) Source #

sequence1 :: Apply f0 => PolyLineF f (f0 b) -> f0 (PolyLineF f b) Source #

Generic (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Associated Types

type Rep (PolyLineF f point) :: Type -> Type #

Methods

from :: PolyLineF f point -> Rep (PolyLineF f point) x #

to :: Rep (PolyLineF f point) x -> PolyLineF f point #

Read (f point) => Read (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

readsPrec :: Int -> ReadS (PolyLineF f point) #

readList :: ReadS [PolyLineF f point] #

readPrec :: ReadPrec (PolyLineF f point) #

readListPrec :: ReadPrec [PolyLineF f point] #

Show (f point) => Show (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

showsPrec :: Int -> PolyLineF f point -> ShowS #

show :: PolyLineF f point -> String #

showList :: [PolyLineF f point] -> ShowS #

NFData (f point) => NFData (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

rnf :: PolyLineF f point -> () #

Eq (f point) => Eq (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

(==) :: PolyLineF f point -> PolyLineF f point -> Bool #

(/=) :: PolyLineF f point -> PolyLineF f point -> Bool #

Ord (f point) => Ord (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

compare :: PolyLineF f point -> PolyLineF f point -> Ordering #

(<) :: PolyLineF f point -> PolyLineF f point -> Bool #

(<=) :: PolyLineF f point -> PolyLineF f point -> Bool #

(>) :: PolyLineF f point -> PolyLineF f point -> Bool #

(>=) :: PolyLineF f point -> PolyLineF f point -> Bool #

max :: PolyLineF f point -> PolyLineF f point -> PolyLineF f point #

min :: PolyLineF f point -> PolyLineF f point -> PolyLineF f point #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), Point_ point 2 r) => IsBoxable (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (PolyLineF f point), r ~ NumType (PolyLineF f point), Ord r) => PolyLineF f point -> Box (Point d r)

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), DefaultTransformByConstraints (PolyLineF f point) 2 r, Point_ point 2 r) => IsTransformable (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

transformBy :: Transformation (Dimension (PolyLineF f point)) (NumType (PolyLineF f point)) -> PolyLineF f point -> PolyLineF f point

(TraversableWithIndex Int f, Traversable1 f, Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int) => HasVertices' (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Associated Types

type Vertex (PolyLineF f point) Source #

type VertexIx (PolyLineF f point) Source #

Methods

vertexAt :: VertexIx (PolyLineF f point) -> IndexedTraversal' (VertexIx (PolyLineF f point)) (PolyLineF f point) (Vertex (PolyLineF f point)) Source #

numVertices :: PolyLineF f point -> Int Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), HasFromFoldable1 f, Point_ point d r, TraversableWithIndex Int f) => ConstructablePolyLine_ (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

polyLineFromPoints :: Foldable1 f0 => f0 point -> PolyLineF f point Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point), HasFromFoldable1 f, Point_ point d r, TraversableWithIndex Int f) => PolyLine_ (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Traversable1 f => HasEnd (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

end :: Lens' (PolyLineF f point) point

Traversable1 f => HasStart (PolyLineF f point) point Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

start :: Lens' (PolyLineF f point) point

(TraversableWithIndex Int f, Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (PolyLineF f point) (PolyLineF f point') Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

vertices :: IndexedTraversal1 (VertexIx (PolyLineF f point)) (PolyLineF f point) (PolyLineF f point') (Vertex (PolyLineF f point)) (Vertex (PolyLineF f point')) Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasPoints (PolyLineF f point) (PolyLineF f point') point point' Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (PolyLineF f point) ~ r, NumType (PolyLineF f point') ~ r', Dimension (PolyLineF f point) ~ d, Dimension (PolyLineF f point') ~ d) => Traversal1 (PolyLineF f point) (PolyLineF f point') point point'

type Rep (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type Rep (PolyLineF f point) = D1 ('MetaData "PolyLineF" "HGeometry.PolyLine" "hgeometry-1.0.0.0-inplace" 'True) (C1 ('MetaCons "PolyLine" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f point))))
type Dimension (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type Dimension (PolyLineF f point) = Dimension point
type NumType (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type NumType (PolyLineF f point) = NumType point
type Vertex (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type Vertex (PolyLineF f point) = point
type VertexIx (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

type VertexIx (PolyLineF f point) = Int

type PolyLine = PolyLineF NonEmptyVector Source #

By default we store simple poylline as non-empty vectors.

_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') (f point) (f' point') Source #

Access the container

class HasVertices' graph => HasVertices graph graph' where Source #

Class that expresses that we have a non-empty type changing traversal of all vertices.

Methods

vertices :: IndexedTraversal1 (VertexIx graph) graph graph' (Vertex graph) (Vertex graph') Source #

Traversal of all vertices in the graph

Instances

Instances details
HasVertices Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasVertices (Triangle point) (Triangle point') 
Instance details

Defined in HGeometry.Triangle

Methods

vertices :: IndexedTraversal1 (VertexIx (Triangle point)) (Triangle point) (Triangle point') (Vertex (Triangle point)) (Vertex (Triangle point')) Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (BezierSplineF f point) (BezierSplineF f point') Source # 
Instance details

Defined in HGeometry.BezierSpline

Methods

vertices :: IndexedTraversal1 (VertexIx (BezierSplineF f point)) (BezierSplineF f point) (BezierSplineF f point') (Vertex (BezierSplineF f point)) (Vertex (BezierSplineF f point')) Source #

HasVertices graph graph' => HasVertices (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

vertices :: IndexedTraversal1 (VertexIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Vertex (graph :+ extra)) (Vertex (graph' :+ extra)) Source #

(TraversableWithIndex Int f, Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (PolyLineF f point) (PolyLineF f point') Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

vertices :: IndexedTraversal1 (VertexIx (PolyLineF f point)) (PolyLineF f point) (PolyLineF f point') (Vertex (PolyLineF f point)) (Vertex (PolyLineF f point')) Source #

HasVertices (SimplePolygonF f point) (SimplePolygonF f point') => HasVertices (ConvexPolygonF f point) (ConvexPolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

VertexContainer f point => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(HoleContainer h f point, VertexContainer f point) => HasVertices (PolygonalDomainF h f point) (PolygonalDomainF h f point') Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Methods

vertices :: IndexedTraversal1 (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (PolygonalDomainF h f point') (Vertex (PolygonalDomainF h f point)) (Vertex (PolygonalDomainF h f point')) Source #

HasVertices (PlaneGraph s v e f) (PlaneGraph s v' e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

vertices :: IndexedTraversal1 (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v' e f) (Vertex (PlaneGraph s v e f)) (Vertex (PlaneGraph s v' e f)) Source #

class HasEdges' graph => HasEdges graph graph' where Source #

Class for types that have a type changing traversal of the edges

Methods

edges :: IndexedTraversal (EdgeIx graph) graph graph' (Edge graph) (Edge graph') Source #

Traversal of all edges in the graph

Instances

Instances details
HasEdges Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasEdges graph graph' => HasEdges (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

edges :: IndexedTraversal (EdgeIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Edge (graph :+ extra)) (Edge (graph' :+ extra)) Source #

HasEdges (PlaneGraph s v e f) (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

edges :: IndexedTraversal (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) (Edge (PlaneGraph s v e f)) Source #

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Polygon-Class.html b/haddocks/hgeometry/HGeometry-Polygon-Class.html index 4b2554e1d..980e2e31f 100644 --- a/haddocks/hgeometry/HGeometry-Polygon-Class.html +++ b/haddocks/hgeometry/HGeometry-Polygon-Class.html @@ -8,4 +8,4 @@ if the verices are given in counter clockwise order, the area will be positive.

running time: \(O(n)\)

minimumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) Source #

Yield the minimum vertex of a polygon according to the given comparison function.

running time \( O(n) \)

Yield the minimum vertex of a polygon according to the given comparison function.

running time \( O(n) \)

maximumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) Source #

Yield the maximum vertex of a polygon according to the given comparison function.

running time \( O(n) \)

outerBoundaryEdgeSegmentAt :: (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => VertexIx polygon -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point) Source #

Get the line segment representing the edge that has the given vertex as its starting edge

running time: \(O(1)\)

outerBoundaryEdgeSegments :: forall polygon point r. (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => IndexedFold1 (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point) Source #

Get the line segments representing the outer boundary of the polygon.

outerBoundaryWithNeighbours :: (HasOuterBoundary polygon, VertexIx polygon ~ Int) => IndexedFold1 (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) polygon (Vertex polygon, (Vertex polygon, Vertex polygon)) Source #

A fold that associates each vertex on the boundary with its predecessor and successor (in that order) along the boundary.

type Hole polygon = SimplePolygonF (HoleF polygon) (Vertex polygon) Source #

A hole is a simple polygon

class VertexContainer (HoleF polygon) (Vertex polygon) => HasHoles polygon where Source #

Accessing the holes in a polygon (if there are any.)

the default implementation assumes there are no holes

Minimal complete definition

Nothing

Associated Types

type HoleIx polygon :: Type Source #

Type we use to index holes.

type HoleIx polygon = Void

type HoleF polygon :: Type -> Type Source #

The functor used in the holes

Traversal over the holes in the polygon. Each hole is a simple polygon.

type HoleF polygon = Cyclic NonEmptyVector

Methods

holes :: IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) Source #

holeAt :: HoleIx polygon -> IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) Source #

Instances

Instances details
HasHoles polygon => HasHoles (polygon :+ extra) Source # 
Instance details

Defined in HGeometry.Polygon.Class

Associated Types

type HoleIx (polygon :+ extra) Source #

type HoleF (polygon :+ extra) :: Type -> Type Source #

Methods

holes :: IndexedTraversal' (HoleIx (polygon :+ extra)) (polygon :+ extra) (Hole (polygon :+ extra)) Source #

holeAt :: HoleIx (polygon :+ extra) -> IndexedTraversal' (HoleIx (polygon :+ extra)) (polygon :+ extra) (Hole (polygon :+ extra)) Source #

HasHoles (ConvexPolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Associated Types

type HoleIx (ConvexPolygonF f point) Source #

type HoleF (ConvexPolygonF f point) :: Type -> Type Source #

HasHoles (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type HoleIx (SimplePolygonF f point) Source #

type HoleF (SimplePolygonF f point) :: Type -> Type Source #

HoleContainer h f point => HasHoles (PolygonalDomainF h f point) Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Associated Types

type HoleIx (PolygonalDomainF h f point) Source #

type HoleF (PolygonalDomainF h f point) :: Type -> Type Source #

class (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r, NumType polygon ~ r, Dimension polygon ~ 2, HasHoles polygon) => Polygon_ polygon point r where Source #

A class representing (planar) polygons. The edges of the polygon - may not intersect.

Minimal complete definition

ccwPredecessorOf, ccwSuccessorOf

Methods

extremes :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> polygon -> (point, point) Source #

Finds the extreme points, minimum and maximum, in a given direction

running time: \(O(n)\)

ccwPredecessorOf :: VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) Source #

Given a vertexIdx v; get an IndexedLens to access the CCW predecessor of v

ccwSuccessorOf :: VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) Source #

Given a vertexIdx v; get an IndexedLens to access the CCW predecessor of v

Instances

Instances details
Polygon_ polygon point r => Polygon_ (polygon :+ extra) point r Source # 
Instance details

Defined in HGeometry.Polygon.Class

Methods

extremes :: Vector 2 r -> (polygon :+ extra) -> (point, point) Source #

ccwPredecessorOf :: VertexIx (polygon :+ extra) -> IndexedLens' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) Source #

ccwSuccessorOf :: VertexIx (polygon :+ extra) -> IndexedLens' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Point_ point 2 r) => Polygon_ (ConvexPolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Methods

extremes :: Vector 2 r -> ConvexPolygonF f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (ConvexPolygonF f point) -> IndexedLens' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) Source #

ccwSuccessorOf :: VertexIx (ConvexPolygonF f point) -> IndexedLens' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) Source #

(Point_ point 2 r, HasFromFoldable1 f, VertexContainer f point) => Polygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

extremes :: Vector 2 r -> SimplePolygonF f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

ccwSuccessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

(Point_ point 2 r, HasFromFoldable1 f, HoleContainer h f point) => Polygon_ (PolygonalDomainF h f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Methods

extremes :: Vector 2 r -> PolygonalDomainF h f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (PolygonalDomainF h f point) -> IndexedLens' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) Source #

ccwSuccessorOf :: VertexIx (PolygonalDomainF h f point) -> IndexedLens' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) Source #

class HasVertices' graph => HasVertices graph graph' where Source #

Class that expresses that we have a non-empty type changing traversal of all vertices.

Methods

vertices :: IndexedTraversal1 (VertexIx graph) graph graph' (Vertex graph) (Vertex graph') Source #

Traversal of all vertices in the graph

Instances

Instances details
HasVertices Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasVertices (LowerEnvelope' plane) (LowerEnvelope' plane') Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasVertices (Triangle point) (Triangle point') 
Instance details

Defined in HGeometry.Triangle

Methods

vertices :: IndexedTraversal1 (VertexIx (Triangle point)) (Triangle point) (Triangle point') (Vertex (Triangle point)) (Vertex (Triangle point')) Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (BezierSplineF f point) (BezierSplineF f point') Source # 
Instance details

Defined in HGeometry.BezierSpline

Methods

vertices :: IndexedTraversal1 (VertexIx (BezierSplineF f point)) (BezierSplineF f point) (BezierSplineF f point') (Vertex (BezierSplineF f point)) (Vertex (BezierSplineF f point')) Source #

HasVertices graph graph' => HasVertices (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

vertices :: IndexedTraversal1 (VertexIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Vertex (graph :+ extra)) (Vertex (graph' :+ extra)) Source #

(TraversableWithIndex Int f, Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (PolyLineF f point) (PolyLineF f point') Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

vertices :: IndexedTraversal1 (VertexIx (PolyLineF f point)) (PolyLineF f point) (PolyLineF f point') (Vertex (PolyLineF f point)) (Vertex (PolyLineF f point')) Source #

HasVertices (SimplePolygonF f point) (SimplePolygonF f point') => HasVertices (ConvexPolygonF f point) (ConvexPolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

VertexContainer f point => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(HoleContainer h f point, VertexContainer f point) => HasVertices (PolygonalDomainF h f point) (PolygonalDomainF h f point') Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Methods

vertices :: IndexedTraversal1 (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (PolygonalDomainF h f point') (Vertex (PolygonalDomainF h f point)) (Vertex (PolygonalDomainF h f point')) Source #

HasVertices (PlaneGraph s v e f) (PlaneGraph s v' e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

vertices :: IndexedTraversal1 (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v' e f) (Vertex (PlaneGraph s v e f)) (Vertex (PlaneGraph s v' e f)) Source #

class HasVertices' graph where Source #

A class representing types that have vertices.

Minimal complete definition

vertexAt

Associated Types

type Vertex graph Source #

Vertices of the graph are of this type

type VertexIx graph Source #

Vertices are indexed by elements of type VertexIx

Methods

vertexAt :: VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) Source #

Accessor to a given vertex.

numVertices :: graph -> Int Source #

Number of vertices in the graph.

running time: O(1)

Instances

Instances details
HasVertices' Graph 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Vertex Graph Source #

type VertexIx Graph Source #

HasVertices' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type Vertex (LowerEnvelope' plane) Source #

type VertexIx (LowerEnvelope' plane) Source #

Ord (NumType plane) => HasVertices' (VertexForm plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.VertexForm

Associated Types

type Vertex (VertexForm plane) Source #

type VertexIx (VertexForm plane) Source #

HasVertices' (Triangle point) 
Instance details

Defined in HGeometry.Triangle

Associated Types

type Vertex (Triangle point) Source #

type VertexIx (Triangle point) Source #

Methods

vertexAt :: VertexIx (Triangle point) -> IndexedTraversal' (VertexIx (Triangle point)) (Triangle point) (Vertex (Triangle point)) Source #

numVertices :: Triangle point -> Int Source #

(Traversable1 f, Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int) => HasVertices' (BezierSplineF f point) Source # 
Instance details

Defined in HGeometry.BezierSpline

Associated Types

type Vertex (BezierSplineF f point) Source #

type VertexIx (BezierSplineF f point) Source #

HasVertices' graph => HasVertices' (graph :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Vertex (graph :+ extra) Source #

type VertexIx (graph :+ extra) Source #

Methods

vertexAt :: VertexIx (graph :+ extra) -> IndexedTraversal' (VertexIx (graph :+ extra)) (graph :+ extra) (Vertex (graph :+ extra)) Source #

numVertices :: (graph :+ extra) -> Int Source #

(TraversableWithIndex Int f, Traversable1 f, Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int) => HasVertices' (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Associated Types

type Vertex (PolyLineF f point) Source #

type VertexIx (PolyLineF f point) Source #

Methods

vertexAt :: VertexIx (PolyLineF f point) -> IndexedTraversal' (VertexIx (PolyLineF f point)) (PolyLineF f point) (Vertex (PolyLineF f point)) Source #

numVertices :: PolyLineF f point -> Int Source #

HasVertices' (SimplePolygonF f point) => HasVertices' (ConvexPolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Associated Types

type Vertex (ConvexPolygonF f point) Source #

type VertexIx (ConvexPolygonF f point) Source #

VertexContainer f point => HasVertices' (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type Vertex (SimplePolygonF f point) Source #

type VertexIx (SimplePolygonF f point) Source #

HoleContainer h f point => HasVertices' (PolygonalDomainF h f point) Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Associated Types

type Vertex (PolygonalDomainF h f point) Source #

type VertexIx (PolygonalDomainF h f point) Source #

HasVertices' (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Associated Types

type Vertex (PlaneGraph s v e f) Source #

type VertexIx (PlaneGraph s v e f) Source #

Methods

vertexAt :: VertexIx (PlaneGraph s v e f) -> IndexedTraversal' (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Vertex (PlaneGraph s v e f)) Source #

numVertices :: PlaneGraph s v e f -> Int Source #

class HasEdges' graph => HasEdges graph graph' where Source #

Class for types that have a type changing traversal of the edges

Methods

edges :: IndexedTraversal (EdgeIx graph) graph graph' (Edge graph) (Edge graph') Source #

Traversal of all edges in the graph

Instances

Instances details
HasEdges Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasEdges (LowerEnvelope' plane) (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

HasEdges graph graph' => HasEdges (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

edges :: IndexedTraversal (EdgeIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Edge (graph :+ extra)) (Edge (graph' :+ extra)) Source #

HasEdges (PlaneGraph s v e f) (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

edges :: IndexedTraversal (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) (Edge (PlaneGraph s v e f)) Source #

class HasEdges' graph where Source #

A class for things that have edges

Minimal complete definition

edgeAt

Associated Types

type Edge graph Source #

The edges of the graph are of this type

type EdgeIx graph Source #

The Edges are indexed by something of type EdgeIx

Methods

edgeAt :: EdgeIx graph -> IndexedTraversal' (EdgeIx graph) graph (Edge graph) Source #

Indexed traversal of a given edge.

numEdges :: graph -> Int Source #

Number of edges in the graph.

running time: O(1)

Instances

Instances details
HasEdges' Graph 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Edge Graph Source #

type EdgeIx Graph Source #

HasEdges' (LowerEnvelope' plane) Source # 
Instance details

Defined in HGeometry.Plane.LowerEnvelope.Connected.Type

Associated Types

type Edge (LowerEnvelope' plane) Source #

type EdgeIx (LowerEnvelope' plane) Source #

HasEdges' graph => HasEdges' (graph :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Edge (graph :+ extra) Source #

type EdgeIx (graph :+ extra) Source #

Methods

edgeAt :: EdgeIx (graph :+ extra) -> IndexedTraversal' (EdgeIx (graph :+ extra)) (graph :+ extra) (Edge (graph :+ extra)) Source #

numEdges :: (graph :+ extra) -> Int Source #

HasEdges' (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Associated Types

type Edge (PlaneGraph s v e f) Source #

type EdgeIx (PlaneGraph s v e f) Source #

Methods

edgeAt :: EdgeIx (PlaneGraph s v e f) -> IndexedTraversal' (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) Source #

numEdges :: PlaneGraph s v e f -> Int Source #

\ No newline at end of file + may not intersect.

Minimal complete definition

ccwPredecessorOf, ccwSuccessorOf

Methods

extremes :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> polygon -> (point, point) Source #

Finds the extreme points, minimum and maximum, in a given direction

running time: \(O(n)\)

ccwPredecessorOf :: VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) Source #

Given a vertexIdx v; get an IndexedLens to access the CCW predecessor of v

ccwSuccessorOf :: VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) Source #

Given a vertexIdx v; get an IndexedLens to access the CCW predecessor of v

Instances

Instances details
Polygon_ polygon point r => Polygon_ (polygon :+ extra) point r Source # 
Instance details

Defined in HGeometry.Polygon.Class

Methods

extremes :: Vector 2 r -> (polygon :+ extra) -> (point, point) Source #

ccwPredecessorOf :: VertexIx (polygon :+ extra) -> IndexedLens' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) Source #

ccwSuccessorOf :: VertexIx (polygon :+ extra) -> IndexedLens' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Point_ point 2 r) => Polygon_ (ConvexPolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Methods

extremes :: Vector 2 r -> ConvexPolygonF f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (ConvexPolygonF f point) -> IndexedLens' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) Source #

ccwSuccessorOf :: VertexIx (ConvexPolygonF f point) -> IndexedLens' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) Source #

(Point_ point 2 r, HasFromFoldable1 f, VertexContainer f point) => Polygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

extremes :: Vector 2 r -> SimplePolygonF f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

ccwSuccessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

(Point_ point 2 r, HasFromFoldable1 f, HoleContainer h f point) => Polygon_ (PolygonalDomainF h f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Methods

extremes :: Vector 2 r -> PolygonalDomainF h f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (PolygonalDomainF h f point) -> IndexedLens' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) Source #

ccwSuccessorOf :: VertexIx (PolygonalDomainF h f point) -> IndexedLens' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) Source #

class HasVertices' graph => HasVertices graph graph' where Source #

Class that expresses that we have a non-empty type changing traversal of all vertices.

Methods

vertices :: IndexedTraversal1 (VertexIx graph) graph graph' (Vertex graph) (Vertex graph') Source #

Traversal of all vertices in the graph

Instances

Instances details
HasVertices Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasVertices (Triangle point) (Triangle point') 
Instance details

Defined in HGeometry.Triangle

Methods

vertices :: IndexedTraversal1 (VertexIx (Triangle point)) (Triangle point) (Triangle point') (Vertex (Triangle point)) (Vertex (Triangle point')) Source #

(Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (BezierSplineF f point) (BezierSplineF f point') Source # 
Instance details

Defined in HGeometry.BezierSpline

Methods

vertices :: IndexedTraversal1 (VertexIx (BezierSplineF f point)) (BezierSplineF f point) (BezierSplineF f point') (Vertex (BezierSplineF f point)) (Vertex (BezierSplineF f point')) Source #

HasVertices graph graph' => HasVertices (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

vertices :: IndexedTraversal1 (VertexIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Vertex (graph :+ extra)) (Vertex (graph' :+ extra)) Source #

(TraversableWithIndex Int f, Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (PolyLineF f point) (PolyLineF f point') Source # 
Instance details

Defined in HGeometry.PolyLine

Methods

vertices :: IndexedTraversal1 (VertexIx (PolyLineF f point)) (PolyLineF f point) (PolyLineF f point') (Vertex (PolyLineF f point)) (Vertex (PolyLineF f point')) Source #

HasVertices (SimplePolygonF f point) (SimplePolygonF f point') => HasVertices (ConvexPolygonF f point) (ConvexPolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

VertexContainer f point => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(HoleContainer h f point, VertexContainer f point) => HasVertices (PolygonalDomainF h f point) (PolygonalDomainF h f point') Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Methods

vertices :: IndexedTraversal1 (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (PolygonalDomainF h f point') (Vertex (PolygonalDomainF h f point)) (Vertex (PolygonalDomainF h f point')) Source #

HasVertices (PlaneGraph s v e f) (PlaneGraph s v' e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

vertices :: IndexedTraversal1 (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v' e f) (Vertex (PlaneGraph s v e f)) (Vertex (PlaneGraph s v' e f)) Source #

class HasVertices' graph where Source #

A class representing types that have vertices.

Minimal complete definition

vertexAt

Associated Types

type Vertex graph Source #

Vertices of the graph are of this type

type VertexIx graph Source #

Vertices are indexed by elements of type VertexIx

Methods

vertexAt :: VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) Source #

Accessor to a given vertex.

numVertices :: graph -> Int Source #

Number of vertices in the graph.

running time: O(1)

Instances

Instances details
HasVertices' Graph 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Vertex Graph Source #

type VertexIx Graph Source #

HasVertices' (Triangle point) 
Instance details

Defined in HGeometry.Triangle

Associated Types

type Vertex (Triangle point) Source #

type VertexIx (Triangle point) Source #

Methods

vertexAt :: VertexIx (Triangle point) -> IndexedTraversal' (VertexIx (Triangle point)) (Triangle point) (Vertex (Triangle point)) Source #

numVertices :: Triangle point -> Int Source #

(Traversable1 f, Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int) => HasVertices' (BezierSplineF f point) Source # 
Instance details

Defined in HGeometry.BezierSpline

Associated Types

type Vertex (BezierSplineF f point) Source #

type VertexIx (BezierSplineF f point) Source #

HasVertices' graph => HasVertices' (graph :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Vertex (graph :+ extra) Source #

type VertexIx (graph :+ extra) Source #

Methods

vertexAt :: VertexIx (graph :+ extra) -> IndexedTraversal' (VertexIx (graph :+ extra)) (graph :+ extra) (Vertex (graph :+ extra)) Source #

numVertices :: (graph :+ extra) -> Int Source #

(TraversableWithIndex Int f, Traversable1 f, Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int) => HasVertices' (PolyLineF f point) Source # 
Instance details

Defined in HGeometry.PolyLine

Associated Types

type Vertex (PolyLineF f point) Source #

type VertexIx (PolyLineF f point) Source #

Methods

vertexAt :: VertexIx (PolyLineF f point) -> IndexedTraversal' (VertexIx (PolyLineF f point)) (PolyLineF f point) (Vertex (PolyLineF f point)) Source #

numVertices :: PolyLineF f point -> Int Source #

HasVertices' (SimplePolygonF f point) => HasVertices' (ConvexPolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Associated Types

type Vertex (ConvexPolygonF f point) Source #

type VertexIx (ConvexPolygonF f point) Source #

VertexContainer f point => HasVertices' (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type Vertex (SimplePolygonF f point) Source #

type VertexIx (SimplePolygonF f point) Source #

HoleContainer h f point => HasVertices' (PolygonalDomainF h f point) Source # 
Instance details

Defined in HGeometry.Polygon.WithHoles

Associated Types

type Vertex (PolygonalDomainF h f point) Source #

type VertexIx (PolygonalDomainF h f point) Source #

HasVertices' (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Associated Types

type Vertex (PlaneGraph s v e f) Source #

type VertexIx (PlaneGraph s v e f) Source #

Methods

vertexAt :: VertexIx (PlaneGraph s v e f) -> IndexedTraversal' (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Vertex (PlaneGraph s v e f)) Source #

numVertices :: PlaneGraph s v e f -> Int Source #

class HasEdges' graph => HasEdges graph graph' where Source #

Class for types that have a type changing traversal of the edges

Methods

edges :: IndexedTraversal (EdgeIx graph) graph graph' (Edge graph) (Edge graph') Source #

Traversal of all edges in the graph

Instances

Instances details
HasEdges Graph Graph 
Instance details

Defined in Hiraffe.Graph.Class

HasEdges graph graph' => HasEdges (graph :+ extra) (graph' :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Methods

edges :: IndexedTraversal (EdgeIx (graph :+ extra)) (graph :+ extra) (graph' :+ extra) (Edge (graph :+ extra)) (Edge (graph' :+ extra)) Source #

HasEdges (PlaneGraph s v e f) (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Methods

edges :: IndexedTraversal (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) (Edge (PlaneGraph s v e f)) Source #

class HasEdges' graph where Source #

A class for things that have edges

Minimal complete definition

edgeAt

Associated Types

type Edge graph Source #

The edges of the graph are of this type

type EdgeIx graph Source #

The Edges are indexed by something of type EdgeIx

Methods

edgeAt :: EdgeIx graph -> IndexedTraversal' (EdgeIx graph) graph (Edge graph) Source #

Indexed traversal of a given edge.

numEdges :: graph -> Int Source #

Number of edges in the graph.

running time: O(1)

Instances

Instances details
HasEdges' Graph 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Edge Graph Source #

type EdgeIx Graph Source #

HasEdges' graph => HasEdges' (graph :+ extra) 
Instance details

Defined in Hiraffe.Graph.Class

Associated Types

type Edge (graph :+ extra) Source #

type EdgeIx (graph :+ extra) Source #

Methods

edgeAt :: EdgeIx (graph :+ extra) -> IndexedTraversal' (EdgeIx (graph :+ extra)) (graph :+ extra) (Edge (graph :+ extra)) Source #

numEdges :: (graph :+ extra) -> Int Source #

HasEdges' (PlaneGraph s v e f) Source # 
Instance details

Defined in HGeometry.PlaneGraph.Type

Associated Types

type Edge (PlaneGraph s v e f) Source #

type EdgeIx (PlaneGraph s v e f) Source #

Methods

edgeAt :: EdgeIx (PlaneGraph s v e f) -> IndexedTraversal' (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) Source #

numEdges :: PlaneGraph s v e f -> Int Source #

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Polygon-Simple-Class.html b/haddocks/hgeometry/HGeometry-Polygon-Simple-Class.html index 07fb83313..72a1ed0e8 100644 --- a/haddocks/hgeometry/HGeometry-Polygon-Simple-Class.html +++ b/haddocks/hgeometry/HGeometry-Polygon-Simple-Class.html @@ -6,4 +6,4 @@ - no self-inttersections

fromPoints :: (Foldable f, ConstructableSimplePolygon simplePolygon point r) => f point -> Maybe simplePolygon Source #

Given the vertices of the polygon, constructs the polygon. This function will make sure the polygon is a valid simple polygon, i.e. it has at least three vertices, is given in CCW order, no - repeated vertices etc.

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => simplePolygon -> point' Source #

Compute the centroid of a simple polygon.

running time: \(O(n)\)

Instances

Instances details
(SimplePolygon_ simplePolygon point r, Default extra) => SimplePolygon_ (simplePolygon :+ extra) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Class

Associated Types

type ConstructableSimplePolygon (simplePolygon :+ extra) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f => f point -> simplePolygon :+ extra Source #

fromPoints :: (Foldable f, ConstructableSimplePolygon (simplePolygon :+ extra) point r) => f point -> Maybe (simplePolygon :+ extra) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => (simplePolygon :+ extra) -> point' Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Point_ point 2 r) => SimplePolygon_ (ConvexPolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Associated Types

type ConstructableSimplePolygon (ConvexPolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> ConvexPolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (ConvexPolygonF f point) point r) => f0 point -> Maybe (ConvexPolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => ConvexPolygonF f point -> point' Source #

(Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f) => SimplePolygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type ConstructableSimplePolygon (SimplePolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> SimplePolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (SimplePolygonF f point) point r) => f0 point -> Maybe (SimplePolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => SimplePolygonF f point -> point' Source #

\ No newline at end of file + repeated vertices etc.

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => simplePolygon -> point' Source #

Compute the centroid of a simple polygon.

running time: \(O(n)\)

Instances

Instances details
(SimplePolygon_ simplePolygon point r, Default extra) => SimplePolygon_ (simplePolygon :+ extra) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Class

Associated Types

type ConstructableSimplePolygon (simplePolygon :+ extra) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f => f point -> simplePolygon :+ extra Source #

fromPoints :: (Foldable f, ConstructableSimplePolygon (simplePolygon :+ extra) point r) => f point -> Maybe (simplePolygon :+ extra) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => (simplePolygon :+ extra) -> point' Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Point_ point 2 r) => SimplePolygon_ (ConvexPolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Associated Types

type ConstructableSimplePolygon (ConvexPolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> ConvexPolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (ConvexPolygonF f point) point r) => f0 point -> Maybe (ConvexPolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => ConvexPolygonF f point -> point' Source #

(Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f) => SimplePolygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type ConstructableSimplePolygon (SimplePolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> SimplePolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (SimplePolygonF f point) point r) => f0 point -> Maybe (SimplePolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => SimplePolygonF f point -> point' Source #

\ No newline at end of file diff --git a/haddocks/hgeometry/HGeometry-Polygon-Simple.html b/haddocks/hgeometry/HGeometry-Polygon-Simple.html index da8934bb6..9983a55f4 100644 --- a/haddocks/hgeometry/HGeometry-Polygon-Simple.html +++ b/haddocks/hgeometry/HGeometry-Polygon-Simple.html @@ -6,7 +6,7 @@ - no self-inttersections

fromPoints :: (Foldable f, ConstructableSimplePolygon simplePolygon point r) => f point -> Maybe simplePolygon Source #

Given the vertices of the polygon, constructs the polygon. This function will make sure the polygon is a valid simple polygon, i.e. it has at least three vertices, is given in CCW order, no - repeated vertices etc.

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => simplePolygon -> point' Source #

Compute the centroid of a simple polygon.

running time: \(O(n)\)

Instances

Instances details
(SimplePolygon_ simplePolygon point r, Default extra) => SimplePolygon_ (simplePolygon :+ extra) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Class

Associated Types

type ConstructableSimplePolygon (simplePolygon :+ extra) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f => f point -> simplePolygon :+ extra Source #

fromPoints :: (Foldable f, ConstructableSimplePolygon (simplePolygon :+ extra) point r) => f point -> Maybe (simplePolygon :+ extra) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => (simplePolygon :+ extra) -> point' Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Point_ point 2 r) => SimplePolygon_ (ConvexPolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Associated Types

type ConstructableSimplePolygon (ConvexPolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> ConvexPolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (ConvexPolygonF f point) point r) => f0 point -> Maybe (ConvexPolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => ConvexPolygonF f point -> point' Source #

(Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f) => SimplePolygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type ConstructableSimplePolygon (SimplePolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> SimplePolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (SimplePolygonF f point) point r) => f0 point -> Maybe (SimplePolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => SimplePolygonF f point -> point' Source #

type SimplePolygon = SimplePolygonF (Cyclic NonEmptyVector) Source #

By default we store simple polygons as non-empty circular vectors.

newtype SimplePolygonF f point Source #

Simple polygons just store their vertices in CCCW order

Constructors

MkSimplePolygon (f point) 

Instances

Instances details
Foldable f => Foldable (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

fold :: Monoid m => SimplePolygonF f m -> m #

foldMap :: Monoid m => (a -> m) -> SimplePolygonF f a -> m #

foldMap' :: Monoid m => (a -> m) -> SimplePolygonF f a -> m #

foldr :: (a -> b -> b) -> b -> SimplePolygonF f a -> b #

foldr' :: (a -> b -> b) -> b -> SimplePolygonF f a -> b #

foldl :: (b -> a -> b) -> b -> SimplePolygonF f a -> b #

foldl' :: (b -> a -> b) -> b -> SimplePolygonF f a -> b #

foldr1 :: (a -> a -> a) -> SimplePolygonF f a -> a #

foldl1 :: (a -> a -> a) -> SimplePolygonF f a -> a #

toList :: SimplePolygonF f a -> [a] #

null :: SimplePolygonF f a -> Bool #

length :: SimplePolygonF f a -> Int #

elem :: Eq a => a -> SimplePolygonF f a -> Bool #

maximum :: Ord a => SimplePolygonF f a -> a #

minimum :: Ord a => SimplePolygonF f a -> a #

sum :: Num a => SimplePolygonF f a -> a #

product :: Num a => SimplePolygonF f a -> a #

Foldable1 f => Foldable1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

fold1 :: Semigroup m => SimplePolygonF f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> SimplePolygonF f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> SimplePolygonF f a -> m #

toNonEmpty :: SimplePolygonF f a -> NonEmpty a #

maximum :: Ord a => SimplePolygonF f a -> a #

minimum :: Ord a => SimplePolygonF f a -> a #

head :: SimplePolygonF f a -> a #

last :: SimplePolygonF f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> SimplePolygonF f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> SimplePolygonF f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> SimplePolygonF f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> SimplePolygonF f a -> b #

Eq1 f => Eq1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

liftEq :: (a -> b -> Bool) -> SimplePolygonF f a -> SimplePolygonF f b -> Bool #

Ord1 f => Ord1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

liftCompare :: (a -> b -> Ordering) -> SimplePolygonF f a -> SimplePolygonF f b -> Ordering #

Traversable f => Traversable (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

traverse :: Applicative f0 => (a -> f0 b) -> SimplePolygonF f a -> f0 (SimplePolygonF f b) #

sequenceA :: Applicative f0 => SimplePolygonF f (f0 a) -> f0 (SimplePolygonF f a) #

mapM :: Monad m => (a -> m b) -> SimplePolygonF f a -> m (SimplePolygonF f b) #

sequence :: Monad m => SimplePolygonF f (m a) -> m (SimplePolygonF f a) #

Functor f => Functor (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

fmap :: (a -> b) -> SimplePolygonF f a -> SimplePolygonF f b #

(<$) :: a -> SimplePolygonF f b -> SimplePolygonF f a #

Traversable1 f => Traversable1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> SimplePolygonF f a -> f0 (SimplePolygonF f b) Source #

sequence1 :: Apply f0 => SimplePolygonF f (f0 b) -> f0 (SimplePolygonF f b) Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Num r, Ord r) => HasIntersectionWith (Point 2 r) (SimplePolygonF f point) 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

intersects :: Point 2 r -> SimplePolygonF f point -> Bool

(SimplePolygon_ (SimplePolygonF f point) point r, Num r, Ord r) => IsIntersectableWith (Point 2 r) (SimplePolygonF f point) 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

intersect :: Point 2 r -> SimplePolygonF f point -> Intersection (Point 2 r) (SimplePolygonF f point)

(HasFromFoldable1 f, FromJSON point) => FromJSON (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

(Foldable f, ToJSON point) => ToJSON (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Generic (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Associated Types

type Rep (SimplePolygonF f point) :: Type -> Type #

Methods

from :: SimplePolygonF f point -> Rep (SimplePolygonF f point) x #

to :: Rep (SimplePolygonF f point) x -> SimplePolygonF f point #

(Read point, SimplePolygon_ (SimplePolygonF f point) point r) => Read (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(Show point, SimplePolygon_ (SimplePolygonF f point) point r) => Show (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

showsPrec :: Int -> SimplePolygonF f point -> ShowS #

show :: SimplePolygonF f point -> String #

showList :: [SimplePolygonF f point] -> ShowS #

NFData (f point) => NFData (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

rnf :: SimplePolygonF f point -> () #

Eq (f point) => Eq (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

(==) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(/=) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

Ord (f point) => Ord (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

compare :: SimplePolygonF f point -> SimplePolygonF f point -> Ordering #

(<) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(<=) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(>) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(>=) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

max :: SimplePolygonF f point -> SimplePolygonF f point -> SimplePolygonF f point #

min :: SimplePolygonF f point -> SimplePolygonF f point -> SimplePolygonF f point #

HasHoles (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type HoleIx (SimplePolygonF f point) Source #

type HoleF (SimplePolygonF f point) :: Type -> Type Source #

VertexContainer f point => HasOuterBoundary (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(VertexContainer f point, Point_ point 2 r) => IsBoxable (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (SimplePolygonF f point), r ~ NumType (SimplePolygonF f point), Ord r) => SimplePolygonF f point -> Box (Point d r)

(VertexContainer f point, DefaultTransformByConstraints (SimplePolygonF f point) 2 r, Point_ point 2 r) => IsTransformable (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

transformBy :: Transformation (Dimension (SimplePolygonF f point)) (NumType (SimplePolygonF f point)) -> SimplePolygonF f point -> SimplePolygonF f point

(ShiftedEq (f point), ElemCyclic (f point) ~ point) => ShiftedEq (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Associated Types

type ElemCyclic (SimplePolygonF f point) Source #

Methods

isShiftOf :: SimplePolygonF f point -> SimplePolygonF f point -> Bool Source #

VertexContainer f point => HasVertices' (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type Vertex (SimplePolygonF f point) Source #

type VertexIx (SimplePolygonF f point) Source #

(Point_ point 2 r, HasFromFoldable1 f, VertexContainer f point) => Polygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

extremes :: Vector 2 r -> SimplePolygonF f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

ccwSuccessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

(Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f) => SimplePolygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type ConstructableSimplePolygon (SimplePolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> SimplePolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (SimplePolygonF f point) point r) => f0 point -> Maybe (SimplePolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => SimplePolygonF f point -> point' Source #

SimplePolygon_ (SimplePolygonF f point) point r => HasInPolygon (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

inPolygon :: (Num r, Ord r, Point_ queryPoint 2 r) => queryPoint -> SimplePolygonF f point -> PointLocationResultWith (VertexIx (SimplePolygonF f point)) Source #

VertexContainer f point => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Simple

VertexContainer f point => HasPoints (SimplePolygonF f point) (SimplePolygonF f point') point point' Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (SimplePolygonF f point) ~ r, NumType (SimplePolygonF f point') ~ r', Dimension (SimplePolygonF f point) ~ d, Dimension (SimplePolygonF f point') ~ d) => Traversal1 (SimplePolygonF f point) (SimplePolygonF f point') point point'

type Intersection (Point 2 r) (SimplePolygonF f point) 
Instance details

Defined in HGeometry.Polygon.Simple

type Intersection (Point 2 r) (SimplePolygonF f point) = Maybe (Point 2 r)
type Rep (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type Rep (SimplePolygonF f point) = D1 ('MetaData "SimplePolygonF" "HGeometry.Polygon.Simple.Type" "hgeometry-1.0.0.0-inplace" 'True) (C1 ('MetaCons "MkSimplePolygon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f point))))
type HoleF (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type HoleIx (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type HoleIx (SimplePolygonF f point) = Void
type Dimension (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type Dimension (SimplePolygonF f point) = 2
type NumType (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type NumType (SimplePolygonF f point) = NumType point
type ElemCyclic (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type ElemCyclic (SimplePolygonF f point) = point
type Vertex (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type Vertex (SimplePolygonF f point) = point
type VertexIx (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type VertexIx (SimplePolygonF f point) = Int
type ConstructableSimplePolygon (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type ConstructableSimplePolygon (SimplePolygonF f point) point r = (Eq r, Num r)

toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point Source #

Get the underlying cyclic vector.

type VertexContainer f point = (IxValue (f point) ~ point, Index (f point) ~ Int, TraversableWithIndex Int f, Traversable1 f, Ixed (f point), HasDirectedTraversals f) Source #

shortcut for all default properties of f we need to store the vertices.

class HasInPolygon polygon point r | polygon -> point, point -> r where Source #

Types that implement a point-in-polygon test.

Minimal complete definition

Nothing

Methods

inPolygon :: (Num r, Ord r, Point_ queryPoint 2 r) => queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon) Source #

Check if a point lies inside a polygon, on the boundary, or outside of the + repeated vertices etc.

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => simplePolygon -> point' Source #

Compute the centroid of a simple polygon.

running time: \(O(n)\)

Instances

Instances details
(SimplePolygon_ simplePolygon point r, Default extra) => SimplePolygon_ (simplePolygon :+ extra) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Class

Associated Types

type ConstructableSimplePolygon (simplePolygon :+ extra) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f => f point -> simplePolygon :+ extra Source #

fromPoints :: (Foldable f, ConstructableSimplePolygon (simplePolygon :+ extra) point r) => f point -> Maybe (simplePolygon :+ extra) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => (simplePolygon :+ extra) -> point' Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Point_ point 2 r) => SimplePolygon_ (ConvexPolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Convex.Implementation

Associated Types

type ConstructableSimplePolygon (ConvexPolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> ConvexPolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (ConvexPolygonF f point) point r) => f0 point -> Maybe (ConvexPolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => ConvexPolygonF f point -> point' Source #

(Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f) => SimplePolygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type ConstructableSimplePolygon (SimplePolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> SimplePolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (SimplePolygonF f point) point r) => f0 point -> Maybe (SimplePolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => SimplePolygonF f point -> point' Source #

type SimplePolygon = SimplePolygonF (Cyclic NonEmptyVector) Source #

By default we store simple polygons as non-empty circular vectors.

newtype SimplePolygonF f point Source #

Simple polygons just store their vertices in CCCW order

Constructors

MkSimplePolygon (f point) 

Instances

Instances details
Foldable f => Foldable (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

fold :: Monoid m => SimplePolygonF f m -> m #

foldMap :: Monoid m => (a -> m) -> SimplePolygonF f a -> m #

foldMap' :: Monoid m => (a -> m) -> SimplePolygonF f a -> m #

foldr :: (a -> b -> b) -> b -> SimplePolygonF f a -> b #

foldr' :: (a -> b -> b) -> b -> SimplePolygonF f a -> b #

foldl :: (b -> a -> b) -> b -> SimplePolygonF f a -> b #

foldl' :: (b -> a -> b) -> b -> SimplePolygonF f a -> b #

foldr1 :: (a -> a -> a) -> SimplePolygonF f a -> a #

foldl1 :: (a -> a -> a) -> SimplePolygonF f a -> a #

toList :: SimplePolygonF f a -> [a] #

null :: SimplePolygonF f a -> Bool #

length :: SimplePolygonF f a -> Int #

elem :: Eq a => a -> SimplePolygonF f a -> Bool #

maximum :: Ord a => SimplePolygonF f a -> a #

minimum :: Ord a => SimplePolygonF f a -> a #

sum :: Num a => SimplePolygonF f a -> a #

product :: Num a => SimplePolygonF f a -> a #

Foldable1 f => Foldable1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

fold1 :: Semigroup m => SimplePolygonF f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> SimplePolygonF f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> SimplePolygonF f a -> m #

toNonEmpty :: SimplePolygonF f a -> NonEmpty a #

maximum :: Ord a => SimplePolygonF f a -> a #

minimum :: Ord a => SimplePolygonF f a -> a #

head :: SimplePolygonF f a -> a #

last :: SimplePolygonF f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> SimplePolygonF f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> SimplePolygonF f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> SimplePolygonF f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> SimplePolygonF f a -> b #

Eq1 f => Eq1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

liftEq :: (a -> b -> Bool) -> SimplePolygonF f a -> SimplePolygonF f b -> Bool #

Ord1 f => Ord1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

liftCompare :: (a -> b -> Ordering) -> SimplePolygonF f a -> SimplePolygonF f b -> Ordering #

Traversable f => Traversable (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

traverse :: Applicative f0 => (a -> f0 b) -> SimplePolygonF f a -> f0 (SimplePolygonF f b) #

sequenceA :: Applicative f0 => SimplePolygonF f (f0 a) -> f0 (SimplePolygonF f a) #

mapM :: Monad m => (a -> m b) -> SimplePolygonF f a -> m (SimplePolygonF f b) #

sequence :: Monad m => SimplePolygonF f (m a) -> m (SimplePolygonF f a) #

Functor f => Functor (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

fmap :: (a -> b) -> SimplePolygonF f a -> SimplePolygonF f b #

(<$) :: a -> SimplePolygonF f b -> SimplePolygonF f a #

Traversable1 f => Traversable1 (SimplePolygonF f) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> SimplePolygonF f a -> f0 (SimplePolygonF f b) Source #

sequence1 :: Apply f0 => SimplePolygonF f (f0 b) -> f0 (SimplePolygonF f b) Source #

(SimplePolygon_ (SimplePolygonF f point) point r, Num r, Ord r) => HasIntersectionWith (Point 2 r) (SimplePolygonF f point) 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

intersects :: Point 2 r -> SimplePolygonF f point -> Bool

(SimplePolygon_ (SimplePolygonF f point) point r, Num r, Ord r) => IsIntersectableWith (Point 2 r) (SimplePolygonF f point) 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

intersect :: Point 2 r -> SimplePolygonF f point -> Intersection (Point 2 r) (SimplePolygonF f point)

(HasFromFoldable1 f, FromJSON point) => FromJSON (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

(Foldable f, ToJSON point) => ToJSON (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Generic (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Associated Types

type Rep (SimplePolygonF f point) :: Type -> Type #

Methods

from :: SimplePolygonF f point -> Rep (SimplePolygonF f point) x #

to :: Rep (SimplePolygonF f point) x -> SimplePolygonF f point #

(Read point, SimplePolygon_ (SimplePolygonF f point) point r) => Read (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(Show point, SimplePolygon_ (SimplePolygonF f point) point r) => Show (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

showsPrec :: Int -> SimplePolygonF f point -> ShowS #

show :: SimplePolygonF f point -> String #

showList :: [SimplePolygonF f point] -> ShowS #

NFData (f point) => NFData (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

rnf :: SimplePolygonF f point -> () #

Eq (f point) => Eq (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

(==) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(/=) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

Ord (f point) => Ord (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

compare :: SimplePolygonF f point -> SimplePolygonF f point -> Ordering #

(<) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(<=) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(>) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

(>=) :: SimplePolygonF f point -> SimplePolygonF f point -> Bool #

max :: SimplePolygonF f point -> SimplePolygonF f point -> SimplePolygonF f point #

min :: SimplePolygonF f point -> SimplePolygonF f point -> SimplePolygonF f point #

HasHoles (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type HoleIx (SimplePolygonF f point) Source #

type HoleF (SimplePolygonF f point) :: Type -> Type Source #

VertexContainer f point => HasOuterBoundary (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

(VertexContainer f point, Point_ point 2 r) => IsBoxable (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (SimplePolygonF f point), r ~ NumType (SimplePolygonF f point), Ord r) => SimplePolygonF f point -> Box (Point d r)

(VertexContainer f point, DefaultTransformByConstraints (SimplePolygonF f point) 2 r, Point_ point 2 r) => IsTransformable (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

transformBy :: Transformation (Dimension (SimplePolygonF f point)) (NumType (SimplePolygonF f point)) -> SimplePolygonF f point -> SimplePolygonF f point

(ShiftedEq (f point), ElemCyclic (f point) ~ point) => ShiftedEq (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Associated Types

type ElemCyclic (SimplePolygonF f point) Source #

Methods

isShiftOf :: SimplePolygonF f point -> SimplePolygonF f point -> Bool Source #

VertexContainer f point => HasVertices' (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type Vertex (SimplePolygonF f point) Source #

type VertexIx (SimplePolygonF f point) Source #

(Point_ point 2 r, HasFromFoldable1 f, VertexContainer f point) => Polygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

extremes :: Vector 2 r -> SimplePolygonF f point -> (point, point) Source #

ccwPredecessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

ccwSuccessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) Source #

(Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f) => SimplePolygon_ (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Associated Types

type ConstructableSimplePolygon (SimplePolygonF f point) point r Source #

Methods

uncheckedFromCCWPoints :: Foldable f0 => f0 point -> SimplePolygonF f point Source #

fromPoints :: (Foldable f0, ConstructableSimplePolygon (SimplePolygonF f point) point r) => f0 point -> Maybe (SimplePolygonF f point) Source #

centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => SimplePolygonF f point -> point' Source #

SimplePolygon_ (SimplePolygonF f point) point r => HasInPolygon (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

Methods

inPolygon :: (Num r, Ord r, Point_ queryPoint 2 r) => queryPoint -> SimplePolygonF f point -> PointLocationResultWith (VertexIx (SimplePolygonF f point)) Source #

VertexContainer f point => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') Source # 
Instance details

Defined in HGeometry.Polygon.Simple

VertexContainer f point => HasPoints (SimplePolygonF f point) (SimplePolygonF f point') point point' Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (SimplePolygonF f point) ~ r, NumType (SimplePolygonF f point') ~ r', Dimension (SimplePolygonF f point) ~ d, Dimension (SimplePolygonF f point') ~ d) => Traversal1 (SimplePolygonF f point) (SimplePolygonF f point') point point'

type Intersection (Point 2 r) (SimplePolygonF f point) 
Instance details

Defined in HGeometry.Polygon.Simple

type Intersection (Point 2 r) (SimplePolygonF f point) = Maybe (Point 2 r)
type Rep (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type Rep (SimplePolygonF f point) = D1 ('MetaData "SimplePolygonF" "HGeometry.Polygon.Simple.Type" "hgeometry-1.0.0.0-inplace" 'True) (C1 ('MetaCons "MkSimplePolygon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f point))))
type HoleF (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type HoleIx (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type HoleIx (SimplePolygonF f point) = Void
type Dimension (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type Dimension (SimplePolygonF f point) = 2
type NumType (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type NumType (SimplePolygonF f point) = NumType point
type ElemCyclic (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple.Type

type ElemCyclic (SimplePolygonF f point) = point
type Vertex (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type Vertex (SimplePolygonF f point) = point
type VertexIx (SimplePolygonF f point) Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type VertexIx (SimplePolygonF f point) = Int
type ConstructableSimplePolygon (SimplePolygonF f point) point r Source # 
Instance details

Defined in HGeometry.Polygon.Simple

type ConstructableSimplePolygon (SimplePolygonF f point) point r = (Eq r, Num r)

toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point Source #

Get the underlying cyclic vector.

type VertexContainer f point = (IxValue (f point) ~ point, Index (f point) ~ Int, TraversableWithIndex Int f, Traversable1 f, Ixed (f point), HasDirectedTraversals f) Source #

shortcut for all default properties of f we need to store the vertices.

class HasInPolygon polygon point r | polygon -> point, point -> r where Source #

Types that implement a point-in-polygon test.

Minimal complete definition

Nothing

Methods

inPolygon :: (Num r, Ord r, Point_ queryPoint 2 r) => queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon) Source #

Check if a point lies inside a polygon, on the boundary, or outside of the polygon. If the point lies on the boundary we also return an edge e containing the point (identified by the vertex v so that e follows v in the CCW order along the boundary). No guarantees are given about which edge is returned if the query point diff --git a/haddocks/hgeometry/HGeometry-VoronoiDiagram.html b/haddocks/hgeometry/HGeometry-VoronoiDiagram.html index 12e69b1d3..50497d0b8 100644 --- a/haddocks/hgeometry/HGeometry-VoronoiDiagram.html +++ b/haddocks/hgeometry/HGeometry-VoronoiDiagram.html @@ -1,2 +1,2 @@ -HGeometry.VoronoiDiagram

Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.VoronoiDiagram

Description

Voronoi Diagrams of points in the plane

Synopsis

Documentation

data VoronoiDiagram point Source #

A Voronoi diagram

Constructors

AllColinear !(Set (ColinearPoint point)) 
ConnectedVD !(VoronoiDiagram' point) 

Instances

Instances details
(Show point, Show (NumType point)) => Show (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

Methods

showsPrec :: Int -> VoronoiDiagram point -> ShowS #

show :: VoronoiDiagram point -> String #

showList :: [VoronoiDiagram point] -> ShowS #

(Eq point, Eq (NumType point)) => Eq (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

Methods

(==) :: VoronoiDiagram point -> VoronoiDiagram point -> Bool #

(/=) :: VoronoiDiagram point -> VoronoiDiagram point -> Bool #

type Dimension (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type Dimension (VoronoiDiagram point) = 2
type NumType (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type NumType (VoronoiDiagram point) = NumType point

newtype VoronoiDiagram' point Source #

A connected VoronoiDiagram

Constructors

VoronoiDiagram (LowerEnvelope' (Plane (NumType point) :+ point)) 

Instances

Instances details
(Show point, Show (NumType point)) => Show (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

(Eq point, Eq (NumType point)) => Eq (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

Methods

(==) :: VoronoiDiagram' point -> VoronoiDiagram' point -> Bool #

(/=) :: VoronoiDiagram' point -> VoronoiDiagram' point -> Bool #

(Ord (NumType point), Num (NumType point)) => IsBoxable (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

Methods

boundingBox :: forall (d :: Nat) r. (d ~ Dimension (VoronoiDiagram' point), r ~ NumType (VoronoiDiagram' point), Ord r) => VoronoiDiagram' point -> Box (Point d r)

type Dimension (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type Dimension (VoronoiDiagram' point) = 2
type NumType (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type NumType (VoronoiDiagram' point) = NumType point

voronoiDiagram :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r) => f point -> VoronoiDiagram point Source #

Computes the Voronoi Diagram, by lifting the points to planes, and computing - the lower envelope of these planes.

\(O(n\log n)\)

voronoiVertices :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable f) => f point -> [Point 2 r] Source #

Computes all voronoi vertices

edgeGeometries :: (Point_ point 2 r, Ord r, Fractional r, Show point, Show r) => Fold (VoronoiDiagram' point) (EdgeGeometry (Point 2 r)) Source #

Get the halflines and line segments representing the VoronoiDiagram

\ No newline at end of file +HGeometry.VoronoiDiagram
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.VoronoiDiagram

Description

Voronoi Diagrams of points in the plane

Synopsis

Documentation

data VoronoiDiagram point Source #

A Voronoi diagram

Constructors

AllColinear !(Alternating Vector (VerticalOrLineEQ (NumType point)) point) 
ConnectedVD !(VoronoiDiagram' point) 

Instances

Instances details
(Show point, Show (NumType point)) => Show (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

Methods

showsPrec :: Int -> VoronoiDiagram point -> ShowS #

show :: VoronoiDiagram point -> String #

showList :: [VoronoiDiagram point] -> ShowS #

(Eq point, Eq (NumType point)) => Eq (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

Methods

(==) :: VoronoiDiagram point -> VoronoiDiagram point -> Bool #

(/=) :: VoronoiDiagram point -> VoronoiDiagram point -> Bool #

type Dimension (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type Dimension (VoronoiDiagram point) = 2
type NumType (VoronoiDiagram point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type NumType (VoronoiDiagram point) = NumType point

newtype VoronoiDiagram' point Source #

A connected VoronoiDiagram

Constructors

VoronoiDiagram (MinimizationDiagram (NumType point) point) 

Instances

Instances details
(Show point, Show (NumType point)) => Show (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

(Eq point, Eq (NumType point)) => Eq (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

Methods

(==) :: VoronoiDiagram' point -> VoronoiDiagram' point -> Bool #

(/=) :: VoronoiDiagram' point -> VoronoiDiagram' point -> Bool #

type Dimension (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type Dimension (VoronoiDiagram' point) = 2
type NumType (VoronoiDiagram' point) Source # 
Instance details

Defined in HGeometry.VoronoiDiagram.ViaLowerEnvelope

type NumType (VoronoiDiagram' point) = NumType point

voronoiDiagram :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r) => f point -> VoronoiDiagram point Source #

Computes the Voronoi Diagram, by lifting the points to planes, and computing + the lower envelope of these planes.

O(n^4) ( we currently use the brute force implentation...) TODO: switch to something faster

voronoiVertices :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r, Ord point) => f point -> Set (Point 2 r) Source #

Compute the vertices of the Voronoi diagram

asMap :: (Point_ point 2 r, Ord point) => VoronoiDiagram' point -> Map point (Region r (Point 2 r)) Source #

Get, for each point, its Voronoi region

\ No newline at end of file diff --git a/haddocks/hgeometry/doc-index.json b/haddocks/hgeometry/doc-index.json index ff35a6d4f..bc5eff512 100644 --- a/haddocks/hgeometry/doc-index.json +++ b/haddocks/hgeometry/doc-index.json @@ -1 +1 @@ -[{"display_html":"newtype BezierSplineF f point where","name":"BezierSplineF Bezier2 Bezier3 BezierSpline","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:BezierSplineF"},{"display_html":"type BezierSpline = BezierSplineF NonEmptyVector","name":"BezierSpline","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:BezierSpline"},{"display_html":"type QuadraticBezier = BezierSplineF (Vector 3)","name":"QuadraticBezier","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:QuadraticBezier"},{"display_html":"type CubicBezier = BezierSplineF (Vector 4)","name":"CubicBezier","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:CubicBezier"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#v:closestPair"},{"display_html":"type CP point = Top (SP (Two point) (NumType point))","name":"CP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#t:CP"},{"display_html":"data CCP point = CCP (NonEmpty point) !(CP point)","name":"CCP CCP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#t:CCP"},{"display_html":"mergePairs :: forall point r. (Ord r, Num r, Point_ point 2 r) => CP point -> NonEmpty point -> NonEmpty point -> CP point","name":"mergePairs","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#v:mergePairs"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair","link":"HGeometry-ClosestPair.html#v:closestPair"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point d r, Foldable1 f, Has_ Metric_ d r) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.Naive","link":"HGeometry-ClosestPair-Naive.html#v:closestPair"},{"display_html":"closestPairWith :: (Ord r, Point_ point d r, Foldable1 f) => DistanceFunction point -> f point -> SP (Vector 2 point) r","name":"closestPairWith","module":"HGeometry.ClosestPair.Naive","link":"HGeometry-ClosestPair-Naive.html#v:closestPairWith"},{"display_html":"type DistanceFunction g = g -> g -> NumType g","name":"DistanceFunction","module":"HGeometry.ClosestPair.Naive","link":"HGeometry-ClosestPair-Naive.html#t:DistanceFunction"},{"display_html":"type ConvexHull point = [Triangle point]","name":"ConvexHull","module":"HGeometry.ConvexHull.R3.Naive","link":"HGeometry-ConvexHull-R3-Naive.html#t:ConvexHull"},{"display_html":"lowerHull' :: forall point r. (Ord r, Fractional r, Show r, Point_ point 3 r) => NonEmpty point -> ConvexHull point","name":"lowerHull'","module":"HGeometry.ConvexHull.R3.Naive","link":"HGeometry-ConvexHull-R3-Naive.html#v:lowerHull-39-"},{"display_html":"lowerHullAll :: (Ord r, Fractional r, Show r, Point_ point 3 r) => NonEmpty point -> ConvexHull point","name":"lowerHullAll","module":"HGeometry.ConvexHull.R3.Naive","link":"HGeometry-ConvexHull-R3-Naive.html#v:lowerHullAll"},{"display_html":"isValidTriangle :: (Num r, Ord r, Point_ point 3 r) => Triangle point -> [point] -> Maybe point","name":"isValidTriangle","module":"HGeometry.ConvexHull.R3.Naive","link":"HGeometry-ConvexHull-R3-Naive.html#v:isValidTriangle"},{"display_html":"upperHalfSpaceOf :: (Ord r, Num r, Point_ point 3 r) => Triangle point -> HalfSpace 3 r","name":"upperHalfSpaceOf","module":"HGeometry.ConvexHull.R3.Naive","link":"HGeometry-ConvexHull-R3-Naive.html#v:upperHalfSpaceOf"},{"display_html":"data Camera r = Camera !(Point 3 r) !(Vector 3 r) !(Vector 3 r) !r !r !r !(Vector 2 r)","name":"Camera Camera","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#t:Camera"},{"display_html":"cameraPosition :: Lens' (Camera r) (Point 3 r)","name":"cameraPosition","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:cameraPosition"},{"display_html":"rawCameraNormal :: Lens' (Camera r) (Vector 3 r)","name":"rawCameraNormal","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:rawCameraNormal"},{"display_html":"rawViewUp :: Lens' (Camera r) (Vector 3 r)","name":"rawViewUp","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:rawViewUp"},{"display_html":"viewPlaneDepth :: Lens' (Camera r) r","name":"viewPlaneDepth","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:viewPlaneDepth"},{"display_html":"nearDist :: Lens' (Camera r) r","name":"nearDist","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:nearDist"},{"display_html":"farDist :: Lens' (Camera r) r","name":"farDist","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:farDist"},{"display_html":"screenDimensions :: Lens' (Camera r) (Vector 2 r)","name":"screenDimensions","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:screenDimensions"},{"display_html":"cameraNormal :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"cameraNormal","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:cameraNormal"},{"display_html":"viewUp :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"viewUp","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:viewUp"},{"display_html":"cameraTransform :: Fractional r => Camera r -> Transformation 3 r","name":"cameraTransform","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:cameraTransform"},{"display_html":"worldToView :: Fractional r => Camera r -> Transformation 3 r","name":"worldToView","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:worldToView"},{"display_html":"toViewPort :: Fractional r => Camera r -> Transformation 3 r","name":"toViewPort","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:toViewPort"},{"display_html":"perspectiveProjection :: Fractional r => Camera r -> Transformation 3 r","name":"perspectiveProjection","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:perspectiveProjection"},{"display_html":"rotateCoordSystem :: Num r => Camera r -> Transformation 3 r","name":"rotateCoordSystem","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:rotateCoordSystem"},{"display_html":"flipAxes :: Num r => Transformation 3 r","name":"flipAxes","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:flipAxes"},{"display_html":"data IntervalTree interval r","name":"IntervalTree","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#t:IntervalTree"},{"display_html":"createTree :: (Foldable f, Ord r) => f r -> IntervalTree interval r","name":"createTree","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:createTree"},{"display_html":"fromIntervals :: (Foldable f, Ord r, ClosedInterval_ interval r) => f interval -> IntervalTree interval r","name":"fromIntervals","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:fromIntervals"},{"display_html":"insert :: (Ord r, ClosedInterval_ interval r) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"insert","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:insert"},{"display_html":"delete :: (Ord r, ClosedInterval_ interval r, Eq interval) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"delete","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:delete"},{"display_html":"stab :: Ord r => r -> IntervalTree interval r -> [interval]","name":"stab","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:stab"},{"display_html":"search :: Ord r => r -> IntervalTree interval r -> [interval]","name":"search","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:search"},{"display_html":"listIntervals :: IntervalTree interval r -> [interval]","name":"listIntervals","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:listIntervals"},{"display_html":"intersections :: (Ord r, Fractional r, LineSegment_ lineSegment point, Eq lineSegment, Point_ point 2 r, IntersectConstraints lineSegment, Foldable f) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:intersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:Intersections"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:OrdArounds"},{"display_html":"intersections :: forall lineSegment point r f. (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, HasOnSegment lineSegment 2, IntersectConstraints lineSegment, Foldable f, Functor f, StartPointOf lineSegment ~ EndPointOf lineSegment) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersections"},{"display_html":"interiorIntersections :: (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, IntersectConstraints lineSegment, StartPointOf lineSegment ~ EndPointOf lineSegment, HasOnSegment lineSegment 2, Foldable f, Functor f) => f lineSegment -> Intersections r lineSegment","name":"interiorIntersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorIntersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Intersections"},{"display_html":"intersectionPoints :: Intersections r lineSegment -> Set (Point 2 r)","name":"intersectionPoints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoints"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:OrdArounds"},{"display_html":"type PlaneGraph k v e = Map k (Map e k, v)","name":"PlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:PlaneGraph"},{"display_html":"newtype E r = E (Vector 2 r)","name":"E E","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:E"},{"display_html":"toPlaneGraph :: (Plane_ plane r, Num r, Ord r) => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r)","name":"toPlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"HGeometry-Plane-LowerEnvelope-Connected-Graph.html#v:toPlaneGraph"},{"display_html":"intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r)","name":"intersectionPoint","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:intersectionPoint"},{"display_html":"intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r)","name":"intersectionLine","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:intersectionLine"},{"display_html":"intersectionVector :: (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r)","name":"intersectionVector","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:intersectionVector"},{"display_html":"type MinimizationDiagram r plane = Map plane (Region r (Point 2 r))","name":"MinimizationDiagram","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:MinimizationDiagram"},{"display_html":"data Region r point","name":"Region Bounded Unbounded","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:Region"},{"display_html":"type CircularList a = [a]","name":"CircularList","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:CircularList"},{"display_html":"fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) => VertexForm r plane -> MinimizationDiagram r plane","name":"fromVertexForm","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:fromVertexForm"},{"display_html":"data Definers plane","name":"Definers","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:Definers"},{"display_html":"fromCCWList :: [plane] -> Definers plane","name":"fromCCWList","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:fromCCWList"},{"display_html":"definers :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r, Definers plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:definers"},{"display_html":"mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane","name":"mergeDefiners","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:mergeDefiners"},{"display_html":"type VertexForm r plane = Map (Point 3 r) (Definers plane)","name":"VertexForm","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#t:VertexForm"},{"display_html":"bruteForceLowerEnvelope :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> MinimizationDiagram r plane","name":"bruteForceLowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:bruteForceLowerEnvelope"},{"display_html":"computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane","name":"computeVertexForm","module":"HGeometry.Plane.LowerEnvelope.ConnectedNew","link":"HGeometry-Plane-LowerEnvelope-ConnectedNew.html#v:computeVertexForm"},{"display_html":"newtype VertexForm plane = VertexForm (Map (Point 3 (NumType plane)) (Definers plane))","name":"VertexForm VertexForm","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#t:VertexForm"},{"display_html":"hasVertices :: VertexForm plane -> Bool","name":"hasVertices","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:hasVertices"},{"display_html":"vertices' :: IndexedTraversal' (VertexIx (VertexForm plane)) (VertexForm plane) (Vertex (VertexForm plane))","name":"vertices'","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:vertices-39-"},{"display_html":"singleton :: LEVertex plane -> VertexForm plane","name":"singleton","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:singleton"},{"display_html":"type LEVertex = BoundedVertexF (Const ())","name":"LEVertex","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#t:LEVertex"},{"display_html":"pattern LEVertex :: Point 3 (NumType plane) -> Definers plane -> LEVertex plane","name":"LEVertex","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:LEVertex"},{"display_html":"type Definers plane = Set plane","name":"Definers","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#t:Definers"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:location2"},{"display_html":"intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r)","name":"intersectionLine","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:intersectionLine"},{"display_html":"intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r)","name":"intersectionPoint","module":"HGeometry.Plane.LowerEnvelope.VertexForm","link":"HGeometry-Plane-LowerEnvelope-VertexForm.html#v:intersectionPoint"},{"display_html":"data LowerEnvelope' plane = LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane))","name":"LowerEnvelope' LowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:LowerEnvelope-39-"},{"display_html":"theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane)","name":"theUnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:theUnboundedVertex"},{"display_html":"boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane))","name":"boundedVertices","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:boundedVertices"},{"display_html":"singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane","name":"singleton","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:singleton"},{"display_html":"fromVertexForm' :: forall plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r) => VertexForm plane -> LowerEnvelope' plane","name":"fromVertexForm'","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:fromVertexForm-39-"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:location2"},{"display_html":"newtype UnboundedVertex plane = UnboundedVertex (Seq (LEEdge plane))","name":"UnboundedVertex UnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:UnboundedVertex"},{"display_html":"unboundedVertexId :: VertexID","name":"unboundedVertexId","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:unboundedVertexId"},{"display_html":"class HasUnboundedEdges t e | t -> e where","name":"HasUnboundedEdges unboundedEdges","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:HasUnboundedEdges"},{"display_html":"type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point)","name":"EdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:EdgeGeometry"},{"display_html":"projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r))","name":"projectedEdgeGeometries","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:projectedEdgeGeometries"},{"display_html":"projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r)","name":"projectedEdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:projectedEdgeGeometry"},{"display_html":"data LowerEnvelope plane","name":"LowerEnvelope ConnectedEnvelope ParallelStrips","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:LowerEnvelope"},{"display_html":"data LowerEnvelope' plane = LowerEnvelope !(UnboundedVertex plane) (Seq (BoundedVertex plane))","name":"LowerEnvelope' LowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:LowerEnvelope-39-"},{"display_html":"data ParallelPlane plane","name":"ParallelPlane","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:ParallelPlane"},{"display_html":"theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane)","name":"theUnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:theUnboundedVertex"},{"display_html":"boundedVertices :: Lens' (LowerEnvelope' plane) (Seq (BoundedVertex plane))","name":"boundedVertices","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:boundedVertices"},{"display_html":"singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) => LEVertex plane -> LowerEnvelope' plane","name":"singleton","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:singleton"},{"display_html":"fromVertexForm :: forall f plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, Show r, Foldable1 f) => f plane -> VertexForm plane -> LowerEnvelope plane","name":"fromVertexForm","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:fromVertexForm"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:location2"},{"display_html":"newtype UnboundedVertex plane = UnboundedVertex (Seq (LEEdge plane))","name":"UnboundedVertex UnboundedVertex","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:UnboundedVertex"},{"display_html":"unboundedVertexId :: VertexID","name":"unboundedVertexId","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:unboundedVertexId"},{"display_html":"class HasUnboundedEdges t e | t -> e where","name":"HasUnboundedEdges unboundedEdges","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:HasUnboundedEdges"},{"display_html":"type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point)","name":"EdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#t:EdgeGeometry"},{"display_html":"projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => IndexedFold (EdgeIx (LowerEnvelope' plane)) (LowerEnvelope' plane) (EdgeGeometry (Point 2 r))","name":"projectedEdgeGeometries","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:projectedEdgeGeometries"},{"display_html":"projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => LowerEnvelope' plane -> EdgeIx (LowerEnvelope' plane) -> Edge (LowerEnvelope' plane) -> EdgeGeometry (Point 2 r)","name":"projectedEdgeGeometry","module":"HGeometry.Plane.LowerEnvelope.AdjListForm","link":"HGeometry-Plane-LowerEnvelope-AdjListForm.html#v:projectedEdgeGeometry"},{"display_html":"lowerEnvelope :: (Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f, Ord plane, Show plane, Show r) => f plane -> LowerEnvelope plane","name":"lowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelope"},{"display_html":"lowerEnvelopeVertexForm :: (Plane_ plane r, Ord r, Fractional r, Foldable f, Ord plane) => f plane -> VertexForm plane","name":"lowerEnvelopeVertexForm","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelopeVertexForm"},{"display_html":"asVertex :: (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) => f plane -> Three plane -> Maybe (LEVertex plane)","name":"asVertex","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"HGeometry-Plane-LowerEnvelope-Naive.html#v:asVertex"},{"display_html":"belowAll :: (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool","name":"belowAll","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"HGeometry-Plane-LowerEnvelope-Naive.html#v:belowAll"},{"display_html":"module HGeometry.Plane.LowerEnvelope.Naive","name":"","module":"HGeometry.Plane.LowerEnvelope","link":""},{"display_html":"type VertexID = Int","name":"VertexID","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#t:VertexID"},{"display_html":"data BoundedVertexF f plane = Vertex !(Point 3 (NumType plane)) (Set plane) (f (LEEdge plane))","name":"BoundedVertexF Vertex","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#t:BoundedVertexF"},{"display_html":"location :: NumType plane ~ r => Lens' (BoundedVertexF f plane) (Point 3 r)","name":"location","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:location"},{"display_html":"definers :: Lens' (BoundedVertexF f plane) (Set plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:definers"},{"display_html":"location2 :: NumType plane ~ r => Getter (BoundedVertexF f plane) (Point 2 r)","name":"location2","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:location2"},{"display_html":"incidentEdgesB :: Lens (BoundedVertexF f plane) (BoundedVertexF g plane) (f (LEEdge plane)) (g (LEEdge plane))","name":"incidentEdgesB","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:incidentEdgesB"},{"display_html":"traverseBoundedV :: (Traversable f, Applicative g, NumType plane ~ NumType plane', Ord plane') => (plane -> g plane') -> BoundedVertexF f plane -> g (BoundedVertexF f plane')","name":"traverseBoundedV","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:traverseBoundedV"},{"display_html":"data LEEdge plane = Edge !VertexID plane plane","name":"LEEdge Edge","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#t:LEEdge"},{"display_html":"destination :: Getter (LEEdge plane) VertexID","name":"destination","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:destination"},{"display_html":"leftPlane :: Lens' (LEEdge plane) plane","name":"leftPlane","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:leftPlane"},{"display_html":"rightPlane :: Lens' (LEEdge plane) plane","name":"rightPlane","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:rightPlane"},{"display_html":"flipEdge :: VertexID -> LEEdge plane -> LEEdge plane","name":"flipEdge","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:flipEdge"},{"display_html":"module HGeometry.Plane.LowerEnvelope.AdjListForm","name":"","module":"HGeometry.Plane.LowerEnvelope","link":""},{"display_html":"type UpperHull point = LowerEnvelope (NonVerticalHyperPlane 3 (NumType point) :+ point)","name":"UpperHull","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"HGeometry-ConvexHull-R3-Naive-Dual.html#t:UpperHull"},{"display_html":"upperHull :: (Point_ point 3 r, Ord r, Fractional r, Foldable1 f, Functor f, Show point, Show r, Ord point) => f point -> UpperHull point","name":"upperHull","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"HGeometry-ConvexHull-R3-Naive-Dual.html#v:upperHull"},{"display_html":"type Facet point = [point]","name":"Facet","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"HGeometry-ConvexHull-R3-Naive-Dual.html#t:Facet"},{"display_html":"facets :: UpperHull point -> [Facet point]","name":"facets","module":"HGeometry.ConvexHull.R3.Naive.Dual","link":"HGeometry-ConvexHull-R3-Naive-Dual.html#v:facets"},{"display_html":"class (HasVertices polyLine polyLine, HasPoints' polyLine point, HasStart polyLine point, HasEnd polyLine point, Vertex polyLine ~ point, Point_ point (Dimension point) (NumType point), NumType polyLine ~ NumType point, Dimension polyLine ~ Dimension point) => PolyLine_ polyLine point | polyLine -> point","name":"PolyLine_","module":"HGeometry.PolyLine.Class","link":"HGeometry-PolyLine-Class.html#t:PolyLine_"},{"display_html":"class PolyLine_ polyLine point => ConstructablePolyLine_ polyLine point where","name":"ConstructablePolyLine_ polyLineFromPoints","module":"HGeometry.PolyLine.Class","link":"HGeometry-PolyLine-Class.html#t:ConstructablePolyLine_"},{"display_html":"_PolyLineLineSegment :: (ConstructableLineSegment_ lineSegment point, ConstructablePolyLine_ polyLine point) => Prism' polyLine lineSegment","name":"_PolyLineLineSegment","module":"HGeometry.PolyLine.Class","link":"HGeometry-PolyLine-Class.html#v:_PolyLineLineSegment"},{"display_html":"newtype PolyLineF f point = PolyLine (f point)","name":"PolyLineF PolyLine","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:PolyLineF"},{"display_html":"type PolyLine = PolyLineF NonEmptyVector","name":"PolyLine","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:PolyLine"},{"display_html":"_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') (f point) (f' point')","name":"_PolyLineF","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#v:_PolyLineF"},{"display_html":"module HGeometry.PolyLine.Class","name":"","module":"HGeometry.PolyLine","link":""},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:HasVertices"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:HasEdges"},{"display_html":"frechetDistanceWith :: (HasVertices' polyLine, HasVertices' polyLine', Ord r, VertexIx polyLine ~ Int, VertexIx polyLine' ~ Int) => (Vertex polyLine -> Vertex polyLine' -> r) -> polyLine -> polyLine' -> r","name":"frechetDistanceWith","module":"HGeometry.PolyLine.Frechet.Discrete","link":"HGeometry-PolyLine-Frechet-Discrete.html#v:frechetDistanceWith"},{"display_html":"douglasPeucker :: forall polyLine point d r. (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLineF ViewR1 point","name":"douglasPeucker","module":"HGeometry.PolyLine.Simplification.DouglasPeucker","link":"HGeometry-PolyLine-Simplification-DouglasPeucker.html#v:douglasPeucker"},{"display_html":"simplify :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLine point","name":"simplify","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplify"},{"display_html":"simplifyWith :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r) => (ClosedLineSegment point -> PolyLine point -> Bool) -> polyLine -> PolyLine point","name":"simplifyWith","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplifyWith"},{"display_html":"class HasVertices polygon polygon => HasOuterBoundary polygon where","name":"HasOuterBoundary outerBoundaryVertexAt ccwOuterBoundaryFrom cwOuterBoundaryFrom outerBoundary outerBoundaryEdgeAt outerBoundaryEdges","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasOuterBoundary"},{"display_html":"signedArea2X :: (Num r, HasOuterBoundary simplePolygon, Point_ point 2 r, Vertex simplePolygon ~ point) => simplePolygon -> r","name":"signedArea2X","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:signedArea2X"},{"display_html":"minimumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"minimumVertexBy","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:minimumVertexBy"},{"display_html":"maximumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"maximumVertexBy","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:maximumVertexBy"},{"display_html":"outerBoundaryEdgeSegmentAt :: (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => VertexIx polygon -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegmentAt","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegmentAt"},{"display_html":"outerBoundaryEdgeSegments :: forall polygon point r. (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => IndexedFold1 (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegments","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegments"},{"display_html":"outerBoundaryWithNeighbours :: (HasOuterBoundary polygon, VertexIx polygon ~ Int) => IndexedFold1 (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) polygon (Vertex polygon, (Vertex polygon, Vertex polygon))","name":"outerBoundaryWithNeighbours","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:outerBoundaryWithNeighbours"},{"display_html":"type Hole polygon = SimplePolygonF (HoleF polygon) (Vertex polygon)","name":"Hole","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:Hole"},{"display_html":"class VertexContainer (HoleF polygon) (Vertex polygon) => HasHoles polygon where","name":"HasHoles HoleF HoleIx holes holeAt","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasHoles"},{"display_html":"class (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r, NumType polygon ~ r, Dimension polygon ~ 2, HasHoles polygon) => Polygon_ polygon point r where","name":"Polygon_ ccwPredecessorOf ccwSuccessorOf extremes","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:Polygon_"},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasVertices"},{"display_html":"class HasVertices' graph where","name":"HasVertices' Vertex VertexIx vertexAt numVertices","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasVertices-39-"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasEdges"},{"display_html":"class HasEdges' graph where","name":"HasEdges' Edge EdgeIx edgeAt numEdges","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasEdges-39-"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple.Class","link":"HGeometry-Polygon-Simple-Class.html#t:SimplePolygon_"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex.Class","link":"HGeometry-Polygon-Convex-Class.html#t:ConvexPolygon_"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:SimplePolygon_"},{"display_html":"type SimplePolygon = SimplePolygonF (Cyclic NonEmptyVector)","name":"SimplePolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:SimplePolygon"},{"display_html":"newtype SimplePolygonF f point = MkSimplePolygon (f point)","name":"SimplePolygonF MkSimplePolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:SimplePolygonF"},{"display_html":"toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point","name":"toCyclic","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#v:toCyclic"},{"display_html":"type VertexContainer f point = (IxValue (f point) ~ point, Index (f point) ~ Int, TraversableWithIndex Int f, Traversable1 f, Ixed (f point), HasDirectedTraversals f)","name":"VertexContainer","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:VertexContainer"},{"display_html":"class HasInPolygon polygon point r | polygon -> point, point -> r where
  • inPolygon :: (Num r, Ord r, Point_ queryPoint 2 r) => queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon)
","name":"HasInPolygon inPolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:HasInPolygon"},{"display_html":"inSimplePolygon :: forall queryPoint simplePolygon point r. (Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r, SimplePolygon_ simplePolygon point r) => queryPoint -> simplePolygon -> PointLocationResultWith (VertexIx simplePolygon)","name":"inSimplePolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#v:inSimplePolygon"},{"display_html":"hasNoSelfIntersections :: forall f point r. (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) => f point -> Bool","name":"hasNoSelfIntersections","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#v:hasNoSelfIntersections"},{"display_html":"module HGeometry.Polygon.Simple.Class","name":"","module":"HGeometry.Polygon.Simple","link":""},{"display_html":"class (PlanarGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex), NumType vertex ~ NumType planeGraph) => PlaneGraph_ planeGraph vertex | planeGraph -> vertex where","name":"PlaneGraph_ fromEmbedding interiorFaces outerFace outerFaceDart outerFaceId","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#t:PlaneGraph_"},{"display_html":"dartSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => DartIx planeGraph -> IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:dartSegmentAt"},{"display_html":"edgeSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => EdgeIx planeGraph -> IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:edgeSegmentAt"},{"display_html":"dartSegments :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegments","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:dartSegments"},{"display_html":"edgeSegments :: forall planeGraph vertex. (HasEdges planeGraph planeGraph, BidirGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex)) => IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegments","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:edgeSegments"},{"display_html":"interiorFacePolygonAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => FaceIx planeGraph -> IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygonAt","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:interiorFacePolygonAt"},{"display_html":"interiorFacePolygons :: forall planeGraph vertex r. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 r, Ord r, Num r, Eq (FaceIx planeGraph)) => IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygons","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:interiorFacePolygons"},{"display_html":"module Hiraffe.Graph.Class","name":"","module":"HGeometry.PlaneGraph","link":""},{"display_html":"module HGeometry.PlaneGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":""},{"display_html":"module Hiraffe.PlanarGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":""},{"display_html":"newtype PlaneGraph s v e f = PlaneGraph (PlanarGraph s Primal v e f)","name":"PlaneGraph PlaneGraph","module":"HGeometry.PlaneGraph","link":"HGeometry-PlaneGraph.html#t:PlaneGraph"},{"display_html":"type MonotonePolygon point = MonotonePolygonF (SimplePolygon point)","name":"MonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#t:MonotonePolygon"},{"display_html":"data MonotonePolygonF simplePolygon","name":"MonotonePolygonF","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#t:MonotonePolygonF"},{"display_html":"monotoneDirection :: MonotonePolygonF simplePolygon -> Vector 2 (NumType simplePolygon)","name":"monotoneDirection","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:monotoneDirection"},{"display_html":"toSimplePolygon :: MonotonePolygonF simplePolygon -> simplePolygon","name":"toSimplePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:toSimplePolygon"},{"display_html":"asMonotonePolygon :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Maybe (MonotonePolygonF simplePolygon)","name":"asMonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:asMonotonePolygon"},{"display_html":"uncheckedMontonePolygon :: SimplePolygon_ simplePolygon point r => Vector 2 r -> simplePolygon -> MonotonePolygonF simplePolygon","name":"uncheckedMontonePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:uncheckedMontonePolygon"},{"display_html":"randomMonotone :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> m (MonotonePolygon (Point 2 r))","name":"randomMonotone","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:randomMonotone"},{"display_html":"randomMonotoneDirected :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r))","name":"randomMonotoneDirected","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:randomMonotoneDirected"},{"display_html":"isMonotone :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Bool","name":"isMonotone","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:isMonotone"},{"display_html":"randomNonZeroVector :: (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) => m (Vector 2 r)","name":"randomNonZeroVector","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:randomNonZeroVector"},{"display_html":"leftTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"leftTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:leftTangent"},{"display_html":"rightTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"rightTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:rightTangent"},{"display_html":"lowerTangent :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"lowerTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent"},{"display_html":"lowerTangent' :: forall point r f. (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"lowerTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent-39-"},{"display_html":"upperTangent :: forall convexPolygon point r. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"upperTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:upperTangent"},{"display_html":"upperTangent' :: (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"upperTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:upperTangent-39-"},{"display_html":"randomConvex :: (MonadState g m, RandomGen g) => Int -> Int -> m (ConvexPolygon (Point 2 Rational))","name":"randomConvex","module":"HGeometry.Polygon.Convex.Random","link":"HGeometry-Polygon-Convex-Random.html#v:randomConvex"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#t:ConvexPolygon_"},{"display_html":"type ConvexPolygon = ConvexPolygonF (Cyclic NonEmptyVector)","name":"ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#t:ConvexPolygon"},{"display_html":"data ConvexPolygonF f point","name":"ConvexPolygonF","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#t:ConvexPolygonF"},{"display_html":"fromSimplePolygon :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Maybe (ConvexPolygonF f point)","name":"fromSimplePolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:fromSimplePolygon"},{"display_html":"toSimplePolygon :: ConvexPolygonF f point -> SimplePolygonF f point","name":"toSimplePolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:toSimplePolygon"},{"display_html":"_ConvexPolygon :: forall f point r. (Num r, Ord r, Point_ point 2 r, VertexContainer f point) => Prism' (SimplePolygonF f point) (ConvexPolygonF f point)","name":"_ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:_ConvexPolygon"},{"display_html":"isStrictlyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isStrictlyConvex","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:isStrictlyConvex"},{"display_html":"isConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isConvex","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:isConvex"},{"display_html":"verifyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => ConvexPolygonF f point -> Bool","name":"verifyConvex","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:verifyConvex"},{"display_html":"minkowskiSum :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r, ConvexPolygon_ convexPolygon' point' r) => convexPolygon -> convexPolygon' -> ConvexPolygon (point :+ point')","name":"minkowskiSum","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:minkowskiSum"},{"display_html":"maxInDirection :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => Vector 2 r -> convexPolygon -> point","name":"maxInDirection","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:maxInDirection"},{"display_html":"convexHull :: (Ord r, Fractional r, Show r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.QuickHull","link":"HGeometry-ConvexHull-QuickHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:convexHull"},{"display_html":"upperHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:upperHull"},{"display_html":"upperHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull"},{"display_html":"lowerHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull-39-"},{"display_html":"steepestCcwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCcwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:steepestCcwFrom"},{"display_html":"steepestCwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:steepestCwFrom"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHull"},{"display_html":"upperHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:lowerHull"},{"display_html":"lowerHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:lowerHull-39-"},{"display_html":"upperHullFromSorted :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted"},{"display_html":"upperHullFromSorted' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted'","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted-39-"},{"display_html":"newtype LowerEnvelopeF f vertex line = LowerEnvelope (Alternating f vertex line)","name":"LowerEnvelopeF LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#t:LowerEnvelopeF"},{"display_html":"type LowerEnvelope = LowerEnvelopeF Vector","name":"LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#t:LowerEnvelope"},{"display_html":"_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') (Alternating f vertex line) (Alternating f' vertex' line')","name":"_Alternating","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:_Alternating"},{"display_html":"lowerEnvelope :: forall g f line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, Functor f, IsIntersectableWith line line, Intersection line line ~ Maybe (LineLineIntersection line), HasFromFoldable g) => f line -> LowerEnvelopeF g (Point 2 r) line","name":"lowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:lowerEnvelope"},{"display_html":"lineAt :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> line","name":"lineAt","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:lineAt"},{"display_html":"lookupLEVertex :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line)","name":"lookupLEVertex","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:lookupLEVertex"},{"display_html":"data CommonIntersection halfPlane r","name":"CommonIntersection BoundedRegion EmptyIntersection InSubLine SingletonPoint Slab UnboundedRegion","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#t:CommonIntersection"},{"display_html":"data SubLine halfPlane r","name":"SubLine EntireLine InHalfLine InSegment","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#t:SubLine"},{"display_html":"newtype Chain f halfPlane r = Chain (Alternating f (Point 2 r) halfPlane)","name":"Chain Chain","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#t:Chain"},{"display_html":"commonIntersection :: forall f halfPlane r. (Foldable1 f, Functor f, HalfPlane_ halfPlane r, Fractional r, Ord r, Show halfPlane, Show r) => f halfPlane -> CommonIntersection halfPlane r","name":"commonIntersection","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#v:commonIntersection"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull","link":"HGeometry-ConvexHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"HGeometry-ConvexHull-DivideAndConquer.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"HGeometry-ConvexHull-DivideAndConquer.html#v:upperHull"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"HGeometry-ConvexHull-DivideAndConquer.html#v:lowerHull"},{"display_html":"module HGeometry.Polygon.Class","name":"","module":"HGeometry.Polygon","link":""},{"display_html":"asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point)","name":"asTriangle","module":"HGeometry.Polygon","link":"HGeometry-Polygon.html#v:asTriangle"},{"display_html":"area2X :: (Polygon_ polygon point r, Num r, Point_ point 2 r, SimplePolygon_ (Hole polygon) point r) => polygon -> r","name":"area2X","module":"HGeometry.Polygon","link":"HGeometry-Polygon.html#v:area2X"},{"display_html":"area :: (Polygon_ polygon point r, SimplePolygon_ (Hole polygon) point r, Fractional r) => polygon -> r","name":"area","module":"HGeometry.Polygon","link":"HGeometry-Polygon.html#v:area"},{"display_html":"convexHull :: forall polygon point r. (Polygon_ polygon point r, Ord r, Num r) => polygon -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.Melkman","link":"HGeometry-ConvexHull-Melkman.html#v:convexHull"},{"display_html":"type YMonotonePolygon_ = SimplePolygon_","name":"YMonotonePolygon_","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"HGeometry-Polygon-Triangulation-TriangulateMonotone.html#t:YMonotonePolygon_"},{"display_html":"triangulate :: forall s yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:triangulate"},{"display_html":"computeDiagonals :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> [Diagonal yMonotonePolygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:computeDiagonals"},{"display_html":"makeMonotone :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"makeMonotone","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:makeMonotone"},{"display_html":"computeDiagonals :: (Polygon_ polygon point r, Point_ point 2 r, Ord r, Num r, Ord (VertexIx polygon)) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:computeDiagonals"},{"display_html":"classifyVertices :: (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> [(VertexIx polygon, VertexType)]","name":"classifyVertices","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:classifyVertices"},{"display_html":"data VertexType","name":"VertexType Start Split End Merge Regular","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#t:VertexType"},{"display_html":"cmpX :: (Point_ point 2 r, LineSegment_ lineSegment point', Point_ point' 2 r, Ord r, Num r) => point -> lineSegment -> Ordering","name":"cmpX","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:cmpX"},{"display_html":"triangulate :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#v:triangulate"},{"display_html":"computeDiagonals :: forall polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#v:computeDiagonals"},{"display_html":"data PolygonEdgeType","name":"PolygonEdgeType Diagonal Original","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#t:PolygonEdgeType"},{"display_html":"data PolygonFaceData","name":"PolygonFaceData Outside Inside","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#t:PolygonFaceData"},{"display_html":"type Diagonal polygon = Vector 2 (VertexIx polygon)","name":"Diagonal","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#t:Diagonal"},{"display_html":"samplePolygon :: (SimplePolygon_ polygon point r, Ord r, Real r, UniformRange r, StatefulGen g m) => polygon -> g -> m (Point 2 Double)","name":"samplePolygon","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:samplePolygon"},{"display_html":"samplePolygons :: (SimplePolygon_ polygon point r, StatefulGen g m, Foldable1 nonEmpty, Real r, Ord r, UniformRange r) => nonEmpty polygon -> g -> m (Point 2 Double)","name":"samplePolygons","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:samplePolygons"},{"display_html":"data Sampler w v","name":"Sampler","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#t:Sampler"},{"display_html":"samplePoint :: (Point_ point 2 r, StatefulGen g m, Real r, Ord r, UniformRange r) => Sampler r (Triangle point) -> g -> m (Point 2 Double)","name":"samplePoint","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:samplePoint"},{"display_html":"triangleSampler :: (SimplePolygon_ polygon point r, Num r, Ord r, Foldable1 nonEmpty) => nonEmpty polygon -> Sampler r (Triangle point)","name":"triangleSampler","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:triangleSampler"},{"display_html":"visibilityGraph :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraph","module":"HGeometry.Polygon.Visibility.Naive","link":"HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraph"},{"display_html":"visibilityGraphWith :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraphWith","module":"HGeometry.Polygon.Visibility.Naive","link":"HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraphWith"},{"display_html":"data PolygonalDomainF (h :: Type -> Type) (f :: Type -> Type) (point :: Type) = PolygonalDomain (SimplePolygonF f point) (h (SimplePolygonF f point))","name":"PolygonalDomainF PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#t:PolygonalDomainF"},{"display_html":"type PolygonalDomain point = PolygonalDomainF Vector (Cyclic NonEmptyVector) point","name":"PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#t:PolygonalDomain"},{"display_html":"asSimplePolygon :: (HasFromFoldable h, HoleContainer h f point) => Prism' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"asSimplePolygon","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#v:asSimplePolygon"},{"display_html":"outerBoundaryPolygon :: Lens' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"outerBoundaryPolygon","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#v:outerBoundaryPolygon"},{"display_html":"theHoles :: Lens (PolygonalDomainF h f point) (PolygonalDomainF h' f point) (h (SimplePolygonF f point)) (h' (SimplePolygonF f point))","name":"theHoles","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#v:theHoles"},{"display_html":"type HoleContainer h f point = (TraversableWithIndex Int h, Index (h (SimplePolygonF f point)) ~ Int, IxValue (h (SimplePolygonF f point)) ~ SimplePolygonF f point, Ixed (h (SimplePolygonF f point)), VertexContainer f point)","name":"HoleContainer","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#t:HoleContainer"},{"display_html":"class HasCanonicalSubSet s t a f g | s -> f, t -> g where","name":"HasCanonicalSubSet canonicalSubSet","module":"HGeometry.SegmentTree.CanonicalSubSet","link":"HGeometry-SegmentTree-CanonicalSubSet.html#t:HasCanonicalSubSet"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:ascEndPoints"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:ascEndPoints"},{"display_html":"data RangeTree f point","name":"RangeTree","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#t:RangeTree"},{"display_html":"buildRangeTree :: (Foldable1 g, Point_ point d r, Ord r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"buildRangeTree","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:buildRangeTree"},{"display_html":"fromAscList :: (Foldable1 g, Functor g, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"fromAscList","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:fromAscList"},{"display_html":"fromGroupedAscList :: (Foldable1 g, Foldable1 h, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g (h point) -> RangeTree f point","name":"fromGroupedAscList","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:fromGroupedAscList"},{"display_html":"rangeQuery :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) => interval -> RangeTree f point -> [f point]","name":"rangeQuery","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:rangeQuery"},{"display_html":"query :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r, Monoid (f point)) => interval -> RangeTree f point -> f point","name":"query","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:query"},{"display_html":"module HGeometry.RangeTree.Base","name":"","module":"HGeometry.RangeTree","link":""},{"display_html":"type VerticalRayShootingStructure lineSegment = VerticalRayShootingStructure' (NumType lineSegment) lineSegment","name":"VerticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#t:VerticalRayShootingStructure"},{"display_html":"type StatusStructure lineSegment = Set lineSegment","name":"StatusStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#t:StatusStructure"},{"display_html":"verticalRayShootingStructure :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, Foldable1 f) => f lineSegment -> VerticalRayShootingStructure lineSegment","name":"verticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:verticalRayShootingStructure"},{"display_html":"segmentAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAbove"},{"display_html":"segmentAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAboveOrOn"},{"display_html":"findSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment)","name":"findSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:findSlab"},{"display_html":"lookupAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAbove"},{"display_html":"lookupAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAboveOrOn"},{"display_html":"searchInSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, HasSupportingLine lineSegment, Num r) => (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment","name":"searchInSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:searchInSlab"},{"display_html":"module HGeometry.VerticalRayShooting.PersistentSweep","name":"","module":"HGeometry.VerticalRayShooting","link":""},{"display_html":"data VoronoiDiagram point","name":"VoronoiDiagram AllColinear ConnectedVD","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#t:VoronoiDiagram"},{"display_html":"newtype VoronoiDiagram' point = VoronoiDiagram (LowerEnvelope' (Plane (NumType point) :+ point))","name":"VoronoiDiagram' VoronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#t:VoronoiDiagram-39-"},{"display_html":"voronoiDiagram :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r) => f point -> VoronoiDiagram point","name":"voronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#v:voronoiDiagram"},{"display_html":"voronoiVertices :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable f) => f point -> [Point 2 r]","name":"voronoiVertices","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#v:voronoiVertices"},{"display_html":"edgeGeometries :: (Point_ point 2 r, Ord r, Fractional r, Show point, Show r) => Fold (VoronoiDiagram' point) (EdgeGeometry (Point 2 r))","name":"edgeGeometries","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#v:edgeGeometries"}] \ No newline at end of file +[{"display_html":"newtype BezierSplineF f point where","name":"BezierSplineF Bezier2 Bezier3 BezierSpline","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:BezierSplineF"},{"display_html":"type BezierSpline = BezierSplineF NonEmptyVector","name":"BezierSpline","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:BezierSpline"},{"display_html":"type QuadraticBezier = BezierSplineF (Vector 3)","name":"QuadraticBezier","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:QuadraticBezier"},{"display_html":"type CubicBezier = BezierSplineF (Vector 4)","name":"CubicBezier","module":"HGeometry.BezierSpline","link":"HGeometry-BezierSpline.html#t:CubicBezier"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#v:closestPair"},{"display_html":"type CP point = Top (SP (Two point) (NumType point))","name":"CP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#t:CP"},{"display_html":"data CCP point = CCP (NonEmpty point) !(CP point)","name":"CCP CCP","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#t:CCP"},{"display_html":"mergePairs :: forall point r. (Ord r, Num r, Point_ point 2 r) => CP point -> NonEmpty point -> NonEmpty point -> CP point","name":"mergePairs","module":"HGeometry.ClosestPair.DivideAndConquer","link":"HGeometry-ClosestPair-DivideAndConquer.html#v:mergePairs"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair","link":"HGeometry-ClosestPair.html#v:closestPair"},{"display_html":"closestPair :: (Ord r, Num r, Point_ point d r, Foldable1 f, Has_ Metric_ d r) => f point -> Vector 2 point","name":"closestPair","module":"HGeometry.ClosestPair.Naive","link":"HGeometry-ClosestPair-Naive.html#v:closestPair"},{"display_html":"closestPairWith :: (Ord r, Point_ point d r, Foldable1 f) => DistanceFunction point -> f point -> SP (Vector 2 point) r","name":"closestPairWith","module":"HGeometry.ClosestPair.Naive","link":"HGeometry-ClosestPair-Naive.html#v:closestPairWith"},{"display_html":"type DistanceFunction g = g -> g -> NumType g","name":"DistanceFunction","module":"HGeometry.ClosestPair.Naive","link":"HGeometry-ClosestPair-Naive.html#t:DistanceFunction"},{"display_html":"data Camera r = Camera !(Point 3 r) !(Vector 3 r) !(Vector 3 r) !r !r !r !(Vector 2 r)","name":"Camera Camera","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#t:Camera"},{"display_html":"cameraPosition :: Lens' (Camera r) (Point 3 r)","name":"cameraPosition","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:cameraPosition"},{"display_html":"rawCameraNormal :: Lens' (Camera r) (Vector 3 r)","name":"rawCameraNormal","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:rawCameraNormal"},{"display_html":"rawViewUp :: Lens' (Camera r) (Vector 3 r)","name":"rawViewUp","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:rawViewUp"},{"display_html":"viewPlaneDepth :: Lens' (Camera r) r","name":"viewPlaneDepth","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:viewPlaneDepth"},{"display_html":"nearDist :: Lens' (Camera r) r","name":"nearDist","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:nearDist"},{"display_html":"farDist :: Lens' (Camera r) r","name":"farDist","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:farDist"},{"display_html":"screenDimensions :: Lens' (Camera r) (Vector 2 r)","name":"screenDimensions","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:screenDimensions"},{"display_html":"cameraNormal :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"cameraNormal","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:cameraNormal"},{"display_html":"viewUp :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r)","name":"viewUp","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:viewUp"},{"display_html":"cameraTransform :: Fractional r => Camera r -> Transformation 3 r","name":"cameraTransform","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:cameraTransform"},{"display_html":"worldToView :: Fractional r => Camera r -> Transformation 3 r","name":"worldToView","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:worldToView"},{"display_html":"toViewPort :: Fractional r => Camera r -> Transformation 3 r","name":"toViewPort","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:toViewPort"},{"display_html":"perspectiveProjection :: Fractional r => Camera r -> Transformation 3 r","name":"perspectiveProjection","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:perspectiveProjection"},{"display_html":"rotateCoordSystem :: Num r => Camera r -> Transformation 3 r","name":"rotateCoordSystem","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:rotateCoordSystem"},{"display_html":"flipAxes :: Num r => Transformation 3 r","name":"flipAxes","module":"HGeometry.Graphics.Camera","link":"HGeometry-Graphics-Camera.html#v:flipAxes"},{"display_html":"data IntervalTree interval r","name":"IntervalTree","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#t:IntervalTree"},{"display_html":"createTree :: (Foldable f, Ord r) => f r -> IntervalTree interval r","name":"createTree","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:createTree"},{"display_html":"fromIntervals :: (Foldable f, Ord r, ClosedInterval_ interval r) => f interval -> IntervalTree interval r","name":"fromIntervals","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:fromIntervals"},{"display_html":"insert :: (Ord r, ClosedInterval_ interval r) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"insert","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:insert"},{"display_html":"delete :: (Ord r, ClosedInterval_ interval r, Eq interval) => interval -> IntervalTree interval r -> IntervalTree interval r","name":"delete","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:delete"},{"display_html":"stab :: Ord r => r -> IntervalTree interval r -> [interval]","name":"stab","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:stab"},{"display_html":"search :: Ord r => r -> IntervalTree interval r -> [interval]","name":"search","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:search"},{"display_html":"listIntervals :: IntervalTree interval r -> [interval]","name":"listIntervals","module":"HGeometry.IntervalTree","link":"HGeometry-IntervalTree.html#v:listIntervals"},{"display_html":"intersections :: (Ord r, Fractional r, LineSegment_ lineSegment point, Eq lineSegment, Point_ point 2 r, IntersectConstraints lineSegment, Foldable f) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:intersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:Intersections"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.Naive","link":"HGeometry-LineSegment-Intersection-Naive.html#t:OrdArounds"},{"display_html":"intersections :: forall lineSegment point r f. (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, HasOnSegment lineSegment 2, IntersectConstraints lineSegment, Foldable f, Functor f, StartPointOf lineSegment ~ EndPointOf lineSegment) => f lineSegment -> Intersections r lineSegment","name":"intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersections"},{"display_html":"interiorIntersections :: (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, IntersectConstraints lineSegment, StartPointOf lineSegment ~ EndPointOf lineSegment, HasOnSegment lineSegment 2, Foldable f, Functor f) => f lineSegment -> Intersections r lineSegment","name":"interiorIntersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorIntersections"},{"display_html":"type Intersections r lineSegment = Map (Point 2 r) (Associated lineSegment)","name":"Intersections","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Intersections"},{"display_html":"intersectionPoints :: Intersections r lineSegment -> Set (Point 2 r)","name":"intersectionPoints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoints"},{"display_html":"data Associated lineSegment","name":"Associated","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:Associated"},{"display_html":"startPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundStart lineSegment))","name":"startPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:startPointOf"},{"display_html":"endPointOf :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundEnd lineSegment))","name":"endPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:endPointOf"},{"display_html":"interiorTo :: forall lineSegment. Lens' (Associated lineSegment) (Set (AroundIntersection lineSegment))","name":"interiorTo","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:interiorTo"},{"display_html":"associatedSegments :: Fold (Associated lineSegment) lineSegment","name":"associatedSegments","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegments"},{"display_html":"data AroundEnd a","name":"AroundEnd","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundEnd"},{"display_html":"data AroundStart a","name":"AroundStart","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundStart"},{"display_html":"data AroundIntersection a","name":"AroundIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:AroundIntersection"},{"display_html":"isInteriorIntersection :: Associated lineSegment -> Bool","name":"isInteriorIntersection","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:isInteriorIntersection"},{"display_html":"data IntersectionPoint point lineSegment","name":"IntersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectionPoint"},{"display_html":"intersectionPointOf :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment)","name":"intersectionPointOf","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPointOf"},{"display_html":"intersectionPoint :: forall point lineSegment point. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) point point","name":"intersectionPoint","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:intersectionPoint"},{"display_html":"associatedSegs :: forall point lineSegment lineSegment. Lens (IntersectionPoint point lineSegment) (IntersectionPoint point lineSegment) (Associated lineSegment) (Associated lineSegment)","name":"associatedSegs","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#v:associatedSegs"},{"display_html":"type IntersectConstraints lineSegment = (OrdArounds lineSegment, IsIntersectableWith lineSegment lineSegment, Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment))","name":"IntersectConstraints","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:IntersectConstraints"},{"display_html":"type OrdArounds lineSegment = (Ord (AroundStart lineSegment), Ord (AroundIntersection lineSegment), Ord (AroundEnd lineSegment))","name":"OrdArounds","module":"HGeometry.LineSegment.Intersection.BentleyOttmann","link":"HGeometry-LineSegment-Intersection-BentleyOttmann.html#t:OrdArounds"},{"display_html":"type PlaneGraph k v e = Map k (Map e k, v)","name":"PlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:PlaneGraph"},{"display_html":"newtype E r = E (Vector 2 r)","name":"E E","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"HGeometry-Plane-LowerEnvelope-Connected-Graph.html#t:E"},{"display_html":"toPlaneGraph :: (Plane_ plane r, Num r, Ord r) => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r)","name":"toPlaneGraph","module":"HGeometry.Plane.LowerEnvelope.Connected.Graph","link":"HGeometry-Plane-LowerEnvelope-Connected-Graph.html#v:toPlaneGraph"},{"display_html":"data MinimizationDiagram r plane","name":"MinimizationDiagram","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:MinimizationDiagram"},{"display_html":"asMap :: MinimizationDiagram r plane -> Map plane (Region r (Point 2 r))","name":"asMap","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:asMap"},{"display_html":"data Region r point","name":"Region Bounded Unbounded","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:Region"},{"display_html":"type CircularList a = [a]","name":"CircularList","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:CircularList"},{"display_html":"intersectionPoint :: (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r)","name":"intersectionPoint","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:intersectionPoint"},{"display_html":"intersectionLine :: (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r)","name":"intersectionLine","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:intersectionLine"},{"display_html":"intersectionVector :: (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r)","name":"intersectionVector","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:intersectionVector"},{"display_html":"fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) => VertexForm r plane -> MinimizationDiagram r plane","name":"fromVertexForm","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:fromVertexForm"},{"display_html":"data Definers plane","name":"Definers","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:Definers"},{"display_html":"fromCCWList :: [plane] -> Definers plane","name":"fromCCWList","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:fromCCWList"},{"display_html":"definers :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r, Definers plane)","name":"definers","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:definers"},{"display_html":"mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane","name":"mergeDefiners","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:mergeDefiners"},{"display_html":"type VertexForm r plane = Map (Point 3 r) (Definers plane)","name":"VertexForm","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#t:VertexForm"},{"display_html":"bruteForceLowerEnvelope :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> MinimizationDiagram r plane","name":"bruteForceLowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:bruteForceLowerEnvelope"},{"display_html":"computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane","name":"computeVertexForm","module":"HGeometry.Plane.LowerEnvelope.Connected","link":"HGeometry-Plane-LowerEnvelope-Connected.html#v:computeVertexForm"},{"display_html":"class (HasVertices polyLine polyLine, HasPoints' polyLine point, HasStart polyLine point, HasEnd polyLine point, Vertex polyLine ~ point, Point_ point (Dimension point) (NumType point), NumType polyLine ~ NumType point, Dimension polyLine ~ Dimension point) => PolyLine_ polyLine point | polyLine -> point","name":"PolyLine_","module":"HGeometry.PolyLine.Class","link":"HGeometry-PolyLine-Class.html#t:PolyLine_"},{"display_html":"class PolyLine_ polyLine point => ConstructablePolyLine_ polyLine point where","name":"ConstructablePolyLine_ polyLineFromPoints","module":"HGeometry.PolyLine.Class","link":"HGeometry-PolyLine-Class.html#t:ConstructablePolyLine_"},{"display_html":"_PolyLineLineSegment :: (ConstructableLineSegment_ lineSegment point, ConstructablePolyLine_ polyLine point) => Prism' polyLine lineSegment","name":"_PolyLineLineSegment","module":"HGeometry.PolyLine.Class","link":"HGeometry-PolyLine-Class.html#v:_PolyLineLineSegment"},{"display_html":"newtype PolyLineF f point = PolyLine (f point)","name":"PolyLineF PolyLine","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:PolyLineF"},{"display_html":"type PolyLine = PolyLineF NonEmptyVector","name":"PolyLine","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:PolyLine"},{"display_html":"_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') (f point) (f' point')","name":"_PolyLineF","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#v:_PolyLineF"},{"display_html":"module HGeometry.PolyLine.Class","name":"","module":"HGeometry.PolyLine","link":""},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:HasVertices"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.PolyLine","link":"HGeometry-PolyLine.html#t:HasEdges"},{"display_html":"frechetDistanceWith :: (HasVertices' polyLine, HasVertices' polyLine', Ord r, VertexIx polyLine ~ Int, VertexIx polyLine' ~ Int) => (Vertex polyLine -> Vertex polyLine' -> r) -> polyLine -> polyLine' -> r","name":"frechetDistanceWith","module":"HGeometry.PolyLine.Frechet.Discrete","link":"HGeometry-PolyLine-Frechet-Discrete.html#v:frechetDistanceWith"},{"display_html":"douglasPeucker :: forall polyLine point d r. (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLineF ViewR1 point","name":"douglasPeucker","module":"HGeometry.PolyLine.Simplification.DouglasPeucker","link":"HGeometry-PolyLine-Simplification-DouglasPeucker.html#v:douglasPeucker"},{"display_html":"simplify :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLine point","name":"simplify","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplify"},{"display_html":"simplifyWith :: (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r) => (ClosedLineSegment point -> PolyLine point -> Bool) -> polyLine -> PolyLine point","name":"simplifyWith","module":"HGeometry.PolyLine.Simplification.ImaiIri","link":"HGeometry-PolyLine-Simplification-ImaiIri.html#v:simplifyWith"},{"display_html":"class HasVertices polygon polygon => HasOuterBoundary polygon where","name":"HasOuterBoundary outerBoundaryVertexAt ccwOuterBoundaryFrom cwOuterBoundaryFrom outerBoundary outerBoundaryEdgeAt outerBoundaryEdges","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasOuterBoundary"},{"display_html":"signedArea2X :: (Num r, HasOuterBoundary simplePolygon, Point_ point 2 r, Vertex simplePolygon ~ point) => simplePolygon -> r","name":"signedArea2X","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:signedArea2X"},{"display_html":"minimumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"minimumVertexBy","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:minimumVertexBy"},{"display_html":"maximumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon)","name":"maximumVertexBy","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:maximumVertexBy"},{"display_html":"outerBoundaryEdgeSegmentAt :: (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => VertexIx polygon -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegmentAt","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegmentAt"},{"display_html":"outerBoundaryEdgeSegments :: forall polygon point r. (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => IndexedFold1 (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point)","name":"outerBoundaryEdgeSegments","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:outerBoundaryEdgeSegments"},{"display_html":"outerBoundaryWithNeighbours :: (HasOuterBoundary polygon, VertexIx polygon ~ Int) => IndexedFold1 (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) polygon (Vertex polygon, (Vertex polygon, Vertex polygon))","name":"outerBoundaryWithNeighbours","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#v:outerBoundaryWithNeighbours"},{"display_html":"type Hole polygon = SimplePolygonF (HoleF polygon) (Vertex polygon)","name":"Hole","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:Hole"},{"display_html":"class VertexContainer (HoleF polygon) (Vertex polygon) => HasHoles polygon where","name":"HasHoles HoleF HoleIx holes holeAt","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasHoles"},{"display_html":"class (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r, NumType polygon ~ r, Dimension polygon ~ 2, HasHoles polygon) => Polygon_ polygon point r where","name":"Polygon_ ccwPredecessorOf ccwSuccessorOf extremes","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:Polygon_"},{"display_html":"class HasVertices' graph => HasVertices graph graph' where","name":"HasVertices vertices","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasVertices"},{"display_html":"class HasVertices' graph where","name":"HasVertices' Vertex VertexIx vertexAt numVertices","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasVertices-39-"},{"display_html":"class HasEdges' graph => HasEdges graph graph' where","name":"HasEdges edges","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasEdges"},{"display_html":"class HasEdges' graph where","name":"HasEdges' Edge EdgeIx edgeAt numEdges","module":"HGeometry.Polygon.Class","link":"HGeometry-Polygon-Class.html#t:HasEdges-39-"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple.Class","link":"HGeometry-Polygon-Simple-Class.html#t:SimplePolygon_"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex.Class","link":"HGeometry-Polygon-Convex-Class.html#t:ConvexPolygon_"},{"display_html":"class (Polygon_ simplePolygon point r, VertexIx simplePolygon ~ Int, Point_ point 2 r) => SimplePolygon_ simplePolygon point r where","name":"SimplePolygon_ ConstructableSimplePolygon uncheckedFromCCWPoints fromPoints centroid","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:SimplePolygon_"},{"display_html":"type SimplePolygon = SimplePolygonF (Cyclic NonEmptyVector)","name":"SimplePolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:SimplePolygon"},{"display_html":"newtype SimplePolygonF f point = MkSimplePolygon (f point)","name":"SimplePolygonF MkSimplePolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:SimplePolygonF"},{"display_html":"toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point","name":"toCyclic","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#v:toCyclic"},{"display_html":"type VertexContainer f point = (IxValue (f point) ~ point, Index (f point) ~ Int, TraversableWithIndex Int f, Traversable1 f, Ixed (f point), HasDirectedTraversals f)","name":"VertexContainer","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:VertexContainer"},{"display_html":"class HasInPolygon polygon point r | polygon -> point, point -> r where
  • inPolygon :: (Num r, Ord r, Point_ queryPoint 2 r) => queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon)
","name":"HasInPolygon inPolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#t:HasInPolygon"},{"display_html":"inSimplePolygon :: forall queryPoint simplePolygon point r. (Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r, SimplePolygon_ simplePolygon point r) => queryPoint -> simplePolygon -> PointLocationResultWith (VertexIx simplePolygon)","name":"inSimplePolygon","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#v:inSimplePolygon"},{"display_html":"hasNoSelfIntersections :: forall f point r. (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) => f point -> Bool","name":"hasNoSelfIntersections","module":"HGeometry.Polygon.Simple","link":"HGeometry-Polygon-Simple.html#v:hasNoSelfIntersections"},{"display_html":"module HGeometry.Polygon.Simple.Class","name":"","module":"HGeometry.Polygon.Simple","link":""},{"display_html":"class (PlanarGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex), NumType vertex ~ NumType planeGraph) => PlaneGraph_ planeGraph vertex | planeGraph -> vertex where","name":"PlaneGraph_ fromEmbedding interiorFaces outerFace outerFaceDart outerFaceId","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#t:PlaneGraph_"},{"display_html":"dartSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => DartIx planeGraph -> IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:dartSegmentAt"},{"display_html":"edgeSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => EdgeIx planeGraph -> IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegmentAt","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:edgeSegmentAt"},{"display_html":"dartSegments :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"dartSegments","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:dartSegments"},{"display_html":"edgeSegments :: forall planeGraph vertex. (HasEdges planeGraph planeGraph, BidirGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex)) => IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex)","name":"edgeSegments","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:edgeSegments"},{"display_html":"interiorFacePolygonAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => FaceIx planeGraph -> IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygonAt","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:interiorFacePolygonAt"},{"display_html":"interiorFacePolygons :: forall planeGraph vertex r. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 r, Ord r, Num r, Eq (FaceIx planeGraph)) => IndexedFold (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph))","name":"interiorFacePolygons","module":"HGeometry.PlaneGraph.Class","link":"HGeometry-PlaneGraph-Class.html#v:interiorFacePolygons"},{"display_html":"module Hiraffe.Graph.Class","name":"","module":"HGeometry.PlaneGraph","link":""},{"display_html":"module HGeometry.PlaneGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":""},{"display_html":"module Hiraffe.PlanarGraph.Class","name":"","module":"HGeometry.PlaneGraph","link":""},{"display_html":"newtype PlaneGraph s v e f = PlaneGraph (PlanarGraph s Primal v e f)","name":"PlaneGraph PlaneGraph","module":"HGeometry.PlaneGraph","link":"HGeometry-PlaneGraph.html#t:PlaneGraph"},{"display_html":"type MonotonePolygon point = MonotonePolygonF (SimplePolygon point)","name":"MonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#t:MonotonePolygon"},{"display_html":"data MonotonePolygonF simplePolygon","name":"MonotonePolygonF","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#t:MonotonePolygonF"},{"display_html":"monotoneDirection :: MonotonePolygonF simplePolygon -> Vector 2 (NumType simplePolygon)","name":"monotoneDirection","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:monotoneDirection"},{"display_html":"toSimplePolygon :: MonotonePolygonF simplePolygon -> simplePolygon","name":"toSimplePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:toSimplePolygon"},{"display_html":"asMonotonePolygon :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Maybe (MonotonePolygonF simplePolygon)","name":"asMonotonePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:asMonotonePolygon"},{"display_html":"uncheckedMontonePolygon :: SimplePolygon_ simplePolygon point r => Vector 2 r -> simplePolygon -> MonotonePolygonF simplePolygon","name":"uncheckedMontonePolygon","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:uncheckedMontonePolygon"},{"display_html":"randomMonotone :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> m (MonotonePolygon (Point 2 r))","name":"randomMonotone","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:randomMonotone"},{"display_html":"randomMonotoneDirected :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r))","name":"randomMonotoneDirected","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:randomMonotoneDirected"},{"display_html":"isMonotone :: (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Bool","name":"isMonotone","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:isMonotone"},{"display_html":"randomNonZeroVector :: (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) => m (Vector 2 r)","name":"randomNonZeroVector","module":"HGeometry.Polygon.Monotone","link":"HGeometry-Polygon-Monotone.html#v:randomNonZeroVector"},{"display_html":"leftTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"leftTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:leftTangent"},{"display_html":"rightTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point","name":"rightTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:rightTangent"},{"display_html":"lowerTangent :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"lowerTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent"},{"display_html":"lowerTangent' :: forall point r f. (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"lowerTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:lowerTangent-39-"},{"display_html":"upperTangent :: forall convexPolygon point r. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> convexPolygon -> ClosedLineSegment point","name":"upperTangent","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:upperTangent"},{"display_html":"upperTangent' :: (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point])","name":"upperTangent'","module":"HGeometry.Polygon.Convex.Tangents","link":"HGeometry-Polygon-Convex-Tangents.html#v:upperTangent-39-"},{"display_html":"randomConvex :: (MonadState g m, RandomGen g) => Int -> Int -> m (ConvexPolygon (Point 2 Rational))","name":"randomConvex","module":"HGeometry.Polygon.Convex.Random","link":"HGeometry-Polygon-Convex-Random.html#v:randomConvex"},{"display_html":"class SimplePolygon_ convexPolygon point r => ConvexPolygon_ convexPolygon point r","name":"ConvexPolygon_","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#t:ConvexPolygon_"},{"display_html":"type ConvexPolygon = ConvexPolygonF (Cyclic NonEmptyVector)","name":"ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#t:ConvexPolygon"},{"display_html":"data ConvexPolygonF f point","name":"ConvexPolygonF","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#t:ConvexPolygonF"},{"display_html":"fromSimplePolygon :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Maybe (ConvexPolygonF f point)","name":"fromSimplePolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:fromSimplePolygon"},{"display_html":"toSimplePolygon :: ConvexPolygonF f point -> SimplePolygonF f point","name":"toSimplePolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:toSimplePolygon"},{"display_html":"_ConvexPolygon :: forall f point r. (Num r, Ord r, Point_ point 2 r, VertexContainer f point) => Prism' (SimplePolygonF f point) (ConvexPolygonF f point)","name":"_ConvexPolygon","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:_ConvexPolygon"},{"display_html":"isStrictlyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isStrictlyConvex","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:isStrictlyConvex"},{"display_html":"isConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool","name":"isConvex","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:isConvex"},{"display_html":"verifyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => ConvexPolygonF f point -> Bool","name":"verifyConvex","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:verifyConvex"},{"display_html":"minkowskiSum :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r, ConvexPolygon_ convexPolygon' point' r) => convexPolygon -> convexPolygon' -> ConvexPolygon (point :+ point')","name":"minkowskiSum","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:minkowskiSum"},{"display_html":"maxInDirection :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => Vector 2 r -> convexPolygon -> point","name":"maxInDirection","module":"HGeometry.Polygon.Convex","link":"HGeometry-Polygon-Convex.html#v:maxInDirection"},{"display_html":"convexHull :: (Ord r, Fractional r, Show r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.QuickHull","link":"HGeometry-ConvexHull-QuickHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:convexHull"},{"display_html":"upperHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:upperHull"},{"display_html":"upperHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull"},{"display_html":"lowerHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:lowerHull-39-"},{"display_html":"steepestCcwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCcwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:steepestCcwFrom"},{"display_html":"steepestCwFrom :: (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point","name":"steepestCwFrom","module":"HGeometry.ConvexHull.JarvisMarch","link":"HGeometry-ConvexHull-JarvisMarch.html#v:steepestCwFrom"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHull"},{"display_html":"upperHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"upperHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHull-39-"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:lowerHull"},{"display_html":"lowerHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point","name":"lowerHull'","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:lowerHull-39-"},{"display_html":"upperHullFromSorted :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted"},{"display_html":"upperHullFromSorted' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHullFromSorted'","module":"HGeometry.ConvexHull.GrahamScan","link":"HGeometry-ConvexHull-GrahamScan.html#v:upperHullFromSorted-39-"},{"display_html":"newtype LowerEnvelopeF f vertex line = LowerEnvelope (Alternating f vertex line)","name":"LowerEnvelopeF LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#t:LowerEnvelopeF"},{"display_html":"type LowerEnvelope = LowerEnvelopeF Vector","name":"LowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#t:LowerEnvelope"},{"display_html":"_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') (Alternating f vertex line) (Alternating f' vertex' line')","name":"_Alternating","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:_Alternating"},{"display_html":"lowerEnvelope :: forall g f line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, Functor f, IsIntersectableWith line line, Intersection line line ~ Maybe (LineLineIntersection line), HasFromFoldable g) => f line -> LowerEnvelopeF g (Point 2 r) line","name":"lowerEnvelope","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:lowerEnvelope"},{"display_html":"lineAt :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> line","name":"lineAt","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:lineAt"},{"display_html":"lookupLEVertex :: (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line)","name":"lookupLEVertex","module":"HGeometry.Line.LowerEnvelope","link":"HGeometry-Line-LowerEnvelope.html#v:lookupLEVertex"},{"display_html":"lowerEnvelope :: (Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f, Ord plane, Show plane, Show r) => f plane -> LowerEnvelope plane","name":"lowerEnvelope","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelope"},{"display_html":"lowerEnvelopeWith :: forall nonEmpty plane r. (Plane_ plane r, Ord r, Fractional r, Foldable1 nonEmpty) => (NonEmpty plane -> MinimizationDiagram r plane) -> nonEmpty plane -> LowerEnvelope plane","name":"lowerEnvelopeWith","module":"HGeometry.Plane.LowerEnvelope.Naive","link":"HGeometry-Plane-LowerEnvelope-Naive.html#v:lowerEnvelopeWith"},{"display_html":"module HGeometry.Plane.LowerEnvelope.Naive","name":"","module":"HGeometry.Plane.LowerEnvelope","link":""},{"display_html":"data LowerEnvelope plane","name":"LowerEnvelope ConnectedEnvelope ParallelStrips","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#t:LowerEnvelope"},{"display_html":"pointLocateParallel :: (Plane_ plane r, Point_ point 2 r, Ord r, Num r) => point -> Alternating Vector (VerticalOrLineEQ r) plane -> plane","name":"pointLocateParallel","module":"HGeometry.Plane.LowerEnvelope","link":"HGeometry-Plane-LowerEnvelope.html#v:pointLocateParallel"},{"display_html":"module HGeometry.Plane.LowerEnvelope.Connected","name":"","module":"HGeometry.Plane.LowerEnvelope","link":""},{"display_html":"data CommonIntersection halfPlane r","name":"CommonIntersection BoundedRegion EmptyIntersection InSubLine SingletonPoint Slab UnboundedRegion","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#t:CommonIntersection"},{"display_html":"data SubLine halfPlane r","name":"SubLine EntireLine InHalfLine InSegment","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#t:SubLine"},{"display_html":"newtype Chain f halfPlane r = Chain (Alternating f (Point 2 r) halfPlane)","name":"Chain Chain","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#t:Chain"},{"display_html":"commonIntersection :: forall f halfPlane r. (Foldable1 f, Functor f, HalfPlane_ halfPlane r, Fractional r, Ord r, Show halfPlane, Show r) => f halfPlane -> CommonIntersection halfPlane r","name":"commonIntersection","module":"HGeometry.HalfPlane.CommonIntersection","link":"HGeometry-HalfPlane-CommonIntersection.html#v:commonIntersection"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull","link":"HGeometry-ConvexHull.html#v:convexHull"},{"display_html":"convexHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"HGeometry-ConvexHull-DivideAndConquer.html#v:convexHull"},{"display_html":"upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"upperHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"HGeometry-ConvexHull-DivideAndConquer.html#v:upperHull"},{"display_html":"lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point","name":"lowerHull","module":"HGeometry.ConvexHull.DivideAndConquer","link":"HGeometry-ConvexHull-DivideAndConquer.html#v:lowerHull"},{"display_html":"module HGeometry.Polygon.Class","name":"","module":"HGeometry.Polygon","link":""},{"display_html":"asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point)","name":"asTriangle","module":"HGeometry.Polygon","link":"HGeometry-Polygon.html#v:asTriangle"},{"display_html":"area2X :: (Polygon_ polygon point r, Num r, Point_ point 2 r, SimplePolygon_ (Hole polygon) point r) => polygon -> r","name":"area2X","module":"HGeometry.Polygon","link":"HGeometry-Polygon.html#v:area2X"},{"display_html":"area :: (Polygon_ polygon point r, SimplePolygon_ (Hole polygon) point r, Fractional r) => polygon -> r","name":"area","module":"HGeometry.Polygon","link":"HGeometry-Polygon.html#v:area"},{"display_html":"convexHull :: forall polygon point r. (Polygon_ polygon point r, Ord r, Num r) => polygon -> ConvexPolygon point","name":"convexHull","module":"HGeometry.ConvexHull.Melkman","link":"HGeometry-ConvexHull-Melkman.html#v:convexHull"},{"display_html":"type YMonotonePolygon_ = SimplePolygon_","name":"YMonotonePolygon_","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"HGeometry-Polygon-Triangulation-TriangulateMonotone.html#t:YMonotonePolygon_"},{"display_html":"triangulate :: forall s yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:triangulate"},{"display_html":"computeDiagonals :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> [Diagonal yMonotonePolygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.TriangulateMonotone","link":"HGeometry-Polygon-Triangulation-TriangulateMonotone.html#v:computeDiagonals"},{"display_html":"makeMonotone :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"makeMonotone","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:makeMonotone"},{"display_html":"computeDiagonals :: (Polygon_ polygon point r, Point_ point 2 r, Ord r, Num r, Ord (VertexIx polygon)) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:computeDiagonals"},{"display_html":"classifyVertices :: (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> [(VertexIx polygon, VertexType)]","name":"classifyVertices","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:classifyVertices"},{"display_html":"data VertexType","name":"VertexType Start Split End Merge Regular","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#t:VertexType"},{"display_html":"cmpX :: (Point_ point 2 r, LineSegment_ lineSegment point', Point_ point' 2 r, Ord r, Num r) => point -> lineSegment -> Ordering","name":"cmpX","module":"HGeometry.Polygon.Triangulation.MakeMonotone","link":"HGeometry-Polygon-Triangulation-MakeMonotone.html#v:cmpX"},{"display_html":"triangulate :: forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData","name":"triangulate","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#v:triangulate"},{"display_html":"computeDiagonals :: forall polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> [Diagonal polygon]","name":"computeDiagonals","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#v:computeDiagonals"},{"display_html":"data PolygonEdgeType","name":"PolygonEdgeType Diagonal Original","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#t:PolygonEdgeType"},{"display_html":"data PolygonFaceData","name":"PolygonFaceData Outside Inside","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#t:PolygonFaceData"},{"display_html":"type Diagonal polygon = Vector 2 (VertexIx polygon)","name":"Diagonal","module":"HGeometry.Polygon.Triangulation","link":"HGeometry-Polygon-Triangulation.html#t:Diagonal"},{"display_html":"samplePolygon :: (SimplePolygon_ polygon point r, Ord r, Real r, UniformRange r, StatefulGen g m) => polygon -> g -> m (Point 2 Double)","name":"samplePolygon","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:samplePolygon"},{"display_html":"samplePolygons :: (SimplePolygon_ polygon point r, StatefulGen g m, Foldable1 nonEmpty, Real r, Ord r, UniformRange r) => nonEmpty polygon -> g -> m (Point 2 Double)","name":"samplePolygons","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:samplePolygons"},{"display_html":"data Sampler w v","name":"Sampler","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#t:Sampler"},{"display_html":"samplePoint :: (Point_ point 2 r, StatefulGen g m, Real r, Ord r, UniformRange r) => Sampler r (Triangle point) -> g -> m (Point 2 Double)","name":"samplePoint","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:samplePoint"},{"display_html":"triangleSampler :: (SimplePolygon_ polygon point r, Num r, Ord r, Foldable1 nonEmpty) => nonEmpty polygon -> Sampler r (Triangle point)","name":"triangleSampler","module":"HGeometry.Polygon.Simple.Sample","link":"HGeometry-Polygon-Simple-Sample.html#v:triangleSampler"},{"display_html":"visibilityGraph :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraph","module":"HGeometry.Polygon.Visibility.Naive","link":"HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraph"},{"display_html":"visibilityGraphWith :: (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)]","name":"visibilityGraphWith","module":"HGeometry.Polygon.Visibility.Naive","link":"HGeometry-Polygon-Visibility-Naive.html#v:visibilityGraphWith"},{"display_html":"data PolygonalDomainF (h :: Type -> Type) (f :: Type -> Type) (point :: Type) = PolygonalDomain (SimplePolygonF f point) (h (SimplePolygonF f point))","name":"PolygonalDomainF PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#t:PolygonalDomainF"},{"display_html":"type PolygonalDomain point = PolygonalDomainF Vector (Cyclic NonEmptyVector) point","name":"PolygonalDomain","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#t:PolygonalDomain"},{"display_html":"asSimplePolygon :: (HasFromFoldable h, HoleContainer h f point) => Prism' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"asSimplePolygon","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#v:asSimplePolygon"},{"display_html":"outerBoundaryPolygon :: Lens' (PolygonalDomainF h f point) (SimplePolygonF f point)","name":"outerBoundaryPolygon","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#v:outerBoundaryPolygon"},{"display_html":"theHoles :: Lens (PolygonalDomainF h f point) (PolygonalDomainF h' f point) (h (SimplePolygonF f point)) (h' (SimplePolygonF f point))","name":"theHoles","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#v:theHoles"},{"display_html":"type HoleContainer h f point = (TraversableWithIndex Int h, Index (h (SimplePolygonF f point)) ~ Int, IxValue (h (SimplePolygonF f point)) ~ SimplePolygonF f point, Ixed (h (SimplePolygonF f point)), VertexContainer f point)","name":"HoleContainer","module":"HGeometry.Polygon.WithHoles","link":"HGeometry-Polygon-WithHoles.html#t:HoleContainer"},{"display_html":"class HasCanonicalSubSet s t a f g | s -> f, t -> g where","name":"HasCanonicalSubSet canonicalSubSet","module":"HGeometry.SegmentTree.CanonicalSubSet","link":"HGeometry-SegmentTree-CanonicalSubSet.html#t:HasCanonicalSubSet"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree.Base","link":"HGeometry-SegmentTree-Base.html#v:ascEndPoints"},{"display_html":"data SegmentTree f interval","name":"SegmentTree","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#t:SegmentTree"},{"display_html":"buildSegmentTree :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval","name":"buildSegmentTree","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:buildSegmentTree"},{"display_html":"buildSkeleton :: forall f interval r g. (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => g r -> SegmentTree f interval","name":"buildSkeleton","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:buildSkeleton"},{"display_html":"stab :: (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval]","name":"stab","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:stab"},{"display_html":"query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval","name":"query","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:query"},{"display_html":"insert :: (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval","name":"insert","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:insert"},{"display_html":"ascEndPoints :: SegmentTree f interval -> [NumType interval]","name":"ascEndPoints","module":"HGeometry.SegmentTree","link":"HGeometry-SegmentTree.html#v:ascEndPoints"},{"display_html":"data RangeTree f point","name":"RangeTree","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#t:RangeTree"},{"display_html":"buildRangeTree :: (Foldable1 g, Point_ point d r, Ord r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"buildRangeTree","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:buildRangeTree"},{"display_html":"fromAscList :: (Foldable1 g, Functor g, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g point -> RangeTree f point","name":"fromAscList","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:fromAscList"},{"display_html":"fromGroupedAscList :: (Foldable1 g, Foldable1 h, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => g (h point) -> RangeTree f point","name":"fromGroupedAscList","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:fromGroupedAscList"},{"display_html":"rangeQuery :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) => interval -> RangeTree f point -> [f point]","name":"rangeQuery","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:rangeQuery"},{"display_html":"query :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r, Monoid (f point)) => interval -> RangeTree f point -> f point","name":"query","module":"HGeometry.RangeTree.Base","link":"HGeometry-RangeTree-Base.html#v:query"},{"display_html":"module HGeometry.RangeTree.Base","name":"","module":"HGeometry.RangeTree","link":""},{"display_html":"type VerticalRayShootingStructure lineSegment = VerticalRayShootingStructure' (NumType lineSegment) lineSegment","name":"VerticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#t:VerticalRayShootingStructure"},{"display_html":"type StatusStructure lineSegment = Set lineSegment","name":"StatusStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#t:StatusStructure"},{"display_html":"verticalRayShootingStructure :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, Foldable1 f) => f lineSegment -> VerticalRayShootingStructure lineSegment","name":"verticalRayShootingStructure","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:verticalRayShootingStructure"},{"display_html":"segmentAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAbove"},{"display_html":"segmentAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment","name":"segmentAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:segmentAboveOrOn"},{"display_html":"findSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment)","name":"findSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:findSlab"},{"display_html":"lookupAbove :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAbove","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAbove"},{"display_html":"lookupAboveOrOn :: (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment","name":"lookupAboveOrOn","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:lookupAboveOrOn"},{"display_html":"searchInSlab :: (LineSegment_ lineSegment point, Point_ point 2 r, HasSupportingLine lineSegment, Num r) => (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment","name":"searchInSlab","module":"HGeometry.VerticalRayShooting.PersistentSweep","link":"HGeometry-VerticalRayShooting-PersistentSweep.html#v:searchInSlab"},{"display_html":"module HGeometry.VerticalRayShooting.PersistentSweep","name":"","module":"HGeometry.VerticalRayShooting","link":""},{"display_html":"data VoronoiDiagram point","name":"VoronoiDiagram AllColinear ConnectedVD","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#t:VoronoiDiagram"},{"display_html":"newtype VoronoiDiagram' point = VoronoiDiagram (MinimizationDiagram (NumType point) point)","name":"VoronoiDiagram' VoronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#t:VoronoiDiagram-39-"},{"display_html":"voronoiDiagram :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r) => f point -> VoronoiDiagram point","name":"voronoiDiagram","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#v:voronoiDiagram"},{"display_html":"voronoiVertices :: (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r, Ord point) => f point -> Set (Point 2 r)","name":"voronoiVertices","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#v:voronoiVertices"},{"display_html":"asMap :: (Point_ point 2 r, Ord point) => VoronoiDiagram' point -> Map point (Region r (Point 2 r))","name":"asMap","module":"HGeometry.VoronoiDiagram","link":"HGeometry-VoronoiDiagram.html#v:asMap"}] \ No newline at end of file diff --git a/haddocks/hgeometry/geojson/src/HGeometry.GeoJSON.html b/haddocks/hgeometry/geojson/src/HGeometry.GeoJSON.html index d57743ce7..9b748f934 100644 --- a/haddocks/hgeometry/geojson/src/HGeometry.GeoJSON.html +++ b/haddocks/hgeometry/geojson/src/HGeometry.GeoJSON.html @@ -40,35 +40,35 @@ type instance Dimension PointXY = 2 instance HasVector PointXY PointXY where - vector :: forall (d :: Nat) r s. + vector :: forall (d :: Nat) r s. (Dimension PointXY ~ d, NumType PointXY ~ r, Dimension PointXY ~ d, NumType PointXY ~ s) => Lens PointXY PointXY (Vector d r) (Vector d s) -vector = (PointXY -> Vector d r) +vector = (PointXY -> Vector d r) -> (PointXY -> Vector d s -> PointXY) -> Lens PointXY PointXY (Vector d r) (Vector d s) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(PointXY Double -x Double -y) -> r -> r -> Vector 2 r +lens (\(PointXY Double +x Double +y) -> r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r Double -x r +x r Double -y) (\PointXY -_ (Vector2 s -x s -y) -> Double -> Double -> PointXY +y) (\PointXY +_ (Vector2 s +x s +y) -> Double -> Double -> PointXY PointXY s Double -x s +x s Double -y) +y) -instance HasCoordinates PointXY PointXY -instance Affine_ PointXY 2 Double -instance Point_ PointXY 2 Double +instance HasCoordinates PointXY PointXY +instance Affine_ PointXY 2 Double +instance Point_ PointXY 2 Double -------------------------------------------------------------------------------- -- * PointXYZ @@ -77,7 +77,7 @@ type instance Dimension PointXYZ = 3 instance HasVector PointXYZ PointXYZ where - vector :: forall (d :: Nat) r s. + vector :: forall (d :: Nat) r s. (Dimension PointXYZ ~ d, NumType PointXYZ ~ r, Dimension PointXYZ ~ d, NumType PointXYZ ~ s) => Lens PointXYZ PointXYZ (Vector d r) (Vector d s) @@ -85,33 +85,33 @@ -> (PointXYZ -> Vector d s -> PointXYZ) -> Lens PointXYZ PointXYZ (Vector d r) (Vector d s) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(PointXYZ Double -x Double -y Double -z) -> r -> r -> r -> Vector 3 r +lens (\(PointXYZ Double +x Double +y Double +z) -> r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r Double -x r +x r Double -y r +y r Double -z) (\PointXYZ -_ (Vector3 s -x s -y s -z) -> Double -> Double -> Double -> PointXYZ +z) (\PointXYZ +_ (Vector3 s +x s +y s +z) -> Double -> Double -> Double -> PointXYZ PointXYZ s Double -x s +x s Double -y s +y s Double -z) +z) -instance HasCoordinates PointXYZ PointXYZ -instance Affine_ PointXYZ 3 Double -instance Point_ PointXYZ 3 Double +instance HasCoordinates PointXYZ PointXYZ +instance Affine_ PointXYZ 3 Double +instance Point_ PointXYZ 3 Double -------------------------------------------------------------------------------- -- * PointXYZM @@ -120,7 +120,7 @@ type instance Dimension PointXYZM = 4 instance HasVector PointXYZM PointXYZM where - vector :: forall (d :: Nat) r s. + vector :: forall (d :: Nat) r s. (Dimension PointXYZM ~ d, NumType PointXYZM ~ r, Dimension PointXYZM ~ d, NumType PointXYZM ~ s) => Lens PointXYZM PointXYZM (Vector d r) (Vector d s) @@ -128,40 +128,40 @@ -> (PointXYZM -> Vector d s -> PointXYZM) -> Lens PointXYZM PointXYZM (Vector d r) (Vector d s) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(PointXYZM Double -x Double -y Double -z Double -m) -> r -> r -> r -> r -> Vector 4 r +lens (\(PointXYZM Double +x Double +y Double +z Double +m) -> r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 r Double -x r +x r Double -y r +y r Double -z r +z r Double -m) +m) (\PointXYZM -_ (Vector4 s -x s -y s -z s -m) -> Double -> Double -> Double -> Double -> PointXYZM +_ (Vector4 s +x s +y s +z s +m) -> Double -> Double -> Double -> Double -> PointXYZM PointXYZM s Double -x s +x s Double -y s +y s Double -z s +z s Double -m) +m) -instance HasCoordinates PointXYZM PointXYZM -instance Affine_ PointXYZM 4 Double -instance Point_ PointXYZM 4 Double +instance HasCoordinates PointXYZM PointXYZM +instance Affine_ PointXYZM 4 Double +instance Point_ PointXYZM 4 Double -------------------------------------------------------------------------------- -- * GeoPositionWithoutCRS @@ -172,7 +172,7 @@ data RestGeoPosition = Z {-#UNPACK#-}!Double | ZM {-#UNPACK#-}!Double {-#UNPACK#-}!Double - deriving (Int -> RestGeoPosition -> ShowS + deriving (Int -> RestGeoPosition -> ShowS [RestGeoPosition] -> ShowS RestGeoPosition -> String (Int -> RestGeoPosition -> ShowS) @@ -187,7 +187,7 @@ show :: RestGeoPosition -> String $cshowList :: [RestGeoPosition] -> ShowS showList :: [RestGeoPosition] -> ShowS -Show,RestGeoPosition -> RestGeoPosition -> Bool +Show,RestGeoPosition -> RestGeoPosition -> Bool (RestGeoPosition -> RestGeoPosition -> Bool) -> (RestGeoPosition -> RestGeoPosition -> Bool) -> Eq RestGeoPosition @@ -196,7 +196,7 @@ == :: RestGeoPosition -> RestGeoPosition -> Bool $c/= :: RestGeoPosition -> RestGeoPosition -> Bool /= :: RestGeoPosition -> RestGeoPosition -> Bool -Eq,Eq RestGeoPosition +Eq,Eq RestGeoPosition Eq RestGeoPosition => (RestGeoPosition -> RestGeoPosition -> Ordering) -> (RestGeoPosition -> RestGeoPosition -> Bool) @@ -244,50 +244,50 @@ -> Prism' GeoPositionWithoutCRS (PointXY :+ Maybe RestGeoPosition) forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b prism' (PointXY :+ Maybe RestGeoPosition) -> GeoPositionWithoutCRS -toGeoP GeoPositionWithoutCRS -> Maybe (PointXY :+ Maybe RestGeoPosition) -fromGeoP +toGeoP GeoPositionWithoutCRS -> Maybe (PointXY :+ Maybe RestGeoPosition) +fromGeoP where - toGeoP :: (PointXY :+ Maybe RestGeoPosition) -> GeoPositionWithoutCRS -toGeoP (p :: PointXY -p@(PointXY Double -x Double -y) :+ Maybe RestGeoPosition -mr) = case Maybe RestGeoPosition -mr of + toGeoP :: (PointXY :+ Maybe RestGeoPosition) -> GeoPositionWithoutCRS +toGeoP (p :: PointXY +p@(PointXY Double +x Double +y) :+ Maybe RestGeoPosition +mr) = case Maybe RestGeoPosition +mr of Maybe RestGeoPosition Nothing -> PointXY -> GeoPositionWithoutCRS GeoPointXY PointXY -p - Just (Z Double -z) -> PointXYZ -> GeoPositionWithoutCRS +p + Just (Z Double +z) -> PointXYZ -> GeoPositionWithoutCRS GeoPointXYZ (PointXYZ -> GeoPositionWithoutCRS) -> PointXYZ -> GeoPositionWithoutCRS forall a b. (a -> b) -> a -> b $ Double -> Double -> Double -> PointXYZ PointXYZ Double -x Double -y Double -z - Just (ZM Double -z Double -m) -> PointXYZM -> GeoPositionWithoutCRS +x Double +y Double +z + Just (ZM Double +z Double +m) -> PointXYZM -> GeoPositionWithoutCRS GeoPointXYZM (PointXYZM -> GeoPositionWithoutCRS) -> PointXYZM -> GeoPositionWithoutCRS forall a b. (a -> b) -> a -> b $ Double -> Double -> Double -> Double -> PointXYZM PointXYZM Double -x Double -y Double -z Double -m - fromGeoP :: GeoPositionWithoutCRS -> Maybe (PointXY :+ Maybe RestGeoPosition) -fromGeoP = \case +x Double +y Double +z Double +m + fromGeoP :: GeoPositionWithoutCRS -> Maybe (PointXY :+ Maybe RestGeoPosition) +fromGeoP = \case GeoPositionWithoutCRS GeoEmpty -> Maybe (PointXY :+ Maybe RestGeoPosition) forall a. Maybe a Nothing - GeoPointXY PointXY -p -> (PointXY :+ Maybe RestGeoPosition) + GeoPointXY PointXY +p -> (PointXY :+ Maybe RestGeoPosition) -> Maybe (PointXY :+ Maybe RestGeoPosition) forall a. a -> Maybe a Just ((PointXY :+ Maybe RestGeoPosition) @@ -296,16 +296,16 @@ -> Maybe (PointXY :+ Maybe RestGeoPosition) forall a b. (a -> b) -> a -> b $ PointXY -p PointXY +p PointXY -> Maybe RestGeoPosition -> PointXY :+ Maybe RestGeoPosition forall core extra. core -> extra -> core :+ extra :+ Maybe RestGeoPosition forall a. Maybe a Nothing - GeoPointXYZ (PointXYZ Double -x Double -y Double -z) -> (PointXY :+ Maybe RestGeoPosition) + GeoPointXYZ (PointXYZ Double +x Double +y Double +z) -> (PointXY :+ Maybe RestGeoPosition) -> Maybe (PointXY :+ Maybe RestGeoPosition) forall a. a -> Maybe a Just ((PointXY :+ Maybe RestGeoPosition) @@ -315,20 +315,20 @@ forall a b. (a -> b) -> a -> b $ (Double -> Double -> PointXY PointXY Double -x Double -y) PointXY +x Double +y) PointXY -> Maybe RestGeoPosition -> PointXY :+ Maybe RestGeoPosition forall core extra. core -> extra -> core :+ extra :+ RestGeoPosition -> Maybe RestGeoPosition forall a. a -> Maybe a Just (Double -> RestGeoPosition Z Double -z) - GeoPointXYZM (PointXYZM Double -x Double -y Double -z Double -m) -> (PointXY :+ Maybe RestGeoPosition) +z) + GeoPointXYZM (PointXYZM Double +x Double +y Double +z Double +m) -> (PointXY :+ Maybe RestGeoPosition) -> Maybe (PointXY :+ Maybe RestGeoPosition) forall a. a -> Maybe a Just ((PointXY :+ Maybe RestGeoPosition) @@ -338,16 +338,16 @@ forall a b. (a -> b) -> a -> b $ (Double -> Double -> PointXY PointXY Double -x Double -y) PointXY +x Double +y) PointXY -> Maybe RestGeoPosition -> PointXY :+ Maybe RestGeoPosition forall core extra. core -> extra -> core :+ extra :+ RestGeoPosition -> Maybe RestGeoPosition forall a. a -> Maybe a Just (Double -> Double -> RestGeoPosition ZM Double -z Double -m) +z Double +m) -- | An unsafe version, pretending that GeoEmpty is not possible @@ -384,8 +384,8 @@ Prism' GeoPositionWithoutCRS (PointXY :+ Maybe RestGeoPosition) _GeoPositionWithoutCRS) where - err :: a -err = String -> a + err :: a +err = String -> a forall a. HasCallStack => String -> a error String "_GeoPositionWithoutCRS'" @@ -397,18 +397,18 @@ type instance Dimension GeoPolygon = 2 -instance Wrapped GeoPolygon +instance Wrapped GeoPolygon instance Rewrapped GeoPolygon GeoPolygon ---------------------------------------- -type SimpleGeoPolygon point = SimplePolygonF (Cyclic ViewL1) point +type SimpleGeoPolygon point = SimplePolygonF (Cyclic ViewL1) point type SimpleGeoPolygon' = SimpleGeoPolygon GeoPositionWithoutCRS' -- | pre: the sequence has at leat 3 elements -_RingViewL1 :: (Eq b, Show b) - => Iso (LinearRing a) (LinearRing b) (Cyclic ViewL1 a) (Cyclic ViewL1 b) +_RingViewL1 :: (Eq b, Show b) + => Iso (LinearRing a) (LinearRing b) (Cyclic ViewL1 a) (Cyclic ViewL1 b) _RingViewL1 :: forall b a. (Eq b, Show b) => Iso @@ -430,7 +430,7 @@ forall a. a -> Maybe a -> a fromMaybe LinearRing b forall {a}. a -err (Maybe (LinearRing b) -> LinearRing b) +err (Maybe (LinearRing b) -> LinearRing b) -> (Cyclic ViewL1 b -> Maybe (LinearRing b)) -> Cyclic ViewL1 b -> LinearRing b @@ -446,28 +446,28 @@ forall a b. Coercible a b => a -> b coerce) where - err :: a -err = String -> a + err :: a +err = String -> a forall a. HasCallStack => String -> a error String "_RingSeq: failed" -- | Transform a ViewL1 into a LinearRing -ringToViewL1 :: LinearRing a -> ViewL1 a +ringToViewL1 :: LinearRing a -> ViewL1 a ringToViewL1 :: forall a. LinearRing a -> ViewL1 a -ringToViewL1 LinearRing a -r = case LinearRing a -> Seq a +ringToViewL1 LinearRing a +r = case LinearRing a -> Seq a forall a. LinearRing a -> Seq a toSeq LinearRing a -r of - (a -x :<| (Seq a -s :|> a +r of + (a +x :<| (Seq a +s :|> a _)) -> a -x a -> Seq a -> ViewL1 a +x a -> Seq a -> ViewL1 a forall a. a -> Seq a -> ViewL1 a :<< Seq a -s +s -- the last element is duplicated, we have at least three so this is s afe. Seq a _ -> String -> ViewL1 a @@ -476,11 +476,11 @@ "ringToViewL1" -- | try to transform a ViewL1 into a LinearRing -viewL1ToRing :: (Eq b, Show b) => ViewL1 b -> Maybe (LinearRing b) +viewL1ToRing :: (Eq b, Show b) => ViewL1 b -> Maybe (LinearRing b) viewL1ToRing :: forall b. (Eq b, Show b) => ViewL1 b -> Maybe (LinearRing b) -viewL1ToRing (b -x :<< Seq b -s) = (NonEmpty (SequenceToLinearRingError b) -> Maybe (LinearRing b)) +viewL1ToRing (b +x :<< Seq b +s) = (NonEmpty (SequenceToLinearRingError b) -> Maybe (LinearRing b)) -> (LinearRing b -> Maybe (LinearRing b)) -> Either (NonEmpty (SequenceToLinearRingError b)) (LinearRing b) -> Maybe (LinearRing b) @@ -508,21 +508,21 @@ fromSeq (Seq b -> Maybe (LinearRing b)) -> Seq b -> Maybe (LinearRing b) forall a b. (a -> b) -> a -> b $ b -x b -> Seq b -> Seq b +x b -> Seq b -> Seq b forall s a. Cons s s a a => a -> s -> s <| (Seq b -s Seq b -> b -> Seq b +s Seq b -> b -> Seq b forall s a. Snoc s s a a => s -> a -> s |> b -x) +x) -------------------------------------------------------------------------------- -- | Access the underlying container -_UncheckedSimplePolygon :: Iso (SimplePolygonF (Cyclic ViewL1) point) - (SimplePolygonF (Cyclic ViewL1) point') - (Cyclic ViewL1 point) - (Cyclic ViewL1 point') +_UncheckedSimplePolygon :: Iso (SimplePolygonF (Cyclic ViewL1) point) + (SimplePolygonF (Cyclic ViewL1) point') + (Cyclic ViewL1 point) + (Cyclic ViewL1 point') _UncheckedSimplePolygon :: forall point point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Cyclic ViewL1 point) (f (Cyclic ViewL1 point')) @@ -894,21 +894,21 @@ -> Iso' GeoPolygon GeoPolygonalDomain forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b iso GeoPolygon -> GeoPolygonalDomain -toPD GeoPolygonalDomain -> GeoPolygon -fromPD +toPD GeoPolygonalDomain -> GeoPolygon +fromPD where - toPD :: GeoPolygon -> GeoPolygonalDomain -toPD (GeoPolygon Seq (LinearRing GeoPositionWithoutCRS) -rings) = case Seq (LinearRing GeoPositionWithoutCRS) -rings of + toPD :: GeoPolygon -> GeoPolygonalDomain +toPD (GeoPolygon Seq (LinearRing GeoPositionWithoutCRS) +rings) = case Seq (LinearRing GeoPositionWithoutCRS) +rings of Seq (LinearRing GeoPositionWithoutCRS) Seq.Empty -> String -> GeoPolygonalDomain forall a. HasCallStack => String -> a error String "invalid" - (LinearRing GeoPositionWithoutCRS -outer :<| Seq (LinearRing GeoPositionWithoutCRS) -inners) -> SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) + (LinearRing GeoPositionWithoutCRS +outer :<| Seq (LinearRing GeoPositionWithoutCRS) +inners) -> SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) -> Seq (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) -> GeoPolygonalDomain @@ -916,7 +916,7 @@ SimplePolygonF f point -> h (SimplePolygonF f point) -> PolygonalDomainF h f point PolygonalDomain (LinearRing GeoPositionWithoutCRS -outerLinearRing GeoPositionWithoutCRS +outerLinearRing GeoPositionWithoutCRS -> Getting (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) (LinearRing GeoPositionWithoutCRS) @@ -933,7 +933,7 @@ (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) _UncheckedRingSimplePolygon) (Seq (LinearRing GeoPositionWithoutCRS) -innersSeq (LinearRing GeoPositionWithoutCRS) +innersSeq (LinearRing GeoPositionWithoutCRS) -> (Seq (LinearRing GeoPositionWithoutCRS) -> Seq (SimplePolygonF @@ -994,14 +994,14 @@ (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) _InnerRingSimplePolygon) - fromPD :: GeoPolygonalDomain -> GeoPolygon -fromPD (PolygonalDomain SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) -outer Seq + fromPD :: GeoPolygonalDomain -> GeoPolygon +fromPD (PolygonalDomain SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) +outer Seq (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) -inners) = - let outer' :: LinearRing GeoPositionWithoutCRS -outer' = SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) -outerSimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) +inners) = + let outer' :: LinearRing GeoPositionWithoutCRS +outer' = SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) +outerSimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition) -> Getting (LinearRing GeoPositionWithoutCRS) (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) @@ -1028,10 +1028,10 @@ (LinearRing GeoPositionWithoutCRS) (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) _UncheckedRingSimplePolygon - inners' :: Seq (LinearRing GeoPositionWithoutCRS) -inners' = Seq + inners' :: Seq (LinearRing GeoPositionWithoutCRS) +inners' = Seq (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) -innersSeq +innersSeq (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) -> (Seq (SimplePolygonF (Cyclic ViewL1) (PointXY :+ Maybe RestGeoPosition)) @@ -1085,12 +1085,12 @@ -> Seq (LinearRing GeoPositionWithoutCRS) -> GeoPolygon forall a b. (a -> b) -> a -> b $ LinearRing GeoPositionWithoutCRS -outer' LinearRing GeoPositionWithoutCRS +outer' LinearRing GeoPositionWithoutCRS -> Seq (LinearRing GeoPositionWithoutCRS) -> Seq (LinearRing GeoPositionWithoutCRS) forall s a. Cons s s a a => a -> s -> s <| Seq (LinearRing GeoPositionWithoutCRS) -inners' +inners' -- -------------------------------------------------------------------------------- diff --git a/haddocks/hgeometry/hgeometry.haddock b/haddocks/hgeometry/hgeometry.haddock index 14e7810ad..46a884d14 100644 Binary files a/haddocks/hgeometry/hgeometry.haddock and b/haddocks/hgeometry/hgeometry.haddock differ diff --git a/haddocks/hgeometry/ipe/Ipe-Attributes.html b/haddocks/hgeometry/ipe/Ipe-Attributes.html index 1dcc590f1..90700b0f7 100644 --- a/haddocks/hgeometry/ipe/Ipe-Attributes.html +++ b/haddocks/hgeometry/ipe/Ipe-Attributes.html @@ -1,11 +1,11 @@ -Ipe.Attributes
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Attributes

Description

Possible Attributes we can assign to items in an Ipe file

Synopsis

Documentation

data AttributeUniverse Source #

The possible Attributes supported in Ipe. To use these +Ipe.Attributes

hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Attributes

Description

Possible Attributes we can assign to items in an Ipe file

Synopsis

Documentation

data AttributeUniverse Source #

The possible Attributes supported in Ipe. To use these attributes, you'll likely need their Singletons's version which is Prefixed by an S. E.g. the Fill attribute is represented by a - singleton 'SFill :: Sing Fill'.

Instances

Instances details
Read AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

Show AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

Eq AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

SingKind AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

Associated Types

type Demote AttributeUniverse = (r :: Type) Source #

SingI 'Arrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Arrow Source #

SingI 'Clip Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Clip Source #

SingI 'Dash Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Dash Source #

SingI 'Depth Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Depth Source #

SingI 'Fill Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Fill Source #

SingI 'FillRule Source # 
Instance details

Defined in Ipe.Attributes

SingI 'Gradient Source # 
Instance details

Defined in Ipe.Attributes

SingI 'HAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'HAlign Source #

SingI 'Height Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Height Source #

SingI 'Layer Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Layer Source #

SingI 'LineCap Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'LineCap Source #

SingI 'LineJoin Source # 
Instance details

Defined in Ipe.Attributes

SingI 'Matrix Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Matrix Source #

SingI 'Opacity Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Opacity Source #

SingI 'Pen Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Pen Source #

SingI 'Pin Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Pin Source #

SingI 'RArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'RArrow Source #

SingI 'Size Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Size Source #

SingI 'Stroke Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Stroke Source #

SingI 'StrokeOpacity Source # 
Instance details

Defined in Ipe.Attributes

SingI 'Style Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Style Source #

SingI 'Tiling Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Tiling Source #

SingI 'Transformations Source # 
Instance details

Defined in Ipe.Attributes

SingI 'VAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'VAlign Source #

SingI 'Width Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Width Source #

(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

SuppressUnusedWarnings (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Demote AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

type Sing Source # 
Instance details

Defined in Ipe.Attributes

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) = AttrMap a6989586621679248458 a6989586621679248459

type family LayerSym0 :: AttributeUniverse where ... Source #

Equations

LayerSym0 = 'Layer 

type family MatrixSym0 :: AttributeUniverse where ... Source #

Equations

MatrixSym0 = 'Matrix 

type family PinSym0 :: AttributeUniverse where ... Source #

Equations

PinSym0 = 'Pin 

type family StrokeSym0 :: AttributeUniverse where ... Source #

Equations

StrokeSym0 = 'Stroke 

type family FillSym0 :: AttributeUniverse where ... Source #

Equations

FillSym0 = 'Fill 

type family PenSym0 :: AttributeUniverse where ... Source #

Equations

PenSym0 = 'Pen 

type family SizeSym0 :: AttributeUniverse where ... Source #

Equations

SizeSym0 = 'Size 

type family DashSym0 :: AttributeUniverse where ... Source #

Equations

DashSym0 = 'Dash 

type family LineCapSym0 :: AttributeUniverse where ... Source #

Equations

LineCapSym0 = 'LineCap 

type family LineJoinSym0 :: AttributeUniverse where ... Source #

Equations

LineJoinSym0 = 'LineJoin 

type family FillRuleSym0 :: AttributeUniverse where ... Source #

Equations

FillRuleSym0 = 'FillRule 

type family ArrowSym0 :: AttributeUniverse where ... Source #

Equations

ArrowSym0 = 'Arrow 

type family RArrowSym0 :: AttributeUniverse where ... Source #

Equations

RArrowSym0 = 'RArrow 

type family OpacitySym0 :: AttributeUniverse where ... Source #

Equations

OpacitySym0 = 'Opacity 

type family TilingSym0 :: AttributeUniverse where ... Source #

Equations

TilingSym0 = 'Tiling 

type family GradientSym0 :: AttributeUniverse where ... Source #

Equations

GradientSym0 = 'Gradient 

type family WidthSym0 :: AttributeUniverse where ... Source #

Equations

WidthSym0 = 'Width 

type family HeightSym0 :: AttributeUniverse where ... Source #

Equations

HeightSym0 = 'Height 

type family DepthSym0 :: AttributeUniverse where ... Source #

Equations

DepthSym0 = 'Depth 

type family VAlignSym0 :: AttributeUniverse where ... Source #

Equations

VAlignSym0 = 'VAlign 

type family HAlignSym0 :: AttributeUniverse where ... Source #

Equations

HAlignSym0 = 'HAlign 

type family StyleSym0 :: AttributeUniverse where ... Source #

Equations

StyleSym0 = 'Style 

type family ClipSym0 :: AttributeUniverse where ... Source #

Equations

ClipSym0 = 'Clip 

data SAttributeUniverse :: AttributeUniverse -> Type where Source #

Constructors

SLayer :: SAttributeUniverse ('Layer :: AttributeUniverse) 
SMatrix :: SAttributeUniverse ('Matrix :: AttributeUniverse) 
SPin :: SAttributeUniverse ('Pin :: AttributeUniverse) 
STransformations :: SAttributeUniverse ('Transformations :: AttributeUniverse) 
SStroke :: SAttributeUniverse ('Stroke :: AttributeUniverse) 
SFill :: SAttributeUniverse ('Fill :: AttributeUniverse) 
SPen :: SAttributeUniverse ('Pen :: AttributeUniverse) 
SSize :: SAttributeUniverse ('Size :: AttributeUniverse) 
SDash :: SAttributeUniverse ('Dash :: AttributeUniverse) 
SLineCap :: SAttributeUniverse ('LineCap :: AttributeUniverse) 
SLineJoin :: SAttributeUniverse ('LineJoin :: AttributeUniverse) 
SFillRule :: SAttributeUniverse ('FillRule :: AttributeUniverse) 
SArrow :: SAttributeUniverse ('Arrow :: AttributeUniverse) 
SRArrow :: SAttributeUniverse ('RArrow :: AttributeUniverse) 
SStrokeOpacity :: SAttributeUniverse ('StrokeOpacity :: AttributeUniverse) 
SOpacity :: SAttributeUniverse ('Opacity :: AttributeUniverse) 
STiling :: SAttributeUniverse ('Tiling :: AttributeUniverse) 
SGradient :: SAttributeUniverse ('Gradient :: AttributeUniverse) 
SWidth :: SAttributeUniverse ('Width :: AttributeUniverse) 
SHeight :: SAttributeUniverse ('Height :: AttributeUniverse) 
SDepth :: SAttributeUniverse ('Depth :: AttributeUniverse) 
SVAlign :: SAttributeUniverse ('VAlign :: AttributeUniverse) 
SHAlign :: SAttributeUniverse ('HAlign :: AttributeUniverse) 
SStyle :: SAttributeUniverse ('Style :: AttributeUniverse) 
SClip :: SAttributeUniverse ('Clip :: AttributeUniverse) 

type CommonAttributes = [Layer, Matrix, Pin, Transformations] Source #

IpeObjects may have attributes. Essentially attributes are + singleton 'SFill :: Sing Fill'.

Instances

Instances details
Read AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

Show AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

Eq AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

SingKind AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

Associated Types

type Demote AttributeUniverse = (r :: Type) Source #

SingI 'Arrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Arrow Source #

SingI 'Clip Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Clip Source #

SingI 'Dash Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Dash Source #

SingI 'Depth Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Depth Source #

SingI 'Fill Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Fill Source #

SingI 'FillRule Source # 
Instance details

Defined in Ipe.Attributes

SingI 'Gradient Source # 
Instance details

Defined in Ipe.Attributes

SingI 'HAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'HAlign Source #

SingI 'Height Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Height Source #

SingI 'Layer Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Layer Source #

SingI 'LineCap Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'LineCap Source #

SingI 'LineJoin Source # 
Instance details

Defined in Ipe.Attributes

SingI 'Matrix Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Matrix Source #

SingI 'Opacity Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Opacity Source #

SingI 'Pen Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Pen Source #

SingI 'Pin Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Pin Source #

SingI 'RArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'RArrow Source #

SingI 'Size Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Size Source #

SingI 'Stroke Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Stroke Source #

SingI 'StrokeOpacity Source # 
Instance details

Defined in Ipe.Attributes

SingI 'Style Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Style Source #

SingI 'Tiling Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Tiling Source #

SingI 'Transformations Source # 
Instance details

Defined in Ipe.Attributes

SingI 'VAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'VAlign Source #

SingI 'Width Source # 
Instance details

Defined in Ipe.Attributes

Methods

sing :: Sing 'Width Source #

(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

SuppressUnusedWarnings (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Demote AttributeUniverse Source # 
Instance details

Defined in Ipe.Attributes

type Sing Source # 
Instance details

Defined in Ipe.Attributes

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) = AttrMap a6989586621679250061 a6989586621679250062

type family LayerSym0 :: AttributeUniverse where ... Source #

Equations

LayerSym0 = 'Layer 

type family MatrixSym0 :: AttributeUniverse where ... Source #

Equations

MatrixSym0 = 'Matrix 

type family PinSym0 :: AttributeUniverse where ... Source #

Equations

PinSym0 = 'Pin 

type family StrokeSym0 :: AttributeUniverse where ... Source #

Equations

StrokeSym0 = 'Stroke 

type family FillSym0 :: AttributeUniverse where ... Source #

Equations

FillSym0 = 'Fill 

type family PenSym0 :: AttributeUniverse where ... Source #

Equations

PenSym0 = 'Pen 

type family SizeSym0 :: AttributeUniverse where ... Source #

Equations

SizeSym0 = 'Size 

type family DashSym0 :: AttributeUniverse where ... Source #

Equations

DashSym0 = 'Dash 

type family LineCapSym0 :: AttributeUniverse where ... Source #

Equations

LineCapSym0 = 'LineCap 

type family LineJoinSym0 :: AttributeUniverse where ... Source #

Equations

LineJoinSym0 = 'LineJoin 

type family FillRuleSym0 :: AttributeUniverse where ... Source #

Equations

FillRuleSym0 = 'FillRule 

type family ArrowSym0 :: AttributeUniverse where ... Source #

Equations

ArrowSym0 = 'Arrow 

type family RArrowSym0 :: AttributeUniverse where ... Source #

Equations

RArrowSym0 = 'RArrow 

type family OpacitySym0 :: AttributeUniverse where ... Source #

Equations

OpacitySym0 = 'Opacity 

type family TilingSym0 :: AttributeUniverse where ... Source #

Equations

TilingSym0 = 'Tiling 

type family GradientSym0 :: AttributeUniverse where ... Source #

Equations

GradientSym0 = 'Gradient 

type family WidthSym0 :: AttributeUniverse where ... Source #

Equations

WidthSym0 = 'Width 

type family HeightSym0 :: AttributeUniverse where ... Source #

Equations

HeightSym0 = 'Height 

type family DepthSym0 :: AttributeUniverse where ... Source #

Equations

DepthSym0 = 'Depth 

type family VAlignSym0 :: AttributeUniverse where ... Source #

Equations

VAlignSym0 = 'VAlign 

type family HAlignSym0 :: AttributeUniverse where ... Source #

Equations

HAlignSym0 = 'HAlign 

type family StyleSym0 :: AttributeUniverse where ... Source #

Equations

StyleSym0 = 'Style 

type family ClipSym0 :: AttributeUniverse where ... Source #

Equations

ClipSym0 = 'Clip 

data SAttributeUniverse :: AttributeUniverse -> Type where Source #

Constructors

SLayer :: SAttributeUniverse ('Layer :: AttributeUniverse) 
SMatrix :: SAttributeUniverse ('Matrix :: AttributeUniverse) 
SPin :: SAttributeUniverse ('Pin :: AttributeUniverse) 
STransformations :: SAttributeUniverse ('Transformations :: AttributeUniverse) 
SStroke :: SAttributeUniverse ('Stroke :: AttributeUniverse) 
SFill :: SAttributeUniverse ('Fill :: AttributeUniverse) 
SPen :: SAttributeUniverse ('Pen :: AttributeUniverse) 
SSize :: SAttributeUniverse ('Size :: AttributeUniverse) 
SDash :: SAttributeUniverse ('Dash :: AttributeUniverse) 
SLineCap :: SAttributeUniverse ('LineCap :: AttributeUniverse) 
SLineJoin :: SAttributeUniverse ('LineJoin :: AttributeUniverse) 
SFillRule :: SAttributeUniverse ('FillRule :: AttributeUniverse) 
SArrow :: SAttributeUniverse ('Arrow :: AttributeUniverse) 
SRArrow :: SAttributeUniverse ('RArrow :: AttributeUniverse) 
SStrokeOpacity :: SAttributeUniverse ('StrokeOpacity :: AttributeUniverse) 
SOpacity :: SAttributeUniverse ('Opacity :: AttributeUniverse) 
STiling :: SAttributeUniverse ('Tiling :: AttributeUniverse) 
SGradient :: SAttributeUniverse ('Gradient :: AttributeUniverse) 
SWidth :: SAttributeUniverse ('Width :: AttributeUniverse) 
SHeight :: SAttributeUniverse ('Height :: AttributeUniverse) 
SDepth :: SAttributeUniverse ('Depth :: AttributeUniverse) 
SVAlign :: SAttributeUniverse ('VAlign :: AttributeUniverse) 
SHAlign :: SAttributeUniverse ('HAlign :: AttributeUniverse) 
SStyle :: SAttributeUniverse ('Style :: AttributeUniverse) 
SClip :: SAttributeUniverse ('Clip :: AttributeUniverse) 

type CommonAttributes = [Layer, Matrix, Pin, Transformations] Source #

IpeObjects may have attributes. Essentially attributes are (key,value) pairs. The key is some name. Which attributes an object can have depends on the type of the object. However, all ipe objects support the Common Attributes

type TextAttributes = CommonAttributes ++ [Stroke, Size, Width, Height, Depth, VAlign, HAlign, Style, Opacity] Source #

All attributes applicable to Text (TextLabels and Minipages)

type TextLabelAttributes = TextAttributes Source #

All attributes applicable to TextLabels

type MiniPageAttributes = TextAttributes Source #

All attributes applicable to Minipages

type ImageAttributes = CommonAttributes Source #

All attributes applicable to Images

type SymbolAttributes = CommonAttributes ++ [Stroke, Fill, Pen, Size] Source #

All attributes applicable to Symbols/Marks

type GroupAttributes = CommonAttributes ++ '['Clip] Source #

All attributes applicable to Groups

A single attribute Attr

newtype Attr (f :: TyFun u Type -> Type) (label :: u) Source #

Attr implements the mapping from labels to types as specified by the - (symbol representing) the type family f

Constructors

GAttr 

Fields

Instances

Instances details
Monoid (Attr f l) Source # 
Instance details

Defined in Ipe.Attributes

Methods

mempty :: Attr f l #

mappend :: Attr f l -> Attr f l -> Attr f l #

mconcat :: [Attr f l] -> Attr f l #

Semigroup (Attr f l) Source #

Give pref. to the *RIGHT*

Instance details

Defined in Ipe.Attributes

Methods

(<>) :: Attr f l -> Attr f l -> Attr f l #

sconcat :: NonEmpty (Attr f l) -> Attr f l #

stimes :: Integral b => b -> Attr f l -> Attr f l #

Read (Apply f label) => Read (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

readsPrec :: Int -> ReadS (Attr f label) #

readList :: ReadS [Attr f label] #

readPrec :: ReadPrec (Attr f label) #

readListPrec :: ReadPrec [Attr f label] #

Show (Apply f label) => Show (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> Attr f label -> ShowS #

show :: Attr f label -> String #

showList :: [Attr f label] -> ShowS #

Eq (Apply f label) => Eq (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: Attr f label -> Attr f label -> Bool #

(/=) :: Attr f label -> Attr f label -> Bool #

Ord (Apply f label) => Ord (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

compare :: Attr f label -> Attr f label -> Ordering #

(<) :: Attr f label -> Attr f label -> Bool #

(<=) :: Attr f label -> Attr f label -> Bool #

(>) :: Attr f label -> Attr f label -> Bool #

(>=) :: Attr f label -> Attr f label -> Bool #

max :: Attr f label -> Attr f label -> Attr f label #

min :: Attr f label -> Attr f label -> Attr f label #

IpeReadText (Apply f at) => IpeReadAttr (Attr f at) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Attr f at -> Maybe Text Source #

getAttr :: forall u (f :: TyFun u Type -> Type) (label :: u) u (f :: TyFun u Type -> Type) (label :: u). Iso (Attr (f :: TyFun u Type -> Type) (label :: u)) (Attr (f :: TyFun u Type -> Type) (label :: u)) (Maybe (Apply f label)) (Maybe (Apply f label)) Source #

pattern Attr :: Apply f label -> Attr f label Source #

Constructor for constructing an Attr given an actual value.

pattern NoAttr :: Attr f label Source #

An Attribute that is not set

traverseAttr :: Applicative h => (Apply f label -> h (Apply g label)) -> Attr f label -> h (Attr g label) Source #

Traverse an attribute.

pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a) Source #

Traverse for the situation where the type is not actually parameterized.

Attributes

newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) Source #

A collection of Attributes.

Constructors

Attrs (Rec (Attr f) ats) 

Instances

Instances details
(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

RecApplicative ats => Monoid (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

mempty :: Attributes f ats #

mappend :: Attributes f ats -> Attributes f ats -> Attributes f ats #

mconcat :: [Attributes f ats] -> Attributes f ats #

Semigroup (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(<>) :: Attributes f ats -> Attributes f ats -> Attributes f ats #

sconcat :: NonEmpty (Attributes f ats) -> Attributes f ats #

stimes :: Integral b => b -> Attributes f ats -> Attributes f ats #

(RMap ats, ReifyConstraint Show (Attr f) ats, RecordToList ats, RecAll (Attr f) ats Show) => Show (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> Attributes f ats -> ShowS #

show :: Attributes f ats -> String #

showList :: [Attributes f ats] -> ShowS #

(ReifyConstraint Eq (Attr f) ats, RecordToList ats, RecAll (Attr f) ats Eq) => Eq (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: Attributes f ats -> Attributes f ats -> Bool #

(/=) :: Attributes f ats -> Attributes f ats -> Bool #

unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats') Source #

Get a vinyl Record with Attrs

traverseAttrs :: Applicative h => (forall label. Attr f label -> h (Attr g label)) -> Attributes f ats -> h (Attributes g ats) Source #

Traverse implementation for Attrs

zipRecsWith :: (forall a. f a -> g a -> h a) -> Rec f as -> Rec g as -> Rec h as Source #

Zip two Recs with the given function.

ixAttr :: forall at ats proxy f. at ats => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at)) Source #

Lens into a specific attribute, if it is set.

_Attr :: forall at ats proxy f. (at ats, RecApplicative ats) => proxy at -> Prism' (Attributes f ats) (Apply f at) Source #

Prism into a particular attribute.

lookupAttr :: at ats => proxy at -> Attributes f ats -> Maybe (Apply f at) Source #

Looks up a particular attribute.

setAttr :: forall proxy at ats f. at ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats Source #

Sets a particular attribute

takeAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats) Source #

gets and removes the attribute from Attributes

unSetAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> Attributes f ats Source #

unsets/Removes an attribute

attr :: (at ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats Source #

Creates a singleton attribute

Implementations for Common Attributes

data PinType Source #

Possible values for Pin

Constructors

No 
Yes 
Horizontal 
Vertical 

Instances

Instances details
Enum PinType Source # 
Instance details

Defined in Ipe.Attributes

Read PinType Source # 
Instance details

Defined in Ipe.Attributes

Show PinType Source # 
Instance details

Defined in Ipe.Attributes

Eq PinType Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: PinType -> PinType -> Bool #

(/=) :: PinType -> PinType -> Bool #

IpeReadText PinType Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText PinType Source # 
Instance details

Defined in Ipe.Writer

data TransformationTypes Source #

Possible values for Transformation

Constructors

Affine 
Rigid 
Translations 

Instances

Instances details
Enum TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

Read TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

Show TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

Eq TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText TransformationTypes Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText TransformationTypes Source # 
Instance details

Defined in Ipe.Writer

Text Attributes

data HorizontalAlignment Source #

Instances

Instances details
Enum HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Read HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Show HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Eq HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Ord HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Writer

data VerticalAlignment Source #

Instances

Instances details
Enum VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Read VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Show VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Eq VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Ord VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText VerticalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText VerticalAlignment Source # 
Instance details

Defined in Ipe.Writer

type TeXStyle = Text Source #

Should be a symbolic name.

type TextSizeUnit r = r Source #

size of text in points

Symbol Attributes

newtype IpeSize r Source #

The optional Attributes for a symbol + (symbol representing) the type family f

Constructors

GAttr 

Fields

Instances

Instances details
Monoid (Attr f l) Source # 
Instance details

Defined in Ipe.Attributes

Methods

mempty :: Attr f l #

mappend :: Attr f l -> Attr f l -> Attr f l #

mconcat :: [Attr f l] -> Attr f l #

Semigroup (Attr f l) Source #

Give pref. to the *RIGHT*

Instance details

Defined in Ipe.Attributes

Methods

(<>) :: Attr f l -> Attr f l -> Attr f l #

sconcat :: NonEmpty (Attr f l) -> Attr f l #

stimes :: Integral b => b -> Attr f l -> Attr f l #

Read (Apply f label) => Read (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

readsPrec :: Int -> ReadS (Attr f label) #

readList :: ReadS [Attr f label] #

readPrec :: ReadPrec (Attr f label) #

readListPrec :: ReadPrec [Attr f label] #

Show (Apply f label) => Show (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> Attr f label -> ShowS #

show :: Attr f label -> String #

showList :: [Attr f label] -> ShowS #

Eq (Apply f label) => Eq (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: Attr f label -> Attr f label -> Bool #

(/=) :: Attr f label -> Attr f label -> Bool #

Ord (Apply f label) => Ord (Attr f label) Source # 
Instance details

Defined in Ipe.Attributes

Methods

compare :: Attr f label -> Attr f label -> Ordering #

(<) :: Attr f label -> Attr f label -> Bool #

(<=) :: Attr f label -> Attr f label -> Bool #

(>) :: Attr f label -> Attr f label -> Bool #

(>=) :: Attr f label -> Attr f label -> Bool #

max :: Attr f label -> Attr f label -> Attr f label #

min :: Attr f label -> Attr f label -> Attr f label #

IpeReadText (Apply f at) => IpeReadAttr (Attr f at) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Attr f at -> Maybe Text Source #

getAttr :: forall u (f :: TyFun u Type -> Type) (label :: u) u (f :: TyFun u Type -> Type) (label :: u). Iso (Attr (f :: TyFun u Type -> Type) (label :: u)) (Attr (f :: TyFun u Type -> Type) (label :: u)) (Maybe (Apply f label)) (Maybe (Apply f label)) Source #

pattern Attr :: Apply f label -> Attr f label Source #

Constructor for constructing an Attr given an actual value.

pattern NoAttr :: Attr f label Source #

An Attribute that is not set

traverseAttr :: Applicative h => (Apply f label -> h (Apply g label)) -> Attr f label -> h (Attr g label) Source #

Traverse an attribute.

pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a) Source #

Traverse for the situation where the type is not actually parameterized.

Attributes

newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) Source #

A collection of Attributes.

Constructors

Attrs (Rec (Attr f) ats) 

Instances

Instances details
(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

RecApplicative ats => Monoid (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

mempty :: Attributes f ats #

mappend :: Attributes f ats -> Attributes f ats -> Attributes f ats #

mconcat :: [Attributes f ats] -> Attributes f ats #

Semigroup (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(<>) :: Attributes f ats -> Attributes f ats -> Attributes f ats #

sconcat :: NonEmpty (Attributes f ats) -> Attributes f ats #

stimes :: Integral b => b -> Attributes f ats -> Attributes f ats #

(RMap ats, ReifyConstraint Show (Attr f) ats, RecordToList ats, RecAll (Attr f) ats Show) => Show (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> Attributes f ats -> ShowS #

show :: Attributes f ats -> String #

showList :: [Attributes f ats] -> ShowS #

(ReifyConstraint Eq (Attr f) ats, RecordToList ats, RecAll (Attr f) ats Eq) => Eq (Attributes f ats) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: Attributes f ats -> Attributes f ats -> Bool #

(/=) :: Attributes f ats -> Attributes f ats -> Bool #

unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats') Source #

Get a vinyl Record with Attrs

traverseAttrs :: Applicative h => (forall label. Attr f label -> h (Attr g label)) -> Attributes f ats -> h (Attributes g ats) Source #

Traverse implementation for Attrs

zipRecsWith :: (forall a. f a -> g a -> h a) -> Rec f as -> Rec g as -> Rec h as Source #

Zip two Recs with the given function.

ixAttr :: forall at ats proxy f. at ats => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at)) Source #

Lens into a specific attribute, if it is set.

_Attr :: forall at ats proxy f. (at ats, RecApplicative ats) => proxy at -> Prism' (Attributes f ats) (Apply f at) Source #

Prism into a particular attribute.

lookupAttr :: at ats => proxy at -> Attributes f ats -> Maybe (Apply f at) Source #

Looks up a particular attribute.

setAttr :: forall proxy at ats f. at ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats Source #

Sets a particular attribute

takeAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats) Source #

gets and removes the attribute from Attributes

unSetAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> Attributes f ats Source #

unsets/Removes an attribute

attr :: (at ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats Source #

Creates a singleton attribute

Implementations for Common Attributes

data PinType Source #

Possible values for Pin

Constructors

No 
Yes 
Horizontal 
Vertical 

Instances

Instances details
Enum PinType Source # 
Instance details

Defined in Ipe.Attributes

Read PinType Source # 
Instance details

Defined in Ipe.Attributes

Show PinType Source # 
Instance details

Defined in Ipe.Attributes

Eq PinType Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: PinType -> PinType -> Bool #

(/=) :: PinType -> PinType -> Bool #

IpeReadText PinType Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText PinType Source # 
Instance details

Defined in Ipe.Writer

data TransformationTypes Source #

Possible values for Transformation

Constructors

Affine 
Rigid 
Translations 

Instances

Instances details
Enum TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

Read TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

Show TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

Eq TransformationTypes Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText TransformationTypes Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText TransformationTypes Source # 
Instance details

Defined in Ipe.Writer

Text Attributes

data HorizontalAlignment Source #

Instances

Instances details
Enum HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Read HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Show HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Eq HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Ord HorizontalAlignment Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Writer

data VerticalAlignment Source #

Instances

Instances details
Enum VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Read VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Show VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Eq VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

Ord VerticalAlignment Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText VerticalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText VerticalAlignment Source # 
Instance details

Defined in Ipe.Writer

type TeXStyle = Text Source #

Should be a symbolic name.

type TextSizeUnit r = r Source #

size of text in points

Symbol Attributes

newtype IpeSize r Source #

The optional Attributes for a symbol data SymbolAttributeUniverse = SymbolStroke | SymbolFill | SymbolPen | Size - deriving (Show,Eq)

Size

Constructors

IpeSize (IpeValue r) 

Instances

Instances details
Foldable IpeSize Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpeSize m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSize a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSize a -> m #

foldr :: (a -> b -> b) -> b -> IpeSize a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSize a -> b #

foldl :: (b -> a -> b) -> b -> IpeSize a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSize a -> b #

foldr1 :: (a -> a -> a) -> IpeSize a -> a #

foldl1 :: (a -> a -> a) -> IpeSize a -> a #

toList :: IpeSize a -> [a] #

null :: IpeSize a -> Bool #

length :: IpeSize a -> Int #

elem :: Eq a => a -> IpeSize a -> Bool #

maximum :: Ord a => IpeSize a -> a #

minimum :: Ord a => IpeSize a -> a #

sum :: Num a => IpeSize a -> a #

product :: Num a => IpeSize a -> a #

Traversable IpeSize Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpeSize a -> f (IpeSize b) #

sequenceA :: Applicative f => IpeSize (f a) -> f (IpeSize a) #

mapM :: Monad m => (a -> m b) -> IpeSize a -> m (IpeSize b) #

sequence :: Monad m => IpeSize (m a) -> m (IpeSize a) #

Functor IpeSize Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpeSize a -> IpeSize b #

(<$) :: a -> IpeSize b -> IpeSize a #

Show r => Show (IpeSize r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpeSize r -> ShowS #

show :: IpeSize r -> String #

showList :: [IpeSize r] -> ShowS #

Eq r => Eq (IpeSize r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpeSize r -> IpeSize r -> Bool #

(/=) :: IpeSize r -> IpeSize r -> Bool #

Ord r => Ord (IpeSize r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

compare :: IpeSize r -> IpeSize r -> Ordering #

(<) :: IpeSize r -> IpeSize r -> Bool #

(<=) :: IpeSize r -> IpeSize r -> Bool #

(>) :: IpeSize r -> IpeSize r -> Bool #

(>=) :: IpeSize r -> IpeSize r -> Bool #

max :: IpeSize r -> IpeSize r -> IpeSize r #

min :: IpeSize r -> IpeSize r -> IpeSize r #

Coordinate r => IpeReadText (IpeSize r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeSize r) Source # 
Instance details

Defined in Ipe.Writer

newtype IpePen r Source #

Pen/Thickness

Constructors

IpePen (IpeValue r) 

Instances

Instances details
Foldable IpePen Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpePen m -> m #

foldMap :: Monoid m => (a -> m) -> IpePen a -> m #

foldMap' :: Monoid m => (a -> m) -> IpePen a -> m #

foldr :: (a -> b -> b) -> b -> IpePen a -> b #

foldr' :: (a -> b -> b) -> b -> IpePen a -> b #

foldl :: (b -> a -> b) -> b -> IpePen a -> b #

foldl' :: (b -> a -> b) -> b -> IpePen a -> b #

foldr1 :: (a -> a -> a) -> IpePen a -> a #

foldl1 :: (a -> a -> a) -> IpePen a -> a #

toList :: IpePen a -> [a] #

null :: IpePen a -> Bool #

length :: IpePen a -> Int #

elem :: Eq a => a -> IpePen a -> Bool #

maximum :: Ord a => IpePen a -> a #

minimum :: Ord a => IpePen a -> a #

sum :: Num a => IpePen a -> a #

product :: Num a => IpePen a -> a #

Traversable IpePen Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpePen a -> f (IpePen b) #

sequenceA :: Applicative f => IpePen (f a) -> f (IpePen a) #

mapM :: Monad m => (a -> m b) -> IpePen a -> m (IpePen b) #

sequence :: Monad m => IpePen (m a) -> m (IpePen a) #

Functor IpePen Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpePen a -> IpePen b #

(<$) :: a -> IpePen b -> IpePen a #

Show r => Show (IpePen r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpePen r -> ShowS #

show :: IpePen r -> String #

showList :: [IpePen r] -> ShowS #

Eq r => Eq (IpePen r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpePen r -> IpePen r -> Bool #

(/=) :: IpePen r -> IpePen r -> Bool #

Ord r => Ord (IpePen r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

compare :: IpePen r -> IpePen r -> Ordering #

(<) :: IpePen r -> IpePen r -> Bool #

(<=) :: IpePen r -> IpePen r -> Bool #

(>) :: IpePen r -> IpePen r -> Bool #

(>=) :: IpePen r -> IpePen r -> Bool #

max :: IpePen r -> IpePen r -> IpePen r #

min :: IpePen r -> IpePen r -> IpePen r #

Coordinate r => IpeReadText (IpePen r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpePen r) Source # 
Instance details

Defined in Ipe.Writer

Path Attributes

data IpeDash r Source #

Possible values for Dash

Constructors

DashNamed Text 
DashPattern [r] r 

Instances

Instances details
Foldable IpeDash Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpeDash m -> m #

foldMap :: Monoid m => (a -> m) -> IpeDash a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeDash a -> m #

foldr :: (a -> b -> b) -> b -> IpeDash a -> b #

foldr' :: (a -> b -> b) -> b -> IpeDash a -> b #

foldl :: (b -> a -> b) -> b -> IpeDash a -> b #

foldl' :: (b -> a -> b) -> b -> IpeDash a -> b #

foldr1 :: (a -> a -> a) -> IpeDash a -> a #

foldl1 :: (a -> a -> a) -> IpeDash a -> a #

toList :: IpeDash a -> [a] #

null :: IpeDash a -> Bool #

length :: IpeDash a -> Int #

elem :: Eq a => a -> IpeDash a -> Bool #

maximum :: Ord a => IpeDash a -> a #

minimum :: Ord a => IpeDash a -> a #

sum :: Num a => IpeDash a -> a #

product :: Num a => IpeDash a -> a #

Traversable IpeDash Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpeDash a -> f (IpeDash b) #

sequenceA :: Applicative f => IpeDash (f a) -> f (IpeDash a) #

mapM :: Monad m => (a -> m b) -> IpeDash a -> m (IpeDash b) #

sequence :: Monad m => IpeDash (m a) -> m (IpeDash a) #

Functor IpeDash Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpeDash a -> IpeDash b #

(<$) :: a -> IpeDash b -> IpeDash a #

Show r => Show (IpeDash r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpeDash r -> ShowS #

show :: IpeDash r -> String #

showList :: [IpeDash r] -> ShowS #

Eq r => Eq (IpeDash r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpeDash r -> IpeDash r -> Bool #

(/=) :: IpeDash r -> IpeDash r -> Bool #

Coordinate r => IpeReadText (IpeDash r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeDash r) Source # 
Instance details

Defined in Ipe.Writer

data FillType Source #

Allowed Fill types

Constructors

Wind 
EOFill 

Instances

Instances details
Read FillType Source # 
Instance details

Defined in Ipe.Attributes

Show FillType Source # 
Instance details

Defined in Ipe.Attributes

Eq FillType Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText FillType Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText FillType Source # 
Instance details

Defined in Ipe.Writer

type IpeOpacity = Text Source #

IpeOpacity, IpeTyling, and IpeGradient are all symbolic values

data IpeArrow r Source #

Possible values for an ipe arrow

Constructors

IpeArrow 

Instances

Instances details
Foldable IpeArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpeArrow m -> m #

foldMap :: Monoid m => (a -> m) -> IpeArrow a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeArrow a -> m #

foldr :: (a -> b -> b) -> b -> IpeArrow a -> b #

foldr' :: (a -> b -> b) -> b -> IpeArrow a -> b #

foldl :: (b -> a -> b) -> b -> IpeArrow a -> b #

foldl' :: (b -> a -> b) -> b -> IpeArrow a -> b #

foldr1 :: (a -> a -> a) -> IpeArrow a -> a #

foldl1 :: (a -> a -> a) -> IpeArrow a -> a #

toList :: IpeArrow a -> [a] #

null :: IpeArrow a -> Bool #

length :: IpeArrow a -> Int #

elem :: Eq a => a -> IpeArrow a -> Bool #

maximum :: Ord a => IpeArrow a -> a #

minimum :: Ord a => IpeArrow a -> a #

sum :: Num a => IpeArrow a -> a #

product :: Num a => IpeArrow a -> a #

Traversable IpeArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpeArrow a -> f (IpeArrow b) #

sequenceA :: Applicative f => IpeArrow (f a) -> f (IpeArrow a) #

mapM :: Monad m => (a -> m b) -> IpeArrow a -> m (IpeArrow b) #

sequence :: Monad m => IpeArrow (m a) -> m (IpeArrow a) #

Functor IpeArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpeArrow a -> IpeArrow b #

(<$) :: a -> IpeArrow b -> IpeArrow a #

Show r => Show (IpeArrow r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpeArrow r -> ShowS #

show :: IpeArrow r -> String #

showList :: [IpeArrow r] -> ShowS #

Eq r => Eq (IpeArrow r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpeArrow r -> IpeArrow r -> Bool #

(/=) :: IpeArrow r -> IpeArrow r -> Bool #

Coordinate r => IpeReadText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Writer

arrowSize :: forall r r. Lens (IpeArrow r) (IpeArrow r) (IpeSize r) (IpeSize r) Source #

arrowName :: forall r. Lens' (IpeArrow r) Text Source #

normalArrow :: IpeArrow r Source #

A normal arrow

Group Attributes

Attribute names in Ipe

class IpeAttrName (a :: AttributeUniverse) where Source #

For the types representing attribute values we can get the name/key to use - when serializing to ipe.

Methods

attrName :: proxy a -> Text Source #

Instances

Instances details
IpeAttrName 'Arrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Arrow -> Text Source #

IpeAttrName 'Clip Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Clip -> Text Source #

IpeAttrName 'Dash Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Dash -> Text Source #

IpeAttrName 'Depth Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Depth -> Text Source #

IpeAttrName 'Fill Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Fill -> Text Source #

IpeAttrName 'FillRule Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'FillRule -> Text Source #

IpeAttrName 'Gradient Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Gradient -> Text Source #

IpeAttrName 'HAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'HAlign -> Text Source #

IpeAttrName 'Height Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Height -> Text Source #

IpeAttrName 'Layer Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Layer -> Text Source #

IpeAttrName 'LineCap Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'LineCap -> Text Source #

IpeAttrName 'LineJoin Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'LineJoin -> Text Source #

IpeAttrName 'Matrix Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Matrix -> Text Source #

IpeAttrName 'Opacity Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Opacity -> Text Source #

IpeAttrName 'Pen Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Pen -> Text Source #

IpeAttrName 'Pin Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Pin -> Text Source #

IpeAttrName 'RArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'RArrow -> Text Source #

IpeAttrName 'Size Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Size -> Text Source #

IpeAttrName 'Stroke Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Stroke -> Text Source #

IpeAttrName 'StrokeOpacity Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'StrokeOpacity -> Text Source #

IpeAttrName 'Style Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Style -> Text Source #

IpeAttrName 'Tiling Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Tiling -> Text Source #

IpeAttrName 'Transformations Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Transformations -> Text Source #

IpeAttrName 'VAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'VAlign -> Text Source #

IpeAttrName 'Width Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Width -> Text Source #

writeAttrNames :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs Source #

Writing Attribute names

\ No newline at end of file + deriving (Show,Eq)

Size

Constructors

IpeSize (IpeValue r) 

Instances

Instances details
Foldable IpeSize Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpeSize m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSize a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSize a -> m #

foldr :: (a -> b -> b) -> b -> IpeSize a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSize a -> b #

foldl :: (b -> a -> b) -> b -> IpeSize a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSize a -> b #

foldr1 :: (a -> a -> a) -> IpeSize a -> a #

foldl1 :: (a -> a -> a) -> IpeSize a -> a #

toList :: IpeSize a -> [a] #

null :: IpeSize a -> Bool #

length :: IpeSize a -> Int #

elem :: Eq a => a -> IpeSize a -> Bool #

maximum :: Ord a => IpeSize a -> a #

minimum :: Ord a => IpeSize a -> a #

sum :: Num a => IpeSize a -> a #

product :: Num a => IpeSize a -> a #

Traversable IpeSize Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpeSize a -> f (IpeSize b) #

sequenceA :: Applicative f => IpeSize (f a) -> f (IpeSize a) #

mapM :: Monad m => (a -> m b) -> IpeSize a -> m (IpeSize b) #

sequence :: Monad m => IpeSize (m a) -> m (IpeSize a) #

Functor IpeSize Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpeSize a -> IpeSize b #

(<$) :: a -> IpeSize b -> IpeSize a #

Show r => Show (IpeSize r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpeSize r -> ShowS #

show :: IpeSize r -> String #

showList :: [IpeSize r] -> ShowS #

Eq r => Eq (IpeSize r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpeSize r -> IpeSize r -> Bool #

(/=) :: IpeSize r -> IpeSize r -> Bool #

Ord r => Ord (IpeSize r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

compare :: IpeSize r -> IpeSize r -> Ordering #

(<) :: IpeSize r -> IpeSize r -> Bool #

(<=) :: IpeSize r -> IpeSize r -> Bool #

(>) :: IpeSize r -> IpeSize r -> Bool #

(>=) :: IpeSize r -> IpeSize r -> Bool #

max :: IpeSize r -> IpeSize r -> IpeSize r #

min :: IpeSize r -> IpeSize r -> IpeSize r #

Coordinate r => IpeReadText (IpeSize r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeSize r) Source # 
Instance details

Defined in Ipe.Writer

newtype IpePen r Source #

Pen/Thickness

Constructors

IpePen (IpeValue r) 

Instances

Instances details
Foldable IpePen Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpePen m -> m #

foldMap :: Monoid m => (a -> m) -> IpePen a -> m #

foldMap' :: Monoid m => (a -> m) -> IpePen a -> m #

foldr :: (a -> b -> b) -> b -> IpePen a -> b #

foldr' :: (a -> b -> b) -> b -> IpePen a -> b #

foldl :: (b -> a -> b) -> b -> IpePen a -> b #

foldl' :: (b -> a -> b) -> b -> IpePen a -> b #

foldr1 :: (a -> a -> a) -> IpePen a -> a #

foldl1 :: (a -> a -> a) -> IpePen a -> a #

toList :: IpePen a -> [a] #

null :: IpePen a -> Bool #

length :: IpePen a -> Int #

elem :: Eq a => a -> IpePen a -> Bool #

maximum :: Ord a => IpePen a -> a #

minimum :: Ord a => IpePen a -> a #

sum :: Num a => IpePen a -> a #

product :: Num a => IpePen a -> a #

Traversable IpePen Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpePen a -> f (IpePen b) #

sequenceA :: Applicative f => IpePen (f a) -> f (IpePen a) #

mapM :: Monad m => (a -> m b) -> IpePen a -> m (IpePen b) #

sequence :: Monad m => IpePen (m a) -> m (IpePen a) #

Functor IpePen Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpePen a -> IpePen b #

(<$) :: a -> IpePen b -> IpePen a #

Show r => Show (IpePen r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpePen r -> ShowS #

show :: IpePen r -> String #

showList :: [IpePen r] -> ShowS #

Eq r => Eq (IpePen r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpePen r -> IpePen r -> Bool #

(/=) :: IpePen r -> IpePen r -> Bool #

Ord r => Ord (IpePen r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

compare :: IpePen r -> IpePen r -> Ordering #

(<) :: IpePen r -> IpePen r -> Bool #

(<=) :: IpePen r -> IpePen r -> Bool #

(>) :: IpePen r -> IpePen r -> Bool #

(>=) :: IpePen r -> IpePen r -> Bool #

max :: IpePen r -> IpePen r -> IpePen r #

min :: IpePen r -> IpePen r -> IpePen r #

Coordinate r => IpeReadText (IpePen r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpePen r) Source # 
Instance details

Defined in Ipe.Writer

Path Attributes

data IpeDash r Source #

Possible values for Dash

Constructors

DashNamed Text 
DashPattern [r] r 

Instances

Instances details
Foldable IpeDash Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpeDash m -> m #

foldMap :: Monoid m => (a -> m) -> IpeDash a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeDash a -> m #

foldr :: (a -> b -> b) -> b -> IpeDash a -> b #

foldr' :: (a -> b -> b) -> b -> IpeDash a -> b #

foldl :: (b -> a -> b) -> b -> IpeDash a -> b #

foldl' :: (b -> a -> b) -> b -> IpeDash a -> b #

foldr1 :: (a -> a -> a) -> IpeDash a -> a #

foldl1 :: (a -> a -> a) -> IpeDash a -> a #

toList :: IpeDash a -> [a] #

null :: IpeDash a -> Bool #

length :: IpeDash a -> Int #

elem :: Eq a => a -> IpeDash a -> Bool #

maximum :: Ord a => IpeDash a -> a #

minimum :: Ord a => IpeDash a -> a #

sum :: Num a => IpeDash a -> a #

product :: Num a => IpeDash a -> a #

Traversable IpeDash Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpeDash a -> f (IpeDash b) #

sequenceA :: Applicative f => IpeDash (f a) -> f (IpeDash a) #

mapM :: Monad m => (a -> m b) -> IpeDash a -> m (IpeDash b) #

sequence :: Monad m => IpeDash (m a) -> m (IpeDash a) #

Functor IpeDash Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpeDash a -> IpeDash b #

(<$) :: a -> IpeDash b -> IpeDash a #

Show r => Show (IpeDash r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpeDash r -> ShowS #

show :: IpeDash r -> String #

showList :: [IpeDash r] -> ShowS #

Eq r => Eq (IpeDash r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpeDash r -> IpeDash r -> Bool #

(/=) :: IpeDash r -> IpeDash r -> Bool #

Coordinate r => IpeReadText (IpeDash r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeDash r) Source # 
Instance details

Defined in Ipe.Writer

data FillType Source #

Allowed Fill types

Constructors

Wind 
EOFill 

Instances

Instances details
Read FillType Source # 
Instance details

Defined in Ipe.Attributes

Show FillType Source # 
Instance details

Defined in Ipe.Attributes

Eq FillType Source # 
Instance details

Defined in Ipe.Attributes

IpeReadText FillType Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText FillType Source # 
Instance details

Defined in Ipe.Writer

type IpeOpacity = Text Source #

IpeOpacity, IpeTyling, and IpeGradient are all symbolic values

data IpeArrow r Source #

Possible values for an ipe arrow

Constructors

IpeArrow 

Instances

Instances details
Foldable IpeArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

fold :: Monoid m => IpeArrow m -> m #

foldMap :: Monoid m => (a -> m) -> IpeArrow a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeArrow a -> m #

foldr :: (a -> b -> b) -> b -> IpeArrow a -> b #

foldr' :: (a -> b -> b) -> b -> IpeArrow a -> b #

foldl :: (b -> a -> b) -> b -> IpeArrow a -> b #

foldl' :: (b -> a -> b) -> b -> IpeArrow a -> b #

foldr1 :: (a -> a -> a) -> IpeArrow a -> a #

foldl1 :: (a -> a -> a) -> IpeArrow a -> a #

toList :: IpeArrow a -> [a] #

null :: IpeArrow a -> Bool #

length :: IpeArrow a -> Int #

elem :: Eq a => a -> IpeArrow a -> Bool #

maximum :: Ord a => IpeArrow a -> a #

minimum :: Ord a => IpeArrow a -> a #

sum :: Num a => IpeArrow a -> a #

product :: Num a => IpeArrow a -> a #

Traversable IpeArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

traverse :: Applicative f => (a -> f b) -> IpeArrow a -> f (IpeArrow b) #

sequenceA :: Applicative f => IpeArrow (f a) -> f (IpeArrow a) #

mapM :: Monad m => (a -> m b) -> IpeArrow a -> m (IpeArrow b) #

sequence :: Monad m => IpeArrow (m a) -> m (IpeArrow a) #

Functor IpeArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

fmap :: (a -> b) -> IpeArrow a -> IpeArrow b #

(<$) :: a -> IpeArrow b -> IpeArrow a #

Show r => Show (IpeArrow r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

showsPrec :: Int -> IpeArrow r -> ShowS #

show :: IpeArrow r -> String #

showList :: [IpeArrow r] -> ShowS #

Eq r => Eq (IpeArrow r) Source # 
Instance details

Defined in Ipe.Attributes

Methods

(==) :: IpeArrow r -> IpeArrow r -> Bool #

(/=) :: IpeArrow r -> IpeArrow r -> Bool #

Coordinate r => IpeReadText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Writer

arrowSize :: forall r r. Lens (IpeArrow r) (IpeArrow r) (IpeSize r) (IpeSize r) Source #

arrowName :: forall r. Lens' (IpeArrow r) Text Source #

normalArrow :: IpeArrow r Source #

A normal arrow

Group Attributes

Attribute names in Ipe

class IpeAttrName (a :: AttributeUniverse) where Source #

For the types representing attribute values we can get the name/key to use + when serializing to ipe.

Methods

attrName :: proxy a -> Text Source #

Instances

Instances details
IpeAttrName 'Arrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Arrow -> Text Source #

IpeAttrName 'Clip Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Clip -> Text Source #

IpeAttrName 'Dash Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Dash -> Text Source #

IpeAttrName 'Depth Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Depth -> Text Source #

IpeAttrName 'Fill Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Fill -> Text Source #

IpeAttrName 'FillRule Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'FillRule -> Text Source #

IpeAttrName 'Gradient Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Gradient -> Text Source #

IpeAttrName 'HAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'HAlign -> Text Source #

IpeAttrName 'Height Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Height -> Text Source #

IpeAttrName 'Layer Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Layer -> Text Source #

IpeAttrName 'LineCap Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'LineCap -> Text Source #

IpeAttrName 'LineJoin Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'LineJoin -> Text Source #

IpeAttrName 'Matrix Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Matrix -> Text Source #

IpeAttrName 'Opacity Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Opacity -> Text Source #

IpeAttrName 'Pen Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Pen -> Text Source #

IpeAttrName 'Pin Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Pin -> Text Source #

IpeAttrName 'RArrow Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'RArrow -> Text Source #

IpeAttrName 'Size Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Size -> Text Source #

IpeAttrName 'Stroke Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Stroke -> Text Source #

IpeAttrName 'StrokeOpacity Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'StrokeOpacity -> Text Source #

IpeAttrName 'Style Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Style -> Text Source #

IpeAttrName 'Tiling Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Tiling -> Text Source #

IpeAttrName 'Transformations Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Transformations -> Text Source #

IpeAttrName 'VAlign Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'VAlign -> Text Source #

IpeAttrName 'Width Source # 
Instance details

Defined in Ipe.Attributes

Methods

attrName :: proxy 'Width -> Text Source #

writeAttrNames :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs Source #

Writing Attribute names

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Color.html b/haddocks/hgeometry/ipe/Ipe-Color.html index 9cf32fcbe..6667b8512 100644 --- a/haddocks/hgeometry/ipe/Ipe-Color.html +++ b/haddocks/hgeometry/ipe/Ipe-Color.html @@ -1,3 +1,3 @@ Ipe.Color
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Color

Description

Data type for representing colors in ipe as well as the colors available in - the standard ipe stylesheet.

Documentation

newtype IpeColor r Source #

Defines a color in Ipe. Colors are either RGB Values or Named - values.

Constructors

IpeColor (IpeValue (RGB r)) 

Instances

Instances details
Foldable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fold :: Monoid m => IpeColor m -> m #

foldMap :: Monoid m => (a -> m) -> IpeColor a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeColor a -> m #

foldr :: (a -> b -> b) -> b -> IpeColor a -> b #

foldr' :: (a -> b -> b) -> b -> IpeColor a -> b #

foldl :: (b -> a -> b) -> b -> IpeColor a -> b #

foldl' :: (b -> a -> b) -> b -> IpeColor a -> b #

foldr1 :: (a -> a -> a) -> IpeColor a -> a #

foldl1 :: (a -> a -> a) -> IpeColor a -> a #

toList :: IpeColor a -> [a] #

null :: IpeColor a -> Bool #

length :: IpeColor a -> Int #

elem :: Eq a => a -> IpeColor a -> Bool #

maximum :: Ord a => IpeColor a -> a #

minimum :: Ord a => IpeColor a -> a #

sum :: Num a => IpeColor a -> a #

product :: Num a => IpeColor a -> a #

Traversable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

traverse :: Applicative f => (a -> f b) -> IpeColor a -> f (IpeColor b) #

sequenceA :: Applicative f => IpeColor (f a) -> f (IpeColor a) #

mapM :: Monad m => (a -> m b) -> IpeColor a -> m (IpeColor b) #

sequence :: Monad m => IpeColor (m a) -> m (IpeColor a) #

Functor IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fmap :: (a -> b) -> IpeColor a -> IpeColor b #

(<$) :: a -> IpeColor b -> IpeColor a #

Read r => Read (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Show r => Show (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

showsPrec :: Int -> IpeColor r -> ShowS #

show :: IpeColor r -> String #

showList :: [IpeColor r] -> ShowS #

Eq r => Eq (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

(==) :: IpeColor r -> IpeColor r -> Bool #

(/=) :: IpeColor r -> IpeColor r -> Bool #

Ord r => Ord (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

compare :: IpeColor r -> IpeColor r -> Ordering #

(<) :: IpeColor r -> IpeColor r -> Bool #

(<=) :: IpeColor r -> IpeColor r -> Bool #

(>) :: IpeColor r -> IpeColor r -> Bool #

(>=) :: IpeColor r -> IpeColor r -> Bool #

max :: IpeColor r -> IpeColor r -> IpeColor r #

min :: IpeColor r -> IpeColor r -> IpeColor r #

Coordinate r => IpeReadText (IpeColor r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

named :: Text -> IpeColor r Source #

Creates a named color

basicNamedColors :: [IpeColor r] Source #

All basic named colors

Basic Named colors

\ No newline at end of file + the standard ipe stylesheet.

Documentation

newtype IpeColor r Source #

Defines a color in Ipe. Colors are either RGB Values or Named + values.

Constructors

IpeColor (IpeValue (RGB r)) 

Instances

Instances details
Foldable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fold :: Monoid m => IpeColor m -> m #

foldMap :: Monoid m => (a -> m) -> IpeColor a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeColor a -> m #

foldr :: (a -> b -> b) -> b -> IpeColor a -> b #

foldr' :: (a -> b -> b) -> b -> IpeColor a -> b #

foldl :: (b -> a -> b) -> b -> IpeColor a -> b #

foldl' :: (b -> a -> b) -> b -> IpeColor a -> b #

foldr1 :: (a -> a -> a) -> IpeColor a -> a #

foldl1 :: (a -> a -> a) -> IpeColor a -> a #

toList :: IpeColor a -> [a] #

null :: IpeColor a -> Bool #

length :: IpeColor a -> Int #

elem :: Eq a => a -> IpeColor a -> Bool #

maximum :: Ord a => IpeColor a -> a #

minimum :: Ord a => IpeColor a -> a #

sum :: Num a => IpeColor a -> a #

product :: Num a => IpeColor a -> a #

Traversable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

traverse :: Applicative f => (a -> f b) -> IpeColor a -> f (IpeColor b) #

sequenceA :: Applicative f => IpeColor (f a) -> f (IpeColor a) #

mapM :: Monad m => (a -> m b) -> IpeColor a -> m (IpeColor b) #

sequence :: Monad m => IpeColor (m a) -> m (IpeColor a) #

Functor IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fmap :: (a -> b) -> IpeColor a -> IpeColor b #

(<$) :: a -> IpeColor b -> IpeColor a #

Read r => Read (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Show r => Show (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

showsPrec :: Int -> IpeColor r -> ShowS #

show :: IpeColor r -> String #

showList :: [IpeColor r] -> ShowS #

Eq r => Eq (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

(==) :: IpeColor r -> IpeColor r -> Bool #

(/=) :: IpeColor r -> IpeColor r -> Bool #

Ord r => Ord (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

compare :: IpeColor r -> IpeColor r -> Ordering #

(<) :: IpeColor r -> IpeColor r -> Bool #

(<=) :: IpeColor r -> IpeColor r -> Bool #

(>) :: IpeColor r -> IpeColor r -> Bool #

(>=) :: IpeColor r -> IpeColor r -> Bool #

max :: IpeColor r -> IpeColor r -> IpeColor r #

min :: IpeColor r -> IpeColor r -> IpeColor r #

Coordinate r => IpeReadText (IpeColor r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

named :: Text -> IpeColor r Source #

Creates a named color

basicNamedColors :: [IpeColor r] Source #

All basic named colors

Basic Named colors

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Content.html b/haddocks/hgeometry/ipe/Ipe-Content.html index 192ff3d6e..304bab3ae 100644 --- a/haddocks/hgeometry/ipe/Ipe-Content.html +++ b/haddocks/hgeometry/ipe/Ipe-Content.html @@ -1,3 +1,3 @@ -Ipe.Content
hgeometry:ipe
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Content

Synopsis

Documentation

data Image r Source #

Image Objects

Constructors

Image () (Rectangle (Point 2 r)) 

Instances

Instances details
Foldable Image Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Image m -> m #

foldMap :: Monoid m => (a -> m) -> Image a -> m #

foldMap' :: Monoid m => (a -> m) -> Image a -> m #

foldr :: (a -> b -> b) -> b -> Image a -> b #

foldr' :: (a -> b -> b) -> b -> Image a -> b #

foldl :: (b -> a -> b) -> b -> Image a -> b #

foldl' :: (b -> a -> b) -> b -> Image a -> b #

foldr1 :: (a -> a -> a) -> Image a -> a #

foldl1 :: (a -> a -> a) -> Image a -> a #

toList :: Image a -> [a] #

null :: Image a -> Bool #

length :: Image a -> Int #

elem :: Eq a => a -> Image a -> Bool #

maximum :: Ord a => Image a -> a #

minimum :: Ord a => Image a -> a #

sum :: Num a => Image a -> a #

product :: Num a => Image a -> a #

Traversable Image Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Image a -> f (Image b) #

sequenceA :: Applicative f => Image (f a) -> f (Image a) #

mapM :: Monad m => (a -> m b) -> Image a -> m (Image b) #

sequence :: Monad m => Image (m a) -> m (Image a) #

Functor Image Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Image a -> Image b #

(<$) :: a -> Image b -> Image a #

ToObject Image Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Image r -> ShowS #

show :: Image r -> String #

showList :: [Image r] -> ShowS #

Eq r => Eq (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Image r -> Image r -> Bool #

(/=) :: Image r -> Image r -> Bool #

Ord r => Ord (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: Image r -> Image r -> Ordering #

(<) :: Image r -> Image r -> Bool #

(<=) :: Image r -> Image r -> Bool #

(>) :: Image r -> Image r -> Bool #

(>=) :: Image r -> Image r -> Bool #

max :: Image r -> Image r -> Image r #

min :: Image r -> Image r -> Image r #

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Image r)) (NumType (Image r)) -> Image r -> Image r

type Dimension (Image r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Image r) = 2
type NumType (Image r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Image r) = r

imageData :: forall r. Lens' (Image r) () Source #

rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r)) Source #

data TextLabel r Source #

Text Objects

A text label

Constructors

Label Text (Point 2 r) 

Instances

Instances details
Foldable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => TextLabel m -> m #

foldMap :: Monoid m => (a -> m) -> TextLabel a -> m #

foldMap' :: Monoid m => (a -> m) -> TextLabel a -> m #

foldr :: (a -> b -> b) -> b -> TextLabel a -> b #

foldr' :: (a -> b -> b) -> b -> TextLabel a -> b #

foldl :: (b -> a -> b) -> b -> TextLabel a -> b #

foldl' :: (b -> a -> b) -> b -> TextLabel a -> b #

foldr1 :: (a -> a -> a) -> TextLabel a -> a #

foldl1 :: (a -> a -> a) -> TextLabel a -> a #

toList :: TextLabel a -> [a] #

null :: TextLabel a -> Bool #

length :: TextLabel a -> Int #

elem :: Eq a => a -> TextLabel a -> Bool #

maximum :: Ord a => TextLabel a -> a #

minimum :: Ord a => TextLabel a -> a #

sum :: Num a => TextLabel a -> a #

product :: Num a => TextLabel a -> a #

Traversable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> TextLabel a -> f (TextLabel b) #

sequenceA :: Applicative f => TextLabel (f a) -> f (TextLabel a) #

mapM :: Monad m => (a -> m b) -> TextLabel a -> m (TextLabel b) #

sequence :: Monad m => TextLabel (m a) -> m (TextLabel a) #

Functor TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> TextLabel a -> TextLabel b #

(<$) :: a -> TextLabel b -> TextLabel a #

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

Show r => Show (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: TextLabel r -> TextLabel r -> Bool #

(/=) :: TextLabel r -> TextLabel r -> Bool #

Ord r => Ord (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r)) -> TextLabel r -> TextLabel r

type Dimension (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (TextLabel r) = 2
type NumType (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type NumType (TextLabel r) = r

data MiniPage r Source #

A Minipage

Constructors

MiniPage Text (Point 2 r) r 

Instances

Instances details
Foldable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => MiniPage m -> m #

foldMap :: Monoid m => (a -> m) -> MiniPage a -> m #

foldMap' :: Monoid m => (a -> m) -> MiniPage a -> m #

foldr :: (a -> b -> b) -> b -> MiniPage a -> b #

foldr' :: (a -> b -> b) -> b -> MiniPage a -> b #

foldl :: (b -> a -> b) -> b -> MiniPage a -> b #

foldl' :: (b -> a -> b) -> b -> MiniPage a -> b #

foldr1 :: (a -> a -> a) -> MiniPage a -> a #

foldl1 :: (a -> a -> a) -> MiniPage a -> a #

toList :: MiniPage a -> [a] #

null :: MiniPage a -> Bool #

length :: MiniPage a -> Int #

elem :: Eq a => a -> MiniPage a -> Bool #

maximum :: Ord a => MiniPage a -> a #

minimum :: Ord a => MiniPage a -> a #

sum :: Num a => MiniPage a -> a #

product :: Num a => MiniPage a -> a #

Traversable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> MiniPage a -> f (MiniPage b) #

sequenceA :: Applicative f => MiniPage (f a) -> f (MiniPage a) #

mapM :: Monad m => (a -> m b) -> MiniPage a -> m (MiniPage b) #

sequence :: Monad m => MiniPage (m a) -> m (MiniPage a) #

Functor MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> MiniPage a -> MiniPage b #

(<$) :: a -> MiniPage b -> MiniPage a #

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

Show r => Show (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> MiniPage r -> ShowS #

show :: MiniPage r -> String #

showList :: [MiniPage r] -> ShowS #

Eq r => Eq (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: MiniPage r -> MiniPage r -> Bool #

(/=) :: MiniPage r -> MiniPage r -> Bool #

Ord r => Ord (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: MiniPage r -> MiniPage r -> Ordering #

(<) :: MiniPage r -> MiniPage r -> Bool #

(<=) :: MiniPage r -> MiniPage r -> Bool #

(>) :: MiniPage r -> MiniPage r -> Bool #

(>=) :: MiniPage r -> MiniPage r -> Bool #

max :: MiniPage r -> MiniPage r -> MiniPage r #

min :: MiniPage r -> MiniPage r -> MiniPage r #

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r)) -> MiniPage r -> MiniPage r

type Dimension (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (MiniPage r) = 2
type NumType (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type NumType (MiniPage r) = r

data IpeSymbol r Source #

Ipe Symbols, i.e. Points

A symbol (point) in ipe

Constructors

Symbol (Point 2 r) Text 

Instances

Instances details
Foldable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeSymbol m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldr :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldl :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldr1 :: (a -> a -> a) -> IpeSymbol a -> a #

foldl1 :: (a -> a -> a) -> IpeSymbol a -> a #

toList :: IpeSymbol a -> [a] #

null :: IpeSymbol a -> Bool #

length :: IpeSymbol a -> Int #

elem :: Eq a => a -> IpeSymbol a -> Bool #

maximum :: Ord a => IpeSymbol a -> a #

minimum :: Ord a => IpeSymbol a -> a #

sum :: Num a => IpeSymbol a -> a #

product :: Num a => IpeSymbol a -> a #

Traversable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeSymbol a -> f (IpeSymbol b) #

sequenceA :: Applicative f => IpeSymbol (f a) -> f (IpeSymbol a) #

mapM :: Monad m => (a -> m b) -> IpeSymbol a -> m (IpeSymbol b) #

sequence :: Monad m => IpeSymbol (m a) -> m (IpeSymbol a) #

Functor IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeSymbol a -> IpeSymbol b #

(<$) :: a -> IpeSymbol b -> IpeSymbol a #

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Show r => Show (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeSymbol r -> IpeSymbol r -> Bool #

(/=) :: IpeSymbol r -> IpeSymbol r -> Bool #

Ord r => Ord (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r)) -> IpeSymbol r -> IpeSymbol r

type Dimension (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeSymbol r) = 2
type NumType (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeSymbol r) = r

symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r) Source #

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

newtype Group r Source #

Groups and Objects

Group Attributes

A group is essentially a list of IpeObjects.

Constructors

Group [IpeObject r] 

Instances

Instances details
Foldable Group Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Group m -> m #

foldMap :: Monoid m => (a -> m) -> Group a -> m #

foldMap' :: Monoid m => (a -> m) -> Group a -> m #

foldr :: (a -> b -> b) -> b -> Group a -> b #

foldr' :: (a -> b -> b) -> b -> Group a -> b #

foldl :: (b -> a -> b) -> b -> Group a -> b #

foldl' :: (b -> a -> b) -> b -> Group a -> b #

foldr1 :: (a -> a -> a) -> Group a -> a #

foldl1 :: (a -> a -> a) -> Group a -> a #

toList :: Group a -> [a] #

null :: Group a -> Bool #

length :: Group a -> Int #

elem :: Eq a => a -> Group a -> Bool #

maximum :: Ord a => Group a -> a #

minimum :: Ord a => Group a -> a #

sum :: Num a => Group a -> a #

product :: Num a => Group a -> a #

Traversable Group Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Group a -> f (Group b) #

sequenceA :: Applicative f => Group (f a) -> f (Group a) #

mapM :: Monad m => (a -> m b) -> Group a -> m (Group b) #

sequence :: Monad m => Group (m a) -> m (Group a) #

Functor Group Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Group a -> Group b #

(<$) :: a -> Group b -> Group a #

ToObject Group Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Group r -> ShowS #

show :: Group r -> String #

showList :: [Group r] -> ShowS #

Eq r => Eq (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Group r -> Group r -> Bool #

(/=) :: Group r -> Group r -> Bool #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Group r)) (NumType (Group r)) -> Group r -> Group r

type DefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

type Dimension (Group r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Group r) = 2
type NumType (Group r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Group r) = r

data IpeObject r Source #

Instances

Instances details
Foldable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeObject m -> m #

foldMap :: Monoid m => (a -> m) -> IpeObject a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeObject a -> m #

foldr :: (a -> b -> b) -> b -> IpeObject a -> b #

foldr' :: (a -> b -> b) -> b -> IpeObject a -> b #

foldl :: (b -> a -> b) -> b -> IpeObject a -> b #

foldl' :: (b -> a -> b) -> b -> IpeObject a -> b #

foldr1 :: (a -> a -> a) -> IpeObject a -> a #

foldl1 :: (a -> a -> a) -> IpeObject a -> a #

toList :: IpeObject a -> [a] #

null :: IpeObject a -> Bool #

length :: IpeObject a -> Int #

elem :: Eq a => a -> IpeObject a -> Bool #

maximum :: Ord a => IpeObject a -> a #

minimum :: Ord a => IpeObject a -> a #

sum :: Num a => IpeObject a -> a #

product :: Num a => IpeObject a -> a #

Traversable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeObject a -> f (IpeObject b) #

sequenceA :: Applicative f => IpeObject (f a) -> f (IpeObject a) #

mapM :: Monad m => (a -> m b) -> IpeObject a -> m (IpeObject b) #

sequence :: Monad m => IpeObject (m a) -> m (IpeObject a) #

Functor IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeObject a -> IpeObject b #

(<$) :: a -> IpeObject b -> IpeObject a #

Show r => Show (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeObject r -> IpeObject r -> Bool #

(/=) :: IpeObject r -> IpeObject r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r)) -> IpeObject r -> IpeObject r

type Dimension (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeObject r) = 2
type NumType (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeObject r) = r

type IpeObject' g r = g r :+ IpeAttributes g r Source #

An IpeObject' is essentially the oject ogether with its attributes

ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r Source #

Shorthand for constructing ipeObjects

class ToObject i where Source #

Instances

Instances details
ToObject Group Source # 
Instance details

Defined in Ipe.Content

ToObject Image Source # 
Instance details

Defined in Ipe.Content

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

ToObject Path Source # 
Instance details

Defined in Ipe.Content

type Attributes' r = Attributes (AttrMapSym1 r) Source #

Attributes' :: Type -> [AttributeUniverse] -> Type

type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ... Source #

The mapping between the labels of the the attributes and the types of the +Ipe.Content

hgeometry:ipe
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Content

Synopsis

Documentation

data Image r Source #

Image Objects

Constructors

Image () (Rectangle (Point 2 r)) 

Instances

Instances details
Foldable Image Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Image m -> m #

foldMap :: Monoid m => (a -> m) -> Image a -> m #

foldMap' :: Monoid m => (a -> m) -> Image a -> m #

foldr :: (a -> b -> b) -> b -> Image a -> b #

foldr' :: (a -> b -> b) -> b -> Image a -> b #

foldl :: (b -> a -> b) -> b -> Image a -> b #

foldl' :: (b -> a -> b) -> b -> Image a -> b #

foldr1 :: (a -> a -> a) -> Image a -> a #

foldl1 :: (a -> a -> a) -> Image a -> a #

toList :: Image a -> [a] #

null :: Image a -> Bool #

length :: Image a -> Int #

elem :: Eq a => a -> Image a -> Bool #

maximum :: Ord a => Image a -> a #

minimum :: Ord a => Image a -> a #

sum :: Num a => Image a -> a #

product :: Num a => Image a -> a #

Traversable Image Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Image a -> f (Image b) #

sequenceA :: Applicative f => Image (f a) -> f (Image a) #

mapM :: Monad m => (a -> m b) -> Image a -> m (Image b) #

sequence :: Monad m => Image (m a) -> m (Image a) #

Functor Image Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Image a -> Image b #

(<$) :: a -> Image b -> Image a #

ToObject Image Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Image r -> ShowS #

show :: Image r -> String #

showList :: [Image r] -> ShowS #

Eq r => Eq (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Image r -> Image r -> Bool #

(/=) :: Image r -> Image r -> Bool #

Ord r => Ord (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: Image r -> Image r -> Ordering #

(<) :: Image r -> Image r -> Bool #

(<=) :: Image r -> Image r -> Bool #

(>) :: Image r -> Image r -> Bool #

(>=) :: Image r -> Image r -> Bool #

max :: Image r -> Image r -> Image r #

min :: Image r -> Image r -> Image r #

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Image r)) (NumType (Image r)) -> Image r -> Image r

type Dimension (Image r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Image r) = 2
type NumType (Image r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Image r) = r

imageData :: forall r. Lens' (Image r) () Source #

rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r)) Source #

data TextLabel r Source #

Text Objects

A text label

Constructors

Label Text (Point 2 r) 

Instances

Instances details
Foldable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => TextLabel m -> m #

foldMap :: Monoid m => (a -> m) -> TextLabel a -> m #

foldMap' :: Monoid m => (a -> m) -> TextLabel a -> m #

foldr :: (a -> b -> b) -> b -> TextLabel a -> b #

foldr' :: (a -> b -> b) -> b -> TextLabel a -> b #

foldl :: (b -> a -> b) -> b -> TextLabel a -> b #

foldl' :: (b -> a -> b) -> b -> TextLabel a -> b #

foldr1 :: (a -> a -> a) -> TextLabel a -> a #

foldl1 :: (a -> a -> a) -> TextLabel a -> a #

toList :: TextLabel a -> [a] #

null :: TextLabel a -> Bool #

length :: TextLabel a -> Int #

elem :: Eq a => a -> TextLabel a -> Bool #

maximum :: Ord a => TextLabel a -> a #

minimum :: Ord a => TextLabel a -> a #

sum :: Num a => TextLabel a -> a #

product :: Num a => TextLabel a -> a #

Traversable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> TextLabel a -> f (TextLabel b) #

sequenceA :: Applicative f => TextLabel (f a) -> f (TextLabel a) #

mapM :: Monad m => (a -> m b) -> TextLabel a -> m (TextLabel b) #

sequence :: Monad m => TextLabel (m a) -> m (TextLabel a) #

Functor TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> TextLabel a -> TextLabel b #

(<$) :: a -> TextLabel b -> TextLabel a #

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

Show r => Show (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: TextLabel r -> TextLabel r -> Bool #

(/=) :: TextLabel r -> TextLabel r -> Bool #

Ord r => Ord (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r)) -> TextLabel r -> TextLabel r

type Dimension (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (TextLabel r) = 2
type NumType (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type NumType (TextLabel r) = r

data MiniPage r Source #

A Minipage

Constructors

MiniPage Text (Point 2 r) r 

Instances

Instances details
Foldable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => MiniPage m -> m #

foldMap :: Monoid m => (a -> m) -> MiniPage a -> m #

foldMap' :: Monoid m => (a -> m) -> MiniPage a -> m #

foldr :: (a -> b -> b) -> b -> MiniPage a -> b #

foldr' :: (a -> b -> b) -> b -> MiniPage a -> b #

foldl :: (b -> a -> b) -> b -> MiniPage a -> b #

foldl' :: (b -> a -> b) -> b -> MiniPage a -> b #

foldr1 :: (a -> a -> a) -> MiniPage a -> a #

foldl1 :: (a -> a -> a) -> MiniPage a -> a #

toList :: MiniPage a -> [a] #

null :: MiniPage a -> Bool #

length :: MiniPage a -> Int #

elem :: Eq a => a -> MiniPage a -> Bool #

maximum :: Ord a => MiniPage a -> a #

minimum :: Ord a => MiniPage a -> a #

sum :: Num a => MiniPage a -> a #

product :: Num a => MiniPage a -> a #

Traversable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> MiniPage a -> f (MiniPage b) #

sequenceA :: Applicative f => MiniPage (f a) -> f (MiniPage a) #

mapM :: Monad m => (a -> m b) -> MiniPage a -> m (MiniPage b) #

sequence :: Monad m => MiniPage (m a) -> m (MiniPage a) #

Functor MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> MiniPage a -> MiniPage b #

(<$) :: a -> MiniPage b -> MiniPage a #

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

Show r => Show (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> MiniPage r -> ShowS #

show :: MiniPage r -> String #

showList :: [MiniPage r] -> ShowS #

Eq r => Eq (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: MiniPage r -> MiniPage r -> Bool #

(/=) :: MiniPage r -> MiniPage r -> Bool #

Ord r => Ord (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: MiniPage r -> MiniPage r -> Ordering #

(<) :: MiniPage r -> MiniPage r -> Bool #

(<=) :: MiniPage r -> MiniPage r -> Bool #

(>) :: MiniPage r -> MiniPage r -> Bool #

(>=) :: MiniPage r -> MiniPage r -> Bool #

max :: MiniPage r -> MiniPage r -> MiniPage r #

min :: MiniPage r -> MiniPage r -> MiniPage r #

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r)) -> MiniPage r -> MiniPage r

type Dimension (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (MiniPage r) = 2
type NumType (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type NumType (MiniPage r) = r

data IpeSymbol r Source #

Ipe Symbols, i.e. Points

A symbol (point) in ipe

Constructors

Symbol (Point 2 r) Text 

Instances

Instances details
Foldable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeSymbol m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldr :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldl :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldr1 :: (a -> a -> a) -> IpeSymbol a -> a #

foldl1 :: (a -> a -> a) -> IpeSymbol a -> a #

toList :: IpeSymbol a -> [a] #

null :: IpeSymbol a -> Bool #

length :: IpeSymbol a -> Int #

elem :: Eq a => a -> IpeSymbol a -> Bool #

maximum :: Ord a => IpeSymbol a -> a #

minimum :: Ord a => IpeSymbol a -> a #

sum :: Num a => IpeSymbol a -> a #

product :: Num a => IpeSymbol a -> a #

Traversable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeSymbol a -> f (IpeSymbol b) #

sequenceA :: Applicative f => IpeSymbol (f a) -> f (IpeSymbol a) #

mapM :: Monad m => (a -> m b) -> IpeSymbol a -> m (IpeSymbol b) #

sequence :: Monad m => IpeSymbol (m a) -> m (IpeSymbol a) #

Functor IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeSymbol a -> IpeSymbol b #

(<$) :: a -> IpeSymbol b -> IpeSymbol a #

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Show r => Show (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeSymbol r -> IpeSymbol r -> Bool #

(/=) :: IpeSymbol r -> IpeSymbol r -> Bool #

Ord r => Ord (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r)) -> IpeSymbol r -> IpeSymbol r

type Dimension (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeSymbol r) = 2
type NumType (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeSymbol r) = r

symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r) Source #

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

newtype Group r Source #

Groups and Objects

Group Attributes

A group is essentially a list of IpeObjects.

Constructors

Group [IpeObject r] 

Instances

Instances details
Foldable Group Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Group m -> m #

foldMap :: Monoid m => (a -> m) -> Group a -> m #

foldMap' :: Monoid m => (a -> m) -> Group a -> m #

foldr :: (a -> b -> b) -> b -> Group a -> b #

foldr' :: (a -> b -> b) -> b -> Group a -> b #

foldl :: (b -> a -> b) -> b -> Group a -> b #

foldl' :: (b -> a -> b) -> b -> Group a -> b #

foldr1 :: (a -> a -> a) -> Group a -> a #

foldl1 :: (a -> a -> a) -> Group a -> a #

toList :: Group a -> [a] #

null :: Group a -> Bool #

length :: Group a -> Int #

elem :: Eq a => a -> Group a -> Bool #

maximum :: Ord a => Group a -> a #

minimum :: Ord a => Group a -> a #

sum :: Num a => Group a -> a #

product :: Num a => Group a -> a #

Traversable Group Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Group a -> f (Group b) #

sequenceA :: Applicative f => Group (f a) -> f (Group a) #

mapM :: Monad m => (a -> m b) -> Group a -> m (Group b) #

sequence :: Monad m => Group (m a) -> m (Group a) #

Functor Group Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Group a -> Group b #

(<$) :: a -> Group b -> Group a #

ToObject Group Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Group r -> ShowS #

show :: Group r -> String #

showList :: [Group r] -> ShowS #

Eq r => Eq (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Group r -> Group r -> Bool #

(/=) :: Group r -> Group r -> Bool #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Group r)) (NumType (Group r)) -> Group r -> Group r

type DefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

type Dimension (Group r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Group r) = 2
type NumType (Group r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Group r) = r

data IpeObject r Source #

Instances

Instances details
Foldable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeObject m -> m #

foldMap :: Monoid m => (a -> m) -> IpeObject a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeObject a -> m #

foldr :: (a -> b -> b) -> b -> IpeObject a -> b #

foldr' :: (a -> b -> b) -> b -> IpeObject a -> b #

foldl :: (b -> a -> b) -> b -> IpeObject a -> b #

foldl' :: (b -> a -> b) -> b -> IpeObject a -> b #

foldr1 :: (a -> a -> a) -> IpeObject a -> a #

foldl1 :: (a -> a -> a) -> IpeObject a -> a #

toList :: IpeObject a -> [a] #

null :: IpeObject a -> Bool #

length :: IpeObject a -> Int #

elem :: Eq a => a -> IpeObject a -> Bool #

maximum :: Ord a => IpeObject a -> a #

minimum :: Ord a => IpeObject a -> a #

sum :: Num a => IpeObject a -> a #

product :: Num a => IpeObject a -> a #

Traversable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeObject a -> f (IpeObject b) #

sequenceA :: Applicative f => IpeObject (f a) -> f (IpeObject a) #

mapM :: Monad m => (a -> m b) -> IpeObject a -> m (IpeObject b) #

sequence :: Monad m => IpeObject (m a) -> m (IpeObject a) #

Functor IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeObject a -> IpeObject b #

(<$) :: a -> IpeObject b -> IpeObject a #

Show r => Show (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeObject r -> IpeObject r -> Bool #

(/=) :: IpeObject r -> IpeObject r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r)) -> IpeObject r -> IpeObject r

type Dimension (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeObject r) = 2
type NumType (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeObject r) = r

type IpeObject' g r = g r :+ IpeAttributes g r Source #

An IpeObject' is essentially the oject ogether with its attributes

ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r Source #

Shorthand for constructing ipeObjects

class ToObject i where Source #

Instances

Instances details
ToObject Group Source # 
Instance details

Defined in Ipe.Content

ToObject Image Source # 
Instance details

Defined in Ipe.Content

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

ToObject Path Source # 
Instance details

Defined in Ipe.Content

type Attributes' r = Attributes (AttrMapSym1 r) Source #

Attributes' :: Type -> [AttributeUniverse] -> Type

type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ... Source #

The mapping between the labels of the the attributes and the types of the attributes with these labels. For example, the Matrix label/attribute should - have a value of type 'Matrix 3 3 r'.

data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type Source #

Instances

Instances details
SuppressUnusedWarnings (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) = AttrMap a6989586621679248458 a6989586621679248459

traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s) Source #

traverse for ipe attributes

flattenGroups :: [IpeObject r] -> [IpeObject r] Source #

collect all non-group objects

\ No newline at end of file + have a value of type 'Matrix 3 3 r'.

data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type Source #

Instances

Instances details
SuppressUnusedWarnings (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) = AttrMap a6989586621679250061 a6989586621679250062

traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s) Source #

traverse for ipe attributes

flattenGroups :: [IpeObject r] -> [IpeObject r] Source #

collect all non-group objects

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-IpeOut.html b/haddocks/hgeometry/ipe/Ipe-IpeOut.html index 516748049..42340c1e8 100644 --- a/haddocks/hgeometry/ipe/Ipe-IpeOut.html +++ b/haddocks/hgeometry/ipe/Ipe-IpeOut.html @@ -1,6 +1,6 @@ Ipe.IpeOut
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.IpeOut

Description

Functions that help drawing geometric values in ipe. An IpeOut is essenitally a function that converts a geometric type g into an IpeObject.

We also proivde a HasDefaultIpeOut typeclass that defines a default - conversion function from a geometry type g to an ipe type.

Synopsis

Documentation

>>> :set -XOverloadedStrings
+ conversion function from a geometry type g to an ipe type.

Synopsis

Documentation

>>> :set -XOverloadedStrings
 >>> :{
 let Just (myPolygon :: SimplePolygon (Point 2 Int)) = fromPoints $ [origin, Point2 10 10, Point2 100 200]
 :}
@@ -25,6 +25,6 @@
 
>>> iO'' [ myPolygon , myPolygon ] $ attr SLayer "alpha"
 IpeGroup (Group [IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}),IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr})] :+ Attrs {Attr LayerName {_layerName = "alpha"}, NoAttr, NoAttr, NoAttr, NoAttr})
 

iO' :: HasDefaultIpeOut g => g -> IpeObject (NumType g) Source #

generate an ipe object without any specific attributes

Default Conversions

class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where Source #

Class that specifies a default conversion from a geometry type g into an - ipe object.

Associated Types

type DefaultIpeOut g :: Type -> Type Source #

Methods

defIO :: IpeOut g (DefaultIpeOut g) (NumType g) Source #

Instances

Instances details
HasDefaultIpeOut a => HasDefaultIpeOut (NonEmpty a) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (NonEmpty a) :: Type -> Type Source #

Methods

defIO :: IpeOut (NonEmpty a) (DefaultIpeOut (NonEmpty a)) (NumType (NonEmpty a)) Source #

HasDefaultIpeOut (PolyLine (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (PolyLine (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (PolyLine (Point 2 r)) (DefaultIpeOut (PolyLine (Point 2 r))) (NumType (PolyLine (Point 2 r))) Source #

HasDefaultIpeOut (ConvexPolygon (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (ConvexPolygon (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (ConvexPolygon (Point 2 r)) (DefaultIpeOut (ConvexPolygon (Point 2 r))) (NumType (ConvexPolygon (Point 2 r))) Source #

HasDefaultIpeOut (SimplePolygon (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (SimplePolygon (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (SimplePolygon (Point 2 r)) (DefaultIpeOut (SimplePolygon (Point 2 r))) (NumType (SimplePolygon (Point 2 r))) Source #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

Radical r => HasDefaultIpeOut (Circle (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Circle (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (Circle (Point 2 r)) (DefaultIpeOut (Circle (Point 2 r))) (NumType (Circle (Point 2 r))) Source #

Radical r => HasDefaultIpeOut (Disk (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Disk (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (Disk (Point 2 r)) (DefaultIpeOut (Disk (Point 2 r))) (NumType (Disk (Point 2 r))) Source #

Num r => HasDefaultIpeOut (Rectangle (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Rectangle (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (Rectangle (Point 2 r)) (DefaultIpeOut (Rectangle (Point 2 r))) (NumType (Rectangle (Point 2 r))) Source #

HasDefaultIpeOut (Ellipse r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Ellipse r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Ellipse r) (DefaultIpeOut (Ellipse r)) (NumType (Ellipse r)) Source #

(Fractional r, Ord r, Point_ point 2 r, Show r, Show point) => HasDefaultIpeOut (HalfLine point) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (HalfLine point) :: Type -> Type Source #

Methods

defIO :: IpeOut (HalfLine point) (DefaultIpeOut (HalfLine point)) (NumType (HalfLine point)) Source #

HasDefaultIpeOut a => HasDefaultIpeOut [a] Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut [a] :: Type -> Type Source #

Methods

defIO :: IpeOut [a] (DefaultIpeOut [a]) (NumType [a]) Source #

(HasDefaultIpeOut a, HasDefaultIpeOut b, DefaultIpeOut a ~ DefaultIpeOut b, NumType a ~ NumType b) => HasDefaultIpeOut (Either a b) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Either a b) :: Type -> Type Source #

Methods

defIO :: IpeOut (Either a b) (DefaultIpeOut (Either a b)) (NumType (Either a b)) Source #

(Fractional r, Ord r, Show r) => HasDefaultIpeOut (LinePV 2 r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (LinePV 2 r) :: Type -> Type Source #

Methods

defIO :: IpeOut (LinePV 2 r) (DefaultIpeOut (LinePV 2 r)) (NumType (LinePV 2 r)) Source #

(IxValue (endPoint (Point 2 r)) ~ Point 2 r, EndPoint_ (endPoint (Point 2 r))) => HasDefaultIpeOut (LineSegment endPoint (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (LineSegment endPoint (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (LineSegment endPoint (Point 2 r)) (DefaultIpeOut (LineSegment endPoint (Point 2 r))) (NumType (LineSegment endPoint (Point 2 r))) Source #

HasDefaultIpeOut (Point 2 r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Point 2 r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Point 2 r) (DefaultIpeOut (Point 2 r)) (NumType (Point 2 r)) Source #

(HasDefaultIpeOut g, a ~ IpeAttributes (DefaultIpeOut g) (NumType g)) => HasDefaultIpeOut (g :+ a) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (g :+ a) :: Type -> Type Source #

Methods

defIO :: IpeOut (g :+ a) (DefaultIpeOut (g :+ a)) (NumType (g :+ a)) Source #

(HoleContainer h f (Point 2 r), HasFromFoldable1 f) => HasDefaultIpeOut (PolygonalDomainF h f (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (PolygonalDomainF h f (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (PolygonalDomainF h f (Point 2 r)) (DefaultIpeOut (PolygonalDomainF h f (Point 2 r))) (NumType (PolygonalDomainF h f (Point 2 r))) Source #

Point Converters

ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r Source #

Path Converters

defaultBox :: Num r => Rectangle (Point 2 r) Source #

Size of the default bounding box used to clip lines and + ipe object.

Associated Types

type DefaultIpeOut g :: Type -> Type Source #

Methods

defIO :: IpeOut g (DefaultIpeOut g) (NumType g) Source #

Instances

Instances details
HasDefaultIpeOut a => HasDefaultIpeOut (NonEmpty a) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (NonEmpty a) :: Type -> Type Source #

Methods

defIO :: IpeOut (NonEmpty a) (DefaultIpeOut (NonEmpty a)) (NumType (NonEmpty a)) Source #

HasDefaultIpeOut (PolyLine (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (PolyLine (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (PolyLine (Point 2 r)) (DefaultIpeOut (PolyLine (Point 2 r))) (NumType (PolyLine (Point 2 r))) Source #

HasDefaultIpeOut (ConvexPolygon (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (ConvexPolygon (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (ConvexPolygon (Point 2 r)) (DefaultIpeOut (ConvexPolygon (Point 2 r))) (NumType (ConvexPolygon (Point 2 r))) Source #

HasDefaultIpeOut (SimplePolygon (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (SimplePolygon (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (SimplePolygon (Point 2 r)) (DefaultIpeOut (SimplePolygon (Point 2 r))) (NumType (SimplePolygon (Point 2 r))) Source #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

Radical r => HasDefaultIpeOut (Circle (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Circle (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (Circle (Point 2 r)) (DefaultIpeOut (Circle (Point 2 r))) (NumType (Circle (Point 2 r))) Source #

Radical r => HasDefaultIpeOut (Disk (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Disk (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (Disk (Point 2 r)) (DefaultIpeOut (Disk (Point 2 r))) (NumType (Disk (Point 2 r))) Source #

Num r => HasDefaultIpeOut (Rectangle (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Rectangle (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (Rectangle (Point 2 r)) (DefaultIpeOut (Rectangle (Point 2 r))) (NumType (Rectangle (Point 2 r))) Source #

HasDefaultIpeOut (Ellipse r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Ellipse r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Ellipse r) (DefaultIpeOut (Ellipse r)) (NumType (Ellipse r)) Source #

(Fractional r, Ord r, Point_ point 2 r, Show r, Show point) => HasDefaultIpeOut (HalfLine point) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (HalfLine point) :: Type -> Type Source #

Methods

defIO :: IpeOut (HalfLine point) (DefaultIpeOut (HalfLine point)) (NumType (HalfLine point)) Source #

(Fractional r, Ord r, Show r) => HasDefaultIpeOut (VerticalOrLineEQ r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (VerticalOrLineEQ r) :: Type -> Type Source #

Methods

defIO :: IpeOut (VerticalOrLineEQ r) (DefaultIpeOut (VerticalOrLineEQ r)) (NumType (VerticalOrLineEQ r)) Source #

(Fractional r, Ord r, Show r) => HasDefaultIpeOut (LineEQ r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (LineEQ r) :: Type -> Type Source #

Methods

defIO :: IpeOut (LineEQ r) (DefaultIpeOut (LineEQ r)) (NumType (LineEQ r)) Source #

HasDefaultIpeOut a => HasDefaultIpeOut [a] Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut [a] :: Type -> Type Source #

Methods

defIO :: IpeOut [a] (DefaultIpeOut [a]) (NumType [a]) Source #

(HasDefaultIpeOut a, HasDefaultIpeOut b, DefaultIpeOut a ~ DefaultIpeOut b, NumType a ~ NumType b) => HasDefaultIpeOut (Either a b) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Either a b) :: Type -> Type Source #

Methods

defIO :: IpeOut (Either a b) (DefaultIpeOut (Either a b)) (NumType (Either a b)) Source #

(Fractional r, Ord r, Show r) => HasDefaultIpeOut (LinePV 2 r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (LinePV 2 r) :: Type -> Type Source #

Methods

defIO :: IpeOut (LinePV 2 r) (DefaultIpeOut (LinePV 2 r)) (NumType (LinePV 2 r)) Source #

(IxValue (endPoint (Point 2 r)) ~ Point 2 r, EndPoint_ (endPoint (Point 2 r))) => HasDefaultIpeOut (LineSegment endPoint (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (LineSegment endPoint (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (LineSegment endPoint (Point 2 r)) (DefaultIpeOut (LineSegment endPoint (Point 2 r))) (NumType (LineSegment endPoint (Point 2 r))) Source #

HasDefaultIpeOut (Point 2 r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Point 2 r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Point 2 r) (DefaultIpeOut (Point 2 r)) (NumType (Point 2 r)) Source #

(HasDefaultIpeOut g, a ~ IpeAttributes (DefaultIpeOut g) (NumType g)) => HasDefaultIpeOut (g :+ a) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (g :+ a) :: Type -> Type Source #

Methods

defIO :: IpeOut (g :+ a) (DefaultIpeOut (g :+ a)) (NumType (g :+ a)) Source #

(HoleContainer h f (Point 2 r), HasFromFoldable1 f) => HasDefaultIpeOut (PolygonalDomainF h f (Point 2 r)) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (PolygonalDomainF h f (Point 2 r)) :: Type -> Type Source #

Methods

defIO :: IpeOut (PolygonalDomainF h f (Point 2 r)) (DefaultIpeOut (PolygonalDomainF h f (Point 2 r))) (NumType (PolygonalDomainF h f (Point 2 r))) Source #

Point Converters

ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r Source #

Path Converters

defaultBox :: Num r => Rectangle (Point 2 r) Source #

Size of the default bounding box used to clip lines and half-lines in the default IpeOuts.

ipeLine :: (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r Source #

Renders a line as a Path. The line is clipped to the defaultBox

ipeLineIn :: forall r. (Ord r, Fractional r, Show r) => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r Source #

Renders the line in the given box.

pre: the intersection of the box with the line is non-empty

ipeHalfLine :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r Source #

Renders an Halfine.

pre: the intersection of the box with the line is non-empty

ipeRay :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r Source #

Renders a ray, i.e. a half line drawing an arrow in the direction - of the ray.

pre: the intersection of the box with the line is non-empty

ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r Source #

Renders the HalfLine in the given box.

pre: the intersection of the box with the halfline is a line segment

ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r Source #

Renders an line segment to a Path

ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r Source #

Renders a polyline to a Path

ipeEllipse :: IpeOut (Ellipse r) Path r Source #

Renders an Ellipse to a Path

ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r Source #

Renders a circle to a Path

ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r Source #

Renders a Disk to a Path

ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r Source #

Renders a Bezier curve to a Path

path :: PathSegment r -> Path r Source #

Helper to construct a path from a singleton item

pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> PathSegment r Source #

Construct a PolyLine path segment

ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r Source #

Render as a polygon

toPolygonPathSegment :: (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r Source #

Helper type to build a path segment

ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r Source #

Draw a polygon

ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r Source #

Draw a Rectangle

Group Converters

Text Converters

ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r Source #

Creates an text label

labelled Source #

Arguments

:: (Show lbl, NumType g ~ r, ToObject i) 
=> (g -> Point 2 r)

where to place the label

-> IpeOut g i r

how to draw the geometric object

-> IpeOut (g :+ lbl) Group r 

Annotate an IpeOut with a label

labelledWith Source #

Arguments

:: (Show lbl, NumType g ~ r, ToObject i) 
=> IpeAttributes TextLabel r

attributes for the label

-> (g -> Point 2 r)

where to place the label

-> IpeOut g i r

how to draw the geometric object

-> IpeOut (g :+ lbl) Group r 

Annotate an IpeOut with a label

\ No newline at end of file + of the ray.

pre: the intersection of the box with the line is non-empty

ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r Source #

Renders the HalfLine in the given box.

pre: the intersection of the box with the halfline is a line segment

ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r Source #

Renders an line segment to a Path

ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r Source #

Renders a polyline to a Path

ipeEllipse :: IpeOut (Ellipse r) Path r Source #

Renders an Ellipse to a Path

ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r Source #

Renders a circle to a Path

ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r Source #

Renders a Disk to a Path

ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r Source #

Renders a Bezier curve to a Path

path :: PathSegment r -> Path r Source #

Helper to construct a path from a singleton item

pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> PathSegment r Source #

Construct a PolyLine path segment

ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r Source #

Render as a polygon

toPolygonPathSegment :: (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r Source #

Helper type to build a path segment

ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r Source #

Draw a polygon

ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r Source #

Draw a Rectangle

Group Converters

Text Converters

ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r Source #

Creates an text label

labelled Source #

Arguments

:: (Show lbl, NumType g ~ r, ToObject i) 
=> (g -> Point 2 r)

where to place the label

-> IpeOut g i r

how to draw the geometric object

-> IpeOut (g :+ lbl) Group r 

Annotate an IpeOut with a label

labelledWith Source #

Arguments

:: (Show lbl, NumType g ~ r, ToObject i) 
=> IpeAttributes TextLabel r

attributes for the label

-> (g -> Point 2 r)

where to place the label

-> IpeOut g i r

how to draw the geometric object

-> IpeOut (g :+ lbl) Group r 

Annotate an IpeOut with a label

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Layer.html b/haddocks/hgeometry/ipe/Ipe-Layer.html index e9595fc9a..eb722dd08 100644 --- a/haddocks/hgeometry/ipe/Ipe-Layer.html +++ b/haddocks/hgeometry/ipe/Ipe-Layer.html @@ -1 +1 @@ -Ipe.Layer
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Layer

Description

Layers in Ipe documents.

Documentation

newtype LayerName Source #

Defines an Layer in Ipe.

Constructors

LayerName Text 

Instances

Instances details
IsString LayerName Source # 
Instance details

Defined in Ipe.Layer

Read LayerName Source # 
Instance details

Defined in Ipe.Layer

Show LayerName Source # 
Instance details

Defined in Ipe.Layer

Eq LayerName Source # 
Instance details

Defined in Ipe.Layer

Ord LayerName Source # 
Instance details

Defined in Ipe.Layer

IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

\ No newline at end of file +Ipe.Layer
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Layer

Description

Layers in Ipe documents.

Documentation

newtype LayerName Source #

Defines an Layer in Ipe.

Constructors

LayerName Text 

Instances

Instances details
IsString LayerName Source # 
Instance details

Defined in Ipe.Layer

Read LayerName Source # 
Instance details

Defined in Ipe.Layer

Show LayerName Source # 
Instance details

Defined in Ipe.Layer

Eq LayerName Source # 
Instance details

Defined in Ipe.Layer

Ord LayerName Source # 
Instance details

Defined in Ipe.Layer

IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Literal.html b/haddocks/hgeometry/ipe/Ipe-Literal.html index b345c6b8b..7fe82fccf 100644 --- a/haddocks/hgeometry/ipe/Ipe-Literal.html +++ b/haddocks/hgeometry/ipe/Ipe-Literal.html @@ -1 +1 @@ -Ipe.Literal
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Literal

Description

Including xml literals

Documentation

literally :: String -> Q Exp Source #

Include a literal expression

lit :: QuasiQuoter Source #

Literal quoter.

litFile :: QuasiQuoter Source #

Include a file as a literal.

xmlLiteral :: String -> Node Text Text Source #

Parse a string into a Node.

\ No newline at end of file +Ipe.Literal
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Literal

Description

Including xml literals

Documentation

literally :: String -> Q Exp Source #

Include a literal expression

lit :: QuasiQuoter Source #

Literal quoter.

litFile :: QuasiQuoter Source #

Include a file as a literal.

xmlLiteral :: String -> Node Text Text Source #

Parse a string into a Node.

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Path.html b/haddocks/hgeometry/ipe/Ipe-Path.html index 3276a1f44..91907ebe2 100644 --- a/haddocks/hgeometry/ipe/Ipe-Path.html +++ b/haddocks/hgeometry/ipe/Ipe-Path.html @@ -1 +1 @@ -Ipe.Path
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Path

Description

Defines an Ipe Path.

Synopsis

Documentation

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

_PolyLineSegment :: forall r. Prism' (PathSegment r) (PolyLine (Point 2 r)) Source #

_PolygonPath :: forall r. Prism' (PathSegment r) (SimplePolygon (Point 2 r)) Source #

_CubicBezierSegment :: forall r. Prism' (PathSegment r) (CubicBezier (Point 2 r)) Source #

_EllipseSegment :: forall r. Prism' (PathSegment r) (Ellipse r) Source #

_ArcSegment :: forall r. Prism' (PathSegment r) () Source #

data Operation r Source #

type that represents a path in ipe.

Constructors

MoveTo (Point 2 r) 
LineTo (Point 2 r) 
Ellipse (Matrix 3 3 r) 
ArcTo (Matrix 3 3 r) (Point 2 r) 
Spline [Point 2 r] 
ClosedSpline [Point 2 r] 
ClosePath 
CurveTo (Point 2 r) (Point 2 r) (Point 2 r) 
QCurveTo (Point 2 r) (Point 2 r) 

Instances

Instances details
Foldable Operation Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Operation m -> m #

foldMap :: Monoid m => (a -> m) -> Operation a -> m #

foldMap' :: Monoid m => (a -> m) -> Operation a -> m #

foldr :: (a -> b -> b) -> b -> Operation a -> b #

foldr' :: (a -> b -> b) -> b -> Operation a -> b #

foldl :: (b -> a -> b) -> b -> Operation a -> b #

foldl' :: (b -> a -> b) -> b -> Operation a -> b #

foldr1 :: (a -> a -> a) -> Operation a -> a #

foldl1 :: (a -> a -> a) -> Operation a -> a #

toList :: Operation a -> [a] #

null :: Operation a -> Bool #

length :: Operation a -> Int #

elem :: Eq a => a -> Operation a -> Bool #

maximum :: Ord a => Operation a -> a #

minimum :: Ord a => Operation a -> a #

sum :: Num a => Operation a -> a #

product :: Num a => Operation a -> a #

Traversable Operation Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Operation a -> f (Operation b) #

sequenceA :: Applicative f => Operation (f a) -> f (Operation a) #

mapM :: Monad m => (a -> m b) -> Operation a -> m (Operation b) #

sequence :: Monad m => Operation (m a) -> m (Operation a) #

Functor Operation Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Operation a -> Operation b #

(<$) :: a -> Operation b -> Operation a #

Show r => Show (Operation r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (Operation r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Operation r -> Operation r -> Bool #

(/=) :: Operation r -> Operation r -> Bool #

Coordinate r => IpeReadText [Operation r] Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (Operation r) Source # 
Instance details

Defined in Ipe.Writer

_MoveTo :: forall r. Prism' (Operation r) (Point 2 r) Source #

_LineTo :: forall r. Prism' (Operation r) (Point 2 r) Source #

_CurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r, Point 2 r) Source #

_QCurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r) Source #

_Ellipse :: forall r. Prism' (Operation r) (Matrix 3 3 r) Source #

_ArcTo :: forall r. Prism' (Operation r) (Matrix 3 3 r, Point 2 r) Source #

_Spline :: forall r. Prism' (Operation r) [Point 2 r] Source #

_ClosedSpline :: forall r. Prism' (Operation r) [Point 2 r] Source #

_ClosePath :: forall r. Prism' (Operation r) () Source #

\ No newline at end of file +Ipe.Path
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Path

Description

Defines an Ipe Path.

Synopsis

Documentation

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

_PolyLineSegment :: forall r. Prism' (PathSegment r) (PolyLine (Point 2 r)) Source #

_PolygonPath :: forall r. Prism' (PathSegment r) (SimplePolygon (Point 2 r)) Source #

_CubicBezierSegment :: forall r. Prism' (PathSegment r) (CubicBezier (Point 2 r)) Source #

_EllipseSegment :: forall r. Prism' (PathSegment r) (Ellipse r) Source #

_ArcSegment :: forall r. Prism' (PathSegment r) () Source #

data Operation r Source #

type that represents a path in ipe.

Constructors

MoveTo (Point 2 r) 
LineTo (Point 2 r) 
Ellipse (Matrix 3 3 r) 
ArcTo (Matrix 3 3 r) (Point 2 r) 
Spline [Point 2 r] 
ClosedSpline [Point 2 r] 
ClosePath 
CurveTo (Point 2 r) (Point 2 r) (Point 2 r) 
QCurveTo (Point 2 r) (Point 2 r) 

Instances

Instances details
Foldable Operation Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Operation m -> m #

foldMap :: Monoid m => (a -> m) -> Operation a -> m #

foldMap' :: Monoid m => (a -> m) -> Operation a -> m #

foldr :: (a -> b -> b) -> b -> Operation a -> b #

foldr' :: (a -> b -> b) -> b -> Operation a -> b #

foldl :: (b -> a -> b) -> b -> Operation a -> b #

foldl' :: (b -> a -> b) -> b -> Operation a -> b #

foldr1 :: (a -> a -> a) -> Operation a -> a #

foldl1 :: (a -> a -> a) -> Operation a -> a #

toList :: Operation a -> [a] #

null :: Operation a -> Bool #

length :: Operation a -> Int #

elem :: Eq a => a -> Operation a -> Bool #

maximum :: Ord a => Operation a -> a #

minimum :: Ord a => Operation a -> a #

sum :: Num a => Operation a -> a #

product :: Num a => Operation a -> a #

Traversable Operation Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Operation a -> f (Operation b) #

sequenceA :: Applicative f => Operation (f a) -> f (Operation a) #

mapM :: Monad m => (a -> m b) -> Operation a -> m (Operation b) #

sequence :: Monad m => Operation (m a) -> m (Operation a) #

Functor Operation Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Operation a -> Operation b #

(<$) :: a -> Operation b -> Operation a #

Show r => Show (Operation r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (Operation r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Operation r -> Operation r -> Bool #

(/=) :: Operation r -> Operation r -> Bool #

Coordinate r => IpeReadText [Operation r] Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (Operation r) Source # 
Instance details

Defined in Ipe.Writer

_MoveTo :: forall r. Prism' (Operation r) (Point 2 r) Source #

_LineTo :: forall r. Prism' (Operation r) (Point 2 r) Source #

_CurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r, Point 2 r) Source #

_QCurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r) Source #

_Ellipse :: forall r. Prism' (Operation r) (Matrix 3 3 r) Source #

_ArcTo :: forall r. Prism' (Operation r) (Matrix 3 3 r, Point 2 r) Source #

_Spline :: forall r. Prism' (Operation r) [Point 2 r] Source #

_ClosedSpline :: forall r. Prism' (Operation r) [Point 2 r] Source #

_ClosePath :: forall r. Prism' (Operation r) () Source #

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-PathParser.html b/haddocks/hgeometry/ipe/Ipe-PathParser.html index fddf71706..9eb645648 100644 --- a/haddocks/hgeometry/ipe/Ipe-PathParser.html +++ b/haddocks/hgeometry/ipe/Ipe-PathParser.html @@ -1 +1 @@ -Ipe.PathParser
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.PathParser

Description

Parser for a Path in Ipe.

Synopsis

Documentation

class Fractional r => Coordinate r where Source #

Represent stuff that can be used as a coordinate in ipe. (similar to show/read)

Minimal complete definition

Nothing

Methods

fromSeq :: Integer -> Maybe (Int, Integer) -> r Source #

default fromSeq :: (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r Source #

Instances

Instances details
Coordinate Double Source # 
Instance details

Defined in Ipe.PathParser

Coordinate Float Source # 
Instance details

Defined in Ipe.PathParser

Coordinate (Ratio Integer) Source # 
Instance details

Defined in Ipe.PathParser

Coordinate (RealNumber p) Source # 
Instance details

Defined in Ipe.PathParser

HasResolution p => Coordinate (Fixed p) Source # 
Instance details

Defined in Ipe.PathParser

Methods

fromSeq :: Integer -> Maybe (Int, Integer) -> Fixed p Source #

readCoordinate :: Coordinate r => Text -> Either Text r Source #

Running the parsers

Read/parse a single coordinate value.

readPoint :: Coordinate r => Text -> Either Text (Point 2 r) Source #

Read/parse a single point

readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r) Source #

Try to read/parse a matrix.

readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r)) Source #

Try to read/parse a Rectangle

runParser :: Parser a -> Text -> Either Text a Source #

Run a parser

readPathOperations :: Coordinate r => Text -> Either Text [Operation r] Source #

Parse a sequence of path operations.

pOperation :: forall r. Coordinate r => Parser (Operation r) Source #

Parse an operation

pPoint :: Coordinate r => Parser (Point 2 r) Source #

\ No newline at end of file +Ipe.PathParser
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.PathParser

Description

Parser for a Path in Ipe.

Synopsis

Documentation

class Fractional r => Coordinate r where Source #

Represent stuff that can be used as a coordinate in ipe. (similar to show/read)

Minimal complete definition

Nothing

Methods

fromSeq :: Integer -> Maybe (Int, Integer) -> r Source #

default fromSeq :: (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r Source #

Instances

Instances details
Coordinate Double Source # 
Instance details

Defined in Ipe.PathParser

Coordinate Float Source # 
Instance details

Defined in Ipe.PathParser

Coordinate (Ratio Integer) Source # 
Instance details

Defined in Ipe.PathParser

Coordinate (RealNumber p) Source # 
Instance details

Defined in Ipe.PathParser

HasResolution p => Coordinate (Fixed p) Source # 
Instance details

Defined in Ipe.PathParser

Methods

fromSeq :: Integer -> Maybe (Int, Integer) -> Fixed p Source #

readCoordinate :: Coordinate r => Text -> Either Text r Source #

Running the parsers

Read/parse a single coordinate value.

readPoint :: Coordinate r => Text -> Either Text (Point 2 r) Source #

Read/parse a single point

readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r) Source #

Try to read/parse a matrix.

readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r)) Source #

Try to read/parse a Rectangle

runParser :: Parser a -> Text -> Either Text a Source #

Run a parser

readPathOperations :: Coordinate r => Text -> Either Text [Operation r] Source #

Parse a sequence of path operations.

pOperation :: forall r. Coordinate r => Parser (Operation r) Source #

Parse an operation

pPoint :: Coordinate r => Parser (Point 2 r) Source #

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Reader.html b/haddocks/hgeometry/ipe/Ipe-Reader.html index 2778c7ac4..a899c450e 100644 --- a/haddocks/hgeometry/ipe/Ipe-Reader.html +++ b/haddocks/hgeometry/ipe/Ipe-Reader.html @@ -1,14 +1,14 @@ -Ipe.Reader
hgeometry:ipe
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Reader

Synopsis

Reading ipe Files

readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) Source #

Given a file path, tries to read an ipe file

readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) Source #

Given a file path, tries to read an ipe file.

This function applies all matrices to objects.

readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r)) Source #

Since most Ipe file contain only one page, we provide a shortcut for that +Ipe.Reader

hgeometry:ipe
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Reader

Synopsis

Reading ipe Files

readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) Source #

Given a file path, tries to read an ipe file

readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) Source #

Given a file path, tries to read an ipe file.

This function applies all matrices to objects.

readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r)) Source #

Since most Ipe file contain only one page, we provide a shortcut for that as well.

This function applies all matrices, and it makes sure there is at least one layer and view in the page.

readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r) Source #

Tries to read a single page file, throws an error when this - fails. See readSinglePageFile for further details.

Readiing ipe style files

readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle) Source #

Reads an Ipe stylesheet from Disk.

addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r) Source #

Given a path to a stylesheet, add it to the ipe file with the + fails. See readSinglePageFile for further details.

Readiing ipe style files

readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle) Source #

Reads an Ipe stylesheet from Disk.

addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r) Source #

Given a path to a stylesheet, add it to the ipe file with the highest priority. Throws an error when this fails.

Reading XML directly

fromIpeXML :: IpeRead (t r) => ByteString -> Either ConversionError (t r) Source #

Given a Bytestring, try to parse the bytestring into anything that is - IpeReadable, i.e. any of the Ipe elements.

readXML :: ByteString -> Either ConversionError (Node Text Text) Source #

Reads the data from a Bytestring into a proper Node

Read classes

class IpeReadText t where Source #

Reading an ipe elemtn from a Text value

Instances

Instances details
IpeReadText FillType Source # 
Instance details

Defined in Ipe.Reader

IpeReadText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeReadText PinType Source # 
Instance details

Defined in Ipe.Reader

IpeReadText TransformationTypes Source # 
Instance details

Defined in Ipe.Reader

IpeReadText VerticalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText Text Source # 
Instance details

Defined in Ipe.Reader

IpeReadText Int Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (RGB r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeDash r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpePen r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeSize r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeColor r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (Rectangle (Point 2 r)) Source # 
Instance details

Defined in Ipe.Reader

Methods

ipeReadText :: Text -> Either ConversionError (Rectangle (Point 2 r)) Source #

Coordinate r => IpeReadText [Operation r] Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (Point 2 r) Source # 
Instance details

Defined in Ipe.Reader

Methods

ipeReadText :: Text -> Either ConversionError (Point 2 r) Source #

Coordinate r => IpeReadText (Matrix 3 3 r) Source # 
Instance details

Defined in Ipe.Reader

Methods

ipeReadText :: Text -> Either ConversionError (Matrix 3 3 r) Source #

class IpeRead t where Source #

Reading an ipe lement from Xml

Instances

Instances details
IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

class IpeReadAttr t where Source #

Basically IpeReadText for attributes. This class is not really meant to be + IpeReadable, i.e. any of the Ipe elements.

readXML :: ByteString -> Either ConversionError (Node Text Text) Source #

Reads the data from a Bytestring into a proper Node

Read classes

class IpeReadText t where Source #

Reading an ipe elemtn from a Text value

Instances

Instances details
IpeReadText FillType Source # 
Instance details

Defined in Ipe.Reader

IpeReadText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeReadText PinType Source # 
Instance details

Defined in Ipe.Reader

IpeReadText TransformationTypes Source # 
Instance details

Defined in Ipe.Reader

IpeReadText VerticalAlignment Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText Text Source # 
Instance details

Defined in Ipe.Reader

IpeReadText Int Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (RGB r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeDash r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpePen r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeSize r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (IpeColor r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (Rectangle (Point 2 r)) Source # 
Instance details

Defined in Ipe.Reader

Methods

ipeReadText :: Text -> Either ConversionError (Rectangle (Point 2 r)) Source #

Coordinate r => IpeReadText [Operation r] Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeReadText (Point 2 r) Source # 
Instance details

Defined in Ipe.Reader

Methods

ipeReadText :: Text -> Either ConversionError (Point 2 r) Source #

Coordinate r => IpeReadText (Matrix 3 3 r) Source # 
Instance details

Defined in Ipe.Reader

Methods

ipeReadText :: Text -> Either ConversionError (Matrix 3 3 r) Source #

class IpeRead t where Source #

Reading an ipe lement from Xml

Instances

Instances details
IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

class IpeReadAttr t where Source #

Basically IpeReadText for attributes. This class is not really meant to be implemented directly. Just define an IpeReadText instance for the type (Apply f at), then the generic instance below takes care of looking up the name of the attribute, and calling the right ipeReadText value. This class is just so that reifyConstraint in ipeReadRec can select the right - typeclass when building the rec.

Instances

Instances details
IpeReadText (Apply f at) => IpeReadAttr (Attr f at) Source # 
Instance details

Defined in Ipe.Reader

Some low level implementation functions

ipeReadObject :: (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy i -> proxy r -> Node Text Text -> Either ConversionError (i r :+ IpeAttributes i r) Source #

If we can ipeRead an ipe element, and we can ipeReadAttrs its attributes - we can properly read an ipe object using ipeReadObject

ipeReadAttrs :: forall proxy proxy' i r f ats. (f ~ AttrMapSym1 r, ats ~ AttributesOf i, ReifyConstraint IpeReadAttr (Attr f) ats, RecApplicative ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => proxy i -> proxy' r -> Node Text Text -> Either ConversionError (IpeAttributes i r) Source #

Reader for records. Given a proxy of some ipe type i, and a proxy of an - coordinate type r, read the IpeAttributes for i from the xml node.

ipeReadRec :: forall f ats. (RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy f -> Proxy ats -> Node Text Text -> Either ConversionError (Rec (Attr f) ats) Source #

Reading the Attributes into a Rec (Attr f), all based on the types of f + typeclass when building the rec.

Instances

Instances details
IpeReadText (Apply f at) => IpeReadAttr (Attr f at) Source # 
Instance details

Defined in Ipe.Reader

Some low level implementation functions

ipeReadObject :: (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy i -> proxy r -> Node Text Text -> Either ConversionError (i r :+ IpeAttributes i r) Source #

If we can ipeRead an ipe element, and we can ipeReadAttrs its attributes + we can properly read an ipe object using ipeReadObject

ipeReadAttrs :: forall proxy proxy' i r f ats. (f ~ AttrMapSym1 r, ats ~ AttributesOf i, ReifyConstraint IpeReadAttr (Attr f) ats, RecApplicative ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => proxy i -> proxy' r -> Node Text Text -> Either ConversionError (IpeAttributes i r) Source #

Reader for records. Given a proxy of some ipe type i, and a proxy of an + coordinate type r, read the IpeAttributes for i from the xml node.

ipeReadRec :: forall f ats. (RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy f -> Proxy ats -> Node Text Text -> Either ConversionError (Rec (Attr f) ats) Source #

Reading the Attributes into a Rec (Attr f), all based on the types of f (the type family mapping labels to types), and a list of labels (ats).

class Fractional r => Coordinate r where Source #

Represent stuff that can be used as a coordinate in ipe. (similar to show/read)

Minimal complete definition

Nothing

Methods

fromSeq :: Integer -> Maybe (Int, Integer) -> r Source #

default fromSeq :: (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r Source #

Instances

Instances details
Coordinate Double Source # 
Instance details

Defined in Ipe.PathParser

Coordinate Float Source # 
Instance details

Defined in Ipe.PathParser

Coordinate (Ratio Integer) Source # 
Instance details

Defined in Ipe.PathParser

Coordinate (RealNumber p) Source # 
Instance details

Defined in Ipe.PathParser

HasResolution p => Coordinate (Fixed p) Source # 
Instance details

Defined in Ipe.PathParser

Methods

fromSeq :: Integer -> Maybe (Int, Integer) -> Fixed p Source #

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Types.html b/haddocks/hgeometry/ipe/Ipe-Types.html index aee3120cd..dac33886f 100644 --- a/haddocks/hgeometry/ipe/Ipe-Types.html +++ b/haddocks/hgeometry/ipe/Ipe-Types.html @@ -1,6 +1,6 @@ -Ipe.Types
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Types

Description

Data type modeling the various elements in Ipe files.

Synopsis

Ipe Files

data IpeFile r Source #

A complete ipe file

Instances

Instances details
Show r => Show (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpeFile r -> ShowS #

show :: IpeFile r -> String #

showList :: [IpeFile r] -> ShowS #

Eq r => Eq (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpeFile r -> IpeFile r -> Bool #

(/=) :: IpeFile r -> IpeFile r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

styles :: forall r. Lens' (IpeFile r) [IpeStyle] Source #

pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r)) Source #

ipeFile :: NonEmpty (IpePage r) -> IpeFile r Source #

Convenience constructor for creating an ipe file without preamble +Ipe.Types

hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Types

Description

Data type modeling the various elements in Ipe files.

Synopsis

Ipe Files

data IpeFile r Source #

A complete ipe file

Instances

Instances details
Show r => Show (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpeFile r -> ShowS #

show :: IpeFile r -> String #

showList :: [IpeFile r] -> ShowS #

Eq r => Eq (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpeFile r -> IpeFile r -> Bool #

(/=) :: IpeFile r -> IpeFile r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

styles :: forall r. Lens' (IpeFile r) [IpeStyle] Source #

pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r)) Source #

ipeFile :: NonEmpty (IpePage r) -> IpeFile r Source #

Convenience constructor for creating an ipe file without preamble and with the default stylesheet.

singlePageFile :: IpePage r -> IpeFile r Source #

Convenience function to construct an ipe file consisting of a single page.

singlePageFromContent :: [IpeObject r] -> IpeFile r Source #

Create a single page ipe file from a list of IpeObjects

Ipe Pages

data IpePage r Source #

An IpePage is essentially a Group, together with a list of layers and a - list of views.

Constructors

IpePage [LayerName] [View] [IpeObject r] 

Instances

Instances details
Show r => Show (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpePage r -> ShowS #

show :: IpePage r -> String #

showList :: [IpePage r] -> ShowS #

Eq r => Eq (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpePage r -> IpePage r -> Bool #

(/=) :: IpePage r -> IpePage r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

layers :: forall r. Lens' (IpePage r) [LayerName] Source #

views :: forall r. Lens' (IpePage r) [View] Source #

content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r] Source #

emptyPage :: IpePage r Source #

Creates an empty page with one layer and view.

fromContent :: [IpeObject r] -> IpePage r Source #

Creates a simple page with a single view.

onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r) Source #

This allows you to filter the objects on some layer.

>>> let page = IpePage [] [] []
+ list of views.

Constructors

IpePage [LayerName] [View] [IpeObject r] 

Instances

Instances details
Show r => Show (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpePage r -> ShowS #

show :: IpePage r -> String #

showList :: [IpePage r] -> ShowS #

Eq r => Eq (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpePage r -> IpePage r -> Bool #

(/=) :: IpePage r -> IpePage r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

layers :: forall r. Lens' (IpePage r) [LayerName] Source #

views :: forall r. Lens' (IpePage r) [View] Source #

content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r] Source #

emptyPage :: IpePage r Source #

Creates an empty page with one layer and view.

fromContent :: [IpeObject r] -> IpePage r Source #

Creates a simple page with a single view.

onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r) Source #

This allows you to filter the objects on some layer.

>>> let page = IpePage [] [] []
 >>> page^..content.onLayer "myLayer"
 []
 

contentInView :: Word -> Getter (IpePage r) [IpeObject r] Source #

Gets all objects that are visible in the given view.

Note that views are indexed starting from 0. If the page does not @@ -9,9 +9,9 @@ >>> page^.contentInView 0 []

withDefaults :: IpePage r -> IpePage r Source #

Makes sure that the page has at least one layer and at least one - view, essentially matching the behaviour of ipe. In particular,

  • if the page does not have any layers, it creates a layer named "alpha", and
  • if the page does not have any views, it creates a view in which all layers are visible.

Content: Ipe Objects

data IpeObject r Source #

Instances

Instances details
Foldable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeObject m -> m #

foldMap :: Monoid m => (a -> m) -> IpeObject a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeObject a -> m #

foldr :: (a -> b -> b) -> b -> IpeObject a -> b #

foldr' :: (a -> b -> b) -> b -> IpeObject a -> b #

foldl :: (b -> a -> b) -> b -> IpeObject a -> b #

foldl' :: (b -> a -> b) -> b -> IpeObject a -> b #

foldr1 :: (a -> a -> a) -> IpeObject a -> a #

foldl1 :: (a -> a -> a) -> IpeObject a -> a #

toList :: IpeObject a -> [a] #

null :: IpeObject a -> Bool #

length :: IpeObject a -> Int #

elem :: Eq a => a -> IpeObject a -> Bool #

maximum :: Ord a => IpeObject a -> a #

minimum :: Ord a => IpeObject a -> a #

sum :: Num a => IpeObject a -> a #

product :: Num a => IpeObject a -> a #

Traversable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeObject a -> f (IpeObject b) #

sequenceA :: Applicative f => IpeObject (f a) -> f (IpeObject a) #

mapM :: Monad m => (a -> m b) -> IpeObject a -> m (IpeObject b) #

sequence :: Monad m => IpeObject (m a) -> m (IpeObject a) #

Functor IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeObject a -> IpeObject b #

(<$) :: a -> IpeObject b -> IpeObject a #

Show r => Show (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeObject r -> IpeObject r -> Bool #

(/=) :: IpeObject r -> IpeObject r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r)) -> IpeObject r -> IpeObject r

type Dimension (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeObject r) = 2
type NumType (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeObject r) = r

type IpeObject' g r = g r :+ IpeAttributes g r Source #

An IpeObject' is essentially the oject ogether with its attributes

ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r Source #

Shorthand for constructing ipeObjects

class ToObject i where Source #

Instances

Instances details
ToObject Group Source # 
Instance details

Defined in Ipe.Content

ToObject Image Source # 
Instance details

Defined in Ipe.Content

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Specific Ipe-Objects

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

data IpeSymbol r Source #

Ipe Symbols, i.e. Points

A symbol (point) in ipe

Constructors

Symbol (Point 2 r) Text 

Instances

Instances details
Foldable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeSymbol m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldr :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldl :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldr1 :: (a -> a -> a) -> IpeSymbol a -> a #

foldl1 :: (a -> a -> a) -> IpeSymbol a -> a #

toList :: IpeSymbol a -> [a] #

null :: IpeSymbol a -> Bool #

length :: IpeSymbol a -> Int #

elem :: Eq a => a -> IpeSymbol a -> Bool #

maximum :: Ord a => IpeSymbol a -> a #

minimum :: Ord a => IpeSymbol a -> a #

sum :: Num a => IpeSymbol a -> a #

product :: Num a => IpeSymbol a -> a #

Traversable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeSymbol a -> f (IpeSymbol b) #

sequenceA :: Applicative f => IpeSymbol (f a) -> f (IpeSymbol a) #

mapM :: Monad m => (a -> m b) -> IpeSymbol a -> m (IpeSymbol b) #

sequence :: Monad m => IpeSymbol (m a) -> m (IpeSymbol a) #

Functor IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeSymbol a -> IpeSymbol b #

(<$) :: a -> IpeSymbol b -> IpeSymbol a #

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Show r => Show (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeSymbol r -> IpeSymbol r -> Bool #

(/=) :: IpeSymbol r -> IpeSymbol r -> Bool #

Ord r => Ord (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r)) -> IpeSymbol r -> IpeSymbol r

type Dimension (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeSymbol r) = 2
type NumType (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeSymbol r) = r

symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r) Source #

newtype Group r Source #

Groups and Objects

Group Attributes

A group is essentially a list of IpeObjects.

Constructors

Group [IpeObject r] 

Instances

Instances details
Foldable Group Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Group m -> m #

foldMap :: Monoid m => (a -> m) -> Group a -> m #

foldMap' :: Monoid m => (a -> m) -> Group a -> m #

foldr :: (a -> b -> b) -> b -> Group a -> b #

foldr' :: (a -> b -> b) -> b -> Group a -> b #

foldl :: (b -> a -> b) -> b -> Group a -> b #

foldl' :: (b -> a -> b) -> b -> Group a -> b #

foldr1 :: (a -> a -> a) -> Group a -> a #

foldl1 :: (a -> a -> a) -> Group a -> a #

toList :: Group a -> [a] #

null :: Group a -> Bool #

length :: Group a -> Int #

elem :: Eq a => a -> Group a -> Bool #

maximum :: Ord a => Group a -> a #

minimum :: Ord a => Group a -> a #

sum :: Num a => Group a -> a #

product :: Num a => Group a -> a #

Traversable Group Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Group a -> f (Group b) #

sequenceA :: Applicative f => Group (f a) -> f (Group a) #

mapM :: Monad m => (a -> m b) -> Group a -> m (Group b) #

sequence :: Monad m => Group (m a) -> m (Group a) #

Functor Group Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Group a -> Group b #

(<$) :: a -> Group b -> Group a #

ToObject Group Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Group r -> ShowS #

show :: Group r -> String #

showList :: [Group r] -> ShowS #

Eq r => Eq (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Group r -> Group r -> Bool #

(/=) :: Group r -> Group r -> Bool #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Group r)) (NumType (Group r)) -> Group r -> Group r

type DefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

type Dimension (Group r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Group r) = 2
type NumType (Group r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Group r) = r

data TextLabel r Source #

Text Objects

A text label

Constructors

Label Text (Point 2 r) 

Instances

Instances details
Foldable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => TextLabel m -> m #

foldMap :: Monoid m => (a -> m) -> TextLabel a -> m #

foldMap' :: Monoid m => (a -> m) -> TextLabel a -> m #

foldr :: (a -> b -> b) -> b -> TextLabel a -> b #

foldr' :: (a -> b -> b) -> b -> TextLabel a -> b #

foldl :: (b -> a -> b) -> b -> TextLabel a -> b #

foldl' :: (b -> a -> b) -> b -> TextLabel a -> b #

foldr1 :: (a -> a -> a) -> TextLabel a -> a #

foldl1 :: (a -> a -> a) -> TextLabel a -> a #

toList :: TextLabel a -> [a] #

null :: TextLabel a -> Bool #

length :: TextLabel a -> Int #

elem :: Eq a => a -> TextLabel a -> Bool #

maximum :: Ord a => TextLabel a -> a #

minimum :: Ord a => TextLabel a -> a #

sum :: Num a => TextLabel a -> a #

product :: Num a => TextLabel a -> a #

Traversable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> TextLabel a -> f (TextLabel b) #

sequenceA :: Applicative f => TextLabel (f a) -> f (TextLabel a) #

mapM :: Monad m => (a -> m b) -> TextLabel a -> m (TextLabel b) #

sequence :: Monad m => TextLabel (m a) -> m (TextLabel a) #

Functor TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> TextLabel a -> TextLabel b #

(<$) :: a -> TextLabel b -> TextLabel a #

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

Show r => Show (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: TextLabel r -> TextLabel r -> Bool #

(/=) :: TextLabel r -> TextLabel r -> Bool #

Ord r => Ord (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r)) -> TextLabel r -> TextLabel r

type Dimension (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (TextLabel r) = 2
type NumType (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type NumType (TextLabel r) = r

data MiniPage r Source #

A Minipage

Constructors

MiniPage Text (Point 2 r) r 

Instances

Instances details
Foldable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => MiniPage m -> m #

foldMap :: Monoid m => (a -> m) -> MiniPage a -> m #

foldMap' :: Monoid m => (a -> m) -> MiniPage a -> m #

foldr :: (a -> b -> b) -> b -> MiniPage a -> b #

foldr' :: (a -> b -> b) -> b -> MiniPage a -> b #

foldl :: (b -> a -> b) -> b -> MiniPage a -> b #

foldl' :: (b -> a -> b) -> b -> MiniPage a -> b #

foldr1 :: (a -> a -> a) -> MiniPage a -> a #

foldl1 :: (a -> a -> a) -> MiniPage a -> a #

toList :: MiniPage a -> [a] #

null :: MiniPage a -> Bool #

length :: MiniPage a -> Int #

elem :: Eq a => a -> MiniPage a -> Bool #

maximum :: Ord a => MiniPage a -> a #

minimum :: Ord a => MiniPage a -> a #

sum :: Num a => MiniPage a -> a #

product :: Num a => MiniPage a -> a #

Traversable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> MiniPage a -> f (MiniPage b) #

sequenceA :: Applicative f => MiniPage (f a) -> f (MiniPage a) #

mapM :: Monad m => (a -> m b) -> MiniPage a -> m (MiniPage b) #

sequence :: Monad m => MiniPage (m a) -> m (MiniPage a) #

Functor MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> MiniPage a -> MiniPage b #

(<$) :: a -> MiniPage b -> MiniPage a #

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

Show r => Show (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> MiniPage r -> ShowS #

show :: MiniPage r -> String #

showList :: [MiniPage r] -> ShowS #

Eq r => Eq (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: MiniPage r -> MiniPage r -> Bool #

(/=) :: MiniPage r -> MiniPage r -> Bool #

Ord r => Ord (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: MiniPage r -> MiniPage r -> Ordering #

(<) :: MiniPage r -> MiniPage r -> Bool #

(<=) :: MiniPage r -> MiniPage r -> Bool #

(>) :: MiniPage r -> MiniPage r -> Bool #

(>=) :: MiniPage r -> MiniPage r -> Bool #

max :: MiniPage r -> MiniPage r -> MiniPage r #

min :: MiniPage r -> MiniPage r -> MiniPage r #

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r)) -> MiniPage r -> MiniPage r

type Dimension (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (MiniPage r) = 2
type NumType (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type NumType (MiniPage r) = r

data Image r Source #

Image Objects

Constructors

Image () (Rectangle (Point 2 r)) 

Instances

Instances details
Foldable Image Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Image m -> m #

foldMap :: Monoid m => (a -> m) -> Image a -> m #

foldMap' :: Monoid m => (a -> m) -> Image a -> m #

foldr :: (a -> b -> b) -> b -> Image a -> b #

foldr' :: (a -> b -> b) -> b -> Image a -> b #

foldl :: (b -> a -> b) -> b -> Image a -> b #

foldl' :: (b -> a -> b) -> b -> Image a -> b #

foldr1 :: (a -> a -> a) -> Image a -> a #

foldl1 :: (a -> a -> a) -> Image a -> a #

toList :: Image a -> [a] #

null :: Image a -> Bool #

length :: Image a -> Int #

elem :: Eq a => a -> Image a -> Bool #

maximum :: Ord a => Image a -> a #

minimum :: Ord a => Image a -> a #

sum :: Num a => Image a -> a #

product :: Num a => Image a -> a #

Traversable Image Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Image a -> f (Image b) #

sequenceA :: Applicative f => Image (f a) -> f (Image a) #

mapM :: Monad m => (a -> m b) -> Image a -> m (Image b) #

sequence :: Monad m => Image (m a) -> m (Image a) #

Functor Image Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Image a -> Image b #

(<$) :: a -> Image b -> Image a #

ToObject Image Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Image r -> ShowS #

show :: Image r -> String #

showList :: [Image r] -> ShowS #

Eq r => Eq (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Image r -> Image r -> Bool #

(/=) :: Image r -> Image r -> Bool #

Ord r => Ord (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: Image r -> Image r -> Ordering #

(<) :: Image r -> Image r -> Bool #

(<=) :: Image r -> Image r -> Bool #

(>) :: Image r -> Image r -> Bool #

(>=) :: Image r -> Image r -> Bool #

max :: Image r -> Image r -> Image r #

min :: Image r -> Image r -> Image r #

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Image r)) (NumType (Image r)) -> Image r -> Image r

type Dimension (Image r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Image r) = 2
type NumType (Image r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Image r) = r

imageData :: forall r. Lens' (Image r) () Source #

rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r)) Source #

Attributes

type Attributes' r = Attributes (AttrMapSym1 r) Source #

Attributes' :: Type -> [AttributeUniverse] -> Type

type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ... Source #

The mapping between the labels of the the attributes and the types of the + view, essentially matching the behaviour of ipe. In particular,

  • if the page does not have any layers, it creates a layer named "alpha", and
  • if the page does not have any views, it creates a view in which all layers are visible.

Content: Ipe Objects

data IpeObject r Source #

Instances

Instances details
Foldable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeObject m -> m #

foldMap :: Monoid m => (a -> m) -> IpeObject a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeObject a -> m #

foldr :: (a -> b -> b) -> b -> IpeObject a -> b #

foldr' :: (a -> b -> b) -> b -> IpeObject a -> b #

foldl :: (b -> a -> b) -> b -> IpeObject a -> b #

foldl' :: (b -> a -> b) -> b -> IpeObject a -> b #

foldr1 :: (a -> a -> a) -> IpeObject a -> a #

foldl1 :: (a -> a -> a) -> IpeObject a -> a #

toList :: IpeObject a -> [a] #

null :: IpeObject a -> Bool #

length :: IpeObject a -> Int #

elem :: Eq a => a -> IpeObject a -> Bool #

maximum :: Ord a => IpeObject a -> a #

minimum :: Ord a => IpeObject a -> a #

sum :: Num a => IpeObject a -> a #

product :: Num a => IpeObject a -> a #

Traversable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeObject a -> f (IpeObject b) #

sequenceA :: Applicative f => IpeObject (f a) -> f (IpeObject a) #

mapM :: Monad m => (a -> m b) -> IpeObject a -> m (IpeObject b) #

sequence :: Monad m => IpeObject (m a) -> m (IpeObject a) #

Functor IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeObject a -> IpeObject b #

(<$) :: a -> IpeObject b -> IpeObject a #

Show r => Show (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeObject r -> IpeObject r -> Bool #

(/=) :: IpeObject r -> IpeObject r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r)) -> IpeObject r -> IpeObject r

type Dimension (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeObject r) = 2
type NumType (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeObject r) = r

type IpeObject' g r = g r :+ IpeAttributes g r Source #

An IpeObject' is essentially the oject ogether with its attributes

ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r Source #

Shorthand for constructing ipeObjects

class ToObject i where Source #

Instances

Instances details
ToObject Group Source # 
Instance details

Defined in Ipe.Content

ToObject Image Source # 
Instance details

Defined in Ipe.Content

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Specific Ipe-Objects

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

data IpeSymbol r Source #

Ipe Symbols, i.e. Points

A symbol (point) in ipe

Constructors

Symbol (Point 2 r) Text 

Instances

Instances details
Foldable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeSymbol m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldr :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldl :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldr1 :: (a -> a -> a) -> IpeSymbol a -> a #

foldl1 :: (a -> a -> a) -> IpeSymbol a -> a #

toList :: IpeSymbol a -> [a] #

null :: IpeSymbol a -> Bool #

length :: IpeSymbol a -> Int #

elem :: Eq a => a -> IpeSymbol a -> Bool #

maximum :: Ord a => IpeSymbol a -> a #

minimum :: Ord a => IpeSymbol a -> a #

sum :: Num a => IpeSymbol a -> a #

product :: Num a => IpeSymbol a -> a #

Traversable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeSymbol a -> f (IpeSymbol b) #

sequenceA :: Applicative f => IpeSymbol (f a) -> f (IpeSymbol a) #

mapM :: Monad m => (a -> m b) -> IpeSymbol a -> m (IpeSymbol b) #

sequence :: Monad m => IpeSymbol (m a) -> m (IpeSymbol a) #

Functor IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeSymbol a -> IpeSymbol b #

(<$) :: a -> IpeSymbol b -> IpeSymbol a #

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Show r => Show (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeSymbol r -> IpeSymbol r -> Bool #

(/=) :: IpeSymbol r -> IpeSymbol r -> Bool #

Ord r => Ord (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r)) -> IpeSymbol r -> IpeSymbol r

type Dimension (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeSymbol r) = 2
type NumType (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeSymbol r) = r

symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r) Source #

newtype Group r Source #

Groups and Objects

Group Attributes

A group is essentially a list of IpeObjects.

Constructors

Group [IpeObject r] 

Instances

Instances details
Foldable Group Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Group m -> m #

foldMap :: Monoid m => (a -> m) -> Group a -> m #

foldMap' :: Monoid m => (a -> m) -> Group a -> m #

foldr :: (a -> b -> b) -> b -> Group a -> b #

foldr' :: (a -> b -> b) -> b -> Group a -> b #

foldl :: (b -> a -> b) -> b -> Group a -> b #

foldl' :: (b -> a -> b) -> b -> Group a -> b #

foldr1 :: (a -> a -> a) -> Group a -> a #

foldl1 :: (a -> a -> a) -> Group a -> a #

toList :: Group a -> [a] #

null :: Group a -> Bool #

length :: Group a -> Int #

elem :: Eq a => a -> Group a -> Bool #

maximum :: Ord a => Group a -> a #

minimum :: Ord a => Group a -> a #

sum :: Num a => Group a -> a #

product :: Num a => Group a -> a #

Traversable Group Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Group a -> f (Group b) #

sequenceA :: Applicative f => Group (f a) -> f (Group a) #

mapM :: Monad m => (a -> m b) -> Group a -> m (Group b) #

sequence :: Monad m => Group (m a) -> m (Group a) #

Functor Group Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Group a -> Group b #

(<$) :: a -> Group b -> Group a #

ToObject Group Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Group r -> ShowS #

show :: Group r -> String #

showList :: [Group r] -> ShowS #

Eq r => Eq (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Group r -> Group r -> Bool #

(/=) :: Group r -> Group r -> Bool #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Group r)) (NumType (Group r)) -> Group r -> Group r

type DefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

type Dimension (Group r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Group r) = 2
type NumType (Group r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Group r) = r

data TextLabel r Source #

Text Objects

A text label

Constructors

Label Text (Point 2 r) 

Instances

Instances details
Foldable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => TextLabel m -> m #

foldMap :: Monoid m => (a -> m) -> TextLabel a -> m #

foldMap' :: Monoid m => (a -> m) -> TextLabel a -> m #

foldr :: (a -> b -> b) -> b -> TextLabel a -> b #

foldr' :: (a -> b -> b) -> b -> TextLabel a -> b #

foldl :: (b -> a -> b) -> b -> TextLabel a -> b #

foldl' :: (b -> a -> b) -> b -> TextLabel a -> b #

foldr1 :: (a -> a -> a) -> TextLabel a -> a #

foldl1 :: (a -> a -> a) -> TextLabel a -> a #

toList :: TextLabel a -> [a] #

null :: TextLabel a -> Bool #

length :: TextLabel a -> Int #

elem :: Eq a => a -> TextLabel a -> Bool #

maximum :: Ord a => TextLabel a -> a #

minimum :: Ord a => TextLabel a -> a #

sum :: Num a => TextLabel a -> a #

product :: Num a => TextLabel a -> a #

Traversable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> TextLabel a -> f (TextLabel b) #

sequenceA :: Applicative f => TextLabel (f a) -> f (TextLabel a) #

mapM :: Monad m => (a -> m b) -> TextLabel a -> m (TextLabel b) #

sequence :: Monad m => TextLabel (m a) -> m (TextLabel a) #

Functor TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> TextLabel a -> TextLabel b #

(<$) :: a -> TextLabel b -> TextLabel a #

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

Show r => Show (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: TextLabel r -> TextLabel r -> Bool #

(/=) :: TextLabel r -> TextLabel r -> Bool #

Ord r => Ord (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r)) -> TextLabel r -> TextLabel r

type Dimension (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (TextLabel r) = 2
type NumType (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type NumType (TextLabel r) = r

data MiniPage r Source #

A Minipage

Constructors

MiniPage Text (Point 2 r) r 

Instances

Instances details
Foldable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => MiniPage m -> m #

foldMap :: Monoid m => (a -> m) -> MiniPage a -> m #

foldMap' :: Monoid m => (a -> m) -> MiniPage a -> m #

foldr :: (a -> b -> b) -> b -> MiniPage a -> b #

foldr' :: (a -> b -> b) -> b -> MiniPage a -> b #

foldl :: (b -> a -> b) -> b -> MiniPage a -> b #

foldl' :: (b -> a -> b) -> b -> MiniPage a -> b #

foldr1 :: (a -> a -> a) -> MiniPage a -> a #

foldl1 :: (a -> a -> a) -> MiniPage a -> a #

toList :: MiniPage a -> [a] #

null :: MiniPage a -> Bool #

length :: MiniPage a -> Int #

elem :: Eq a => a -> MiniPage a -> Bool #

maximum :: Ord a => MiniPage a -> a #

minimum :: Ord a => MiniPage a -> a #

sum :: Num a => MiniPage a -> a #

product :: Num a => MiniPage a -> a #

Traversable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> MiniPage a -> f (MiniPage b) #

sequenceA :: Applicative f => MiniPage (f a) -> f (MiniPage a) #

mapM :: Monad m => (a -> m b) -> MiniPage a -> m (MiniPage b) #

sequence :: Monad m => MiniPage (m a) -> m (MiniPage a) #

Functor MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> MiniPage a -> MiniPage b #

(<$) :: a -> MiniPage b -> MiniPage a #

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

Show r => Show (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> MiniPage r -> ShowS #

show :: MiniPage r -> String #

showList :: [MiniPage r] -> ShowS #

Eq r => Eq (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: MiniPage r -> MiniPage r -> Bool #

(/=) :: MiniPage r -> MiniPage r -> Bool #

Ord r => Ord (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: MiniPage r -> MiniPage r -> Ordering #

(<) :: MiniPage r -> MiniPage r -> Bool #

(<=) :: MiniPage r -> MiniPage r -> Bool #

(>) :: MiniPage r -> MiniPage r -> Bool #

(>=) :: MiniPage r -> MiniPage r -> Bool #

max :: MiniPage r -> MiniPage r -> MiniPage r #

min :: MiniPage r -> MiniPage r -> MiniPage r #

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r)) -> MiniPage r -> MiniPage r

type Dimension (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (MiniPage r) = 2
type NumType (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type NumType (MiniPage r) = r

data Image r Source #

Image Objects

Constructors

Image () (Rectangle (Point 2 r)) 

Instances

Instances details
Foldable Image Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Image m -> m #

foldMap :: Monoid m => (a -> m) -> Image a -> m #

foldMap' :: Monoid m => (a -> m) -> Image a -> m #

foldr :: (a -> b -> b) -> b -> Image a -> b #

foldr' :: (a -> b -> b) -> b -> Image a -> b #

foldl :: (b -> a -> b) -> b -> Image a -> b #

foldl' :: (b -> a -> b) -> b -> Image a -> b #

foldr1 :: (a -> a -> a) -> Image a -> a #

foldl1 :: (a -> a -> a) -> Image a -> a #

toList :: Image a -> [a] #

null :: Image a -> Bool #

length :: Image a -> Int #

elem :: Eq a => a -> Image a -> Bool #

maximum :: Ord a => Image a -> a #

minimum :: Ord a => Image a -> a #

sum :: Num a => Image a -> a #

product :: Num a => Image a -> a #

Traversable Image Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Image a -> f (Image b) #

sequenceA :: Applicative f => Image (f a) -> f (Image a) #

mapM :: Monad m => (a -> m b) -> Image a -> m (Image b) #

sequence :: Monad m => Image (m a) -> m (Image a) #

Functor Image Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Image a -> Image b #

(<$) :: a -> Image b -> Image a #

ToObject Image Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Image r -> ShowS #

show :: Image r -> String #

showList :: [Image r] -> ShowS #

Eq r => Eq (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Image r -> Image r -> Bool #

(/=) :: Image r -> Image r -> Bool #

Ord r => Ord (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: Image r -> Image r -> Ordering #

(<) :: Image r -> Image r -> Bool #

(<=) :: Image r -> Image r -> Bool #

(>) :: Image r -> Image r -> Bool #

(>=) :: Image r -> Image r -> Bool #

max :: Image r -> Image r -> Image r #

min :: Image r -> Image r -> Image r #

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Image r)) (NumType (Image r)) -> Image r -> Image r

type Dimension (Image r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Image r) = 2
type NumType (Image r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Image r) = r

imageData :: forall r. Lens' (Image r) () Source #

rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r)) Source #

Attributes

type Attributes' r = Attributes (AttrMapSym1 r) Source #

Attributes' :: Type -> [AttributeUniverse] -> Type

type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ... Source #

The mapping between the labels of the the attributes and the types of the attributes with these labels. For example, the Matrix label/attribute should - have a value of type 'Matrix 3 3 r'.

data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type Source #

Instances

Instances details
SuppressUnusedWarnings (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) = AttrMap a6989586621679248458 a6989586621679248459

traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s) Source #

traverse for ipe attributes

Layers and Views

newtype LayerName Source #

Defines an Layer in Ipe.

Constructors

LayerName Text 

Instances

Instances details
IsString LayerName Source # 
Instance details

Defined in Ipe.Layer

Read LayerName Source # 
Instance details

Defined in Ipe.Layer

Show LayerName Source # 
Instance details

Defined in Ipe.Layer

Eq LayerName Source # 
Instance details

Defined in Ipe.Layer

Ord LayerName Source # 
Instance details

Defined in Ipe.Layer

IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

data View Source #

The definition of a view - make active layer into an index ?

Constructors

View [LayerName] LayerName 

Instances

Instances details
Show View Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> View -> ShowS #

show :: View -> String #

showList :: [View] -> ShowS #

Eq View Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: View -> View -> Bool #

(/=) :: View -> View -> Bool #

Ord View Source # 
Instance details

Defined in Ipe.Types

Methods

compare :: View -> View -> Ordering #

(<) :: View -> View -> Bool #

(<=) :: View -> View -> Bool #

(>) :: View -> View -> Bool #

(>=) :: View -> View -> Bool #

max :: View -> View -> View #

min :: View -> View -> View #

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

Styles and Preamble

addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r Source #

Adds a stylesheet to the ipe file. This will be the first - stylesheet, i.e. it has priority over all previously imported stylesheets.

data IpeStyle Source #

for now we pretty much ignore these

Constructors

IpeStyle (Maybe Text) (Node Text Text) 

Instances

Instances details
Show IpeStyle Source # 
Instance details

Defined in Ipe.Types

Eq IpeStyle Source # 
Instance details

Defined in Ipe.Types

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

basicIpeStyle :: IpeStyle Source #

The "basic" ipe stylesheet

opacitiesStyle :: IpeStyle Source #

A stylesheet with some convenient predefined opacities. In particular - the opacities "10%","20%",..,"90%".

data IpePreamble Source #

The maybe string is the encoding

Constructors

IpePreamble (Maybe Text) Text 
\ No newline at end of file + have a value of type 'Matrix 3 3 r'.

data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type Source #

Instances

Instances details
SuppressUnusedWarnings (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) = AttrMap a6989586621679250061 a6989586621679250062

traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s) Source #

traverse for ipe attributes

Layers and Views

newtype LayerName Source #

Defines an Layer in Ipe.

Constructors

LayerName Text 

Instances

Instances details
IsString LayerName Source # 
Instance details

Defined in Ipe.Layer

Read LayerName Source # 
Instance details

Defined in Ipe.Layer

Show LayerName Source # 
Instance details

Defined in Ipe.Layer

Eq LayerName Source # 
Instance details

Defined in Ipe.Layer

Ord LayerName Source # 
Instance details

Defined in Ipe.Layer

IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

data View Source #

The definition of a view + make active layer into an index ?

Constructors

View [LayerName] LayerName 

Instances

Instances details
Show View Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> View -> ShowS #

show :: View -> String #

showList :: [View] -> ShowS #

Eq View Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: View -> View -> Bool #

(/=) :: View -> View -> Bool #

Ord View Source # 
Instance details

Defined in Ipe.Types

Methods

compare :: View -> View -> Ordering #

(<) :: View -> View -> Bool #

(<=) :: View -> View -> Bool #

(>) :: View -> View -> Bool #

(>=) :: View -> View -> Bool #

max :: View -> View -> View #

min :: View -> View -> View #

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

Styles and Preamble

addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r Source #

Adds a stylesheet to the ipe file. This will be the first + stylesheet, i.e. it has priority over all previously imported stylesheets.

data IpeStyle Source #

for now we pretty much ignore these

Constructors

IpeStyle (Maybe Text) (Node Text Text) 

Instances

Instances details
Show IpeStyle Source # 
Instance details

Defined in Ipe.Types

Eq IpeStyle Source # 
Instance details

Defined in Ipe.Types

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

basicIpeStyle :: IpeStyle Source #

The "basic" ipe stylesheet

opacitiesStyle :: IpeStyle Source #

A stylesheet with some convenient predefined opacities. In particular + the opacities "10%","20%",..,"90%".

data IpePreamble Source #

The maybe string is the encoding

Constructors

IpePreamble (Maybe Text) Text 
\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Value.html b/haddocks/hgeometry/ipe/Ipe-Value.html index 0790014d4..c73403797 100644 --- a/haddocks/hgeometry/ipe/Ipe-Value.html +++ b/haddocks/hgeometry/ipe/Ipe-Value.html @@ -1 +1 @@ -Ipe.Value
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Value

Description

Data type for representing values in ipe.

Synopsis

Documentation

data IpeValue v Source #

Many types either consist of a symbolc value, or a value of type v

Constructors

Named Text 
Valued v 

Instances

Instances details
Foldable IpeValue Source # 
Instance details

Defined in Ipe.Value

Methods

fold :: Monoid m => IpeValue m -> m #

foldMap :: Monoid m => (a -> m) -> IpeValue a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeValue a -> m #

foldr :: (a -> b -> b) -> b -> IpeValue a -> b #

foldr' :: (a -> b -> b) -> b -> IpeValue a -> b #

foldl :: (b -> a -> b) -> b -> IpeValue a -> b #

foldl' :: (b -> a -> b) -> b -> IpeValue a -> b #

foldr1 :: (a -> a -> a) -> IpeValue a -> a #

foldl1 :: (a -> a -> a) -> IpeValue a -> a #

toList :: IpeValue a -> [a] #

null :: IpeValue a -> Bool #

length :: IpeValue a -> Int #

elem :: Eq a => a -> IpeValue a -> Bool #

maximum :: Ord a => IpeValue a -> a #

minimum :: Ord a => IpeValue a -> a #

sum :: Num a => IpeValue a -> a #

product :: Num a => IpeValue a -> a #

Traversable IpeValue Source # 
Instance details

Defined in Ipe.Value

Methods

traverse :: Applicative f => (a -> f b) -> IpeValue a -> f (IpeValue b) #

sequenceA :: Applicative f => IpeValue (f a) -> f (IpeValue a) #

mapM :: Monad m => (a -> m b) -> IpeValue a -> m (IpeValue b) #

sequence :: Monad m => IpeValue (m a) -> m (IpeValue a) #

Functor IpeValue Source # 
Instance details

Defined in Ipe.Value

Methods

fmap :: (a -> b) -> IpeValue a -> IpeValue b #

(<$) :: a -> IpeValue b -> IpeValue a #

IsString (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

fromString :: String -> IpeValue v #

Read v => Read (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Show v => Show (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

showsPrec :: Int -> IpeValue v -> ShowS #

show :: IpeValue v -> String #

showList :: [IpeValue v] -> ShowS #

Eq v => Eq (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

(==) :: IpeValue v -> IpeValue v -> Bool #

(/=) :: IpeValue v -> IpeValue v -> Bool #

Ord v => Ord (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

compare :: IpeValue v -> IpeValue v -> Ordering #

(<) :: IpeValue v -> IpeValue v -> Bool #

(<=) :: IpeValue v -> IpeValue v -> Bool #

(>) :: IpeValue v -> IpeValue v -> Bool #

(>=) :: IpeValue v -> IpeValue v -> Bool #

max :: IpeValue v -> IpeValue v -> IpeValue v #

min :: IpeValue v -> IpeValue v -> IpeValue v #

IpeWriteText v => IpeWriteText (IpeValue v) Source # 
Instance details

Defined in Ipe.Writer

\ No newline at end of file +Ipe.Value
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Value

Description

Data type for representing values in ipe.

Synopsis

Documentation

data IpeValue v Source #

Many types either consist of a symbolc value, or a value of type v

Constructors

Named Text 
Valued v 

Instances

Instances details
Foldable IpeValue Source # 
Instance details

Defined in Ipe.Value

Methods

fold :: Monoid m => IpeValue m -> m #

foldMap :: Monoid m => (a -> m) -> IpeValue a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeValue a -> m #

foldr :: (a -> b -> b) -> b -> IpeValue a -> b #

foldr' :: (a -> b -> b) -> b -> IpeValue a -> b #

foldl :: (b -> a -> b) -> b -> IpeValue a -> b #

foldl' :: (b -> a -> b) -> b -> IpeValue a -> b #

foldr1 :: (a -> a -> a) -> IpeValue a -> a #

foldl1 :: (a -> a -> a) -> IpeValue a -> a #

toList :: IpeValue a -> [a] #

null :: IpeValue a -> Bool #

length :: IpeValue a -> Int #

elem :: Eq a => a -> IpeValue a -> Bool #

maximum :: Ord a => IpeValue a -> a #

minimum :: Ord a => IpeValue a -> a #

sum :: Num a => IpeValue a -> a #

product :: Num a => IpeValue a -> a #

Traversable IpeValue Source # 
Instance details

Defined in Ipe.Value

Methods

traverse :: Applicative f => (a -> f b) -> IpeValue a -> f (IpeValue b) #

sequenceA :: Applicative f => IpeValue (f a) -> f (IpeValue a) #

mapM :: Monad m => (a -> m b) -> IpeValue a -> m (IpeValue b) #

sequence :: Monad m => IpeValue (m a) -> m (IpeValue a) #

Functor IpeValue Source # 
Instance details

Defined in Ipe.Value

Methods

fmap :: (a -> b) -> IpeValue a -> IpeValue b #

(<$) :: a -> IpeValue b -> IpeValue a #

IsString (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

fromString :: String -> IpeValue v #

Read v => Read (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Show v => Show (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

showsPrec :: Int -> IpeValue v -> ShowS #

show :: IpeValue v -> String #

showList :: [IpeValue v] -> ShowS #

Eq v => Eq (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

(==) :: IpeValue v -> IpeValue v -> Bool #

(/=) :: IpeValue v -> IpeValue v -> Bool #

Ord v => Ord (IpeValue v) Source # 
Instance details

Defined in Ipe.Value

Methods

compare :: IpeValue v -> IpeValue v -> Ordering #

(<) :: IpeValue v -> IpeValue v -> Bool #

(<=) :: IpeValue v -> IpeValue v -> Bool #

(>) :: IpeValue v -> IpeValue v -> Bool #

(>=) :: IpeValue v -> IpeValue v -> Bool #

max :: IpeValue v -> IpeValue v -> IpeValue v #

min :: IpeValue v -> IpeValue v -> IpeValue v #

IpeWriteText v => IpeWriteText (IpeValue v) Source # 
Instance details

Defined in Ipe.Writer

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe-Writer.html b/haddocks/hgeometry/ipe/Ipe-Writer.html index 7e2fedba8..a8c3f7065 100644 --- a/haddocks/hgeometry/ipe/Ipe-Writer.html +++ b/haddocks/hgeometry/ipe/Ipe-Writer.html @@ -1,4 +1,4 @@ -Ipe.Writer
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Writer

Description

 

Documentation

writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO () Source #

Write an IpeFiele to file.

writeIpeFile' :: IpeWrite t => t -> OsPath -> IO () Source #

Convert to ipe XML and write the output to a file.

writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO () Source #

Creates a single page ipe file with the given page

toIpeXML :: IpeWrite t => t -> Maybe ByteString Source #

Convert to Ipe xml

printAsIpeSelection :: IpeWrite t => t -> IO () Source #

Convert the input to ipeXml, and prints it to standard out in such a way +Ipe.Writer

hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe.Writer

Description

 

Documentation

writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO () Source #

Write an IpeFiele to file.

writeIpeFile' :: IpeWrite t => t -> OsPath -> IO () Source #

Convert to ipe XML and write the output to a file.

writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO () Source #

Creates a single page ipe file with the given page

toIpeXML :: IpeWrite t => t -> Maybe ByteString Source #

Convert to Ipe xml

printAsIpeSelection :: IpeWrite t => t -> IO () Source #

Convert the input to ipeXml, and prints it to standard out in such a way that the copied text can be pasted into ipe as a geometry object.

toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString Source #

Convert input into an ipe selection.

class IpeWrite t where Source #

Types that correspond to an XML Element. All instances should produce an Element. If the type should produce a Node with the Text constructor, use - the IpeWriteText typeclass instead.

Methods

ipeWrite :: t -> Maybe (Node Text Text) Source #

Instances

Instances details
IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpePreamble Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

IpeWrite () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: () -> Maybe (Node Text Text) Source #

IpeWrite t => IpeWrite (NonEmpty t) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWrite t => IpeWrite [t] Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: [t] -> Maybe (Node Text Text) Source #

(IpeWrite l, IpeWrite r) => IpeWrite (Either l r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Either l r -> Maybe (Node Text Text) Source #

(IpeWriteText r, EndPoint_ (endPoint point), IxValue (endPoint point) ~ point, Vertex (LineSegment endPoint point) ~ point, Point_ point 2 r) => IpeWrite (LineSegment endPoint point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: LineSegment endPoint point -> Maybe (Node Text Text) Source #

(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

(IpeWriteText r, Point_ point 2 r, Functor f, Foldable1 f) => IpeWrite (PolyLineF f point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: PolyLineF f point -> Maybe (Node Text Text) Source #

class IpeWriteText t where Source #

For types that can produce a text value

Methods

ipeWriteText :: t -> Maybe Text Source #

Instances

Instances details
IpeWriteText FillType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText PinType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText TransformationTypes Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText VerticalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Text Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText String Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Integer Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: () -> Maybe Text Source #

IpeWriteText Double Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Float Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Int Source # 
Instance details

Defined in Ipe.Writer

Integral a => IpeWriteText (Ratio a) Source #

This instance converts the ratio to a Pico, and then displays that.

Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (RGB r) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (CubicBezier point) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (PolyLine point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: PolyLine point -> Maybe Text Source #

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (SimplePolygon point) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeDash r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpePen r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeSize r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Operation r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText v => IpeWriteText (IpeValue v) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText (RealNumber p) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText l, IpeWriteText r) => IpeWriteText (Either l r) Source # 
Instance details

Defined in Ipe.Writer

HasResolution p => IpeWriteText (Fixed p) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Point 2 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Point 2 r -> Maybe Text Source #

IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Attr f at -> Maybe Text Source #

IpeWriteText r => IpeWriteText (Matrix 3 3 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Matrix 3 3 r -> Maybe Text Source #

ipeWriteAttrs :: (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)] Source #

Functon to write all attributes in a Rec

writeAttrValues :: (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs Source #

Writing the attribute values

\ No newline at end of file + the IpeWriteText typeclass instead.

Methods

ipeWrite :: t -> Maybe (Node Text Text) Source #

Instances

Instances details
IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpePreamble Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

IpeWrite () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: () -> Maybe (Node Text Text) Source #

IpeWrite t => IpeWrite (NonEmpty t) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWrite t => IpeWrite [t] Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: [t] -> Maybe (Node Text Text) Source #

(IpeWrite l, IpeWrite r) => IpeWrite (Either l r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Either l r -> Maybe (Node Text Text) Source #

(IpeWriteText r, EndPoint_ (endPoint point), IxValue (endPoint point) ~ point, Vertex (LineSegment endPoint point) ~ point, Point_ point 2 r) => IpeWrite (LineSegment endPoint point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: LineSegment endPoint point -> Maybe (Node Text Text) Source #

(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

(IpeWriteText r, Point_ point 2 r, Functor f, Foldable1 f) => IpeWrite (PolyLineF f point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: PolyLineF f point -> Maybe (Node Text Text) Source #

class IpeWriteText t where Source #

For types that can produce a text value

Methods

ipeWriteText :: t -> Maybe Text Source #

Instances

Instances details
IpeWriteText FillType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText PinType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText TransformationTypes Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText VerticalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Text Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText String Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Integer Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: () -> Maybe Text Source #

IpeWriteText Double Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Float Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Int Source # 
Instance details

Defined in Ipe.Writer

Integral a => IpeWriteText (Ratio a) Source #

This instance converts the ratio to a Pico, and then displays that.

Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (RGB r) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (CubicBezier point) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (PolyLine point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: PolyLine point -> Maybe Text Source #

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (SimplePolygon point) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeDash r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpePen r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeSize r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Operation r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText v => IpeWriteText (IpeValue v) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText (RealNumber p) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText l, IpeWriteText r) => IpeWriteText (Either l r) Source # 
Instance details

Defined in Ipe.Writer

HasResolution p => IpeWriteText (Fixed p) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Point 2 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Point 2 r -> Maybe Text Source #

IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Attr f at -> Maybe Text Source #

IpeWriteText r => IpeWriteText (Matrix 3 3 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Matrix 3 3 r -> Maybe Text Source #

ipeWriteAttrs :: (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)] Source #

Functon to write all attributes in a Rec

writeAttrValues :: (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs Source #

Writing the attribute values

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/Ipe.html b/haddocks/hgeometry/ipe/Ipe.html index 9ecd760f5..61cf4b111 100644 --- a/haddocks/hgeometry/ipe/Ipe.html +++ b/haddocks/hgeometry/ipe/Ipe.html @@ -1,11 +1,11 @@ -Ipe
hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe

Description

Reexports the functionality for reading and writing Ipe files.

Synopsis

Ipe Files

data IpeFile r Source #

A complete ipe file

Instances

Instances details
Show r => Show (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpeFile r -> ShowS #

show :: IpeFile r -> String #

showList :: [IpeFile r] -> ShowS #

Eq r => Eq (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpeFile r -> IpeFile r -> Bool #

(/=) :: IpeFile r -> IpeFile r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

styles :: forall r. Lens' (IpeFile r) [IpeStyle] Source #

pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r)) Source #

ipeFile :: NonEmpty (IpePage r) -> IpeFile r Source #

Convenience constructor for creating an ipe file without preamble +Ipe

hgeometry:ipe
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

Ipe

Description

Reexports the functionality for reading and writing Ipe files.

Synopsis

Ipe Files

data IpeFile r Source #

A complete ipe file

Instances

Instances details
Show r => Show (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpeFile r -> ShowS #

show :: IpeFile r -> String #

showList :: [IpeFile r] -> ShowS #

Eq r => Eq (IpeFile r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpeFile r -> IpeFile r -> Bool #

(/=) :: IpeFile r -> IpeFile r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

styles :: forall r. Lens' (IpeFile r) [IpeStyle] Source #

pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r)) Source #

ipeFile :: NonEmpty (IpePage r) -> IpeFile r Source #

Convenience constructor for creating an ipe file without preamble and with the default stylesheet.

singlePageFile :: IpePage r -> IpeFile r Source #

Convenience function to construct an ipe file consisting of a single page.

singlePageFromContent :: [IpeObject r] -> IpeFile r Source #

Create a single page ipe file from a list of IpeObjects

Reading Ipe files

readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) Source #

Given a file path, tries to read an ipe file.

This function applies all matrices to objects.

readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r)) Source #

Since most Ipe file contain only one page, we provide a shortcut for that as well.

This function applies all matrices, and it makes sure there is at least one layer and view in the page.

readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r) Source #

Tries to read a single page file, throws an error when this - fails. See readSinglePageFile for further details.

readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) Source #

Given a file path, tries to read an ipe file

Reading all Geometries from a single page ipe file

readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r] Source #

Read all g's from some ipe page(s).

readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r] Source #

Convenience function from reading all g's from an ipe file. If there + fails. See readSinglePageFile for further details.

readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) Source #

Given a file path, tries to read an ipe file

Reading all Geometries from a single page ipe file

readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r] Source #

Read all g's from some ipe page(s).

readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r] Source #

Convenience function from reading all g's from an ipe file. If there is an error reading or parsing the file the error is "thrown away".

Writing ipe files

writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO () Source #

Write an IpeFiele to file.

writeIpeFile' :: IpeWrite t => t -> OsPath -> IO () Source #

Convert to ipe XML and write the output to a file.

writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO () Source #

Creates a single page ipe file with the given page

toIpeXML :: IpeWrite t => t -> Maybe ByteString Source #

Convert to Ipe xml

printAsIpeSelection :: IpeWrite t => t -> IO () Source #

Convert the input to ipeXml, and prints it to standard out in such a way that the copied text can be pasted into ipe as a geometry object.

toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString Source #

Convert input into an ipe selection.

Ipe Pages

data IpePage r Source #

An IpePage is essentially a Group, together with a list of layers and a - list of views.

Constructors

IpePage [LayerName] [View] [IpeObject r] 

Instances

Instances details
Show r => Show (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpePage r -> ShowS #

show :: IpePage r -> String #

showList :: [IpePage r] -> ShowS #

Eq r => Eq (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpePage r -> IpePage r -> Bool #

(/=) :: IpePage r -> IpePage r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

layers :: forall r. Lens' (IpePage r) [LayerName] Source #

views :: forall r. Lens' (IpePage r) [View] Source #

content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r] Source #

emptyPage :: IpePage r Source #

Creates an empty page with one layer and view.

fromContent :: [IpeObject r] -> IpePage r Source #

Creates a simple page with a single view.

onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r) Source #

This allows you to filter the objects on some layer.

>>> let page = IpePage [] [] []
+ list of views.

Constructors

IpePage [LayerName] [View] [IpeObject r] 

Instances

Instances details
Show r => Show (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> IpePage r -> ShowS #

show :: IpePage r -> String #

showList :: [IpePage r] -> ShowS #

Eq r => Eq (IpePage r) Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: IpePage r -> IpePage r -> Bool #

(/=) :: IpePage r -> IpePage r -> Bool #

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

layers :: forall r. Lens' (IpePage r) [LayerName] Source #

views :: forall r. Lens' (IpePage r) [View] Source #

content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r] Source #

emptyPage :: IpePage r Source #

Creates an empty page with one layer and view.

fromContent :: [IpeObject r] -> IpePage r Source #

Creates a simple page with a single view.

onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r) Source #

This allows you to filter the objects on some layer.

>>> let page = IpePage [] [] []
 >>> page^..content.onLayer "myLayer"
 []
 

contentInView :: Word -> Getter (IpePage r) [IpeObject r] Source #

Gets all objects that are visible in the given view.

Note that views are indexed starting from 0. If the page does not @@ -14,13 +14,13 @@ >>> page^.contentInView 0 []

withDefaults :: IpePage r -> IpePage r Source #

Makes sure that the page has at least one layer and at least one - view, essentially matching the behaviour of ipe. In particular,

  • if the page does not have any layers, it creates a layer named "alpha", and
  • if the page does not have any views, it creates a view in which all layers are visible.

Content: Ipe Objects

data IpeObject r Source #

Instances

Instances details
Foldable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeObject m -> m #

foldMap :: Monoid m => (a -> m) -> IpeObject a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeObject a -> m #

foldr :: (a -> b -> b) -> b -> IpeObject a -> b #

foldr' :: (a -> b -> b) -> b -> IpeObject a -> b #

foldl :: (b -> a -> b) -> b -> IpeObject a -> b #

foldl' :: (b -> a -> b) -> b -> IpeObject a -> b #

foldr1 :: (a -> a -> a) -> IpeObject a -> a #

foldl1 :: (a -> a -> a) -> IpeObject a -> a #

toList :: IpeObject a -> [a] #

null :: IpeObject a -> Bool #

length :: IpeObject a -> Int #

elem :: Eq a => a -> IpeObject a -> Bool #

maximum :: Ord a => IpeObject a -> a #

minimum :: Ord a => IpeObject a -> a #

sum :: Num a => IpeObject a -> a #

product :: Num a => IpeObject a -> a #

Traversable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeObject a -> f (IpeObject b) #

sequenceA :: Applicative f => IpeObject (f a) -> f (IpeObject a) #

mapM :: Monad m => (a -> m b) -> IpeObject a -> m (IpeObject b) #

sequence :: Monad m => IpeObject (m a) -> m (IpeObject a) #

Functor IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeObject a -> IpeObject b #

(<$) :: a -> IpeObject b -> IpeObject a #

Show r => Show (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeObject r -> IpeObject r -> Bool #

(/=) :: IpeObject r -> IpeObject r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r)) -> IpeObject r -> IpeObject r

type Dimension (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeObject r) = 2
type NumType (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeObject r) = r

type IpeObject' g r = g r :+ IpeAttributes g r Source #

An IpeObject' is essentially the oject ogether with its attributes

ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r Source #

Shorthand for constructing ipeObjects

class ToObject i where Source #

Instances

Instances details
ToObject Group Source # 
Instance details

Defined in Ipe.Content

ToObject Image Source # 
Instance details

Defined in Ipe.Content

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Specific Ipe-Objects

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

data IpeSymbol r Source #

Ipe Symbols, i.e. Points

A symbol (point) in ipe

Constructors

Symbol (Point 2 r) Text 

Instances

Instances details
Foldable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeSymbol m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldr :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldl :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldr1 :: (a -> a -> a) -> IpeSymbol a -> a #

foldl1 :: (a -> a -> a) -> IpeSymbol a -> a #

toList :: IpeSymbol a -> [a] #

null :: IpeSymbol a -> Bool #

length :: IpeSymbol a -> Int #

elem :: Eq a => a -> IpeSymbol a -> Bool #

maximum :: Ord a => IpeSymbol a -> a #

minimum :: Ord a => IpeSymbol a -> a #

sum :: Num a => IpeSymbol a -> a #

product :: Num a => IpeSymbol a -> a #

Traversable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeSymbol a -> f (IpeSymbol b) #

sequenceA :: Applicative f => IpeSymbol (f a) -> f (IpeSymbol a) #

mapM :: Monad m => (a -> m b) -> IpeSymbol a -> m (IpeSymbol b) #

sequence :: Monad m => IpeSymbol (m a) -> m (IpeSymbol a) #

Functor IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeSymbol a -> IpeSymbol b #

(<$) :: a -> IpeSymbol b -> IpeSymbol a #

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Show r => Show (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeSymbol r -> IpeSymbol r -> Bool #

(/=) :: IpeSymbol r -> IpeSymbol r -> Bool #

Ord r => Ord (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r)) -> IpeSymbol r -> IpeSymbol r

type Dimension (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeSymbol r) = 2
type NumType (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeSymbol r) = r

symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r) Source #

newtype Group r Source #

Groups and Objects

Group Attributes

A group is essentially a list of IpeObjects.

Constructors

Group [IpeObject r] 

Instances

Instances details
Foldable Group Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Group m -> m #

foldMap :: Monoid m => (a -> m) -> Group a -> m #

foldMap' :: Monoid m => (a -> m) -> Group a -> m #

foldr :: (a -> b -> b) -> b -> Group a -> b #

foldr' :: (a -> b -> b) -> b -> Group a -> b #

foldl :: (b -> a -> b) -> b -> Group a -> b #

foldl' :: (b -> a -> b) -> b -> Group a -> b #

foldr1 :: (a -> a -> a) -> Group a -> a #

foldl1 :: (a -> a -> a) -> Group a -> a #

toList :: Group a -> [a] #

null :: Group a -> Bool #

length :: Group a -> Int #

elem :: Eq a => a -> Group a -> Bool #

maximum :: Ord a => Group a -> a #

minimum :: Ord a => Group a -> a #

sum :: Num a => Group a -> a #

product :: Num a => Group a -> a #

Traversable Group Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Group a -> f (Group b) #

sequenceA :: Applicative f => Group (f a) -> f (Group a) #

mapM :: Monad m => (a -> m b) -> Group a -> m (Group b) #

sequence :: Monad m => Group (m a) -> m (Group a) #

Functor Group Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Group a -> Group b #

(<$) :: a -> Group b -> Group a #

ToObject Group Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Group r -> ShowS #

show :: Group r -> String #

showList :: [Group r] -> ShowS #

Eq r => Eq (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Group r -> Group r -> Bool #

(/=) :: Group r -> Group r -> Bool #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Group r)) (NumType (Group r)) -> Group r -> Group r

type DefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

type Dimension (Group r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Group r) = 2
type NumType (Group r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Group r) = r

data TextLabel r Source #

Text Objects

A text label

Constructors

Label Text (Point 2 r) 

Instances

Instances details
Foldable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => TextLabel m -> m #

foldMap :: Monoid m => (a -> m) -> TextLabel a -> m #

foldMap' :: Monoid m => (a -> m) -> TextLabel a -> m #

foldr :: (a -> b -> b) -> b -> TextLabel a -> b #

foldr' :: (a -> b -> b) -> b -> TextLabel a -> b #

foldl :: (b -> a -> b) -> b -> TextLabel a -> b #

foldl' :: (b -> a -> b) -> b -> TextLabel a -> b #

foldr1 :: (a -> a -> a) -> TextLabel a -> a #

foldl1 :: (a -> a -> a) -> TextLabel a -> a #

toList :: TextLabel a -> [a] #

null :: TextLabel a -> Bool #

length :: TextLabel a -> Int #

elem :: Eq a => a -> TextLabel a -> Bool #

maximum :: Ord a => TextLabel a -> a #

minimum :: Ord a => TextLabel a -> a #

sum :: Num a => TextLabel a -> a #

product :: Num a => TextLabel a -> a #

Traversable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> TextLabel a -> f (TextLabel b) #

sequenceA :: Applicative f => TextLabel (f a) -> f (TextLabel a) #

mapM :: Monad m => (a -> m b) -> TextLabel a -> m (TextLabel b) #

sequence :: Monad m => TextLabel (m a) -> m (TextLabel a) #

Functor TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> TextLabel a -> TextLabel b #

(<$) :: a -> TextLabel b -> TextLabel a #

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

Show r => Show (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: TextLabel r -> TextLabel r -> Bool #

(/=) :: TextLabel r -> TextLabel r -> Bool #

Ord r => Ord (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r)) -> TextLabel r -> TextLabel r

type Dimension (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (TextLabel r) = 2
type NumType (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type NumType (TextLabel r) = r

data MiniPage r Source #

A Minipage

Constructors

MiniPage Text (Point 2 r) r 

Instances

Instances details
Foldable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => MiniPage m -> m #

foldMap :: Monoid m => (a -> m) -> MiniPage a -> m #

foldMap' :: Monoid m => (a -> m) -> MiniPage a -> m #

foldr :: (a -> b -> b) -> b -> MiniPage a -> b #

foldr' :: (a -> b -> b) -> b -> MiniPage a -> b #

foldl :: (b -> a -> b) -> b -> MiniPage a -> b #

foldl' :: (b -> a -> b) -> b -> MiniPage a -> b #

foldr1 :: (a -> a -> a) -> MiniPage a -> a #

foldl1 :: (a -> a -> a) -> MiniPage a -> a #

toList :: MiniPage a -> [a] #

null :: MiniPage a -> Bool #

length :: MiniPage a -> Int #

elem :: Eq a => a -> MiniPage a -> Bool #

maximum :: Ord a => MiniPage a -> a #

minimum :: Ord a => MiniPage a -> a #

sum :: Num a => MiniPage a -> a #

product :: Num a => MiniPage a -> a #

Traversable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> MiniPage a -> f (MiniPage b) #

sequenceA :: Applicative f => MiniPage (f a) -> f (MiniPage a) #

mapM :: Monad m => (a -> m b) -> MiniPage a -> m (MiniPage b) #

sequence :: Monad m => MiniPage (m a) -> m (MiniPage a) #

Functor MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> MiniPage a -> MiniPage b #

(<$) :: a -> MiniPage b -> MiniPage a #

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

Show r => Show (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> MiniPage r -> ShowS #

show :: MiniPage r -> String #

showList :: [MiniPage r] -> ShowS #

Eq r => Eq (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: MiniPage r -> MiniPage r -> Bool #

(/=) :: MiniPage r -> MiniPage r -> Bool #

Ord r => Ord (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: MiniPage r -> MiniPage r -> Ordering #

(<) :: MiniPage r -> MiniPage r -> Bool #

(<=) :: MiniPage r -> MiniPage r -> Bool #

(>) :: MiniPage r -> MiniPage r -> Bool #

(>=) :: MiniPage r -> MiniPage r -> Bool #

max :: MiniPage r -> MiniPage r -> MiniPage r #

min :: MiniPage r -> MiniPage r -> MiniPage r #

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r)) -> MiniPage r -> MiniPage r

type Dimension (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (MiniPage r) = 2
type NumType (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type NumType (MiniPage r) = r

data Image r Source #

Image Objects

Constructors

Image () (Rectangle (Point 2 r)) 

Instances

Instances details
Foldable Image Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Image m -> m #

foldMap :: Monoid m => (a -> m) -> Image a -> m #

foldMap' :: Monoid m => (a -> m) -> Image a -> m #

foldr :: (a -> b -> b) -> b -> Image a -> b #

foldr' :: (a -> b -> b) -> b -> Image a -> b #

foldl :: (b -> a -> b) -> b -> Image a -> b #

foldl' :: (b -> a -> b) -> b -> Image a -> b #

foldr1 :: (a -> a -> a) -> Image a -> a #

foldl1 :: (a -> a -> a) -> Image a -> a #

toList :: Image a -> [a] #

null :: Image a -> Bool #

length :: Image a -> Int #

elem :: Eq a => a -> Image a -> Bool #

maximum :: Ord a => Image a -> a #

minimum :: Ord a => Image a -> a #

sum :: Num a => Image a -> a #

product :: Num a => Image a -> a #

Traversable Image Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Image a -> f (Image b) #

sequenceA :: Applicative f => Image (f a) -> f (Image a) #

mapM :: Monad m => (a -> m b) -> Image a -> m (Image b) #

sequence :: Monad m => Image (m a) -> m (Image a) #

Functor Image Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Image a -> Image b #

(<$) :: a -> Image b -> Image a #

ToObject Image Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Image r -> ShowS #

show :: Image r -> String #

showList :: [Image r] -> ShowS #

Eq r => Eq (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Image r -> Image r -> Bool #

(/=) :: Image r -> Image r -> Bool #

Ord r => Ord (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: Image r -> Image r -> Ordering #

(<) :: Image r -> Image r -> Bool #

(<=) :: Image r -> Image r -> Bool #

(>) :: Image r -> Image r -> Bool #

(>=) :: Image r -> Image r -> Bool #

max :: Image r -> Image r -> Image r #

min :: Image r -> Image r -> Image r #

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Image r)) (NumType (Image r)) -> Image r -> Image r

type Dimension (Image r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Image r) = 2
type NumType (Image r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Image r) = r

imageData :: forall r. Lens' (Image r) () Source #

rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r)) Source #

Attributes

type Attributes' r = Attributes (AttrMapSym1 r) Source #

Attributes' :: Type -> [AttributeUniverse] -> Type

type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ... Source #

The mapping between the labels of the the attributes and the types of the + view, essentially matching the behaviour of ipe. In particular,

  • if the page does not have any layers, it creates a layer named "alpha", and
  • if the page does not have any views, it creates a view in which all layers are visible.

Content: Ipe Objects

data IpeObject r Source #

Instances

Instances details
Foldable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeObject m -> m #

foldMap :: Monoid m => (a -> m) -> IpeObject a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeObject a -> m #

foldr :: (a -> b -> b) -> b -> IpeObject a -> b #

foldr' :: (a -> b -> b) -> b -> IpeObject a -> b #

foldl :: (b -> a -> b) -> b -> IpeObject a -> b #

foldl' :: (b -> a -> b) -> b -> IpeObject a -> b #

foldr1 :: (a -> a -> a) -> IpeObject a -> a #

foldl1 :: (a -> a -> a) -> IpeObject a -> a #

toList :: IpeObject a -> [a] #

null :: IpeObject a -> Bool #

length :: IpeObject a -> Int #

elem :: Eq a => a -> IpeObject a -> Bool #

maximum :: Ord a => IpeObject a -> a #

minimum :: Ord a => IpeObject a -> a #

sum :: Num a => IpeObject a -> a #

product :: Num a => IpeObject a -> a #

Traversable IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeObject a -> f (IpeObject b) #

sequenceA :: Applicative f => IpeObject (f a) -> f (IpeObject a) #

mapM :: Monad m => (a -> m b) -> IpeObject a -> m (IpeObject b) #

sequence :: Monad m => IpeObject (m a) -> m (IpeObject a) #

Functor IpeObject Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeObject a -> IpeObject b #

(<$) :: a -> IpeObject b -> IpeObject a #

Show r => Show (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeObject r -> IpeObject r -> Bool #

(/=) :: IpeObject r -> IpeObject r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r)) -> IpeObject r -> IpeObject r

type Dimension (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeObject r) = 2
type NumType (IpeObject r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeObject r) = r

type IpeObject' g r = g r :+ IpeAttributes g r Source #

An IpeObject' is essentially the oject ogether with its attributes

ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r Source #

Shorthand for constructing ipeObjects

class ToObject i where Source #

Instances

Instances details
ToObject Group Source # 
Instance details

Defined in Ipe.Content

ToObject Image Source # 
Instance details

Defined in Ipe.Content

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Specific Ipe-Objects

newtype Path r Source #

A path is a non-empty sequence of PathSegments.

Constructors

Path (Seq (PathSegment r)) 

Instances

Instances details
Foldable Path Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => Path m -> m #

foldMap :: Monoid m => (a -> m) -> Path a -> m #

foldMap' :: Monoid m => (a -> m) -> Path a -> m #

foldr :: (a -> b -> b) -> b -> Path a -> b #

foldr' :: (a -> b -> b) -> b -> Path a -> b #

foldl :: (b -> a -> b) -> b -> Path a -> b #

foldl' :: (b -> a -> b) -> b -> Path a -> b #

foldr1 :: (a -> a -> a) -> Path a -> a #

foldl1 :: (a -> a -> a) -> Path a -> a #

toList :: Path a -> [a] #

null :: Path a -> Bool #

length :: Path a -> Int #

elem :: Eq a => a -> Path a -> Bool #

maximum :: Ord a => Path a -> a #

minimum :: Ord a => Path a -> a #

sum :: Num a => Path a -> a #

product :: Num a => Path a -> a #

Traversable Path Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> Path a -> f (Path b) #

sequenceA :: Applicative f => Path (f a) -> f (Path a) #

mapM :: Monad m => (a -> m b) -> Path a -> m (Path b) #

sequence :: Monad m => Path (m a) -> m (Path a) #

Functor Path Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> Path a -> Path b #

(<$) :: a -> Path b -> Path a #

ToObject Path Source # 
Instance details

Defined in Ipe.Content

Semigroup (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(<>) :: Path r -> Path r -> Path r #

sconcat :: NonEmpty (Path r) -> Path r #

stimes :: Integral b => b -> Path r -> Path r #

Show r => Show (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

showsPrec :: Int -> Path r -> ShowS #

show :: Path r -> String #

showList :: [Path r] -> ShowS #

Eq r => Eq (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

(==) :: Path r -> Path r -> Bool #

(/=) :: Path r -> Path r -> Bool #

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Path r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r

type Dimension (Path r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (Path r) = 2
type NumType (Path r) Source # 
Instance details

Defined in Ipe.Path

type NumType (Path r) = r

pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r)) Source #

data PathSegment r Source #

Paths

Paths consist of Path Segments. PathSegments come in the following forms:

Instances

Instances details
Foldable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fold :: Monoid m => PathSegment m -> m #

foldMap :: Monoid m => (a -> m) -> PathSegment a -> m #

foldMap' :: Monoid m => (a -> m) -> PathSegment a -> m #

foldr :: (a -> b -> b) -> b -> PathSegment a -> b #

foldr' :: (a -> b -> b) -> b -> PathSegment a -> b #

foldl :: (b -> a -> b) -> b -> PathSegment a -> b #

foldl' :: (b -> a -> b) -> b -> PathSegment a -> b #

foldr1 :: (a -> a -> a) -> PathSegment a -> a #

foldl1 :: (a -> a -> a) -> PathSegment a -> a #

toList :: PathSegment a -> [a] #

null :: PathSegment a -> Bool #

length :: PathSegment a -> Int #

elem :: Eq a => a -> PathSegment a -> Bool #

maximum :: Ord a => PathSegment a -> a #

minimum :: Ord a => PathSegment a -> a #

sum :: Num a => PathSegment a -> a #

product :: Num a => PathSegment a -> a #

Traversable PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

traverse :: Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) #

sequenceA :: Applicative f => PathSegment (f a) -> f (PathSegment a) #

mapM :: Monad m => (a -> m b) -> PathSegment a -> m (PathSegment b) #

sequence :: Monad m => PathSegment (m a) -> m (PathSegment a) #

Functor PathSegment Source # 
Instance details

Defined in Ipe.Path

Methods

fmap :: (a -> b) -> PathSegment a -> PathSegment b #

(<$) :: a -> PathSegment b -> PathSegment a #

Show r => Show (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Eq r => Eq (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

(Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty (PathSegment r)) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

Methods

transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r

type Dimension (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type Dimension (PathSegment r) = 2
type NumType (PathSegment r) Source # 
Instance details

Defined in Ipe.Path

type NumType (PathSegment r) = r

data IpeSymbol r Source #

Ipe Symbols, i.e. Points

A symbol (point) in ipe

Constructors

Symbol (Point 2 r) Text 

Instances

Instances details
Foldable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => IpeSymbol m -> m #

foldMap :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeSymbol a -> m #

foldr :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldr' :: (a -> b -> b) -> b -> IpeSymbol a -> b #

foldl :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldl' :: (b -> a -> b) -> b -> IpeSymbol a -> b #

foldr1 :: (a -> a -> a) -> IpeSymbol a -> a #

foldl1 :: (a -> a -> a) -> IpeSymbol a -> a #

toList :: IpeSymbol a -> [a] #

null :: IpeSymbol a -> Bool #

length :: IpeSymbol a -> Int #

elem :: Eq a => a -> IpeSymbol a -> Bool #

maximum :: Ord a => IpeSymbol a -> a #

minimum :: Ord a => IpeSymbol a -> a #

sum :: Num a => IpeSymbol a -> a #

product :: Num a => IpeSymbol a -> a #

Traversable IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> IpeSymbol a -> f (IpeSymbol b) #

sequenceA :: Applicative f => IpeSymbol (f a) -> f (IpeSymbol a) #

mapM :: Monad m => (a -> m b) -> IpeSymbol a -> m (IpeSymbol b) #

sequence :: Monad m => IpeSymbol (m a) -> m (IpeSymbol a) #

Functor IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> IpeSymbol a -> IpeSymbol b #

(<$) :: a -> IpeSymbol b -> IpeSymbol a #

ToObject IpeSymbol Source # 
Instance details

Defined in Ipe.Content

Show r => Show (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: IpeSymbol r -> IpeSymbol r -> Bool #

(/=) :: IpeSymbol r -> IpeSymbol r -> Bool #

Ord r => Ord (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r)) -> IpeSymbol r -> IpeSymbol r

type Dimension (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (IpeSymbol r) = 2
type NumType (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Content

type NumType (IpeSymbol r) = r

symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r) Source #

newtype Group r Source #

Groups and Objects

Group Attributes

A group is essentially a list of IpeObjects.

Constructors

Group [IpeObject r] 

Instances

Instances details
Foldable Group Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Group m -> m #

foldMap :: Monoid m => (a -> m) -> Group a -> m #

foldMap' :: Monoid m => (a -> m) -> Group a -> m #

foldr :: (a -> b -> b) -> b -> Group a -> b #

foldr' :: (a -> b -> b) -> b -> Group a -> b #

foldl :: (b -> a -> b) -> b -> Group a -> b #

foldl' :: (b -> a -> b) -> b -> Group a -> b #

foldr1 :: (a -> a -> a) -> Group a -> a #

foldl1 :: (a -> a -> a) -> Group a -> a #

toList :: Group a -> [a] #

null :: Group a -> Bool #

length :: Group a -> Int #

elem :: Eq a => a -> Group a -> Bool #

maximum :: Ord a => Group a -> a #

minimum :: Ord a => Group a -> a #

sum :: Num a => Group a -> a #

product :: Num a => Group a -> a #

Traversable Group Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Group a -> f (Group b) #

sequenceA :: Applicative f => Group (f a) -> f (Group a) #

mapM :: Monad m => (a -> m b) -> Group a -> m (Group b) #

sequence :: Monad m => Group (m a) -> m (Group a) #

Functor Group Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Group a -> Group b #

(<$) :: a -> Group b -> Group a #

ToObject Group Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Group r -> ShowS #

show :: Group r -> String #

showList :: [Group r] -> ShowS #

Eq r => Eq (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Group r -> Group r -> Bool #

(/=) :: Group r -> Group r -> Bool #

HasDefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

Associated Types

type DefaultIpeOut (Group r) :: Type -> Type Source #

Methods

defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) Source #

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Group r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Group r)) (NumType (Group r)) -> Group r -> Group r

type DefaultIpeOut (Group r) Source # 
Instance details

Defined in Ipe.IpeOut

type Dimension (Group r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Group r) = 2
type NumType (Group r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Group r) = r

data TextLabel r Source #

Text Objects

A text label

Constructors

Label Text (Point 2 r) 

Instances

Instances details
Foldable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => TextLabel m -> m #

foldMap :: Monoid m => (a -> m) -> TextLabel a -> m #

foldMap' :: Monoid m => (a -> m) -> TextLabel a -> m #

foldr :: (a -> b -> b) -> b -> TextLabel a -> b #

foldr' :: (a -> b -> b) -> b -> TextLabel a -> b #

foldl :: (b -> a -> b) -> b -> TextLabel a -> b #

foldl' :: (b -> a -> b) -> b -> TextLabel a -> b #

foldr1 :: (a -> a -> a) -> TextLabel a -> a #

foldl1 :: (a -> a -> a) -> TextLabel a -> a #

toList :: TextLabel a -> [a] #

null :: TextLabel a -> Bool #

length :: TextLabel a -> Int #

elem :: Eq a => a -> TextLabel a -> Bool #

maximum :: Ord a => TextLabel a -> a #

minimum :: Ord a => TextLabel a -> a #

sum :: Num a => TextLabel a -> a #

product :: Num a => TextLabel a -> a #

Traversable TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> TextLabel a -> f (TextLabel b) #

sequenceA :: Applicative f => TextLabel (f a) -> f (TextLabel a) #

mapM :: Monad m => (a -> m b) -> TextLabel a -> m (TextLabel b) #

sequence :: Monad m => TextLabel (m a) -> m (TextLabel a) #

Functor TextLabel Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> TextLabel a -> TextLabel b #

(<$) :: a -> TextLabel b -> TextLabel a #

ToObject TextLabel Source # 
Instance details

Defined in Ipe.Content

Show r => Show (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Eq r => Eq (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: TextLabel r -> TextLabel r -> Bool #

(/=) :: TextLabel r -> TextLabel r -> Bool #

Ord r => Ord (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r)) -> TextLabel r -> TextLabel r

type Dimension (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (TextLabel r) = 2
type NumType (TextLabel r) Source # 
Instance details

Defined in Ipe.Content

type NumType (TextLabel r) = r

data MiniPage r Source #

A Minipage

Constructors

MiniPage Text (Point 2 r) r 

Instances

Instances details
Foldable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => MiniPage m -> m #

foldMap :: Monoid m => (a -> m) -> MiniPage a -> m #

foldMap' :: Monoid m => (a -> m) -> MiniPage a -> m #

foldr :: (a -> b -> b) -> b -> MiniPage a -> b #

foldr' :: (a -> b -> b) -> b -> MiniPage a -> b #

foldl :: (b -> a -> b) -> b -> MiniPage a -> b #

foldl' :: (b -> a -> b) -> b -> MiniPage a -> b #

foldr1 :: (a -> a -> a) -> MiniPage a -> a #

foldl1 :: (a -> a -> a) -> MiniPage a -> a #

toList :: MiniPage a -> [a] #

null :: MiniPage a -> Bool #

length :: MiniPage a -> Int #

elem :: Eq a => a -> MiniPage a -> Bool #

maximum :: Ord a => MiniPage a -> a #

minimum :: Ord a => MiniPage a -> a #

sum :: Num a => MiniPage a -> a #

product :: Num a => MiniPage a -> a #

Traversable MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> MiniPage a -> f (MiniPage b) #

sequenceA :: Applicative f => MiniPage (f a) -> f (MiniPage a) #

mapM :: Monad m => (a -> m b) -> MiniPage a -> m (MiniPage b) #

sequence :: Monad m => MiniPage (m a) -> m (MiniPage a) #

Functor MiniPage Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> MiniPage a -> MiniPage b #

(<$) :: a -> MiniPage b -> MiniPage a #

ToObject MiniPage Source # 
Instance details

Defined in Ipe.Content

Show r => Show (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> MiniPage r -> ShowS #

show :: MiniPage r -> String #

showList :: [MiniPage r] -> ShowS #

Eq r => Eq (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: MiniPage r -> MiniPage r -> Bool #

(/=) :: MiniPage r -> MiniPage r -> Bool #

Ord r => Ord (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: MiniPage r -> MiniPage r -> Ordering #

(<) :: MiniPage r -> MiniPage r -> Bool #

(<=) :: MiniPage r -> MiniPage r -> Bool #

(>) :: MiniPage r -> MiniPage r -> Bool #

(>=) :: MiniPage r -> MiniPage r -> Bool #

max :: MiniPage r -> MiniPage r -> MiniPage r #

min :: MiniPage r -> MiniPage r -> MiniPage r #

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r)) -> MiniPage r -> MiniPage r

type Dimension (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (MiniPage r) = 2
type NumType (MiniPage r) Source # 
Instance details

Defined in Ipe.Content

type NumType (MiniPage r) = r

data Image r Source #

Image Objects

Constructors

Image () (Rectangle (Point 2 r)) 

Instances

Instances details
Foldable Image Source # 
Instance details

Defined in Ipe.Content

Methods

fold :: Monoid m => Image m -> m #

foldMap :: Monoid m => (a -> m) -> Image a -> m #

foldMap' :: Monoid m => (a -> m) -> Image a -> m #

foldr :: (a -> b -> b) -> b -> Image a -> b #

foldr' :: (a -> b -> b) -> b -> Image a -> b #

foldl :: (b -> a -> b) -> b -> Image a -> b #

foldl' :: (b -> a -> b) -> b -> Image a -> b #

foldr1 :: (a -> a -> a) -> Image a -> a #

foldl1 :: (a -> a -> a) -> Image a -> a #

toList :: Image a -> [a] #

null :: Image a -> Bool #

length :: Image a -> Int #

elem :: Eq a => a -> Image a -> Bool #

maximum :: Ord a => Image a -> a #

minimum :: Ord a => Image a -> a #

sum :: Num a => Image a -> a #

product :: Num a => Image a -> a #

Traversable Image Source # 
Instance details

Defined in Ipe.Content

Methods

traverse :: Applicative f => (a -> f b) -> Image a -> f (Image b) #

sequenceA :: Applicative f => Image (f a) -> f (Image a) #

mapM :: Monad m => (a -> m b) -> Image a -> m (Image b) #

sequence :: Monad m => Image (m a) -> m (Image a) #

Functor Image Source # 
Instance details

Defined in Ipe.Content

Methods

fmap :: (a -> b) -> Image a -> Image b #

(<$) :: a -> Image b -> Image a #

ToObject Image Source # 
Instance details

Defined in Ipe.Content

Show r => Show (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

showsPrec :: Int -> Image r -> ShowS #

show :: Image r -> String #

showList :: [Image r] -> ShowS #

Eq r => Eq (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

(==) :: Image r -> Image r -> Bool #

(/=) :: Image r -> Image r -> Bool #

Ord r => Ord (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

compare :: Image r -> Image r -> Ordering #

(<) :: Image r -> Image r -> Bool #

(<=) :: Image r -> Image r -> Bool #

(>) :: Image r -> Image r -> Bool #

(>=) :: Image r -> Image r -> Bool #

max :: Image r -> Image r -> Image r #

min :: Image r -> Image r -> Image r #

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

Fractional r => IsTransformable (Image r) Source # 
Instance details

Defined in Ipe.Content

Methods

transformBy :: Transformation (Dimension (Image r)) (NumType (Image r)) -> Image r -> Image r

type Dimension (Image r) Source # 
Instance details

Defined in Ipe.Content

type Dimension (Image r) = 2
type NumType (Image r) Source # 
Instance details

Defined in Ipe.Content

type NumType (Image r) = r

imageData :: forall r. Lens' (Image r) () Source #

rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r)) Source #

Attributes

type Attributes' r = Attributes (AttrMapSym1 r) Source #

Attributes' :: Type -> [AttributeUniverse] -> Type

type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ... Source #

The mapping between the labels of the the attributes and the types of the attributes with these labels. For example, the Matrix label/attribute should - have a value of type 'Matrix 3 3 r'.

data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type Source #

Instances

Instances details
SuppressUnusedWarnings (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679248458 :: TyFun AttributeUniverse Type -> Type) (a6989586621679248459 :: AttributeUniverse) = AttrMap a6989586621679248458 a6989586621679248459

traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s) Source #

traverse for ipe attributes

Layers and Views

newtype LayerName Source #

Defines an Layer in Ipe.

Constructors

LayerName Text 

Instances

Instances details
IsString LayerName Source # 
Instance details

Defined in Ipe.Layer

Read LayerName Source # 
Instance details

Defined in Ipe.Layer

Show LayerName Source # 
Instance details

Defined in Ipe.Layer

Eq LayerName Source # 
Instance details

Defined in Ipe.Layer

Ord LayerName Source # 
Instance details

Defined in Ipe.Layer

IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

data View Source #

The definition of a view - make active layer into an index ?

Constructors

View [LayerName] LayerName 

Instances

Instances details
Show View Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> View -> ShowS #

show :: View -> String #

showList :: [View] -> ShowS #

Eq View Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: View -> View -> Bool #

(/=) :: View -> View -> Bool #

Ord View Source # 
Instance details

Defined in Ipe.Types

Methods

compare :: View -> View -> Ordering #

(<) :: View -> View -> Bool #

(<=) :: View -> View -> Bool #

(>) :: View -> View -> Bool #

(>=) :: View -> View -> Bool #

max :: View -> View -> View #

min :: View -> View -> View #

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

Ipe Syles and Preamble

data IpeStyle Source #

for now we pretty much ignore these

Constructors

IpeStyle (Maybe Text) (Node Text Text) 

Instances

Instances details
Show IpeStyle Source # 
Instance details

Defined in Ipe.Types

Eq IpeStyle Source # 
Instance details

Defined in Ipe.Types

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

basicIpeStyle :: IpeStyle Source #

The "basic" ipe stylesheet

data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type Source #

Instances

Instances details
SuppressUnusedWarnings (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) Source # 
Instance details

Defined in Ipe.Content

type Apply (AttrMapSym1 a6989586621679250061 :: TyFun AttributeUniverse Type -> Type) (a6989586621679250062 :: AttributeUniverse) = AttrMap a6989586621679250061 a6989586621679250062

traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s) Source #

traverse for ipe attributes

Layers and Views

newtype LayerName Source #

Defines an Layer in Ipe.

Constructors

LayerName Text 

Instances

Instances details
IsString LayerName Source # 
Instance details

Defined in Ipe.Layer

Read LayerName Source # 
Instance details

Defined in Ipe.Layer

Show LayerName Source # 
Instance details

Defined in Ipe.Layer

Eq LayerName Source # 
Instance details

Defined in Ipe.Layer

Ord LayerName Source # 
Instance details

Defined in Ipe.Layer

IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeReadText LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

data View Source #

The definition of a view + make active layer into an index ?

Constructors

View [LayerName] LayerName 

Instances

Instances details
Show View Source # 
Instance details

Defined in Ipe.Types

Methods

showsPrec :: Int -> View -> ShowS #

show :: View -> String #

showList :: [View] -> ShowS #

Eq View Source # 
Instance details

Defined in Ipe.Types

Methods

(==) :: View -> View -> Bool #

(/=) :: View -> View -> Bool #

Ord View Source # 
Instance details

Defined in Ipe.Types

Methods

compare :: View -> View -> Ordering #

(<) :: View -> View -> Bool #

(<=) :: View -> View -> Bool #

(>) :: View -> View -> Bool #

(>=) :: View -> View -> Bool #

max :: View -> View -> View #

min :: View -> View -> View #

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

Ipe Syles and Preamble

data IpeStyle Source #

for now we pretty much ignore these

Constructors

IpeStyle (Maybe Text) (Node Text Text) 

Instances

Instances details
Show IpeStyle Source # 
Instance details

Defined in Ipe.Types

Eq IpeStyle Source # 
Instance details

Defined in Ipe.Types

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

basicIpeStyle :: IpeStyle Source #

The "basic" ipe stylesheet

opacitiesStyle :: IpeStyle Source #

A stylesheet with some convenient predefined opacities. In particular the opacities "10%","20%",..,"90%".

readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle) Source #

Reads an Ipe stylesheet from Disk.

addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r Source #

Adds a stylesheet to the ipe file. This will be the first stylesheet, i.e. it has priority over all previously imported stylesheets.

addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r) Source #

Given a path to a stylesheet, add it to the ipe file with the - highest priority. Throws an error when this fails.

data IpePreamble Source #

The maybe string is the encoding

Constructors

IpePreamble (Maybe Text) Text 

Reading Geometries *From* Ipe

class IpeRead t where Source #

Reading an ipe lement from Xml

Instances

Instances details
IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

Converting *from* IpeObjects

_asPoint :: Prism' (IpeSymbol r) (Point 2 r) Source #

Extracts the point from a Symbol. When creating a symbol this + highest priority. Throws an error when this fails.

data IpePreamble Source #

The maybe string is the encoding

Constructors

IpePreamble (Maybe Text) Text 

Reading Geometries *From* Ipe

class IpeRead t where Source #

Reading an ipe lement from Xml

Instances

Instances details
IpeRead LayerName Source # 
Instance details

Defined in Ipe.Reader

IpeRead IpeStyle Source # 
Instance details

Defined in Ipe.Reader

IpeRead View Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (Group r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (Image r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (IpeSymbol r) Source #

Ipe read instances

Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (MiniPage r) Source # 
Instance details

Defined in Ipe.Reader

Coordinate r => IpeRead (TextLabel r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Fractional r, Eq r) => IpeRead (Path r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpeFile r) Source # 
Instance details

Defined in Ipe.Reader

(Coordinate r, Eq r) => IpeRead (IpePage r) Source # 
Instance details

Defined in Ipe.Reader

Converting *from* IpeObjects

_asPoint :: Prism' (IpeSymbol r) (Point 2 r) Source #

Extracts the point from a Symbol. When creating a symbol this creates a disk that supports a stroke color.

_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r)) Source #

Try to convert a path into a line segment, fails if the path is not a line segment or a polyline with more than two points.

_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r)) Source #

Try to convert a path into a line segment, fails if the path is not a line segment or a polyline with more than two points.

_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r)) Source #

Tries to convert a path into a rectangle.

_asTriangle :: Prism' (Path r) (Triangle (Point 2 r)) Source #

Convert to a triangle

_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r)) Source #

Convert to a polyline. Ignores all non-polyline parts

>>> testPath ^? _asPolyLine
@@ -31,5 +31,5 @@
 Just (PolyLine [Point2 0 0,Point2 10 10,Point2 200 100] :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "red"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr})
 

Default readers

class HasDefaultFromIpe g where Source #

Associated Types

type DefaultFromIpe g :: Type -> Type Source #

Methods

defaultFromIpe :: r ~ NumType g => Prism' (IpeObject r) (g :+ IpeAttributes (DefaultFromIpe g) r) Source #

Instances

Instances details
HasDefaultFromIpe (PolyLine (Point 2 r)) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (PolyLine (Point 2 r)) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (PolyLine (Point 2 r)) => Prism' (IpeObject r0) (PolyLine (Point 2 r) :+ IpeAttributes (DefaultFromIpe (PolyLine (Point 2 r))) r0) Source #

HasDefaultFromIpe (SimplePolygon (Point 2 r)) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (SimplePolygon (Point 2 r)) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (SimplePolygon (Point 2 r)) => Prism' (IpeObject r0) (SimplePolygon (Point 2 r) :+ IpeAttributes (DefaultFromIpe (SimplePolygon (Point 2 r))) r0) Source #

(Radical r, Eq r) => HasDefaultFromIpe (Circle (Point 2 r)) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (Circle (Point 2 r)) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (Circle (Point 2 r)) => Prism' (IpeObject r0) (Circle (Point 2 r) :+ IpeAttributes (DefaultFromIpe (Circle (Point 2 r))) r0) Source #

(Radical r, Eq r) => HasDefaultFromIpe (Disk (Point 2 r)) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (Disk (Point 2 r)) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (Disk (Point 2 r)) => Prism' (IpeObject r0) (Disk (Point 2 r) :+ IpeAttributes (DefaultFromIpe (Disk (Point 2 r))) r0) Source #

(Num r, Ord r) => HasDefaultFromIpe (Rectangle (Point 2 r)) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (Rectangle (Point 2 r)) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (Rectangle (Point 2 r)) => Prism' (IpeObject r0) (Rectangle (Point 2 r) :+ IpeAttributes (DefaultFromIpe (Rectangle (Point 2 r))) r0) Source #

HasDefaultFromIpe (Ellipse r) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (Ellipse r) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (Ellipse r) => Prism' (IpeObject r0) (Ellipse r :+ IpeAttributes (DefaultFromIpe (Ellipse r)) r0) Source #

HasDefaultFromIpe (ClosedLineSegment (Point 2 r)) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (ClosedLineSegment (Point 2 r)) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (ClosedLineSegment (Point 2 r)) => Prism' (IpeObject r0) (ClosedLineSegment (Point 2 r) :+ IpeAttributes (DefaultFromIpe (ClosedLineSegment (Point 2 r))) r0) Source #

HasDefaultFromIpe (LineSegment AnEndPoint (Point 2 r)) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (LineSegment AnEndPoint (Point 2 r)) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (LineSegment AnEndPoint (Point 2 r)) => Prism' (IpeObject r0) (LineSegment AnEndPoint (Point 2 r) :+ IpeAttributes (DefaultFromIpe (LineSegment AnEndPoint (Point 2 r))) r0) Source #

HasDefaultFromIpe (Point 2 r) Source # 
Instance details

Defined in Ipe.FromIpe

Associated Types

type DefaultFromIpe (Point 2 r) :: Type -> Type Source #

Methods

defaultFromIpe :: r0 ~ NumType (Point 2 r) => Prism' (IpeObject r0) (Point 2 r :+ IpeAttributes (DefaultFromIpe (Point 2 r)) r0) Source #

Converting *to* IpeObjects

IpeWrite

class IpeWrite t where Source #

Types that correspond to an XML Element. All instances should produce an Element. If the type should produce a Node with the Text constructor, use - the IpeWriteText typeclass instead.

Methods

ipeWrite :: t -> Maybe (Node Text Text) Source #

Instances

Instances details
IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpePreamble Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

IpeWrite () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: () -> Maybe (Node Text Text) Source #

IpeWrite t => IpeWrite (NonEmpty t) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWrite t => IpeWrite [t] Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: [t] -> Maybe (Node Text Text) Source #

(IpeWrite l, IpeWrite r) => IpeWrite (Either l r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Either l r -> Maybe (Node Text Text) Source #

(IpeWriteText r, EndPoint_ (endPoint point), IxValue (endPoint point) ~ point, Vertex (LineSegment endPoint point) ~ point, Point_ point 2 r) => IpeWrite (LineSegment endPoint point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: LineSegment endPoint point -> Maybe (Node Text Text) Source #

(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

(IpeWriteText r, Point_ point 2 r, Functor f, Foldable1 f) => IpeWrite (PolyLineF f point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: PolyLineF f point -> Maybe (Node Text Text) Source #

class IpeWriteText t where Source #

For types that can produce a text value

Methods

ipeWriteText :: t -> Maybe Text Source #

Instances

Instances details
IpeWriteText FillType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText PinType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText TransformationTypes Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText VerticalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Text Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText String Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Integer Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: () -> Maybe Text Source #

IpeWriteText Double Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Float Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Int Source # 
Instance details

Defined in Ipe.Writer

Integral a => IpeWriteText (Ratio a) Source #

This instance converts the ratio to a Pico, and then displays that.

Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (RGB r) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (CubicBezier point) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (PolyLine point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: PolyLine point -> Maybe Text Source #

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (SimplePolygon point) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeDash r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpePen r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeSize r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Operation r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText v => IpeWriteText (IpeValue v) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText (RealNumber p) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText l, IpeWriteText r) => IpeWriteText (Either l r) Source # 
Instance details

Defined in Ipe.Writer

HasResolution p => IpeWriteText (Fixed p) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Point 2 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Point 2 r -> Maybe Text Source #

IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Attr f at -> Maybe Text Source #

IpeWriteText r => IpeWriteText (Matrix 3 3 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Matrix 3 3 r -> Maybe Text Source #

IpeOut

module Ipe.IpeOut

Batch reexports

module Ipe.Value

newtype IpeColor r Source #

Defines a color in Ipe. Colors are either RGB Values or Named - values.

Constructors

IpeColor (IpeValue (RGB r)) 

Instances

Instances details
Foldable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fold :: Monoid m => IpeColor m -> m #

foldMap :: Monoid m => (a -> m) -> IpeColor a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeColor a -> m #

foldr :: (a -> b -> b) -> b -> IpeColor a -> b #

foldr' :: (a -> b -> b) -> b -> IpeColor a -> b #

foldl :: (b -> a -> b) -> b -> IpeColor a -> b #

foldl' :: (b -> a -> b) -> b -> IpeColor a -> b #

foldr1 :: (a -> a -> a) -> IpeColor a -> a #

foldl1 :: (a -> a -> a) -> IpeColor a -> a #

toList :: IpeColor a -> [a] #

null :: IpeColor a -> Bool #

length :: IpeColor a -> Int #

elem :: Eq a => a -> IpeColor a -> Bool #

maximum :: Ord a => IpeColor a -> a #

minimum :: Ord a => IpeColor a -> a #

sum :: Num a => IpeColor a -> a #

product :: Num a => IpeColor a -> a #

Traversable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

traverse :: Applicative f => (a -> f b) -> IpeColor a -> f (IpeColor b) #

sequenceA :: Applicative f => IpeColor (f a) -> f (IpeColor a) #

mapM :: Monad m => (a -> m b) -> IpeColor a -> m (IpeColor b) #

sequence :: Monad m => IpeColor (m a) -> m (IpeColor a) #

Functor IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fmap :: (a -> b) -> IpeColor a -> IpeColor b #

(<$) :: a -> IpeColor b -> IpeColor a #

Read r => Read (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Show r => Show (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

showsPrec :: Int -> IpeColor r -> ShowS #

show :: IpeColor r -> String #

showList :: [IpeColor r] -> ShowS #

Eq r => Eq (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

(==) :: IpeColor r -> IpeColor r -> Bool #

(/=) :: IpeColor r -> IpeColor r -> Bool #

Ord r => Ord (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

compare :: IpeColor r -> IpeColor r -> Ordering #

(<) :: IpeColor r -> IpeColor r -> Bool #

(<=) :: IpeColor r -> IpeColor r -> Bool #

(>) :: IpeColor r -> IpeColor r -> Bool #

(>=) :: IpeColor r -> IpeColor r -> Bool #

max :: IpeColor r -> IpeColor r -> IpeColor r #

min :: IpeColor r -> IpeColor r -> IpeColor r #

Coordinate r => IpeReadText (IpeColor r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

named :: Text -> IpeColor r Source #

Creates a named color

\ No newline at end of file + the IpeWriteText typeclass instead.

Methods

ipeWrite :: t -> Maybe (Node Text Text) Source #

Instances

Instances details
IpeWrite LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpePreamble Source # 
Instance details

Defined in Ipe.Writer

IpeWrite IpeStyle Source # 
Instance details

Defined in Ipe.Writer

IpeWrite View Source # 
Instance details

Defined in Ipe.Writer

IpeWrite () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: () -> Maybe (Node Text Text) Source #

IpeWrite t => IpeWrite (NonEmpty t) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Group r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Image r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeObject r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpeSymbol r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (MiniPage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (TextLabel r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (Path r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Path r -> Maybe (Node Text Text) Source #

IpeWriteText r => IpeWrite (IpeFile r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWrite (IpePage r) Source # 
Instance details

Defined in Ipe.Writer

IpeWrite t => IpeWrite [t] Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: [t] -> Maybe (Node Text Text) Source #

(IpeWrite l, IpeWrite r) => IpeWrite (Either l r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: Either l r -> Maybe (Node Text Text) Source #

(IpeWriteText r, EndPoint_ (endPoint point), IxValue (endPoint point) ~ point, Vertex (LineSegment endPoint point) ~ point, Point_ point 2 r) => IpeWrite (LineSegment endPoint point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: LineSegment endPoint point -> Maybe (Node Text Text) Source #

(AllConstrained IpeAttrName rs, RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, RecAll (Attr f) rs IpeWriteText, IpeWrite g) => IpeWrite (g :+ Attributes f rs) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: (g :+ Attributes f rs) -> Maybe (Node Text Text) Source #

(IpeWriteText r, Point_ point 2 r, Functor f, Foldable1 f) => IpeWrite (PolyLineF f point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWrite :: PolyLineF f point -> Maybe (Node Text Text) Source #

class IpeWriteText t where Source #

For types that can produce a text value

Methods

ipeWriteText :: t -> Maybe Text Source #

Instances

Instances details
IpeWriteText FillType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText HorizontalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText PinType Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText TransformationTypes Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText VerticalAlignment Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText LayerName Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Text Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText String Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Integer Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText () Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: () -> Maybe Text Source #

IpeWriteText Double Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Float Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText Int Source # 
Instance details

Defined in Ipe.Writer

Integral a => IpeWriteText (Ratio a) Source #

This instance converts the ratio to a Pico, and then displays that.

Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (RGB r) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (CubicBezier point) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (PolyLine point) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: PolyLine point -> Maybe Text Source #

(IpeWriteText r, Point_ point 2 r) => IpeWriteText (SimplePolygon point) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeArrow r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeDash r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpePen r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeSize r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Operation r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Path r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (PathSegment r) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText v => IpeWriteText (IpeValue v) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText (RealNumber p) Source # 
Instance details

Defined in Ipe.Writer

(IpeWriteText l, IpeWriteText r) => IpeWriteText (Either l r) Source # 
Instance details

Defined in Ipe.Writer

HasResolution p => IpeWriteText (Fixed p) Source # 
Instance details

Defined in Ipe.Writer

IpeWriteText r => IpeWriteText (Point 2 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Point 2 r -> Maybe Text Source #

IpeWriteText (Apply f at) => IpeWriteText (Attr f at) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Attr f at -> Maybe Text Source #

IpeWriteText r => IpeWriteText (Matrix 3 3 r) Source # 
Instance details

Defined in Ipe.Writer

Methods

ipeWriteText :: Matrix 3 3 r -> Maybe Text Source #

IpeOut

module Ipe.IpeOut

Batch reexports

module Ipe.Value

newtype IpeColor r Source #

Defines a color in Ipe. Colors are either RGB Values or Named + values.

Constructors

IpeColor (IpeValue (RGB r)) 

Instances

Instances details
Foldable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fold :: Monoid m => IpeColor m -> m #

foldMap :: Monoid m => (a -> m) -> IpeColor a -> m #

foldMap' :: Monoid m => (a -> m) -> IpeColor a -> m #

foldr :: (a -> b -> b) -> b -> IpeColor a -> b #

foldr' :: (a -> b -> b) -> b -> IpeColor a -> b #

foldl :: (b -> a -> b) -> b -> IpeColor a -> b #

foldl' :: (b -> a -> b) -> b -> IpeColor a -> b #

foldr1 :: (a -> a -> a) -> IpeColor a -> a #

foldl1 :: (a -> a -> a) -> IpeColor a -> a #

toList :: IpeColor a -> [a] #

null :: IpeColor a -> Bool #

length :: IpeColor a -> Int #

elem :: Eq a => a -> IpeColor a -> Bool #

maximum :: Ord a => IpeColor a -> a #

minimum :: Ord a => IpeColor a -> a #

sum :: Num a => IpeColor a -> a #

product :: Num a => IpeColor a -> a #

Traversable IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

traverse :: Applicative f => (a -> f b) -> IpeColor a -> f (IpeColor b) #

sequenceA :: Applicative f => IpeColor (f a) -> f (IpeColor a) #

mapM :: Monad m => (a -> m b) -> IpeColor a -> m (IpeColor b) #

sequence :: Monad m => IpeColor (m a) -> m (IpeColor a) #

Functor IpeColor Source # 
Instance details

Defined in Ipe.Color

Methods

fmap :: (a -> b) -> IpeColor a -> IpeColor b #

(<$) :: a -> IpeColor b -> IpeColor a #

Read r => Read (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Show r => Show (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

showsPrec :: Int -> IpeColor r -> ShowS #

show :: IpeColor r -> String #

showList :: [IpeColor r] -> ShowS #

Eq r => Eq (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

(==) :: IpeColor r -> IpeColor r -> Bool #

(/=) :: IpeColor r -> IpeColor r -> Bool #

Ord r => Ord (IpeColor r) Source # 
Instance details

Defined in Ipe.Color

Methods

compare :: IpeColor r -> IpeColor r -> Ordering #

(<) :: IpeColor r -> IpeColor r -> Bool #

(<=) :: IpeColor r -> IpeColor r -> Bool #

(>) :: IpeColor r -> IpeColor r -> Bool #

(>=) :: IpeColor r -> IpeColor r -> Bool #

max :: IpeColor r -> IpeColor r -> IpeColor r #

min :: IpeColor r -> IpeColor r -> IpeColor r #

Coordinate r => IpeReadText (IpeColor r) Source # 
Instance details

Defined in Ipe.Reader

IpeWriteText r => IpeWriteText (IpeColor r) Source # 
Instance details

Defined in Ipe.Writer

named :: Text -> IpeColor r Source #

Creates a named color

\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/doc-index.json b/haddocks/hgeometry/ipe/doc-index.json index e215a8d04..735adfc5f 100644 --- a/haddocks/hgeometry/ipe/doc-index.json +++ b/haddocks/hgeometry/ipe/doc-index.json @@ -1 +1 @@ -[{"display_html":"ipeRenderWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeRenderWith","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#v:ipeRenderWith"},{"display_html":"ipeRender :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeRender","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#v:ipeRender"},{"display_html":"data FileType","name":"FileType SVG PDF PNG EPS","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:FileType"},{"display_html":"data Options = Options {}","name":"Options crop viewNumber pageNumber transparent resolution Options","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#v:defaultOptions"},{"display_html":"data Background","name":"Background OpaqueBackground TransparentBackground","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:Background"},{"display_html":"data Crop","name":"Crop Crop NoCrop","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:Crop"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Layer","link":"Ipe-Layer.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Layer","link":"Ipe-Layer.html#v:layerName"},{"display_html":"literally :: String -> Q Exp","name":"literally","module":"Ipe.Literal","link":"Ipe-Literal.html#v:literally"},{"display_html":"lit :: QuasiQuoter","name":"lit","module":"Ipe.Literal","link":"Ipe-Literal.html#v:lit"},{"display_html":"litFile :: QuasiQuoter","name":"litFile","module":"Ipe.Literal","link":"Ipe-Literal.html#v:litFile"},{"display_html":"xmlLiteral :: String -> Node Text Text","name":"xmlLiteral","module":"Ipe.Literal","link":"Ipe-Literal.html#v:xmlLiteral"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Path","link":"Ipe-Path.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Path","link":"Ipe-Path.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Path","link":"Ipe-Path.html#t:PathSegment"},{"display_html":"_PolyLineSegment :: forall r. Prism' (PathSegment r) (PolyLine (Point 2 r))","name":"_PolyLineSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_PolyLineSegment"},{"display_html":"_PolygonPath :: forall r. Prism' (PathSegment r) (SimplePolygon (Point 2 r))","name":"_PolygonPath","module":"Ipe.Path","link":"Ipe-Path.html#v:_PolygonPath"},{"display_html":"_CubicBezierSegment :: forall r. Prism' (PathSegment r) (CubicBezier (Point 2 r))","name":"_CubicBezierSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_CubicBezierSegment"},{"display_html":"_QuadraticBezierSegment :: forall r. Prism' (PathSegment r) (QuadraticBezier (Point 2 r))","name":"_QuadraticBezierSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_QuadraticBezierSegment"},{"display_html":"_EllipseSegment :: forall r. Prism' (PathSegment r) (Ellipse r)","name":"_EllipseSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_EllipseSegment"},{"display_html":"_ArcSegment :: forall r. Prism' (PathSegment r) ()","name":"_ArcSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_ArcSegment"},{"display_html":"_SplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_SplineSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_SplineSegment"},{"display_html":"_ClosedSplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_ClosedSplineSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_ClosedSplineSegment"},{"display_html":"data Operation r","name":"Operation Ellipse MoveTo LineTo ArcTo Spline ClosedSpline ClosePath CurveTo QCurveTo","module":"Ipe.Path","link":"Ipe-Path.html#t:Operation"},{"display_html":"_MoveTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_MoveTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_MoveTo"},{"display_html":"_LineTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_LineTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_LineTo"},{"display_html":"_CurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r, Point 2 r)","name":"_CurveTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_CurveTo"},{"display_html":"_QCurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r)","name":"_QCurveTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_QCurveTo"},{"display_html":"_Ellipse :: forall r. Prism' (Operation r) (Matrix 3 3 r)","name":"_Ellipse","module":"Ipe.Path","link":"Ipe-Path.html#v:_Ellipse"},{"display_html":"_ArcTo :: forall r. Prism' (Operation r) (Matrix 3 3 r, Point 2 r)","name":"_ArcTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_ArcTo"},{"display_html":"_Spline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_Spline","module":"Ipe.Path","link":"Ipe-Path.html#v:_Spline"},{"display_html":"_ClosedSpline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_ClosedSpline","module":"Ipe.Path","link":"Ipe-Path.html#v:_ClosedSpline"},{"display_html":"_ClosePath :: forall r. Prism' (Operation r) ()","name":"_ClosePath","module":"Ipe.Path","link":"Ipe-Path.html#v:_ClosePath"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.PathParser","link":"Ipe-PathParser.html#t:Coordinate"},{"display_html":"readCoordinate :: Coordinate r => Text -> Either Text r","name":"readCoordinate","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readCoordinate"},{"display_html":"readPoint :: Coordinate r => Text -> Either Text (Point 2 r)","name":"readPoint","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readPoint"},{"display_html":"readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r)","name":"readMatrix","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readMatrix"},{"display_html":"readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r))","name":"readRectangle","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readRectangle"},{"display_html":"runParser :: Parser a -> Text -> Either Text a","name":"runParser","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:runParser"},{"display_html":"readPathOperations :: Coordinate r => Text -> Either Text [Operation r]","name":"readPathOperations","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readPathOperations"},{"display_html":"pOperation :: forall r. Coordinate r => Parser (Operation r)","name":"pOperation","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:pOperation"},{"display_html":"pPoint :: Coordinate r => Parser (Point 2 r)","name":"pPoint","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:pPoint"},{"display_html":"pCoordinate :: Coordinate r => Parser r","name":"pCoordinate","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:pCoordinate"},{"display_html":"data IpeValue v","name":"IpeValue Valued Named","module":"Ipe.Value","link":"Ipe-Value.html#t:IpeValue"},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe.Color","link":"Ipe-Color.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe.Color","link":"Ipe-Color.html#v:named"},{"display_html":"basicNamedColors :: [IpeColor r]","name":"basicNamedColors","module":"Ipe.Color","link":"Ipe-Color.html#v:basicNamedColors"},{"display_html":"black :: IpeColor r","name":"black","module":"Ipe.Color","link":"Ipe-Color.html#v:black"},{"display_html":"white :: IpeColor r","name":"white","module":"Ipe.Color","link":"Ipe-Color.html#v:white"},{"display_html":"red :: IpeColor r","name":"red","module":"Ipe.Color","link":"Ipe-Color.html#v:red"},{"display_html":"green :: IpeColor r","name":"green","module":"Ipe.Color","link":"Ipe-Color.html#v:green"},{"display_html":"blue :: IpeColor r","name":"blue","module":"Ipe.Color","link":"Ipe-Color.html#v:blue"},{"display_html":"yellow :: IpeColor r","name":"yellow","module":"Ipe.Color","link":"Ipe-Color.html#v:yellow"},{"display_html":"orange :: IpeColor r","name":"orange","module":"Ipe.Color","link":"Ipe-Color.html#v:orange"},{"display_html":"gold :: IpeColor r","name":"gold","module":"Ipe.Color","link":"Ipe-Color.html#v:gold"},{"display_html":"purple :: IpeColor r","name":"purple","module":"Ipe.Color","link":"Ipe-Color.html#v:purple"},{"display_html":"gray :: IpeColor r","name":"gray","module":"Ipe.Color","link":"Ipe-Color.html#v:gray"},{"display_html":"brown :: IpeColor r","name":"brown","module":"Ipe.Color","link":"Ipe-Color.html#v:brown"},{"display_html":"navy :: IpeColor r","name":"navy","module":"Ipe.Color","link":"Ipe-Color.html#v:navy"},{"display_html":"pink :: IpeColor r","name":"pink","module":"Ipe.Color","link":"Ipe-Color.html#v:pink"},{"display_html":"seagreen :: IpeColor r","name":"seagreen","module":"Ipe.Color","link":"Ipe-Color.html#v:seagreen"},{"display_html":"turquoise :: IpeColor r","name":"turquoise","module":"Ipe.Color","link":"Ipe-Color.html#v:turquoise"},{"display_html":"violet :: IpeColor r","name":"violet","module":"Ipe.Color","link":"Ipe-Color.html#v:violet"},{"display_html":"darkblue :: IpeColor r","name":"darkblue","module":"Ipe.Color","link":"Ipe-Color.html#v:darkblue"},{"display_html":"darkcyan :: IpeColor r","name":"darkcyan","module":"Ipe.Color","link":"Ipe-Color.html#v:darkcyan"},{"display_html":"darkgray :: IpeColor r","name":"darkgray","module":"Ipe.Color","link":"Ipe-Color.html#v:darkgray"},{"display_html":"darkgreen :: IpeColor r","name":"darkgreen","module":"Ipe.Color","link":"Ipe-Color.html#v:darkgreen"},{"display_html":"darkmagenta :: IpeColor r","name":"darkmagenta","module":"Ipe.Color","link":"Ipe-Color.html#v:darkmagenta"},{"display_html":"darkorange :: IpeColor r","name":"darkorange","module":"Ipe.Color","link":"Ipe-Color.html#v:darkorange"},{"display_html":"darkred :: IpeColor r","name":"darkred","module":"Ipe.Color","link":"Ipe-Color.html#v:darkred"},{"display_html":"lightblue :: IpeColor r","name":"lightblue","module":"Ipe.Color","link":"Ipe-Color.html#v:lightblue"},{"display_html":"lightcyan :: IpeColor r","name":"lightcyan","module":"Ipe.Color","link":"Ipe-Color.html#v:lightcyan"},{"display_html":"lightgray :: IpeColor r","name":"lightgray","module":"Ipe.Color","link":"Ipe-Color.html#v:lightgray"},{"display_html":"lightgreen :: IpeColor r","name":"lightgreen","module":"Ipe.Color","link":"Ipe-Color.html#v:lightgreen"},{"display_html":"lightyellow :: IpeColor r","name":"lightyellow","module":"Ipe.Color","link":"Ipe-Color.html#v:lightyellow"},{"display_html":"data AttributeUniverse","name":"AttributeUniverse HAlign VAlign Height Gradient Tiling Opacity StrokeOpacity RArrow FillRule LineJoin LineCap Dash Pen Fill Stroke Transformations Pin Layer Matrix Width Depth Style Size Arrow Clip","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:AttributeUniverse"},{"display_html":"type family LayerSym0 :: AttributeUniverse where ...","name":"LayerSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:LayerSym0"},{"display_html":"type family MatrixSym0 :: AttributeUniverse where ...","name":"MatrixSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:MatrixSym0"},{"display_html":"type family PinSym0 :: AttributeUniverse where ...","name":"PinSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PinSym0"},{"display_html":"type family TransformationsSym0 :: AttributeUniverse where ...","name":"TransformationsSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TransformationsSym0"},{"display_html":"type family StrokeSym0 :: AttributeUniverse where ...","name":"StrokeSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:StrokeSym0"},{"display_html":"type family FillSym0 :: AttributeUniverse where ...","name":"FillSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:FillSym0"},{"display_html":"type family PenSym0 :: AttributeUniverse where ...","name":"PenSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PenSym0"},{"display_html":"type family SizeSym0 :: AttributeUniverse where ...","name":"SizeSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:SizeSym0"},{"display_html":"type family DashSym0 :: AttributeUniverse where ...","name":"DashSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:DashSym0"},{"display_html":"type family LineCapSym0 :: AttributeUniverse where ...","name":"LineCapSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:LineCapSym0"},{"display_html":"type family LineJoinSym0 :: AttributeUniverse where ...","name":"LineJoinSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:LineJoinSym0"},{"display_html":"type family FillRuleSym0 :: AttributeUniverse where ...","name":"FillRuleSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:FillRuleSym0"},{"display_html":"type family ArrowSym0 :: AttributeUniverse where ...","name":"ArrowSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:ArrowSym0"},{"display_html":"type family RArrowSym0 :: AttributeUniverse where ...","name":"RArrowSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:RArrowSym0"},{"display_html":"type family StrokeOpacitySym0 :: AttributeUniverse where ...","name":"StrokeOpacitySym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:StrokeOpacitySym0"},{"display_html":"type family OpacitySym0 :: AttributeUniverse where ...","name":"OpacitySym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:OpacitySym0"},{"display_html":"type family TilingSym0 :: AttributeUniverse where ...","name":"TilingSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TilingSym0"},{"display_html":"type family GradientSym0 :: AttributeUniverse where ...","name":"GradientSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:GradientSym0"},{"display_html":"type family WidthSym0 :: AttributeUniverse where ...","name":"WidthSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:WidthSym0"},{"display_html":"type family HeightSym0 :: AttributeUniverse where ...","name":"HeightSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:HeightSym0"},{"display_html":"type family DepthSym0 :: AttributeUniverse where ...","name":"DepthSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:DepthSym0"},{"display_html":"type family VAlignSym0 :: AttributeUniverse where ...","name":"VAlignSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:VAlignSym0"},{"display_html":"type family HAlignSym0 :: AttributeUniverse where ...","name":"HAlignSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:HAlignSym0"},{"display_html":"type family StyleSym0 :: AttributeUniverse where ...","name":"StyleSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:StyleSym0"},{"display_html":"type family ClipSym0 :: AttributeUniverse where ...","name":"ClipSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:ClipSym0"},{"display_html":"data SAttributeUniverse :: AttributeUniverse -> Type where","name":"SAttributeUniverse SClip SStyle SHAlign SVAlign SDepth SHeight SWidth SGradient STiling SOpacity SStrokeOpacity SRArrow SArrow SFillRule SLineJoin SLineCap SDash SSize SPen SFill SStroke STransformations SPin SMatrix SLayer","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:SAttributeUniverse"},{"display_html":"type CommonAttributes = [Layer, Matrix, Pin, Transformations]","name":"CommonAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:CommonAttributes"},{"display_html":"type TextAttributes = CommonAttributes ++ [Stroke, Size, Width, Height, Depth, VAlign, HAlign, Style, Opacity]","name":"TextAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TextAttributes"},{"display_html":"type TextLabelAttributes = TextAttributes","name":"TextLabelAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TextLabelAttributes"},{"display_html":"type MiniPageAttributes = TextAttributes","name":"MiniPageAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:MiniPageAttributes"},{"display_html":"type ImageAttributes = CommonAttributes","name":"ImageAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:ImageAttributes"},{"display_html":"type SymbolAttributes = CommonAttributes ++ [Stroke, Fill, Pen, Size]","name":"SymbolAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:SymbolAttributes"},{"display_html":"type PathAttributes = CommonAttributes ++ [Stroke, Fill, Dash, Pen, LineCap, LineJoin, FillRule, Arrow, RArrow, StrokeOpacity, Opacity, Tiling, Gradient]","name":"PathAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PathAttributes"},{"display_html":"type GroupAttributes = CommonAttributes ++ '['Clip]","name":"GroupAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:GroupAttributes"},{"display_html":"newtype Attr (f :: TyFun u Type -> Type) (label :: u) = GAttr {}","name":"Attr _getAttr GAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:Attr"},{"display_html":"getAttr :: forall u (f :: TyFun u Type -> Type) (label :: u) u (f :: TyFun u Type -> Type) (label :: u). Iso (Attr (f :: TyFun u Type -> Type) (label :: u)) (Attr (f :: TyFun u Type -> Type) (label :: u)) (Maybe (Apply f label)) (Maybe (Apply f label))","name":"getAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:getAttr"},{"display_html":"pattern Attr :: Apply f label -> Attr f label","name":"Attr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:Attr"},{"display_html":"pattern NoAttr :: Attr f label","name":"NoAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:NoAttr"},{"display_html":"traverseAttr :: Applicative h => (Apply f label -> h (Apply g label)) -> Attr f label -> h (Attr g label)","name":"traverseAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:traverseAttr"},{"display_html":"pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a)","name":"pureAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:pureAttr"},{"display_html":"newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) = Attrs (Rec (Attr f) ats)","name":"Attributes Attrs","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:Attributes"},{"display_html":"unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats')","name":"unAttrs","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:unAttrs"},{"display_html":"traverseAttrs :: Applicative h => (forall label. Attr f label -> h (Attr g label)) -> Attributes f ats -> h (Attributes g ats)","name":"traverseAttrs","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:traverseAttrs"},{"display_html":"zipRecsWith :: (forall a. f a -> g a -> h a) -> Rec f as -> Rec g as -> Rec h as","name":"zipRecsWith","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:zipRecsWith"},{"display_html":"ixAttr :: forall at ats proxy f. at ats => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))","name":"ixAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:ixAttr"},{"display_html":"_Attr :: forall at ats proxy f. (at ats, RecApplicative ats) => proxy at -> Prism' (Attributes f ats) (Apply f at)","name":"_Attr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:_Attr"},{"display_html":"lookupAttr :: at ats => proxy at -> Attributes f ats -> Maybe (Apply f at)","name":"lookupAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:lookupAttr"},{"display_html":"setAttr :: forall proxy at ats f. at ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats","name":"setAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:setAttr"},{"display_html":"takeAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats)","name":"takeAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:takeAttr"},{"display_html":"unSetAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> Attributes f ats","name":"unSetAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:unSetAttr"},{"display_html":"attr :: (at ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats","name":"attr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:attr"},{"display_html":"data PinType","name":"PinType Vertical Horizontal No Yes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PinType"},{"display_html":"data TransformationTypes","name":"TransformationTypes Translations Affine Rigid","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TransformationTypes"},{"display_html":"data HorizontalAlignment","name":"HorizontalAlignment AlignRight AlignHCenter AlignLeft","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:HorizontalAlignment"},{"display_html":"data VerticalAlignment","name":"VerticalAlignment AlignBaseline AlignBottom AlignVCenter AlignTop","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:VerticalAlignment"},{"display_html":"type TeXStyle = Text","name":"TeXStyle","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TeXStyle"},{"display_html":"type TextSizeUnit r = r","name":"TextSizeUnit","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TextSizeUnit"},{"display_html":"newtype IpeSize r = IpeSize (IpeValue r)","name":"IpeSize IpeSize","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeSize"},{"display_html":"newtype IpePen r = IpePen (IpeValue r)","name":"IpePen IpePen","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpePen"},{"display_html":"data IpeDash r","name":"IpeDash DashPattern DashNamed","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeDash"},{"display_html":"data FillType","name":"FillType EOFill Wind","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:FillType"},{"display_html":"type IpeOpacity = Text","name":"IpeOpacity","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeOpacity"},{"display_html":"type IpeTiling = Text","name":"IpeTiling","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeTiling"},{"display_html":"type IpeGradient = Text","name":"IpeGradient","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeGradient"},{"display_html":"data IpeArrow r = IpeArrow {}","name":"IpeArrow _arrowSize _arrowName IpeArrow","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeArrow"},{"display_html":"arrowSize :: forall r r. Lens (IpeArrow r) (IpeArrow r) (IpeSize r) (IpeSize r)","name":"arrowSize","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:arrowSize"},{"display_html":"arrowName :: forall r. Lens' (IpeArrow r) Text","name":"arrowName","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:arrowName"},{"display_html":"normalArrow :: IpeArrow r","name":"normalArrow","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:normalArrow"},{"display_html":"class IpeAttrName (a :: AttributeUniverse) where","name":"IpeAttrName attrName","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeAttrName"},{"display_html":"writeAttrNames :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs","name":"writeAttrNames","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:writeAttrNames"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Content","link":"Ipe-Content.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Content","link":"Ipe-Content.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Content","link":"Ipe-Content.html#v:rect"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Content","link":"Ipe-Content.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Content","link":"Ipe-Content.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Content","link":"Ipe-Content.html#v:width"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Content","link":"Ipe-Content.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Content","link":"Ipe-Content.html#v:symbolName"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Content","link":"Ipe-Content.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Content","link":"Ipe-Content.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Content","link":"Ipe-Content.html#t:PathSegment"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Content","link":"Ipe-Content.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Content","link":"Ipe-Content.html#v:groupItems"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Content","link":"Ipe-Content.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Content","link":"Ipe-Content.html#t:ToObject"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Content","link":"Ipe-Content.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Content","link":"Ipe-Content.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Content","link":"Ipe-Content.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Content","link":"Ipe-Content.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Content","link":"Ipe-Content.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Content","link":"Ipe-Content.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Content","link":"Ipe-Content.html#v:commonAttributes"},{"display_html":"flattenGroups :: [IpeObject r] -> [IpeObject r]","name":"flattenGroups","module":"Ipe.Content","link":"Ipe-Content.html#v:flattenGroups"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe.Types","link":"Ipe-Types.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe.Types","link":"Ipe-Types.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe.Types","link":"Ipe-Types.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe.Types","link":"Ipe-Types.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe.Types","link":"Ipe-Types.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe.Types","link":"Ipe-Types.html#v:singlePageFromContent"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe.Types","link":"Ipe-Types.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe.Types","link":"Ipe-Types.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe.Types","link":"Ipe-Types.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe.Types","link":"Ipe-Types.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe.Types","link":"Ipe-Types.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe.Types","link":"Ipe-Types.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe.Types","link":"Ipe-Types.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe.Types","link":"Ipe-Types.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe.Types","link":"Ipe-Types.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Types","link":"Ipe-Types.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Types","link":"Ipe-Types.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Types","link":"Ipe-Types.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Types","link":"Ipe-Types.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Types","link":"Ipe-Types.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Types","link":"Ipe-Types.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Types","link":"Ipe-Types.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Types","link":"Ipe-Types.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Types","link":"Ipe-Types.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Types","link":"Ipe-Types.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Types","link":"Ipe-Types.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Types","link":"Ipe-Types.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Types","link":"Ipe-Types.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Types","link":"Ipe-Types.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Types","link":"Ipe-Types.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Types","link":"Ipe-Types.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Types","link":"Ipe-Types.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Types","link":"Ipe-Types.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Types","link":"Ipe-Types.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Types","link":"Ipe-Types.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Types","link":"Ipe-Types.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Types","link":"Ipe-Types.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Types","link":"Ipe-Types.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Types","link":"Ipe-Types.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe.Types","link":"Ipe-Types.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe.Types","link":"Ipe-Types.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe.Types","link":"Ipe-Types.html#v:activeLayer"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe.Types","link":"Ipe-Types.html#v:addStyleSheet"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe.Types","link":"Ipe-Types.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe.Types","link":"Ipe-Types.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe.Types","link":"Ipe-Types.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe.Types","link":"Ipe-Types.html#v:opacitiesStyle"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe.Types","link":"Ipe-Types.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe.Types","link":"Ipe-Types.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe.Types","link":"Ipe-Types.html#v:preambleData"},{"display_html":"applyMatrix' :: (IsTransformable (i r), Matrix AttributesOf i, Dimension (i r) ~ 2, r ~ NumType (i r)) => IpeObject' i r -> IpeObject' i r","name":"applyMatrix'","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatrix-39-"},{"display_html":"applyMatrix :: Fractional r => IpeObject r -> IpeObject r","name":"applyMatrix","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatrix"},{"display_html":"applyMatrices :: Fractional r => IpeFile r -> IpeFile r","name":"applyMatrices","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatrices"},{"display_html":"applyMatricesPage :: Fractional r => IpePage r -> IpePage r","name":"applyMatricesPage","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatricesPage"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readRawIpeFile"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readSinglePageFileThrow"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe.Reader","link":"Ipe-Reader.html#t:ConversionError"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readIpeStylesheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe.Reader","link":"Ipe-Reader.html#v:addStyleSheetFrom"},{"display_html":"fromIpeXML :: IpeRead (t r) => ByteString -> Either ConversionError (t r)","name":"fromIpeXML","module":"Ipe.Reader","link":"Ipe-Reader.html#v:fromIpeXML"},{"display_html":"readXML :: ByteString -> Either ConversionError (Node Text Text)","name":"readXML","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readXML"},{"display_html":"class IpeReadText t where","name":"IpeReadText ipeReadText","module":"Ipe.Reader","link":"Ipe-Reader.html#t:IpeReadText"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe.Reader","link":"Ipe-Reader.html#t:IpeRead"},{"display_html":"class IpeReadAttr t where","name":"IpeReadAttr ipeReadAttr","module":"Ipe.Reader","link":"Ipe-Reader.html#t:IpeReadAttr"},{"display_html":"ipeReadTextWith :: (Text -> Either t v) -> Text -> Either ConversionError (IpeValue v)","name":"ipeReadTextWith","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadTextWith"},{"display_html":"ipeReadObject :: (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy i -> proxy r -> Node Text Text -> Either ConversionError (i r :+ IpeAttributes i r)","name":"ipeReadObject","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadObject"},{"display_html":"ipeReadAttrs :: forall proxy proxy' i r f ats. (f ~ AttrMapSym1 r, ats ~ AttributesOf i, ReifyConstraint IpeReadAttr (Attr f) ats, RecApplicative ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => proxy i -> proxy' r -> Node Text Text -> Either ConversionError (IpeAttributes i r)","name":"ipeReadAttrs","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadAttrs"},{"display_html":"ipeReadRec :: forall f ats. (RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy f -> Proxy ats -> Node Text Text -> Either ConversionError (Rec (Attr f) ats)","name":"ipeReadRec","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadRec"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.Reader","link":"Ipe-Reader.html#t:Coordinate"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#t:HasDefaultFromIpe"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:readAllFrom"},{"display_html":"type IpeOut g i r = g -> IpeObject' i r","name":"IpeOut","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#t:IpeOut"},{"display_html":"type IpeOut' f g i r = g -> f (IpeObject' i r)","name":"IpeOut'","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#t:IpeOut-39-"},{"display_html":"(!) :: IpeObject' i r -> IpeAttributes i r -> IpeObject' i r","name":"!","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:-33-"},{"display_html":"iO :: ToObject i => IpeObject' i r -> IpeObject r","name":"iO","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:iO"},{"display_html":"iO'' :: (HasDefaultIpeOut g, NumType g ~ r, DefaultIpeOut g ~ i, ToObject i) => g -> IpeAttributes i r -> IpeObject r","name":"iO''","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:iO-39--39-"},{"display_html":"iO' :: HasDefaultIpeOut g => g -> IpeObject (NumType g)","name":"iO'","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:iO-39-"},{"display_html":"class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where","name":"HasDefaultIpeOut defIO DefaultIpeOut","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#t:HasDefaultIpeOut"},{"display_html":"ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r","name":"ipeMark","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeMark"},{"display_html":"ipeDiskMark :: IpeOut (Point 2 r) IpeSymbol r","name":"ipeDiskMark","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeDiskMark"},{"display_html":"defaultBox :: Num r => Rectangle (Point 2 r)","name":"defaultBox","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:defaultBox"},{"display_html":"ipeLine :: (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r","name":"ipeLine","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLine"},{"display_html":"ipeLineIn :: forall r. (Ord r, Fractional r, Show r) => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r","name":"ipeLineIn","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLineIn"},{"display_html":"ipeHalfLine :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeHalfLine","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeHalfLine"},{"display_html":"ipeRay :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeRay","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeRay"},{"display_html":"ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r","name":"ipeHalfLineIn","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeHalfLineIn"},{"display_html":"ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r","name":"ipeLineSegment","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLineSegment"},{"display_html":"ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r","name":"ipePolyLine","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipePolyLine"},{"display_html":"ipeEllipse :: IpeOut (Ellipse r) Path r","name":"ipeEllipse","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeEllipse"},{"display_html":"ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r","name":"ipeCircle","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeCircle"},{"display_html":"ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r","name":"ipeDisk","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeDisk"},{"display_html":"ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r","name":"ipeBezier","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeBezier"},{"display_html":"path :: PathSegment r -> Path r","name":"path","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:path"},{"display_html":"pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> PathSegment r","name":"pathSegment","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:pathSegment"},{"display_html":"ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r","name":"ipePolygon","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipePolygon"},{"display_html":"toPolygonPathSegment :: (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r","name":"toPolygonPathSegment","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:toPolygonPathSegment"},{"display_html":"ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r","name":"ipeSimplePolygon","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeSimplePolygon"},{"display_html":"ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r","name":"ipeRectangle","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeRectangle"},{"display_html":"ipeGroup :: Foldable f => IpeOut (f (IpeObject r)) Group r","name":"ipeGroup","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeGroup"},{"display_html":"ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r","name":"ipeLabel","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLabel"},{"display_html":"labelled :: (Show lbl, NumType g ~ r, ToObject i) => (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelled","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:labelled"},{"display_html":"labelledWith :: (Show lbl, NumType g ~ r, ToObject i) => IpeAttributes TextLabel r -> (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelledWith","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:labelledWith"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe.Writer","link":"Ipe-Writer.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe.Writer","link":"Ipe-Writer.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe.Writer","link":"Ipe-Writer.html#v:toIpeSelectionXML"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe.Writer","link":"Ipe-Writer.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe.Writer","link":"Ipe-Writer.html#t:IpeWriteText"},{"display_html":"ipeWriteAttrs :: (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)]","name":"ipeWriteAttrs","module":"Ipe.Writer","link":"Ipe-Writer.html#v:ipeWriteAttrs"},{"display_html":"writeAttrValues :: (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs","name":"writeAttrValues","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeAttrValues"},{"display_html":"ipeToIpeWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpeWith","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:ipeToIpeWith"},{"display_html":"ipeToIpe :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpe","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:ipeToIpe"},{"display_html":"writeIpeFileAsPdf :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFileAsPdf","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:writeIpeFileAsPdf"},{"display_html":"data FileType","name":"FileType XML PDF","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:FileType"},{"display_html":"data Export","name":"Export RetainIpeInfo Export","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:Export"},{"display_html":"type PageNumber = Int","name":"PageNumber","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:PageNumber"},{"display_html":"type ViewNumber = Int","name":"ViewNumber","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:ViewNumber"},{"display_html":"data MarkedView","name":"MarkedView OnlyMarkedViews All","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:MarkedView"},{"display_html":"data NoZip","name":"NoZip NoZip Zip","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:NoZip"},{"display_html":"data PageRange","name":"PageRange EntireFile PageRange","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:PageRange"},{"display_html":"data Options = Options {}","name":"Options markedView nozip runLatex singleView pages export Options","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:defaultOptions"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe","link":"Ipe.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe","link":"Ipe.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe","link":"Ipe.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe","link":"Ipe.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe","link":"Ipe.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe","link":"Ipe.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe","link":"Ipe.html#v:singlePageFromContent"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe","link":"Ipe.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe","link":"Ipe.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe","link":"Ipe.html#v:readSinglePageFileThrow"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe","link":"Ipe.html#v:readRawIpeFile"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe","link":"Ipe.html#t:ConversionError"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe","link":"Ipe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe","link":"Ipe.html#v:readAllFrom"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe","link":"Ipe.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe","link":"Ipe.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe","link":"Ipe.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe","link":"Ipe.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe","link":"Ipe.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe","link":"Ipe.html#v:toIpeSelectionXML"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe","link":"Ipe.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe","link":"Ipe.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe","link":"Ipe.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe","link":"Ipe.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe","link":"Ipe.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe","link":"Ipe.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe","link":"Ipe.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe","link":"Ipe.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe","link":"Ipe.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe","link":"Ipe.html#t:IpeObject"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe","link":"Ipe.html#v:_IpePath"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe","link":"Ipe.html#v:_IpeUse"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe","link":"Ipe.html#v:_IpeGroup"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe","link":"Ipe.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe","link":"Ipe.html#v:_IpeMiniPage"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe","link":"Ipe.html#v:_IpeImage"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe","link":"Ipe.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe","link":"Ipe.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe","link":"Ipe.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe","link":"Ipe.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe","link":"Ipe.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe","link":"Ipe.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe","link":"Ipe.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe","link":"Ipe.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe","link":"Ipe.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe","link":"Ipe.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe","link":"Ipe.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe","link":"Ipe.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe","link":"Ipe.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe","link":"Ipe.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe","link":"Ipe.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe","link":"Ipe.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe","link":"Ipe.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe","link":"Ipe.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe","link":"Ipe.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe","link":"Ipe.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe","link":"Ipe.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe","link":"Ipe.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679248458 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe","link":"Ipe.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe","link":"Ipe.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe","link":"Ipe.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe","link":"Ipe.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe","link":"Ipe.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe","link":"Ipe.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe","link":"Ipe.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe","link":"Ipe.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe","link":"Ipe.html#v:activeLayer"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe","link":"Ipe.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe","link":"Ipe.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe","link":"Ipe.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe","link":"Ipe.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe","link":"Ipe.html#v:opacitiesStyle"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe","link":"Ipe.html#v:readIpeStylesheet"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe","link":"Ipe.html#v:addStyleSheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe","link":"Ipe.html#v:addStyleSheetFrom"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe","link":"Ipe.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe","link":"Ipe.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe","link":"Ipe.html#v:preambleData"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe","link":"Ipe.html#t:IpeRead"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe","link":"Ipe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe","link":"Ipe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe","link":"Ipe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe","link":"Ipe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe","link":"Ipe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe","link":"Ipe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe","link":"Ipe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe","link":"Ipe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe","link":"Ipe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe","link":"Ipe.html#t:HasDefaultFromIpe"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe","link":"Ipe.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe","link":"Ipe.html#t:IpeWriteText"},{"display_html":"module Ipe.IpeOut","name":"","module":"Ipe","link":""},{"display_html":"module Ipe.Attributes","name":"","module":"Ipe","link":""},{"display_html":"module Ipe.Value","name":"","module":"Ipe","link":""},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe","link":"Ipe.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe","link":"Ipe.html#v:named"}] \ No newline at end of file +[{"display_html":"ipeRenderWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeRenderWith","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#v:ipeRenderWith"},{"display_html":"ipeRender :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeRender","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#v:ipeRender"},{"display_html":"data FileType","name":"FileType SVG PDF PNG EPS","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:FileType"},{"display_html":"data Options = Options {}","name":"Options crop viewNumber pageNumber transparent resolution Options","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#v:defaultOptions"},{"display_html":"data Background","name":"Background OpaqueBackground TransparentBackground","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:Background"},{"display_html":"data Crop","name":"Crop Crop NoCrop","module":"Ipe.IpeRender","link":"Ipe-IpeRender.html#t:Crop"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Layer","link":"Ipe-Layer.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Layer","link":"Ipe-Layer.html#v:layerName"},{"display_html":"literally :: String -> Q Exp","name":"literally","module":"Ipe.Literal","link":"Ipe-Literal.html#v:literally"},{"display_html":"lit :: QuasiQuoter","name":"lit","module":"Ipe.Literal","link":"Ipe-Literal.html#v:lit"},{"display_html":"litFile :: QuasiQuoter","name":"litFile","module":"Ipe.Literal","link":"Ipe-Literal.html#v:litFile"},{"display_html":"xmlLiteral :: String -> Node Text Text","name":"xmlLiteral","module":"Ipe.Literal","link":"Ipe-Literal.html#v:xmlLiteral"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Path","link":"Ipe-Path.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Path","link":"Ipe-Path.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Path","link":"Ipe-Path.html#t:PathSegment"},{"display_html":"_PolyLineSegment :: forall r. Prism' (PathSegment r) (PolyLine (Point 2 r))","name":"_PolyLineSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_PolyLineSegment"},{"display_html":"_PolygonPath :: forall r. Prism' (PathSegment r) (SimplePolygon (Point 2 r))","name":"_PolygonPath","module":"Ipe.Path","link":"Ipe-Path.html#v:_PolygonPath"},{"display_html":"_CubicBezierSegment :: forall r. Prism' (PathSegment r) (CubicBezier (Point 2 r))","name":"_CubicBezierSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_CubicBezierSegment"},{"display_html":"_QuadraticBezierSegment :: forall r. Prism' (PathSegment r) (QuadraticBezier (Point 2 r))","name":"_QuadraticBezierSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_QuadraticBezierSegment"},{"display_html":"_EllipseSegment :: forall r. Prism' (PathSegment r) (Ellipse r)","name":"_EllipseSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_EllipseSegment"},{"display_html":"_ArcSegment :: forall r. Prism' (PathSegment r) ()","name":"_ArcSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_ArcSegment"},{"display_html":"_SplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_SplineSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_SplineSegment"},{"display_html":"_ClosedSplineSegment :: forall r. Prism' (PathSegment r) ()","name":"_ClosedSplineSegment","module":"Ipe.Path","link":"Ipe-Path.html#v:_ClosedSplineSegment"},{"display_html":"data Operation r","name":"Operation Ellipse MoveTo LineTo ArcTo Spline ClosedSpline ClosePath CurveTo QCurveTo","module":"Ipe.Path","link":"Ipe-Path.html#t:Operation"},{"display_html":"_MoveTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_MoveTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_MoveTo"},{"display_html":"_LineTo :: forall r. Prism' (Operation r) (Point 2 r)","name":"_LineTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_LineTo"},{"display_html":"_CurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r, Point 2 r)","name":"_CurveTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_CurveTo"},{"display_html":"_QCurveTo :: forall r. Prism' (Operation r) (Point 2 r, Point 2 r)","name":"_QCurveTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_QCurveTo"},{"display_html":"_Ellipse :: forall r. Prism' (Operation r) (Matrix 3 3 r)","name":"_Ellipse","module":"Ipe.Path","link":"Ipe-Path.html#v:_Ellipse"},{"display_html":"_ArcTo :: forall r. Prism' (Operation r) (Matrix 3 3 r, Point 2 r)","name":"_ArcTo","module":"Ipe.Path","link":"Ipe-Path.html#v:_ArcTo"},{"display_html":"_Spline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_Spline","module":"Ipe.Path","link":"Ipe-Path.html#v:_Spline"},{"display_html":"_ClosedSpline :: forall r. Prism' (Operation r) [Point 2 r]","name":"_ClosedSpline","module":"Ipe.Path","link":"Ipe-Path.html#v:_ClosedSpline"},{"display_html":"_ClosePath :: forall r. Prism' (Operation r) ()","name":"_ClosePath","module":"Ipe.Path","link":"Ipe-Path.html#v:_ClosePath"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.PathParser","link":"Ipe-PathParser.html#t:Coordinate"},{"display_html":"readCoordinate :: Coordinate r => Text -> Either Text r","name":"readCoordinate","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readCoordinate"},{"display_html":"readPoint :: Coordinate r => Text -> Either Text (Point 2 r)","name":"readPoint","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readPoint"},{"display_html":"readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r)","name":"readMatrix","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readMatrix"},{"display_html":"readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r))","name":"readRectangle","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readRectangle"},{"display_html":"runParser :: Parser a -> Text -> Either Text a","name":"runParser","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:runParser"},{"display_html":"readPathOperations :: Coordinate r => Text -> Either Text [Operation r]","name":"readPathOperations","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:readPathOperations"},{"display_html":"pOperation :: forall r. Coordinate r => Parser (Operation r)","name":"pOperation","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:pOperation"},{"display_html":"pPoint :: Coordinate r => Parser (Point 2 r)","name":"pPoint","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:pPoint"},{"display_html":"pCoordinate :: Coordinate r => Parser r","name":"pCoordinate","module":"Ipe.PathParser","link":"Ipe-PathParser.html#v:pCoordinate"},{"display_html":"data IpeValue v","name":"IpeValue Valued Named","module":"Ipe.Value","link":"Ipe-Value.html#t:IpeValue"},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe.Color","link":"Ipe-Color.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe.Color","link":"Ipe-Color.html#v:named"},{"display_html":"basicNamedColors :: [IpeColor r]","name":"basicNamedColors","module":"Ipe.Color","link":"Ipe-Color.html#v:basicNamedColors"},{"display_html":"black :: IpeColor r","name":"black","module":"Ipe.Color","link":"Ipe-Color.html#v:black"},{"display_html":"white :: IpeColor r","name":"white","module":"Ipe.Color","link":"Ipe-Color.html#v:white"},{"display_html":"red :: IpeColor r","name":"red","module":"Ipe.Color","link":"Ipe-Color.html#v:red"},{"display_html":"green :: IpeColor r","name":"green","module":"Ipe.Color","link":"Ipe-Color.html#v:green"},{"display_html":"blue :: IpeColor r","name":"blue","module":"Ipe.Color","link":"Ipe-Color.html#v:blue"},{"display_html":"yellow :: IpeColor r","name":"yellow","module":"Ipe.Color","link":"Ipe-Color.html#v:yellow"},{"display_html":"orange :: IpeColor r","name":"orange","module":"Ipe.Color","link":"Ipe-Color.html#v:orange"},{"display_html":"gold :: IpeColor r","name":"gold","module":"Ipe.Color","link":"Ipe-Color.html#v:gold"},{"display_html":"purple :: IpeColor r","name":"purple","module":"Ipe.Color","link":"Ipe-Color.html#v:purple"},{"display_html":"gray :: IpeColor r","name":"gray","module":"Ipe.Color","link":"Ipe-Color.html#v:gray"},{"display_html":"brown :: IpeColor r","name":"brown","module":"Ipe.Color","link":"Ipe-Color.html#v:brown"},{"display_html":"navy :: IpeColor r","name":"navy","module":"Ipe.Color","link":"Ipe-Color.html#v:navy"},{"display_html":"pink :: IpeColor r","name":"pink","module":"Ipe.Color","link":"Ipe-Color.html#v:pink"},{"display_html":"seagreen :: IpeColor r","name":"seagreen","module":"Ipe.Color","link":"Ipe-Color.html#v:seagreen"},{"display_html":"turquoise :: IpeColor r","name":"turquoise","module":"Ipe.Color","link":"Ipe-Color.html#v:turquoise"},{"display_html":"violet :: IpeColor r","name":"violet","module":"Ipe.Color","link":"Ipe-Color.html#v:violet"},{"display_html":"darkblue :: IpeColor r","name":"darkblue","module":"Ipe.Color","link":"Ipe-Color.html#v:darkblue"},{"display_html":"darkcyan :: IpeColor r","name":"darkcyan","module":"Ipe.Color","link":"Ipe-Color.html#v:darkcyan"},{"display_html":"darkgray :: IpeColor r","name":"darkgray","module":"Ipe.Color","link":"Ipe-Color.html#v:darkgray"},{"display_html":"darkgreen :: IpeColor r","name":"darkgreen","module":"Ipe.Color","link":"Ipe-Color.html#v:darkgreen"},{"display_html":"darkmagenta :: IpeColor r","name":"darkmagenta","module":"Ipe.Color","link":"Ipe-Color.html#v:darkmagenta"},{"display_html":"darkorange :: IpeColor r","name":"darkorange","module":"Ipe.Color","link":"Ipe-Color.html#v:darkorange"},{"display_html":"darkred :: IpeColor r","name":"darkred","module":"Ipe.Color","link":"Ipe-Color.html#v:darkred"},{"display_html":"lightblue :: IpeColor r","name":"lightblue","module":"Ipe.Color","link":"Ipe-Color.html#v:lightblue"},{"display_html":"lightcyan :: IpeColor r","name":"lightcyan","module":"Ipe.Color","link":"Ipe-Color.html#v:lightcyan"},{"display_html":"lightgray :: IpeColor r","name":"lightgray","module":"Ipe.Color","link":"Ipe-Color.html#v:lightgray"},{"display_html":"lightgreen :: IpeColor r","name":"lightgreen","module":"Ipe.Color","link":"Ipe-Color.html#v:lightgreen"},{"display_html":"lightyellow :: IpeColor r","name":"lightyellow","module":"Ipe.Color","link":"Ipe-Color.html#v:lightyellow"},{"display_html":"data AttributeUniverse","name":"AttributeUniverse HAlign VAlign Height Gradient Tiling Opacity StrokeOpacity RArrow FillRule LineJoin LineCap Dash Pen Fill Stroke Transformations Pin Layer Matrix Width Depth Style Size Arrow Clip","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:AttributeUniverse"},{"display_html":"type family LayerSym0 :: AttributeUniverse where ...","name":"LayerSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:LayerSym0"},{"display_html":"type family MatrixSym0 :: AttributeUniverse where ...","name":"MatrixSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:MatrixSym0"},{"display_html":"type family PinSym0 :: AttributeUniverse where ...","name":"PinSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PinSym0"},{"display_html":"type family TransformationsSym0 :: AttributeUniverse where ...","name":"TransformationsSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TransformationsSym0"},{"display_html":"type family StrokeSym0 :: AttributeUniverse where ...","name":"StrokeSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:StrokeSym0"},{"display_html":"type family FillSym0 :: AttributeUniverse where ...","name":"FillSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:FillSym0"},{"display_html":"type family PenSym0 :: AttributeUniverse where ...","name":"PenSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PenSym0"},{"display_html":"type family SizeSym0 :: AttributeUniverse where ...","name":"SizeSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:SizeSym0"},{"display_html":"type family DashSym0 :: AttributeUniverse where ...","name":"DashSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:DashSym0"},{"display_html":"type family LineCapSym0 :: AttributeUniverse where ...","name":"LineCapSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:LineCapSym0"},{"display_html":"type family LineJoinSym0 :: AttributeUniverse where ...","name":"LineJoinSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:LineJoinSym0"},{"display_html":"type family FillRuleSym0 :: AttributeUniverse where ...","name":"FillRuleSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:FillRuleSym0"},{"display_html":"type family ArrowSym0 :: AttributeUniverse where ...","name":"ArrowSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:ArrowSym0"},{"display_html":"type family RArrowSym0 :: AttributeUniverse where ...","name":"RArrowSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:RArrowSym0"},{"display_html":"type family StrokeOpacitySym0 :: AttributeUniverse where ...","name":"StrokeOpacitySym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:StrokeOpacitySym0"},{"display_html":"type family OpacitySym0 :: AttributeUniverse where ...","name":"OpacitySym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:OpacitySym0"},{"display_html":"type family TilingSym0 :: AttributeUniverse where ...","name":"TilingSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TilingSym0"},{"display_html":"type family GradientSym0 :: AttributeUniverse where ...","name":"GradientSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:GradientSym0"},{"display_html":"type family WidthSym0 :: AttributeUniverse where ...","name":"WidthSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:WidthSym0"},{"display_html":"type family HeightSym0 :: AttributeUniverse where ...","name":"HeightSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:HeightSym0"},{"display_html":"type family DepthSym0 :: AttributeUniverse where ...","name":"DepthSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:DepthSym0"},{"display_html":"type family VAlignSym0 :: AttributeUniverse where ...","name":"VAlignSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:VAlignSym0"},{"display_html":"type family HAlignSym0 :: AttributeUniverse where ...","name":"HAlignSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:HAlignSym0"},{"display_html":"type family StyleSym0 :: AttributeUniverse where ...","name":"StyleSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:StyleSym0"},{"display_html":"type family ClipSym0 :: AttributeUniverse where ...","name":"ClipSym0","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:ClipSym0"},{"display_html":"data SAttributeUniverse :: AttributeUniverse -> Type where","name":"SAttributeUniverse SClip SStyle SHAlign SVAlign SDepth SHeight SWidth SGradient STiling SOpacity SStrokeOpacity SRArrow SArrow SFillRule SLineJoin SLineCap SDash SSize SPen SFill SStroke STransformations SPin SMatrix SLayer","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:SAttributeUniverse"},{"display_html":"type CommonAttributes = [Layer, Matrix, Pin, Transformations]","name":"CommonAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:CommonAttributes"},{"display_html":"type TextAttributes = CommonAttributes ++ [Stroke, Size, Width, Height, Depth, VAlign, HAlign, Style, Opacity]","name":"TextAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TextAttributes"},{"display_html":"type TextLabelAttributes = TextAttributes","name":"TextLabelAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TextLabelAttributes"},{"display_html":"type MiniPageAttributes = TextAttributes","name":"MiniPageAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:MiniPageAttributes"},{"display_html":"type ImageAttributes = CommonAttributes","name":"ImageAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:ImageAttributes"},{"display_html":"type SymbolAttributes = CommonAttributes ++ [Stroke, Fill, Pen, Size]","name":"SymbolAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:SymbolAttributes"},{"display_html":"type PathAttributes = CommonAttributes ++ [Stroke, Fill, Dash, Pen, LineCap, LineJoin, FillRule, Arrow, RArrow, StrokeOpacity, Opacity, Tiling, Gradient]","name":"PathAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PathAttributes"},{"display_html":"type GroupAttributes = CommonAttributes ++ '['Clip]","name":"GroupAttributes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:GroupAttributes"},{"display_html":"newtype Attr (f :: TyFun u Type -> Type) (label :: u) = GAttr {}","name":"Attr _getAttr GAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:Attr"},{"display_html":"getAttr :: forall u (f :: TyFun u Type -> Type) (label :: u) u (f :: TyFun u Type -> Type) (label :: u). Iso (Attr (f :: TyFun u Type -> Type) (label :: u)) (Attr (f :: TyFun u Type -> Type) (label :: u)) (Maybe (Apply f label)) (Maybe (Apply f label))","name":"getAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:getAttr"},{"display_html":"pattern Attr :: Apply f label -> Attr f label","name":"Attr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:Attr"},{"display_html":"pattern NoAttr :: Attr f label","name":"NoAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:NoAttr"},{"display_html":"traverseAttr :: Applicative h => (Apply f label -> h (Apply g label)) -> Attr f label -> h (Attr g label)","name":"traverseAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:traverseAttr"},{"display_html":"pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a)","name":"pureAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:pureAttr"},{"display_html":"newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) = Attrs (Rec (Attr f) ats)","name":"Attributes Attrs","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:Attributes"},{"display_html":"unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats')","name":"unAttrs","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:unAttrs"},{"display_html":"traverseAttrs :: Applicative h => (forall label. Attr f label -> h (Attr g label)) -> Attributes f ats -> h (Attributes g ats)","name":"traverseAttrs","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:traverseAttrs"},{"display_html":"zipRecsWith :: (forall a. f a -> g a -> h a) -> Rec f as -> Rec g as -> Rec h as","name":"zipRecsWith","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:zipRecsWith"},{"display_html":"ixAttr :: forall at ats proxy f. at ats => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))","name":"ixAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:ixAttr"},{"display_html":"_Attr :: forall at ats proxy f. (at ats, RecApplicative ats) => proxy at -> Prism' (Attributes f ats) (Apply f at)","name":"_Attr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:_Attr"},{"display_html":"lookupAttr :: at ats => proxy at -> Attributes f ats -> Maybe (Apply f at)","name":"lookupAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:lookupAttr"},{"display_html":"setAttr :: forall proxy at ats f. at ats => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats","name":"setAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:setAttr"},{"display_html":"takeAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats)","name":"takeAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:takeAttr"},{"display_html":"unSetAttr :: forall proxy at ats f. at ats => proxy at -> Attributes f ats -> Attributes f ats","name":"unSetAttr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:unSetAttr"},{"display_html":"attr :: (at ats, RecApplicative ats) => proxy at -> Apply f at -> Attributes f ats","name":"attr","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:attr"},{"display_html":"data PinType","name":"PinType Vertical Horizontal No Yes","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:PinType"},{"display_html":"data TransformationTypes","name":"TransformationTypes Translations Affine Rigid","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TransformationTypes"},{"display_html":"data HorizontalAlignment","name":"HorizontalAlignment AlignRight AlignHCenter AlignLeft","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:HorizontalAlignment"},{"display_html":"data VerticalAlignment","name":"VerticalAlignment AlignBaseline AlignBottom AlignVCenter AlignTop","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:VerticalAlignment"},{"display_html":"type TeXStyle = Text","name":"TeXStyle","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TeXStyle"},{"display_html":"type TextSizeUnit r = r","name":"TextSizeUnit","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:TextSizeUnit"},{"display_html":"newtype IpeSize r = IpeSize (IpeValue r)","name":"IpeSize IpeSize","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeSize"},{"display_html":"newtype IpePen r = IpePen (IpeValue r)","name":"IpePen IpePen","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpePen"},{"display_html":"data IpeDash r","name":"IpeDash DashPattern DashNamed","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeDash"},{"display_html":"data FillType","name":"FillType EOFill Wind","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:FillType"},{"display_html":"type IpeOpacity = Text","name":"IpeOpacity","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeOpacity"},{"display_html":"type IpeTiling = Text","name":"IpeTiling","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeTiling"},{"display_html":"type IpeGradient = Text","name":"IpeGradient","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeGradient"},{"display_html":"data IpeArrow r = IpeArrow {}","name":"IpeArrow _arrowSize _arrowName IpeArrow","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeArrow"},{"display_html":"arrowSize :: forall r r. Lens (IpeArrow r) (IpeArrow r) (IpeSize r) (IpeSize r)","name":"arrowSize","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:arrowSize"},{"display_html":"arrowName :: forall r. Lens' (IpeArrow r) Text","name":"arrowName","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:arrowName"},{"display_html":"normalArrow :: IpeArrow r","name":"normalArrow","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:normalArrow"},{"display_html":"class IpeAttrName (a :: AttributeUniverse) where","name":"IpeAttrName attrName","module":"Ipe.Attributes","link":"Ipe-Attributes.html#t:IpeAttrName"},{"display_html":"writeAttrNames :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs","name":"writeAttrNames","module":"Ipe.Attributes","link":"Ipe-Attributes.html#v:writeAttrNames"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Content","link":"Ipe-Content.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Content","link":"Ipe-Content.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Content","link":"Ipe-Content.html#v:rect"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Content","link":"Ipe-Content.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Content","link":"Ipe-Content.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Content","link":"Ipe-Content.html#v:width"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Content","link":"Ipe-Content.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Content","link":"Ipe-Content.html#v:symbolName"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Content","link":"Ipe-Content.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Content","link":"Ipe-Content.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Content","link":"Ipe-Content.html#t:PathSegment"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Content","link":"Ipe-Content.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Content","link":"Ipe-Content.html#v:groupItems"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Content","link":"Ipe-Content.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Content","link":"Ipe-Content.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Content","link":"Ipe-Content.html#t:ToObject"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Content","link":"Ipe-Content.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Content","link":"Ipe-Content.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Content","link":"Ipe-Content.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Content","link":"Ipe-Content.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Content","link":"Ipe-Content.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Content","link":"Ipe-Content.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Content","link":"Ipe-Content.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Content","link":"Ipe-Content.html#v:commonAttributes"},{"display_html":"flattenGroups :: [IpeObject r] -> [IpeObject r]","name":"flattenGroups","module":"Ipe.Content","link":"Ipe-Content.html#v:flattenGroups"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe.Types","link":"Ipe-Types.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe.Types","link":"Ipe-Types.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe.Types","link":"Ipe-Types.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe.Types","link":"Ipe-Types.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe.Types","link":"Ipe-Types.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe.Types","link":"Ipe-Types.html#v:singlePageFromContent"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe.Types","link":"Ipe-Types.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe.Types","link":"Ipe-Types.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe.Types","link":"Ipe-Types.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe.Types","link":"Ipe-Types.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe.Types","link":"Ipe-Types.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe.Types","link":"Ipe-Types.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe.Types","link":"Ipe-Types.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe.Types","link":"Ipe-Types.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe.Types","link":"Ipe-Types.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeObject"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeGroup"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeImage"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeMiniPage"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpeUse"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe.Types","link":"Ipe-Types.html#v:_IpePath"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe.Types","link":"Ipe-Types.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe.Types","link":"Ipe-Types.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe.Types","link":"Ipe-Types.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe.Types","link":"Ipe-Types.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe.Types","link":"Ipe-Types.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe.Types","link":"Ipe-Types.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe.Types","link":"Ipe-Types.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe.Types","link":"Ipe-Types.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe.Types","link":"Ipe-Types.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe.Types","link":"Ipe-Types.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe.Types","link":"Ipe-Types.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe.Types","link":"Ipe-Types.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe.Types","link":"Ipe-Types.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe.Types","link":"Ipe-Types.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe.Types","link":"Ipe-Types.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe.Types","link":"Ipe-Types.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe.Types","link":"Ipe-Types.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe.Types","link":"Ipe-Types.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe.Types","link":"Ipe-Types.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe.Types","link":"Ipe-Types.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe.Types","link":"Ipe-Types.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe.Types","link":"Ipe-Types.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe.Types","link":"Ipe-Types.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe.Types","link":"Ipe-Types.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe.Types","link":"Ipe-Types.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe.Types","link":"Ipe-Types.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe.Types","link":"Ipe-Types.html#v:activeLayer"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe.Types","link":"Ipe-Types.html#v:addStyleSheet"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe.Types","link":"Ipe-Types.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe.Types","link":"Ipe-Types.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe.Types","link":"Ipe-Types.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe.Types","link":"Ipe-Types.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe.Types","link":"Ipe-Types.html#v:opacitiesStyle"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe.Types","link":"Ipe-Types.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe.Types","link":"Ipe-Types.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe.Types","link":"Ipe-Types.html#v:preambleData"},{"display_html":"applyMatrix' :: (IsTransformable (i r), Matrix AttributesOf i, Dimension (i r) ~ 2, r ~ NumType (i r)) => IpeObject' i r -> IpeObject' i r","name":"applyMatrix'","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatrix-39-"},{"display_html":"applyMatrix :: Fractional r => IpeObject r -> IpeObject r","name":"applyMatrix","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatrix"},{"display_html":"applyMatrices :: Fractional r => IpeFile r -> IpeFile r","name":"applyMatrices","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatrices"},{"display_html":"applyMatricesPage :: Fractional r => IpePage r -> IpePage r","name":"applyMatricesPage","module":"Ipe.Matrix","link":"Ipe-Matrix.html#v:applyMatricesPage"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readRawIpeFile"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readSinglePageFileThrow"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe.Reader","link":"Ipe-Reader.html#t:ConversionError"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readIpeStylesheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe.Reader","link":"Ipe-Reader.html#v:addStyleSheetFrom"},{"display_html":"fromIpeXML :: IpeRead (t r) => ByteString -> Either ConversionError (t r)","name":"fromIpeXML","module":"Ipe.Reader","link":"Ipe-Reader.html#v:fromIpeXML"},{"display_html":"readXML :: ByteString -> Either ConversionError (Node Text Text)","name":"readXML","module":"Ipe.Reader","link":"Ipe-Reader.html#v:readXML"},{"display_html":"class IpeReadText t where","name":"IpeReadText ipeReadText","module":"Ipe.Reader","link":"Ipe-Reader.html#t:IpeReadText"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe.Reader","link":"Ipe-Reader.html#t:IpeRead"},{"display_html":"class IpeReadAttr t where","name":"IpeReadAttr ipeReadAttr","module":"Ipe.Reader","link":"Ipe-Reader.html#t:IpeReadAttr"},{"display_html":"ipeReadTextWith :: (Text -> Either t v) -> Text -> Either ConversionError (IpeValue v)","name":"ipeReadTextWith","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadTextWith"},{"display_html":"ipeReadObject :: (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy i -> proxy r -> Node Text Text -> Either ConversionError (i r :+ IpeAttributes i r)","name":"ipeReadObject","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadObject"},{"display_html":"ipeReadAttrs :: forall proxy proxy' i r f ats. (f ~ AttrMapSym1 r, ats ~ AttributesOf i, ReifyConstraint IpeReadAttr (Attr f) ats, RecApplicative ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => proxy i -> proxy' r -> Node Text Text -> Either ConversionError (IpeAttributes i r)","name":"ipeReadAttrs","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadAttrs"},{"display_html":"ipeReadRec :: forall f ats. (RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, RecAll (Attr f) ats IpeReadAttr, AllConstrained IpeAttrName ats) => Proxy f -> Proxy ats -> Node Text Text -> Either ConversionError (Rec (Attr f) ats)","name":"ipeReadRec","module":"Ipe.Reader","link":"Ipe-Reader.html#v:ipeReadRec"},{"display_html":"class Fractional r => Coordinate r where","name":"Coordinate fromSeq","module":"Ipe.Reader","link":"Ipe-Reader.html#t:Coordinate"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#t:HasDefaultFromIpe"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe.FromIpe","link":"Ipe-FromIpe.html#v:readAllFrom"},{"display_html":"type IpeOut g i r = g -> IpeObject' i r","name":"IpeOut","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#t:IpeOut"},{"display_html":"type IpeOut' f g i r = g -> f (IpeObject' i r)","name":"IpeOut'","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#t:IpeOut-39-"},{"display_html":"(!) :: IpeObject' i r -> IpeAttributes i r -> IpeObject' i r","name":"!","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:-33-"},{"display_html":"iO :: ToObject i => IpeObject' i r -> IpeObject r","name":"iO","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:iO"},{"display_html":"iO'' :: (HasDefaultIpeOut g, NumType g ~ r, DefaultIpeOut g ~ i, ToObject i) => g -> IpeAttributes i r -> IpeObject r","name":"iO''","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:iO-39--39-"},{"display_html":"iO' :: HasDefaultIpeOut g => g -> IpeObject (NumType g)","name":"iO'","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:iO-39-"},{"display_html":"class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where","name":"HasDefaultIpeOut defIO DefaultIpeOut","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#t:HasDefaultIpeOut"},{"display_html":"ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r","name":"ipeMark","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeMark"},{"display_html":"ipeDiskMark :: IpeOut (Point 2 r) IpeSymbol r","name":"ipeDiskMark","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeDiskMark"},{"display_html":"defaultBox :: Num r => Rectangle (Point 2 r)","name":"defaultBox","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:defaultBox"},{"display_html":"ipeLine :: (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r","name":"ipeLine","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLine"},{"display_html":"ipeLineIn :: forall r. (Ord r, Fractional r, Show r) => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r","name":"ipeLineIn","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLineIn"},{"display_html":"ipeHalfLine :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeHalfLine","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeHalfLine"},{"display_html":"ipeRay :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r","name":"ipeRay","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeRay"},{"display_html":"ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r","name":"ipeHalfLineIn","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeHalfLineIn"},{"display_html":"ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r","name":"ipeLineSegment","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLineSegment"},{"display_html":"ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r","name":"ipePolyLine","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipePolyLine"},{"display_html":"ipeEllipse :: IpeOut (Ellipse r) Path r","name":"ipeEllipse","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeEllipse"},{"display_html":"ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r","name":"ipeCircle","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeCircle"},{"display_html":"ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r","name":"ipeDisk","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeDisk"},{"display_html":"ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r","name":"ipeBezier","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeBezier"},{"display_html":"path :: PathSegment r -> Path r","name":"path","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:path"},{"display_html":"pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> PathSegment r","name":"pathSegment","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:pathSegment"},{"display_html":"ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r","name":"ipePolygon","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipePolygon"},{"display_html":"toPolygonPathSegment :: (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r","name":"toPolygonPathSegment","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:toPolygonPathSegment"},{"display_html":"ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r","name":"ipeSimplePolygon","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeSimplePolygon"},{"display_html":"ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r","name":"ipeRectangle","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeRectangle"},{"display_html":"ipeGroup :: Foldable f => IpeOut (f (IpeObject r)) Group r","name":"ipeGroup","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeGroup"},{"display_html":"ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r","name":"ipeLabel","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:ipeLabel"},{"display_html":"labelled :: (Show lbl, NumType g ~ r, ToObject i) => (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelled","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:labelled"},{"display_html":"labelledWith :: (Show lbl, NumType g ~ r, ToObject i) => IpeAttributes TextLabel r -> (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r","name":"labelledWith","module":"Ipe.IpeOut","link":"Ipe-IpeOut.html#v:labelledWith"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe.Writer","link":"Ipe-Writer.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe.Writer","link":"Ipe-Writer.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe.Writer","link":"Ipe-Writer.html#v:toIpeSelectionXML"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe.Writer","link":"Ipe-Writer.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe.Writer","link":"Ipe-Writer.html#t:IpeWriteText"},{"display_html":"ipeWriteAttrs :: (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)]","name":"ipeWriteAttrs","module":"Ipe.Writer","link":"Ipe-Writer.html#v:ipeWriteAttrs"},{"display_html":"writeAttrValues :: (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs","name":"writeAttrValues","module":"Ipe.Writer","link":"Ipe-Writer.html#v:writeAttrValues"},{"display_html":"ipeToIpeWith :: Options -> FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpeWith","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:ipeToIpeWith"},{"display_html":"ipeToIpe :: FileType -> OsPath -> OsPath -> IO ()","name":"ipeToIpe","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:ipeToIpe"},{"display_html":"writeIpeFileAsPdf :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFileAsPdf","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:writeIpeFileAsPdf"},{"display_html":"data FileType","name":"FileType XML PDF","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:FileType"},{"display_html":"data Export","name":"Export RetainIpeInfo Export","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:Export"},{"display_html":"type PageNumber = Int","name":"PageNumber","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:PageNumber"},{"display_html":"type ViewNumber = Int","name":"ViewNumber","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:ViewNumber"},{"display_html":"data MarkedView","name":"MarkedView OnlyMarkedViews All","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:MarkedView"},{"display_html":"data NoZip","name":"NoZip NoZip Zip","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:NoZip"},{"display_html":"data PageRange","name":"PageRange EntireFile PageRange","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:PageRange"},{"display_html":"data Options = Options {}","name":"Options markedView nozip runLatex singleView pages export Options","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#t:Options"},{"display_html":"defaultOptions :: Options","name":"defaultOptions","module":"Ipe.IpeToIpe","link":"Ipe-IpeToIpe.html#v:defaultOptions"},{"display_html":"data IpeFile r = IpeFile (Maybe IpePreamble) [IpeStyle] (NonEmpty (IpePage r))","name":"IpeFile IpeFile","module":"Ipe","link":"Ipe.html#t:IpeFile"},{"display_html":"preamble :: forall r. Lens' (IpeFile r) (Maybe IpePreamble)","name":"preamble","module":"Ipe","link":"Ipe.html#v:preamble"},{"display_html":"styles :: forall r. Lens' (IpeFile r) [IpeStyle]","name":"styles","module":"Ipe","link":"Ipe.html#v:styles"},{"display_html":"pages :: forall r r. Lens (IpeFile r) (IpeFile r) (NonEmpty (IpePage r)) (NonEmpty (IpePage r))","name":"pages","module":"Ipe","link":"Ipe.html#v:pages"},{"display_html":"ipeFile :: NonEmpty (IpePage r) -> IpeFile r","name":"ipeFile","module":"Ipe","link":"Ipe.html#v:ipeFile"},{"display_html":"singlePageFile :: IpePage r -> IpeFile r","name":"singlePageFile","module":"Ipe","link":"Ipe.html#v:singlePageFile"},{"display_html":"singlePageFromContent :: [IpeObject r] -> IpeFile r","name":"singlePageFromContent","module":"Ipe","link":"Ipe.html#v:singlePageFromContent"},{"display_html":"readIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readIpeFile","module":"Ipe","link":"Ipe.html#v:readIpeFile"},{"display_html":"readSinglePageFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r))","name":"readSinglePageFile","module":"Ipe","link":"Ipe.html#v:readSinglePageFile"},{"display_html":"readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r)","name":"readSinglePageFileThrow","module":"Ipe","link":"Ipe.html#v:readSinglePageFileThrow"},{"display_html":"readRawIpeFile :: (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r))","name":"readRawIpeFile","module":"Ipe","link":"Ipe.html#v:readRawIpeFile"},{"display_html":"type ConversionError = Text","name":"ConversionError","module":"Ipe","link":"Ipe.html#t:ConversionError"},{"display_html":"readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAll","module":"Ipe","link":"Ipe.html#v:readAll"},{"display_html":"readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r]","name":"readAllFrom","module":"Ipe","link":"Ipe.html#v:readAllFrom"},{"display_html":"writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO ()","name":"writeIpeFile","module":"Ipe","link":"Ipe.html#v:writeIpeFile"},{"display_html":"writeIpeFile' :: IpeWrite t => t -> OsPath -> IO ()","name":"writeIpeFile'","module":"Ipe","link":"Ipe.html#v:writeIpeFile-39-"},{"display_html":"writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO ()","name":"writeIpePage","module":"Ipe","link":"Ipe.html#v:writeIpePage"},{"display_html":"toIpeXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeXML","module":"Ipe","link":"Ipe.html#v:toIpeXML"},{"display_html":"printAsIpeSelection :: IpeWrite t => t -> IO ()","name":"printAsIpeSelection","module":"Ipe","link":"Ipe.html#v:printAsIpeSelection"},{"display_html":"toIpeSelectionXML :: IpeWrite t => t -> Maybe ByteString","name":"toIpeSelectionXML","module":"Ipe","link":"Ipe.html#v:toIpeSelectionXML"},{"display_html":"data IpePage r = IpePage [LayerName] [View] [IpeObject r]","name":"IpePage IpePage","module":"Ipe","link":"Ipe.html#t:IpePage"},{"display_html":"layers :: forall r. Lens' (IpePage r) [LayerName]","name":"layers","module":"Ipe","link":"Ipe.html#v:layers"},{"display_html":"views :: forall r. Lens' (IpePage r) [View]","name":"views","module":"Ipe","link":"Ipe.html#v:views"},{"display_html":"content :: forall r r. Lens (IpePage r) (IpePage r) [IpeObject r] [IpeObject r]","name":"content","module":"Ipe","link":"Ipe.html#v:content"},{"display_html":"emptyPage :: IpePage r","name":"emptyPage","module":"Ipe","link":"Ipe.html#v:emptyPage"},{"display_html":"fromContent :: [IpeObject r] -> IpePage r","name":"fromContent","module":"Ipe","link":"Ipe.html#v:fromContent"},{"display_html":"onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r)","name":"onLayer","module":"Ipe","link":"Ipe.html#v:onLayer"},{"display_html":"contentInView :: Word -> Getter (IpePage r) [IpeObject r]","name":"contentInView","module":"Ipe","link":"Ipe.html#v:contentInView"},{"display_html":"withDefaults :: IpePage r -> IpePage r","name":"withDefaults","module":"Ipe","link":"Ipe.html#v:withDefaults"},{"display_html":"data IpeObject r","name":"IpeObject IpeGroup IpeImage IpeTextLabel IpeMiniPage IpeUse IpePath","module":"Ipe","link":"Ipe.html#t:IpeObject"},{"display_html":"_IpePath :: forall r. Prism' (IpeObject r) (IpeObject' Path r)","name":"_IpePath","module":"Ipe","link":"Ipe.html#v:_IpePath"},{"display_html":"_IpeUse :: forall r. Prism' (IpeObject r) (IpeObject' IpeSymbol r)","name":"_IpeUse","module":"Ipe","link":"Ipe.html#v:_IpeUse"},{"display_html":"_IpeGroup :: forall r. Prism' (IpeObject r) (IpeObject' Group r)","name":"_IpeGroup","module":"Ipe","link":"Ipe.html#v:_IpeGroup"},{"display_html":"_IpeTextLabel :: forall r. Prism' (IpeObject r) (IpeObject' TextLabel r)","name":"_IpeTextLabel","module":"Ipe","link":"Ipe.html#v:_IpeTextLabel"},{"display_html":"_IpeMiniPage :: forall r. Prism' (IpeObject r) (IpeObject' MiniPage r)","name":"_IpeMiniPage","module":"Ipe","link":"Ipe.html#v:_IpeMiniPage"},{"display_html":"_IpeImage :: forall r. Prism' (IpeObject r) (IpeObject' Image r)","name":"_IpeImage","module":"Ipe","link":"Ipe.html#v:_IpeImage"},{"display_html":"type IpeObject' g r = g r :+ IpeAttributes g r","name":"IpeObject'","module":"Ipe","link":"Ipe.html#t:IpeObject-39-"},{"display_html":"ipeObject' :: ToObject i => i r -> IpeAttributes i r -> IpeObject r","name":"ipeObject'","module":"Ipe","link":"Ipe.html#v:ipeObject-39-"},{"display_html":"class ToObject i where","name":"ToObject mkIpeObject","module":"Ipe","link":"Ipe.html#t:ToObject"},{"display_html":"newtype Path r = Path (Seq (PathSegment r))","name":"Path Path","module":"Ipe","link":"Ipe.html#t:Path"},{"display_html":"pathSegments :: forall r r. Iso (Path r) (Path r) (Seq (PathSegment r)) (Seq (PathSegment r))","name":"pathSegments","module":"Ipe","link":"Ipe.html#v:pathSegments"},{"display_html":"data PathSegment r","name":"PathSegment PolyLineSegment PolygonPath CubicBezierSegment QuadraticBezierSegment EllipseSegment ArcSegment SplineSegment ClosedSplineSegment","module":"Ipe","link":"Ipe.html#t:PathSegment"},{"display_html":"data IpeSymbol r = Symbol (Point 2 r) Text","name":"IpeSymbol Symbol","module":"Ipe","link":"Ipe.html#t:IpeSymbol"},{"display_html":"symbolPoint :: forall r r. Lens (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)","name":"symbolPoint","module":"Ipe","link":"Ipe.html#v:symbolPoint"},{"display_html":"symbolName :: forall r. Lens' (IpeSymbol r) Text","name":"symbolName","module":"Ipe","link":"Ipe.html#v:symbolName"},{"display_html":"newtype Group r = Group [IpeObject r]","name":"Group Group","module":"Ipe","link":"Ipe.html#t:Group"},{"display_html":"groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]","name":"groupItems","module":"Ipe","link":"Ipe.html#v:groupItems"},{"display_html":"data TextLabel r = Label Text (Point 2 r)","name":"TextLabel Label","module":"Ipe","link":"Ipe.html#t:TextLabel"},{"display_html":"data MiniPage r = MiniPage Text (Point 2 r) r","name":"MiniPage MiniPage","module":"Ipe","link":"Ipe.html#t:MiniPage"},{"display_html":"width :: MiniPage t -> t","name":"width","module":"Ipe","link":"Ipe.html#v:width"},{"display_html":"data Image r = Image () (Rectangle (Point 2 r))","name":"Image Image","module":"Ipe","link":"Ipe.html#t:Image"},{"display_html":"imageData :: forall r. Lens' (Image r) ()","name":"imageData","module":"Ipe","link":"Ipe.html#v:imageData"},{"display_html":"rect :: forall r r. Lens (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))","name":"rect","module":"Ipe","link":"Ipe.html#v:rect"},{"display_html":"type IpeBitmap = Text","name":"IpeBitmap","module":"Ipe","link":"Ipe.html#t:IpeBitmap"},{"display_html":"type IpeAttributes g r = Attributes' r (AttributesOf g)","name":"IpeAttributes","module":"Ipe","link":"Ipe.html#t:IpeAttributes"},{"display_html":"type Attributes' r = Attributes (AttrMapSym1 r)","name":"Attributes'","module":"Ipe","link":"Ipe.html#t:Attributes-39-"},{"display_html":"type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where ...","name":"AttributesOf","module":"Ipe","link":"Ipe.html#t:AttributesOf"},{"display_html":"type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where ...","name":"AttrMap","module":"Ipe","link":"Ipe.html#t:AttrMap"},{"display_html":"data AttrMapSym1 (a6989586621679250061 :: Type) :: (~>) AttributeUniverse Type","name":"AttrMapSym1","module":"Ipe","link":"Ipe.html#t:AttrMapSym1"},{"display_html":"attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)","name":"attributes","module":"Ipe","link":"Ipe.html#v:attributes"},{"display_html":"traverseIpeAttrs :: (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)","name":"traverseIpeAttrs","module":"Ipe","link":"Ipe.html#v:traverseIpeAttrs"},{"display_html":"commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)","name":"commonAttributes","module":"Ipe","link":"Ipe.html#v:commonAttributes"},{"display_html":"newtype LayerName = LayerName Text","name":"LayerName LayerName","module":"Ipe","link":"Ipe.html#t:LayerName"},{"display_html":"layerName :: Iso' LayerName Text","name":"layerName","module":"Ipe","link":"Ipe.html#v:layerName"},{"display_html":"data View = View [LayerName] LayerName","name":"View View","module":"Ipe","link":"Ipe.html#t:View"},{"display_html":"layerNames :: Lens' View [LayerName]","name":"layerNames","module":"Ipe","link":"Ipe.html#v:layerNames"},{"display_html":"activeLayer :: Lens' View LayerName","name":"activeLayer","module":"Ipe","link":"Ipe.html#v:activeLayer"},{"display_html":"data IpeStyle = IpeStyle (Maybe Text) (Node Text Text)","name":"IpeStyle IpeStyle","module":"Ipe","link":"Ipe.html#t:IpeStyle"},{"display_html":"styleName :: Lens' IpeStyle (Maybe Text)","name":"styleName","module":"Ipe","link":"Ipe.html#v:styleName"},{"display_html":"styleData :: Lens' IpeStyle (Node Text Text)","name":"styleData","module":"Ipe","link":"Ipe.html#v:styleData"},{"display_html":"basicIpeStyle :: IpeStyle","name":"basicIpeStyle","module":"Ipe","link":"Ipe.html#v:basicIpeStyle"},{"display_html":"opacitiesStyle :: IpeStyle","name":"opacitiesStyle","module":"Ipe","link":"Ipe.html#v:opacitiesStyle"},{"display_html":"readIpeStylesheet :: OsPath -> IO (Either ConversionError IpeStyle)","name":"readIpeStylesheet","module":"Ipe","link":"Ipe.html#v:readIpeStylesheet"},{"display_html":"addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r","name":"addStyleSheet","module":"Ipe","link":"Ipe.html#v:addStyleSheet"},{"display_html":"addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r)","name":"addStyleSheetFrom","module":"Ipe","link":"Ipe.html#v:addStyleSheetFrom"},{"display_html":"data IpePreamble = IpePreamble (Maybe Text) Text","name":"IpePreamble IpePreamble","module":"Ipe","link":"Ipe.html#t:IpePreamble"},{"display_html":"encoding :: Lens' IpePreamble (Maybe Text)","name":"encoding","module":"Ipe","link":"Ipe.html#v:encoding"},{"display_html":"preambleData :: Lens' IpePreamble Text","name":"preambleData","module":"Ipe","link":"Ipe.html#v:preambleData"},{"display_html":"class IpeRead t where","name":"IpeRead ipeRead","module":"Ipe","link":"Ipe.html#t:IpeRead"},{"display_html":"_asPoint :: Prism' (IpeSymbol r) (Point 2 r)","name":"_asPoint","module":"Ipe","link":"Ipe.html#v:_asPoint"},{"display_html":"_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r))","name":"_asLineSegment","module":"Ipe","link":"Ipe.html#v:_asLineSegment"},{"display_html":"_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r))","name":"_asClosedLineSegment","module":"Ipe","link":"Ipe.html#v:_asClosedLineSegment"},{"display_html":"_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r))","name":"_asRectangle","module":"Ipe","link":"Ipe.html#v:_asRectangle"},{"display_html":"_asTriangle :: Prism' (Path r) (Triangle (Point 2 r))","name":"_asTriangle","module":"Ipe","link":"Ipe.html#v:_asTriangle"},{"display_html":"_asPolyLine :: Prism' (Path r) (PolyLine (Point 2 r))","name":"_asPolyLine","module":"Ipe","link":"Ipe.html#v:_asPolyLine"},{"display_html":"_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r))","name":"_asSimplePolygon","module":"Ipe","link":"Ipe.html#v:_asSimplePolygon"},{"display_html":"_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r))","name":"_asConvexPolygon","module":"Ipe","link":"Ipe.html#v:_asConvexPolygon"},{"display_html":"_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r)","name":"_withAttrs","module":"Ipe","link":"Ipe.html#v:_withAttrs"},{"display_html":"class HasDefaultFromIpe g where","name":"HasDefaultFromIpe DefaultFromIpe defaultFromIpe","module":"Ipe","link":"Ipe.html#t:HasDefaultFromIpe"},{"display_html":"class IpeWrite t where","name":"IpeWrite ipeWrite","module":"Ipe","link":"Ipe.html#t:IpeWrite"},{"display_html":"class IpeWriteText t where","name":"IpeWriteText ipeWriteText","module":"Ipe","link":"Ipe.html#t:IpeWriteText"},{"display_html":"module Ipe.IpeOut","name":"","module":"Ipe","link":""},{"display_html":"module Ipe.Attributes","name":"","module":"Ipe","link":""},{"display_html":"module Ipe.Value","name":"","module":"Ipe","link":""},{"display_html":"newtype IpeColor r = IpeColor (IpeValue (RGB r))","name":"IpeColor IpeColor","module":"Ipe","link":"Ipe.html#t:IpeColor"},{"display_html":"named :: Text -> IpeColor r","name":"named","module":"Ipe","link":"Ipe.html#v:named"}] \ No newline at end of file diff --git a/haddocks/hgeometry/ipe/ipe.haddock b/haddocks/hgeometry/ipe/ipe.haddock index 95797b68c..27d6e8574 100644 Binary files a/haddocks/hgeometry/ipe/ipe.haddock and b/haddocks/hgeometry/ipe/ipe.haddock differ diff --git a/haddocks/hgeometry/ipe/src/Ipe.Attributes.html b/haddocks/hgeometry/ipe/src/Ipe.Attributes.html index 123fbda36..819f9d437 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.Attributes.html +++ b/haddocks/hgeometry/ipe/src/Ipe.Attributes.html @@ -1,4 +1,4 @@ -
{-# LANGUAGE OverloadedStrings #-}
+
{-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE UnicodeSyntax #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -50,7 +50,7 @@
                        | Clip
                        -- Extra
 --                       | X Text
-                       deriving (Int -> AttributeUniverse -> ShowS
+                       deriving (Int -> AttributeUniverse -> ShowS
 [AttributeUniverse] -> ShowS
 AttributeUniverse -> String
 (Int -> AttributeUniverse -> ShowS)
@@ -65,7 +65,7 @@
 show :: AttributeUniverse -> String
 $cshowList :: [AttributeUniverse] -> ShowS
 showList :: [AttributeUniverse] -> ShowS
-Show,ReadPrec [AttributeUniverse]
+Show,ReadPrec [AttributeUniverse]
 ReadPrec AttributeUniverse
 Int -> ReadS AttributeUniverse
 ReadS [AttributeUniverse]
@@ -85,7 +85,7 @@
 readPrec :: ReadPrec AttributeUniverse
 $creadListPrec :: ReadPrec [AttributeUniverse]
 readListPrec :: ReadPrec [AttributeUniverse]
-Read,AttributeUniverse -> AttributeUniverse -> Bool
+Read,AttributeUniverse -> AttributeUniverse -> Bool
 (AttributeUniverse -> AttributeUniverse -> Bool)
 -> (AttributeUniverse -> AttributeUniverse -> Bool)
 -> Eq AttributeUniverse
@@ -97,7 +97,7 @@
 Eq)
 
 
-genSingletons [ ''AttributeUniverse ]
+genSingletons [ ''AttributeUniverse ]
 
 -- | IpeObjects may have attributes. Essentially attributes are
 -- (key,value) pairs. The key is some name. Which attributes an object
@@ -133,28 +133,28 @@
 
 -- | Attr implements the mapping from labels to types as specified by the
 -- (symbol representing) the type family 'f'
-newtype Attr (f :: TyFun u Type -> Type) -- Symbol repr. the Type family mapping
+newtype Attr (f :: TyFun u Type -> Type) -- Symbol repr. the Type family mapping
                                          -- Labels in universe u to concrete types
-             (label :: u) = GAttr { forall u (f :: TyFun u (*) -> *) (label :: u).
+             (label :: u) = GAttr { forall u (f :: TyFun u (*) -> *) (label :: u).
 Attr f label -> Maybe (Apply f label)
-_getAttr :: Maybe (Apply f label) }
+_getAttr :: Maybe (Apply f label) }
 
 
-deriving instance Eq   (Apply f label) => Eq   (Attr f label)
-deriving instance Ord  (Apply f label) => Ord  (Attr f label)
+deriving instance Eq   (Apply f label) => Eq   (Attr f label)
+deriving instance Ord  (Apply f label) => Ord  (Attr f label)
 
-makeLenses ''Attr
+makeLenses ''Attr
 
 -- | Constructor for constructing an Attr given an actual value.
-pattern Attr   :: Apply f label -> Attr f label
+pattern Attr   :: Apply f label -> Attr f label
 pattern $mAttr :: forall {r} {u} {f :: u ~> *} {label :: u}.
 Attr f label -> (Apply f label -> r) -> ((# #) -> r) -> r
 $bAttr :: forall {u} (f :: u ~> *) (label :: u).
 Apply f label -> Attr f label
-Attr x = GAttr (Just x)
+Attr x = GAttr (Just x)
 
 -- | An Attribute that is not set
-pattern NoAttr :: Attr f label
+pattern NoAttr :: Attr f label
 pattern $mNoAttr :: forall {r} {u} {f :: TyFun u (*) -> *} {label :: u}.
 Attr f label -> ((# #) -> r) -> ((# #) -> r) -> r
 $bNoAttr :: forall {u} (f :: TyFun u (*) -> *) (label :: u). Attr f label
@@ -162,24 +162,24 @@
 {-# COMPLETE NoAttr, Attr #-}
 
 -- | Traverse an attribute.
-traverseAttr   :: Applicative h => (Apply f label -> h (Apply g label))
-               -> Attr f label -> h (Attr g label)
+traverseAttr   :: Applicative h => (Apply f label -> h (Apply g label))
+               -> Attr f label -> h (Attr g label)
 traverseAttr :: forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
 (Apply f label -> h (Apply g label))
 -> Attr f label -> h (Attr g label)
-traverseAttr Apply f label -> h (Apply g label)
-f = \case
-  Attr Apply f label
-x -> Apply g label -> Attr g label
+traverseAttr Apply f label -> h (Apply g label)
+f = \case
+  Attr Apply f label
+x -> Apply g label -> Attr g label
 forall {u} (f :: u ~> *) (label :: u).
 Apply f label -> Attr f label
 Attr (Apply g label -> Attr g label)
 -> h (Apply g label) -> h (Attr g label)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> Apply f label -> h (Apply g label)
-f Apply f label
-x
+f Apply f label
+x
   Attr f label
 NoAttr -> Attr g label -> h (Attr g label)
 forall a. a -> h a
@@ -189,7 +189,7 @@
 NoAttr
 
 -- | Traverse for the situation where the type is not actually parameterized.
-pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a)
+pureAttr :: (Applicative h, Apply f a ~ Apply g a) => Attr f a -> h (Attr g a)
 pureAttr :: forall {u} (h :: * -> *) (f :: u ~> *) (a :: u) (g :: u ~> *).
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
@@ -200,44 +200,44 @@
 -> (Attr f a -> Attr g a) -> Attr f a -> h (Attr g a)
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . \case
-    Attr Apply f a
-a -> Apply g a -> Attr g a
+    Attr Apply f a
+a -> Apply g a -> Attr g a
 forall {u} (f :: u ~> *) (label :: u).
 Apply f label -> Attr f label
 Attr Apply f a
 Apply g a
-a
+a
     Attr f a
 NoAttr -> Attr g a
 forall {u} (f :: TyFun u (*) -> *) (label :: u). Attr f label
 NoAttr
 
 
-instance Show (Apply f label) => Show (Attr f label) where
-  showsPrec :: Int -> Attr f label -> ShowS
-showsPrec Int
-d Attr f label
+instance Show (Apply f label) => Show (Attr f label) where
+  showsPrec :: Int -> Attr f label -> ShowS
+showsPrec Int
+d Attr f label
 NoAttr   = Bool -> ShowS -> ShowS
 showParen (Int
-d Int -> Int -> Bool
+d Int -> Int -> Bool
 forall a. Ord a => a -> a -> Bool
 > Int
-app_prec) (ShowS -> ShowS) -> ShowS -> ShowS
+app_prec) (ShowS -> ShowS) -> ShowS -> ShowS
 forall a b. (a -> b) -> a -> b
 $ String -> ShowS
 showString String
 "NoAttr"
-    where app_prec :: Int
-app_prec = Int
+    where app_prec :: Int
+app_prec = Int
 10
-  showsPrec Int
-d (Attr Apply f label
-a) = Bool -> ShowS -> ShowS
+  showsPrec Int
+d (Attr Apply f label
+a) = Bool -> ShowS -> ShowS
 showParen (Int
-d Int -> Int -> Bool
+d Int -> Int -> Bool
 forall a. Ord a => a -> a -> Bool
 > Int
-up_prec) (ShowS -> ShowS) -> ShowS -> ShowS
+up_prec) (ShowS -> ShowS) -> ShowS -> ShowS
 forall a b. (a -> b) -> a -> b
 $
                            String -> ShowS
@@ -247,17 +247,17 @@
 . Int -> Apply f label -> ShowS
 forall a. Show a => Int -> a -> ShowS
 showsPrec (Int
-up_precInt -> Int -> Int
+up_precInt -> Int -> Int
 forall a. Num a => a -> a -> a
 +Int
 1) Apply f label
-a
-    where up_prec :: Int
-up_prec  = Int
+a
+    where up_prec :: Int
+up_prec  = Int
 5
 
-instance Read (Apply f label) => Read (Attr f label) where
-  readPrec :: ReadPrec (Attr f label)
+instance Read (Apply f label) => Read (Attr f label) where
+  readPrec :: ReadPrec (Attr f label)
 readPrec = ReadPrec (Attr f label) -> ReadPrec (Attr f label)
 forall a. ReadPrec a -> ReadPrec a
 parens (ReadPrec (Attr f label) -> ReadPrec (Attr f label))
@@ -266,7 +266,7 @@
 $ (Int -> ReadPrec (Attr f label) -> ReadPrec (Attr f label)
 forall a. Int -> ReadPrec a -> ReadPrec a
 prec Int
-app_prec (ReadPrec (Attr f label) -> ReadPrec (Attr f label))
+app_prec (ReadPrec (Attr f label) -> ReadPrec (Attr f label))
 -> ReadPrec (Attr f label) -> ReadPrec (Attr f label)
 forall a b. (a -> b) -> a -> b
 $ do
@@ -285,15 +285,15 @@
 +++ (Int -> ReadPrec (Attr f label) -> ReadPrec (Attr f label)
 forall a. Int -> ReadPrec a -> ReadPrec a
 prec Int
-up_prec (ReadPrec (Attr f label) -> ReadPrec (Attr f label))
+up_prec (ReadPrec (Attr f label) -> ReadPrec (Attr f label))
 -> ReadPrec (Attr f label) -> ReadPrec (Attr f label)
 forall a b. (a -> b) -> a -> b
 $ do
                                          Ident String
 "Attr" <- ReadPrec Lexeme
 lexP
-                                         Apply f label
-a <- ReadPrec (Apply f label) -> ReadPrec (Apply f label)
+                                         Apply f label
+a <- ReadPrec (Apply f label) -> ReadPrec (Apply f label)
 forall a. ReadPrec a -> ReadPrec a
 step ReadPrec (Apply f label)
 forall a. Read a => ReadPrec a
@@ -308,15 +308,15 @@
 forall {u} (f :: u ~> *) (label :: u).
 Apply f label -> Attr f label
 Attr Apply f label
-a)
+a)
     where
-      app_prec :: Int
-app_prec = Int
+      app_prec :: Int
+app_prec = Int
 10
-      up_prec :: Int
-up_prec = Int
+      up_prec :: Int
+up_prec = Int
 5
-  readListPrec :: ReadPrec [Attr f label]
+  readListPrec :: ReadPrec [Attr f label]
 readListPrec = ReadPrec [Attr f label]
 forall a. Read a => ReadPrec [a]
 readListPrecDefault
@@ -324,20 +324,20 @@
 
 
 -- | Give pref. to the *RIGHT*
-instance Semigroup (Attr f l) where
+instance Semigroup (Attr f l) where
   Attr f l
-_ <> :: Attr f l -> Attr f l -> Attr f l
-<> b :: Attr f l
-b@(Attr Apply f l
+_ <> :: Attr f l -> Attr f l -> Attr f l
+<> b :: Attr f l
+b@(Attr Apply f l
 _) = Attr f l
-b
-  Attr f l
-a <> Attr f l
+b
+  Attr f l
+a <> Attr f l
 _          = Attr f l
-a
+a
 
-instance Monoid (Attr f l) where
-  mempty :: Attr f l
+instance Monoid (Attr f l) where
+  mempty :: Attr f l
 mempty  = Attr f l
 forall {u} (f :: TyFun u (*) -> *) (label :: u). Attr f label
 NoAttr
@@ -346,10 +346,10 @@
 -- * Attributes
 
 -- | A collection of Attributes.
-newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) = Attrs (Rec (Attr f) ats)
+newtype Attributes (f :: TyFun u Type -> Type) (ats :: [u]) = Attrs (Rec (Attr f) ats)
 
 -- | Get a vinyl Record with Attrs
-unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats')
+unAttrs :: Lens (Attributes f ats) (Attributes f' ats') (Rec (Attr f) ats) (Rec (Attr f') ats')
 unAttrs :: forall {u} {u} (f :: TyFun u (*) -> *) (ats :: [u])
        (f' :: TyFun u (*) -> *) (ats' :: [u]) (f :: * -> *).
 Functor f =>
@@ -363,9 +363,9 @@
      (Rec (Attr f) ats)
      (Rec (Attr f') ats')
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens (\(Attrs Rec (Attr f) ats
-r) -> Rec (Attr f) ats
-r) ((Rec (Attr f') ats' -> Attributes f' ats')
+lens (\(Attrs Rec (Attr f) ats
+r) -> Rec (Attr f) ats
+r) ((Rec (Attr f') ats' -> Attributes f' ats')
 -> Attributes f ats -> Rec (Attr f') ats' -> Attributes f' ats'
 forall a b. a -> b -> a
 const Rec (Attr f') ats' -> Attributes f' ats'
@@ -373,16 +373,16 @@
 Rec (Attr f) ats -> Attributes f ats
 Attrs)
 
-deriving instance ( RMap ats, ReifyConstraint Show (Attr f) ats, RecordToList ats
-                  , RecAll (Attr f) ats Show) => Show (Attributes f ats)
+deriving instance ( RMap ats, ReifyConstraint Show (Attr f) ats, RecordToList ats
+                  , RecAll (Attr f) ats Show) => Show (Attributes f ats)
 -- deriving instance (RecAll (Attr f) ats Read) => Read (Attributes f ats)
 
-instance ( ReifyConstraint Eq (Attr f) ats, RecordToList ats
-         , RecAll (Attr f) ats Eq)   => Eq   (Attributes f ats) where
-  (Attrs Rec (Attr f) ats
-a) == :: Attributes f ats -> Attributes f ats -> Bool
-== (Attrs Rec (Attr f) ats
-b) = [Bool] -> Bool
+instance ( ReifyConstraint Eq (Attr f) ats, RecordToList ats
+         , RecAll (Attr f) ats Eq)   => Eq   (Attributes f ats) where
+  (Attrs Rec (Attr f) ats
+a) == :: Attributes f ats -> Attributes f ats -> Bool
+== (Attrs Rec (Attr f) ats
+b) = [Bool] -> Bool
 forall (t :: * -> *). Foldable t => t Bool -> Bool
 and ([Bool] -> Bool)
 -> (Rec (Attr f) ats -> [Bool]) -> Rec (Attr f) ats -> Bool
@@ -406,18 +406,18 @@
 forall {u} (f :: u -> *) (g :: u -> *) (h :: u -> *) (as :: [u]).
 (forall (a :: u). f a -> g a -> h a)
 -> Rec f as -> Rec g as -> Rec h as
-zipRecsWith (\Attr f a
-x (Compose (Dict Attr f a
-y)) -> Bool -> Const Bool a
+zipRecsWith (\Attr f a
+x (Compose (Dict Attr f a
+y)) -> Bool -> Const Bool a
 forall k a (b :: k). a -> Const a b
 Const (Bool -> Const Bool a) -> Bool -> Const Bool a
 forall a b. (a -> b) -> a -> b
 $ Attr f a
-x Attr f a -> Attr f a -> Bool
+x Attr f a -> Attr f a -> Bool
 forall a. Eq a => a -> a -> Bool
 == Attr f a
-y) Rec (Attr f) ats
-a
+y) Rec (Attr f) ats
+a
                          (Rec (Dict Eq :. Attr f) ats -> Rec (Const Bool) ats)
 -> (Rec (Attr f) ats -> Rec (Dict Eq :. Attr f) ats)
 -> Rec (Attr f) ats
@@ -432,10 +432,10 @@
 reifyConstraint @Eq) (Rec (Attr f) ats -> Bool) -> Rec (Attr f) ats -> Bool
 forall a b. (a -> b) -> a -> b
 $ Rec (Attr f) ats
-b
+b
 
-instance RecApplicative ats => Monoid (Attributes f ats) where
-  mempty :: Attributes f ats
+instance RecApplicative ats => Monoid (Attributes f ats) where
+  mempty :: Attributes f ats
 mempty        = Rec (Attr f) ats -> Attributes f ats
 forall u (f :: TyFun u (*) -> *) (ats :: [u]).
 Rec (Attr f) ats -> Attributes f ats
@@ -452,11 +452,11 @@
 forall a. Monoid a => a
 mempty
 
-instance Semigroup (Attributes f ats) where
-  (Attrs Rec (Attr f) ats
-as) <> :: Attributes f ats -> Attributes f ats -> Attributes f ats
-<> (Attrs Rec (Attr f) ats
-bs) = Rec (Attr f) ats -> Attributes f ats
+instance Semigroup (Attributes f ats) where
+  (Attrs Rec (Attr f) ats
+as) <> :: Attributes f ats -> Attributes f ats -> Attributes f ats
+<> (Attrs Rec (Attr f) ats
+bs) = Rec (Attr f) ats -> Attributes f ats
 forall u (f :: TyFun u (*) -> *) (ats :: [u]).
 Rec (Attr f) ats -> Attributes f ats
 Attrs (Rec (Attr f) ats -> Attributes f ats)
@@ -471,21 +471,21 @@
 forall (a :: u). Attr f a -> Attr f a -> Attr f a
 forall a. Semigroup a => a -> a -> a
 (<>) Rec (Attr f) ats
-as Rec (Attr f) ats
-bs
+as Rec (Attr f) ats
+bs
 
 -- | Traverse implementation for Attrs
-traverseAttrs               :: Applicative h
-                            => (forall label. Attr f label -> h (Attr g label))
-                            -> Attributes f ats -> h (Attributes g ats)
+traverseAttrs               :: Applicative h
+                            => (forall label. Attr f label -> h (Attr g label))
+                            -> Attributes f ats -> h (Attributes g ats)
 traverseAttrs :: forall {u} (h :: * -> *) (f :: TyFun u (*) -> *)
        (g :: TyFun u (*) -> *) (ats :: [u]).
 Applicative h =>
 (forall (label :: u). Attr f label -> h (Attr g label))
 -> Attributes f ats -> h (Attributes g ats)
-traverseAttrs forall (label :: u). Attr f label -> h (Attr g label)
-f (Attrs Rec (Attr f) ats
-ats) = Rec (Attr g) ats -> Attributes g ats
+traverseAttrs forall (label :: u). Attr f label -> h (Attr g label)
+f (Attrs Rec (Attr f) ats
+ats) = Rec (Attr g) ats -> Attributes g ats
 forall u (f :: TyFun u (*) -> *) (ats :: [u]).
 Rec (Attr f) ats -> Attributes f ats
 Attrs (Rec (Attr g) ats -> Attributes g ats)
@@ -498,12 +498,12 @@
 (forall (x :: u). f x -> h (g x)) -> Rec f rs -> h (Rec g rs)
 rtraverse Attr f x -> h (Attr g x)
 forall (label :: u). Attr f label -> h (Attr g label)
-f Rec (Attr f) ats
-ats
+f Rec (Attr f) ats
+ats
 
 -- | Zip two Recs with the given function.
-zipRecsWith                       :: (forall a. f a -> g a -> h a)
-                                  -> Rec f as -> Rec g as -> Rec h as
+zipRecsWith                       :: (forall a. f a -> g a -> h a)
+                                  -> Rec f as -> Rec g as -> Rec h as
 zipRecsWith :: forall {u} (f :: u -> *) (g :: u -> *) (h :: u -> *) (as :: [u]).
 (forall (a :: u). f a -> g a -> h a)
 -> Rec f as -> Rec g as -> Rec h as
@@ -514,17 +514,17 @@
 Rec h '[]
 forall {u} (a :: u -> *). Rec a '[]
 RNil
-zipRecsWith forall (a :: u). f a -> g a -> h a
-f (f r
-r :& Rec f rs
-rs) (g r
-s :& Rec g rs
-ss) = f r -> g r -> h r
+zipRecsWith forall (a :: u). f a -> g a -> h a
+f (f r
+r :& Rec f rs
+rs) (g r
+s :& Rec g rs
+ss) = f r -> g r -> h r
 forall (a :: u). f a -> g a -> h a
-f f r
-r g r
+f f r
+r g r
 g r
-s h r -> Rec h rs -> Rec h (r : rs)
+s h r -> Rec h rs -> Rec h (r : rs)
 forall {u} (a :: u -> *) (r :: u) (rs :: [u]).
 a r -> Rec a rs -> Rec a (r : rs)
 :& (forall (a :: u). f a -> g a -> h a)
@@ -534,17 +534,17 @@
 -> Rec f as -> Rec g as -> Rec h as
 zipRecsWith f a -> g a -> h a
 forall (a :: u). f a -> g a -> h a
-f Rec f rs
-rs Rec g rs
+f Rec f rs
+rs Rec g rs
 Rec g rs
-ss
+ss
 
 
 ----------------------------------------
 
 -- | Lens into a specific attribute, if it is set.
-ixAttr   :: forall at ats proxy f. (at  ats)
-         => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))
+ixAttr   :: forall at ats proxy f. (at  ats)
+         => proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))
 ixAttr :: forall {k1} (at :: k1) (ats :: [k1]) (proxy :: k1 -> *)
        (f :: TyFun k1 (*) -> *).
 (at ∈ ats) =>
@@ -575,7 +575,7 @@
 (RecElem record r r rs rs (RIndex r rs), RecElemFCtx record f,
  Functor g) =>
 (f r -> g (f r)) -> record f rs -> g (record f rs)
-rlens @at)((Attr f at -> f (Attr f at))
+rlens @at)((Attr f at -> f (Attr f at))
  -> Rec (Attr f) ats -> f (Rec (Attr f) ats))
 -> ((Maybe (Apply f at) -> f (Maybe (Apply f at)))
     -> Attr f at -> f (Attr f at))
@@ -594,50 +594,50 @@
 getAttr
 
 -- | Prism into a particular attribute.
-_Attr   :: forall at ats proxy f. (at  ats, RecApplicative ats)
-         => proxy at -> Prism' (Attributes f ats) (Apply f at)
+_Attr   :: forall at ats proxy f. (at  ats, RecApplicative ats)
+         => proxy at -> Prism' (Attributes f ats) (Apply f at)
 _Attr :: forall {k1} (at :: k1) (ats :: [k1]) (proxy :: k1 -> *)
        (f :: TyFun k1 (*) -> *).
 (at ∈ ats, RecApplicative ats) =>
 proxy at -> Prism' (Attributes f ats) (Apply f at)
-_Attr proxy at
-a = (Apply f at -> Attributes f ats)
+_Attr proxy at
+a = (Apply f at -> Attributes f ats)
 -> (Attributes f ats -> Maybe (Apply f at))
 -> Prism
      (Attributes f ats) (Attributes f ats) (Apply f at) (Apply f at)
 forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
 prism' Apply f at -> Attributes f ats
-setA Attributes f ats -> Maybe (Apply f at)
-getA
+setA Attributes f ats -> Maybe (Apply f at)
+getA
   where
-    setA :: Apply f at -> Attributes f ats
-setA Apply f at
-x = proxy at -> Apply f at -> Attributes f ats -> Attributes f ats
+    setA :: Apply f at -> Attributes f ats
+setA Apply f at
+x = proxy at -> Apply f at -> Attributes f ats -> Attributes f ats
 forall {u} (proxy :: u -> *) (at :: u) (ats :: [u]) (f :: u ~> *).
 (at ∈ ats) =>
 proxy at -> Apply f at -> Attributes f ats -> Attributes f ats
 setAttr proxy at
-a Apply f at
-x Attributes f ats
+a Apply f at
+x Attributes f ats
 forall a. Monoid a => a
 mempty
-    getA :: Attributes f ats -> Maybe (Apply f at)
-getA = proxy at -> Attributes f ats -> Maybe (Apply f at)
+    getA :: Attributes f ats -> Maybe (Apply f at)
+getA = proxy at -> Attributes f ats -> Maybe (Apply f at)
 forall {k1} (at :: k1) (ats :: [k1]) (proxy :: k1 -> *)
        (f :: TyFun k1 (*) -> *).
 (at ∈ ats) =>
 proxy at -> Attributes f ats -> Maybe (Apply f at)
 lookupAttr proxy at
-a
+a
 
 -- | Looks up a particular attribute.
-lookupAttr   :: (at  ats) => proxy at -> Attributes f ats -> Maybe (Apply f at)
+lookupAttr   :: (at  ats) => proxy at -> Attributes f ats -> Maybe (Apply f at)
 lookupAttr :: forall {k1} (at :: k1) (ats :: [k1]) (proxy :: k1 -> *)
        (f :: TyFun k1 (*) -> *).
 (at ∈ ats) =>
 proxy at -> Attributes f ats -> Maybe (Apply f at)
-lookupAttr proxy at
-p = Getting
+lookupAttr proxy at
+p = Getting
   (Maybe (Apply f at)) (Attributes f ats) (Maybe (Apply f at))
 -> Attributes f ats -> Maybe (Apply f at)
 forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a
@@ -647,18 +647,18 @@
 (at ∈ ats) =>
 proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))
 ixAttr proxy at
-p)
+p)
 
 -- | Sets a particular attribute
-setAttr               :: forall proxy at ats f. (at  ats)
-                      => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats
+setAttr               :: forall proxy at ats f. (at  ats)
+                      => proxy at -> Apply f at -> Attributes f ats -> Attributes f ats
 setAttr :: forall {u} (proxy :: u -> *) (at :: u) (ats :: [u]) (f :: u ~> *).
 (at ∈ ats) =>
 proxy at -> Apply f at -> Attributes f ats -> Attributes f ats
 setAttr proxy at
-_ Apply f at
-a (Attrs Rec (Attr f) ats
-r) = Rec (Attr f) ats -> Attributes f ats
+_ Apply f at
+a (Attrs Rec (Attr f) ats
+r) = Rec (Attr f) ats -> Attributes f ats
 forall u (f :: TyFun u (*) -> *) (ats :: [u]).
 Rec (Attr f) ats -> Attributes f ats
 Attrs (Rec (Attr f) ats -> Attributes f ats)
@@ -673,30 +673,30 @@
 forall {u} (f :: u ~> *) (label :: u).
 Apply f label -> Attr f label
 Attr Apply f at
-a :: Attr f at) Rec (Attr f) ats
-r
+a :: Attr f at) Rec (Attr f) ats
+r
 
 
 -- | gets and removes the attribute from Attributes
-takeAttr       :: forall proxy at ats f. (at  ats)
-               => proxy at -> Attributes f ats -> ( Maybe (Apply f at)
-                                                  , Attributes f ats )
+takeAttr       :: forall proxy at ats f. (at  ats)
+               => proxy at -> Attributes f ats -> ( Maybe (Apply f at)
+                                                  , Attributes f ats )
 takeAttr :: forall {u} (proxy :: u -> *) (at :: u) (ats :: [u])
        (f :: TyFun u (*) -> *).
 (at ∈ ats) =>
 proxy at
 -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats)
-takeAttr proxy at
-p Attributes f ats
-ats = (proxy at -> Attributes f ats -> Maybe (Apply f at)
+takeAttr proxy at
+p Attributes f ats
+ats = (proxy at -> Attributes f ats -> Maybe (Apply f at)
 forall {k1} (at :: k1) (ats :: [k1]) (proxy :: k1 -> *)
        (f :: TyFun k1 (*) -> *).
 (at ∈ ats) =>
 proxy at -> Attributes f ats -> Maybe (Apply f at)
 lookupAttr proxy at
-p Attributes f ats
-ats, Attributes f ats
-atsAttributes f ats
+p Attributes f ats
+ats, Attributes f ats
+atsAttributes f ats
 -> (Attributes f ats -> Attributes f ats) -> Attributes f ats
 forall a b. a -> (a -> b) -> b
 &proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))
@@ -705,7 +705,7 @@
 (at ∈ ats) =>
 proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at))
 ixAttr proxy at
-p ((Maybe (Apply f at) -> Identity (Maybe (Apply f at)))
+p ((Maybe (Apply f at) -> Identity (Maybe (Apply f at)))
  -> Attributes f ats -> Identity (Attributes f ats))
 -> Maybe (Apply f at) -> Attributes f ats -> Attributes f ats
 forall s t a b. ASetter s t a b -> b -> s -> t
@@ -714,14 +714,14 @@
 Nothing)
 
 -- | unsets/Removes an attribute
-unSetAttr   :: forall proxy at ats f. (at  ats)
-            => proxy at -> Attributes f ats -> Attributes f ats
+unSetAttr   :: forall proxy at ats f. (at  ats)
+            => proxy at -> Attributes f ats -> Attributes f ats
 unSetAttr :: forall {u} (proxy :: u -> *) (at :: u) (ats :: [u])
        (f :: TyFun u (*) -> *).
 (at ∈ ats) =>
 proxy at -> Attributes f ats -> Attributes f ats
-unSetAttr proxy at
-p = (Maybe (Apply f at), Attributes f ats) -> Attributes f ats
+unSetAttr proxy at
+p = (Maybe (Apply f at), Attributes f ats) -> Attributes f ats
 forall a b. (a, b) -> b
 snd ((Maybe (Apply f at), Attributes f ats) -> Attributes f ats)
 -> (Attributes f ats -> (Maybe (Apply f at), Attributes f ats))
@@ -736,18 +736,18 @@
 proxy at
 -> Attributes f ats -> (Maybe (Apply f at), Attributes f ats)
 takeAttr proxy at
-p
+p
 
 -- | Creates a singleton attribute
-attr     :: (at  ats, RecApplicative ats)
-         => proxy at -> Apply f at -> Attributes f ats
+attr     :: (at  ats, RecApplicative ats)
+         => proxy at -> Apply f at -> Attributes f ats
 attr :: forall {u} (at :: u) (ats :: [u]) (proxy :: u -> *) (f :: u ~> *).
 (at ∈ ats, RecApplicative ats) =>
 proxy at -> Apply f at -> Attributes f ats
-attr proxy at
-p Apply f at
-x = Apply f at
-xApply f at
+attr proxy at
+p Apply f at
+x = Apply f at
+xApply f at
 -> Getting (Attributes f ats) (Apply f at) (Attributes f ats)
 -> Attributes f ats
 forall s a. s -> Getting a s a -> a
@@ -760,14 +760,14 @@
 (at ∈ ats, RecApplicative ats) =>
 proxy at -> Prism' (Attributes f ats) (Apply f at)
 _Attr proxy at
-p)
+p)
 
 --------------------------------------------------------------------------------
 -- * Implementations for Common Attributes
 
 -- | Possible values for Pin
 data PinType = No | Yes | Horizontal | Vertical
-             deriving (PinType -> PinType -> Bool
+             deriving (PinType -> PinType -> Bool
 (PinType -> PinType -> Bool)
 -> (PinType -> PinType -> Bool) -> Eq PinType
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -775,7 +775,7 @@
 == :: PinType -> PinType -> Bool
 $c/= :: PinType -> PinType -> Bool
 /= :: PinType -> PinType -> Bool
-Eq,Int -> PinType -> ShowS
+Eq,Int -> PinType -> ShowS
 [PinType] -> ShowS
 PinType -> String
 (Int -> PinType -> ShowS)
@@ -788,7 +788,7 @@
 show :: PinType -> String
 $cshowList :: [PinType] -> ShowS
 showList :: [PinType] -> ShowS
-Show,ReadPrec [PinType]
+Show,ReadPrec [PinType]
 ReadPrec PinType
 Int -> ReadS PinType
 ReadS [PinType]
@@ -808,7 +808,7 @@
 readPrec :: ReadPrec PinType
 $creadListPrec :: ReadPrec [PinType]
 readListPrec :: ReadPrec [PinType]
-Read,Int -> PinType
+Read,Int -> PinType
 PinType -> Int
 PinType -> [PinType]
 PinType -> PinType
@@ -852,7 +852,7 @@
 Enum)
 
 -- | Possible values for Transformation
-data TransformationTypes = Affine | Rigid | Translations deriving (Int -> TransformationTypes -> ShowS
+data TransformationTypes = Affine | Rigid | Translations deriving (Int -> TransformationTypes -> ShowS
 [TransformationTypes] -> ShowS
 TransformationTypes -> String
 (Int -> TransformationTypes -> ShowS)
@@ -867,7 +867,7 @@
 show :: TransformationTypes -> String
 $cshowList :: [TransformationTypes] -> ShowS
 showList :: [TransformationTypes] -> ShowS
-Show,ReadPrec [TransformationTypes]
+Show,ReadPrec [TransformationTypes]
 ReadPrec TransformationTypes
 Int -> ReadS TransformationTypes
 ReadS [TransformationTypes]
@@ -887,7 +887,7 @@
 readPrec :: ReadPrec TransformationTypes
 $creadListPrec :: ReadPrec [TransformationTypes]
 readListPrec :: ReadPrec [TransformationTypes]
-Read,TransformationTypes -> TransformationTypes -> Bool
+Read,TransformationTypes -> TransformationTypes -> Bool
 (TransformationTypes -> TransformationTypes -> Bool)
 -> (TransformationTypes -> TransformationTypes -> Bool)
 -> Eq TransformationTypes
@@ -896,7 +896,7 @@
 == :: TransformationTypes -> TransformationTypes -> Bool
 $c/= :: TransformationTypes -> TransformationTypes -> Bool
 /= :: TransformationTypes -> TransformationTypes -> Bool
-Eq,Int -> TransformationTypes
+Eq,Int -> TransformationTypes
 TransformationTypes -> Int
 TransformationTypes -> [TransformationTypes]
 TransformationTypes -> TransformationTypes
@@ -961,7 +961,7 @@
 -- applies here.
 
 data HorizontalAlignment = AlignLeft | AlignHCenter | AlignRight
-                         deriving (Int -> HorizontalAlignment -> ShowS
+                         deriving (Int -> HorizontalAlignment -> ShowS
 [HorizontalAlignment] -> ShowS
 HorizontalAlignment -> String
 (Int -> HorizontalAlignment -> ShowS)
@@ -976,7 +976,7 @@
 show :: HorizontalAlignment -> String
 $cshowList :: [HorizontalAlignment] -> ShowS
 showList :: [HorizontalAlignment] -> ShowS
-Show,ReadPrec [HorizontalAlignment]
+Show,ReadPrec [HorizontalAlignment]
 ReadPrec HorizontalAlignment
 Int -> ReadS HorizontalAlignment
 ReadS [HorizontalAlignment]
@@ -996,7 +996,7 @@
 readPrec :: ReadPrec HorizontalAlignment
 $creadListPrec :: ReadPrec [HorizontalAlignment]
 readListPrec :: ReadPrec [HorizontalAlignment]
-Read,HorizontalAlignment -> HorizontalAlignment -> Bool
+Read,HorizontalAlignment -> HorizontalAlignment -> Bool
 (HorizontalAlignment -> HorizontalAlignment -> Bool)
 -> (HorizontalAlignment -> HorizontalAlignment -> Bool)
 -> Eq HorizontalAlignment
@@ -1005,7 +1005,7 @@
 == :: HorizontalAlignment -> HorizontalAlignment -> Bool
 $c/= :: HorizontalAlignment -> HorizontalAlignment -> Bool
 /= :: HorizontalAlignment -> HorizontalAlignment -> Bool
-Eq,Eq HorizontalAlignment
+Eq,Eq HorizontalAlignment
 Eq HorizontalAlignment =>
 (HorizontalAlignment -> HorizontalAlignment -> Ordering)
 -> (HorizontalAlignment -> HorizontalAlignment -> Bool)
@@ -1044,7 +1044,7 @@
 max :: HorizontalAlignment -> HorizontalAlignment -> HorizontalAlignment
 $cmin :: HorizontalAlignment -> HorizontalAlignment -> HorizontalAlignment
 min :: HorizontalAlignment -> HorizontalAlignment -> HorizontalAlignment
-Ord,Int -> HorizontalAlignment
+Ord,Int -> HorizontalAlignment
 HorizontalAlignment -> Int
 HorizontalAlignment -> [HorizontalAlignment]
 HorizontalAlignment -> HorizontalAlignment
@@ -1102,7 +1102,7 @@
 Enum)
 
 data VerticalAlignment = AlignTop | AlignVCenter | AlignBottom | AlignBaseline
-                       deriving (Int -> VerticalAlignment -> ShowS
+                       deriving (Int -> VerticalAlignment -> ShowS
 [VerticalAlignment] -> ShowS
 VerticalAlignment -> String
 (Int -> VerticalAlignment -> ShowS)
@@ -1117,7 +1117,7 @@
 show :: VerticalAlignment -> String
 $cshowList :: [VerticalAlignment] -> ShowS
 showList :: [VerticalAlignment] -> ShowS
-Show,ReadPrec [VerticalAlignment]
+Show,ReadPrec [VerticalAlignment]
 ReadPrec VerticalAlignment
 Int -> ReadS VerticalAlignment
 ReadS [VerticalAlignment]
@@ -1137,7 +1137,7 @@
 readPrec :: ReadPrec VerticalAlignment
 $creadListPrec :: ReadPrec [VerticalAlignment]
 readListPrec :: ReadPrec [VerticalAlignment]
-Read,VerticalAlignment -> VerticalAlignment -> Bool
+Read,VerticalAlignment -> VerticalAlignment -> Bool
 (VerticalAlignment -> VerticalAlignment -> Bool)
 -> (VerticalAlignment -> VerticalAlignment -> Bool)
 -> Eq VerticalAlignment
@@ -1146,7 +1146,7 @@
 == :: VerticalAlignment -> VerticalAlignment -> Bool
 $c/= :: VerticalAlignment -> VerticalAlignment -> Bool
 /= :: VerticalAlignment -> VerticalAlignment -> Bool
-Eq,Eq VerticalAlignment
+Eq,Eq VerticalAlignment
 Eq VerticalAlignment =>
 (VerticalAlignment -> VerticalAlignment -> Ordering)
 -> (VerticalAlignment -> VerticalAlignment -> Bool)
@@ -1183,7 +1183,7 @@
 max :: VerticalAlignment -> VerticalAlignment -> VerticalAlignment
 $cmin :: VerticalAlignment -> VerticalAlignment -> VerticalAlignment
 min :: VerticalAlignment -> VerticalAlignment -> VerticalAlignment
-Ord,Int -> VerticalAlignment
+Ord,Int -> VerticalAlignment
 VerticalAlignment -> Int
 VerticalAlignment -> [VerticalAlignment]
 VerticalAlignment -> VerticalAlignment
@@ -1234,7 +1234,7 @@
 type TeXStyle = Text
 
 -- | size of text in points
-type TextSizeUnit r = r
+type TextSizeUnit r = r
 
 --------------------------------------------------------------------------------
 -- * Symbol Attributes
@@ -1244,7 +1244,7 @@
 --                              deriving (Show,Eq)
 
 -- | Size
-newtype IpeSize  r = IpeSize  (IpeValue r) deriving (Int -> IpeSize r -> ShowS
+newtype IpeSize  r = IpeSize  (IpeValue r) deriving (Int -> IpeSize r -> ShowS
 [IpeSize r] -> ShowS
 IpeSize r -> String
 (Int -> IpeSize r -> ShowS)
@@ -1262,7 +1262,7 @@
 show :: IpeSize r -> String
 $cshowList :: forall r. Show r => [IpeSize r] -> ShowS
 showList :: [IpeSize r] -> ShowS
-Show,IpeSize r -> IpeSize r -> Bool
+Show,IpeSize r -> IpeSize r -> Bool
 (IpeSize r -> IpeSize r -> Bool)
 -> (IpeSize r -> IpeSize r -> Bool) -> Eq (IpeSize r)
 forall r. Eq r => IpeSize r -> IpeSize r -> Bool
@@ -1271,7 +1271,7 @@
 == :: IpeSize r -> IpeSize r -> Bool
 $c/= :: forall r. Eq r => IpeSize r -> IpeSize r -> Bool
 /= :: IpeSize r -> IpeSize r -> Bool
-Eq,Eq (IpeSize r)
+Eq,Eq (IpeSize r)
 Eq (IpeSize r) =>
 (IpeSize r -> IpeSize r -> Ordering)
 -> (IpeSize r -> IpeSize r -> Bool)
@@ -1312,7 +1312,7 @@
 max :: IpeSize r -> IpeSize r -> IpeSize r
 $cmin :: forall r. Ord r => IpeSize r -> IpeSize r -> IpeSize r
 min :: IpeSize r -> IpeSize r -> IpeSize r
-Ord,(forall a b. (a -> b) -> IpeSize a -> IpeSize b)
+Ord,(forall a b. (a -> b) -> IpeSize a -> IpeSize b)
 -> (forall a b. a -> IpeSize b -> IpeSize a) -> Functor IpeSize
 forall a b. a -> IpeSize b -> IpeSize a
 forall a b. (a -> b) -> IpeSize a -> IpeSize b
@@ -1323,7 +1323,7 @@
 fmap :: forall a b. (a -> b) -> IpeSize a -> IpeSize b
 $c<$ :: forall a b. a -> IpeSize b -> IpeSize a
 <$ :: forall a b. a -> IpeSize b -> IpeSize a
-Functor,(forall m. Monoid m => IpeSize m -> m)
+Functor,(forall m. Monoid m => IpeSize m -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpeSize a -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpeSize a -> m)
 -> (forall a b. (a -> b -> b) -> b -> IpeSize a -> b)
@@ -1405,7 +1405,7 @@
 sum :: forall a. Num a => IpeSize a -> a
 $cproduct :: forall a. Num a => IpeSize a -> a
 product :: forall a. Num a => IpeSize a -> a
-Foldable,Functor IpeSize
+Foldable,Functor IpeSize
 Foldable IpeSize
 (Functor IpeSize, Foldable IpeSize) =>
 (forall (f :: * -> *) a b.
@@ -1464,7 +1464,7 @@
 sequence :: forall (m :: * -> *) a. Monad m => IpeSize (m a) -> m (IpeSize a)
 Traversable)
 -- | Pen/Thickness
-newtype IpePen   r = IpePen   (IpeValue r) deriving (Int -> IpePen r -> ShowS
+newtype IpePen   r = IpePen   (IpeValue r) deriving (Int -> IpePen r -> ShowS
 [IpePen r] -> ShowS
 IpePen r -> String
 (Int -> IpePen r -> ShowS)
@@ -1480,7 +1480,7 @@
 show :: IpePen r -> String
 $cshowList :: forall r. Show r => [IpePen r] -> ShowS
 showList :: [IpePen r] -> ShowS
-Show,IpePen r -> IpePen r -> Bool
+Show,IpePen r -> IpePen r -> Bool
 (IpePen r -> IpePen r -> Bool)
 -> (IpePen r -> IpePen r -> Bool) -> Eq (IpePen r)
 forall r. Eq r => IpePen r -> IpePen r -> Bool
@@ -1489,7 +1489,7 @@
 == :: IpePen r -> IpePen r -> Bool
 $c/= :: forall r. Eq r => IpePen r -> IpePen r -> Bool
 /= :: IpePen r -> IpePen r -> Bool
-Eq,Eq (IpePen r)
+Eq,Eq (IpePen r)
 Eq (IpePen r) =>
 (IpePen r -> IpePen r -> Ordering)
 -> (IpePen r -> IpePen r -> Bool)
@@ -1530,7 +1530,7 @@
 max :: IpePen r -> IpePen r -> IpePen r
 $cmin :: forall r. Ord r => IpePen r -> IpePen r -> IpePen r
 min :: IpePen r -> IpePen r -> IpePen r
-Ord,(forall a b. (a -> b) -> IpePen a -> IpePen b)
+Ord,(forall a b. (a -> b) -> IpePen a -> IpePen b)
 -> (forall a b. a -> IpePen b -> IpePen a) -> Functor IpePen
 forall a b. a -> IpePen b -> IpePen a
 forall a b. (a -> b) -> IpePen a -> IpePen b
@@ -1541,7 +1541,7 @@
 fmap :: forall a b. (a -> b) -> IpePen a -> IpePen b
 $c<$ :: forall a b. a -> IpePen b -> IpePen a
 <$ :: forall a b. a -> IpePen b -> IpePen a
-Functor,(forall m. Monoid m => IpePen m -> m)
+Functor,(forall m. Monoid m => IpePen m -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpePen a -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpePen a -> m)
 -> (forall a b. (a -> b -> b) -> b -> IpePen a -> b)
@@ -1623,7 +1623,7 @@
 sum :: forall a. Num a => IpePen a -> a
 $cproduct :: forall a. Num a => IpePen a -> a
 product :: forall a. Num a => IpePen a -> a
-Foldable,Functor IpePen
+Foldable,Functor IpePen
 Foldable IpePen
 (Functor IpePen, Foldable IpePen) =>
 (forall (f :: * -> *) a b.
@@ -1686,9 +1686,9 @@
 -- * Path Attributes
 
 -- | Possible values for Dash
-data IpeDash r = DashNamed Text
-               | DashPattern [r] r
-               deriving (Int -> IpeDash r -> ShowS
+data IpeDash r = DashNamed Text
+               | DashPattern [r] r
+               deriving (Int -> IpeDash r -> ShowS
 [IpeDash r] -> ShowS
 IpeDash r -> String
 (Int -> IpeDash r -> ShowS)
@@ -1706,7 +1706,7 @@
 show :: IpeDash r -> String
 $cshowList :: forall r. Show r => [IpeDash r] -> ShowS
 showList :: [IpeDash r] -> ShowS
-Show,IpeDash r -> IpeDash r -> Bool
+Show,IpeDash r -> IpeDash r -> Bool
 (IpeDash r -> IpeDash r -> Bool)
 -> (IpeDash r -> IpeDash r -> Bool) -> Eq (IpeDash r)
 forall r. Eq r => IpeDash r -> IpeDash r -> Bool
@@ -1715,7 +1715,7 @@
 == :: IpeDash r -> IpeDash r -> Bool
 $c/= :: forall r. Eq r => IpeDash r -> IpeDash r -> Bool
 /= :: IpeDash r -> IpeDash r -> Bool
-Eq,(forall a b. (a -> b) -> IpeDash a -> IpeDash b)
+Eq,(forall a b. (a -> b) -> IpeDash a -> IpeDash b)
 -> (forall a b. a -> IpeDash b -> IpeDash a) -> Functor IpeDash
 forall a b. a -> IpeDash b -> IpeDash a
 forall a b. (a -> b) -> IpeDash a -> IpeDash b
@@ -1726,7 +1726,7 @@
 fmap :: forall a b. (a -> b) -> IpeDash a -> IpeDash b
 $c<$ :: forall a b. a -> IpeDash b -> IpeDash a
 <$ :: forall a b. a -> IpeDash b -> IpeDash a
-Functor,(forall m. Monoid m => IpeDash m -> m)
+Functor,(forall m. Monoid m => IpeDash m -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpeDash a -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpeDash a -> m)
 -> (forall a b. (a -> b -> b) -> b -> IpeDash a -> b)
@@ -1808,7 +1808,7 @@
 sum :: forall a. Num a => IpeDash a -> a
 $cproduct :: forall a. Num a => IpeDash a -> a
 product :: forall a. Num a => IpeDash a -> a
-Foldable,Functor IpeDash
+Foldable,Functor IpeDash
 Foldable IpeDash
 (Functor IpeDash, Foldable IpeDash) =>
 (forall (f :: * -> *) a b.
@@ -1868,7 +1868,7 @@
 Traversable)
 
 -- | Allowed Fill types
-data FillType = Wind | EOFill deriving (Int -> FillType -> ShowS
+data FillType = Wind | EOFill deriving (Int -> FillType -> ShowS
 [FillType] -> ShowS
 FillType -> String
 (Int -> FillType -> ShowS)
@@ -1881,7 +1881,7 @@
 show :: FillType -> String
 $cshowList :: [FillType] -> ShowS
 showList :: [FillType] -> ShowS
-Show,ReadPrec [FillType]
+Show,ReadPrec [FillType]
 ReadPrec FillType
 Int -> ReadS FillType
 ReadS [FillType]
@@ -1901,7 +1901,7 @@
 readPrec :: ReadPrec FillType
 $creadListPrec :: ReadPrec [FillType]
 readListPrec :: ReadPrec [FillType]
-Read,FillType -> FillType -> Bool
+Read,FillType -> FillType -> Bool
 (FillType -> FillType -> Bool)
 -> (FillType -> FillType -> Bool) -> Eq FillType
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -1917,11 +1917,11 @@
 type IpeGradient = Text
 
 -- | Possible values for an ipe arrow
-data IpeArrow r = IpeArrow { forall r. IpeArrow r -> Text
+data IpeArrow r = IpeArrow { forall r. IpeArrow r -> Text
 _arrowName :: Text
                            , forall r. IpeArrow r -> IpeSize r
-_arrowSize :: IpeSize r
-                           } deriving (Int -> IpeArrow r -> ShowS
+_arrowSize :: IpeSize r
+                           } deriving (Int -> IpeArrow r -> ShowS
 [IpeArrow r] -> ShowS
 IpeArrow r -> String
 (Int -> IpeArrow r -> ShowS)
@@ -1939,7 +1939,7 @@
 show :: IpeArrow r -> String
 $cshowList :: forall r. Show r => [IpeArrow r] -> ShowS
 showList :: [IpeArrow r] -> ShowS
-Show,IpeArrow r -> IpeArrow r -> Bool
+Show,IpeArrow r -> IpeArrow r -> Bool
 (IpeArrow r -> IpeArrow r -> Bool)
 -> (IpeArrow r -> IpeArrow r -> Bool) -> Eq (IpeArrow r)
 forall r. Eq r => IpeArrow r -> IpeArrow r -> Bool
@@ -1948,7 +1948,7 @@
 == :: IpeArrow r -> IpeArrow r -> Bool
 $c/= :: forall r. Eq r => IpeArrow r -> IpeArrow r -> Bool
 /= :: IpeArrow r -> IpeArrow r -> Bool
-Eq,(forall a b. (a -> b) -> IpeArrow a -> IpeArrow b)
+Eq,(forall a b. (a -> b) -> IpeArrow a -> IpeArrow b)
 -> (forall a b. a -> IpeArrow b -> IpeArrow a) -> Functor IpeArrow
 forall a b. a -> IpeArrow b -> IpeArrow a
 forall a b. (a -> b) -> IpeArrow a -> IpeArrow b
@@ -1959,7 +1959,7 @@
 fmap :: forall a b. (a -> b) -> IpeArrow a -> IpeArrow b
 $c<$ :: forall a b. a -> IpeArrow b -> IpeArrow a
 <$ :: forall a b. a -> IpeArrow b -> IpeArrow a
-Functor,(forall m. Monoid m => IpeArrow m -> m)
+Functor,(forall m. Monoid m => IpeArrow m -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpeArrow a -> m)
 -> (forall m a. Monoid m => (a -> m) -> IpeArrow a -> m)
 -> (forall a b. (a -> b -> b) -> b -> IpeArrow a -> b)
@@ -2041,7 +2041,7 @@
 sum :: forall a. Num a => IpeArrow a -> a
 $cproduct :: forall a. Num a => IpeArrow a -> a
 product :: forall a. Num a => IpeArrow a -> a
-Foldable,Functor IpeArrow
+Foldable,Functor IpeArrow
 Foldable IpeArrow
 (Functor IpeArrow, Foldable IpeArrow) =>
 (forall (f :: * -> *) a b.
@@ -2099,10 +2099,10 @@
 $csequence :: forall (m :: * -> *) a. Monad m => IpeArrow (m a) -> m (IpeArrow a)
 sequence :: forall (m :: * -> *) a. Monad m => IpeArrow (m a) -> m (IpeArrow a)
 Traversable)
-makeLenses ''IpeArrow
+makeLenses ''IpeArrow
 
 -- | A normal arrow
-normalArrow :: IpeArrow r
+normalArrow :: IpeArrow r
 normalArrow :: forall r. IpeArrow r
 normalArrow = Text -> IpeSize r -> IpeArrow r
 forall r. Text -> IpeSize r -> IpeArrow r
@@ -2130,123 +2130,123 @@
 
 -- | For the types representing attribute values we can get the name/key to use
 -- when serializing to ipe.
-class IpeAttrName (a :: AttributeUniverse) where
-  attrName :: proxy a -> Text
+class IpeAttrName (a :: AttributeUniverse) where
+  attrName :: proxy a -> Text
 
 -- CommonAttributeUnivers
-instance IpeAttrName Layer           where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Layer -> Text
+instance IpeAttrName Layer           where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Layer -> Text
 attrName proxy 'Layer
 _ = Text
 "layer"
-instance IpeAttrName Matrix          where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Matrix -> Text
+instance IpeAttrName Matrix          where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Matrix -> Text
 attrName proxy 'Matrix
 _ = Text
 "matrix"
-instance IpeAttrName Pin             where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Pin -> Text
+instance IpeAttrName Pin             where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Pin -> Text
 attrName proxy 'Pin
 _ = Text
 "pin"
-instance IpeAttrName Transformations where attrName :: forall (proxy :: AttributeUniverse -> *).
+instance IpeAttrName Transformations where attrName :: forall (proxy :: AttributeUniverse -> *).
 proxy 'Transformations -> Text
 attrName proxy 'Transformations
 _ = Text
 "transformations"
 
 -- IpeSymbolAttributeUniversre
-instance IpeAttrName Stroke       where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Stroke -> Text
+instance IpeAttrName Stroke       where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Stroke -> Text
 attrName proxy 'Stroke
 _ = Text
 "stroke"
-instance IpeAttrName Fill         where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Fill -> Text
+instance IpeAttrName Fill         where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Fill -> Text
 attrName proxy 'Fill
 _ = Text
 "fill"
-instance IpeAttrName Pen          where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Pen -> Text
+instance IpeAttrName Pen          where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Pen -> Text
 attrName proxy 'Pen
 _ = Text
 "pen"
-instance IpeAttrName Size         where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Size -> Text
+instance IpeAttrName Size         where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Size -> Text
 attrName proxy 'Size
 _ = Text
 "size"
 
 -- PathAttributeUniverse
-instance IpeAttrName Dash       where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Dash -> Text
+instance IpeAttrName Dash       where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Dash -> Text
 attrName proxy 'Dash
 _ = Text
 "dash"
-instance IpeAttrName LineCap    where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'LineCap -> Text
+instance IpeAttrName LineCap    where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'LineCap -> Text
 attrName proxy 'LineCap
 _ = Text
 "cap"
-instance IpeAttrName LineJoin   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'LineJoin -> Text
+instance IpeAttrName LineJoin   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'LineJoin -> Text
 attrName proxy 'LineJoin
 _ = Text
 "join"
-instance IpeAttrName FillRule   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'FillRule -> Text
+instance IpeAttrName FillRule   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'FillRule -> Text
 attrName proxy 'FillRule
 _ = Text
 "fillrule"
-instance IpeAttrName Arrow      where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Arrow -> Text
+instance IpeAttrName Arrow      where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Arrow -> Text
 attrName proxy 'Arrow
 _ = Text
 "arrow"
-instance IpeAttrName RArrow     where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'RArrow -> Text
+instance IpeAttrName RArrow     where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'RArrow -> Text
 attrName proxy 'RArrow
 _ = Text
 "rarrow"
-instance IpeAttrName StrokeOpacity where attrName :: forall (proxy :: AttributeUniverse -> *).
+instance IpeAttrName StrokeOpacity where attrName :: forall (proxy :: AttributeUniverse -> *).
 proxy 'StrokeOpacity -> Text
 attrName proxy 'StrokeOpacity
 _ = Text
 "stroke-opacity"
-instance IpeAttrName Opacity    where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Opacity -> Text
+instance IpeAttrName Opacity    where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Opacity -> Text
 attrName proxy 'Opacity
 _ = Text
 "opacity"
-instance IpeAttrName Tiling     where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Tiling -> Text
+instance IpeAttrName Tiling     where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Tiling -> Text
 attrName proxy 'Tiling
 _ = Text
 "tiling"
-instance IpeAttrName Gradient   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Gradient -> Text
+instance IpeAttrName Gradient   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Gradient -> Text
 attrName proxy 'Gradient
 _ = Text
 "gradient"
 
 -- TextAttibuteUniverse
-instance IpeAttrName Width   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Width -> Text
+instance IpeAttrName Width   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Width -> Text
 attrName proxy 'Width
 _ = Text
 "width"
-instance IpeAttrName Height  where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Height -> Text
+instance IpeAttrName Height  where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Height -> Text
 attrName proxy 'Height
 _ = Text
 "height"
-instance IpeAttrName Depth   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Depth -> Text
+instance IpeAttrName Depth   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Depth -> Text
 attrName proxy 'Depth
 _ = Text
 "depth"
-instance IpeAttrName VAlign  where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'VAlign -> Text
+instance IpeAttrName VAlign  where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'VAlign -> Text
 attrName proxy 'VAlign
 _ = Text
 "valign"
-instance IpeAttrName HAlign  where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'HAlign -> Text
+instance IpeAttrName HAlign  where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'HAlign -> Text
 attrName proxy 'HAlign
 _ = Text
 "halign"
-instance IpeAttrName Style   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Style -> Text
+instance IpeAttrName Style   where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Style -> Text
 attrName proxy 'Style
 _ = Text
 "style"
 
 -- GroupAttributeUniverse
-instance IpeAttrName Clip     where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Clip -> Text
+instance IpeAttrName Clip     where attrName :: forall (proxy :: AttributeUniverse -> *). proxy 'Clip -> Text
 attrName proxy 'Clip
 _ = Text
 "clip"
 
 -- | Writing Attribute names
-writeAttrNames           :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs
+writeAttrNames           :: AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs
 writeAttrNames :: forall (rs :: [AttributeUniverse]) (f :: AttributeUniverse -> *).
 AllConstrained IpeAttrName rs =>
 Rec f rs -> Rec (Const Text) rs
@@ -2255,16 +2255,16 @@
 Rec (Const Text) '[]
 forall {u} (a :: u -> *). Rec a '[]
 RNil
-writeAttrNames (f r
-x :& Rec f rs
-xs) = Text -> Const Text r
+writeAttrNames (f r
+x :& Rec f rs
+xs) = Text -> Const Text r
 forall k a (b :: k). a -> Const a b
 Const (f r -> Text
 forall (f :: AttributeUniverse -> *) (s :: AttributeUniverse).
 IpeAttrName s =>
 f s -> Text
-write'' f r
-x) Const Text r -> Rec (Const Text) rs -> Rec (Const Text) (r : rs)
+write'' f r
+x) Const Text r -> Rec (Const Text) rs -> Rec (Const Text) (r : rs)
 forall {u} (a :: u -> *) (r :: u) (rs :: [u]).
 a r -> Rec a rs -> Rec a (r : rs)
 :& Rec f rs -> Rec (Const Text) rs
@@ -2272,13 +2272,13 @@
 AllConstrained IpeAttrName rs =>
 Rec f rs -> Rec (Const Text) rs
 writeAttrNames Rec f rs
-xs
+xs
   where
-    write''   :: forall f s. IpeAttrName s => f s -> Text
-    write'' :: forall (f :: AttributeUniverse -> *) (s :: AttributeUniverse).
+    write''   :: forall f s. IpeAttrName s => f s -> Text
+    write'' :: forall (f :: AttributeUniverse -> *) (s :: AttributeUniverse).
 IpeAttrName s =>
 f s -> Text
-write'' f s
+write'' f s
 _ = Proxy s -> Text
 forall (a :: AttributeUniverse) (proxy :: AttributeUniverse -> *).
 IpeAttrName a =>
@@ -2286,7 +2286,7 @@
 forall (proxy :: AttributeUniverse -> *). proxy s -> Text
 attrName (Proxy s
 forall {k} (t :: k). Proxy t
-Proxy :: Proxy s)
+Proxy :: Proxy s)
 
 --
 
diff --git a/haddocks/hgeometry/ipe/src/Ipe.Color.html b/haddocks/hgeometry/ipe/src/Ipe.Color.html
index e3ba1d02f..a2ccffd94 100644
--- a/haddocks/hgeometry/ipe/src/Ipe.Color.html
+++ b/haddocks/hgeometry/ipe/src/Ipe.Color.html
@@ -20,7 +20,7 @@
 
 -- | Defines a color in Ipe. Colors are either RGB Values or Named
 -- values.
-newtype IpeColor r = IpeColor (IpeValue (RGB r)) deriving (Int -> IpeColor r -> ShowS
+newtype IpeColor r = IpeColor (IpeValue (RGB r)) deriving (Int -> IpeColor r -> ShowS
 [IpeColor r] -> ShowS
 IpeColor r -> String
 (Int -> IpeColor r -> ShowS)
@@ -38,7 +38,7 @@
 show :: IpeColor r -> String
 $cshowList :: forall r. Show r => [IpeColor r] -> ShowS
 showList :: [IpeColor r] -> ShowS
-Show,ReadPrec [IpeColor r]
+Show,ReadPrec [IpeColor r]
 ReadPrec (IpeColor r)
 Int -> ReadS (IpeColor r)
 ReadS [IpeColor r]
@@ -62,7 +62,7 @@
 readPrec :: ReadPrec (IpeColor r)
 $creadListPrec :: forall r. Read r => ReadPrec [IpeColor r]
 readListPrec :: ReadPrec [IpeColor r]
-Read,IpeColor r -> IpeColor r -> Bool
+Read,IpeColor r -> IpeColor r -> Bool
 (IpeColor r -> IpeColor r -> Bool)
 -> (IpeColor r -> IpeColor r -> Bool) -> Eq (IpeColor r)
 forall r. Eq r => IpeColor r -> IpeColor r -> Bool
@@ -73,54 +73,54 @@
 /= :: IpeColor r -> IpeColor r -> Bool
 Eq)
 
-instance Ord r => Ord (IpeColor r) where
-  (IpeColor IpeValue (RGB r)
-c) compare :: IpeColor r -> IpeColor r -> Ordering
-`compare` (IpeColor IpeValue (RGB r)
-c') = (RGB r -> (r, r, r)) -> IpeValue (RGB r) -> IpeValue (r, r, r)
+instance Ord r => Ord (IpeColor r) where
+  (IpeColor IpeValue (RGB r)
+c) compare :: IpeColor r -> IpeColor r -> Ordering
+`compare` (IpeColor IpeValue (RGB r)
+c') = (RGB r -> (r, r, r)) -> IpeValue (RGB r) -> IpeValue (r, r, r)
 forall a b. (a -> b) -> IpeValue a -> IpeValue b
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 fmap RGB r -> (r, r, r)
 forall {c}. RGB c -> (c, c, c)
-f IpeValue (RGB r)
-c IpeValue (r, r, r) -> IpeValue (r, r, r) -> Ordering
+f IpeValue (RGB r)
+c IpeValue (r, r, r) -> IpeValue (r, r, r) -> Ordering
 forall a. Ord a => a -> a -> Ordering
 `compare` (RGB r -> (r, r, r)) -> IpeValue (RGB r) -> IpeValue (r, r, r)
 forall a b. (a -> b) -> IpeValue a -> IpeValue b
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 fmap RGB r -> (r, r, r)
 forall {c}. RGB c -> (c, c, c)
-f IpeValue (RGB r)
-c'
+f IpeValue (RGB r)
+c'
     where
-      f :: RGB c -> (c, c, c)
-f (RGB c
-r c
-g c
-b) = (c
-r,c
-g,c
-b)
+      f :: RGB c -> (c, c, c)
+f (RGB c
+r c
+g c
+b) = (c
+r,c
+g,c
+b)
 
-instance Functor IpeColor where
-  fmap :: forall a b. (a -> b) -> IpeColor a -> IpeColor b
+instance Functor IpeColor where
+  fmap :: forall a b. (a -> b) -> IpeColor a -> IpeColor b
 fmap = (a -> b) -> IpeColor a -> IpeColor b
 forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
 fmapDefault
-instance Foldable IpeColor where
-  foldMap :: forall m a. Monoid m => (a -> m) -> IpeColor a -> m
-foldMap = (a -> m) -> IpeColor a -> m
+instance Foldable IpeColor where
+  foldMap :: forall m a. Monoid m => (a -> m) -> IpeColor a -> m
+foldMap = (a -> m) -> IpeColor a -> m
 forall (t :: * -> *) m a.
 (Traversable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMapDefault
-instance Traversable IpeColor where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable IpeColor where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> IpeColor a -> f (IpeColor b)
-traverse a -> f b
-f (IpeColor IpeValue (RGB a)
-v) = IpeValue (RGB b) -> IpeColor b
+traverse a -> f b
+f (IpeColor IpeValue (RGB a)
+v) = IpeValue (RGB b) -> IpeColor b
 forall r. IpeValue (RGB r) -> IpeColor r
 IpeColor (IpeValue (RGB b) -> IpeColor b)
 -> f (IpeValue (RGB b)) -> f (IpeColor b)
@@ -133,33 +133,33 @@
 Applicative f =>
 (a -> f b) -> IpeValue a -> f (IpeValue b)
 traverse RGB a -> f (RGB b)
-traverseRGB IpeValue (RGB a)
-v
+traverseRGB IpeValue (RGB a)
+v
     where
-      traverseRGB :: RGB a -> f (RGB b)
-traverseRGB (RGB a
-r a
-g a
-b) = b -> b -> b -> RGB b
+      traverseRGB :: RGB a -> f (RGB b)
+traverseRGB (RGB a
+r a
+g a
+b) = b -> b -> b -> RGB b
 forall a. a -> a -> a -> RGB a
 RGB (b -> b -> b -> RGB b) -> f b -> f (b -> b -> RGB b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> a -> f b
-f a
-r f (b -> b -> RGB b) -> f b -> f (b -> RGB b)
+f a
+r f (b -> b -> RGB b) -> f b -> f (b -> RGB b)
 forall a b. f (a -> b) -> f a -> f b
 forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
 <*> a -> f b
-f a
-g f (b -> RGB b) -> f b -> f (RGB b)
+f a
+g f (b -> RGB b) -> f b -> f (RGB b)
 forall a b. f (a -> b) -> f a -> f b
 forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
 <*> a -> f b
-f a
-b
+f a
+b
 
 -- | Creates a named color
-named :: Text -> IpeColor r
+named :: Text -> IpeColor r
 named :: forall r. Text -> IpeColor r
 named = IpeValue (RGB r) -> IpeColor r
 forall r. IpeValue (RGB r) -> IpeColor r
@@ -173,7 +173,7 @@
 --------------------------------------------------------------------------------
 
 -- | All basic named colors
-basicNamedColors :: [IpeColor r]
+basicNamedColors :: [IpeColor r]
 basicNamedColors :: forall r. [IpeColor r]
 basicNamedColors = [ IpeColor r
 forall r. IpeColor r
@@ -264,196 +264,196 @@
 --------------------------------------------------------------------------------
 -- * Basic Named colors
 
-black :: IpeColor r
+black :: IpeColor r
 black :: forall r. IpeColor r
 black = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "black"
 
-white :: IpeColor r
+white :: IpeColor r
 white :: forall r. IpeColor r
 white = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "white"
 
-red :: IpeColor r
+red :: IpeColor r
 red :: forall r. IpeColor r
 red = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "red"
 
-green :: IpeColor r
+green :: IpeColor r
 green :: forall r. IpeColor r
 green = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "green"
 
-blue :: IpeColor r
+blue :: IpeColor r
 blue :: forall r. IpeColor r
 blue = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "blue"
 
-yellow :: IpeColor r
+yellow :: IpeColor r
 yellow :: forall r. IpeColor r
 yellow = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "yellow"
 
-orange :: IpeColor r
+orange :: IpeColor r
 orange :: forall r. IpeColor r
 orange = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "orange"
 
-gold :: IpeColor r
+gold :: IpeColor r
 gold :: forall r. IpeColor r
 gold = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "gold"
 
-purple :: IpeColor r
+purple :: IpeColor r
 purple :: forall r. IpeColor r
 purple = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "purple"
 
-gray :: IpeColor r
+gray :: IpeColor r
 gray :: forall r. IpeColor r
 gray = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "gray"
 
-brown :: IpeColor r
+brown :: IpeColor r
 brown :: forall r. IpeColor r
 brown = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "brown"
 
-navy :: IpeColor r
+navy :: IpeColor r
 navy :: forall r. IpeColor r
 navy = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "navy"
 
-pink :: IpeColor r
+pink :: IpeColor r
 pink :: forall r. IpeColor r
 pink = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "pink"
 
-seagreen :: IpeColor r
+seagreen :: IpeColor r
 seagreen :: forall r. IpeColor r
 seagreen = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "seagreen"
 
-turquoise :: IpeColor r
+turquoise :: IpeColor r
 turquoise :: forall r. IpeColor r
 turquoise = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "turquoise"
 
-violet :: IpeColor r
+violet :: IpeColor r
 violet :: forall r. IpeColor r
 violet = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "violet"
 
-darkblue :: IpeColor r
+darkblue :: IpeColor r
 darkblue :: forall r. IpeColor r
 darkblue = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "darkblue"
 
-darkcyan :: IpeColor r
+darkcyan :: IpeColor r
 darkcyan :: forall r. IpeColor r
 darkcyan = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "darkcyan"
 
-darkgray :: IpeColor r
+darkgray :: IpeColor r
 darkgray :: forall r. IpeColor r
 darkgray = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "darkgray"
 
-darkgreen :: IpeColor r
+darkgreen :: IpeColor r
 darkgreen :: forall r. IpeColor r
 darkgreen = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "darkgreen"
 
-darkmagenta :: IpeColor r
+darkmagenta :: IpeColor r
 darkmagenta :: forall r. IpeColor r
 darkmagenta = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "darkmagenta"
 
-darkorange :: IpeColor r
+darkorange :: IpeColor r
 darkorange :: forall r. IpeColor r
 darkorange = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "darkorange"
 
-darkred :: IpeColor r
+darkred :: IpeColor r
 darkred :: forall r. IpeColor r
 darkred = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "darkred"
 
-lightblue :: IpeColor r
+lightblue :: IpeColor r
 lightblue :: forall r. IpeColor r
 lightblue = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "lightblue"
 
-lightcyan :: IpeColor r
+lightcyan :: IpeColor r
 lightcyan :: forall r. IpeColor r
 lightcyan = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "lightcyan"
 
-lightgray :: IpeColor r
+lightgray :: IpeColor r
 lightgray :: forall r. IpeColor r
 lightgray = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "lightgray"
 
-lightgreen :: IpeColor r
+lightgreen :: IpeColor r
 lightgreen :: forall r. IpeColor r
 lightgreen = Text -> IpeColor r
 forall r. Text -> IpeColor r
 named Text
 "lightgreen"
 
-lightyellow :: IpeColor r
+lightyellow :: IpeColor r
 lightyellow :: forall r. IpeColor r
 lightyellow = Text -> IpeColor r
 forall r. Text -> IpeColor r
diff --git a/haddocks/hgeometry/ipe/src/Ipe.Content.html b/haddocks/hgeometry/ipe/src/Ipe.Content.html
index 5c3f9b7dd..08530b1f8 100644
--- a/haddocks/hgeometry/ipe/src/Ipe.Content.html
+++ b/haddocks/hgeometry/ipe/src/Ipe.Content.html
@@ -48,11 +48,11 @@
 --------------------------------------------------------------------------------
 -- | Image Objects
 
-data Image r = Image { forall r. Image r -> ()
+data Image r = Image { forall r. Image r -> ()
 _imageData :: ()
                      , forall r. Image r -> Rectangle (Point 2 r)
-_rect      :: Rectangle (Point 2 r)
-                     } deriving (Int -> Image r -> ShowS
+_rect      :: Rectangle (Point 2 r)
+                     } deriving (Int -> Image r -> ShowS
 [Image r] -> ShowS
 Image r -> String
 (Int -> Image r -> ShowS)
@@ -68,7 +68,7 @@
 show :: Image r -> String
 $cshowList :: forall r. Show r => [Image r] -> ShowS
 showList :: [Image r] -> ShowS
-Show,Image r -> Image r -> Bool
+Show,Image r -> Image r -> Bool
 (Image r -> Image r -> Bool)
 -> (Image r -> Image r -> Bool) -> Eq (Image r)
 forall r. Eq r => Image r -> Image r -> Bool
@@ -77,7 +77,7 @@
 == :: Image r -> Image r -> Bool
 $c/= :: forall r. Eq r => Image r -> Image r -> Bool
 /= :: Image r -> Image r -> Bool
-Eq,Eq (Image r)
+Eq,Eq (Image r)
 Eq (Image r) =>
 (Image r -> Image r -> Ordering)
 -> (Image r -> Image r -> Bool)
@@ -119,16 +119,16 @@
 $cmin :: forall r. Ord r => Image r -> Image r -> Image r
 min :: Image r -> Image r -> Image r
 Ord)
-makeLenses ''Image
+makeLenses ''Image
 
-type instance NumType   (Image r) = r
-type instance Dimension (Image r) = 2
+type instance NumType   (Image r) = r
+type instance Dimension (Image r) = 2
 
-instance Fractional r => IsTransformable (Image r) where
-  transformBy :: Transformation (Dimension (Image r)) (NumType (Image r))
+instance Fractional r => IsTransformable (Image r) where
+  transformBy :: Transformation (Dimension (Image r)) (NumType (Image r))
 -> Image r -> Image r
-transformBy Transformation (Dimension (Image r)) (NumType (Image r))
-t = ASetter
+transformBy Transformation (Dimension (Image r)) (NumType (Image r))
+t = ASetter
   (Image r) (Image r) (Rectangle (Point 2 r)) (Rectangle (Point 2 r))
 -> (Rectangle (Point 2 r) -> Rectangle (Point 2 r))
 -> Image r
@@ -151,31 +151,31 @@
   (Dimension (Rectangle (Point 2 r)))
   (NumType (Rectangle (Point 2 r)))
 Transformation (Dimension (Image r)) (NumType (Image r))
-t)
+t)
 
-instance Functor Image where
-  fmap :: forall a b. (a -> b) -> Image a -> Image b
+instance Functor Image where
+  fmap :: forall a b. (a -> b) -> Image a -> Image b
 fmap = (a -> b) -> Image a -> Image b
 forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
 fmapDefault
-instance Foldable Image where
-  foldMap :: forall m a. Monoid m => (a -> m) -> Image a -> m
-foldMap = (a -> m) -> Image a -> m
+instance Foldable Image where
+  foldMap :: forall m a. Monoid m => (a -> m) -> Image a -> m
+foldMap = (a -> m) -> Image a -> m
 forall (t :: * -> *) m a.
 (Traversable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMapDefault
-instance Traversable Image where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable Image where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> Image a -> f (Image b)
-traverse a -> f b
-f (Image ()
-d Rectangle (Point 2 a)
-r) = () -> Rectangle (Point 2 b) -> Image b
+traverse a -> f b
+f (Image ()
+d Rectangle (Point 2 a)
+r) = () -> Rectangle (Point 2 b) -> Image b
 forall r. () -> Rectangle (Point 2 r) -> Image r
 Image ()
-d (Rectangle (Point 2 b) -> Image b)
+d (Rectangle (Point 2 b) -> Image b)
 -> f (Rectangle (Point 2 b)) -> f (Image b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> (Point 2 a -> f (Point 2 b))
@@ -202,15 +202,15 @@
   (NumType (Point 2 a))
   (NumType (Point 2 b))
 coordinates a -> f b
-f) Rectangle (Point 2 a)
-r
+f) Rectangle (Point 2 a)
+r
 
 --------------------------------------------------------------------------------
 -- | Text Objects
 
 -- | A text label
-data TextLabel r = Label Text (Point 2 r)
-                 deriving (Int -> TextLabel r -> ShowS
+data TextLabel r = Label Text (Point 2 r)
+                 deriving (Int -> TextLabel r -> ShowS
 [TextLabel r] -> ShowS
 TextLabel r -> String
 (Int -> TextLabel r -> ShowS)
@@ -228,7 +228,7 @@
 show :: TextLabel r -> String
 $cshowList :: forall r. Show r => [TextLabel r] -> ShowS
 showList :: [TextLabel r] -> ShowS
-Show,TextLabel r -> TextLabel r -> Bool
+Show,TextLabel r -> TextLabel r -> Bool
 (TextLabel r -> TextLabel r -> Bool)
 -> (TextLabel r -> TextLabel r -> Bool) -> Eq (TextLabel r)
 forall r. Eq r => TextLabel r -> TextLabel r -> Bool
@@ -237,7 +237,7 @@
 == :: TextLabel r -> TextLabel r -> Bool
 $c/= :: forall r. Eq r => TextLabel r -> TextLabel r -> Bool
 /= :: TextLabel r -> TextLabel r -> Bool
-Eq,Eq (TextLabel r)
+Eq,Eq (TextLabel r)
 Eq (TextLabel r) =>
 (TextLabel r -> TextLabel r -> Ordering)
 -> (TextLabel r -> TextLabel r -> Bool)
@@ -280,29 +280,29 @@
 min :: TextLabel r -> TextLabel r -> TextLabel r
 Ord)
 
-type instance NumType   (TextLabel r) = r
-type instance Dimension (TextLabel r) = 2
+type instance NumType   (TextLabel r) = r
+type instance Dimension (TextLabel r) = 2
 
-instance Functor TextLabel  where fmap :: forall a b. (a -> b) -> TextLabel a -> TextLabel b
+instance Functor TextLabel  where fmap :: forall a b. (a -> b) -> TextLabel a -> TextLabel b
 fmap = (a -> b) -> TextLabel a -> TextLabel b
 forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
 fmapDefault
-instance Foldable TextLabel where foldMap :: forall m a. Monoid m => (a -> m) -> TextLabel a -> m
+instance Foldable TextLabel where foldMap :: forall m a. Monoid m => (a -> m) -> TextLabel a -> m
 foldMap = (a -> m) -> TextLabel a -> m
 forall (t :: * -> *) m a.
 (Traversable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMapDefault
-instance Traversable TextLabel where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable TextLabel where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> TextLabel a -> f (TextLabel b)
-traverse a -> f b
-f (Label Text
-t Point 2 a
-p) = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b)))
+traverse a -> f b
+f (Label Text
+t Point 2 a
+p) = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b)))
 -> Point 2 a -> f (Point 2 b)
-coordinates' = ATraversal
+coordinates' = ATraversal
   (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b))
 -> Traversal
      (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b))
@@ -322,38 +322,38 @@
                            in Text -> Point 2 b -> TextLabel b
 forall r. Text -> Point 2 r -> TextLabel r
 Label Text
-t (Point 2 b -> TextLabel b) -> f (Point 2 b) -> f (TextLabel b)
+t (Point 2 b -> TextLabel b) -> f (Point 2 b) -> f (TextLabel b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> (NumType (Point 2 a) -> f (NumType (Point 2 b)))
 -> Point 2 a -> f (Point 2 b)
-coordinates' a -> f b
+coordinates' a -> f b
 NumType (Point 2 a) -> f (NumType (Point 2 b))
-f Point 2 a
-p
+f Point 2 a
+p
 
-instance Fractional r => IsTransformable (TextLabel r) where
-  transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r))
+instance Fractional r => IsTransformable (TextLabel r) where
+  transformBy :: Transformation (Dimension (TextLabel r)) (NumType (TextLabel r))
 -> TextLabel r -> TextLabel r
-transformBy Transformation (Dimension (TextLabel r)) (NumType (TextLabel r))
-t (Label Text
-txt Point 2 r
-p) = Text -> Point 2 r -> TextLabel r
+transformBy Transformation (Dimension (TextLabel r)) (NumType (TextLabel r))
+t (Label Text
+txt Point 2 r
+p) = Text -> Point 2 r -> TextLabel r
 forall r. Text -> Point 2 r -> TextLabel r
 Label Text
-txt (Transformation (Dimension (Point 2 r)) (NumType (Point 2 r))
+txt (Transformation (Dimension (Point 2 r)) (NumType (Point 2 r))
 -> Point 2 r -> Point 2 r
 forall g.
 IsTransformable g =>
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (Point 2 r)) (NumType (Point 2 r))
 Transformation (Dimension (TextLabel r)) (NumType (TextLabel r))
-t Point 2 r
-p)
+t Point 2 r
+p)
 
 
 -- | A Minipage
-data MiniPage r = MiniPage Text (Point 2 r) r
-                 deriving (Int -> MiniPage r -> ShowS
+data MiniPage r = MiniPage Text (Point 2 r) r
+                 deriving (Int -> MiniPage r -> ShowS
 [MiniPage r] -> ShowS
 MiniPage r -> String
 (Int -> MiniPage r -> ShowS)
@@ -371,7 +371,7 @@
 show :: MiniPage r -> String
 $cshowList :: forall r. Show r => [MiniPage r] -> ShowS
 showList :: [MiniPage r] -> ShowS
-Show,MiniPage r -> MiniPage r -> Bool
+Show,MiniPage r -> MiniPage r -> Bool
 (MiniPage r -> MiniPage r -> Bool)
 -> (MiniPage r -> MiniPage r -> Bool) -> Eq (MiniPage r)
 forall r. Eq r => MiniPage r -> MiniPage r -> Bool
@@ -380,7 +380,7 @@
 == :: MiniPage r -> MiniPage r -> Bool
 $c/= :: forall r. Eq r => MiniPage r -> MiniPage r -> Bool
 /= :: MiniPage r -> MiniPage r -> Bool
-Eq,Eq (MiniPage r)
+Eq,Eq (MiniPage r)
 Eq (MiniPage r) =>
 (MiniPage r -> MiniPage r -> Ordering)
 -> (MiniPage r -> MiniPage r -> Bool)
@@ -423,30 +423,30 @@
 min :: MiniPage r -> MiniPage r -> MiniPage r
 Ord)
 
-type instance NumType   (MiniPage r) = r
-type instance Dimension (MiniPage r) = 2
+type instance NumType   (MiniPage r) = r
+type instance Dimension (MiniPage r) = 2
 
-instance Functor MiniPage  where fmap :: forall a b. (a -> b) -> MiniPage a -> MiniPage b
+instance Functor MiniPage  where fmap :: forall a b. (a -> b) -> MiniPage a -> MiniPage b
 fmap = (a -> b) -> MiniPage a -> MiniPage b
 forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
 fmapDefault
-instance Foldable MiniPage where foldMap :: forall m a. Monoid m => (a -> m) -> MiniPage a -> m
+instance Foldable MiniPage where foldMap :: forall m a. Monoid m => (a -> m) -> MiniPage a -> m
 foldMap = (a -> m) -> MiniPage a -> m
 forall (t :: * -> *) m a.
 (Traversable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMapDefault
-instance Traversable MiniPage where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable MiniPage where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> MiniPage a -> f (MiniPage b)
-traverse a -> f b
-f (MiniPage Text
-t Point 2 a
-p a
-w) = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b)))
+traverse a -> f b
+f (MiniPage Text
+t Point 2 a
+p a
+w) = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b)))
 -> Point 2 a -> f (Point 2 b)
-coordinates' = ATraversal
+coordinates' = ATraversal
   (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b))
 -> Traversal
      (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b))
@@ -466,60 +466,60 @@
                                 in Text -> Point 2 b -> b -> MiniPage b
 forall r. Text -> Point 2 r -> r -> MiniPage r
 MiniPage Text
-t (Point 2 b -> b -> MiniPage b)
+t (Point 2 b -> b -> MiniPage b)
 -> f (Point 2 b) -> f (b -> MiniPage b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> (NumType (Point 2 a) -> f (NumType (Point 2 b)))
 -> Point 2 a -> f (Point 2 b)
-coordinates' a -> f b
+coordinates' a -> f b
 NumType (Point 2 a) -> f (NumType (Point 2 b))
-f Point 2 a
-p f (b -> MiniPage b) -> f b -> f (MiniPage b)
+f Point 2 a
+p f (b -> MiniPage b) -> f b -> f (MiniPage b)
 forall a b. f (a -> b) -> f a -> f b
 forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
 <*> a -> f b
-f a
-w
+f a
+w
 
-instance Fractional r => IsTransformable (MiniPage r) where
-  transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r))
+instance Fractional r => IsTransformable (MiniPage r) where
+  transformBy :: Transformation (Dimension (MiniPage r)) (NumType (MiniPage r))
 -> MiniPage r -> MiniPage r
-transformBy Transformation (Dimension (MiniPage r)) (NumType (MiniPage r))
-t (MiniPage Text
-txt Point 2 r
-p r
-w) = Text -> Point 2 r -> r -> MiniPage r
+transformBy Transformation (Dimension (MiniPage r)) (NumType (MiniPage r))
+t (MiniPage Text
+txt Point 2 r
+p r
+w) = Text -> Point 2 r -> r -> MiniPage r
 forall r. Text -> Point 2 r -> r -> MiniPage r
 MiniPage Text
-txt (Transformation (Dimension (Point 2 r)) (NumType (Point 2 r))
+txt (Transformation (Dimension (Point 2 r)) (NumType (Point 2 r))
 -> Point 2 r -> Point 2 r
 forall g.
 IsTransformable g =>
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (Point 2 r)) (NumType (Point 2 r))
 Transformation (Dimension (MiniPage r)) (NumType (MiniPage r))
-t Point 2 r
-p) r
-w
+t Point 2 r
+p) r
+w
 
-width                  :: MiniPage t -> t
+width                  :: MiniPage t -> t
 width :: forall t. MiniPage t -> t
 width (MiniPage Text
 _ Point 2 t
-_ t
-w) = t
-w
+_ t
+w) = t
+w
 
 --------------------------------------------------------------------------------
 -- | Ipe Symbols, i.e. Points
 
 -- | A symbol (point) in ipe
-data IpeSymbol r = Symbol { forall r. IpeSymbol r -> Point 2 r
-_symbolPoint :: Point 2 r
+data IpeSymbol r = Symbol { forall r. IpeSymbol r -> Point 2 r
+_symbolPoint :: Point 2 r
                           , forall r. IpeSymbol r -> Text
 _symbolName  :: Text
                           }
-                 deriving (Int -> IpeSymbol r -> ShowS
+                 deriving (Int -> IpeSymbol r -> ShowS
 [IpeSymbol r] -> ShowS
 IpeSymbol r -> String
 (Int -> IpeSymbol r -> ShowS)
@@ -537,7 +537,7 @@
 show :: IpeSymbol r -> String
 $cshowList :: forall r. Show r => [IpeSymbol r] -> ShowS
 showList :: [IpeSymbol r] -> ShowS
-Show,IpeSymbol r -> IpeSymbol r -> Bool
+Show,IpeSymbol r -> IpeSymbol r -> Bool
 (IpeSymbol r -> IpeSymbol r -> Bool)
 -> (IpeSymbol r -> IpeSymbol r -> Bool) -> Eq (IpeSymbol r)
 forall r. Eq r => IpeSymbol r -> IpeSymbol r -> Bool
@@ -546,7 +546,7 @@
 == :: IpeSymbol r -> IpeSymbol r -> Bool
 $c/= :: forall r. Eq r => IpeSymbol r -> IpeSymbol r -> Bool
 /= :: IpeSymbol r -> IpeSymbol r -> Bool
-Eq,Eq (IpeSymbol r)
+Eq,Eq (IpeSymbol r)
 Eq (IpeSymbol r) =>
 (IpeSymbol r -> IpeSymbol r -> Ordering)
 -> (IpeSymbol r -> IpeSymbol r -> Bool)
@@ -588,31 +588,31 @@
 $cmin :: forall r. Ord r => IpeSymbol r -> IpeSymbol r -> IpeSymbol r
 min :: IpeSymbol r -> IpeSymbol r -> IpeSymbol r
 Ord)
-makeLenses ''IpeSymbol
+makeLenses ''IpeSymbol
 
-type instance NumType   (IpeSymbol r) = r
-type instance Dimension (IpeSymbol r) = 2
+type instance NumType   (IpeSymbol r) = r
+type instance Dimension (IpeSymbol r) = 2
 
-instance Functor IpeSymbol  where fmap :: forall a b. (a -> b) -> IpeSymbol a -> IpeSymbol b
+instance Functor IpeSymbol  where fmap :: forall a b. (a -> b) -> IpeSymbol a -> IpeSymbol b
 fmap = (a -> b) -> IpeSymbol a -> IpeSymbol b
 forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
 fmapDefault
-instance Foldable IpeSymbol where foldMap :: forall m a. Monoid m => (a -> m) -> IpeSymbol a -> m
+instance Foldable IpeSymbol where foldMap :: forall m a. Monoid m => (a -> m) -> IpeSymbol a -> m
 foldMap = (a -> m) -> IpeSymbol a -> m
 forall (t :: * -> *) m a.
 (Traversable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMapDefault
-instance Traversable IpeSymbol where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable IpeSymbol where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> IpeSymbol a -> f (IpeSymbol b)
-traverse a -> f b
-f (Symbol Point 2 a
-p Text
-t) = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b)))
+traverse a -> f b
+f (Symbol Point 2 a
+p Text
+t) = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b)))
 -> Point 2 a -> f (Point 2 b)
-coordinates' = ATraversal
+coordinates' = ATraversal
   (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b))
 -> Traversal
      (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b))
@@ -635,20 +635,20 @@
 flip Point 2 b -> Text -> IpeSymbol b
 forall r. Point 2 r -> Text -> IpeSymbol r
 Symbol Text
-t (Point 2 b -> IpeSymbol b) -> f (Point 2 b) -> f (IpeSymbol b)
+t (Point 2 b -> IpeSymbol b) -> f (Point 2 b) -> f (IpeSymbol b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> (NumType (Point 2 a) -> f (NumType (Point 2 b)))
 -> Point 2 a -> f (Point 2 b)
-coordinates' a -> f b
+coordinates' a -> f b
 NumType (Point 2 a) -> f (NumType (Point 2 b))
-f Point 2 a
-p
+f Point 2 a
+p
 
-instance Fractional r => IsTransformable (IpeSymbol r) where
-  transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r))
+instance Fractional r => IsTransformable (IpeSymbol r) where
+  transformBy :: Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r))
 -> IpeSymbol r -> IpeSymbol r
-transformBy Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r))
-t = ASetter (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)
+transformBy Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r))
+t = ASetter (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)
 -> (Point 2 r -> Point 2 r) -> IpeSymbol r -> IpeSymbol r
 forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
 over ASetter (IpeSymbol r) (IpeSymbol r) (Point 2 r) (Point 2 r)
@@ -662,7 +662,7 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (Point 2 r)) (NumType (Point 2 r))
 Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r))
-t)
+t)
 
 
 
@@ -681,54 +681,54 @@
 -- | The mapping between the labels of the the attributes and the types of the
 -- attributes with these labels. For example, the 'Matrix' label/attribute should
 -- have a value of type 'Matrix 3 3 r'.
-type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where
-  AttrMap r 'Layer          = LayerName
-  AttrMap r AT.Matrix       = Matrix 3 3 r
-  AttrMap r Pin             = PinType
-  AttrMap r Transformations = TransformationTypes
+type family AttrMap (r :: Type) (l :: AttributeUniverse) :: Type where
+  AttrMap r 'Layer          = LayerName
+  AttrMap r AT.Matrix       = Matrix 3 3 r
+  AttrMap r Pin             = PinType
+  AttrMap r Transformations = TransformationTypes
 
-  AttrMap r Stroke = IpeColor r
-  AttrMap r Pen    = IpePen r
-  AttrMap r Fill   = IpeColor r
-  AttrMap r Size   = IpeSize r
+  AttrMap r Stroke = IpeColor r
+  AttrMap r Pen    = IpePen r
+  AttrMap r Fill   = IpeColor r
+  AttrMap r Size   = IpeSize r
 
-  AttrMap r Dash     = IpeDash r
-  AttrMap r LineCap  = Int
-  AttrMap r LineJoin = Int
-  AttrMap r FillRule = FillType
-  AttrMap r Arrow    = IpeArrow r
-  AttrMap r RArrow   = IpeArrow r
-  AttrMap r StrokeOpacity = IpeOpacity
-  AttrMap r Opacity       = IpeOpacity
-  AttrMap r Tiling        = IpeTiling
-  AttrMap r Gradient      = IpeGradient
+  AttrMap r Dash     = IpeDash r
+  AttrMap r LineCap  = Int
+  AttrMap r LineJoin = Int
+  AttrMap r FillRule = FillType
+  AttrMap r Arrow    = IpeArrow r
+  AttrMap r RArrow   = IpeArrow r
+  AttrMap r StrokeOpacity = IpeOpacity
+  AttrMap r Opacity       = IpeOpacity
+  AttrMap r Tiling        = IpeTiling
+  AttrMap r Gradient      = IpeGradient
 
-  AttrMap r Width          = TextSizeUnit r
-  AttrMap r Height         = TextSizeUnit r
-  AttrMap r Depth          = TextSizeUnit r
-  AttrMap r VAlign         = VerticalAlignment
-  AttrMap r HAlign         = HorizontalAlignment
-  AttrMap r Style          = TeXStyle
+  AttrMap r Width          = TextSizeUnit r
+  AttrMap r Height         = TextSizeUnit r
+  AttrMap r Depth          = TextSizeUnit r
+  AttrMap r VAlign         = VerticalAlignment
+  AttrMap r HAlign         = HorizontalAlignment
+  AttrMap r Style          = TeXStyle
 
-  AttrMap r Clip = Path r -- strictly we event want this to be a closed path I guess
+  AttrMap r Clip = Path r -- strictly we event want this to be a closed path I guess
 
 
 
-genDefunSymbols [''AttrMap]
+genDefunSymbols [''AttrMap]
 
 --------------------------------------------------------------------------------
 
 
 -- | For the types representing attribute values we can get the name/key to use
 -- when serializing to ipe.
-class TraverseIpeAttr (a :: AttributeUniverse) where
-  traverseIpeAttr :: Applicative h
-                  => (r -> h s) -> Attr (AttrMapSym1 r) a -> h (Attr (AttrMapSym1 s) a)
+class TraverseIpeAttr (a :: AttributeUniverse) where
+  traverseIpeAttr :: Applicative h
+                  => (r -> h s) -> Attr (AttrMapSym1 r) a -> h (Attr (AttrMapSym1 s) a)
 
   -- attrName :: proxy a -> Text
 
 -- CommonAttributeUnivers
-instance TraverseIpeAttr Layer           where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Layer           where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Layer -> h (Attr (AttrMapSym1 s) 'Layer)
@@ -738,12 +738,12 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr AT.Matrix       where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr AT.Matrix       where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Matrix -> h (Attr (AttrMapSym1 s) 'Matrix)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Matrix
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Matrix
  -> h (Apply (AttrMapSym1 s) 'Matrix))
 -> Attr (AttrMapSym1 r) 'Matrix -> h (Attr (AttrMapSym1 s) 'Matrix)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
@@ -768,8 +768,8 @@
   (NumType (Matrix 3 3 r))
   (NumType (Matrix 3 3 s))
 elements r -> h s
-f)
-instance TraverseIpeAttr Pin             where traverseIpeAttr :: forall (h :: * -> *) r s.
+f)
+instance TraverseIpeAttr Pin             where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Pin -> h (Attr (AttrMapSym1 s) 'Pin)
@@ -779,7 +779,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr Transformations where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Transformations where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Transformations
@@ -793,12 +793,12 @@
 pureAttr
 
 -- -- IpeSymbolAttributeUniversre
-instance TraverseIpeAttr Stroke       where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Stroke       where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Stroke -> h (Attr (AttrMapSym1 s) 'Stroke)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Stroke
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Stroke
  -> h (Apply (AttrMapSym1 s) 'Stroke))
 -> Attr (AttrMapSym1 r) 'Stroke -> h (Attr (AttrMapSym1 s) 'Stroke)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
@@ -813,13 +813,13 @@
 Applicative f =>
 (a -> f b) -> IpeColor a -> f (IpeColor b)
 traverse r -> h s
-f)
-instance TraverseIpeAttr Fill         where traverseIpeAttr :: forall (h :: * -> *) r s.
+f)
+instance TraverseIpeAttr Fill         where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Fill -> h (Attr (AttrMapSym1 s) 'Fill)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Fill -> h (Apply (AttrMapSym1 s) 'Fill))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Fill -> h (Apply (AttrMapSym1 s) 'Fill))
 -> Attr (AttrMapSym1 r) 'Fill -> h (Attr (AttrMapSym1 s) 'Fill)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -833,13 +833,13 @@
 Applicative f =>
 (a -> f b) -> IpeColor a -> f (IpeColor b)
 traverse r -> h s
-f)
-instance TraverseIpeAttr Pen          where traverseIpeAttr :: forall (h :: * -> *) r s.
+f)
+instance TraverseIpeAttr Pen          where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Pen -> h (Attr (AttrMapSym1 s) 'Pen)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Pen -> h (Apply (AttrMapSym1 s) 'Pen))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Pen -> h (Apply (AttrMapSym1 s) 'Pen))
 -> Attr (AttrMapSym1 r) 'Pen -> h (Attr (AttrMapSym1 s) 'Pen)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -853,13 +853,13 @@
 Applicative f =>
 (a -> f b) -> IpePen a -> f (IpePen b)
 traverse r -> h s
-f)
-instance TraverseIpeAttr Size         where traverseIpeAttr :: forall (h :: * -> *) r s.
+f)
+instance TraverseIpeAttr Size         where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Size -> h (Attr (AttrMapSym1 s) 'Size)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Size -> h (Apply (AttrMapSym1 s) 'Size))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Size -> h (Apply (AttrMapSym1 s) 'Size))
 -> Attr (AttrMapSym1 r) 'Size -> h (Attr (AttrMapSym1 s) 'Size)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -873,15 +873,15 @@
 Applicative f =>
 (a -> f b) -> IpeSize a -> f (IpeSize b)
 traverse r -> h s
-f)
+f)
 
 -- -- PathAttributeUniverse
-instance TraverseIpeAttr Dash       where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Dash       where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Dash -> h (Attr (AttrMapSym1 s) 'Dash)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Dash -> h (Apply (AttrMapSym1 s) 'Dash))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Dash -> h (Apply (AttrMapSym1 s) 'Dash))
 -> Attr (AttrMapSym1 r) 'Dash -> h (Attr (AttrMapSym1 s) 'Dash)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -895,8 +895,8 @@
 Applicative f =>
 (a -> f b) -> IpeDash a -> f (IpeDash b)
 traverse r -> h s
-f)
-instance TraverseIpeAttr LineCap    where traverseIpeAttr :: forall (h :: * -> *) r s.
+f)
+instance TraverseIpeAttr LineCap    where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'LineCap
@@ -907,7 +907,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr LineJoin   where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr LineJoin   where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'LineJoin
@@ -919,7 +919,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr FillRule   where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr FillRule   where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'FillRule
@@ -931,12 +931,12 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr Arrow      where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Arrow      where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Arrow -> h (Attr (AttrMapSym1 s) 'Arrow)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Arrow -> h (Apply (AttrMapSym1 s) 'Arrow))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Arrow -> h (Apply (AttrMapSym1 s) 'Arrow))
 -> Attr (AttrMapSym1 r) 'Arrow -> h (Attr (AttrMapSym1 s) 'Arrow)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -950,13 +950,13 @@
 Applicative f =>
 (a -> f b) -> IpeArrow a -> f (IpeArrow b)
 traverse r -> h s
-f)
-instance TraverseIpeAttr RArrow     where traverseIpeAttr :: forall (h :: * -> *) r s.
+f)
+instance TraverseIpeAttr RArrow     where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'RArrow -> h (Attr (AttrMapSym1 s) 'RArrow)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'RArrow
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'RArrow
  -> h (Apply (AttrMapSym1 s) 'RArrow))
 -> Attr (AttrMapSym1 r) 'RArrow -> h (Attr (AttrMapSym1 s) 'RArrow)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
@@ -971,8 +971,8 @@
 Applicative f =>
 (a -> f b) -> IpeArrow a -> f (IpeArrow b)
 traverse r -> h s
-f)
-instance TraverseIpeAttr StrokeOpacity  where traverseIpeAttr :: forall (h :: * -> *) r s.
+f)
+instance TraverseIpeAttr StrokeOpacity  where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'StrokeOpacity
@@ -984,7 +984,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr Opacity    where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Opacity    where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Opacity
@@ -995,7 +995,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr Tiling     where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Tiling     where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Tiling -> h (Attr (AttrMapSym1 s) 'Tiling)
@@ -1005,7 +1005,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr Gradient   where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Gradient   where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Gradient
@@ -1019,12 +1019,12 @@
 pureAttr
 
 -- TextAttibuteUniverse
-instance TraverseIpeAttr Width   where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Width   where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Width -> h (Attr (AttrMapSym1 s) 'Width)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Width -> h (Apply (AttrMapSym1 s) 'Width))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Width -> h (Apply (AttrMapSym1 s) 'Width))
 -> Attr (AttrMapSym1 r) 'Width -> h (Attr (AttrMapSym1 s) 'Width)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -1032,13 +1032,13 @@
 -> Attr f label -> h (Attr g label)
 traverseAttr r -> h s
 Apply (AttrMapSym1 r) 'Width -> h (Apply (AttrMapSym1 s) 'Width)
-f
-instance TraverseIpeAttr Height  where traverseIpeAttr :: forall (h :: * -> *) r s.
+f
+instance TraverseIpeAttr Height  where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Height -> h (Attr (AttrMapSym1 s) 'Height)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Height
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Height
  -> h (Apply (AttrMapSym1 s) 'Height))
 -> Attr (AttrMapSym1 r) 'Height -> h (Attr (AttrMapSym1 s) 'Height)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
@@ -1047,13 +1047,13 @@
 -> Attr f label -> h (Attr g label)
 traverseAttr r -> h s
 Apply (AttrMapSym1 r) 'Height -> h (Apply (AttrMapSym1 s) 'Height)
-f
-instance TraverseIpeAttr Depth   where traverseIpeAttr :: forall (h :: * -> *) r s.
+f
+instance TraverseIpeAttr Depth   where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Depth -> h (Attr (AttrMapSym1 s) 'Depth)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Depth -> h (Apply (AttrMapSym1 s) 'Depth))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Depth -> h (Apply (AttrMapSym1 s) 'Depth))
 -> Attr (AttrMapSym1 r) 'Depth -> h (Attr (AttrMapSym1 s) 'Depth)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -1061,8 +1061,8 @@
 -> Attr f label -> h (Attr g label)
 traverseAttr r -> h s
 Apply (AttrMapSym1 r) 'Depth -> h (Apply (AttrMapSym1 s) 'Depth)
-f
-instance TraverseIpeAttr VAlign  where traverseIpeAttr :: forall (h :: * -> *) r s.
+f
+instance TraverseIpeAttr VAlign  where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'VAlign -> h (Attr (AttrMapSym1 s) 'VAlign)
@@ -1072,7 +1072,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr HAlign  where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr HAlign  where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'HAlign -> h (Attr (AttrMapSym1 s) 'HAlign)
@@ -1082,7 +1082,7 @@
 (Applicative h, Apply f a ~ Apply g a) =>
 Attr f a -> h (Attr g a)
 pureAttr
-instance TraverseIpeAttr Style   where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Style   where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Style -> h (Attr (AttrMapSym1 s) 'Style)
@@ -1094,12 +1094,12 @@
 pureAttr
 
 -- GroupAttributeUniverse
-instance TraverseIpeAttr Clip     where traverseIpeAttr :: forall (h :: * -> *) r s.
+instance TraverseIpeAttr Clip     where traverseIpeAttr :: forall (h :: * -> *) r s.
 Applicative h =>
 (r -> h s)
 -> Attr (AttrMapSym1 r) 'Clip -> h (Attr (AttrMapSym1 s) 'Clip)
-traverseIpeAttr r -> h s
-f = (Apply (AttrMapSym1 r) 'Clip -> h (Apply (AttrMapSym1 s) 'Clip))
+traverseIpeAttr r -> h s
+f = (Apply (AttrMapSym1 r) 'Clip -> h (Apply (AttrMapSym1 s) 'Clip))
 -> Attr (AttrMapSym1 r) 'Clip -> h (Attr (AttrMapSym1 s) 'Clip)
 forall {u} (h :: * -> *) (f :: u ~> *) (label :: u) (g :: u ~> *).
 Applicative h =>
@@ -1113,7 +1113,7 @@
 Applicative f =>
 (a -> f b) -> Path a -> f (Path b)
 traverse r -> h s
-f)
+f)
 
 --------------------------------------------------------------------------------
 -- | Groups and Objects
@@ -1131,7 +1131,7 @@
 
 
 -- | A group is essentially a list of IpeObjects.
-newtype Group r = Group [IpeObject r] deriving (Int -> Group r -> ShowS
+newtype Group r = Group [IpeObject r] deriving (Int -> Group r -> ShowS
 [Group r] -> ShowS
 Group r -> String
 (Int -> Group r -> ShowS)
@@ -1147,7 +1147,7 @@
 show :: Group r -> String
 $cshowList :: forall r. Show r => [Group r] -> ShowS
 showList :: [Group r] -> ShowS
-Show,Group r -> Group r -> Bool
+Show,Group r -> Group r -> Bool
 (Group r -> Group r -> Bool)
 -> (Group r -> Group r -> Bool) -> Eq (Group r)
 forall r. Eq r => Group r -> Group r -> Bool
@@ -1156,7 +1156,7 @@
 == :: Group r -> Group r -> Bool
 $c/= :: forall r. Eq r => Group r -> Group r -> Bool
 /= :: Group r -> Group r -> Bool
-Eq,(forall a b. (a -> b) -> Group a -> Group b)
+Eq,(forall a b. (a -> b) -> Group a -> Group b)
 -> (forall a b. a -> Group b -> Group a) -> Functor Group
 forall a b. a -> Group b -> Group a
 forall a b. (a -> b) -> Group a -> Group b
@@ -1167,7 +1167,7 @@
 fmap :: forall a b. (a -> b) -> Group a -> Group b
 $c<$ :: forall a b. a -> Group b -> Group a
 <$ :: forall a b. a -> Group b -> Group a
-Functor,(forall m. Monoid m => Group m -> m)
+Functor,(forall m. Monoid m => Group m -> m)
 -> (forall m a. Monoid m => (a -> m) -> Group a -> m)
 -> (forall m a. Monoid m => (a -> m) -> Group a -> m)
 -> (forall a b. (a -> b -> b) -> b -> Group a -> b)
@@ -1249,7 +1249,7 @@
 sum :: forall a. Num a => Group a -> a
 $cproduct :: forall a. Num a => Group a -> a
 product :: forall a. Num a => Group a -> a
-Foldable,Functor Group
+Foldable,Functor Group
 Foldable Group
 (Functor Group, Foldable Group) =>
 (forall (f :: * -> *) a b.
@@ -1300,15 +1300,15 @@
 sequence :: forall (m :: * -> *) a. Monad m => Group (m a) -> m (Group a)
 Traversable)
 
-type instance NumType   (Group r) = r
-type instance Dimension (Group r) = 2
+type instance NumType   (Group r) = r
+type instance Dimension (Group r) = 2
 
-instance Fractional r => IsTransformable (IpeObject r) where
-  transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
+instance Fractional r => IsTransformable (IpeObject r) where
+  transformBy :: Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
 -> IpeObject r -> IpeObject r
-transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t (IpeGroup IpeObject' Group r
-i)     = IpeObject' Group r -> IpeObject r
+transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
+t (IpeGroup IpeObject' Group r
+i)     = IpeObject' Group r -> IpeObject r
 forall r. IpeObject' Group r -> IpeObject r
 IpeGroup     (IpeObject' Group r -> IpeObject r)
 -> IpeObject' Group r -> IpeObject r
@@ -1317,7 +1317,7 @@
 :+ Attributes
      (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
 IpeObject' Group r
-i(Group r
+i(Group r
  :+ Attributes
       (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip])
 -> ((Group r
@@ -1365,17 +1365,17 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
 Transformation (Dimension (Group r)) (NumType (Group r))
-t
-  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t (IpeImage IpeObject' Image r
-i)     = IpeObject' Image r -> IpeObject r
+t
+  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
+t (IpeImage IpeObject' Image r
+i)     = IpeObject' Image r -> IpeObject r
 forall r. IpeObject' Image r -> IpeObject r
 IpeImage     (IpeObject' Image r -> IpeObject r)
 -> IpeObject' Image r -> IpeObject r
 forall a b. (a -> b) -> a -> b
 $ Image r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' Image r
-i(Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> ((Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
     -> Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> Image r :+ Attributes (AttrMapSym1 r) CommonAttributes
@@ -1402,17 +1402,17 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (Image r)) (NumType (Image r))
 Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t
-  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t (IpeTextLabel IpeObject' TextLabel r
-i) = IpeObject' TextLabel r -> IpeObject r
+t
+  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
+t (IpeTextLabel IpeObject' TextLabel r
+i) = IpeObject' TextLabel r -> IpeObject r
 forall r. IpeObject' TextLabel r -> IpeObject r
 IpeTextLabel (IpeObject' TextLabel r -> IpeObject r)
 -> IpeObject' TextLabel r -> IpeObject r
 forall a b. (a -> b) -> a -> b
 $ TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' TextLabel r
-i(TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> ((TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
     -> TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes
@@ -1439,17 +1439,17 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (TextLabel r)) (NumType (TextLabel r))
 Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t
-  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t (IpeMiniPage IpeObject' MiniPage r
-i)  = IpeObject' MiniPage r -> IpeObject r
+t
+  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
+t (IpeMiniPage IpeObject' MiniPage r
+i)  = IpeObject' MiniPage r -> IpeObject r
 forall r. IpeObject' MiniPage r -> IpeObject r
 IpeMiniPage  (IpeObject' MiniPage r -> IpeObject r)
 -> IpeObject' MiniPage r -> IpeObject r
 forall a b. (a -> b) -> a -> b
 $ MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' MiniPage r
-i(MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> ((MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
     -> MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes
@@ -1476,10 +1476,10 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (MiniPage r)) (NumType (MiniPage r))
 Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t
-  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t (IpeUse IpeObject' IpeSymbol r
-i)       = IpeObject' IpeSymbol r -> IpeObject r
+t
+  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
+t (IpeUse IpeObject' IpeSymbol r
+i)       = IpeObject' IpeSymbol r -> IpeObject r
 forall r. IpeObject' IpeSymbol r -> IpeObject r
 IpeUse       (IpeObject' IpeSymbol r -> IpeObject r)
 -> IpeObject' IpeSymbol r -> IpeObject r
@@ -1490,7 +1490,7 @@
      '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen,
         'Size]
 IpeObject' IpeSymbol r
-i(IpeSymbol r
+i(IpeSymbol r
  :+ Attributes
       (AttrMapSym1 r)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen,
@@ -1557,10 +1557,10 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (IpeSymbol r)) (NumType (IpeSymbol r))
 Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t
-  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t (IpePath IpeObject' Path r
-i)      = IpeObject' Path r -> IpeObject r
+t
+  transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
+t (IpePath IpeObject' Path r
+i)      = IpeObject' Path r -> IpeObject r
 forall r. IpeObject' Path r -> IpeObject r
 IpePath      (IpeObject' Path r -> IpeObject r)
 -> IpeObject' Path r -> IpeObject r
@@ -1572,7 +1572,7 @@
         'Pen, 'LineCap, 'LineJoin, 'FillRule, 'Arrow, 'RArrow,
         'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient]
 IpeObject' Path r
-i(Path r
+i(Path r
  :+ Attributes
       (AttrMapSym1 r)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash,
@@ -1649,14 +1649,14 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (Path r)) (NumType (Path r))
 Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
-t
+t
 
-instance Fractional r => IsTransformable (Group r) where
-  transformBy :: Transformation (Dimension (Group r)) (NumType (Group r))
+instance Fractional r => IsTransformable (Group r) where
+  transformBy :: Transformation (Dimension (Group r)) (NumType (Group r))
 -> Group r -> Group r
-transformBy Transformation (Dimension (Group r)) (NumType (Group r))
-t (Group [IpeObject r]
-s) = [IpeObject r] -> Group r
+transformBy Transformation (Dimension (Group r)) (NumType (Group r))
+t (Group [IpeObject r]
+s) = [IpeObject r] -> Group r
 forall r. [IpeObject r] -> Group r
 Group ([IpeObject r] -> Group r) -> [IpeObject r] -> Group r
 forall a b. (a -> b) -> a -> b
@@ -1670,12 +1670,12 @@
 Transformation (Dimension g) (NumType g) -> g -> g
 transformBy Transformation (Dimension (IpeObject r)) (NumType (IpeObject r))
 Transformation (Dimension (Group r)) (NumType (Group r))
-t) [IpeObject r]
-s
+t) [IpeObject r]
+s
 
 
 
-type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where
+type family AttributesOf (t :: Type -> Type) :: [AttributeUniverse] where
   AttributesOf Group     = GroupAttributes
   AttributesOf Image     = CommonAttributes
   AttributesOf TextLabel = CommonAttributes
@@ -1685,15 +1685,15 @@
 
 
 -- | Attributes' :: Type -> [AttributeUniverse] -> Type
-type Attributes' r = Attributes (AttrMapSym1 r)
+type Attributes' r = Attributes (AttrMapSym1 r)
 
-type IpeAttributes g r = Attributes' r (AttributesOf g)
+type IpeAttributes g r = Attributes' r (AttributesOf g)
 
 
 -- | An IpeObject' is essentially the oject ogether with its attributes
-type IpeObject' g r = g r :+ IpeAttributes g r
+type IpeObject' g r = g r :+ IpeAttributes g r
 
-attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)
+attributes :: Lens' (IpeObject' g r) (IpeAttributes g r)
 attributes :: forall (g :: * -> *) r (f :: * -> *).
 Functor f =>
 (IpeAttributes g r -> f (IpeAttributes g r))
@@ -1708,16 +1708,16 @@
 extra
 
 -- | traverse for ipe attributes
-traverseIpeAttrs               :: ( Applicative f
-                                  , AllConstrained TraverseIpeAttr (AttributesOf g)
-                                  ) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)
+traverseIpeAttrs               :: ( Applicative f
+                                  , AllConstrained TraverseIpeAttr (AttributesOf g)
+                                  ) => proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)
 traverseIpeAttrs :: forall (f :: * -> *) (g :: * -> *) (proxy :: (* -> *) -> *) r s.
 (Applicative f, AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)
 traverseIpeAttrs proxy g
-_ r -> f s
-f (Attrs Rec (Attr (AttrMapSym1 r)) (AttributesOf g)
-ats) = (Rec (Attr (AttrMapSym1 s)) (AttributesOf g)
+_ r -> f s
+f (Attrs Rec (Attr (AttrMapSym1 r)) (AttributesOf g)
+ats) = (Rec (Attr (AttrMapSym1 s)) (AttributesOf g)
  -> Attributes (AttrMapSym1 s) (AttributesOf g))
 -> f (Rec (Attr (AttrMapSym1 s)) (AttributesOf g))
 -> f (Attributes (AttrMapSym1 s) (AttributesOf g))
@@ -1743,27 +1743,27 @@
 -> Rec (Attr (AttrMapSym1 r)) ats
 -> f (Rec (Attr (AttrMapSym1 s)) ats)
 traverseIpeAttrs' r -> f s
-f (Rec (Attr (AttrMapSym1 r)) (AttributesOf g)
+f (Rec (Attr (AttrMapSym1 r)) (AttributesOf g)
  -> f (Attributes (AttrMapSym1 s) (AttributesOf g)))
 -> Rec (Attr (AttrMapSym1 r)) (AttributesOf g)
 -> f (Attributes (AttrMapSym1 s) (AttributesOf g))
 forall a b. (a -> b) -> a -> b
 $ Rec (Attr (AttrMapSym1 r)) (AttributesOf g)
-ats
+ats
 
-traverseIpeAttrs'   :: ( Applicative f
-                       , AllConstrained TraverseIpeAttr ats
+traverseIpeAttrs'   :: ( Applicative f
+                       , AllConstrained TraverseIpeAttr ats
                        )
-                    => (r -> f s)
-                    -> Rec (Attr (AttrMapSym1 r)) ats
-                    -> f (Rec (Attr (AttrMapSym1 s)) ats)
+                    => (r -> f s)
+                    -> Rec (Attr (AttrMapSym1 r)) ats
+                    -> f (Rec (Attr (AttrMapSym1 s)) ats)
 traverseIpeAttrs' :: forall (f :: * -> *) (ats :: [AttributeUniverse]) r s.
 (Applicative f, AllConstrained TraverseIpeAttr ats) =>
 (r -> f s)
 -> Rec (Attr (AttrMapSym1 r)) ats
 -> f (Rec (Attr (AttrMapSym1 s)) ats)
-traverseIpeAttrs' r -> f s
-f = \case
+traverseIpeAttrs' r -> f s
+f = \case
   Rec (Attr (AttrMapSym1 r)) ats
 RNil        -> Rec (Attr (AttrMapSym1 s)) ats
 -> f (Rec (Attr (AttrMapSym1 s)) ats)
@@ -1773,9 +1773,9 @@
 Rec (Attr (AttrMapSym1 s)) '[]
 forall {u} (a :: u -> *). Rec a '[]
 RNil
-  (Attr (AttrMapSym1 r) r
-a :& Rec (Attr (AttrMapSym1 r)) rs
-ats') -> Attr (AttrMapSym1 s) r
+  (Attr (AttrMapSym1 r) r
+a :& Rec (Attr (AttrMapSym1 r)) rs
+ats') -> Attr (AttrMapSym1 s) r
 -> Rec (Attr (AttrMapSym1 s)) rs -> Rec (Attr (AttrMapSym1 s)) ats
 Attr (AttrMapSym1 s) r
 -> Rec (Attr (AttrMapSym1 s)) rs
@@ -1796,8 +1796,8 @@
 Applicative h =>
 (r -> h s) -> Attr (AttrMapSym1 r) r -> h (Attr (AttrMapSym1 s) r)
 traverseIpeAttr r -> f s
-f Attr (AttrMapSym1 r) r
-a f (Rec (Attr (AttrMapSym1 s)) rs -> Rec (Attr (AttrMapSym1 s)) ats)
+f Attr (AttrMapSym1 r) r
+a f (Rec (Attr (AttrMapSym1 s)) rs -> Rec (Attr (AttrMapSym1 s)) ats)
 -> f (Rec (Attr (AttrMapSym1 s)) rs)
 -> f (Rec (Attr (AttrMapSym1 s)) ats)
 forall a b. f (a -> b) -> f a -> f b
@@ -1811,32 +1811,32 @@
 -> Rec (Attr (AttrMapSym1 r)) ats
 -> f (Rec (Attr (AttrMapSym1 s)) ats)
 traverseIpeAttrs' r -> f s
-f Rec (Attr (AttrMapSym1 r)) rs
-ats'
+f Rec (Attr (AttrMapSym1 r)) rs
+ats'
 
 
-data IpeObject r =
-    IpeGroup     (IpeObject' Group     r)
-  | IpeImage     (IpeObject' Image     r)
-  | IpeTextLabel (IpeObject' TextLabel r)
-  | IpeMiniPage  (IpeObject' MiniPage  r)
-  | IpeUse       (IpeObject' IpeSymbol r)
-  | IpePath      (IpeObject' Path      r)
+data IpeObject r =
+    IpeGroup     (IpeObject' Group     r)
+  | IpeImage     (IpeObject' Image     r)
+  | IpeTextLabel (IpeObject' TextLabel r)
+  | IpeMiniPage  (IpeObject' MiniPage  r)
+  | IpeUse       (IpeObject' IpeSymbol r)
+  | IpePath      (IpeObject' Path      r)
 
 
-traverseIpeObject'              :: forall g r f s. ( Applicative f
-                                                   , Traversable g
-                                                   , AllConstrained TraverseIpeAttr (AttributesOf  g)
+traverseIpeObject'              :: forall g r f s. ( Applicative f
+                                                   , Traversable g
+                                                   , AllConstrained TraverseIpeAttr (AttributesOf  g)
                                                    )
-                                => (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
+                                => (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
 traverseIpeObject' :: forall (g :: * -> *) r (f :: * -> *) s.
 (Applicative f, Traversable g,
  AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
-traverseIpeObject' r -> f s
-f (g r
-i :+ IpeAttributes g r
-ats) = g s
+traverseIpeObject' r -> f s
+f (g r
+i :+ IpeAttributes g r
+ats) = g s
 -> Attributes' s (AttributesOf g)
 -> g s :+ Attributes' s (AttributesOf g)
 forall core extra. core -> extra -> core :+ extra
@@ -1855,8 +1855,8 @@
 Applicative f =>
 (a -> f b) -> g a -> f (g b)
 traverse r -> f s
-f g r
-i f (Attributes' s (AttributesOf g)
+f g r
+i f (Attributes' s (AttributesOf g)
    -> g s :+ Attributes' s (AttributesOf g))
 -> f (Attributes' s (AttributesOf g))
 -> f (g s :+ Attributes' s (AttributesOf g))
@@ -1871,30 +1871,30 @@
 proxy g -> (r -> f s) -> IpeAttributes g r -> f (IpeAttributes g s)
 traverseIpeAttrs (forall {k} (t :: k). Proxy t
 forall (t :: * -> *). Proxy t
-Proxy @g) r -> f s
-f IpeAttributes g r
-ats
+Proxy @g) r -> f s
+f IpeAttributes g r
+ats
 
-instance Functor IpeObject where
-  fmap :: forall a b. (a -> b) -> IpeObject a -> IpeObject b
+instance Functor IpeObject where
+  fmap :: forall a b. (a -> b) -> IpeObject a -> IpeObject b
 fmap = (a -> b) -> IpeObject a -> IpeObject b
 forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
 fmapDefault
-instance Foldable IpeObject where
-  foldMap :: forall m a. Monoid m => (a -> m) -> IpeObject a -> m
+instance Foldable IpeObject where
+  foldMap :: forall m a. Monoid m => (a -> m) -> IpeObject a -> m
 foldMap = (a -> m) -> IpeObject a -> m
 forall (t :: * -> *) m a.
 (Traversable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMapDefault
-instance Traversable IpeObject where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable IpeObject where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> IpeObject a -> f (IpeObject b)
-traverse a -> f b
-f = \case
-    IpeGroup IpeObject' Group a
-g     -> (Group b
+traverse a -> f b
+f = \case
+    IpeGroup IpeObject' Group a
+g     -> (Group b
  :+ Attributes
       (AttrMapSym1 b) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip])
 -> IpeObject b
@@ -1915,10 +1915,10 @@
  AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
 traverseIpeObject' a -> f b
-f IpeObject' Group a
-g
-    IpeImage IpeObject' Image a
-i     -> (Image b :+ Attributes (AttrMapSym1 b) CommonAttributes)
+f IpeObject' Group a
+g
+    IpeImage IpeObject' Image a
+i     -> (Image b :+ Attributes (AttrMapSym1 b) CommonAttributes)
 -> IpeObject b
 IpeObject' Image b -> IpeObject b
 forall r. IpeObject' Image r -> IpeObject r
@@ -1933,10 +1933,10 @@
  AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
 traverseIpeObject' a -> f b
-f IpeObject' Image a
-i
-    IpeTextLabel IpeObject' TextLabel a
-l -> (TextLabel b :+ Attributes (AttrMapSym1 b) CommonAttributes)
+f IpeObject' Image a
+i
+    IpeTextLabel IpeObject' TextLabel a
+l -> (TextLabel b :+ Attributes (AttrMapSym1 b) CommonAttributes)
 -> IpeObject b
 IpeObject' TextLabel b -> IpeObject b
 forall r. IpeObject' TextLabel r -> IpeObject r
@@ -1951,10 +1951,10 @@
  AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
 traverseIpeObject' a -> f b
-f IpeObject' TextLabel a
-l
-    IpeMiniPage IpeObject' MiniPage a
-p  -> (MiniPage b :+ Attributes (AttrMapSym1 b) CommonAttributes)
+f IpeObject' TextLabel a
+l
+    IpeMiniPage IpeObject' MiniPage a
+p  -> (MiniPage b :+ Attributes (AttrMapSym1 b) CommonAttributes)
 -> IpeObject b
 IpeObject' MiniPage b -> IpeObject b
 forall r. IpeObject' MiniPage r -> IpeObject r
@@ -1969,10 +1969,10 @@
  AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
 traverseIpeObject' a -> f b
-f IpeObject' MiniPage a
-p
-    IpeUse IpeObject' IpeSymbol a
-u       -> (IpeSymbol b
+f IpeObject' MiniPage a
+p
+    IpeUse IpeObject' IpeSymbol a
+u       -> (IpeSymbol b
  :+ Attributes
       (AttrMapSym1 b)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen,
@@ -1999,10 +1999,10 @@
  AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
 traverseIpeObject' a -> f b
-f IpeObject' IpeSymbol a
-u
-    IpePath IpeObject' Path a
-p      -> (Path b
+f IpeObject' IpeSymbol a
+u
+    IpePath IpeObject' Path a
+p      -> (Path b
  :+ Attributes
       (AttrMapSym1 b)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash,
@@ -2032,20 +2032,20 @@
  AllConstrained TraverseIpeAttr (AttributesOf g)) =>
 (r -> f s) -> IpeObject' g r -> f (IpeObject' g s)
 traverseIpeObject' a -> f b
-f IpeObject' Path a
-p
+f IpeObject' Path a
+p
 
 
-deriving instance (Show r) => Show (IpeObject r)
+deriving instance (Show r) => Show (IpeObject r)
 -- deriving instance (Read r) => Read (IpeObject r)
-deriving instance (Eq r)   => Eq   (IpeObject r)
+deriving instance (Eq r)   => Eq   (IpeObject r)
 
-type instance NumType   (IpeObject r) = r
-type instance Dimension (IpeObject r) = 2
+type instance NumType   (IpeObject r) = r
+type instance Dimension (IpeObject r) = 2
 
-makePrisms ''IpeObject
+makePrisms ''IpeObject
 
-groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]
+groupItems :: Lens (Group r) (Group s) [IpeObject r] [IpeObject s]
 groupItems :: forall r s (f :: * -> *).
 Functor f =>
 ([IpeObject r] -> f [IpeObject s]) -> Group r -> f (Group s)
@@ -2053,62 +2053,62 @@
 -> (Group r -> [IpeObject s] -> Group s)
 -> Lens (Group r) (Group s) [IpeObject r] [IpeObject s]
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens (\(Group [IpeObject r]
-xs) -> [IpeObject r]
-xs) (([IpeObject s] -> Group s) -> Group r -> [IpeObject s] -> Group s
+lens (\(Group [IpeObject r]
+xs) -> [IpeObject r]
+xs) (([IpeObject s] -> Group s) -> Group r -> [IpeObject s] -> Group s
 forall a b. a -> b -> a
 const [IpeObject s] -> Group s
 forall r. [IpeObject r] -> Group r
 Group)
 
-class ToObject i where
-  mkIpeObject :: IpeObject' i r -> IpeObject r
+class ToObject i where
+  mkIpeObject :: IpeObject' i r -> IpeObject r
 
-instance ToObject Group      where mkIpeObject :: forall r. IpeObject' Group r -> IpeObject r
+instance ToObject Group      where mkIpeObject :: forall r. IpeObject' Group r -> IpeObject r
 mkIpeObject = IpeObject' Group r -> IpeObject r
 forall r. IpeObject' Group r -> IpeObject r
 IpeGroup
-instance ToObject Image      where mkIpeObject :: forall r. IpeObject' Image r -> IpeObject r
+instance ToObject Image      where mkIpeObject :: forall r. IpeObject' Image r -> IpeObject r
 mkIpeObject = IpeObject' Image r -> IpeObject r
 forall r. IpeObject' Image r -> IpeObject r
 IpeImage
-instance ToObject TextLabel  where mkIpeObject :: forall r. IpeObject' TextLabel r -> IpeObject r
+instance ToObject TextLabel  where mkIpeObject :: forall r. IpeObject' TextLabel r -> IpeObject r
 mkIpeObject = IpeObject' TextLabel r -> IpeObject r
 forall r. IpeObject' TextLabel r -> IpeObject r
 IpeTextLabel
-instance ToObject MiniPage   where mkIpeObject :: forall r. IpeObject' MiniPage r -> IpeObject r
+instance ToObject MiniPage   where mkIpeObject :: forall r. IpeObject' MiniPage r -> IpeObject r
 mkIpeObject = IpeObject' MiniPage r -> IpeObject r
 forall r. IpeObject' MiniPage r -> IpeObject r
 IpeMiniPage
-instance ToObject IpeSymbol  where mkIpeObject :: forall r. IpeObject' IpeSymbol r -> IpeObject r
+instance ToObject IpeSymbol  where mkIpeObject :: forall r. IpeObject' IpeSymbol r -> IpeObject r
 mkIpeObject = IpeObject' IpeSymbol r -> IpeObject r
 forall r. IpeObject' IpeSymbol r -> IpeObject r
 IpeUse
-instance ToObject Path       where mkIpeObject :: forall r. IpeObject' Path r -> IpeObject r
+instance ToObject Path       where mkIpeObject :: forall r. IpeObject' Path r -> IpeObject r
 mkIpeObject = IpeObject' Path r -> IpeObject r
 forall r. IpeObject' Path r -> IpeObject r
 IpePath
 
 
 -- | Shorthand for constructing ipeObjects
-ipeObject'     :: ToObject i => i r -> IpeAttributes i r -> IpeObject r
+ipeObject'     :: ToObject i => i r -> IpeAttributes i r -> IpeObject r
 ipeObject' :: forall (i :: * -> *) r.
 ToObject i =>
 i r -> IpeAttributes i r -> IpeObject r
-ipeObject' i r
-i IpeAttributes i r
-a = IpeObject' i r -> IpeObject r
+ipeObject' i r
+i IpeAttributes i r
+a = IpeObject' i r -> IpeObject r
 forall r. IpeObject' i r -> IpeObject r
 forall (i :: * -> *) r. ToObject i => IpeObject' i r -> IpeObject r
 mkIpeObject (IpeObject' i r -> IpeObject r) -> IpeObject' i r -> IpeObject r
 forall a b. (a -> b) -> a -> b
 $ i r
-i i r -> IpeAttributes i r -> IpeObject' i r
+i i r -> IpeAttributes i r -> IpeObject' i r
 forall core extra. core -> extra -> core :+ extra
 :+ IpeAttributes i r
-a
+a
 
-commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)
+commonAttributes :: Lens' (IpeObject r) (Attributes (AttrMapSym1 r) CommonAttributes)
 commonAttributes :: forall r (f :: * -> *).
 Functor f =>
 (Attributes (AttrMapSym1 r) CommonAttributes
@@ -2136,24 +2136,24 @@
 . IpeObject r -> Rec (Attr (AttrMapSym1 r)) CommonAttributes
 forall {r}.
 IpeObject r -> Rec (Attr (AttrMapSym1 r)) CommonAttributes
-g) (\IpeObject r
-x (Attrs Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a) -> IpeObject r
+g) (\IpeObject r
+x (Attrs Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a) -> IpeObject r
 -> Rec (Attr (AttrMapSym1 r)) CommonAttributes -> IpeObject r
 forall {r}.
 IpeObject r
 -> Rec (Attr (AttrMapSym1 r)) CommonAttributes -> IpeObject r
-s IpeObject r
-x Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a)
+s IpeObject r
+x Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a)
   where
-    select :: (CommonAttributes  AttributesOf g) =>
-              Lens' (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-    select :: forall (g :: * -> *) r.
+    select :: (CommonAttributes  AttributesOf g) =>
+              Lens' (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
+    select :: forall (g :: * -> *) r.
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select = (Attributes' r (AttributesOf g)
+select = (Attributes' r (AttributesOf g)
  -> f (Attributes' r (AttributesOf g)))
 -> (g r :+ Attributes' r (AttributesOf g))
 -> f (g r :+ Attributes' r (AttributesOf g))
@@ -2206,13 +2206,13 @@
 (record f rs -> g (record f rs)) -> record f ss -> g (record f ss)
 rsubset
 
-    g :: IpeObject r -> Rec (Attr (AttrMapSym1 r)) CommonAttributes
-g (IpeGroup IpeObject' Group r
-i)     = Group r
+    g :: IpeObject r -> Rec (Attr (AttrMapSym1 r)) CommonAttributes
+g (IpeGroup IpeObject' Group r
+i)     = Group r
 :+ Attributes
      (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
 IpeObject' Group r
-i(Group r
+i(Group r
  :+ Attributes
       (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip])
 -> Getting
@@ -2242,11 +2242,11 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select
-    g (IpeImage IpeObject' Image r
-i)     = Image r :+ Attributes (AttrMapSym1 r) CommonAttributes
+select
+    g (IpeImage IpeObject' Image r
+i)     = Image r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' Image r
-i(Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> Getting
      (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
      (Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
@@ -2270,11 +2270,11 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select
-    g (IpeTextLabel IpeObject' TextLabel r
-i) = TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes
+select
+    g (IpeTextLabel IpeObject' TextLabel r
+i) = TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' TextLabel r
-i(TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> Getting
      (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
      (TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
@@ -2300,11 +2300,11 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select
-    g (IpeMiniPage IpeObject' MiniPage r
-i)  = MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes
+select
+    g (IpeMiniPage IpeObject' MiniPage r
+i)  = MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' MiniPage r
-i(MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> Getting
      (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
      (MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
@@ -2330,15 +2330,15 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select
-    g (IpeUse IpeObject' IpeSymbol r
-i)       = IpeSymbol r
+select
+    g (IpeUse IpeObject' IpeSymbol r
+i)       = IpeSymbol r
 :+ Attributes
      (AttrMapSym1 r)
      '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen,
         'Size]
 IpeObject' IpeSymbol r
-i(IpeSymbol r
+i(IpeSymbol r
  :+ Attributes
       (AttrMapSym1 r)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen,
@@ -2376,16 +2376,16 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select
-    g (IpePath IpeObject' Path r
-i)      = Path r
+select
+    g (IpePath IpeObject' Path r
+i)      = Path r
 :+ Attributes
      (AttrMapSym1 r)
      '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash,
         'Pen, 'LineCap, 'LineJoin, 'FillRule, 'Arrow, 'RArrow,
         'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient]
 IpeObject' Path r
-i(Path r
+i(Path r
  :+ Attributes
       (AttrMapSym1 r)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash,
@@ -2424,13 +2424,13 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select
+select
 
-    s :: IpeObject r
+    s :: IpeObject r
 -> Rec (Attr (AttrMapSym1 r)) CommonAttributes -> IpeObject r
-s (IpeGroup IpeObject' Group r
-i)     Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a = IpeObject' Group r -> IpeObject r
+s (IpeGroup IpeObject' Group r
+i)     Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a = IpeObject' Group r -> IpeObject r
 forall r. IpeObject' Group r -> IpeObject r
 IpeGroup     (IpeObject' Group r -> IpeObject r)
 -> IpeObject' Group r -> IpeObject r
@@ -2439,7 +2439,7 @@
 :+ Attributes
      (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
 IpeObject' Group r
-i(Group r
+i(Group r
  :+ Attributes
       (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip])
 -> ((Group r
@@ -2470,7 +2470,7 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
+select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
   -> Identity (Rec (Attr (AttrMapSym1 r)) CommonAttributes))
  -> (Group r
      :+ Attributes
@@ -2489,17 +2489,17 @@
         (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
 forall s t a b. ASetter s t a b -> b -> s -> t
 .~ Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a
-    s (IpeImage IpeObject' Image r
-i)     Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a = IpeObject' Image r -> IpeObject r
+a
+    s (IpeImage IpeObject' Image r
+i)     Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a = IpeObject' Image r -> IpeObject r
 forall r. IpeObject' Image r -> IpeObject r
 IpeImage     (IpeObject' Image r -> IpeObject r)
 -> IpeObject' Image r -> IpeObject r
 forall a b. (a -> b) -> a -> b
 $ Image r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' Image r
-i(Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> ((Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
     -> Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> Image r :+ Attributes (AttrMapSym1 r) CommonAttributes
@@ -2518,7 +2518,7 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
+select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
   -> Identity (Rec (Attr (AttrMapSym1 r)) CommonAttributes))
  -> (Image r :+ Attributes (AttrMapSym1 r) CommonAttributes)
  -> Identity
@@ -2528,17 +2528,17 @@
 -> Image r :+ Attributes (AttrMapSym1 r) CommonAttributes
 forall s t a b. ASetter s t a b -> b -> s -> t
 .~ Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a
-    s (IpeTextLabel IpeObject' TextLabel r
-i) Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a = IpeObject' TextLabel r -> IpeObject r
+a
+    s (IpeTextLabel IpeObject' TextLabel r
+i) Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a = IpeObject' TextLabel r -> IpeObject r
 forall r. IpeObject' TextLabel r -> IpeObject r
 IpeTextLabel (IpeObject' TextLabel r -> IpeObject r)
 -> IpeObject' TextLabel r -> IpeObject r
 forall a b. (a -> b) -> a -> b
 $ TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' TextLabel r
-i(TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> ((TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
     -> TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes
@@ -2558,7 +2558,7 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
+select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
   -> Identity (Rec (Attr (AttrMapSym1 r)) CommonAttributes))
  -> (TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes)
  -> Identity
@@ -2568,17 +2568,17 @@
 -> TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes
 forall s t a b. ASetter s t a b -> b -> s -> t
 .~ Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a
-    s (IpeMiniPage IpeObject' MiniPage r
-i)  Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a = IpeObject' MiniPage r -> IpeObject r
+a
+    s (IpeMiniPage IpeObject' MiniPage r
+i)  Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a = IpeObject' MiniPage r -> IpeObject r
 forall r. IpeObject' MiniPage r -> IpeObject r
 IpeMiniPage  (IpeObject' MiniPage r -> IpeObject r)
 -> IpeObject' MiniPage r -> IpeObject r
 forall a b. (a -> b) -> a -> b
 $ MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes
 IpeObject' MiniPage r
-i(MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
+i(MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> ((MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
     -> MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
 -> MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes
@@ -2598,7 +2598,7 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
+select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
   -> Identity (Rec (Attr (AttrMapSym1 r)) CommonAttributes))
  -> (MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes)
  -> Identity
@@ -2608,10 +2608,10 @@
 -> MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes
 forall s t a b. ASetter s t a b -> b -> s -> t
 .~ Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a
-    s (IpeUse IpeObject' IpeSymbol r
-i)       Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a = IpeObject' IpeSymbol r -> IpeObject r
+a
+    s (IpeUse IpeObject' IpeSymbol r
+i)       Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a = IpeObject' IpeSymbol r -> IpeObject r
 forall r. IpeObject' IpeSymbol r -> IpeObject r
 IpeUse       (IpeObject' IpeSymbol r -> IpeObject r)
 -> IpeObject' IpeSymbol r -> IpeObject r
@@ -2622,7 +2622,7 @@
      '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen,
         'Size]
 IpeObject' IpeSymbol r
-i(IpeSymbol r
+i(IpeSymbol r
  :+ Attributes
       (AttrMapSym1 r)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen,
@@ -2666,7 +2666,7 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
+select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
   -> Identity (Rec (Attr (AttrMapSym1 r)) CommonAttributes))
  -> (IpeSymbol r
      :+ Attributes
@@ -2692,10 +2692,10 @@
            'Size]
 forall s t a b. ASetter s t a b -> b -> s -> t
 .~ Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a
-    s (IpePath IpeObject' Path r
-i)      Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a = IpeObject' Path r -> IpeObject r
+a
+    s (IpePath IpeObject' Path r
+i)      Rec (Attr (AttrMapSym1 r)) CommonAttributes
+a = IpeObject' Path r -> IpeObject r
 forall r. IpeObject' Path r -> IpeObject r
 IpePath      (IpeObject' Path r -> IpeObject r)
 -> IpeObject' Path r -> IpeObject r
@@ -2707,7 +2707,7 @@
         'Pen, 'LineCap, 'LineJoin, 'FillRule, 'Arrow, 'RArrow,
         'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient]
 IpeObject' Path r
-i(Path r
+i(Path r
  :+ Attributes
       (AttrMapSym1 r)
       '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash,
@@ -2756,7 +2756,7 @@
 (CommonAttributes ⊆ AttributesOf g) =>
 Lens'
   (IpeObject' g r) (Rec (Attr (AttrMapSym1 r)) CommonAttributes)
-select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
+select ((Rec (Attr (AttrMapSym1 r)) CommonAttributes
   -> Identity (Rec (Attr (AttrMapSym1 r)) CommonAttributes))
  -> (Path r
      :+ Attributes
@@ -2786,30 +2786,30 @@
            'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient]
 forall s t a b. ASetter s t a b -> b -> s -> t
 .~ Rec (Attr (AttrMapSym1 r)) CommonAttributes
-a
+a
 
 -- | collect all non-group objects
-flattenGroups :: [IpeObject r] -> [IpeObject r]
+flattenGroups :: [IpeObject r] -> [IpeObject r]
 flattenGroups :: forall r. [IpeObject r] -> [IpeObject r]
 flattenGroups = (IpeObject r -> [IpeObject r]) -> [IpeObject r] -> [IpeObject r]
 forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
 concatMap IpeObject r -> [IpeObject r]
 forall r. IpeObject r -> [IpeObject r]
-flattenGroups'
+flattenGroups'
   where
-    flattenGroups'                              :: IpeObject r -> [IpeObject r]
-    flattenGroups' :: forall r. IpeObject r -> [IpeObject r]
-flattenGroups' (IpeGroup (Group [IpeObject r]
-gs :+ IpeAttributes Group r
-ats)) =
+    flattenGroups'                              :: IpeObject r -> [IpeObject r]
+    flattenGroups' :: forall r. IpeObject r -> [IpeObject r]
+flattenGroups' (IpeGroup (Group [IpeObject r]
+gs :+ IpeAttributes Group r
+ats)) =
       (IpeObject r -> IpeObject r) -> [IpeObject r] -> [IpeObject r]
 forall a b. (a -> b) -> [a] -> [b]
 map (Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
 -> IpeObject r -> IpeObject r
 forall {p} {a}. p -> a -> a
-applyAts Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
+applyAts Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
 IpeAttributes Group r
-ats) ([IpeObject r] -> [IpeObject r])
+ats) ([IpeObject r] -> [IpeObject r])
 -> ([IpeObject r] -> [IpeObject r])
 -> [IpeObject r]
 -> [IpeObject r]
@@ -2818,17 +2818,17 @@
 forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
 concatMap IpeObject r -> [IpeObject r]
 forall r. IpeObject r -> [IpeObject r]
-flattenGroups' ([IpeObject r] -> [IpeObject r]) -> [IpeObject r] -> [IpeObject r]
+flattenGroups' ([IpeObject r] -> [IpeObject r]) -> [IpeObject r] -> [IpeObject r]
 forall a b. (a -> b) -> a -> b
 $ [IpeObject r]
-gs
+gs
         where
-          applyAts :: p -> a -> a
-applyAts p
+          applyAts :: p -> a -> a
+applyAts p
 _ = a -> a
 forall a. a -> a
 id
-    flattenGroups' IpeObject r
-o                            = [IpeObject r
-o]
+    flattenGroups' IpeObject r
+o                            = [IpeObject r
+o]
 
\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/src/Ipe.FromIpe.html b/haddocks/hgeometry/ipe/src/Ipe.FromIpe.html index 00a23c9c6..579dc016e 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.FromIpe.html +++ b/haddocks/hgeometry/ipe/src/Ipe.FromIpe.html @@ -91,7 +91,7 @@
-- | Extracts the point from a Symbol. When creating a symbol this -- creates a disk that supports a stroke color. -_asPoint :: Prism' (IpeSymbol r) (Point 2 r) +_asPoint :: Prism' (IpeSymbol r) (Point 2 r) _asPoint :: forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (Point 2 r) (f (Point 2 r)) -> p (IpeSymbol r) (f (IpeSymbol r)) @@ -123,7 +123,7 @@ -- segment or a polyline with more than two points. -- -- -_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r)) +_asLineSegment :: Prism' (Path r) (LineSegment AnEndPoint (Point 2 r)) _asLineSegment :: forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (LineSegment AnEndPoint (Point 2 r)) @@ -158,7 +158,7 @@ -- segment or a polyline with more than two points. -- -- -_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r)) +_asClosedLineSegment :: Prism' (Path r) (ClosedLineSegment (Point 2 r)) _asClosedLineSegment :: forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (ClosedLineSegment (Point 2 r)) @@ -193,7 +193,7 @@ -- -- >>> testPath ^? _asPolyLine -- Just (PolyLine [Point2 0 0,Point2 10 10,Point2 200 100]) -_asPolyLine :: Prism' (Path r) (PolyLine.PolyLine (Point 2 r)) +_asPolyLine :: Prism' (Path r) (PolyLine.PolyLine (Point 2 r)) _asPolyLine :: forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (PolyLine (Point 2 r)) (f (PolyLine (Point 2 r))) @@ -205,11 +205,11 @@ forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b prism' PolyLine (Point 2 r) -> Path r forall {r}. PolyLine (Point 2 r) -> Path r -poly2path Path r -> Maybe (PolyLine (Point 2 r)) -path2poly +poly2path Path r -> Maybe (PolyLine (Point 2 r)) +path2poly where - poly2path :: PolyLine (Point 2 r) -> Path r -poly2path = Seq (PathSegment r) -> Path r + poly2path :: PolyLine (Point 2 r) -> Path r +poly2path = Seq (PathSegment r) -> Path r forall r. Seq (PathSegment r) -> Path r Path (Seq (PathSegment r) -> Path r) -> (PolyLine (Point 2 r) -> Seq (PathSegment r)) @@ -226,8 +226,8 @@ . PolyLine (Point 2 r) -> PathSegment r forall r. PolyLine (Point 2 r) -> PathSegment r PolyLineSegment - path2poly :: Path r -> Maybe (PolyLine (Point 2 r)) -path2poly = Getting + path2poly :: Path r -> Maybe (PolyLine (Point 2 r)) +path2poly = Getting (First (PolyLine (Point 2 r))) (Path r) (PolyLine (Point 2 r)) -> Path r -> Maybe (PolyLine (Point 2 r)) forall s (m :: * -> *) a. @@ -286,7 +286,7 @@ -- than ignoring everything that does not fit -- | Convert to a simple polygon -_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r)) +_asSimplePolygon :: Prism' (Path r) (SimplePolygon (Point 2 r)) _asSimplePolygon :: forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (SimplePolygon (Point 2 r)) (f (SimplePolygon (Point 2 r))) @@ -306,7 +306,7 @@ pathToPolygon -- | Convert to a convex polygon -_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r)) +_asConvexPolygon :: (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r)) _asConvexPolygon :: forall r. (Num r, Ord r) => Prism' (Path r) (ConvexPolygon (Point 2 r)) @@ -332,7 +332,7 @@ _ConvexPolygon -- | Tries to convert a path into a rectangle. -_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r)) +_asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r)) _asRectangle :: forall r. (Num r, Ord r) => Prism' (Path r) (Rectangle (Point 2 r)) _asRectangle = (Rectangle (Point 2 r) -> Path r) -> (Path r -> Maybe (Rectangle (Point 2 r))) @@ -346,19 +346,19 @@ Box_ rectangle (PointF (Vector 2 (NumType rectangle))), Num (NumType rectangle)) => rectangle -> Path (NumType rectangle) -rectToPath Path r -> Maybe (Rectangle (Point 2 r)) -pathToRect +rectToPath Path r -> Maybe (Rectangle (Point 2 r)) +pathToRect where - rectToPath :: rectangle -> Path (NumType rectangle) -rectToPath (rectangle -> Corners (PointF (Vector 2 (NumType rectangle))) + rectToPath :: rectangle -> Path (NumType rectangle) +rectToPath (rectangle -> Corners (PointF (Vector 2 (NumType rectangle))) forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Corners point -Box.corners -> Corners PointF (Vector 2 (NumType rectangle)) -a PointF (Vector 2 (NumType rectangle)) -b PointF (Vector 2 (NumType rectangle)) -c PointF (Vector 2 (NumType rectangle)) -d) = +Box.corners -> Corners PointF (Vector 2 (NumType rectangle)) +a PointF (Vector 2 (NumType rectangle)) +b PointF (Vector 2 (NumType rectangle)) +c PointF (Vector 2 (NumType rectangle)) +d) = AReview (Path (NumType rectangle)) (SimplePolygon (PointF (Vector 2 (NumType rectangle)))) @@ -394,14 +394,14 @@ -> Path (NumType rectangle) forall a b. (a -> b) -> a -> b $ [PointF (Vector 2 (NumType rectangle)) -a,PointF (Vector 2 (NumType rectangle)) -b,PointF (Vector 2 (NumType rectangle)) -c,PointF (Vector 2 (NumType rectangle)) -d] - pathToRect :: Path r -> Maybe (Rectangle (Point 2 r)) -pathToRect Path r -p = Path r -pPath r +a,PointF (Vector 2 (NumType rectangle)) +b,PointF (Vector 2 (NumType rectangle)) +c,PointF (Vector 2 (NumType rectangle)) +d] + pathToRect :: Path r -> Maybe (Rectangle (Point 2 r)) +pathToRect Path r +p = Path r +pPath r -> Getting (First (SimplePolygon (Point 2 r))) (Path r) @@ -422,13 +422,13 @@ forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= SimplePolygon (Point 2 r) -> Maybe (Rectangle (Point 2 r)) -asRect +asRect - asRect :: SimplePolygon (Point 2 r) -> Maybe (Rectangle (Point 2 r)) - asRect :: SimplePolygon (Point 2 r) -> Maybe (Rectangle (Point 2 r)) -asRect SimplePolygon (Point 2 r) -pg = case SimplePolygon (Point 2 r) -pgSimplePolygon (Point 2 r) + asRect :: SimplePolygon (Point 2 r) -> Maybe (Rectangle (Point 2 r)) + asRect :: SimplePolygon (Point 2 r) -> Maybe (Rectangle (Point 2 r)) +asRect SimplePolygon (Point 2 r) +pg = case SimplePolygon (Point 2 r) +pgSimplePolygon (Point 2 r) -> Getting (Endo [Point 2 r]) (SimplePolygon (Point 2 r)) (Point 2 r) -> [Point 2 r] @@ -446,11 +446,11 @@ (SimplePolygon (Point 2 r)) (Vertex (SimplePolygon (Point 2 r))) outerBoundary of - [Point 2 r -a,Point 2 r -b,Point 2 r -c,Point 2 r -d] + [Point 2 r +a,Point 2 r +b,Point 2 r +c,Point 2 r +d] | Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -463,9 +463,9 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isH Point 2 r -a Point 2 r -b Bool -> Bool -> Bool +isH Point 2 r +a Point 2 r +b Bool -> Bool -> Bool && Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -478,9 +478,9 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isV Point 2 r -b Point 2 r -c Bool -> Bool -> Bool +isV Point 2 r +b Point 2 r +c Bool -> Bool -> Bool && Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -493,9 +493,9 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isH Point 2 r -c Point 2 r -d Bool -> Bool -> Bool +isH Point 2 r +c Point 2 r +d Bool -> Bool -> Bool && Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -508,11 +508,11 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isV Point 2 r -d Point 2 r -a -> +isV Point 2 r +d Point 2 r +a -> if Point 2 r -aPoint 2 r -> Getting r (Point 2 r) r -> r +aPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -522,7 +522,7 @@ xCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool < Point 2 r -bPoint 2 r -> Getting r (Point 2 r) r -> r +bPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -534,15 +534,15 @@ Just (Point 2 r -> Point 2 r -> Rectangle (Point 2 r) forall point. (Dimension point ~ 2) => point -> point -> Box point Rectangle Point 2 r -a Point 2 r -c) +a Point 2 r +c) else Rectangle (Point 2 r) -> Maybe (Rectangle (Point 2 r)) forall a. a -> Maybe a Just (Point 2 r -> Point 2 r -> Rectangle (Point 2 r) forall point. (Dimension point ~ 2) => point -> point -> Box point Rectangle Point 2 r -c Point 2 r -a) +c Point 2 r +a) | Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -555,9 +555,9 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isV Point 2 r -a Point 2 r -b Bool -> Bool -> Bool +isV Point 2 r +a Point 2 r +b Bool -> Bool -> Bool && Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -570,9 +570,9 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isH Point 2 r -b Point 2 r -c Bool -> Bool -> Bool +isH Point 2 r +b Point 2 r +c Bool -> Bool -> Bool && Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -585,9 +585,9 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isV Point 2 r -c Point 2 r -d Bool -> Bool -> Bool +isV Point 2 r +c Point 2 r +d Bool -> Bool -> Bool && Point 2 r -> Point 2 r -> Bool forall {s} {s}. (NumType s ~ NumType s, @@ -600,11 +600,11 @@ Eq (NumType s), Point_ s (Dimension s) (NumType s), Point_ s (Dimension s) (NumType s)) => s -> s -> Bool -isH Point 2 r -d Point 2 r -a -> +isH Point 2 r +d Point 2 r +a -> if Point 2 r -aPoint 2 r -> Getting r (Point 2 r) r -> r +aPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -614,7 +614,7 @@ yCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool < Point 2 r -bPoint 2 r -> Getting r (Point 2 r) r -> r +bPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -626,25 +626,25 @@ Just (Point 2 r -> Point 2 r -> Rectangle (Point 2 r) forall point. (Dimension point ~ 2) => point -> point -> Box point Rectangle Point 2 r -d Point 2 r -b) +d Point 2 r +b) else Rectangle (Point 2 r) -> Maybe (Rectangle (Point 2 r)) forall a. a -> Maybe a Just (Point 2 r -> Point 2 r -> Rectangle (Point 2 r) forall point. (Dimension point ~ 2) => point -> point -> Box point Rectangle Point 2 r -b Point 2 r -d) +b Point 2 r +d) [Point 2 r] _ -> Maybe (Rectangle (Point 2 r)) forall a. Maybe a Nothing - isH :: s -> s -> Bool -isH s -p s -q = s -ps -> Getting (NumType s) s (NumType s) -> NumType s + isH :: s -> s -> Bool +isH s +p s +q = s +ps -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -654,7 +654,7 @@ yCoord NumType s -> NumType s -> Bool forall a. Eq a => a -> a -> Bool == s -qs -> Getting (NumType s) s (NumType s) -> NumType s +qs -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -662,11 +662,11 @@ IndexedLens' Int point r IndexedLens' Int s (NumType s) yCoord -- edge pq is horizontal - isV :: s -> s -> Bool -isV s -p s -q = s -ps -> Getting (NumType s) s (NumType s) -> NumType s + isV :: s -> s -> Bool +isV s +p s +q = s +ps -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -676,7 +676,7 @@ xCoord NumType s -> NumType s -> Bool forall a. Eq a => a -> a -> Bool == s -qs -> Getting (NumType s) s (NumType s) -> NumType s +qs -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -689,7 +689,7 @@ -- | Convert to a triangle -_asTriangle :: Prism' (Path r) (Triangle (Point 2 r)) +_asTriangle :: Prism' (Path r) (Triangle (Point 2 r)) _asTriangle :: forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (Triangle (Point 2 r)) (f (Triangle (Point 2 r))) @@ -701,15 +701,15 @@ forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b prism' Triangle (Point 2 r) -> Path r forall {r}. Triangle (PointF (Vector 2 r)) -> Path r -triToPath Path r -> Maybe (Triangle (Point 2 r)) +triToPath Path r -> Maybe (Triangle (Point 2 r)) forall {r2}. Path r2 -> Maybe (Triangle (PointF (Vector 2 r2))) -path2tri +path2tri where - triToPath :: Triangle (PointF (Vector 2 r)) -> Path r -triToPath (Triangle PointF (Vector 2 r) -p PointF (Vector 2 r) -q PointF (Vector 2 r) -r) = SimplePolygon (PointF (Vector 2 r)) -> Path r + triToPath :: Triangle (PointF (Vector 2 r)) -> Path r +triToPath (Triangle PointF (Vector 2 r) +p PointF (Vector 2 r) +q PointF (Vector 2 r) +r) = SimplePolygon (PointF (Vector 2 r)) -> Path r forall r. SimplePolygon (Point 2 r) -> Path r polygonToPath (SimplePolygon (PointF (Vector 2 r)) -> Path r) -> SimplePolygon (PointF (Vector 2 r)) -> Path r @@ -722,13 +722,13 @@ Foldable f => f (PointF (Vector 2 r)) -> SimplePolygon (PointF (Vector 2 r)) uncheckedFromCCWPoints [PointF (Vector 2 r) -p,PointF (Vector 2 r) -q,PointF (Vector 2 r) -r] - path2tri :: Path r2 -> Maybe (Triangle (PointF (Vector 2 r2))) -path2tri Path r2 -p = case Path r2 -pPath r2 +p,PointF (Vector 2 r) +q,PointF (Vector 2 r) +r] + path2tri :: Path r2 -> Maybe (Triangle (PointF (Vector 2 r2))) +path2tri Path r2 +p = case Path r2 +pPath r2 -> Getting (Endo [SimplePolygon (PointF (Vector 2 r2))]) (Path r2) @@ -815,9 +815,9 @@ [] -> Maybe (Triangle (PointF (Vector 2 r2))) forall a. Maybe a Nothing - [SimplePolygon (PointF (Vector 2 r2)) -pg] -> case SimplePolygon (PointF (Vector 2 r2)) -pgSimplePolygon (PointF (Vector 2 r2)) + [SimplePolygon (PointF (Vector 2 r2)) +pg] -> case SimplePolygon (PointF (Vector 2 r2)) +pgSimplePolygon (PointF (Vector 2 r2)) -> Getting (Endo [PointF (Vector 2 r2)]) (SimplePolygon (PointF (Vector 2 r2))) @@ -847,10 +847,10 @@ (Vertex (SimplePolygon (PointF (Vector 2 r2)))) (Vertex (SimplePolygon (PointF (Vector 2 r2)))) vertices of - [PointF (Vector 2 r2) -a,PointF (Vector 2 r2) -b,PointF (Vector 2 r2) -c] -> Triangle (PointF (Vector 2 r2)) + [PointF (Vector 2 r2) +a,PointF (Vector 2 r2) +b,PointF (Vector 2 r2) +c] -> Triangle (PointF (Vector 2 r2)) -> Maybe (Triangle (PointF (Vector 2 r2))) forall a. a -> Maybe a Just (Triangle (PointF (Vector 2 r2)) @@ -864,9 +864,9 @@ -> Triangle (PointF (Vector 2 r2)) forall point. point -> point -> point -> Triangle point Triangle PointF (Vector 2 r2) -a PointF (Vector 2 r2) -b PointF (Vector 2 r2) -c +a PointF (Vector 2 r2) +b PointF (Vector 2 r2) +c [PointF (Vector 2 r2)] _ -> Maybe (Triangle (PointF (Vector 2 r2))) forall a. Maybe a @@ -882,7 +882,7 @@ -- (Disk origin 1) (Vector2 1 1) -_asEllipse :: Prism' (Path r) (Ellipse r) +_asEllipse :: Prism' (Path r) (Ellipse r) _asEllipse :: forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (Ellipse r) (f (Ellipse r)) -> p (Path r) (f (Path r)) @@ -892,12 +892,12 @@ forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b prism' Ellipse r -> Path r forall {r}. Ellipse r -> Path r -toPath Path r -> Maybe (Ellipse r) +toPath Path r -> Maybe (Ellipse r) forall {r2}. Path r2 -> Maybe (Ellipse r2) -toEllipse +toEllipse where - toPath :: Ellipse r -> Path r -toPath = Seq (PathSegment r) -> Path r + toPath :: Ellipse r -> Path r +toPath = Seq (PathSegment r) -> Path r forall r. Seq (PathSegment r) -> Path r Path (Seq (PathSegment r) -> Path r) -> (Ellipse r -> Seq (PathSegment r)) -> Ellipse r -> Path r @@ -910,10 +910,10 @@ . Ellipse r -> PathSegment r forall r. Ellipse r -> PathSegment r EllipseSegment - toEllipse :: Path r2 -> Maybe (Ellipse r2) -toEllipse Path r2 -p = case Path r2 -pPath r2 + toEllipse :: Path r2 -> Maybe (Ellipse r2) +toEllipse Path r2 +p = case Path r2 +pPath r2 -> Getting (Endo [Ellipse r2]) (Path r2) (Ellipse r2) -> [Ellipse r2] forall s a. s -> Getting (Endo [a]) s a -> [a] @@ -957,17 +957,17 @@ p (Ellipse r) (f (Ellipse r)) -> p (PathSegment r) (f (PathSegment r)) _EllipseSegment of - [Ellipse r2 -e] -> Ellipse r2 -> Maybe (Ellipse r2) + [Ellipse r2 +e] -> Ellipse r2 -> Maybe (Ellipse r2) forall a. a -> Maybe a Just Ellipse r2 -e +e [Ellipse r2] _ -> Maybe (Ellipse r2) forall a. Maybe a Nothing -_asCircle :: (Radical r, Eq r) => Prism' (Path r) (Circle (Point 2 r)) +_asCircle :: (Radical r, Eq r) => Prism' (Path r) (Circle (Point 2 r)) _asCircle :: forall r. (Radical r, Eq r) => Prism' (Path r) (Circle (Point 2 r)) _asCircle = p (Ellipse r) (f (Ellipse r)) -> p (Path r) (f (Path r)) forall r (p :: * -> * -> *) (f :: * -> *). @@ -988,7 +988,7 @@ _EllipseCircle -- FIXME: For reading we should not need the Radical constraint! -_asDisk :: (Radical r, Eq r) => Prism' (Path r) (Disk (Point 2 r)) +_asDisk :: (Radical r, Eq r) => Prism' (Path r) (Disk (Point 2 r)) _asDisk :: forall r. (Radical r, Eq r) => Prism' (Path r) (Disk (Point 2 r)) _asDisk = p (Circle (Point 2 r)) (f (Circle (Point 2 r))) -> p (Path r) (f (Path r)) @@ -1037,7 +1037,7 @@ -- embed = either polygonToPath polygonToPath -polygonToPath :: SimplePolygon (Point 2 r) -> Path r +polygonToPath :: SimplePolygon (Point 2 r) -> Path r polygonToPath :: forall r. SimplePolygon (Point 2 r) -> Path r polygonToPath = Seq (PathSegment r) -> Path r forall r. Seq (PathSegment r) -> Path r @@ -1061,11 +1061,11 @@ -- polygonToPath (MultiPolygon vs hs) = Path . LSeq.fromNonEmpty . fmap PolygonPath -- $ vs :| hs -pathToPolygon :: Path r -> Maybe (SimplePolygon (Point 2 r)) +pathToPolygon :: Path r -> Maybe (SimplePolygon (Point 2 r)) pathToPolygon :: forall r. Path r -> Maybe (SimplePolygon (Point 2 r)) -pathToPolygon Path r -p = case Path r -pPath r +pathToPolygon Path r +p = case Path r +pPath r -> Getting (Endo [SimplePolygon (Point 2 r)]) (Path r) @@ -1127,11 +1127,11 @@ p (SimplePolygon (Point 2 r)) (f (SimplePolygon (Point 2 r))) -> p (PathSegment r) (f (PathSegment r)) _PolygonPath of - [SimplePolygon (Point 2 r) -pg] -> SimplePolygon (Point 2 r) -> Maybe (SimplePolygon (Point 2 r)) + [SimplePolygon (Point 2 r) +pg] -> SimplePolygon (Point 2 r) -> Maybe (SimplePolygon (Point 2 r)) forall a. a -> Maybe a Just SimplePolygon (Point 2 r) -pg +pg [SimplePolygon (Point 2 r)] _ -> Maybe (SimplePolygon (Point 2 r)) forall a. Maybe a @@ -1151,14 +1151,14 @@ -- -- >>> testObject ^? _withAttrs _IpePath _asPolyLine -- Just (PolyLine [Point2 0 0,Point2 10 10,Point2 200 100] :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "red"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}) -_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g - -> Prism' (IpeObject r) (g :+ IpeAttributes i r) +_withAttrs :: Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g + -> Prism' (IpeObject r) (g :+ IpeAttributes i r) _withAttrs :: forall r (i :: * -> *) g. Prism' (IpeObject r) (i r :+ IpeAttributes i r) -> Prism' (i r) g -> Prism' (IpeObject r) (g :+ IpeAttributes i r) -_withAttrs Prism' (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) -po Prism' (i r) g -pg = ((g :+ Attributes' r (AttributesOf i)) -> IpeObject r) +_withAttrs Prism' (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) +po Prism' (i r) g +pg = ((g :+ Attributes' r (AttributesOf i)) -> IpeObject r) -> (IpeObject r -> Maybe (g :+ Attributes' r (AttributesOf i))) -> Prism (IpeObject r) @@ -1167,16 +1167,16 @@ (g :+ Attributes' r (AttributesOf i)) forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b prism' (g :+ Attributes' r (AttributesOf i)) -> IpeObject r -g2o IpeObject r -> Maybe (g :+ Attributes' r (AttributesOf i)) -o2g +g2o IpeObject r -> Maybe (g :+ Attributes' r (AttributesOf i)) +o2g where - g2o :: (g :+ Attributes' r (AttributesOf i)) -> IpeObject r -g2o = AReview (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) + g2o :: (g :+ Attributes' r (AttributesOf i)) -> IpeObject r +g2o = AReview (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) -> (i r :+ Attributes' r (AttributesOf i)) -> IpeObject r forall b (m :: * -> *) t. MonadReader b m => AReview t b -> m t review AReview (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) Prism' (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) -po ((i r :+ Attributes' r (AttributesOf i)) -> IpeObject r) +po ((i r :+ Attributes' r (AttributesOf i)) -> IpeObject r) -> ((g :+ Attributes' r (AttributesOf i)) -> i r :+ Attributes' r (AttributesOf i)) -> (g :+ Attributes' r (AttributesOf i)) @@ -1203,10 +1203,10 @@ forall b (m :: * -> *) t. MonadReader b m => AReview t b -> m t review AReview (i r) g Prism' (i r) g -pg) - o2g :: IpeObject r -> Maybe (g :+ Attributes' r (AttributesOf i)) -o2g IpeObject r -o = Getting +pg) + o2g :: IpeObject r -> Maybe (g :+ Attributes' r (AttributesOf i)) +o2g IpeObject r +o = Getting (First (i r :+ Attributes' r (AttributesOf i))) (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) @@ -1219,21 +1219,21 @@ (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) Prism' (IpeObject r) (i r :+ Attributes' r (AttributesOf i)) -po IpeObject r -o Maybe (i r :+ Attributes' r (AttributesOf i)) +po IpeObject r +o Maybe (i r :+ Attributes' r (AttributesOf i)) -> ((i r :+ Attributes' r (AttributesOf i)) -> Maybe (g :+ Attributes' r (AttributesOf i))) -> Maybe (g :+ Attributes' r (AttributesOf i)) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b ->>= \(i r -i :+ Attributes' r (AttributesOf i) -ats) -> (g +>>= \(i r +i :+ Attributes' r (AttributesOf i) +ats) -> (g -> Attributes' r (AttributesOf i) -> g :+ Attributes' r (AttributesOf i) forall core extra. core -> extra -> core :+ extra :+ Attributes' r (AttributesOf i) -ats) (g -> g :+ Attributes' r (AttributesOf i)) +ats) (g -> g :+ Attributes' r (AttributesOf i)) -> Maybe g -> Maybe (g :+ Attributes' r (AttributesOf i)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Getting (First g) (i r) g -> i r -> Maybe g @@ -1242,8 +1242,8 @@ Getting (First a) s a -> m (Maybe a) preview Getting (First g) (i r) g Prism' (i r) g -pg i r -i +pg i r +i @@ -1255,14 +1255,14 @@ -class HasDefaultFromIpe g where - type DefaultFromIpe g :: Type -> Type - defaultFromIpe :: (r ~ NumType g) - => Prism' (IpeObject r) (g :+ IpeAttributes (DefaultFromIpe g) r) +class HasDefaultFromIpe g where + type DefaultFromIpe g :: Type -> Type + defaultFromIpe :: (r ~ NumType g) + => Prism' (IpeObject r) (g :+ IpeAttributes (DefaultFromIpe g) r) -instance HasDefaultFromIpe (Point 2 r) where - type DefaultFromIpe (Point 2 r) = IpeSymbol - defaultFromIpe :: forall r. +instance HasDefaultFromIpe (Point 2 r) where + type DefaultFromIpe (Point 2 r) = IpeSymbol + defaultFromIpe :: forall r. (r ~ NumType (Point 2 r)) => Prism' (IpeObject r) @@ -1289,9 +1289,9 @@ Prism' (IpeSymbol r) (Point 2 r) _asPoint -instance HasDefaultFromIpe (ClosedLineSegment (Point 2 r)) where - type DefaultFromIpe (ClosedLineSegment (Point 2 r)) = Path - defaultFromIpe :: forall r. +instance HasDefaultFromIpe (ClosedLineSegment (Point 2 r)) where + type DefaultFromIpe (ClosedLineSegment (Point 2 r)) = Path + defaultFromIpe :: forall r. (r ~ NumType (ClosedLineSegment (Point 2 r))) => Prism' (IpeObject r) @@ -1328,9 +1328,9 @@ Prism' (Path r) (ClosedLineSegment (Point 2 r)) _asClosedLineSegment -instance HasDefaultFromIpe (LineSegment AnEndPoint (Point 2 r)) where - type DefaultFromIpe (LineSegment AnEndPoint (Point 2 r)) = Path - defaultFromIpe :: forall r. +instance HasDefaultFromIpe (LineSegment AnEndPoint (Point 2 r)) where + type DefaultFromIpe (LineSegment AnEndPoint (Point 2 r)) = Path + defaultFromIpe :: forall r. (r ~ NumType (LineSegment AnEndPoint (Point 2 r))) => Prism' (IpeObject r) @@ -1367,9 +1367,9 @@ Prism' (Path r) (LineSegment AnEndPoint (Point 2 r)) _asLineSegment -instance HasDefaultFromIpe (Ellipse r) where - type DefaultFromIpe (Ellipse r) = Path - defaultFromIpe :: forall r. +instance HasDefaultFromIpe (Ellipse r) where + type DefaultFromIpe (Ellipse r) = Path + defaultFromIpe :: forall r. (r ~ NumType (Ellipse r)) => Prism' (IpeObject r) @@ -1396,9 +1396,9 @@ Prism' (Path r) (Ellipse r) _asEllipse -instance (Radical r, Eq r) => HasDefaultFromIpe (Circle (Point 2 r)) where - type DefaultFromIpe (Circle (Point 2 r)) = Path - defaultFromIpe :: forall r. +instance (Radical r, Eq r) => HasDefaultFromIpe (Circle (Point 2 r)) where + type DefaultFromIpe (Circle (Point 2 r)) = Path + defaultFromIpe :: forall r. (r ~ NumType (Circle (Point 2 r))) => Prism' (IpeObject r) @@ -1428,9 +1428,9 @@ Prism' (Path r) (Circle (Point 2 r)) _asCircle -instance (Radical r, Eq r) => HasDefaultFromIpe (Disk (Point 2 r)) where - type DefaultFromIpe (Disk (Point 2 r)) = Path - defaultFromIpe :: forall r. +instance (Radical r, Eq r) => HasDefaultFromIpe (Disk (Point 2 r)) where + type DefaultFromIpe (Disk (Point 2 r)) = Path + defaultFromIpe :: forall r. (r ~ NumType (Disk (Point 2 r))) => Prism' (IpeObject r) @@ -1459,9 +1459,9 @@ Prism' (Path r) (Disk (Point 2 r)) _asDisk -instance HasDefaultFromIpe (PolyLine.PolyLine (Point 2 r)) where - type DefaultFromIpe (PolyLine.PolyLine (Point 2 r)) = Path - defaultFromIpe :: forall r. +instance HasDefaultFromIpe (PolyLine.PolyLine (Point 2 r)) where + type DefaultFromIpe (PolyLine.PolyLine (Point 2 r)) = Path + defaultFromIpe :: forall r. (r ~ NumType (PolyLine (Point 2 r))) => Prism' (IpeObject r) @@ -1494,9 +1494,9 @@ _asPolyLine -instance HasDefaultFromIpe (SimplePolygon (Point 2 r)) where - type DefaultFromIpe (SimplePolygon (Point 2 r)) = Path - defaultFromIpe :: forall r. +instance HasDefaultFromIpe (SimplePolygon (Point 2 r)) where + type DefaultFromIpe (SimplePolygon (Point 2 r)) = Path + defaultFromIpe :: forall r. (r ~ NumType (SimplePolygon (Point 2 r))) => Prism' (IpeObject r) @@ -1532,9 +1532,9 @@ -- type DefaultFromIpe (MultiPolygon () r) = Path -- defaultFromIpe = _withAttrs _IpePath _asMultiPolygon -instance (Num r, Ord r) => HasDefaultFromIpe (Rectangle (Point 2 r)) where - type DefaultFromIpe (Rectangle (Point 2 r)) = Path - defaultFromIpe :: forall r. +instance (Num r, Ord r) => HasDefaultFromIpe (Rectangle (Point 2 r)) where + type DefaultFromIpe (Rectangle (Point 2 r)) = Path + defaultFromIpe :: forall r. (r ~ NumType (Rectangle (Point 2 r))) => Prism' (IpeObject r) @@ -1566,14 +1566,14 @@ -- | Read all g's from some ipe page(s). -readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) - => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r] +readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) + => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r] readAll :: forall g r. (HasDefaultFromIpe g, r ~ NumType g) => IpePage r -> [g :+ IpeAttributes (DefaultFromIpe g) r] -readAll IpePage r -p = IpePage r -pIpePage r +readAll IpePage r +p = IpePage r +pIpePage r -> Getting (Endo [g :+ Attributes' r (AttributesOf (DefaultFromIpe g))]) (IpePage r) @@ -1681,13 +1681,13 @@ -- | Convenience function from reading all g's from an ipe file. If there -- is an error reading or parsing the file the error is "thrown away". -readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) - => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r] +readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) + => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r] readAllFrom :: forall g r. (HasDefaultFromIpe g, r ~ NumType g, Coordinate r, Eq r) => OsPath -> IO [g :+ IpeAttributes (DefaultFromIpe g) r] -readAllFrom OsPath -fp = (IpePage (NumType g) +readAllFrom OsPath +fp = (IpePage (NumType g) -> [g :+ Attributes' r (AttributesOf (DefaultFromIpe g))]) -> Either Text (IpePage (NumType g)) -> [g :+ Attributes' r (AttributesOf (DefaultFromIpe g))] @@ -1712,9 +1712,9 @@ (Coordinate r, Eq r) => OsPath -> IO (Either Text (IpePage r)) readSinglePageFile OsPath -fp +fp -fromSingleton :: a -> Seq.Seq a +fromSingleton :: a -> Seq.Seq a fromSingleton :: forall a. a -> Seq a fromSingleton = a -> Seq a forall a. a -> Seq a diff --git a/haddocks/hgeometry/ipe/src/Ipe.IpeOut.html b/haddocks/hgeometry/ipe/src/Ipe.IpeOut.html index 1436a45b9..1c49b1109 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.IpeOut.html +++ b/haddocks/hgeometry/ipe/src/Ipe.IpeOut.html @@ -33,47 +33,48 @@ import HGeometry.HalfLine import HGeometry.Intersection import HGeometry.Line -import HGeometry.LineSegment -import HGeometry.Number.Radical -import HGeometry.Point -import HGeometry.PolyLine -import HGeometry.Polygon -import HGeometry.Polygon.Convex -import HGeometry.Polygon.Simple -import HGeometry.Polygon.WithHoles -import HGeometry.Properties -import Ipe.Attributes -import Ipe.Color (IpeColor(..)) -import Ipe.FromIpe -import Ipe.Types - +import HGeometry.Line.General +import HGeometry.LineSegment +import HGeometry.Number.Radical +import HGeometry.Point +import HGeometry.PolyLine +import HGeometry.Polygon +import HGeometry.Polygon.Convex +import HGeometry.Polygon.Simple +import HGeometry.Polygon.WithHoles +import HGeometry.Properties +import Ipe.Attributes +import Ipe.Color (IpeColor(..)) +import Ipe.FromIpe +import Ipe.Types --------------------------------------------------------------------------------- - --- $setup --- >>> :set -XOverloadedStrings --- >>> :{ --- let Just (myPolygon :: SimplePolygon (Point 2 Int)) = fromPoints $ [origin, Point2 10 10, Point2 100 200] --- :} - --------------------------------------------------------------------------------- --- * The IpeOut type and the default combinator to use it - -type IpeOut g i r = g -> IpeObject' i r - --- | Give the option to draw zero, one or more things, i.e. by --- choosing f ~ Maybe or f ~ [] -type IpeOut' f g i r = g -> f (IpeObject' i r) - + +-------------------------------------------------------------------------------- + +-- $setup +-- >>> :set -XOverloadedStrings +-- >>> :{ +-- let Just (myPolygon :: SimplePolygon (Point 2 Int)) = fromPoints $ [origin, Point2 10 10, Point2 100 200] +-- :} + +-------------------------------------------------------------------------------- +-- * The IpeOut type and the default combinator to use it + +type IpeOut g i r = g -> IpeObject' i r + +-- | Give the option to draw zero, one or more things, i.e. by +-- choosing f ~ Maybe or f ~ [] +type IpeOut' f g i r = g -> f (IpeObject' i r) --- | Add attributes to an IpeObject' -(!) :: IpeObject' i r -> IpeAttributes i r -> IpeObject' i r -! :: forall (i :: * -> *) r. + +-- | Add attributes to an IpeObject' +(!) :: IpeObject' i r -> IpeAttributes i r -> IpeObject' i r +! :: forall (i :: * -> *) r. IpeObject' i r -> IpeAttributes i r -> IpeObject' i r -(!) IpeObject' i r -i Attributes' r (AttributesOf i) -ats = IpeObject' i r -iIpeObject' i r +(!) IpeObject' i r +i Attributes' r (AttributesOf i) +ats = IpeObject' i r +iIpeObject' i r -> (IpeObject' i r -> IpeObject' i r) -> IpeObject' i r forall a b. a -> (a -> b) -> b &(Attributes' r (AttributesOf i) @@ -94,54 +95,54 @@ -> Attributes' r (AttributesOf i) -> Attributes' r (AttributesOf i) forall a. Semigroup a => a -> a -> a <> Attributes' r (AttributesOf i) -ats) - --- | Render an ipe object --- +ats) + +-- | Render an ipe object -- --- >>> :{ --- iO $ defIO myPolygon ! attr SFill (IpeColor "blue") --- ! attr SLayer "alpha" --- ! attr SLayer "beta" --- :} --- IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {Attr LayerName {_layerName = "beta"}, NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "blue"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}) --- --- >>> :{ --- iO $ ipeGroup [ iO $ ipePolygon myPolygon ! attr SFill (IpeColor "red") --- ] ! attr SLayer "alpha" --- :} --- IpeGroup (Group [IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "red"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr})] :+ Attrs {Attr LayerName {_layerName = "alpha"}, NoAttr, NoAttr, NoAttr, NoAttr}) --- -iO :: ToObject i => IpeObject' i r -> IpeObject r -iO :: forall (i :: * -> *) r. ToObject i => IpeObject' i r -> IpeObject r +-- +-- >>> :{ +-- iO $ defIO myPolygon ! attr SFill (IpeColor "blue") +-- ! attr SLayer "alpha" +-- ! attr SLayer "beta" +-- :} +-- IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {Attr LayerName {_layerName = "beta"}, NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "blue"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}) +-- +-- >>> :{ +-- iO $ ipeGroup [ iO $ ipePolygon myPolygon ! attr SFill (IpeColor "red") +-- ] ! attr SLayer "alpha" +-- :} +-- IpeGroup (Group [IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "red"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr})] :+ Attrs {Attr LayerName {_layerName = "alpha"}, NoAttr, NoAttr, NoAttr, NoAttr}) +-- +iO :: ToObject i => IpeObject' i r -> IpeObject r +iO :: forall (i :: * -> *) r. ToObject i => IpeObject' i r -> IpeObject r iO = IpeObject' i r -> IpeObject r forall r. IpeObject' i r -> IpeObject r forall (i :: * -> *) r. ToObject i => IpeObject' i r -> IpeObject r mkIpeObject - --- | Render to an ipe object using the defIO IpeOut --- + +-- | Render to an ipe object using the defIO IpeOut -- --- >>> :{ --- iO'' myPolygon $ attr SFill (IpeColor "red") --- <> attr SLayer "alpha" --- <> attr SLayer "beta" --- :} --- IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {Attr LayerName {_layerName = "beta"}, NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "red"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}) --- --- >>> iO'' [ myPolygon , myPolygon ] $ attr SLayer "alpha" --- IpeGroup (Group [IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}),IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr})] :+ Attrs {Attr LayerName {_layerName = "alpha"}, NoAttr, NoAttr, NoAttr, NoAttr}) -iO'' :: ( HasDefaultIpeOut g, NumType g ~ r - , DefaultIpeOut g ~ i, ToObject i - ) => g -> IpeAttributes i r - -> IpeObject r -iO'' :: forall g r (i :: * -> *). +-- +-- >>> :{ +-- iO'' myPolygon $ attr SFill (IpeColor "red") +-- <> attr SLayer "alpha" +-- <> attr SLayer "beta" +-- :} +-- IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {Attr LayerName {_layerName = "beta"}, NoAttr, NoAttr, NoAttr, NoAttr, Attr IpeColor (Named "red"), NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}) +-- +-- >>> iO'' [ myPolygon , myPolygon ] $ attr SLayer "alpha" +-- IpeGroup (Group [IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr}),IpePath (Path {_pathSegments = fromList [PolygonPath (SimplePolygon [Point2 0 0,Point2 10 10,Point2 100 200])]} :+ Attrs {NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr, NoAttr})] :+ Attrs {Attr LayerName {_layerName = "alpha"}, NoAttr, NoAttr, NoAttr, NoAttr}) +iO'' :: ( HasDefaultIpeOut g, NumType g ~ r + , DefaultIpeOut g ~ i, ToObject i + ) => g -> IpeAttributes i r + -> IpeObject r +iO'' :: forall g r (i :: * -> *). (HasDefaultIpeOut g, NumType g ~ r, DefaultIpeOut g ~ i, ToObject i) => g -> IpeAttributes i r -> IpeObject r -iO'' g -g IpeAttributes i r -ats = IpeObject' i r -> IpeObject r +iO'' g +g IpeAttributes i r +ats = IpeObject' i r -> IpeObject r forall (i :: * -> *) r. ToObject i => IpeObject' i r -> IpeObject r iO (IpeObject' i r -> IpeObject r) -> IpeObject' i r -> IpeObject r forall a b. (a -> b) -> a -> b @@ -150,15 +151,15 @@ HasDefaultIpeOut g => IpeOut g (DefaultIpeOut g) (NumType g) defIO g -g IpeObject' i r -> IpeAttributes i r -> IpeObject' i r +g IpeObject' i r -> IpeAttributes i r -> IpeObject' i r forall (i :: * -> *) r. IpeObject' i r -> IpeAttributes i r -> IpeObject' i r ! IpeAttributes i r -ats - --- | generate an ipe object without any specific attributes -iO' :: HasDefaultIpeOut g => g -> IpeObject (NumType g) -iO' :: forall g. HasDefaultIpeOut g => g -> IpeObject (NumType g) +ats + +-- | generate an ipe object without any specific attributes +iO' :: HasDefaultIpeOut g => g -> IpeObject (NumType g) +iO' :: forall g. HasDefaultIpeOut g => g -> IpeObject (NumType g) iO' = IpeObject' (DefaultIpeOut g) (NumType g) -> IpeObject (NumType g) forall (i :: * -> *) r. ToObject i => IpeObject' i r -> IpeObject r iO (IpeObject' (DefaultIpeOut g) (NumType g) -> IpeObject (NumType g)) @@ -171,29 +172,29 @@ HasDefaultIpeOut g => IpeOut g (DefaultIpeOut g) (NumType g) defIO - --------------------------------------------------------------------------------- --- * Default Conversions - --- | Class that specifies a default conversion from a geometry type g into an --- ipe object. -class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where - type DefaultIpeOut g :: Type -> Type - - defIO :: IpeOut g (DefaultIpeOut g) (NumType g) - -instance (HasDefaultIpeOut g, a ~ IpeAttributes (DefaultIpeOut g) (NumType g)) - => HasDefaultIpeOut (g :+ a) where - type DefaultIpeOut (g :+ a) = DefaultIpeOut g - defIO :: IpeOut (g :+ a) (DefaultIpeOut (g :+ a)) (NumType (g :+ a)) -defIO (g -g :+ a -ats) = IpeOut g (DefaultIpeOut g) (NumType g) + +-------------------------------------------------------------------------------- +-- * Default Conversions + +-- | Class that specifies a default conversion from a geometry type g into an +-- ipe object. +class ToObject (DefaultIpeOut g) => HasDefaultIpeOut g where + type DefaultIpeOut g :: Type -> Type + + defIO :: IpeOut g (DefaultIpeOut g) (NumType g) + +instance (HasDefaultIpeOut g, a ~ IpeAttributes (DefaultIpeOut g) (NumType g)) + => HasDefaultIpeOut (g :+ a) where + type DefaultIpeOut (g :+ a) = DefaultIpeOut g + defIO :: IpeOut (g :+ a) (DefaultIpeOut (g :+ a)) (NumType (g :+ a)) +defIO (g +g :+ a +ats) = IpeOut g (DefaultIpeOut g) (NumType g) forall g. HasDefaultIpeOut g => IpeOut g (DefaultIpeOut g) (NumType g) defIO g -g (DefaultIpeOut g (NumType g) +g (DefaultIpeOut g (NumType g) :+ IpeAttributes (DefaultIpeOut g) (NumType g)) -> IpeAttributes (DefaultIpeOut g) (NumType g) -> DefaultIpeOut g (NumType g) @@ -202,11 +203,11 @@ IpeObject' i r -> IpeAttributes i r -> IpeObject' i r ! a IpeAttributes (DefaultIpeOut g) (NumType g) -ats - -instance HasDefaultIpeOut a => HasDefaultIpeOut [a] where - type DefaultIpeOut [a] = Group - defIO :: IpeOut [a] (DefaultIpeOut [a]) (NumType [a]) +ats + +instance HasDefaultIpeOut a => HasDefaultIpeOut [a] where + type DefaultIpeOut [a] = Group + defIO :: IpeOut [a] (DefaultIpeOut [a]) (NumType [a]) defIO = [IpeObject (NumType a)] -> Group (NumType a) :+ Attributes @@ -242,10 +243,10 @@ HasDefaultIpeOut g => IpeOut g (DefaultIpeOut g) (NumType g) defIO) - -instance HasDefaultIpeOut a => HasDefaultIpeOut (NonEmpty a) where - type DefaultIpeOut (NonEmpty a) = Group - defIO :: IpeOut + +instance HasDefaultIpeOut a => HasDefaultIpeOut (NonEmpty a) where + type DefaultIpeOut (NonEmpty a) = Group + defIO :: IpeOut (NonEmpty a) (DefaultIpeOut (NonEmpty a)) (NumType (NonEmpty a)) defIO = [IpeObject (NumType a)] -> Group (NumType a) @@ -288,12 +289,12 @@ forall a. NonEmpty a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] toList - -instance (HasDefaultIpeOut a, HasDefaultIpeOut b - , DefaultIpeOut a ~ DefaultIpeOut b, NumType a ~ NumType b - ) => HasDefaultIpeOut (Either a b) where - type DefaultIpeOut (Either a b) = DefaultIpeOut a - defIO :: IpeOut + +instance (HasDefaultIpeOut a, HasDefaultIpeOut b + , DefaultIpeOut a ~ DefaultIpeOut b, NumType a ~ NumType b + ) => HasDefaultIpeOut (Either a b) where + type DefaultIpeOut (Either a b) = DefaultIpeOut a + defIO :: IpeOut (Either a b) (DefaultIpeOut (Either a b)) (NumType (Either a b)) defIO = (a -> DefaultIpeOut b (NumType b) @@ -319,22 +320,22 @@ HasDefaultIpeOut g => IpeOut g (DefaultIpeOut g) (NumType g) defIO - -instance HasDefaultIpeOut (Point 2 r) where - type DefaultIpeOut (Point 2 r) = IpeSymbol - defIO :: IpeOut + +instance HasDefaultIpeOut (Point 2 r) where + type DefaultIpeOut (Point 2 r) = IpeSymbol + defIO :: IpeOut (Point 2 r) (DefaultIpeOut (Point 2 r)) (NumType (Point 2 r)) defIO = IpeOut (Point 2 r) IpeSymbol r IpeOut (Point 2 r) (DefaultIpeOut (Point 2 r)) (NumType (Point 2 r)) forall r. IpeOut (Point 2 r) IpeSymbol r ipeDiskMark - -instance ( IxValue (endPoint (Point 2 r)) ~ Point 2 r - , EndPoint_ (endPoint (Point 2 r)) - ) => HasDefaultIpeOut (LineSegment endPoint (Point 2 r)) where - type DefaultIpeOut (LineSegment endPoint (Point 2 r)) = Path - defIO :: IpeOut + +instance ( IxValue (endPoint (Point 2 r)) ~ Point 2 r + , EndPoint_ (endPoint (Point 2 r)) + ) => HasDefaultIpeOut (LineSegment endPoint (Point 2 r)) where + type DefaultIpeOut (LineSegment endPoint (Point 2 r)) = Path + defIO :: IpeOut (LineSegment endPoint (Point 2 r)) (DefaultIpeOut (LineSegment endPoint (Point 2 r))) (NumType (LineSegment endPoint (Point 2 r))) @@ -347,10 +348,10 @@ (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r ipeLineSegment - -instance HasDefaultIpeOut (PolyLine (Point 2 r)) where - type DefaultIpeOut (PolyLine (Point 2 r)) = Path - defIO :: IpeOut + +instance HasDefaultIpeOut (PolyLine (Point 2 r)) where + type DefaultIpeOut (PolyLine (Point 2 r)) = Path + defIO :: IpeOut (PolyLine (Point 2 r)) (DefaultIpeOut (PolyLine (Point 2 r))) (NumType (PolyLine (Point 2 r))) @@ -361,10 +362,10 @@ (NumType (PolyLine (Point 2 r))) forall r. IpeOut (PolyLine (Point 2 r)) Path r ipePolyLine - -instance (Fractional r, Ord r, Show r) => HasDefaultIpeOut (LinePV 2 r) where - type DefaultIpeOut (LinePV 2 r) = Path - defIO :: IpeOut + +instance (Fractional r, Ord r, Show r) => HasDefaultIpeOut (LinePV 2 r) where + type DefaultIpeOut (LinePV 2 r) = Path + defIO :: IpeOut (LinePV 2 r) (DefaultIpeOut (LinePV 2 r)) (NumType (LinePV 2 r)) defIO = IpeOut (LinePV 2 r) Path r IpeOut @@ -373,10 +374,64 @@ (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r ipeLine - -instance (Fractional r, Ord r, Point_ point 2 r,Show r, Show point) => HasDefaultIpeOut (HalfLine point) where - type DefaultIpeOut (HalfLine point) = Path - defIO :: IpeOut + +instance (Fractional r, Ord r, Show r) => HasDefaultIpeOut (LineEQ r) where + type DefaultIpeOut (LineEQ r) = Path + defIO :: IpeOut (LineEQ r) (DefaultIpeOut (LineEQ r)) (NumType (LineEQ r)) +defIO (LineEQ r +a r +b) = IpeOut (LinePV 2 (NumType (LineEQ r))) Path (NumType (LineEQ r)) +forall r. +(Ord r, Fractional r, Show r) => +IpeOut (LinePV 2 r) Path r +ipeLine IpeOut (LinePV 2 (NumType (LineEQ r))) Path (NumType (LineEQ r)) +-> IpeOut (LinePV 2 (NumType (LineEQ r))) Path (NumType (LineEQ r)) +forall a b. (a -> b) -> a -> b +$ r -> r -> LinePV 2 r +forall r. Num r => r -> r -> LinePV 2 r +fromLinearFunction r +a r +b + +instance (Fractional r, Ord r, Show r) => HasDefaultIpeOut (VerticalOrLineEQ r) where + type DefaultIpeOut (VerticalOrLineEQ r) = Path + defIO :: IpeOut + (VerticalOrLineEQ r) + (DefaultIpeOut (VerticalOrLineEQ r)) + (NumType (VerticalOrLineEQ r)) +defIO = \case + VerticalLineThrough r +x -> IpeOut + (LinePV 2 (NumType (VerticalOrLineEQ r))) + Path + (NumType (VerticalOrLineEQ r)) +forall r. +(Ord r, Fractional r, Show r) => +IpeOut (LinePV 2 r) Path r +ipeLine IpeOut + (LinePV 2 (NumType (VerticalOrLineEQ r))) + Path + (NumType (VerticalOrLineEQ r)) +-> IpeOut + (LinePV 2 (NumType (VerticalOrLineEQ r))) + Path + (NumType (VerticalOrLineEQ r)) +forall a b. (a -> b) -> a -> b +$ r -> LinePV 2 r +forall r line. (Line_ line 2 r, Num r) => r -> line +verticalLine r +x + NonVertical LineEQ r +l -> IpeOut (LineEQ r) (DefaultIpeOut (LineEQ r)) (NumType (LineEQ r)) +forall g. +HasDefaultIpeOut g => +IpeOut g (DefaultIpeOut g) (NumType g) +defIO LineEQ r +l + +instance (Fractional r, Ord r, Point_ point 2 r,Show r, Show point) => HasDefaultIpeOut (HalfLine point) where + type DefaultIpeOut (HalfLine point) = Path + defIO :: IpeOut (HalfLine point) (DefaultIpeOut (HalfLine point)) (NumType (HalfLine point)) @@ -389,10 +444,10 @@ (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r ipeHalfLine - -instance HasDefaultIpeOut (SimplePolygon (Point 2 r)) where - type DefaultIpeOut (SimplePolygon (Point 2 r)) = Path - defIO :: IpeOut + +instance HasDefaultIpeOut (SimplePolygon (Point 2 r)) where + type DefaultIpeOut (SimplePolygon (Point 2 r)) = Path + defIO :: IpeOut (SimplePolygon (Point 2 r)) (DefaultIpeOut (SimplePolygon (Point 2 r))) (NumType (SimplePolygon (Point 2 r))) @@ -405,13 +460,13 @@ Polygon_ polygon point r => IpeOut polygon Path r ipePolygon - -instance (HoleContainer h f (Point 2 r) - , HasFromFoldable1 f - ) - => HasDefaultIpeOut (PolygonalDomainF h f (Point 2 r)) where - type DefaultIpeOut (PolygonalDomainF h f (Point 2 r)) = Path - defIO :: IpeOut + +instance (HoleContainer h f (Point 2 r) + , HasFromFoldable1 f + ) + => HasDefaultIpeOut (PolygonalDomainF h f (Point 2 r)) where + type DefaultIpeOut (PolygonalDomainF h f (Point 2 r)) = Path + defIO :: IpeOut (PolygonalDomainF h f (Point 2 r)) (DefaultIpeOut (PolygonalDomainF h f (Point 2 r))) (NumType (PolygonalDomainF h f (Point 2 r))) @@ -424,10 +479,10 @@ Polygon_ polygon point r => IpeOut polygon Path r ipePolygon - -instance HasDefaultIpeOut (ConvexPolygon (Point 2 r)) where - type DefaultIpeOut (ConvexPolygon (Point 2 r)) = Path - defIO :: IpeOut + +instance HasDefaultIpeOut (ConvexPolygon (Point 2 r)) where + type DefaultIpeOut (ConvexPolygon (Point 2 r)) = Path + defIO :: IpeOut (ConvexPolygon (Point 2 r)) (DefaultIpeOut (ConvexPolygon (Point 2 r))) (NumType (ConvexPolygon (Point 2 r))) @@ -468,20 +523,20 @@ forall {k} (f :: k -> *) (point :: k). ConvexPolygonF f point -> SimplePolygonF f point toSimplePolygon - -instance HasDefaultIpeOut (Ellipse r) where - type DefaultIpeOut (Ellipse r) = Path - defIO :: IpeOut + +instance HasDefaultIpeOut (Ellipse r) where + type DefaultIpeOut (Ellipse r) = Path + defIO :: IpeOut (Ellipse r) (DefaultIpeOut (Ellipse r)) (NumType (Ellipse r)) defIO = IpeOut (Ellipse r) Path r IpeOut (Ellipse r) (DefaultIpeOut (Ellipse r)) (NumType (Ellipse r)) forall r. IpeOut (Ellipse r) Path r ipeEllipse - -instance Radical r => HasDefaultIpeOut (Disk (Point 2 r)) where - type DefaultIpeOut (Disk (Point 2 r)) = Path - defIO :: IpeOut + +instance Radical r => HasDefaultIpeOut (Disk (Point 2 r)) where + type DefaultIpeOut (Disk (Point 2 r)) = Path + defIO :: IpeOut (Disk (Point 2 r)) (DefaultIpeOut (Disk (Point 2 r))) (NumType (Disk (Point 2 r))) @@ -492,10 +547,10 @@ (NumType (Disk (Point 2 r))) forall r. Radical r => IpeOut (Disk (Point 2 r)) Path r ipeDisk - -instance Radical r => HasDefaultIpeOut (Circle (Point 2 r)) where - type DefaultIpeOut (Circle (Point 2 r)) = Path - defIO :: IpeOut + +instance Radical r => HasDefaultIpeOut (Circle (Point 2 r)) where + type DefaultIpeOut (Circle (Point 2 r)) = Path + defIO :: IpeOut (Circle (Point 2 r)) (DefaultIpeOut (Circle (Point 2 r))) (NumType (Circle (Point 2 r))) @@ -506,10 +561,10 @@ (NumType (Circle (Point 2 r))) forall r. Radical r => IpeOut (Circle (Point 2 r)) Path r ipeCircle - -instance Num r => HasDefaultIpeOut (Rectangle (Point 2 r)) where - type DefaultIpeOut (Rectangle (Point 2 r)) = Path - defIO :: IpeOut + +instance Num r => HasDefaultIpeOut (Rectangle (Point 2 r)) where + type DefaultIpeOut (Rectangle (Point 2 r)) = Path + defIO :: IpeOut (Rectangle (Point 2 r)) (DefaultIpeOut (Rectangle (Point 2 r))) (NumType (Rectangle (Point 2 r))) @@ -520,11 +575,11 @@ (NumType (Rectangle (Point 2 r))) forall r. Num r => IpeOut (Rectangle (Point 2 r)) Path r ipeRectangle - - -instance HasDefaultIpeOut (Group r) where - type DefaultIpeOut (Group r) = Group - defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) + + +instance HasDefaultIpeOut (Group r) where + type DefaultIpeOut (Group r) = Group + defIO :: IpeOut (Group r) (DefaultIpeOut (Group r)) (NumType (Group r)) defIO = (Group r -> IpeAttributes (DefaultIpeOut (Group r)) (NumType (Group r)) -> Group r @@ -534,19 +589,19 @@ IpeAttributes (DefaultIpeOut (Group r)) (NumType (Group r)) forall a. Monoid a => a mempty) - --------------------------------------------------------------------------------- --- * Point Converters - -ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r -ipeMark :: forall r. Text -> IpeOut (Point 2 r) IpeSymbol r -ipeMark Text -n Point 2 r -p = Point 2 r -> Text -> IpeSymbol r + +-------------------------------------------------------------------------------- +-- * Point Converters + +ipeMark :: Text -> IpeOut (Point 2 r) IpeSymbol r +ipeMark :: forall r. Text -> IpeOut (Point 2 r) IpeSymbol r +ipeMark Text +n Point 2 r +p = Point 2 r -> Text -> IpeSymbol r forall r. Point 2 r -> Text -> IpeSymbol r Symbol Point 2 r -p Text -n IpeSymbol r +p Text +n IpeSymbol r -> Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen, @@ -563,44 +618,44 @@ 'Size] forall a. Monoid a => a mempty - -ipeDiskMark :: IpeOut (Point 2 r) IpeSymbol r -ipeDiskMark :: forall r. IpeOut (Point 2 r) IpeSymbol r + +ipeDiskMark :: IpeOut (Point 2 r) IpeSymbol r +ipeDiskMark :: forall r. IpeOut (Point 2 r) IpeSymbol r ipeDiskMark = Text -> IpeOut (Point 2 r) IpeSymbol r forall r. Text -> IpeOut (Point 2 r) IpeSymbol r ipeMark Text "mark/disk(sx)" - --------------------------------------------------------------------------------- --- * Path Converters - --- | Size of the default bounding box used to clip lines and --- half-lines in the default IpeOuts. -defaultBox :: Num r => Rectangle (Point 2 r) -defaultBox :: forall r. Num r => Rectangle (Point 2 r) -defaultBox = let z :: r -z = r + +-------------------------------------------------------------------------------- +-- * Path Converters + +-- | Size of the default bounding box used to clip lines and +-- half-lines in the default IpeOuts. +defaultBox :: Num r => Rectangle (Point 2 r) +defaultBox :: forall r. Num r => Rectangle (Point 2 r) +defaultBox = let z :: r +z = r 1000 - z' :: r -z' = r -> r + z' :: r +z' = r -> r forall a. Num a => a -> a negate r -z - in Point 2 r -> Point 2 r -> Box (Point 2 r) +z + in Point 2 r -> Point 2 r -> Box (Point 2 r) forall point. (Dimension point ~ 2) => point -> point -> Box point Rectangle (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -z' r -z') (r -> r -> Point 2 r +z' r +z') (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -z r -z) - --- | Renders a line as a Path. The line is clipped to the 'defaultBox' -ipeLine :: (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r -ipeLine :: forall r. +z r +z) + +-- | Renders a line as a Path. The line is clipped to the 'defaultBox' +ipeLine :: (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r +ipeLine :: forall r. (Ord r, Fractional r, Show r) => IpeOut (LinePV 2 r) Path r ipeLine = Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r @@ -610,25 +665,25 @@ ipeLineIn Rectangle (Point 2 r) forall r. Num r => Rectangle (Point 2 r) defaultBox - --- | Renders the line in the given box. --- --- pre: the intersection of the box with the line is non-empty -ipeLineIn :: forall r. (Ord r, Fractional r, Show r) - => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r -ipeLineIn :: forall r. + +-- | Renders the line in the given box. +-- +-- pre: the intersection of the box with the line is non-empty +ipeLineIn :: forall r. (Ord r, Fractional r, Show r) + => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r +ipeLineIn :: forall r. (Ord r, Fractional r, Show r) => Rectangle (Point 2 r) -> IpeOut (LinePV 2 r) Path r -ipeLineIn Rectangle (Point 2 r) -bBox LinePV 2 r -l = case LinePV 2 r -l LinePV 2 r +ipeLineIn Rectangle (Point 2 r) +bBox LinePV 2 r +l = case LinePV 2 r +l LinePV 2 r -> Rectangle (Point 2 r) -> Intersection (LinePV 2 r) (Rectangle (Point 2 r)) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` Rectangle (Point 2 r) -bBox of - Maybe (LineBoxIntersection 2 r) +bBox of + Maybe (LineBoxIntersection 2 r) Intersection (LinePV 2 r) (Rectangle (Point 2 r)) Nothing -> [Char] -> Path r @@ -640,7 +695,7 @@ forall a. HasCallStack => [Char] -> a error [Char] "ipeLineIn: precondition failed, no intersection" - Just (Line_x_Box_Point Point 2 r + Just (Line_x_Box_Point Point 2 r _) -> [Char] -> Path r :+ Attributes' @@ -651,24 +706,24 @@ forall a. HasCallStack => [Char] -> a error [Char] "ipeLineIn: precondition failed, single point" - Just (Line_x_Box_LineSegment ClosedLineSegment (Point 2 r) -s) -> IpeOut (ClosedLineSegment (Point 2 r)) Path r + Just (Line_x_Box_LineSegment ClosedLineSegment (Point 2 r) +s) -> IpeOut (ClosedLineSegment (Point 2 r)) Path r forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r ipeLineSegment ClosedLineSegment (Point 2 r) -s - --- | Renders an Halfine. --- --- pre: the intersection of the box with the line is non-empty -ipeHalfLine :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r -ipeHalfLine :: forall r point. +s + +-- | Renders an Halfine. +-- +-- pre: the intersection of the box with the line is non-empty +ipeHalfLine :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r +ipeHalfLine :: forall r point. (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r -ipeHalfLine = \(HalfLine point -p Vector (Dimension point) (NumType point) -v) -> Rectangle (Point 2 r) -> IpeOut (HalfLine (Point 2 r)) Path r +ipeHalfLine = \(HalfLine point +p Vector (Dimension point) (NumType point) +v) -> Rectangle (Point 2 r) -> IpeOut (HalfLine (Point 2 r)) Path r forall r point. (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r @@ -683,7 +738,7 @@ forall point. point -> Vector (Dimension point) (NumType point) -> HalfLine point HalfLine (point -ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -692,23 +747,23 @@ Lens' point (Point 2 r) asPoint) Vector (Dimension point) (NumType point) Vector (Dimension (Point 2 r)) (NumType (Point 2 r)) -v - --- | Renders a ray, i.e. a half line drawing an arrow in the direction --- of the ray. --- --- pre: the intersection of the box with the line is non-empty -ipeRay :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r -ipeRay :: forall r point. +v + +-- | Renders a ray, i.e. a half line drawing an arrow in the direction +-- of the ray. +-- +-- pre: the intersection of the box with the line is non-empty +ipeRay :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r +ipeRay :: forall r point. (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r -ipeRay = \HalfLine point -hl -> HalfLine point -> IpeObject' Path r +ipeRay = \HalfLine point +hl -> HalfLine point -> IpeObject' Path r forall r point. (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => IpeOut (HalfLine point) Path r ipeHalfLine HalfLine point -hl IpeObject' Path r -> IpeAttributes Path r -> IpeObject' Path r +hl IpeObject' Path r -> IpeAttributes Path r -> IpeObject' Path r forall (i :: * -> *) r. IpeObject' i r -> IpeAttributes i r -> IpeObject' i r ! SAttributeUniverse 'Arrow @@ -726,25 +781,25 @@ IpeArrow r forall r. IpeArrow r normalArrow - --- | Renders the HalfLine in the given box. --- --- pre: the intersection of the box with the halfline is a line segment -ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) - => Rectangle point -> IpeOut (HalfLine point) Path r -ipeHalfLineIn :: forall r point. + +-- | Renders the HalfLine in the given box. +-- +-- pre: the intersection of the box with the halfline is a line segment +ipeHalfLineIn :: (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) + => Rectangle point -> IpeOut (HalfLine point) Path r +ipeHalfLineIn :: forall r point. (Ord r, Fractional r, Point_ point 2 r, Show r, Show point) => Rectangle point -> IpeOut (HalfLine point) Path r -ipeHalfLineIn Rectangle point -bBox HalfLine point -hl = case HalfLine point -hl HalfLine point +ipeHalfLineIn Rectangle point +bBox HalfLine point +hl = case HalfLine point +hl HalfLine point -> Rectangle point -> Intersection (HalfLine point) (Rectangle point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` Rectangle point -bBox of - Maybe (HalfLineBoxIntersection (Point 2 r)) +bBox of + Maybe (HalfLineBoxIntersection (Point 2 r)) Intersection (HalfLine point) (Rectangle point) Nothing -> [Char] -> IpeObject' Path r forall a. HasCallStack => [Char] -> a @@ -752,7 +807,7 @@ forall a b. (a -> b) -> a -> b $ [Char] "ipeHalfLineIn: precondition failed, no intersection" - [Char] -> [Char] -> [Char] + [Char] -> [Char] -> [Char] forall a. Semigroup a => a -> a -> a <> [Char] " " [Char] -> [Char] -> [Char] @@ -760,10 +815,10 @@ <> (HalfLine point, Rectangle point) -> [Char] forall a. Show a => a -> [Char] show (HalfLine point -hl,Rectangle point -bBox) - - Just (HalfLine_x_Box_Point Point 2 r +hl,Rectangle point +bBox) + + Just (HalfLine_x_Box_Point Point 2 r _) -> [Char] -> Path r :+ Attributes' @@ -774,22 +829,22 @@ forall a. HasCallStack => [Char] -> a error [Char] "ipeHalfLineIn: precondition failed, single point" - Just (HalfLine_x_Box_LineSegment ClosedLineSegment (Point 2 r) -seg) -> IpeOut (ClosedLineSegment (Point 2 r)) Path r + Just (HalfLine_x_Box_LineSegment ClosedLineSegment (Point 2 r) +seg) -> IpeOut (ClosedLineSegment (Point 2 r)) Path r forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r ipeLineSegment ClosedLineSegment (Point 2 r) -seg - --- | Renders an line segment to a Path -ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) - => IpeOut lineSegment Path r -ipeLineSegment :: forall lineSegment point r. +seg + +-- | Renders an line segment to a Path +ipeLineSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) + => IpeOut lineSegment Path r +ipeLineSegment :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r) => IpeOut lineSegment Path r -ipeLineSegment lineSegment -s = (PathSegment r -> Path r +ipeLineSegment lineSegment +s = (PathSegment r -> Path r forall r. PathSegment r -> Path r path (PathSegment r -> Path r) -> (lineSegment -> PathSegment r) -> lineSegment -> Path r @@ -801,7 +856,7 @@ pathSegment (lineSegment -> Path r) -> lineSegment -> Path r forall a b. (a -> b) -> a -> b $ lineSegment -s) Path r +s) Path r -> Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash, @@ -821,12 +876,12 @@ 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] forall a. Monoid a => a mempty - --- | Renders a polyline to a Path -ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r -ipePolyLine :: forall r. IpeOut (PolyLine (Point 2 r)) Path r -ipePolyLine PolyLine (Point 2 r) -p = (PathSegment r -> Path r + +-- | Renders a polyline to a Path +ipePolyLine :: IpeOut (PolyLine (Point 2 r)) Path r +ipePolyLine :: forall r. IpeOut (PolyLine (Point 2 r)) Path r +ipePolyLine PolyLine (Point 2 r) +p = (PathSegment r -> Path r forall r. PathSegment r -> Path r path (PathSegment r -> Path r) -> (PolyLine (Point 2 r) -> PathSegment r) @@ -838,7 +893,7 @@ PolyLineSegment (PolyLine (Point 2 r) -> Path r) -> PolyLine (Point 2 r) -> Path r forall a b. (a -> b) -> a -> b $ PolyLine (Point 2 r) -p) Path r +p) Path r -> Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash, @@ -858,17 +913,17 @@ 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] forall a. Monoid a => a mempty - --- | Renders an Ellipse to a Path -ipeEllipse :: IpeOut (Ellipse r) Path r -ipeEllipse :: forall r. IpeOut (Ellipse r) Path r -ipeEllipse = \Ellipse r -e -> PathSegment r -> Path r + +-- | Renders an Ellipse to a Path +ipeEllipse :: IpeOut (Ellipse r) Path r +ipeEllipse :: forall r. IpeOut (Ellipse r) Path r +ipeEllipse = \Ellipse r +e -> PathSegment r -> Path r forall r. PathSegment r -> Path r path (Ellipse r -> PathSegment r forall r. Ellipse r -> PathSegment r EllipseSegment Ellipse r -e) Path r +e) Path r -> Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash, @@ -888,10 +943,10 @@ 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] forall a. Monoid a => a mempty - --- | Renders a circle to a Path -ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r -ipeCircle :: forall r. Radical r => IpeOut (Circle (Point 2 r)) Path r + +-- | Renders a circle to a Path +ipeCircle :: Radical r => IpeOut (Circle (Point 2 r)) Path r +ipeCircle :: forall r. Radical r => IpeOut (Circle (Point 2 r)) Path r ipeCircle = Ellipse r -> Path r :+ Attributes @@ -922,17 +977,17 @@ (Radical r, Point_ point 2 r) => Circle point -> Ellipse r circleToEllipse - --- | Renders a Disk to a Path -ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r -ipeDisk :: forall r. Radical r => IpeOut (Disk (Point 2 r)) Path r -ipeDisk Disk (Point 2 r) -d = IpeOut (Circle (Point 2 r)) Path r + +-- | Renders a Disk to a Path +ipeDisk :: Radical r => IpeOut (Disk (Point 2 r)) Path r +ipeDisk :: forall r. Radical r => IpeOut (Disk (Point 2 r)) Path r +ipeDisk Disk (Point 2 r) +d = IpeOut (Circle (Point 2 r)) Path r forall r. Radical r => IpeOut (Circle (Point 2 r)) Path r ipeCircle (Disk (Point 2 r) -> Circle (Point 2 r) forall point. Ball point -> Sphere point MkSphere Disk (Point 2 r) -d) (Path r :+ Attributes (AttrMapSym1 r) (AttributesOf Path)) +d) (Path r :+ Attributes (AttrMapSym1 r) (AttributesOf Path)) -> Attributes (AttrMapSym1 r) (AttributesOf Path) -> Path r :+ Attributes (AttrMapSym1 r) (AttributesOf Path) forall (i :: * -> *) r. @@ -952,19 +1007,19 @@ forall r. IpeValue (RGB r) -> IpeColor r IpeColor IpeValue (RGB r) "0.722 0.145 0.137") - --- | Renders a Bezier curve to a Path -ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r -ipeBezier :: forall r. IpeOut (CubicBezier (Point 2 r)) Path r -ipeBezier CubicBezier (Point 2 r) -b = (PathSegment r -> Path r + +-- | Renders a Bezier curve to a Path +ipeBezier :: IpeOut (CubicBezier (Point 2 r)) Path r +ipeBezier :: forall r. IpeOut (CubicBezier (Point 2 r)) Path r +ipeBezier CubicBezier (Point 2 r) +b = (PathSegment r -> Path r forall r. PathSegment r -> Path r path (PathSegment r -> Path r) -> PathSegment r -> Path r forall a b. (a -> b) -> a -> b $ CubicBezier (Point 2 r) -> PathSegment r forall r. CubicBezier (Point 2 r) -> PathSegment r CubicBezierSegment CubicBezier (Point 2 r) -b) Path r +b) Path r -> Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash, @@ -984,10 +1039,10 @@ 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] forall a. Monoid a => a mempty - --- | Helper to construct a path from a singleton item -path :: PathSegment r -> Path r -path :: forall r. PathSegment r -> Path r + +-- | Helper to construct a path from a singleton item +path :: PathSegment r -> Path r +path :: forall r. PathSegment r -> Path r path = Seq (PathSegment r) -> Path r forall r. Seq (PathSegment r) -> Path r Path (Seq (PathSegment r) -> Path r) @@ -998,11 +1053,11 @@ . PathSegment r -> Seq (PathSegment r) forall a. a -> Seq a Seq.singleton - --- | Construct a PolyLine path segment -pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) - => lineSegment -> PathSegment r -pathSegment :: forall lineSegment point r. + +-- | Construct a PolyLine path segment +pathSegment :: (LineSegment_ lineSegment point, Point_ point 2 r) + => lineSegment -> PathSegment r +pathSegment :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> PathSegment r pathSegment = PolyLine (Point 2 r) -> PathSegment r @@ -1035,11 +1090,11 @@ (ConstructablePolyLine_ c (Vertex c), HasStart s (Vertex c), HasEnd s (Vertex c)) => s -> c -lineSegmentToPolyLine - where - lineSegmentToPolyLine :: s -> c -lineSegmentToPolyLine s -s = NonEmpty (Vertex c) -> c +lineSegmentToPolyLine + where + lineSegmentToPolyLine :: s -> c +lineSegmentToPolyLine s +s = NonEmpty (Vertex c) -> c forall polyLine point (f :: * -> *). (ConstructablePolyLine_ polyLine point, Foldable1 f) => f point -> polyLine @@ -1052,32 +1107,32 @@ NonEmpty.fromList ([Vertex c] -> c) -> [Vertex c] -> c forall a b. (a -> b) -> a -> b $ [s -ss -> Getting (Vertex c) s (Vertex c) -> Vertex c +ss -> Getting (Vertex c) s (Vertex c) -> Vertex c forall s a. s -> Getting a s a -> a ^.Getting (Vertex c) s (Vertex c) forall seg p. HasStart seg p => Lens' seg p Lens' s (Vertex c) start, s -ss -> Getting (Vertex c) s (Vertex c) -> Vertex c +ss -> Getting (Vertex c) s (Vertex c) -> Vertex c forall s a. s -> Getting a s a -> a ^.Getting (Vertex c) s (Vertex c) forall seg p. HasEnd seg p => Lens' seg p Lens' s (Vertex c) end] - --- | Render as a polygon -ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r -ipePolygon :: forall polygon point r. + +-- | Render as a polygon +ipePolygon :: Polygon_ polygon point r => IpeOut polygon Path r +ipePolygon :: forall polygon point r. Polygon_ polygon point r => IpeOut polygon Path r -ipePolygon polygon -pg = Seq (PathSegment r) -> Path r +ipePolygon polygon +pg = Seq (PathSegment r) -> Path r forall r. Seq (PathSegment r) -> Path r Path (PathSegment r -outer PathSegment r -> Seq (PathSegment r) -> Seq (PathSegment r) +outer PathSegment r -> Seq (PathSegment r) -> Seq (PathSegment r) forall s a. Cons s s a a => a -> s -> s <| Seq (PathSegment r) -inners) Path r +inners) Path r -> Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash, @@ -1097,17 +1152,17 @@ 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] forall a. Monoid a => a mempty - where - outer :: PathSegment r -outer = polygon -> PathSegment r + where + outer :: PathSegment r +outer = polygon -> PathSegment r forall polygon point r. (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r toPolygonPathSegment polygon -pg - inners :: Seq (PathSegment r) -inners = SimplePolygonF (HoleF polygon) point -> PathSegment r +pg + inners :: Seq (PathSegment r) +inners = SimplePolygonF (HoleF polygon) point -> PathSegment r forall polygon point r. (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => @@ -1122,7 +1177,7 @@ (SimplePolygonF (HoleF polygon) point) -> polygon -> Seq (SimplePolygonF (HoleF polygon) point) forall {a} {s}. Getting (Seq a) s a -> s -> Seq a -toSequenceOf Getting +toSequenceOf Getting (Seq (SimplePolygonF (HoleF polygon) point)) polygon (SimplePolygonF (HoleF polygon) point) @@ -1136,20 +1191,20 @@ IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) holes polygon -pg - toSequenceOf :: Getting (Seq a) s a -> s -> Seq a -toSequenceOf Getting (Seq a) s a -l = Getting (Seq a) s a -> (a -> Seq a) -> s -> Seq a +pg + toSequenceOf :: Getting (Seq a) s a -> s -> Seq a +toSequenceOf Getting (Seq a) s a +l = Getting (Seq a) s a -> (a -> Seq a) -> s -> Seq a forall r s a. Getting r s a -> (a -> r) -> s -> r foldMapOf Getting (Seq a) s a -l a -> Seq a +l a -> Seq a forall a. a -> Seq a Seq.singleton - --- | Helper type to build a path segment -toPolygonPathSegment :: ( HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) - => polygon -> PathSegment r -toPolygonPathSegment :: forall polygon point r. + +-- | Helper type to build a path segment +toPolygonPathSegment :: ( HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) + => polygon -> PathSegment r +toPolygonPathSegment :: forall polygon point r. (HasOuterBoundary polygon, Point_ point 2 r, Vertex polygon ~ point) => polygon -> PathSegment r @@ -1168,7 +1223,7 @@ Foldable f => f (Point 2 r) -> SimplePolygon (Point 2 r) uncheckedFromCCWPoints - (NonEmpty (Point 2 r) -> SimplePolygon (Point 2 r)) + (NonEmpty (Point 2 r) -> SimplePolygon (Point 2 r)) -> (polygon -> NonEmpty (Point 2 r)) -> polygon -> SimplePolygon (Point 2 r) @@ -1198,15 +1253,15 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) - -- this feels a bit silly, I feel we should directly be able to construct - -- the polygon just using the outerBoundaryFold, but whatever. - --- | Draw a polygon -ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r -ipeSimplePolygon :: forall r. IpeOut (SimplePolygon (Point 2 r)) Path r -ipeSimplePolygon SimplePolygon (Point 2 r) -pg = SimplePolygon (Point 2 r) -pgSimplePolygon (Point 2 r) + -- this feels a bit silly, I feel we should directly be able to construct + -- the polygon just using the outerBoundaryFold, but whatever. + +-- | Draw a polygon +ipeSimplePolygon :: IpeOut (SimplePolygon (Point 2 r)) Path r +ipeSimplePolygon :: forall r. IpeOut (SimplePolygon (Point 2 r)) Path r +ipeSimplePolygon SimplePolygon (Point 2 r) +pg = SimplePolygon (Point 2 r) +pgSimplePolygon (Point 2 r) -> Getting (Path r) (SimplePolygon (Point 2 r)) (Path r) -> Path r forall s a. s -> Getting a s a -> a ^.AReview (Path r) (SimplePolygon (Point 2 r)) @@ -1237,13 +1292,13 @@ 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] forall a. Monoid a => a mempty - - --- | Draw a Rectangle -ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r -ipeRectangle :: forall r. Num r => IpeOut (Rectangle (Point 2 r)) Path r -ipeRectangle Rectangle (Point 2 r) -r = IpeOut (SimplePolygon (Point 2 r)) Path r + + +-- | Draw a Rectangle +ipeRectangle :: Num r => IpeOut (Rectangle (Point 2 r)) Path r +ipeRectangle :: forall r. Num r => IpeOut (Rectangle (Point 2 r)) Path r +ipeRectangle Rectangle (Point 2 r) +r = IpeOut (SimplePolygon (Point 2 r)) Path r forall r. IpeOut (SimplePolygon (Point 2 r)) Path r ipeSimplePolygon IpeOut (SimplePolygon (Point 2 r)) Path r -> IpeOut (SimplePolygon (Point 2 r)) Path r @@ -1256,37 +1311,37 @@ Foldable f => f (Point 2 r) -> SimplePolygon (Point 2 r) uncheckedFromCCWPoints [Point 2 r -tl,Point 2 r -tr,Point 2 r -br,Point 2 r -bl] - where - Corners Point 2 r -tl Point 2 r -tr Point 2 r -br Point 2 r -bl = Rectangle (Point 2 r) -> Corners (Point 2 r) +tl,Point 2 r +tr,Point 2 r +br,Point 2 r +bl] + where + Corners Point 2 r +tl Point 2 r +tr Point 2 r +br Point 2 r +bl = Rectangle (Point 2 r) -> Corners (Point 2 r) forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Corners point corners Rectangle (Point 2 r) -r - --------------------------------------------------------------------------------- --- * Group Converters - -ipeGroup :: Foldable f => IpeOut (f (IpeObject r)) Group r -ipeGroup :: forall (f :: * -> *) r. +r + +-------------------------------------------------------------------------------- +-- * Group Converters + +ipeGroup :: Foldable f => IpeOut (f (IpeObject r)) Group r +ipeGroup :: forall (f :: * -> *) r. Foldable f => IpeOut (f (IpeObject r)) Group r -ipeGroup f (IpeObject r) -xs = [IpeObject r] -> Group r +ipeGroup f (IpeObject r) +xs = [IpeObject r] -> Group r forall r. [IpeObject r] -> Group r Group (f (IpeObject r) -> [IpeObject r] forall a. f a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] toList f (IpeObject r) -xs) Group r +xs) Group r -> Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip] -> Group r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip] @@ -1294,35 +1349,35 @@ :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip] forall a. Monoid a => a mempty - - --------------------------------------------------------------------------------- --- * Text Converters - --- | Creates an text label -ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r -ipeLabel :: forall r. IpeOut (Text :+ Point 2 r) TextLabel r -ipeLabel (Text -txt :+ Point 2 r -p) = Text -> Point 2 r -> TextLabel r + + +-------------------------------------------------------------------------------- +-- * Text Converters + +-- | Creates an text label +ipeLabel :: IpeOut (Text :+ Point 2 r) TextLabel r +ipeLabel :: forall r. IpeOut (Text :+ Point 2 r) TextLabel r +ipeLabel (Text +txt :+ Point 2 r +p) = Text -> Point 2 r -> TextLabel r forall r. Text -> Point 2 r -> TextLabel r Label Text -txt Point 2 r -p TextLabel r +txt Point 2 r +p TextLabel r -> Attributes' r CommonAttributes -> TextLabel r :+ Attributes' r CommonAttributes forall core extra. core -> extra -> core :+ extra :+ Attributes' r CommonAttributes forall a. Monoid a => a mempty - - --- | Annotate an IpeOut with a label -labelled :: (Show lbl, NumType g ~ r, ToObject i) - => (g -> Point 2 r) -- ^ where to place the label - -> IpeOut g i r -- ^ how to draw the geometric object - -> IpeOut (g :+ lbl) Group r -labelled :: forall lbl g r (i :: * -> *). + + +-- | Annotate an IpeOut with a label +labelled :: (Show lbl, NumType g ~ r, ToObject i) + => (g -> Point 2 r) -- ^ where to place the label + -> IpeOut g i r -- ^ how to draw the geometric object + -> IpeOut (g :+ lbl) Group r +labelled :: forall lbl g r (i :: * -> *). (Show lbl, NumType g ~ r, ToObject i) => (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r labelled = IpeAttributes TextLabel r @@ -1338,23 +1393,23 @@ IpeAttributes TextLabel r forall a. Monoid a => a mempty - --- | Annotate an IpeOut with a label -labelledWith :: (Show lbl, NumType g ~ r, ToObject i) - => IpeAttributes TextLabel r -- ^ attributes for the label - -> (g -> Point 2 r) -- ^ where to place the label - -> IpeOut g i r -- ^ how to draw the geometric object - -> IpeOut (g :+ lbl) Group r -labelledWith :: forall lbl g r (i :: * -> *). + +-- | Annotate an IpeOut with a label +labelledWith :: (Show lbl, NumType g ~ r, ToObject i) + => IpeAttributes TextLabel r -- ^ attributes for the label + -> (g -> Point 2 r) -- ^ where to place the label + -> IpeOut g i r -- ^ how to draw the geometric object + -> IpeOut (g :+ lbl) Group r +labelledWith :: forall lbl g r (i :: * -> *). (Show lbl, NumType g ~ r, ToObject i) => IpeAttributes TextLabel r -> (g -> Point 2 r) -> IpeOut g i r -> IpeOut (g :+ lbl) Group r -labelledWith IpeAttributes TextLabel r -ats g -> Point 2 r -pos IpeOut g i r -f (g -g :+ lbl -lbl) = IpeOut [IpeObject r] Group r +labelledWith IpeAttributes TextLabel r +ats g -> Point 2 r +pos IpeOut g i r +f (g +g :+ lbl +lbl) = IpeOut [IpeObject r] Group r forall (f :: * -> *) r. Foldable f => IpeOut (f (IpeObject r)) Group r @@ -1363,9 +1418,9 @@ iO (IpeObject' i r -> IpeObject r) -> IpeObject' i r -> IpeObject r forall a b. (a -> b) -> a -> b $ IpeOut g i r -f g -g - , IpeObject' TextLabel r -> IpeObject r +f g +g + , IpeObject' TextLabel r -> IpeObject r forall (i :: * -> *) r. ToObject i => IpeObject' i r -> IpeObject r iO (IpeObject' TextLabel r -> IpeObject r) -> IpeObject' TextLabel r -> IpeObject r @@ -1376,15 +1431,15 @@ Text.pack (lbl -> [Char] forall a. Show a => a -> [Char] show lbl -lbl) Text -> Point 2 r -> Text :+ Point 2 r +lbl) Text -> Point 2 r -> Text :+ Point 2 r forall core extra. core -> extra -> core :+ extra :+ g -> Point 2 r -pos g -g) IpeObject' TextLabel r +pos g +g) IpeObject' TextLabel r -> IpeAttributes TextLabel r -> IpeObject' TextLabel r forall (i :: * -> *) r. IpeObject' i r -> IpeAttributes i r -> IpeObject' i r ! IpeAttributes TextLabel r -ats - ] -
\ No newline at end of file +ats + ] + \ No newline at end of file diff --git a/haddocks/hgeometry/ipe/src/Ipe.IpeRender.html b/haddocks/hgeometry/ipe/src/Ipe.IpeRender.html index 9fe522661..b0ef13e10 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.IpeRender.html +++ b/haddocks/hgeometry/ipe/src/Ipe.IpeRender.html @@ -1,4 +1,4 @@ -
--------------------------------------------------------------------------------
+
--------------------------------------------------------------------------------
 -- |
 -- Module      :  Ipe.IpeRender
 -- Copyright   :  (C) Frank Staals
@@ -27,20 +27,20 @@
                                        -> OsPath -- ^ output file path
                                        -> IO ()
 ipeRenderWith :: Options -> FileType -> OsPath -> OsPath -> IO ()
-ipeRenderWith Options
-options FileType
-fType OsPath
-inFp OsPath
-outFp =
+ipeRenderWith Options
+options FileType
+fType OsPath
+inFp OsPath
+outFp =
     do
-      String
-inFp'  <- OsPath -> IO String
+      String
+inFp'  <- OsPath -> IO String
 decodeFS OsPath
-inFp
-      String
-outFp' <- OsPath -> IO String
+inFp
+      String
+outFp' <- OsPath -> IO String
 decodeFS OsPath
-outFp
+outFp
       ProcessConfig () () () -> (Process () () () -> IO ()) -> IO ()
 forall (m :: * -> *) stdin stdout stderr a.
 MonadUnliftIO m =>
@@ -52,47 +52,47 @@
 -> [String] -> ProcessConfig () () ()
 forall a b. (a -> b) -> a -> b
 $ String -> String -> [String]
-args String
-inFp' String
-outFp') ((Process () () () -> IO ()) -> IO ())
+args String
+inFp' String
+outFp') ((Process () () () -> IO ()) -> IO ())
 -> (Process () () () -> IO ()) -> IO ()
 forall a b. (a -> b) -> a -> b
-$ \Process () () ()
-_iperenderProc ->
+$ \Process () () ()
+_iperenderProc ->
         () -> IO ()
 forall a. a -> IO a
 forall (f :: * -> *) a. Applicative f => a -> f a
 pure ()
   where
-    args :: String -> String -> [String]
-args String
-inFp' String
-outFp' =
+    args :: String -> String -> [String]
+args String
+inFp' String
+outFp' =
            [ String
 "-" String -> String -> String
 forall a. Semigroup a => a -> a -> a
 <> FileType -> String
 forall a. Show a => a -> String
 show FileType
-fType
+fType
            , String
 "-page", Int -> String
 forall a. Show a => a -> String
 show (Options -> Int
 pageNumber Options
-options)
+options)
            , String
 "-view", Int -> String
 forall a. Show a => a -> String
 show (Options -> Int
 viewNumber Options
-options)
+options)
            , String
 "-resolution", Int -> String
 forall a. Show a => a -> String
 show (Options -> Int
 resolution Options
-options)
+options)
            ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
@@ -102,7 +102,7 @@
 forall a. Eq a => a -> a -> Bool
 == Options -> Background
 transparent Options
-options ] [String] -> [String] -> [String]
+options ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [ String
@@ -111,13 +111,13 @@
 forall a. Eq a => a -> a -> Bool
 == Options -> Crop
 crop Options
-options ] [String] -> [String] -> [String]
+options ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [ String
-inFp'
+inFp'
            , String
-outFp'
+outFp'
            ]
 
 -- | Call 'iperender' with the default options.
@@ -133,7 +133,7 @@
 
 -- | Output filetypes supported by iperender
 data FileType = PNG | EPS | PDF | SVG
-  deriving (FileType -> FileType -> Bool
+  deriving (FileType -> FileType -> Bool
 (FileType -> FileType -> Bool)
 -> (FileType -> FileType -> Bool) -> Eq FileType
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -141,7 +141,7 @@
 == :: FileType -> FileType -> Bool
 $c/= :: FileType -> FileType -> Bool
 /= :: FileType -> FileType -> Bool
-Eq,Eq FileType
+Eq,Eq FileType
 Eq FileType =>
 (FileType -> FileType -> Ordering)
 -> (FileType -> FileType -> Bool)
@@ -178,7 +178,7 @@
 max :: FileType -> FileType -> FileType
 $cmin :: FileType -> FileType -> FileType
 min :: FileType -> FileType -> FileType
-Ord,Int -> FileType
+Ord,Int -> FileType
 FileType -> Int
 FileType -> [FileType]
 FileType -> FileType
@@ -221,8 +221,8 @@
 enumFromThenTo :: FileType -> FileType -> FileType -> [FileType]
 Enum)
 
-instance Show FileType where
-  show :: FileType -> String
+instance Show FileType where
+  show :: FileType -> String
 show = \case
     FileType
 PNG -> String
@@ -248,7 +248,7 @@
 transparent :: Background
                        , Options -> Crop
 crop        :: Crop
-                       } deriving (Int -> Options -> String -> String
+                       } deriving (Int -> Options -> String -> String
 [Options] -> String -> String
 Options -> String
 (Int -> Options -> String -> String)
@@ -264,7 +264,7 @@
 show :: Options -> String
 $cshowList :: [Options] -> String -> String
 showList :: [Options] -> String -> String
-Show,Options -> Options -> Bool
+Show,Options -> Options -> Bool
 (Options -> Options -> Bool)
 -> (Options -> Options -> Bool) -> Eq Options
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -272,7 +272,7 @@
 == :: Options -> Options -> Bool
 $c/= :: Options -> Options -> Bool
 /= :: Options -> Options -> Bool
-Eq,Eq Options
+Eq,Eq Options
 Eq Options =>
 (Options -> Options -> Ordering)
 -> (Options -> Options -> Bool)
@@ -325,7 +325,7 @@
 -- | Whether or not to render a transparent background in output png
 -- images.
 data Background = OpaqueBackground | TransparentBackground
-  deriving (Int -> Background -> String -> String
+  deriving (Int -> Background -> String -> String
 [Background] -> String -> String
 Background -> String
 (Int -> Background -> String -> String)
@@ -341,7 +341,7 @@
 show :: Background -> String
 $cshowList :: [Background] -> String -> String
 showList :: [Background] -> String -> String
-Show,ReadPrec [Background]
+Show,ReadPrec [Background]
 ReadPrec Background
 Int -> ReadS Background
 ReadS [Background]
@@ -361,7 +361,7 @@
 readPrec :: ReadPrec Background
 $creadListPrec :: ReadPrec [Background]
 readListPrec :: ReadPrec [Background]
-Read,Background -> Background -> Bool
+Read,Background -> Background -> Bool
 (Background -> Background -> Bool)
 -> (Background -> Background -> Bool) -> Eq Background
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -369,7 +369,7 @@
 == :: Background -> Background -> Bool
 $c/= :: Background -> Background -> Bool
 /= :: Background -> Background -> Bool
-Eq,Eq Background
+Eq,Eq Background
 Eq Background =>
 (Background -> Background -> Ordering)
 -> (Background -> Background -> Bool)
@@ -406,7 +406,7 @@
 max :: Background -> Background -> Background
 $cmin :: Background -> Background -> Background
 min :: Background -> Background -> Background
-Ord,Int -> Background
+Ord,Int -> Background
 Background -> Int
 Background -> [Background]
 Background -> Background
@@ -451,7 +451,7 @@
 
 -- | Whether or not to crop the output image.
 data Crop = NoCrop | Crop
-  deriving (Int -> Crop -> String -> String
+  deriving (Int -> Crop -> String -> String
 [Crop] -> String -> String
 Crop -> String
 (Int -> Crop -> String -> String)
@@ -465,7 +465,7 @@
 show :: Crop -> String
 $cshowList :: [Crop] -> String -> String
 showList :: [Crop] -> String -> String
-Show,ReadPrec [Crop]
+Show,ReadPrec [Crop]
 ReadPrec Crop
 Int -> ReadS Crop
 ReadS [Crop]
@@ -482,14 +482,14 @@
 readPrec :: ReadPrec Crop
 $creadListPrec :: ReadPrec [Crop]
 readListPrec :: ReadPrec [Crop]
-Read,Crop -> Crop -> Bool
+Read,Crop -> Crop -> Bool
 (Crop -> Crop -> Bool) -> (Crop -> Crop -> Bool) -> Eq Crop
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
 $c== :: Crop -> Crop -> Bool
 == :: Crop -> Crop -> Bool
 $c/= :: Crop -> Crop -> Bool
 /= :: Crop -> Crop -> Bool
-Eq,Eq Crop
+Eq,Eq Crop
 Eq Crop =>
 (Crop -> Crop -> Ordering)
 -> (Crop -> Crop -> Bool)
@@ -526,7 +526,7 @@
 max :: Crop -> Crop -> Crop
 $cmin :: Crop -> Crop -> Crop
 min :: Crop -> Crop -> Crop
-Ord,Int -> Crop
+Ord,Int -> Crop
 Crop -> Int
 Crop -> [Crop]
 Crop -> Crop
diff --git a/haddocks/hgeometry/ipe/src/Ipe.IpeToIpe.html b/haddocks/hgeometry/ipe/src/Ipe.IpeToIpe.html
index 8e2172053..c7ae74d92 100644
--- a/haddocks/hgeometry/ipe/src/Ipe.IpeToIpe.html
+++ b/haddocks/hgeometry/ipe/src/Ipe.IpeToIpe.html
@@ -1,4 +1,4 @@
-
{-# LANGUAGE QuasiQuotes #-}
+
{-# LANGUAGE QuasiQuotes #-}
 --------------------------------------------------------------------------------
 -- |
 -- Module      :  Ipe.IpeToIpe
@@ -31,20 +31,20 @@
                                       -> OsPath -- ^ output file path
                                       -> IO ()
 ipeToIpeWith :: Options -> FileType -> OsPath -> OsPath -> IO ()
-ipeToIpeWith Options
-options FileType
-fType OsPath
-inFp OsPath
-outFp =
+ipeToIpeWith Options
+options FileType
+fType OsPath
+inFp OsPath
+outFp =
     do
-      String
-inFp'  <- OsPath -> IO String
+      String
+inFp'  <- OsPath -> IO String
 decodeFS OsPath
-inFp
-      String
-outFp' <- OsPath -> IO String
+inFp
+      String
+outFp' <- OsPath -> IO String
 decodeFS OsPath
-outFp
+outFp
       ProcessConfig () () () -> (Process () () () -> IO ()) -> IO ()
 forall (m :: * -> *) stdin stdout stderr a.
 MonadUnliftIO m =>
@@ -56,29 +56,29 @@
 -> [String] -> ProcessConfig () () ()
 forall a b. (a -> b) -> a -> b
 $ String -> String -> [String]
-args String
-inFp' String
-outFp') ((Process () () () -> IO ()) -> IO ())
+args String
+inFp' String
+outFp') ((Process () () () -> IO ()) -> IO ())
 -> (Process () () () -> IO ()) -> IO ()
 forall a b. (a -> b) -> a -> b
-$ \Process () () ()
-_iperenderProc ->
+$ \Process () () ()
+_iperenderProc ->
         () -> IO ()
 forall a. a -> IO a
 forall (f :: * -> *) a. Applicative f => a -> f a
 pure ()
   where
-    args :: String -> String -> [String]
-args String
-inFp' String
-outFp' =
+    args :: String -> String -> [String]
+args String
+inFp' String
+outFp' =
            [ String
 "-" String -> String -> String
 forall a. Semigroup a => a -> a -> a
 <> FileType -> String
 forall a. Show a => a -> String
 show FileType
-fType ] [String] -> [String] -> [String]
+fType ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [[String]] -> [String]
@@ -86,11 +86,11 @@
 concat [ [ String
 "-pages", ClosedInterval Int -> String
 forall {a}. Show a => ClosedInterval a -> String
-pageRange ClosedInterval Int
-r ] | PageRange ClosedInterval Int
-r <- [Options -> PageRange
+pageRange ClosedInterval Int
+r ] | PageRange ClosedInterval Int
+r <- [Options -> PageRange
 pages Options
-options] ] [String] -> [String] -> [String]
+options] ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [[String]] -> [String]
@@ -98,13 +98,13 @@
 concat [ [ String
 "-view", Int -> Int -> String
 forall {a} {a}. (Show a, Show a) => a -> a -> String
-pageView Int
-p Int
-v ] | Just (Int
-p,Int
-v) <- [Options -> Maybe (Int, Int)
+pageView Int
+p Int
+v ] | Just (Int
+p,Int
+v) <- [Options -> Maybe (Int, Int)
 singleView Options
-options] ] [String] -> [String] -> [String]
+options] ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [ String
@@ -113,13 +113,13 @@
 forall a. Eq a => a -> a -> Bool
 == Options -> Export
 export Options
-options ] [String] -> [String] -> [String]
+options ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [ String
 "-runlatex" | Options -> Bool
 runLatex Options
-options] [String] -> [String] -> [String]
+options] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [ String
@@ -128,21 +128,21 @@
 forall a. Eq a => a -> a -> Bool
 == Options -> NoZip
 nozip Options
-options ] [String] -> [String] -> [String]
+options ] [String] -> [String] -> [String]
 forall a. Semigroup a => a -> a -> a
 <>
            [ String
-inFp'
+inFp'
            , String
-outFp'
+outFp'
            ]
-    pageRange :: ClosedInterval a -> String
-pageRange (ClosedInterval a
-l a
-u) = a -> String
+    pageRange :: ClosedInterval a -> String
+pageRange (ClosedInterval a
+l a
+u) = a -> String
 forall a. Show a => a -> String
 show a
-l String -> String -> String
+l String -> String -> String
 forall a. Semigroup a => a -> a -> a
 <> String
 "-" String -> String -> String
@@ -150,14 +150,14 @@
 <> a -> String
 forall a. Show a => a -> String
 show a
-u
-    pageView :: a -> a -> String
-pageView a
-p a
-v = a -> String
+u
+    pageView :: a -> a -> String
+pageView a
+p a
+v = a -> String
 forall a. Show a => a -> String
 show a
-p String -> String -> String
+p String -> String -> String
 forall a. Semigroup a => a -> a -> a
 <> String
 "-" String -> String -> String
@@ -165,7 +165,7 @@
 <> a -> String
 forall a. Show a => a -> String
 show a
-v
+v
 
 
 -- | Call 'ipetoipe' with the default options.
@@ -182,50 +182,50 @@
 -- on the path.
 --
 -- Note this will write soem intermediate file to your system temp dir.
-writeIpeFileAsPdf      :: IpeWriteText r => OsPath -> IpeFile r -> IO ()
+writeIpeFileAsPdf      :: IpeWriteText r => OsPath -> IpeFile r -> IO ()
 writeIpeFileAsPdf :: forall r. IpeWriteText r => OsPath -> IpeFile r -> IO ()
-writeIpeFileAsPdf OsPath
-fp IpeFile r
-f = do Int
-num    <- forall a (m :: * -> *). (Random a, MonadIO m) => m a
+writeIpeFileAsPdf OsPath
+fp IpeFile r
+f = do Int
+num    <- forall a (m :: * -> *). (Random a, MonadIO m) => m a
 randomIO @Int
-                            OsPath
-tempDir <- IO OsPath
+                            OsPath
+tempDir <- IO OsPath
 getTemporaryDirectory
-                            OsPath
-num' <- String -> IO OsPath
+                            OsPath
+num' <- String -> IO OsPath
 forall (m :: * -> *). MonadThrow m => String -> m OsPath
 encodeUtf (String -> IO OsPath) -> String -> IO OsPath
 forall a b. (a -> b) -> a -> b
 $ Int -> String
 forall a. Show a => a -> String
 show Int
-num
-                            let xmlFp :: OsPath
-xmlFp = OsPath
-tempDir OsPath -> OsPath -> OsPath
+num
+                            let xmlFp :: OsPath
+xmlFp = OsPath
+tempDir OsPath -> OsPath -> OsPath
 </> [osp|writeipepdf|] OsPath -> OsPath -> OsPath
 forall a. Semigroup a => a -> a -> a
 <> OsPath
-num' OsPath -> OsPath -> OsPath
+num' OsPath -> OsPath -> OsPath
 <.> [osp|ipe|]
                             OsPath -> IpeFile r -> IO ()
 forall r. IpeWriteText r => OsPath -> IpeFile r -> IO ()
 writeIpeFile OsPath
-xmlFp IpeFile r
-f
+xmlFp IpeFile r
+f
                             FileType -> OsPath -> OsPath -> IO ()
 ipeToIpe FileType
 PDF OsPath
-xmlFp OsPath
-fp
+xmlFp OsPath
+fp
                             OsPath -> IO ()
 removeFile OsPath
-xmlFp
+xmlFp
 
 
 data FileType = PDF | XML
-  deriving (FileType -> FileType -> Bool
+  deriving (FileType -> FileType -> Bool
 (FileType -> FileType -> Bool)
 -> (FileType -> FileType -> Bool) -> Eq FileType
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -233,7 +233,7 @@
 == :: FileType -> FileType -> Bool
 $c/= :: FileType -> FileType -> Bool
 /= :: FileType -> FileType -> Bool
-Eq,Int -> FileType
+Eq,Int -> FileType
 FileType -> Int
 FileType -> [FileType]
 FileType -> FileType
@@ -276,8 +276,8 @@
 enumFromThenTo :: FileType -> FileType -> FileType -> [FileType]
 Enum)
 
-instance Show FileType where
-  show :: FileType -> String
+instance Show FileType where
+  show :: FileType -> String
 show = \case
     FileType
 PDF -> String
@@ -287,7 +287,7 @@
 "xml"
 
 data Export = RetainIpeInfo | Export
-  deriving (Int -> Export -> String -> String
+  deriving (Int -> Export -> String -> String
 [Export] -> String -> String
 Export -> String
 (Int -> Export -> String -> String)
@@ -303,7 +303,7 @@
 show :: Export -> String
 $cshowList :: [Export] -> String -> String
 showList :: [Export] -> String -> String
-Show,Export -> Export -> Bool
+Show,Export -> Export -> Bool
 (Export -> Export -> Bool)
 -> (Export -> Export -> Bool) -> Eq Export
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -311,7 +311,7 @@
 == :: Export -> Export -> Bool
 $c/= :: Export -> Export -> Bool
 /= :: Export -> Export -> Bool
-Eq,Int -> Export
+Eq,Int -> Export
 Export -> Int
 Export -> [Export]
 Export -> Export
@@ -358,7 +358,7 @@
 type ViewNumber = Int
 
 data MarkedView = All | OnlyMarkedViews
-  deriving (Int -> MarkedView -> String -> String
+  deriving (Int -> MarkedView -> String -> String
 [MarkedView] -> String -> String
 MarkedView -> String
 (Int -> MarkedView -> String -> String)
@@ -374,7 +374,7 @@
 show :: MarkedView -> String
 $cshowList :: [MarkedView] -> String -> String
 showList :: [MarkedView] -> String -> String
-Show,MarkedView -> MarkedView -> Bool
+Show,MarkedView -> MarkedView -> Bool
 (MarkedView -> MarkedView -> Bool)
 -> (MarkedView -> MarkedView -> Bool) -> Eq MarkedView
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -382,7 +382,7 @@
 == :: MarkedView -> MarkedView -> Bool
 $c/= :: MarkedView -> MarkedView -> Bool
 /= :: MarkedView -> MarkedView -> Bool
-Eq,Int -> MarkedView
+Eq,Int -> MarkedView
 MarkedView -> Int
 MarkedView -> [MarkedView]
 MarkedView -> MarkedView
@@ -426,7 +426,7 @@
 Enum)
 
 data NoZip = NoZip | Zip
-  deriving (Int -> NoZip -> String -> String
+  deriving (Int -> NoZip -> String -> String
 [NoZip] -> String -> String
 NoZip -> String
 (Int -> NoZip -> String -> String)
@@ -440,14 +440,14 @@
 show :: NoZip -> String
 $cshowList :: [NoZip] -> String -> String
 showList :: [NoZip] -> String -> String
-Show,NoZip -> NoZip -> Bool
+Show,NoZip -> NoZip -> Bool
 (NoZip -> NoZip -> Bool) -> (NoZip -> NoZip -> Bool) -> Eq NoZip
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
 $c== :: NoZip -> NoZip -> Bool
 == :: NoZip -> NoZip -> Bool
 $c/= :: NoZip -> NoZip -> Bool
 /= :: NoZip -> NoZip -> Bool
-Eq,Int -> NoZip
+Eq,Int -> NoZip
 NoZip -> Int
 NoZip -> [NoZip]
 NoZip -> NoZip
@@ -492,7 +492,7 @@
 
 data PageRange = EntireFile
                | PageRange (ClosedInterval PageNumber)
-               deriving (Int -> PageRange -> String -> String
+               deriving (Int -> PageRange -> String -> String
 [PageRange] -> String -> String
 PageRange -> String
 (Int -> PageRange -> String -> String)
@@ -508,7 +508,7 @@
 show :: PageRange -> String
 $cshowList :: [PageRange] -> String -> String
 showList :: [PageRange] -> String -> String
-Show,PageRange -> PageRange -> Bool
+Show,PageRange -> PageRange -> Bool
 (PageRange -> PageRange -> Bool)
 -> (PageRange -> PageRange -> Bool) -> Eq PageRange
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -530,7 +530,7 @@
 runLatex   :: Bool
                        , Options -> NoZip
 nozip      :: NoZip
-                       } deriving (Int -> Options -> String -> String
+                       } deriving (Int -> Options -> String -> String
 [Options] -> String -> String
 Options -> String
 (Int -> Options -> String -> String)
@@ -546,7 +546,7 @@
 show :: Options -> String
 $cshowList :: [Options] -> String -> String
 showList :: [Options] -> String -> String
-Show,Options -> Options -> Bool
+Show,Options -> Options -> Bool
 (Options -> Options -> Bool)
 -> (Options -> Options -> Bool) -> Eq Options
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
diff --git a/haddocks/hgeometry/ipe/src/Ipe.Layer.html b/haddocks/hgeometry/ipe/src/Ipe.Layer.html
index 59378bec3..45523bb57 100644
--- a/haddocks/hgeometry/ipe/src/Ipe.Layer.html
+++ b/haddocks/hgeometry/ipe/src/Ipe.Layer.html
@@ -20,7 +20,7 @@
 
 -- | Defines an Layer in Ipe.
 newtype LayerName = LayerName {LayerName -> Text
-_layerName :: Text } deriving (Int -> LayerName -> ShowS
+_layerName :: Text } deriving (Int -> LayerName -> ShowS
 [LayerName] -> ShowS
 LayerName -> String
 (Int -> LayerName -> ShowS)
@@ -35,7 +35,7 @@
 show :: LayerName -> String
 $cshowList :: [LayerName] -> ShowS
 showList :: [LayerName] -> ShowS
-Show,ReadPrec [LayerName]
+Show,ReadPrec [LayerName]
 ReadPrec LayerName
 Int -> ReadS LayerName
 ReadS [LayerName]
@@ -55,7 +55,7 @@
 readPrec :: ReadPrec LayerName
 $creadListPrec :: ReadPrec [LayerName]
 readListPrec :: ReadPrec [LayerName]
-Read,LayerName -> LayerName -> Bool
+Read,LayerName -> LayerName -> Bool
 (LayerName -> LayerName -> Bool)
 -> (LayerName -> LayerName -> Bool) -> Eq LayerName
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -63,7 +63,7 @@
 == :: LayerName -> LayerName -> Bool
 $c/= :: LayerName -> LayerName -> Bool
 /= :: LayerName -> LayerName -> Bool
-Eq,Eq LayerName
+Eq,Eq LayerName
 Eq LayerName =>
 (LayerName -> LayerName -> Ordering)
 -> (LayerName -> LayerName -> Bool)
@@ -100,7 +100,7 @@
 max :: LayerName -> LayerName -> LayerName
 $cmin :: LayerName -> LayerName -> LayerName
 min :: LayerName -> LayerName -> LayerName
-Ord,String -> LayerName
+Ord,String -> LayerName
 (String -> LayerName) -> IsString LayerName
 forall a. (String -> a) -> IsString a
 $cfromString :: String -> LayerName
diff --git a/haddocks/hgeometry/ipe/src/Ipe.Matrix.html b/haddocks/hgeometry/ipe/src/Ipe.Matrix.html
index 7917a4be6..7c8846b02 100644
--- a/haddocks/hgeometry/ipe/src/Ipe.Matrix.html
+++ b/haddocks/hgeometry/ipe/src/Ipe.Matrix.html
@@ -23,25 +23,25 @@
 --------------------------------------------------------------------------------
 
 -- | Takes and applies the ipe Matrix attribute of this item.
-applyMatrix'              :: ( IsTransformable (i r)
-                             , AT.Matrix  AttributesOf i
-                             , Dimension (i r) ~ 2, r ~ NumType (i r))
-                          => IpeObject' i r -> IpeObject' i r
+applyMatrix'              :: ( IsTransformable (i r)
+                             , AT.Matrix  AttributesOf i
+                             , Dimension (i r) ~ 2, r ~ NumType (i r))
+                          => IpeObject' i r -> IpeObject' i r
 applyMatrix' :: forall (i :: * -> *) r.
 (IsTransformable (i r), 'Matrix ∈ AttributesOf i,
  Dimension (i r) ~ 2, r ~ NumType (i r)) =>
 IpeObject' i r -> IpeObject' i r
-applyMatrix' o :: IpeObject' i r
-o@(i r
-i :+ IpeAttributes i r
-ats) = IpeObject' i r
+applyMatrix' o :: IpeObject' i r
+o@(i r
+i :+ IpeAttributes i r
+ats) = IpeObject' i r
 -> (Matrix 3 3 r -> IpeObject' i r)
 -> Maybe (Matrix 3 3 r)
 -> IpeObject' i r
 forall b a. b -> (a -> b) -> Maybe a -> b
 maybe IpeObject' i r
-o (\Matrix 3 3 r
-m -> Transformation (Dimension (i r)) (NumType (i r)) -> i r -> i r
+o (\Matrix 3 3 r
+m -> Transformation (Dimension (i r)) (NumType (i r)) -> i r -> i r
 forall g.
 IsTransformable g =>
 Transformation (Dimension g) (NumType g) -> g -> g
@@ -49,17 +49,17 @@
 forall (d :: Nat) r. Matrix (d + 1) (d + 1) r -> Transformation d r
 Transformation Matrix 3 3 r
 Matrix (2 + 1) (2 + 1) r
-m) i r
-i i r -> IpeAttributes i r -> IpeObject' i r
+m) i r
+i i r -> IpeAttributes i r -> IpeObject' i r
 forall core extra. core -> extra -> core :+ extra
 :+ IpeAttributes i r
-ats') Maybe (Apply (AttrMapSym1 r) 'Matrix)
+ats') Maybe (Apply (AttrMapSym1 r) 'Matrix)
 Maybe (Matrix 3 3 r)
-mm
+mm
   where
-    (Maybe (Apply (AttrMapSym1 r) 'Matrix)
-mm,IpeAttributes i r
-ats') = Proxy 'Matrix
+    (Maybe (Apply (AttrMapSym1 r) 'Matrix)
+mm,IpeAttributes i r
+ats') = Proxy 'Matrix
 -> IpeAttributes i r
 -> (Maybe (Apply (AttrMapSym1 r) 'Matrix), IpeAttributes i r)
 forall {u} (proxy :: u -> *) (at :: u) (ats :: [u])
@@ -70,13 +70,13 @@
 takeAttr (Proxy 'Matrix
 forall {k} (t :: k). Proxy t
 Proxy :: Proxy AT.Matrix) IpeAttributes i r
-ats
+ats
 
 -- | Applies the matrix to an ipe object if it has one.
-applyMatrix                  :: Fractional r => IpeObject r -> IpeObject r
+applyMatrix                  :: Fractional r => IpeObject r -> IpeObject r
 applyMatrix :: forall r. Fractional r => IpeObject r -> IpeObject r
-applyMatrix (IpeGroup IpeObject' Group r
-i)     = (Group r
+applyMatrix (IpeGroup IpeObject' Group r
+i)     = (Group r
  :+ Attributes
       (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip])
 -> IpeObject r
@@ -122,7 +122,7 @@
 :+ Attributes
      (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]
 IpeObject' Group r
-i(Group r
+i(Group r
  :+ Attributes
       (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip])
 -> ((Group r
@@ -210,8 +210,8 @@
                              -- note that for a group we first (recursively)
                              -- apply the matrices, and then apply
                              -- the matrix of the group to its members.
-applyMatrix (IpeImage IpeObject' Image r
-i)     = IpeObject' Image r -> IpeObject r
+applyMatrix (IpeImage IpeObject' Image r
+i)     = IpeObject' Image r -> IpeObject r
 forall r. IpeObject' Image r -> IpeObject r
 IpeImage     (IpeObject' Image r -> IpeObject r)
 -> IpeObject' Image r -> IpeObject r
@@ -222,9 +222,9 @@
  Dimension (i r) ~ 2, r ~ NumType (i r)) =>
 IpeObject' i r -> IpeObject' i r
 applyMatrix' IpeObject' Image r
-i
-applyMatrix (IpeTextLabel IpeObject' TextLabel r
-i) = IpeObject' TextLabel r -> IpeObject r
+i
+applyMatrix (IpeTextLabel IpeObject' TextLabel r
+i) = IpeObject' TextLabel r -> IpeObject r
 forall r. IpeObject' TextLabel r -> IpeObject r
 IpeTextLabel (IpeObject' TextLabel r -> IpeObject r)
 -> IpeObject' TextLabel r -> IpeObject r
@@ -235,9 +235,9 @@
  Dimension (i r) ~ 2, r ~ NumType (i r)) =>
 IpeObject' i r -> IpeObject' i r
 applyMatrix' IpeObject' TextLabel r
-i
-applyMatrix (IpeMiniPage IpeObject' MiniPage r
-i)  = IpeObject' MiniPage r -> IpeObject r
+i
+applyMatrix (IpeMiniPage IpeObject' MiniPage r
+i)  = IpeObject' MiniPage r -> IpeObject r
 forall r. IpeObject' MiniPage r -> IpeObject r
 IpeMiniPage  (IpeObject' MiniPage r -> IpeObject r)
 -> IpeObject' MiniPage r -> IpeObject r
@@ -248,9 +248,9 @@
  Dimension (i r) ~ 2, r ~ NumType (i r)) =>
 IpeObject' i r -> IpeObject' i r
 applyMatrix' IpeObject' MiniPage r
-i
-applyMatrix (IpeUse IpeObject' IpeSymbol r
-i)       = IpeObject' IpeSymbol r -> IpeObject r
+i
+applyMatrix (IpeUse IpeObject' IpeSymbol r
+i)       = IpeObject' IpeSymbol r -> IpeObject r
 forall r. IpeObject' IpeSymbol r -> IpeObject r
 IpeUse       (IpeObject' IpeSymbol r -> IpeObject r)
 -> IpeObject' IpeSymbol r -> IpeObject r
@@ -261,9 +261,9 @@
  Dimension (i r) ~ 2, r ~ NumType (i r)) =>
 IpeObject' i r -> IpeObject' i r
 applyMatrix' IpeObject' IpeSymbol r
-i
-applyMatrix (IpePath IpeObject' Path r
-i)      = IpeObject' Path r -> IpeObject r
+i
+applyMatrix (IpePath IpeObject' Path r
+i)      = IpeObject' Path r -> IpeObject r
 forall r. IpeObject' Path r -> IpeObject r
 IpePath      (IpeObject' Path r -> IpeObject r)
 -> IpeObject' Path r -> IpeObject r
@@ -274,14 +274,14 @@
  Dimension (i r) ~ 2, r ~ NumType (i r)) =>
 IpeObject' i r -> IpeObject' i r
 applyMatrix' IpeObject' Path r
-i
+i
 
 -- | Applies all matrices in the file.
-applyMatrices   :: Fractional r => IpeFile r -> IpeFile r
+applyMatrices   :: Fractional r => IpeFile r -> IpeFile r
 applyMatrices :: forall r. Fractional r => IpeFile r -> IpeFile r
-applyMatrices IpeFile r
-f = IpeFile r
-fIpeFile r -> (IpeFile r -> IpeFile r) -> IpeFile r
+applyMatrices IpeFile r
+f = IpeFile r
+fIpeFile r -> (IpeFile r -> IpeFile r) -> IpeFile r
 forall a b. a -> (a -> b) -> b
 &(NonEmpty (IpePage r) -> Identity (NonEmpty (IpePage r)))
 -> IpeFile r -> Identity (IpeFile r)
@@ -314,11 +314,11 @@
 applyMatricesPage
 
 -- | Applies all Matrices on a given page.
-applyMatricesPage   :: Fractional r => IpePage r -> IpePage r
+applyMatricesPage   :: Fractional r => IpePage r -> IpePage r
 applyMatricesPage :: forall r. Fractional r => IpePage r -> IpePage r
-applyMatricesPage IpePage r
-p = IpePage r
-pIpePage r -> (IpePage r -> IpePage r) -> IpePage r
+applyMatricesPage IpePage r
+p = IpePage r
+pIpePage r -> (IpePage r -> IpePage r) -> IpePage r
 forall a b. a -> (a -> b) -> b
 &([IpeObject r] -> Identity [IpeObject r])
 -> IpePage r -> Identity (IpePage r)
diff --git a/haddocks/hgeometry/ipe/src/Ipe.ParserPrimitives.html b/haddocks/hgeometry/ipe/src/Ipe.ParserPrimitives.html
index 5965f882a..550aa9363 100644
--- a/haddocks/hgeometry/ipe/src/Ipe.ParserPrimitives.html
+++ b/haddocks/hgeometry/ipe/src/Ipe.ParserPrimitives.html
@@ -19,32 +19,32 @@
 import           Text.ParserCombinators.Parsec hiding (Parser,try)
 
 
-runP'     :: Parser a -> T.Text -> (a, T.Text)
+runP'     :: Parser a -> T.Text -> (a, T.Text)
 runP' :: forall a. Parser a -> Text -> (a, Text)
-runP' Parser a
-p Text
-s = case Parser a -> Text -> Either ParseError (a, Text)
+runP' Parser a
+p Text
+s = case Parser a -> Text -> Either ParseError (a, Text)
 forall a. Parser a -> Text -> Either ParseError (a, Text)
 runP Parser a
-p Text
-s of
-             Left  ParseError
-e -> [Char] -> (a, Text)
+p Text
+s of
+             Left  ParseError
+e -> [Char] -> (a, Text)
 forall a. HasCallStack => [Char] -> a
 error ([Char] -> (a, Text)) -> [Char] -> (a, Text)
 forall a b. (a -> b) -> a -> b
 $ ParseError -> [Char]
 forall a. Show a => a -> [Char]
 show ParseError
-e
-             Right (a, Text)
-x -> (a, Text)
-x
+e
+             Right (a, Text)
+x -> (a, Text)
+x
 
-runP   :: Parser a -> T.Text -> Either ParseError (a,T.Text)
+runP   :: Parser a -> T.Text -> Either ParseError (a,T.Text)
 runP :: forall a. Parser a -> Text -> Either ParseError (a, Text)
-runP Parser a
-p = Parsec Text () (a, Text)
+runP Parser a
+p = Parsec Text () (a, Text)
 -> [Char] -> Text -> Either ParseError (a, Text)
 forall s t a.
 Stream s Identity t =>
@@ -53,7 +53,7 @@
 -> Parser a -> ParsecT Text () Identity (Text -> (a, Text))
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> Parser a
-p ParsecT Text () Identity (Text -> (a, Text))
+p ParsecT Text () Identity (Text -> (a, Text))
 -> ParsecT Text () Identity Text -> Parsec Text () (a, Text)
 forall a b.
 ParsecT Text () Identity (a -> b)
@@ -68,13 +68,13 @@
 ----------------------------------------------------------------------------
 -- | reexporting some standard combinators
 
-pMany :: Parser a -> Parser [a]
+pMany :: Parser a -> Parser [a]
 pMany :: forall a. Parser a -> Parser [a]
 pMany = ParsecT Text () Identity a -> ParsecT Text () Identity [a]
 forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m [a]
 many
 
-pMany1 :: Parser a -> Parser [a]
+pMany1 :: Parser a -> Parser [a]
 pMany1 :: forall a. Parser a -> Parser [a]
 pMany1 = ParsecT Text () Identity a -> ParsecT Text () Identity [a]
 forall s (m :: * -> *) t u a.
@@ -83,7 +83,7 @@
 many1
 
 
-pChoice :: [Parser a] -> Parser a
+pChoice :: [Parser a] -> Parser a
 pChoice :: forall a. [Parser a] -> Parser a
 pChoice = [ParsecT Text () Identity a] -> ParsecT Text () Identity a
 forall s (m :: * -> *) t u a.
@@ -119,15 +119,15 @@
 -- string parced (i.e. number of digits) and the resulting antural number.
 pPaddedNatural :: Parser (Int, Integer)
 pPaddedNatural :: Parser (Int, Integer)
-pPaddedNatural = (\[Char]
-s -> ([Char] -> Int
+pPaddedNatural = (\[Char]
+s -> ([Char] -> Int
 forall a. [a] -> Int
 forall (t :: * -> *) a. Foldable t => t a -> Int
 length [Char]
-s, [Char] -> Integer
+s, [Char] -> Integer
 forall a. Read a => [Char] -> a
 read [Char]
-s)) ([Char] -> (Int, Integer))
+s)) ([Char] -> (Int, Integer))
 -> ParsecT Text () Identity [Char] -> Parser (Int, Integer)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> Parser Char -> ParsecT Text () Identity [Char]
@@ -185,7 +185,7 @@
 forall s (m :: * -> *) u. Stream s m Char => ParsecT s u m Char
 newline)
 
-pMaybe :: Parser a -> Parser (Maybe a)
+pMaybe :: Parser a -> Parser (Maybe a)
 pMaybe :: forall a. Parser a -> Parser (Maybe a)
 pMaybe = ParsecT Text () Identity a -> ParsecT Text () Identity (Maybe a)
 forall s (m :: * -> *) t u a.
@@ -193,7 +193,7 @@
 ParsecT s u m a -> ParsecT s u m (Maybe a)
 optionMaybe
 
-pCount :: Int -> Parser a -> Parser [a]
+pCount :: Int -> Parser a -> Parser [a]
 pCount :: forall a. Int -> Parser a -> Parser [a]
 pCount = Int -> ParsecT Text () Identity a -> ParsecT Text () Identity [a]
 forall s (m :: * -> *) t u a.
@@ -201,7 +201,7 @@
 Int -> ParsecT s u m a -> ParsecT s u m [a]
 count
 
-pSepBy :: Parser a -> Parser b -> Parser [a]
+pSepBy :: Parser a -> Parser b -> Parser [a]
 pSepBy :: forall a b. Parser a -> Parser b -> Parser [a]
 pSepBy = ParsecT Text () Identity a
 -> ParsecT Text () Identity b -> ParsecT Text () Identity [a]
@@ -212,34 +212,34 @@
 
 
 -- | infix variant of notfollowed by
-pNotFollowedBy :: Parser a -> Parser b -> Parser a
-Parser a
-p pNotFollowedBy :: forall a b. Parser a -> Parser b -> Parser a
-`pNotFollowedBy` Parser b
-q = do { a
-x <- Parser a
-p ; Parser b -> ParsecT Text () Identity ()
+pNotFollowedBy :: Parser a -> Parser b -> Parser a
+Parser a
+p pNotFollowedBy :: forall a b. Parser a -> Parser b -> Parser a
+`pNotFollowedBy` Parser b
+q = do { a
+x <- Parser a
+p ; Parser b -> ParsecT Text () Identity ()
 forall {s} {m :: * -> *} {t} {u} {a}.
 Stream s m t =>
 ParsecT s u m a -> ParsecT s u m ()
-notFollowedBy' Parser b
-q ; a -> Parser a
+notFollowedBy' Parser b
+q ; a -> Parser a
 forall a. a -> ParsecT Text () Identity a
 forall (m :: * -> *) a. Monad m => a -> m a
 return a
-x }
+x }
     where
       -- | copy of the original notFollowedBy but replaced the error message
       -- to get rid of the Show dependency
-      notFollowedBy' :: ParsecT s u m a -> ParsecT s u m ()
-notFollowedBy' ParsecT s u m a
-z     = ParsecT s u m () -> ParsecT s u m ()
+      notFollowedBy' :: ParsecT s u m a -> ParsecT s u m ()
+notFollowedBy' ParsecT s u m a
+z     = ParsecT s u m () -> ParsecT s u m ()
 forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m a
 try (do{ a
 _ <- ParsecT s u m a -> ParsecT s u m a
 forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m a
 try ParsecT s u m a
-z; [Char] -> ParsecT s u m ()
+z; [Char] -> ParsecT s u m ()
 forall s (m :: * -> *) t u a.
 Stream s m t =>
 [Char] -> ParsecT s u m a
@@ -260,61 +260,61 @@
 infix 1 <*><>, <*><
 
 -- | Runs parser q ``in reverse'' on the end of the input stream
-(<*><>) ::  (Reversable s, Stream s m t)
-        => ParsecT s u m (a -> b) -> ParsecT s u m a -> ParsecT s u m b
-ParsecT s u m (a -> b)
-p <*><> :: forall s (m :: * -> *) t u a b.
+(<*><>) ::  (Reversable s, Stream s m t)
+        => ParsecT s u m (a -> b) -> ParsecT s u m a -> ParsecT s u m b
+ParsecT s u m (a -> b)
+p <*><> :: forall s (m :: * -> *) t u a b.
 (Reversable s, Stream s m t) =>
 ParsecT s u m (a -> b) -> ParsecT s u m a -> ParsecT s u m b
-<*><> ParsecT s u m a
-q = do
+<*><> ParsecT s u m a
+q = do
   ParsecT s u m ()
 forall s (m :: * -> *) t u.
 (Reversable s, Stream s m t) =>
 ParsecT s u m ()
 rev
-  a
-x <- ParsecT s u m a
-q
+  a
+x <- ParsecT s u m a
+q
   ParsecT s u m ()
 forall s (m :: * -> *) t u.
 (Reversable s, Stream s m t) =>
 ParsecT s u m ()
 rev
-  a -> b
-f <- ParsecT s u m (a -> b)
-p
+  a -> b
+f <- ParsecT s u m (a -> b)
+p
   b -> ParsecT s u m b
 forall a. a -> ParsecT s u m a
 forall (m :: * -> *) a. Monad m => a -> m a
 return (b -> ParsecT s u m b) -> b -> ParsecT s u m b
 forall a b. (a -> b) -> a -> b
 $ a -> b
-f a
-x
+f a
+x
 
 
-(<*><)   :: (Stream s m t, Reversable s)
-          => ParsecT s u m b -> ParsecT s u m a -> ParsecT s u m b
-ParsecT s u m b
-p <*>< :: forall s (m :: * -> *) t u b a.
+(<*><)   :: (Stream s m t, Reversable s)
+          => ParsecT s u m b -> ParsecT s u m a -> ParsecT s u m b
+ParsecT s u m b
+p <*>< :: forall s (m :: * -> *) t u b a.
 (Stream s m t, Reversable s) =>
 ParsecT s u m b -> ParsecT s u m a -> ParsecT s u m b
-<*>< ParsecT s u m a
-q = b -> a -> b
+<*>< ParsecT s u m a
+q = b -> a -> b
 forall a b. a -> b -> a
 const (b -> a -> b) -> ParsecT s u m b -> ParsecT s u m (a -> b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> ParsecT s u m b
-p ParsecT s u m (a -> b) -> ParsecT s u m a -> ParsecT s u m b
+p ParsecT s u m (a -> b) -> ParsecT s u m a -> ParsecT s u m b
 forall s (m :: * -> *) t u a b.
 (Reversable s, Stream s m t) =>
 ParsecT s u m (a -> b) -> ParsecT s u m a -> ParsecT s u m b
 <*><> ParsecT s u m a
-q
+q
 
 
-rev :: (Reversable s, Stream s m t) => ParsecT s u m ()
+rev :: (Reversable s, Stream s m t) => ParsecT s u m ()
 rev :: forall s (m :: * -> *) t u.
 (Reversable s, Stream s m t) =>
 ParsecT s u m ()
@@ -349,68 +349,68 @@
 infixr 2 <***>, ***>, <***
 
 -- | run the parsers in reverse order, first q, then p
-(<***>) :: Monad m => m (t -> b) -> m t -> m b
-m (t -> b)
-p <***> :: forall (m :: * -> *) t b. Monad m => m (t -> b) -> m t -> m b
-<***> m t
-q = do
-  t
-x <- m t
-q
-  t -> b
-f <- m (t -> b)
-p
+(<***>) :: Monad m => m (t -> b) -> m t -> m b
+m (t -> b)
+p <***> :: forall (m :: * -> *) t b. Monad m => m (t -> b) -> m t -> m b
+<***> m t
+q = do
+  t
+x <- m t
+q
+  t -> b
+f <- m (t -> b)
+p
   b -> m b
 forall a. a -> m a
 forall (m :: * -> *) a. Monad m => a -> m a
 return (b -> m b) -> b -> m b
 forall a b. (a -> b) -> a -> b
 $ t -> b
-f t
-x
+f t
+x
 
 -- | the variants with missing brackets
-(***>) :: Monad m => m a -> m b -> m b
-m a
-p ***> :: forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
-***> m b
-q = (\a
-_ b
-s -> b
-s) (a -> b -> b) -> m a -> m (b -> b)
+(***>) :: Monad m => m a -> m b -> m b
+m a
+p ***> :: forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
+***> m b
+q = (\a
+_ b
+s -> b
+s) (a -> b -> b) -> m a -> m (b -> b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> m a
-p m (b -> b) -> m b -> m b
+p m (b -> b) -> m b -> m b
 forall (m :: * -> *) t b. Monad m => m (t -> b) -> m t -> m b
 <***> m b
-q
+q
 
-(<***) :: Monad m => m b -> m t -> m b
-m b
-p <*** :: forall (m :: * -> *) b t. Monad m => m b -> m t -> m b
-<*** m t
-q = (\b
-s t
+(<***) :: Monad m => m b -> m t -> m b
+m b
+p <*** :: forall (m :: * -> *) b t. Monad m => m b -> m t -> m b
+<*** m t
+q = (\b
+s t
 _ -> b
-s) (b -> t -> b) -> m b -> m (t -> b)
+s) (b -> t -> b) -> m b -> m (t -> b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> m b
-p m (t -> b) -> m t -> m b
+p m (t -> b) -> m t -> m b
 forall (m :: * -> *) t b. Monad m => m (t -> b) -> m t -> m b
 <***> m t
-q
+q
 
-class Reversable s where
-  reverseS :: s -> s
+class Reversable s where
+  reverseS :: s -> s
 
-instance Reversable [c] where
-  reverseS :: [c] -> [c]
+instance Reversable [c] where
+  reverseS :: [c] -> [c]
 reverseS = [c] -> [c]
 forall c. [c] -> [c]
 reverse
 
 instance Reversable T.Text where
-  reverseS :: Text -> Text
+  reverseS :: Text -> Text
 reverseS = Text -> Text
 T.reverse
 
\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/src/Ipe.Path.html b/haddocks/hgeometry/ipe/src/Ipe.Path.html index e6ce11e59..dd545181b 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.Path.html +++ b/haddocks/hgeometry/ipe/src/Ipe.Path.html @@ -50,16 +50,16 @@
-- | Paths -- | Paths consist of Path Segments. PathSegments come in the following forms: -data PathSegment r = PolyLineSegment (PolyLine (Point 2 r)) - | PolygonPath (SimplePolygon (Point 2 r)) - | CubicBezierSegment (CubicBezier (Point 2 r)) - | QuadraticBezierSegment (QuadraticBezier (Point 2 r)) - | EllipseSegment (Ellipse r) +data PathSegment r = PolyLineSegment (PolyLine (Point 2 r)) + | PolygonPath (SimplePolygon (Point 2 r)) + | CubicBezierSegment (CubicBezier (Point 2 r)) + | QuadraticBezierSegment (QuadraticBezier (Point 2 r)) + | EllipseSegment (Ellipse r) -- TODO | ArcSegment | SplineSegment -- (Spline 2 r) | ClosedSplineSegment -- (ClosedSpline 2 r) - deriving (Int -> PathSegment r -> ShowS + deriving (Int -> PathSegment r -> ShowS [PathSegment r] -> ShowS PathSegment r -> String (Int -> PathSegment r -> ShowS) @@ -77,7 +77,7 @@ show :: PathSegment r -> String $cshowList :: forall r. Show r => [PathSegment r] -> ShowS showList :: [PathSegment r] -> ShowS -Show,PathSegment r -> PathSegment r -> Bool +Show,PathSegment r -> PathSegment r -> Bool (PathSegment r -> PathSegment r -> Bool) -> (PathSegment r -> PathSegment r -> Bool) -> Eq (PathSegment r) forall r. Eq r => PathSegment r -> PathSegment r -> Bool @@ -87,31 +87,31 @@ $c/= :: forall r. Eq r => PathSegment r -> PathSegment r -> Bool /= :: PathSegment r -> PathSegment r -> Bool Eq) -makePrisms ''PathSegment +makePrisms ''PathSegment -type instance NumType (PathSegment r) = r -type instance Dimension (PathSegment r) = 2 +type instance NumType (PathSegment r) = r +type instance Dimension (PathSegment r) = 2 -instance Functor PathSegment where - fmap :: forall a b. (a -> b) -> PathSegment a -> PathSegment b +instance Functor PathSegment where + fmap :: forall a b. (a -> b) -> PathSegment a -> PathSegment b fmap = (a -> b) -> PathSegment a -> PathSegment b forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b fmapDefault -instance Foldable PathSegment where - foldMap :: forall m a. Monoid m => (a -> m) -> PathSegment a -> m -foldMap = (a -> m) -> PathSegment a -> m +instance Foldable PathSegment where + foldMap :: forall m a. Monoid m => (a -> m) -> PathSegment a -> m +foldMap = (a -> m) -> PathSegment a -> m forall (t :: * -> *) m a. (Traversable t, Monoid m) => (a -> m) -> t a -> m foldMapDefault -instance Traversable PathSegment where - traverse :: forall (f :: * -> *) a b. +instance Traversable PathSegment where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> PathSegment a -> f (PathSegment b) -traverse a -> f b -f = \case - PolyLineSegment PolyLine (Point 2 a) -p -> PolyLine (Point 2 b) -> PathSegment b +traverse a -> f b +f = \case + PolyLineSegment PolyLine (Point 2 a) +p -> PolyLine (Point 2 b) -> PathSegment b forall r. PolyLine (Point 2 r) -> PathSegment r PolyLineSegment (PolyLine (Point 2 b) -> PathSegment b) @@ -164,10 +164,10 @@ (NumType (Point 2 a)) (NumType (Point 2 b)) coordinates) a -> f b -f PolyLine (Point 2 a) -p - PolygonPath SimplePolygon (Point 2 a) -p -> SimplePolygon (Point 2 b) -> PathSegment b +f PolyLine (Point 2 a) +p + PolygonPath SimplePolygon (Point 2 a) +p -> SimplePolygon (Point 2 b) -> PathSegment b forall r. SimplePolygon (Point 2 r) -> PathSegment r PolygonPath (SimplePolygon (Point 2 b) -> PathSegment b) @@ -232,10 +232,10 @@ (NumType (Point 2 a)) (NumType (Point 2 b)) coordinates) a -> f b -f SimplePolygon (Point 2 a) -p - CubicBezierSegment CubicBezier (Point 2 a) -b -> CubicBezier (Point 2 b) -> PathSegment b +f SimplePolygon (Point 2 a) +p + CubicBezierSegment CubicBezier (Point 2 a) +b -> CubicBezier (Point 2 b) -> PathSegment b forall r. CubicBezier (Point 2 r) -> PathSegment r CubicBezierSegment (CubicBezier (Point 2 b) -> PathSegment b) @@ -297,10 +297,10 @@ (NumType (Point 2 a)) (NumType (Point 2 b)) coordinates) a -> f b -f CubicBezier (Point 2 a) -b - QuadraticBezierSegment QuadraticBezier (Point 2 a) -b -> QuadraticBezier (Point 2 b) -> PathSegment b +f CubicBezier (Point 2 a) +b + QuadraticBezierSegment QuadraticBezier (Point 2 a) +b -> QuadraticBezier (Point 2 b) -> PathSegment b forall r. QuadraticBezier (Point 2 r) -> PathSegment r QuadraticBezierSegment (QuadraticBezier (Point 2 b) -> PathSegment b) @@ -365,10 +365,10 @@ (NumType (Point 2 a)) (NumType (Point 2 b)) coordinates) a -> f b -f QuadraticBezier (Point 2 a) -b - EllipseSegment Ellipse a -e -> Ellipse b -> PathSegment b +f QuadraticBezier (Point 2 a) +b + EllipseSegment Ellipse a +e -> Ellipse b -> PathSegment b forall r. Ellipse r -> PathSegment r EllipseSegment (Ellipse b -> PathSegment b) -> f (Ellipse b) -> f (PathSegment b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -380,8 +380,8 @@ Applicative f => (a -> f b) -> Ellipse a -> f (Ellipse b) traverse a -> f b -f Ellipse a -e +f Ellipse a +e PathSegment a ArcSegment -> PathSegment b -> f (PathSegment b) forall a. a -> f a @@ -405,15 +405,15 @@ ClosedSplineSegment -instance Fractional r => IsTransformable (PathSegment r) where - transformBy :: Transformation +instance Fractional r => IsTransformable (PathSegment r) where + transformBy :: Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -> PathSegment r -> PathSegment r -transformBy Transformation +transformBy Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -t = \case - PolyLineSegment PolyLine (Point 2 r) -p -> PolyLine (Point 2 r) -> PathSegment r +t = \case + PolyLineSegment PolyLine (Point 2 r) +p -> PolyLine (Point 2 r) -> PathSegment r forall r. PolyLine (Point 2 r) -> PathSegment r PolyLineSegment (PolyLine (Point 2 r) -> PathSegment r) -> PolyLine (Point 2 r) -> PathSegment r @@ -428,10 +428,10 @@ (Dimension (PolyLine (Point 2 r))) (NumType (PolyLine (Point 2 r))) Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -t PolyLine (Point 2 r) -p - PolygonPath SimplePolygon (Point 2 r) -p -> SimplePolygon (Point 2 r) -> PathSegment r +t PolyLine (Point 2 r) +p + PolygonPath SimplePolygon (Point 2 r) +p -> SimplePolygon (Point 2 r) -> PathSegment r forall r. SimplePolygon (Point 2 r) -> PathSegment r PolygonPath (SimplePolygon (Point 2 r) -> PathSegment r) -> SimplePolygon (Point 2 r) -> PathSegment r @@ -448,10 +448,10 @@ (NumType (SimplePolygon (Point 2 r))) Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -t SimplePolygon (Point 2 r) -p - CubicBezierSegment CubicBezier (Point 2 r) -b -> CubicBezier (Point 2 r) -> PathSegment r +t SimplePolygon (Point 2 r) +p + CubicBezierSegment CubicBezier (Point 2 r) +b -> CubicBezier (Point 2 r) -> PathSegment r forall r. CubicBezier (Point 2 r) -> PathSegment r CubicBezierSegment (CubicBezier (Point 2 r) -> PathSegment r) -> CubicBezier (Point 2 r) -> PathSegment r @@ -468,10 +468,10 @@ (NumType (CubicBezier (Point 2 r))) Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -t CubicBezier (Point 2 r) -b - QuadraticBezierSegment QuadraticBezier (Point 2 r) -b -> QuadraticBezier (Point 2 r) -> PathSegment r +t CubicBezier (Point 2 r) +b + QuadraticBezierSegment QuadraticBezier (Point 2 r) +b -> QuadraticBezier (Point 2 r) -> PathSegment r forall r. QuadraticBezier (Point 2 r) -> PathSegment r QuadraticBezierSegment (QuadraticBezier (Point 2 r) -> PathSegment r) -> QuadraticBezier (Point 2 r) -> PathSegment r @@ -488,10 +488,10 @@ (NumType (QuadraticBezier (Point 2 r))) Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -t QuadraticBezier (Point 2 r) -b - EllipseSegment Ellipse r -e -> Ellipse r -> PathSegment r +t QuadraticBezier (Point 2 r) +b + EllipseSegment Ellipse r +e -> Ellipse r -> PathSegment r forall r. Ellipse r -> PathSegment r EllipseSegment (Ellipse r -> PathSegment r) -> Ellipse r -> PathSegment r forall a b. (a -> b) -> a -> b @@ -503,8 +503,8 @@ transformBy Transformation (Dimension (Ellipse r)) (NumType (Ellipse r)) Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) -t Ellipse r -e +t Ellipse r +e -- TODO: PathSegment r ArcSegment -> PathSegment r @@ -521,9 +521,9 @@ -- | A path is a non-empty sequence of PathSegments. -newtype Path r = Path { forall r. Path r -> Seq (PathSegment r) -_pathSegments :: Seq.Seq (PathSegment r) } - deriving (Int -> Path r -> ShowS +newtype Path r = Path { forall r. Path r -> Seq (PathSegment r) +_pathSegments :: Seq.Seq (PathSegment r) } + deriving (Int -> Path r -> ShowS [Path r] -> ShowS Path r -> String (Int -> Path r -> ShowS) @@ -539,7 +539,7 @@ show :: Path r -> String $cshowList :: forall r. Show r => [Path r] -> ShowS showList :: [Path r] -> ShowS -Show,Path r -> Path r -> Bool +Show,Path r -> Path r -> Bool (Path r -> Path r -> Bool) -> (Path r -> Path r -> Bool) -> Eq (Path r) forall r. Eq r => Path r -> Path r -> Bool @@ -548,7 +548,7 @@ == :: Path r -> Path r -> Bool $c/= :: forall r. Eq r => Path r -> Path r -> Bool /= :: Path r -> Path r -> Bool -Eq,(forall a b. (a -> b) -> Path a -> Path b) +Eq,(forall a b. (a -> b) -> Path a -> Path b) -> (forall a b. a -> Path b -> Path a) -> Functor Path forall a b. a -> Path b -> Path a forall a b. (a -> b) -> Path a -> Path b @@ -559,7 +559,7 @@ fmap :: forall a b. (a -> b) -> Path a -> Path b $c<$ :: forall a b. a -> Path b -> Path a <$ :: forall a b. a -> Path b -> Path a -Functor,(forall m. Monoid m => Path m -> m) +Functor,(forall m. Monoid m => Path m -> m) -> (forall m a. Monoid m => (a -> m) -> Path a -> m) -> (forall m a. Monoid m => (a -> m) -> Path a -> m) -> (forall a b. (a -> b -> b) -> b -> Path a -> b) @@ -641,7 +641,7 @@ sum :: forall a. Num a => Path a -> a $cproduct :: forall a. Num a => Path a -> a product :: forall a. Num a => Path a -> a -Foldable,Functor Path +Foldable,Functor Path Foldable Path (Functor Path, Foldable Path) => (forall (f :: * -> *) a b. @@ -691,7 +691,7 @@ $csequence :: forall (m :: * -> *) a. Monad m => Path (m a) -> m (Path a) sequence :: forall (m :: * -> *) a. Monad m => Path (m a) -> m (Path a) Traversable) - deriving newtype (NonEmpty (Path r) -> Path r + deriving newtype (NonEmpty (Path r) -> Path r Path r -> Path r -> Path r (Path r -> Path r -> Path r) -> (NonEmpty (Path r) -> Path r) @@ -714,17 +714,17 @@ stimes :: forall b. Integral b => b -> Path r -> Path r Semigroup) -makeLenses ''Path +makeLenses ''Path -type instance NumType (Path r) = r -type instance Dimension (Path r) = 2 +type instance NumType (Path r) = r +type instance Dimension (Path r) = 2 -instance Fractional r => IsTransformable (Path r) where - transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) +instance Fractional r => IsTransformable (Path r) where + transformBy :: Transformation (Dimension (Path r)) (NumType (Path r)) -> Path r -> Path r -transformBy Transformation (Dimension (Path r)) (NumType (Path r)) -t (Path Seq (PathSegment r) -s) = Seq (PathSegment r) -> Path r +transformBy Transformation (Dimension (Path r)) (NumType (Path r)) +t (Path Seq (PathSegment r) +s) = Seq (PathSegment r) -> Path r forall r. Seq (PathSegment r) -> Path r Path (Seq (PathSegment r) -> Path r) -> Seq (PathSegment r) -> Path r forall a b. (a -> b) -> a -> b @@ -741,24 +741,24 @@ transformBy Transformation (Dimension (PathSegment r)) (NumType (PathSegment r)) Transformation (Dimension (Path r)) (NumType (Path r)) -t) Seq (PathSegment r) -s +t) Seq (PathSegment r) +s -------------------------------------------------------------------------------- -- | type that represents a path in ipe. -data Operation r = MoveTo (Point 2 r) - | LineTo (Point 2 r) - | Ellipse (Matrix 3 3 r) - | ArcTo (Matrix 3 3 r) (Point 2 r) - | Spline [Point 2 r] - | ClosedSpline [Point 2 r] +data Operation r = MoveTo (Point 2 r) + | LineTo (Point 2 r) + | Ellipse (Matrix 3 3 r) + | ArcTo (Matrix 3 3 r) (Point 2 r) + | Spline [Point 2 r] + | ClosedSpline [Point 2 r] | ClosePath -- these should be deprecated - | CurveTo (Point 2 r) (Point 2 r) (Point 2 r) - | QCurveTo (Point 2 r) (Point 2 r) - deriving (Operation r -> Operation r -> Bool + | CurveTo (Point 2 r) (Point 2 r) (Point 2 r) + | QCurveTo (Point 2 r) (Point 2 r) + deriving (Operation r -> Operation r -> Bool (Operation r -> Operation r -> Bool) -> (Operation r -> Operation r -> Bool) -> Eq (Operation r) forall r. Eq r => Operation r -> Operation r -> Bool @@ -767,7 +767,7 @@ == :: Operation r -> Operation r -> Bool $c/= :: forall r. Eq r => Operation r -> Operation r -> Bool /= :: Operation r -> Operation r -> Bool -Eq,Int -> Operation r -> ShowS +Eq,Int -> Operation r -> ShowS [Operation r] -> ShowS Operation r -> String (Int -> Operation r -> ShowS) @@ -786,28 +786,28 @@ $cshowList :: forall r. Show r => [Operation r] -> ShowS showList :: [Operation r] -> ShowS Show) -makePrisms ''Operation +makePrisms ''Operation -instance Functor Operation where - fmap :: forall a b. (a -> b) -> Operation a -> Operation b +instance Functor Operation where + fmap :: forall a b. (a -> b) -> Operation a -> Operation b fmap = (a -> b) -> Operation a -> Operation b forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b fmapDefault -instance Foldable Operation where - foldMap :: forall m a. Monoid m => (a -> m) -> Operation a -> m +instance Foldable Operation where + foldMap :: forall m a. Monoid m => (a -> m) -> Operation a -> m foldMap = (a -> m) -> Operation a -> m forall (t :: * -> *) m a. (Traversable t, Monoid m) => (a -> m) -> t a -> m foldMapDefault -instance Traversable Operation where - traverse :: forall (f :: * -> *) a b. +instance Traversable Operation where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Operation a -> f (Operation b) -traverse a -> f b -f = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b))) +traverse a -> f b +f = let coordinates' :: (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' = ATraversal +coordinates' = ATraversal (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b)) -> Traversal (Point 2 a) (Point 2 b) (NumType (Point 2 a)) (NumType (Point 2 b)) @@ -824,9 +824,9 @@ (NumType (Point 2 a)) (NumType (Point 2 b)) coordinates - elements' :: (NumType (Matrix 3 3 a) -> f (NumType (Matrix 3 3 b))) + elements' :: (NumType (Matrix 3 3 a) -> f (NumType (Matrix 3 3 b))) -> Matrix 3 3 a -> f (Matrix 3 3 b) -elements' = ATraversal +elements' = ATraversal (Matrix 3 3 a) (Matrix 3 3 b) (NumType (Matrix 3 3 a)) @@ -854,63 +854,63 @@ (NumType (Matrix 3 3 b)) elements in \case - MoveTo Point 2 a -p -> Point 2 b -> Operation b + MoveTo Point 2 a +p -> Point 2 b -> Operation b forall r. Point 2 r -> Operation r MoveTo (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -p - LineTo Point 2 a -p -> Point 2 b -> Operation b +f Point 2 a +p + LineTo Point 2 a +p -> Point 2 b -> Operation b forall r. Point 2 r -> Operation r LineTo (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -p - Ellipse Matrix 3 3 a -m -> Matrix 3 3 b -> Operation b +f Point 2 a +p + Ellipse Matrix 3 3 a +m -> Matrix 3 3 b -> Operation b forall r. Matrix 3 3 r -> Operation r Ellipse (Matrix 3 3 b -> Operation b) -> f (Matrix 3 3 b) -> f (Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (NumType (Matrix 3 3 a) -> f (NumType (Matrix 3 3 b))) -> Matrix 3 3 a -> f (Matrix 3 3 b) -elements' a -> f b +elements' a -> f b NumType (Matrix 3 3 a) -> f (NumType (Matrix 3 3 b)) -f Matrix 3 3 a -m - ArcTo Matrix 3 3 a -m Point 2 a -p -> Matrix 3 3 b -> Point 2 b -> Operation b +f Matrix 3 3 a +m + ArcTo Matrix 3 3 a +m Point 2 a +p -> Matrix 3 3 b -> Point 2 b -> Operation b forall r. Matrix 3 3 r -> Point 2 r -> Operation r ArcTo (Matrix 3 3 b -> Point 2 b -> Operation b) -> f (Matrix 3 3 b) -> f (Point 2 b -> Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (NumType (Matrix 3 3 a) -> f (NumType (Matrix 3 3 b))) -> Matrix 3 3 a -> f (Matrix 3 3 b) -elements' a -> f b +elements' a -> f b NumType (Matrix 3 3 a) -> f (NumType (Matrix 3 3 b)) -f Matrix 3 3 a -m f (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) +f Matrix 3 3 a +m f (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -p - Spline [Point 2 a] -pts -> [Point 2 b] -> Operation b +f Point 2 a +p + Spline [Point 2 a] +pts -> [Point 2 b] -> Operation b forall r. [Point 2 r] -> Operation r Spline ([Point 2 b] -> Operation b) -> f [Point 2 b] -> f (Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -923,12 +923,12 @@ (a -> f b) -> [a] -> f [b] traverse ((NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f) [Point 2 a] -pts - ClosedSpline [Point 2 a] -pts -> [Point 2 b] -> Operation b +f) [Point 2 a] +pts + ClosedSpline [Point 2 a] +pts -> [Point 2 b] -> Operation b forall r. [Point 2 r] -> Operation r ClosedSpline ([Point 2 b] -> Operation b) -> f [Point 2 b] -> f (Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -941,10 +941,10 @@ (a -> f b) -> [a] -> f [b] traverse ((NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f) [Point 2 a] -pts +f) [Point 2 a] +pts Operation a ClosePath -> Operation b -> f (Operation b) forall a. a -> f a @@ -952,56 +952,56 @@ pure Operation b forall r. Operation r ClosePath - CurveTo Point 2 a -p Point 2 a -q Point 2 a -r -> Point 2 b -> Point 2 b -> Point 2 b -> Operation b + CurveTo Point 2 a +p Point 2 a +q Point 2 a +r -> Point 2 b -> Point 2 b -> Point 2 b -> Operation b forall r. Point 2 r -> Point 2 r -> Point 2 r -> Operation r CurveTo (Point 2 b -> Point 2 b -> Point 2 b -> Operation b) -> f (Point 2 b) -> f (Point 2 b -> Point 2 b -> Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -p f (Point 2 b -> Point 2 b -> Operation b) +f Point 2 a +p f (Point 2 b -> Point 2 b -> Operation b) -> f (Point 2 b) -> f (Point 2 b -> Operation b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -q f (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) +f Point 2 a +q f (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -r - QCurveTo Point 2 a -p Point 2 a -q -> Point 2 b -> Point 2 b -> Operation b +f Point 2 a +r + QCurveTo Point 2 a +p Point 2 a +q -> Point 2 b -> Point 2 b -> Operation b forall r. Point 2 r -> Point 2 r -> Operation r QCurveTo (Point 2 b -> Point 2 b -> Operation b) -> f (Point 2 b) -> f (Point 2 b -> Operation b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -p f (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) +f Point 2 a +p f (Point 2 b -> Operation b) -> f (Point 2 b) -> f (Operation b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> (NumType (Point 2 a) -> f (NumType (Point 2 b))) -> Point 2 a -> f (Point 2 b) -coordinates' a -> f b +coordinates' a -> f b NumType (Point 2 a) -> f (NumType (Point 2 b)) -f Point 2 a -q +f Point 2 a +q
\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/src/Ipe.PathParser.html b/haddocks/hgeometry/ipe/src/Ipe.PathParser.html index 38e426eae..7c366a618 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.PathParser.html +++ b/haddocks/hgeometry/ipe/src/Ipe.PathParser.html @@ -40,83 +40,83 @@
----------------------------------------------------------------------- -- | Represent stuff that can be used as a coordinate in ipe. (similar to show/read) -class Fractional r => Coordinate r where +class Fractional r => Coordinate r where -- reads a coordinate. The input is an integer representing the -- part before the decimal point, and a length and an integer -- representing the part after the decimal point - fromSeq :: Integer -> Maybe (Int, Integer) -> r - default fromSeq :: (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r - fromSeq = Integer -> Maybe (Int, Integer) -> r + fromSeq :: Integer -> Maybe (Int, Integer) -> r + default fromSeq :: (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r + fromSeq = Integer -> Maybe (Int, Integer) -> r forall r. (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r defaultFromSeq -defaultFromSeq :: (Ord r, Fractional r) - => Integer -> Maybe (Int, Integer) -> r +defaultFromSeq :: (Ord r, Fractional r) + => Integer -> Maybe (Int, Integer) -> r defaultFromSeq :: forall r. (Ord r, Fractional r) => Integer -> Maybe (Int, Integer) -> r -defaultFromSeq Integer -x Maybe (Int, Integer) +defaultFromSeq Integer +x Maybe (Int, Integer) Nothing = Integer -> r forall a. Num a => Integer -> a fromInteger Integer -x -defaultFromSeq Integer -x (Just (Int -l,Integer -y)) = let x' :: r -x' = Integer -> r +x +defaultFromSeq Integer +x (Just (Int +l,Integer +y)) = let x' :: r +x' = Integer -> r forall a. Num a => Integer -> a fromInteger Integer -x - y' :: r -y' = Integer -> r +x + y' :: r +y' = Integer -> r forall a. Num a => Integer -> a fromInteger Integer -y - asDecimal :: r -> r -asDecimal r -a = r -a r -> r -> r +y + asDecimal :: r -> r +asDecimal r +a = r +a r -> r -> r forall a. Num a => a -> a -> a * (r 0.1 r -> Int -> r forall a b. (Num a, Integral b) => a -> b -> a ^ Int -l) - z :: r -z = if r -x' r -> r -> Bool +l) + z :: r +z = if r +x' r -> r -> Bool forall a. Ord a => a -> a -> Bool < r 0 then (-r 1) else r 1 in r -z r -> r -> r +z r -> r -> r forall a. Num a => a -> a -> a * (r -> r forall a. Num a => a -> a abs r -x' r -> r -> r +x' r -> r -> r forall a. Num a => a -> a -> a + r -> r -asDecimal r -y') +asDecimal r +y') -instance HasResolution p => Coordinate (Fixed p) -instance Coordinate Double -instance Coordinate Float -instance Coordinate (Ratio Integer) -instance Coordinate (RealNumber p) +instance HasResolution p => Coordinate (Fixed p) +instance Coordinate Double +instance Coordinate Float +instance Coordinate (Ratio Integer) +instance Coordinate (RealNumber p) ----------------------------------------------------------------------- -- | Running the parsers -- | Read/parse a single coordinate value. -readCoordinate :: Coordinate r => Text -> Either Text r +readCoordinate :: Coordinate r => Text -> Either Text r readCoordinate :: forall r. Coordinate r => Text -> Either Text r readCoordinate = Parser r -> Text -> Either Text r forall a. Parser a -> Text -> Either Text a @@ -125,7 +125,7 @@ pCoordinate -- | Read/parse a single point -readPoint :: Coordinate r => Text -> Either Text (Point 2 r) +readPoint :: Coordinate r => Text -> Either Text (Point 2 r) readPoint :: forall r. Coordinate r => Text -> Either Text (Point 2 r) readPoint = Parser (Point 2 r) -> Text -> Either Text (Point 2 r) forall a. Parser a -> Text -> Either Text a @@ -134,10 +134,10 @@ pPoint -- | Run a parser -runParser :: Parser a -> Text -> Either Text a +runParser :: Parser a -> Text -> Either Text a runParser :: forall a. Parser a -> Text -> Either Text a -runParser Parser a -p = (ParseError -> Text) +runParser
Parser a +p = (ParseError -> Text) -> ((a, Text) -> a) -> Either ParseError (a, Text) -> Either Text a forall a b c d. (a -> b) -> (c -> d) -> Either a c -> Either b d forall (p :: * -> * -> *) a b c d. @@ -152,10 +152,10 @@ . Parser a -> Text -> Either ParseError (a, Text) forall a. Parser a -> Text -> Either ParseError (a, Text) runP Parser a -p +p
-- Collect errors -data Either' l r = Left' l | Right' r deriving (Int -> Either' l r -> ShowS +data Either' l r = Left' l | Right' r deriving (Int -> Either' l r -> ShowS [Either' l r] -> ShowS Either' l r -> String (Int -> Either' l r -> ShowS) @@ -173,7 +173,7 @@ show :: Either' l r -> String $cshowList :: forall l r. (Show l, Show r) => [Either' l r] -> ShowS showList :: [Either' l r] -> ShowS -Show,Either' l r -> Either' l r -> Bool +Show,Either' l r -> Either' l r -> Bool (Either' l r -> Either' l r -> Bool) -> (Either' l r -> Either' l r -> Bool) -> Eq (Either' l r) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -184,77 +184,77 @@ /= :: Either' l r -> Either' l r -> Bool Eq) -instance (Semigroup l, Semigroup r) => Semigroup (Either' l r) where - (Left' l -l) <> :: Either' l r -> Either' l r -> Either' l r -<> (Left' l -l') = l -> Either' l r +instance (Semigroup l, Semigroup r) => Semigroup (Either' l r) where + (Left' l +l) <> :: Either' l r -> Either' l r -> Either' l r +<> (Left' l +l') = l -> Either' l r forall l r. l -> Either' l r Left' (l -> Either' l r) -> l -> Either' l r forall a b. (a -> b) -> a -> b $ l -l l -> l -> l +l l -> l -> l forall a. Semigroup a => a -> a -> a <> l -l' - (Left' l -l) <> Either' l r +l' + (Left' l +l) <> Either' l r _ = l -> Either' l r forall l r. l -> Either' l r Left' l -l +l Either' l r -_ <> (Left' l -l') = l -> Either' l r +_ <> (Left' l +l') = l -> Either' l r forall l r. l -> Either' l r Left' l -l' - (Right' r -r) <> (Right' r -r') = r -> Either' l r +l' + (Right' r +r) <> (Right' r +r') = r -> Either' l r forall l r. r -> Either' l r Right' (r -> Either' l r) -> r -> Either' l r forall a b. (a -> b) -> a -> b $ r -r r -> r -> r +r r -> r -> r forall a. Semigroup a => a -> a -> a <> r -r' +r' -instance (Semigroup l, Semigroup r, Monoid r) => Monoid (Either' l r) where - mempty :: Either' l r +instance (Semigroup l, Semigroup r, Monoid r) => Monoid (Either' l r) where + mempty :: Either' l r mempty = r -> Either' l r forall l r. r -> Either' l r Right' r forall a. Monoid a => a mempty - mappend :: Either' l r -> Either' l r -> Either' l r + mappend :: Either' l r -> Either' l r -> Either' l r mappend = Either' l r -> Either' l r -> Either' l r forall a. Semigroup a => a -> a -> a (<>) -either' :: (l -> a) -> (r -> a) -> Either' l r -> a +either' :: (l -> a) -> (r -> a) -> Either' l r -> a either' :: forall l a r. (l -> a) -> (r -> a) -> Either' l r -> a -either' l -> a -lf r -> a -_ (Left' l -l) = l -> a -lf l -l +either' l -> a +lf r -> a +_ (Left' l +l) = l -> a +lf l +l either' l -> a -_ r -> a -rf (Right' r -r) = r -> a -rf r -r +_ r -> a +rf (Right' r +r) = r -> a +rf r +r -- TODO: Use Validation instead of this home-brew one -- | Parse a sequence of path operations. -readPathOperations :: Coordinate r => Text -> Either Text [Operation r] +readPathOperations :: Coordinate r => Text -> Either Text [Operation r] readPathOperations :: forall r. Coordinate r => Text -> Either Text [Operation r] readPathOperations = Either' [ParseError] [Operation r] -> Either Text [Operation r] forall {b}. Either' [ParseError] b -> Either Text b -unWrap (Either' [ParseError] [Operation r] -> Either Text [Operation r]) +unWrap (Either' [ParseError] [Operation r] -> Either Text [Operation r]) -> (Text -> Either' [ParseError] [Operation r]) -> Text -> Either Text [Operation r] @@ -274,7 +274,7 @@ map (Either ParseError (Operation r, Text) -> Either' [ParseError] [Operation r] forall {a} {b} {b}. Either a (b, b) -> Either' [a] [b] -wrap (Either ParseError (Operation r, Text) +wrap (Either ParseError (Operation r, Text) -> Either' [ParseError] [Operation r]) -> (Text -> Either ParseError (Operation r, Text)) -> Text @@ -290,7 +290,7 @@ -> (Text -> [Text]) -> Text -> [Either' [ParseError] [Operation r]] forall b c a. (b -> c) -> (a -> b) -> a -> c . [Text] -> [Text] -clean ([Text] -> [Text]) -> (Text -> [Text]) -> Text -> [Text] +clean ([Text] -> [Text]) -> (Text -> [Text]) -> Text -> [Text] forall b c a. (b -> c) -> (a -> b) -> a -> c . String -> Text -> [Text] splitKeepDelims String @@ -298,8 +298,8 @@ where -- Unwrap the Either'. If it is a Left containing all our errors, -- combine them into one error. Otherwise just ReWrap it in an proper Either - unWrap :: Either' [ParseError] b -> Either Text b -unWrap = ([ParseError] -> Either Text b) + unWrap :: Either' [ParseError] b -> Either Text b +unWrap = ([ParseError] -> Either Text b) -> (b -> Either Text b) -> Either' [ParseError] b -> Either Text b forall l a r. (l -> a) -> (r -> a) -> Either' l r -> a either' (Text -> Either Text b @@ -314,8 +314,8 @@ -- for the lefts: wrap the error in a list, for the rights: we only care -- about the result, so wrap that in a list as well. Collecting the -- results is done using the Semigroup instance of Either' - wrap :: Either a (b, b) -> Either' [a] [b] -wrap = (a -> Either' [a] [b]) + wrap :: Either a (b, b) -> Either' [a] [b] +wrap = (a -> Either' [a] [b]) -> ((b, b) -> Either' [a] [b]) -> Either a (b, b) -> Either' [a] [b] @@ -339,12 +339,12 @@ forall a b. (a, b) -> a fst) -- Split the input string in pieces, each piece represents one operation - trim :: Text -> Text -trim = (Char -> Bool) -> Text -> Text + trim :: Text -> Text +trim = (Char -> Bool) -> Text -> Text T.dropWhile Char -> Bool isSpace - clean :: [Text] -> [Text] -clean = (Text -> Bool) -> [Text] -> [Text] + clean :: [Text] -> [Text] +clean = (Text -> Bool) -> [Text] -> [Text] forall a. (a -> Bool) -> [a] -> [a] filter (Bool -> Bool not (Bool -> Bool) -> (Text -> Bool) -> Text -> Bool @@ -355,7 +355,7 @@ . (Text -> Text) -> [Text] -> [Text] forall a b. (a -> b) -> [a] -> [b] map Text -> Text -trim +trim -- TODO: Do the splitting on the Text rather than unpacking and packing -- the thing @@ -391,48 +391,48 @@ splitKeepDelims :: [Char] -> Text -> [Text] splitKeepDelims :: String -> Text -> [Text] -splitKeepDelims String -delims Text -t = [Text] -> ((Char, Text) -> [Text]) -> Maybe (Char, Text) -> [Text] +splitKeepDelims String +delims Text +t = [Text] -> ((Char, Text) -> [Text]) -> Maybe (Char, Text) -> [Text] forall b a. b -> (a -> b) -> Maybe a -> b maybe [Text] -mPref (Char, Text) -> [Text] -continue (Maybe (Char, Text) -> [Text]) -> Maybe (Char, Text) -> [Text] +mPref (Char, Text) -> [Text] +continue (Maybe (Char, Text) -> [Text]) -> Maybe (Char, Text) -> [Text] forall a b. (a -> b) -> a -> b $ Text -> Maybe (Char, Text) T.uncons Text -rest +rest where - mPref :: [Text] -mPref = if Text -> Bool + mPref :: [Text] +mPref = if Text -> Bool T.null Text -pref then [] else [Text -pref] - (Text -pref,Text -rest) = (Char -> Bool) -> Text -> (Text, Text) +pref then [] else [Text +pref] + (Text +pref,Text +rest) = (Char -> Bool) -> Text -> (Text, Text) T.break (Char -> String -> Bool forall a. Eq a => a -> [a] -> Bool forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool `elem` String -delims) Text -t - continue :: (Char, Text) -> [Text] -continue (Char -c,Text -t') = Text -pref Text -> Char -> Text +delims) Text +t + continue :: (Char, Text) -> [Text] +continue (Char +c,Text +t') = Text +pref Text -> Char -> Text `T.snoc` Char -c Text -> [Text] -> [Text] +c Text -> [Text] -> [Text] forall a. a -> [a] -> [a] : String -> Text -> [Text] splitKeepDelims String -delims Text -t' +delims Text +t' -- | Try to read/parse a matrix. -readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r) +readMatrix :: Coordinate r => Text -> Either Text (Matrix 3 3 r) readMatrix :: forall r. Coordinate r => Text -> Either Text (Matrix 3 3 r) readMatrix = Parser (Matrix 3 3 r) -> Text -> Either Text (Matrix 3 3 r) forall a. Parser a -> Text -> Either Text a @@ -441,7 +441,7 @@ pMatrix -- | Try to read/parse a Rectangle -readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r)) +readRectangle :: Coordinate r => Text -> Either Text (Rectangle (Point 2 r)) readRectangle :: forall r. Coordinate r => Text -> Either Text (Rectangle (Point 2 r)) @@ -456,7 +456,7 @@ -- * The parsers themselves -- | Parse an operation -pOperation :: forall r. Coordinate r => Parser (Operation r) +pOperation :: forall r. Coordinate r => Parser (Operation r) pOperation :: forall r. Coordinate r => Parser (Operation r) pOperation = [Parser (Operation r)] -> Parser (Operation r) forall a. [Parser a] -> Parser a @@ -471,7 +471,7 @@ -> Char -> ParsecT Text () Identity (Point 2 r) forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'm' , Point 2 r -> Operation r forall r. Point 2 r -> Operation r @@ -484,7 +484,7 @@ -> Char -> ParsecT Text () Identity (Point 2 r) forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'l' , Matrix 3 3 r -> Operation r forall r. Matrix 3 3 r -> Operation r @@ -497,7 +497,7 @@ -> Char -> ParsecT Text () Identity (Matrix 3 3 r) forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'e' , Matrix 3 3 r -> Point 2 r -> Operation r forall r. Matrix 3 3 r -> Point 2 r -> Operation r @@ -514,11 +514,11 @@ -> ParsecT Text () Identity a -> ParsecT Text () Identity b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> ParsecT Text () Identity (Point 2 r) -pPoint' ParsecT Text () Identity (Point 2 r) +pPoint' ParsecT Text () Identity (Point 2 r) -> Char -> ParsecT Text () Identity (Point 2 r) forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'a' , [Point 2 r] -> Operation r forall r. [Point 2 r] -> Operation r @@ -535,7 +535,7 @@ -> Char -> ParsecT Text () Identity [Point 2 r] forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'c' , [Point 2 r] -> Operation r forall r. [Point 2 r] -> Operation r @@ -552,7 +552,7 @@ -> Char -> ParsecT Text () Identity [Point 2 r] forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'u' , Char -> Parser Char pChar Char @@ -576,11 +576,11 @@ -> ParsecT Text () Identity a -> ParsecT Text () Identity b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> ParsecT Text () Identity (Point 2 r) -pPoint' ParsecT Text () Identity (Point 2 r) +pPoint' ParsecT Text () Identity (Point 2 r) -> Char -> ParsecT Text () Identity (Point 2 r) forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'q' , Point 2 r -> Point 2 r -> Point 2 r -> Operation r forall r. Point 2 r -> Point 2 r -> Point 2 r -> Operation r @@ -598,18 +598,18 @@ -> ParsecT Text () Identity a -> ParsecT Text () Identity b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> ParsecT Text () Identity (Point 2 r) -pPoint' ParsecT Text () Identity (Point 2 r -> Operation r) +pPoint' ParsecT Text () Identity (Point 2 r -> Operation r) -> ParsecT Text () Identity (Point 2 r) -> Parser (Operation r) forall a b. ParsecT Text () Identity (a -> b) -> ParsecT Text () Identity a -> ParsecT Text () Identity b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> ParsecT Text () Identity (Point 2 r) -pPoint' ParsecT Text () Identity (Point 2 r) +pPoint' ParsecT Text () Identity (Point 2 r) -> Char -> ParsecT Text () Identity (Point 2 r) forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 'c' , [Point 2 r] -> Operation r forall r. [Point 2 r] -> Operation r @@ -626,12 +626,12 @@ -> Char -> ParsecT Text () Identity [Point 2 r] forall {b}. ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char +*>> Char 's' ] where - pPoint' :: ParsecT Text () Identity (Point 2 r) -pPoint' = Parser String + pPoint' :: ParsecT Text () Identity (Point 2 r) +pPoint' = Parser String pWhiteSpace Parser String -> ParsecT Text () Identity (Point 2 r) -> ParsecT Text () Identity (Point 2 r) @@ -642,11 +642,11 @@ *> ParsecT Text () Identity (Point 2 r) forall r. Coordinate r => Parser (Point 2 r) pPoint - ParsecT Text () Identity b -p *>> :: ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b -*>> Char -c = ParsecT Text () Identity b -p ParsecT Text () Identity b + ParsecT Text () Identity b +p *>> :: ParsecT Text () Identity b -> Char -> ParsecT Text () Identity b +*>> Char +c = ParsecT Text () Identity b +p ParsecT Text () Identity b -> Parser Char -> ParsecT Text () Identity b forall s (m :: * -> *) t u b a. (Stream s m t, Reversable s) => @@ -656,10 +656,10 @@ forall (m :: * -> *) a b. Monad m => m a -> m b -> m b ***> Char -> Parser Char pChar Char -c +c -- * Parse a Point -pPoint :: Coordinate r => Parser (Point 2 r) +pPoint :: Coordinate r => Parser (Point 2 r) pPoint :: forall r. Coordinate r => Parser (Point 2 r) pPoint = r -> r -> Point 2 r forall r. r -> r -> Point 2 r @@ -688,7 +688,7 @@ pCoordinate -- * Parse a single coordinate. -pCoordinate :: Coordinate r => Parser r +pCoordinate :: Coordinate r => Parser r pCoordinate :: forall r. Coordinate r => Parser r pCoordinate = Integer -> Maybe (Int, Integer) -> r forall r. Coordinate r => Integer -> Maybe (Int, Integer) -> r @@ -705,10 +705,10 @@ -> ParsecT Text () Identity a -> ParsecT Text () Identity b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> ParsecT Text () Identity (Maybe (Int, Integer)) -pDecimal +pDecimal where - pDecimal :: ParsecT Text () Identity (Maybe (Int, Integer)) -pDecimal = Parser (Int, Integer) + pDecimal :: ParsecT Text () Identity (Maybe (Int, Integer)) +pDecimal = Parser (Int, Integer) -> ParsecT Text () Identity (Maybe (Int, Integer)) forall a. Parser a -> Parser (Maybe a) pMaybe (Char -> Parser Char @@ -723,7 +723,7 @@ -- | Parser for a rectangle -pRectangle :: Coordinate r => Parser (Rectangle (Point 2 r)) +pRectangle :: Coordinate r => Parser (Rectangle (Point 2 r)) pRectangle :: forall r. Coordinate r => Parser (Rectangle (Point 2 r)) pRectangle = Point 2 r -> Point 2 r -> Box (Point 2 r) forall point. point -> point -> Box point @@ -755,17 +755,17 @@ pPoint -- | Parser for a matrix. -pMatrix :: Coordinate r => Parser (Matrix 3 3 r) +pMatrix :: Coordinate r => Parser (Matrix 3 3 r) pMatrix :: forall r. Coordinate r => Parser (Matrix 3 3 r) -pMatrix = (\r -a [r] -b -> [r] -> Matrix 3 3 r +pMatrix = (\r +a [r] +b -> [r] -> Matrix 3 3 r forall r. Coordinate r => [r] -> Matrix 3 3 r mkMatrix (r -ar -> [r] -> [r] +ar -> [r] -> [r] forall a. a -> [a] -> [a] :[r] -b)) (r -> [r] -> Matrix 3 3 r) +b)) (r -> [r] -> Matrix 3 3 r) -> ParsecT Text () Identity r -> ParsecT Text () Identity ([r] -> Matrix 3 3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -795,15 +795,15 @@ -- | Generate a matrix from a list of 6 coordinates. -mkMatrix :: Coordinate r => [r] -> Matrix 3 3 r +mkMatrix :: Coordinate r => [r] -> Matrix 3 3 r mkMatrix :: forall r. Coordinate r => [r] -> Matrix 3 3 r -mkMatrix [r -a,r -b,r -c,r -d,r -e,r -f] = Vector 3 (Vector 3 r) -> Matrix 3 3 r +mkMatrix [r +a,r +b,r +c,r +d,r +e,r +f] = Vector 3 (Vector 3 r) -> Matrix 3 3 r forall (n :: Nat) (m :: Nat) r. Vector n (Vector m r) -> Matrix n m r Matrix (Vector 3 (Vector 3 r) -> Matrix 3 3 r) @@ -814,15 +814,15 @@ Vector3 (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -a r -c r -e) +a r +c r +e) (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -b r -d r -f) +b r +d r +f) (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r diff --git a/haddocks/hgeometry/ipe/src/Ipe.Reader.html b/haddocks/hgeometry/ipe/src/Ipe.Reader.html index 3da8903ad..61d2b0424 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.Reader.html +++ b/haddocks/hgeometry/ipe/src/Ipe.Reader.html @@ -79,8 +79,8 @@ -- | Given a file path, tries to read an ipe file -readRawIpeFile :: (Coordinate r, Eq r) - => OsPath -> IO (Either ConversionError (IpeFile r)) +readRawIpeFile :: (Coordinate r, Eq r) + => OsPath -> IO (Either ConversionError (IpeFile r)) readRawIpeFile :: forall r. (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) @@ -104,8 +104,8 @@ -- | Given a file path, tries to read an ipe file. -- -- This function applies all matrices to objects. -readIpeFile :: (Coordinate r, Eq r) - => OsPath -> IO (Either ConversionError (IpeFile r)) +readIpeFile :: (Coordinate r, Eq r) + => OsPath -> IO (Either ConversionError (IpeFile r)) readIpeFile :: forall r. (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpeFile r)) @@ -143,8 +143,8 @@ -- This function applies all matrices, and it makes sure there is at -- least one layer and view in the page. -- -readSinglePageFile :: (Coordinate r, Eq r) - => OsPath -> IO (Either ConversionError (IpePage r)) +readSinglePageFile :: (Coordinate r, Eq r) + => OsPath -> IO (Either ConversionError (IpePage r)) readSinglePageFile :: forall r. (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r)) @@ -162,7 +162,7 @@ forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap IpeFile r -> IpePage r forall r. IpeFile r -> IpePage r -f) (IO (Either ConversionError (IpeFile r)) +f) (IO (Either ConversionError (IpeFile r)) -> IO (Either ConversionError (IpePage r))) -> (OsPath -> IO (Either ConversionError (IpeFile r))) -> OsPath @@ -174,10 +174,10 @@ OsPath -> IO (Either ConversionError (IpeFile r)) readIpeFile where - f :: IpeFile r -> IpePage r - f :: forall r. IpeFile r -> IpePage r -f IpeFile r -i = IpePage r -> IpePage r + f :: IpeFile r -> IpePage r + f :: forall r. IpeFile r -> IpePage r +f IpeFile r +i = IpePage r -> IpePage r forall r. IpePage r -> IpePage r withDefaults (IpePage r -> IpePage r) -> (NonEmpty (IpePage r) -> IpePage r) @@ -190,7 +190,7 @@ -> NonEmpty (IpePage r) -> IpePage r forall a b. (a -> b) -> a -> b $ IpeFile r -iIpeFile r +iIpeFile r -> Getting (NonEmpty (IpePage r)) (IpeFile r) (NonEmpty (IpePage r)) -> NonEmpty (IpePage r) @@ -204,46 +204,46 @@ -- | Tries to read a single page file, throws an error when this -- fails. See 'readSinglePageFile' for further details. -readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r) +readSinglePageFileThrow :: (Coordinate r, Eq r) => OsPath -> IO (IpePage r) readSinglePageFileThrow :: forall r. (Coordinate r, Eq r) => OsPath -> IO (IpePage r) -readSinglePageFileThrow OsPath -fp = OsPath -> IO (Either ConversionError (IpePage r)) +readSinglePageFileThrow OsPath +fp = OsPath -> IO (Either ConversionError (IpePage r)) forall r. (Coordinate r, Eq r) => OsPath -> IO (Either ConversionError (IpePage r)) readSinglePageFile OsPath -fp IO (Either ConversionError (IpePage r)) +fp IO (Either ConversionError (IpePage r)) -> (Either ConversionError (IpePage r) -> IO (IpePage r)) -> IO (IpePage r) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Left ConversionError -err -> String -> IO (IpePage r) + Left ConversionError +err -> String -> IO (IpePage r) forall a. String -> IO a forall (m :: * -> *) a. MonadFail m => String -> m a fail (ConversionError -> String forall a. Show a => a -> String show ConversionError -err) - Right IpePage r -p -> IpePage r -> IO (IpePage r) +err) + Right IpePage r +p -> IpePage r -> IO (IpePage r) forall a. a -> IO a forall (f :: * -> *) a. Applicative f => a -> f a pure IpePage r -p +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) +fromIpeXML :: IpeRead (t r) => B.ByteString -> Either ConversionError (t r) fromIpeXML :: forall {k} (t :: k -> *) (r :: k). IpeRead (t r) => ByteString -> Either ConversionError (t r) -fromIpeXML ByteString -b = ByteString +fromIpeXML ByteString +b = ByteString -> Either ConversionError (Node ConversionError ConversionError) readXML ByteString -b Either ConversionError (Node ConversionError ConversionError) +b Either ConversionError (Node ConversionError ConversionError) -> (Node ConversionError ConversionError -> Either ConversionError (t r)) -> Either ConversionError (t r) @@ -296,24 +296,24 @@ -------------------------------------------------------------------------------- -- | Reading an ipe elemtn from a Text value -class IpeReadText t where - ipeReadText :: Text -> Either ConversionError t +class IpeReadText t where + ipeReadText :: Text -> Either ConversionError t -- | Reading an ipe lement from Xml -class IpeRead t where - ipeRead :: Node Text Text -> Either ConversionError t +class IpeRead t where + ipeRead :: Node Text Text -> Either ConversionError t -------------------------------------------------------------------------------- -- ReadText instances instance IpeReadText Text where - ipeReadText :: ConversionError -> Either ConversionError ConversionError + ipeReadText :: ConversionError -> Either ConversionError ConversionError ipeReadText = ConversionError -> Either ConversionError ConversionError forall a b. b -> Either a b Right instance IpeReadText Int where - ipeReadText :: ConversionError -> Either ConversionError Int + ipeReadText :: ConversionError -> Either ConversionError Int ipeReadText = (Integer -> Int) -> Either ConversionError Integer -> Either ConversionError Int forall a b. @@ -331,16 +331,16 @@ runParser Parser Integer pInteger -instance Coordinate r => IpeReadText (Point 2 r) where - ipeReadText :: ConversionError -> Either ConversionError (Point 2 r) +instance Coordinate r => IpeReadText (Point 2 r) where + ipeReadText :: ConversionError -> Either ConversionError (Point 2 r) ipeReadText = ConversionError -> Either ConversionError (Point 2 r) forall r. Coordinate r => ConversionError -> Either ConversionError (Point 2 r) readPoint -instance Coordinate r => IpeReadText (Matrix.Matrix 3 3 r) where - ipeReadText :: ConversionError -> Either ConversionError (Matrix 3 3 r) +instance Coordinate r => IpeReadText (Matrix.Matrix 3 3 r) where + ipeReadText :: ConversionError -> Either ConversionError (Matrix 3 3 r) ipeReadText = ConversionError -> Either ConversionError (Matrix 3 3 r) forall r. Coordinate r => @@ -348,7 +348,7 @@ readMatrix instance IpeReadText LayerName where - ipeReadText :: ConversionError -> Either ConversionError LayerName + ipeReadText :: ConversionError -> Either ConversionError LayerName ipeReadText = LayerName -> Either ConversionError LayerName forall a b. b -> Either a b Right (LayerName -> Either ConversionError LayerName) @@ -360,7 +360,7 @@ LayerName instance IpeReadText PinType where - ipeReadText :: ConversionError -> Either ConversionError PinType + ipeReadText :: ConversionError -> Either ConversionError PinType ipeReadText ConversionError "yes" = PinType -> Either ConversionError PinType forall a b. b -> Either a b @@ -388,7 +388,7 @@ "invalid PinType" instance IpeReadText TransformationTypes where - ipeReadText :: ConversionError -> Either ConversionError TransformationTypes + ipeReadText :: ConversionError -> Either ConversionError TransformationTypes ipeReadText ConversionError "affine" = TransformationTypes -> Either ConversionError TransformationTypes forall a b. b -> Either a b @@ -411,7 +411,7 @@ "invalid TransformationType" instance IpeReadText FillType where - ipeReadText :: ConversionError -> Either ConversionError FillType + ipeReadText :: ConversionError -> Either ConversionError FillType ipeReadText ConversionError "wind" = FillType -> Either ConversionError FillType forall a b. b -> Either a b @@ -428,18 +428,18 @@ Left ConversionError "invalid FillType" -instance Coordinate r => IpeReadText (IpeArrow r) where - ipeReadText :: ConversionError -> Either ConversionError (IpeArrow r) -ipeReadText ConversionError -t = case (Char -> Bool) -> ConversionError -> [ConversionError] +instance Coordinate r => IpeReadText (IpeArrow r) where + ipeReadText :: ConversionError -> Either ConversionError (IpeArrow r) +ipeReadText ConversionError +t = case (Char -> Bool) -> ConversionError -> [ConversionError] T.split (Char -> Char -> Bool forall a. Eq a => a -> a -> Bool == Char '/') ConversionError -t of - [ConversionError -n,ConversionError -s] -> ConversionError -> IpeSize r -> IpeArrow r +t of + [ConversionError +n,ConversionError +s] -> ConversionError -> IpeSize r -> IpeArrow r forall r. ConversionError -> IpeSize r -> IpeArrow r IpeArrow (ConversionError -> IpeSize r -> IpeArrow r) -> Either ConversionError ConversionError @@ -449,7 +449,7 @@ forall a. a -> Either ConversionError a forall (f :: * -> *) a. Applicative f => a -> f a pure ConversionError -n Either ConversionError (IpeSize r -> IpeArrow r) +n Either ConversionError (IpeSize r -> IpeArrow r) -> Either ConversionError (IpeSize r) -> Either ConversionError (IpeArrow r) forall a b. @@ -461,17 +461,17 @@ IpeReadText t => ConversionError -> Either ConversionError t ipeReadText ConversionError -s +s [ConversionError] _ -> ConversionError -> Either ConversionError (IpeArrow r) forall a b. a -> Either a b Left ConversionError "ipeArrow: name contains not exactly 1 / " -instance Coordinate r => IpeReadText (IpeDash r) where - ipeReadText :: ConversionError -> Either ConversionError (IpeDash r) -ipeReadText ConversionError -t = IpeDash r -> Either ConversionError (IpeDash r) +instance Coordinate r => IpeReadText (IpeDash r) where + ipeReadText :: ConversionError -> Either ConversionError (IpeDash r) +ipeReadText ConversionError +t = IpeDash r -> Either ConversionError (IpeDash r) forall a b. b -> Either a b Right (IpeDash r -> Either ConversionError (IpeDash r)) -> (ConversionError -> IpeDash r) @@ -484,12 +484,12 @@ -> ConversionError -> Either ConversionError (IpeDash r) forall a b. (a -> b) -> a -> b $ ConversionError -t +t -- TODO: Implement proper parsing here instance IpeReadText HorizontalAlignment where - ipeReadText :: ConversionError -> Either ConversionError HorizontalAlignment + ipeReadText :: ConversionError -> Either ConversionError HorizontalAlignment ipeReadText = \case ConversionError "left" -> HorizontalAlignment -> Either ConversionError HorizontalAlignment @@ -513,7 +513,7 @@ "invalid HorizontalAlignment" instance IpeReadText VerticalAlignment where - ipeReadText :: ConversionError -> Either ConversionError VerticalAlignment + ipeReadText :: ConversionError -> Either ConversionError VerticalAlignment ipeReadText = \case ConversionError "top" -> VerticalAlignment -> Either ConversionError VerticalAlignment @@ -542,68 +542,68 @@ "invalid VerticalAlignment" -ipeReadTextWith :: (Text -> Either t v) -> Text -> Either ConversionError (IpeValue v) +ipeReadTextWith :: (Text -> Either t v) -> Text -> Either ConversionError (IpeValue v) ipeReadTextWith :: forall t v. (ConversionError -> Either t v) -> ConversionError -> Either ConversionError (IpeValue v) -ipeReadTextWith ConversionError -> Either t v -f ConversionError -t = case ConversionError -> Either t v -f ConversionError -t of - Right v -v -> IpeValue v -> Either ConversionError (IpeValue v) +ipeReadTextWith ConversionError -> Either t v +f ConversionError +t = case ConversionError -> Either t v +f ConversionError +t of + Right v +v -> IpeValue v -> Either ConversionError (IpeValue v) forall a b. b -> Either a b Right (v -> IpeValue v forall v. v -> IpeValue v Valued v -v) +v) Left t _ -> IpeValue v -> Either ConversionError (IpeValue v) forall a b. b -> Either a b Right (ConversionError -> IpeValue v forall v. ConversionError -> IpeValue v Named ConversionError -t) +t) -instance Coordinate r => IpeReadText (Rectangle (Point 2 r)) where - ipeReadText :: ConversionError -> Either ConversionError (Rectangle (Point 2 r)) +instance Coordinate r => IpeReadText (Rectangle (Point 2 r)) where + ipeReadText :: ConversionError -> Either ConversionError (Rectangle (Point 2 r)) ipeReadText = ConversionError -> Either ConversionError (Rectangle (Point 2 r)) forall r. Coordinate r => ConversionError -> Either ConversionError (Rectangle (Point 2 r)) readRectangle -instance Coordinate r => IpeReadText (RGB r) where - ipeReadText :: ConversionError -> Either ConversionError (RGB r) +instance Coordinate r => IpeReadText (RGB r) where + ipeReadText :: ConversionError -> Either ConversionError (RGB r) ipeReadText = Parser (RGB r) -> ConversionError -> Either ConversionError (RGB r) forall a. Parser a -> ConversionError -> Either ConversionError a runParser (Parser (RGB r) -pRGB Parser (RGB r) -> Parser (RGB r) -> Parser (RGB r) +pRGB Parser (RGB r) -> Parser (RGB r) -> Parser (RGB r) forall a. ParsecT ConversionError () Identity a -> ParsecT ConversionError () Identity a -> ParsecT ConversionError () Identity a forall (f :: * -> *) a. Alternative f => f a -> f a -> f a <|> Parser (RGB r) -pGrey) +pGrey) where - pGrey :: Parser (RGB r) -pGrey = (\r -c -> r -> r -> r -> RGB r + pGrey :: Parser (RGB r) +pGrey = (\r +c -> r -> r -> r -> RGB r forall a. a -> a -> a -> RGB a RGB r -c r -c r -c) (r -> RGB r) +c r +c r +c) (r -> RGB r) -> ParsecT ConversionError () Identity r -> Parser (RGB r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> ParsecT ConversionError () Identity r forall r. Coordinate r => Parser r pCoordinate - pRGB :: Parser (RGB r) -pRGB = r -> r -> r -> RGB r + pRGB :: Parser (RGB r) +pRGB = r -> r -> r -> RGB r forall a. a -> a -> a -> RGB a RGB (r -> r -> r -> RGB r) -> ParsecT ConversionError () Identity r @@ -652,8 +652,8 @@ forall r. Coordinate r => Parser r pCoordinate -instance Coordinate r => IpeReadText (IpeColor r) where - ipeReadText :: ConversionError -> Either ConversionError (IpeColor r) +instance Coordinate r => IpeReadText (IpeColor r) where + ipeReadText :: ConversionError -> Either ConversionError (IpeColor r) ipeReadText = (IpeValue (RGB r) -> IpeColor r) -> Either ConversionError (IpeValue (RGB r)) -> Either ConversionError (IpeColor r) @@ -679,8 +679,8 @@ ConversionError -> Either ConversionError t ipeReadText -instance Coordinate r => IpeReadText (IpePen r) where - ipeReadText :: ConversionError -> Either ConversionError (IpePen r) +instance Coordinate r => IpeReadText (IpePen r) where + ipeReadText :: ConversionError -> Either ConversionError (IpePen r) ipeReadText = (IpeValue r -> IpePen r) -> Either ConversionError (IpeValue r) -> Either ConversionError (IpePen r) @@ -706,8 +706,8 @@ ConversionError -> Either ConversionError r readCoordinate -instance Coordinate r => IpeReadText (IpeSize r) where - ipeReadText :: ConversionError -> Either ConversionError (IpeSize r) +instance Coordinate r => IpeReadText (IpeSize r) where + ipeReadText :: ConversionError -> Either ConversionError (IpeSize r) ipeReadText = (IpeValue r -> IpeSize r) -> Either ConversionError (IpeValue r) -> Either ConversionError (IpeSize r) @@ -734,24 +734,24 @@ readCoordinate -instance Coordinate r => IpeReadText [Operation r] where - ipeReadText :: ConversionError -> Either ConversionError [Operation r] +instance Coordinate r => IpeReadText [Operation r] where + ipeReadText :: ConversionError -> Either ConversionError [Operation r] ipeReadText = ConversionError -> Either ConversionError [Operation r] forall r. Coordinate r => ConversionError -> Either ConversionError [Operation r] readPathOperations -instance (Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty.NonEmpty (PathSegment r)) where - ipeReadText :: ConversionError +instance (Coordinate r, Fractional r, Eq r) => IpeReadText (NonEmpty.NonEmpty (PathSegment r)) where + ipeReadText :: ConversionError -> Either ConversionError (NonEmpty (PathSegment r)) -ipeReadText ConversionError -t = ConversionError -> Either ConversionError [Operation r] +ipeReadText ConversionError +t = ConversionError -> Either ConversionError [Operation r] forall t. IpeReadText t => ConversionError -> Either ConversionError t ipeReadText ConversionError -t Either ConversionError [Operation r] +t Either ConversionError [Operation r] -> ([Operation r] -> Either ConversionError (NonEmpty (PathSegment r))) -> Either ConversionError (NonEmpty (PathSegment r)) @@ -763,44 +763,44 @@ forall {a} {r}. (IsString a, Eq r, Fractional r) => [Operation r] -> Either a (NonEmpty (PathSegment r)) -fromOpsN +fromOpsN where - fromOpsN :: [Operation r] -> Either a (NonEmpty (PathSegment r)) -fromOpsN [Operation r] -xs = case [Operation r] -> Either a [PathSegment r] + fromOpsN :: [Operation r] -> Either a (NonEmpty (PathSegment r)) +fromOpsN [Operation r] +xs = case [Operation r] -> Either a [PathSegment r] forall {a} {r}. (IsString a, Eq r, Fractional r) => [Operation r] -> Either a [PathSegment r] -fromOps [Operation r] -xs of - Left a -l -> a -> Either a (NonEmpty (PathSegment r)) +fromOps [Operation r] +xs of + Left a +l -> a -> Either a (NonEmpty (PathSegment r)) forall a b. a -> Either a b Left a -l +l Right [] -> a -> Either a (NonEmpty (PathSegment r)) forall a b. a -> Either a b Left a "No path segments produced" - Right (PathSegment r -p:[PathSegment r] -ps) -> NonEmpty (PathSegment r) -> Either a (NonEmpty (PathSegment r)) + Right (PathSegment r +p:[PathSegment r] +ps) -> NonEmpty (PathSegment r) -> Either a (NonEmpty (PathSegment r)) forall a b. b -> Either a b Right (NonEmpty (PathSegment r) -> Either a (NonEmpty (PathSegment r))) -> NonEmpty (PathSegment r) -> Either a (NonEmpty (PathSegment r)) forall a b. (a -> b) -> a -> b $ PathSegment r -p PathSegment r -> [PathSegment r] -> NonEmpty (PathSegment r) +p PathSegment r -> [PathSegment r] -> NonEmpty (PathSegment r) forall a. a -> [a] -> NonEmpty a NonEmpty.:| [PathSegment r] -ps +ps - fromOps :: [Operation r] -> Either a [PathSegment r] -fromOps [] = [PathSegment r] -> Either a [PathSegment r] + fromOps :: [Operation r] -> Either a [PathSegment r] +fromOps [] = [PathSegment r] -> Either a [PathSegment r] forall a b. b -> Either a b Right [] - fromOps [Ellipse Matrix 3 3 r -m] = [PathSegment r] -> Either a [PathSegment r] + fromOps [Ellipse Matrix 3 3 r +m] = [PathSegment r] -> Either a [PathSegment r] forall a b. b -> Either a b Right [Ellipse r -> PathSegment r forall r. Ellipse r -> PathSegment r @@ -821,45 +821,45 @@ ellipseMatrix) (Matrix 3 3 r -> PathSegment r) -> Matrix 3 3 r -> PathSegment r forall a b. (a -> b) -> a -> b $ Matrix 3 3 r -m] - fromOps (MoveTo Point 2 r -p:[Operation r] -xs) = Point 2 r -> [Operation r] -> Either a [PathSegment r] -fromOps' Point 2 r -p [Operation r] -xs - fromOps [Operation r] +m] + fromOps (MoveTo Point 2 r +p:[Operation r] +xs) = Point 2 r -> [Operation r] -> Either a [PathSegment r] +fromOps' Point 2 r +p [Operation r] +xs + fromOps [Operation r] _ = a -> Either a [PathSegment r] forall a b. a -> Either a b Left a "Path should start with a move to" - fromOps' :: Point 2 r -> [Operation r] -> Either a [PathSegment r] -fromOps' Point 2 r + fromOps' :: Point 2 r -> [Operation r] -> Either a [PathSegment r] +fromOps' Point 2 r _ [] = a -> Either a [PathSegment r] forall a b. a -> Either a b Left a "Found only a MoveTo operation" - fromOps' Point 2 r -s (LineTo Point 2 r -q:[Operation r] -ops) = let ([Operation r] -ls,[Operation r] -xs) = APrism (Operation r) (Operation r) (Point 2 r) (Point 2 r) + fromOps' Point 2 r +s (LineTo Point 2 r +q:[Operation r] +ops) = let ([Operation r] +ls,[Operation r] +xs) = APrism (Operation r) (Operation r) (Point 2 r) (Point 2 r) -> [Operation r] -> ([Operation r], [Operation r]) forall {a} {t} {a} {b}. APrism a t a b -> [a] -> ([a], [a]) -span' APrism (Operation r) (Operation r) (Point 2 r) (Point 2 r) +span' APrism (Operation r) (Operation r) (Point 2 r) (Point 2 r) forall r (p :: * -> * -> *) (f :: * -> *). (Choice p, Applicative f) => p (Point 2 r) (f (Point 2 r)) -> p (Operation r) (f (Operation r)) _LineTo [Operation r] -ops - pts :: NonEmpty (Point 2 r) -pts = Point 2 r -s Point 2 r -> [Point 2 r] -> NonEmpty (Point 2 r) +ops + pts :: NonEmpty (Point 2 r) +pts = Point 2 r +s Point 2 r -> [Point 2 r] -> NonEmpty (Point 2 r) forall a. a -> [a] -> NonEmpty a NonEmpty.:| Point 2 r -qPoint 2 r -> [Point 2 r] -> [Point 2 r] +qPoint 2 r -> [Point 2 r] -> [Point 2 r] forall a. a -> [a] -> [a] :(Operation r -> Maybe (Point 2 r)) -> [Operation r] -> [Point 2 r] forall a b. (a -> Maybe b) -> [a] -> [b] @@ -872,9 +872,9 @@ (Choice p, Applicative f) => p (Point 2 r) (f (Point 2 r)) -> p (Operation r) (f (Operation r)) _LineTo) [Operation r] -ls - mPoly :: Maybe (SimplePolygon (Point 2 r)) -mPoly = NonEmpty (Point 2 r) -> Maybe (SimplePolygon (Point 2 r)) +ls + mPoly :: Maybe (SimplePolygon (Point 2 r)) +mPoly = NonEmpty (Point 2 r) -> Maybe (SimplePolygon (Point 2 r)) forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f, ConstructableSimplePolygon simplePolygon point r) => @@ -895,9 +895,9 @@ -> NonEmpty (Point 2 r) -> Maybe (SimplePolygon (Point 2 r)) forall a b. (a -> b) -> a -> b $ NonEmpty (Point 2 r) -pts - pl :: PolyLine (Point 2 r) -pl = NonEmpty (Point 2 r) -> PolyLine (Point 2 r) +pts + pl :: PolyLine (Point 2 r) +pl = NonEmpty (Point 2 r) -> PolyLine (Point 2 r) forall polyLine point (f :: * -> *). (ConstructablePolyLine_ polyLine point, Foldable1 f) => f point -> polyLine @@ -905,37 +905,37 @@ Foldable1 f => f (Point 2 r) -> PolyLine (Point 2 r) polyLineFromPoints NonEmpty (Point 2 r) -pts +pts in case [Operation r] -xs of +xs of (Operation r -ClosePath : [Operation r] -xs') -> case Maybe (SimplePolygon (Point 2 r)) -mPoly of +ClosePath : [Operation r] +xs') -> case Maybe (SimplePolygon (Point 2 r)) +mPoly of Maybe (SimplePolygon (Point 2 r)) Nothing -> a -> Either a [PathSegment r] forall a b. a -> Either a b Left a "simple polygon failed" - Just SimplePolygon (Point 2 r) -poly -> SimplePolygon (Point 2 r) -> PathSegment r + Just SimplePolygon (Point 2 r) +poly -> SimplePolygon (Point 2 r) -> PathSegment r forall r. SimplePolygon (Point 2 r) -> PathSegment r PolygonPath SimplePolygon (Point 2 r) -poly PathSegment r -> [Operation r] -> Either a [PathSegment r] -<<| [Operation r] -xs' +poly PathSegment r -> [Operation r] -> Either a [PathSegment r] +<<| [Operation r] +xs' [Operation r] _ -> PolyLine (Point 2 r) -> PathSegment r forall r. PolyLine (Point 2 r) -> PathSegment r PolyLineSegment PolyLine (Point 2 r) -pl PathSegment r -> [Operation r] -> Either a [PathSegment r] -<<| [Operation r] -xs +pl PathSegment r -> [Operation r] -> Either a [PathSegment r] +<<| [Operation r] +xs - fromOps' Point 2 r -s [Spline [Point 2 r -a, Point 2 r -b]] = [PathSegment r] -> Either a [PathSegment r] + fromOps' Point 2 r +s [Spline [Point 2 r +a, Point 2 r +b]] = [PathSegment r] -> Either a [PathSegment r] forall a b. b -> Either a b Right [QuadraticBezier (Point 2 r) -> PathSegment r forall r. QuadraticBezier (Point 2 r) -> PathSegment r @@ -945,14 +945,14 @@ $ Point 2 r -> Point 2 r -> Point 2 r -> QuadraticBezier (Point 2 r) forall point. point -> point -> point -> QuadraticBezier point Bezier2 Point 2 r -s Point 2 r -a Point 2 r -b] - fromOps' Point 2 r -s [Spline [Point 2 r -a, Point 2 r -b, Point 2 r -c]] = [PathSegment r] -> Either a [PathSegment r] +s Point 2 r +a Point 2 r +b] + fromOps' Point 2 r +s [Spline [Point 2 r +a, Point 2 r +b, Point 2 r +c]] = [PathSegment r] -> Either a [PathSegment r] forall a b. b -> Either a b Right [CubicBezier (Point 2 r) -> PathSegment r forall r. CubicBezier (Point 2 r) -> PathSegment r @@ -963,13 +963,13 @@ -> Point 2 r -> Point 2 r -> Point 2 r -> CubicBezier (Point 2 r) forall point. point -> point -> point -> point -> CubicBezier point Bezier3 Point 2 r -s Point 2 r -a Point 2 r -b Point 2 r -c] - fromOps' Point 2 r -s [Spline [Point 2 r] -ps] = [PathSegment r] -> Either a [PathSegment r] +s Point 2 r +a Point 2 r +b Point 2 r +c] + fromOps' Point 2 r +s [Spline [Point 2 r] +ps] = [PathSegment r] -> Either a [PathSegment r] forall a b. b -> Either a b Right ([PathSegment r] -> Either a [PathSegment r]) -> [PathSegment r] -> Either a [PathSegment r] @@ -988,15 +988,15 @@ -> [Point 2 r] -> [CubicBezier (Point 2 r)] forall a b. (a -> b) -> a -> b $ Point 2 r -s Point 2 r -> [Point 2 r] -> [Point 2 r] +s Point 2 r -> [Point 2 r] -> [Point 2 r] forall a. a -> [a] -> [a] : [Point 2 r] -ps +ps -- these will not occur anymore with recent ipe files - fromOps' Point 2 r -s [QCurveTo Point 2 r -a Point 2 r -b] = [PathSegment r] -> Either a [PathSegment r] + fromOps' Point 2 r +s [QCurveTo Point 2 r +a Point 2 r +b] = [PathSegment r] -> Either a [PathSegment r] forall a b. b -> Either a b Right [QuadraticBezier (Point 2 r) -> PathSegment r forall r. QuadraticBezier (Point 2 r) -> PathSegment r @@ -1006,14 +1006,14 @@ $ Point 2 r -> Point 2 r -> Point 2 r -> QuadraticBezier (Point 2 r) forall point. point -> point -> point -> QuadraticBezier point Bezier2 Point 2 r -s Point 2 r -a Point 2 r -b] - fromOps' Point 2 r -s [CurveTo Point 2 r -a Point 2 r -b Point 2 r -c] = [PathSegment r] -> Either a [PathSegment r] +s Point 2 r +a Point 2 r +b] + fromOps' Point 2 r +s [CurveTo Point 2 r +a Point 2 r +b Point 2 r +c] = [PathSegment r] -> Either a [PathSegment r] forall a b. b -> Either a b Right [CubicBezier (Point 2 r) -> PathSegment r forall r. CubicBezier (Point 2 r) -> PathSegment r @@ -1024,20 +1024,20 @@ -> Point 2 r -> Point 2 r -> Point 2 r -> CubicBezier (Point 2 r) forall point. point -> point -> point -> point -> CubicBezier point Bezier3 Point 2 r -s Point 2 r -a Point 2 r -b Point 2 r -c] - fromOps' Point 2 r +s Point 2 r +a Point 2 r +b Point 2 r +c] + fromOps' Point 2 r _ [Operation r] _ = a -> Either a [PathSegment r] forall a b. a -> Either a b Left a "fromOpts': rest not implemented yet." - span' :: APrism a t a b -> [a] -> ([a], [a]) -span' APrism a t a b -pr = (a -> Bool) -> [a] -> ([a], [a]) + span' :: APrism a t a b -> [a] -> ([a], [a]) +span' APrism a t a b +pr = (a -> Bool) -> [a] -> ([a], [a]) forall a. (a -> Bool) -> [a] -> ([a], [a]) L.span (Bool -> Bool not (Bool -> Bool) -> (a -> Bool) -> a -> Bool @@ -1045,91 +1045,91 @@ . APrism a t a b -> a -> Bool forall s t a b. APrism s t a b -> s -> Bool isn't APrism a t a b -pr) +pr) - PathSegment r -x <<| :: PathSegment r -> [Operation r] -> Either a [PathSegment r] -<<| [Operation r] -xs = (PathSegment r -x:) ([PathSegment r] -> [PathSegment r]) + PathSegment r +x <<| :: PathSegment r -> [Operation r] -> Either a [PathSegment r] +<<| [Operation r] +xs = (PathSegment r +x:) ([PathSegment r] -> [PathSegment r]) -> Either a [PathSegment r] -> Either a [PathSegment r] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> [Operation r] -> Either a [PathSegment r] -fromOps [Operation r] -xs +fromOps [Operation r] +xs -- | Read a list of control points of a uniform cubic B-spline and conver it -- to cubic Bezier pieces -splineToCubicBeziers :: Fractional r => [Point 2 r] -> [CubicBezier (Point 2 r)] +splineToCubicBeziers :: Fractional r => [Point 2 r] -> [CubicBezier (Point 2 r)] splineToCubicBeziers :: forall r. Fractional r => [Point 2 r] -> [CubicBezier (Point 2 r)] -splineToCubicBeziers [Point 2 r -a, Point 2 r -b, Point 2 r -c, Point 2 r -d] = [Point 2 r +splineToCubicBeziers [Point 2 r +a, Point 2 r +b, Point 2 r +c, Point 2 r +d] = [Point 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> CubicBezier (Point 2 r) forall point. point -> point -> point -> point -> CubicBezier point Bezier3 Point 2 r -a Point 2 r -b Point 2 r -c Point 2 r -d] -splineToCubicBeziers (Point 2 r -a : Point 2 r -b : Point 2 r -c : Point 2 r -d : [Point 2 r] -rest) = - let p :: Point 2 r -p = Point 2 r -b Point 2 r -> Vector 2 r -> Point 2 r +a Point 2 r +b Point 2 r +c Point 2 r +d] +splineToCubicBeziers (Point 2 r +a : Point 2 r +b : Point 2 r +c : Point 2 r +d : [Point 2 r] +rest) = + let p :: Point 2 r +p = Point 2 r +b Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ ((Point 2 r -c Point 2 r -> Point 2 r -> Vector 2 r +c Point 2 r -> Point 2 r -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point 2 r -b) Vector 2 r -> r -> Vector 2 r +b) Vector 2 r -> r -> Vector 2 r forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector ^/ r 2) - q :: Point 2 r -q = Point 2 r -c Point 2 r -> Vector 2 r -> Point 2 r + q :: Point 2 r +q = Point 2 r +c Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ ((Point 2 r -d Point 2 r -> Point 2 r -> Vector 2 r +d Point 2 r -> Point 2 r -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point 2 r -c) Vector 2 r -> r -> Vector 2 r +c) Vector 2 r -> r -> Vector 2 r forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector ^/ r 3) - r :: Point 2 r -r = Point 2 r -p Point 2 r -> Vector 2 r -> Point 2 r + r :: Point 2 r +r = Point 2 r +p Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ ((Point 2 r -q Point 2 r -> Point 2 r -> Vector 2 r +q Point 2 r -> Point 2 r -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point 2 r -p) Vector 2 r -> r -> Vector 2 r +p) Vector 2 r -> r -> Vector 2 r forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector @@ -1139,25 +1139,25 @@ -> Point 2 r -> Point 2 r -> Point 2 r -> CubicBezier (Point 2 r) forall point. point -> point -> point -> point -> CubicBezier point Bezier3 Point 2 r -a Point 2 r -b Point 2 r -p Point 2 r -r) CubicBezier (Point 2 r) +a Point 2 r +b Point 2 r +p Point 2 r +r) CubicBezier (Point 2 r) -> [CubicBezier (Point 2 r)] -> [CubicBezier (Point 2 r)] forall a. a -> [a] -> [a] : [Point 2 r] -> [CubicBezier (Point 2 r)] forall r. Fractional r => [Point 2 r] -> [CubicBezier (Point 2 r)] splineToCubicBeziers (Point 2 r -r Point 2 r -> [Point 2 r] -> [Point 2 r] +r Point 2 r -> [Point 2 r] -> [Point 2 r] forall a. a -> [a] -> [a] : Point 2 r -q Point 2 r -> [Point 2 r] -> [Point 2 r] +q Point 2 r -> [Point 2 r] -> [Point 2 r] forall a. a -> [a] -> [a] : Point 2 r -d Point 2 r -> [Point 2 r] -> [Point 2 r] +d Point 2 r -> [Point 2 r] -> [Point 2 r] forall a. a -> [a] -> [a] : [Point 2 r] -rest) +rest) splineToCubicBeziers [Point 2 r] _ = String -> [CubicBezier (Point 2 r)] forall a. HasCallStack => String -> a @@ -1165,7 +1165,7 @@ "splineToCubicBeziers needs at least four points" -dropRepeats :: Eq a => NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a +dropRepeats :: Eq a => NonEmpty.NonEmpty a -> NonEmpty.NonEmpty a dropRepeats :: forall a. Eq a => NonEmpty a -> NonEmpty a dropRepeats = (NonEmpty a -> a) -> NonEmpty (NonEmpty a) -> NonEmpty a forall a b. (a -> b) -> NonEmpty a -> NonEmpty b @@ -1181,8 +1181,8 @@ forall a. Eq a => NonEmpty a -> NonEmpty (NonEmpty a) NonEmpty.group1 -instance (Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) where - ipeReadText :: ConversionError -> Either ConversionError (Path r) +instance (Coordinate r, Fractional r, Eq r) => IpeReadText (Path r) where + ipeReadText :: ConversionError -> Either ConversionError (Path r) ipeReadText = (NonEmpty (PathSegment r) -> Path r) -> Either ConversionError (NonEmpty (PathSegment r)) -> Either ConversionError (Path r) @@ -1198,7 +1198,7 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . NonEmpty (PathSegment r) -> Seq (PathSegment r) forall a. NonEmpty a -> Seq a -fromNonEmpty') (Either ConversionError (NonEmpty (PathSegment r)) +fromNonEmpty') (Either ConversionError (NonEmpty (PathSegment r)) -> Either ConversionError (Path r)) -> (ConversionError -> Either ConversionError (NonEmpty (PathSegment r))) @@ -1212,9 +1212,9 @@ ConversionError -> Either ConversionError t ipeReadText where - fromNonEmpty' :: NonEmpty.NonEmpty a -> Seq.Seq a - fromNonEmpty' :: forall a. NonEmpty a -> Seq a -fromNonEmpty' = NonEmpty a -> Seq a + fromNonEmpty' :: NonEmpty.NonEmpty a -> Seq.Seq a + fromNonEmpty' :: forall a. NonEmpty a -> Seq a +fromNonEmpty' = NonEmpty a -> Seq a forall (f :: * -> *) (g :: * -> *) a. (HasFromFoldable f, Foldable g) => g a -> f a @@ -1230,17 +1230,17 @@ -- name of the attribute, and calling the right ipeReadText value. This class -- is just so that reifyConstraint in `ipeReadRec` can select the right -- typeclass when building the rec. -class IpeReadAttr t where - ipeReadAttr :: Text -> Node Text Text -> Either ConversionError t +class IpeReadAttr t where + ipeReadAttr :: Text -> Node Text Text -> Either ConversionError t -instance IpeReadText (Apply f at) => IpeReadAttr (Attr f at) where - ipeReadAttr :: ConversionError +instance IpeReadText (Apply f at) => IpeReadAttr (Attr f at) where + ipeReadAttr :: ConversionError -> Node ConversionError ConversionError -> Either ConversionError (Attr f at) -ipeReadAttr ConversionError -n (Element ConversionError -_ [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] +ipeReadAttr ConversionError +n (Element ConversionError +_ [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] _) = Maybe (Apply f at) -> Attr f at forall u (f :: TyFun u (*) -> *) (label :: u). Maybe (Apply f label) -> Attr f label @@ -1265,8 +1265,8 @@ -> [(ConversionError, ConversionError)] -> Maybe ConversionError forall a b. Eq a => a -> [(a, b)] -> Maybe b lookup ConversionError -n [(ConversionError, ConversionError)] -ats) +n [(ConversionError, ConversionError)] +ats) ipeReadAttr ConversionError _ Node ConversionError ConversionError _ = ConversionError -> Either ConversionError (Attr f at) @@ -1275,9 +1275,9 @@ "IpeReadAttr: Element expected, Text found" -- | Combination of zipRecWith and traverse -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 :: 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 :: forall (f :: AttributeUniverse -> *) (g :: AttributeUniverse -> *) (h :: * -> *) (i :: AttributeUniverse -> *) (rs :: [AttributeUniverse]). @@ -1294,12 +1294,12 @@ Rec i '[] forall {u} (a :: u -> *). Rec a '[] RNil -zipTraverseWith forall (x :: AttributeUniverse). f x -> g x -> h (i x) -f (f r -x :& Rec f rs -xs) (g r -y :& Rec g rs -ys) = i r -> Rec i rs -> Rec i rs +zipTraverseWith forall (x :: AttributeUniverse). f x -> g x -> h (i x) +f (f r +x :& Rec f rs +xs) (g r +y :& Rec g rs +ys) = i r -> Rec i rs -> Rec i rs i r -> Rec i rs -> Rec i (r : rs) forall {u} (a :: u -> *) (r :: u) (rs :: [u]). a r -> Rec a rs -> Rec a (r : rs) @@ -1308,10 +1308,10 @@ forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> f r -> g r -> h (i r) forall (x :: AttributeUniverse). f x -> g x -> h (i x) -f f r -x g r +f f r +x g r g r -y h (Rec i rs -> Rec i rs) -> h (Rec i rs) -> h (Rec i rs) +y h (Rec i rs -> Rec i rs) -> h (Rec i rs) -> h (Rec i rs) forall a b. h (a -> b) -> h a -> h b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> (forall (x :: AttributeUniverse). f x -> g x -> h (i x)) @@ -1324,22 +1324,22 @@ -> Rec f rs -> Rec g rs -> h (Rec i rs) zipTraverseWith f x -> g x -> h (i x) forall (x :: AttributeUniverse). f x -> g x -> h (i x) -f Rec f rs -xs Rec g rs +f Rec f rs +xs Rec g rs Rec g rs -ys +ys -- | Reading the Attributes into a Rec (Attr f), all based on the types of f -- (the type family mapping labels to types), and a list of labels (ats). -ipeReadRec :: forall f ats. - ( RecApplicative ats - , ReifyConstraint IpeReadAttr (Attr f) ats - , RecAll (Attr f) ats IpeReadAttr - , AllConstrained IpeAttrName ats +ipeReadRec :: forall f ats. + ( RecApplicative ats + , ReifyConstraint IpeReadAttr (Attr f) ats + , RecAll (Attr f) ats IpeReadAttr + , AllConstrained IpeAttrName ats ) - => Proxy f -> Proxy ats + => Proxy f -> Proxy ats -> Node Text Text - -> Either ConversionError (Rec (Attr f) ats) + -> Either ConversionError (Rec (Attr f) ats) ipeReadRec :: forall (f :: TyFun AttributeUniverse (*) -> *) (ats :: [AttributeUniverse]). (RecApplicative ats, ReifyConstraint IpeReadAttr (Attr f) ats, @@ -1350,8 +1350,8 @@ -> Either ConversionError (Rec (Attr f) ats) ipeReadRec Proxy f _ Proxy ats -_ Node ConversionError ConversionError -x = (forall (x :: AttributeUniverse). +_ Node ConversionError ConversionError +x = (forall (x :: AttributeUniverse). Const ConversionError x -> (:.) (Dict IpeReadAttr) (Attr f) x -> Either ConversionError (Attr f x)) @@ -1371,17 +1371,17 @@ Const ConversionError x -> (:.) (Dict IpeReadAttr) (Attr f) x -> Either ConversionError (Attr f x) -f (Rec (Attr Any) ats -> Rec (Const ConversionError) ats +f (Rec (Attr Any) ats -> Rec (Const ConversionError) ats forall (rs :: [AttributeUniverse]) (f :: AttributeUniverse -> *). AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const ConversionError) rs writeAttrNames Rec (Attr Any) ats forall {f :: TyFun AttributeUniverse (*) -> *}. Rec (Attr f) ats -r) Rec (Dict IpeReadAttr :. Attr f) ats -r' +r) Rec (Dict IpeReadAttr :. Attr f) ats +r' where - r :: Rec (Attr f) ats -r = (forall (x :: AttributeUniverse). Attr f x) -> Rec (Attr f) ats + r :: Rec (Attr f) ats +r = (forall (x :: AttributeUniverse). Attr f x) -> Rec (Attr f) ats forall {u} (rs :: [u]) (f :: u -> *). RecApplicative rs => (forall (x :: u). f x) -> Rec f rs @@ -1393,8 +1393,8 @@ GAttr Maybe (Apply f x) forall a. Maybe a Nothing) - r' :: Rec (Dict IpeReadAttr :. Attr f) ats -r' = forall {u} (c :: * -> Constraint) (f :: u -> *) (rs :: [u]). + r' :: Rec (Dict IpeReadAttr :. Attr f) ats +r' = forall {u} (c :: * -> Constraint) (f :: u -> *) (rs :: [u]). ReifyConstraint c f rs => Rec f rs -> Rec (Dict c :. f) rs forall (c :: * -> Constraint) (f :: AttributeUniverse -> *) @@ -1403,19 +1403,19 @@ Rec f rs -> Rec (Dict c :. f) rs reifyConstraint @IpeReadAttr Rec (Attr f) ats forall {f :: TyFun AttributeUniverse (*) -> *}. Rec (Attr f) ats -r +r - f :: forall at. - Const Text at - -> (Dict IpeReadAttr :. Attr f) at - -> Either ConversionError (Attr f at) - f :: forall (x :: AttributeUniverse). + f :: forall at. + Const Text at + -> (Dict IpeReadAttr :. Attr f) at + -> Either ConversionError (Attr f at) + f :: forall (x :: AttributeUniverse). Const ConversionError x -> (:.) (Dict IpeReadAttr) (Attr f) x -> Either ConversionError (Attr f x) -f (Const ConversionError -n) (Compose (Dict Attr f at +f (Const ConversionError +n) (Compose (Dict Attr f at _)) = ConversionError -> Node ConversionError ConversionError -> Either ConversionError (Attr f at) @@ -1424,22 +1424,22 @@ ConversionError -> Node ConversionError ConversionError -> Either ConversionError t ipeReadAttr ConversionError -n Node ConversionError ConversionError -x +n Node ConversionError ConversionError +x -- | Reader for records. Given a proxy of some ipe type i, and a proxy of an -- coordinate type r, read the IpeAttributes for i from the xml node. -ipeReadAttrs :: forall proxy proxy' i r f ats. - ( f ~ AttrMapSym1 r, ats ~ AttributesOf i - , ReifyConstraint IpeReadAttr (Attr f) ats - , RecApplicative ats - , RecAll (Attr f) ats IpeReadAttr - , AllConstrained IpeAttrName ats +ipeReadAttrs :: forall proxy proxy' i r f ats. + ( f ~ AttrMapSym1 r, ats ~ AttributesOf i + , ReifyConstraint IpeReadAttr (Attr f) ats + , RecApplicative ats + , RecAll (Attr f) ats IpeReadAttr + , AllConstrained IpeAttrName ats ) - => proxy i -> proxy' r + => proxy i -> proxy' r -> Node Text Text - -> Either ConversionError (IpeAttributes i r) + -> Either ConversionError (IpeAttributes i r) ipeReadAttrs :: forall (proxy :: (* -> *) -> *) (proxy' :: * -> *) (i :: * -> *) r (f :: TyFun AttributeUniverse (*) -> *) (ats :: [AttributeUniverse]). @@ -1482,9 +1482,9 @@ -> Either ConversionError (Rec (Attr f) ats) ipeReadRec (Proxy f forall {k} (t :: k). Proxy t -Proxy :: Proxy f) (Proxy ats +Proxy :: Proxy f) (Proxy ats forall {k} (t :: k). Proxy t -Proxy :: Proxy ats) +Proxy :: Proxy ats) -- testSym :: B.ByteString @@ -1505,15 +1505,15 @@ -- | If we can ipeRead an ipe element, and we can ipeReadAttrs its attributes -- we can properly read an ipe object using ipeReadObject -ipeReadObject :: ( IpeRead (i r) - , f ~ AttrMapSym1 r, ats ~ AttributesOf i - , RecApplicative ats - , ReifyConstraint IpeReadAttr (Attr f) ats - , RecAll (Attr f) ats IpeReadAttr - , AllConstrained IpeAttrName ats +ipeReadObject :: ( IpeRead (i r) + , f ~ AttrMapSym1 r, ats ~ AttributesOf i + , RecApplicative ats + , ReifyConstraint IpeReadAttr (Attr f) ats + , RecAll (Attr f) ats IpeReadAttr + , AllConstrained IpeAttrName ats ) - => Proxy i -> proxy r -> Node Text Text - -> Either ConversionError (i r :+ IpeAttributes i r) + => Proxy i -> proxy r -> Node Text Text + -> Either ConversionError (i r :+ IpeAttributes i r) ipeReadObject :: forall (i :: * -> *) r (f :: TyFun AttributeUniverse (*) -> *) (ats :: [AttributeUniverse]) (proxy :: * -> *). (IpeRead (i r), f ~ AttrMapSym1 r, ats ~ AttributesOf i, @@ -1523,10 +1523,10 @@ -> proxy r -> Node ConversionError ConversionError -> Either ConversionError (i r :+ IpeAttributes i r) -ipeReadObject Proxy i -prI proxy r -prR Node ConversionError ConversionError -xml = i r -> Attributes' r ats -> i r :+ Attributes' r ats +ipeReadObject Proxy i +prI proxy r +prR Node ConversionError ConversionError +xml = i r -> Attributes' r ats -> i r :+ Attributes' r ats forall core extra. core -> extra -> core :+ extra (:+) (i r -> Attributes' r ats -> i r :+ Attributes' r ats) -> Either ConversionError (i r) @@ -1539,7 +1539,7 @@ IpeRead t => Node ConversionError ConversionError -> Either ConversionError t ipeRead Node ConversionError ConversionError -xml Either +xml Either ConversionError (Attributes' r ats -> i r :+ Attributes' r ats) -> Either ConversionError (Attributes' r ats) -> Either ConversionError (i r :+ Attributes' r ats) @@ -1563,39 +1563,39 @@ -> Node ConversionError ConversionError -> Either ConversionError (IpeAttributes i r) ipeReadAttrs Proxy i -prI proxy r -prR Node ConversionError ConversionError -xml +prI proxy r +prR Node ConversionError ConversionError +xml -------------------------------------------------------------------------------- -- | Ipe read instances -instance Coordinate r => IpeRead (IpeSymbol r) where - ipeRead :: Node ConversionError ConversionError +instance Coordinate r => IpeRead (IpeSymbol r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (IpeSymbol r) ipeRead (Element ConversionError -"use" [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] +"use" [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] _) = case ConversionError -> [(ConversionError, ConversionError)] -> Maybe ConversionError forall a b. Eq a => a -> [(a, b)] -> Maybe b lookup ConversionError "pos" [(ConversionError, ConversionError)] -ats of +ats of Maybe ConversionError Nothing -> ConversionError -> Either ConversionError (IpeSymbol r) forall a b. a -> Either a b Left ConversionError "symbol without position" - Just ConversionError -ps -> (Point 2 r -> ConversionError -> IpeSymbol r) + Just ConversionError +ps -> (Point 2 r -> ConversionError -> IpeSymbol r) -> ConversionError -> Point 2 r -> IpeSymbol r forall a b c. (a -> b -> c) -> b -> a -> c flip Point 2 r -> ConversionError -> IpeSymbol r forall r. Point 2 r -> ConversionError -> IpeSymbol r Symbol ConversionError -name (Point 2 r -> IpeSymbol r) +name (Point 2 r -> IpeSymbol r) -> Either ConversionError (Point 2 r) -> Either ConversionError (IpeSymbol r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -1604,10 +1604,10 @@ IpeReadText t => ConversionError -> Either ConversionError t ipeReadText ConversionError -ps +ps where - name :: ConversionError -name = ConversionError -> Maybe ConversionError -> ConversionError + name :: ConversionError +name = ConversionError -> Maybe ConversionError -> ConversionError forall a. a -> Maybe a -> a fromMaybe ConversionError "mark/disk(sx)" (Maybe ConversionError -> ConversionError) @@ -1618,7 +1618,7 @@ forall a b. Eq a => a -> [(a, b)] -> Maybe b lookup ConversionError "name" [(ConversionError, ConversionError)] -ats +ats ipeRead Node ConversionError ConversionError _ = ConversionError -> Either ConversionError (IpeSymbol r) forall a b. a -> Either a b @@ -1657,30 +1657,30 @@ forall {a} {c :: * -> *} {tag} {b}. IsString a => NodeG c tag b -> Either a b -unT +unT where - unT :: NodeG c tag b -> Either a b -unT (Text b -t) = b -> Either a b + unT :: NodeG c tag b -> Either a b +unT (Text b +t) = b -> Either a b forall a b. b -> Either a b Right b -t - unT NodeG c tag b +t + unT NodeG c tag b _ = a -> Either a b forall a b. a -> Either a b Left a "allText: Expected Text, found an Element" -instance (Coordinate r, Fractional r, Eq r) => IpeRead (Path r) where - ipeRead :: Node ConversionError ConversionError +instance (Coordinate r, Fractional r, Eq r) => IpeRead (Path r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (Path r) ipeRead (Element ConversionError "path" [(ConversionError, ConversionError)] -_ [Node ConversionError ConversionError] -chs) = [Node ConversionError ConversionError] +_ [Node ConversionError ConversionError] +chs) = [Node ConversionError ConversionError] -> Either ConversionError ConversionError allText [Node ConversionError ConversionError] -chs Either ConversionError ConversionError +chs Either ConversionError ConversionError -> (ConversionError -> Either ConversionError (Path r)) -> Either ConversionError (Path r) forall a b. @@ -1699,12 +1699,12 @@ "path: expected element, found text" -lookup' :: Text -> [(Text,a)] -> Either ConversionError a +lookup' :: Text -> [(Text,a)] -> Either ConversionError a lookup' :: forall a. ConversionError -> [(ConversionError, a)] -> Either ConversionError a -lookup' ConversionError -k = Either ConversionError a +lookup' ConversionError +k = Either ConversionError a -> (a -> Either ConversionError a) -> Maybe a -> Either ConversionError a @@ -1718,7 +1718,7 @@ "lookup' " ConversionError -> ConversionError -> ConversionError forall a. Semigroup a => a -> a -> a <> ConversionError -k ConversionError -> ConversionError -> ConversionError +k ConversionError -> ConversionError -> ConversionError forall a. Semigroup a => a -> a -> a <> ConversionError " not found") a -> Either ConversionError a @@ -1731,21 +1731,21 @@ . ConversionError -> [(ConversionError, a)] -> Maybe a forall a b. Eq a => a -> [(a, b)] -> Maybe b lookup ConversionError -k +k -instance Coordinate r => IpeRead (TextLabel r) where - ipeRead :: Node ConversionError ConversionError +instance Coordinate r => IpeRead (TextLabel r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (TextLabel r) ipeRead (Element ConversionError -"text" [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] -chs) +"text" [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] +chs) | ConversionError -> [(ConversionError, ConversionError)] -> Maybe ConversionError forall a b. Eq a => a -> [(a, b)] -> Maybe b lookup ConversionError "type" [(ConversionError, ConversionError)] -ats Maybe ConversionError -> Maybe ConversionError -> Bool +ats Maybe ConversionError -> Maybe ConversionError -> Bool forall a. Eq a => a -> a -> Bool == ConversionError -> Maybe ConversionError forall a. a -> Maybe a @@ -1760,7 +1760,7 @@ <$> [Node ConversionError ConversionError] -> Either ConversionError ConversionError allText [Node ConversionError ConversionError] -chs +chs Either ConversionError (Point 2 r -> TextLabel r) -> Either ConversionError (Point 2 r) -> Either ConversionError (TextLabel r) @@ -1776,7 +1776,7 @@ -> [(ConversionError, a)] -> Either ConversionError a lookup' ConversionError "pos" [(ConversionError, ConversionError)] -ats Either ConversionError ConversionError +ats Either ConversionError ConversionError -> (ConversionError -> Either ConversionError (Point 2 r)) -> Either ConversionError (Point 2 r) forall a b. @@ -1801,19 +1801,19 @@ -instance Coordinate r => IpeRead (MiniPage r) where - ipeRead :: Node ConversionError ConversionError +instance Coordinate r => IpeRead (MiniPage r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (MiniPage r) ipeRead (Element ConversionError -"text" [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] -chs) +"text" [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] +chs) | ConversionError -> [(ConversionError, ConversionError)] -> Maybe ConversionError forall a b. Eq a => a -> [(a, b)] -> Maybe b lookup ConversionError "type" [(ConversionError, ConversionError)] -ats Maybe ConversionError -> Maybe ConversionError -> Bool +ats Maybe ConversionError -> Maybe ConversionError -> Bool forall a. Eq a => a -> a -> Bool == ConversionError -> Maybe ConversionError forall a. a -> Maybe a @@ -1828,7 +1828,7 @@ <$> [Node ConversionError ConversionError] -> Either ConversionError ConversionError allText [Node ConversionError ConversionError] -chs +chs Either ConversionError (Point 2 r -> r -> MiniPage r) -> Either ConversionError (Point 2 r) -> Either ConversionError (r -> MiniPage r) @@ -1844,7 +1844,7 @@ -> [(ConversionError, a)] -> Either ConversionError a lookup' ConversionError "pos" [(ConversionError, ConversionError)] -ats Either ConversionError ConversionError +ats Either ConversionError ConversionError -> (ConversionError -> Either ConversionError (Point 2 r)) -> Either ConversionError (Point 2 r) forall a b. @@ -1870,7 +1870,7 @@ -> [(ConversionError, a)] -> Either ConversionError a lookup' ConversionError "width" [(ConversionError, ConversionError)] -ats Either ConversionError ConversionError +ats Either ConversionError ConversionError -> (ConversionError -> Either ConversionError r) -> Either ConversionError r forall a b. @@ -1894,12 +1894,12 @@ "MiniPage: Expected element, found text" -instance Coordinate r => IpeRead (Image r) where - ipeRead :: Node ConversionError ConversionError +instance Coordinate r => IpeRead (Image r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (Image r) ipeRead (Element ConversionError -"image" [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] +"image" [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] _) = () -> Rectangle (Point 2 r) -> Image r forall r. () -> Rectangle (Point 2 r) -> Image r Image () (Rectangle (Point 2 r) -> Image r) @@ -1914,7 +1914,7 @@ -> [(ConversionError, a)] -> Either ConversionError a lookup' ConversionError "rect" [(ConversionError, ConversionError)] -ats Either ConversionError ConversionError +ats Either ConversionError ConversionError -> (ConversionError -> Either ConversionError (Rectangle (Point 2 r))) -> Either ConversionError (Rectangle (Point 2 r)) @@ -1933,11 +1933,11 @@ Left ConversionError "Image: Element expected, text found" -instance (Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) where - ipeRead :: Node ConversionError ConversionError +instance (Coordinate r, Fractional r, Eq r) => IpeRead (IpeObject r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (IpeObject r) -ipeRead Node ConversionError ConversionError -x = [Either ConversionError (IpeObject r)] +ipeRead Node ConversionError ConversionError +x = [Either ConversionError (IpeObject r)] -> Either ConversionError (IpeObject r) forall a. [Either ConversionError a] -> Either ConversionError a firstRight [ (IpeSymbol r @@ -1979,8 +1979,8 @@ ipeReadObject (Proxy IpeSymbol forall {k} (t :: k). Proxy t Proxy :: Proxy IpeSymbol) Proxy r -r Node ConversionError ConversionError -x +r Node ConversionError ConversionError +x , (Path r :+ Attributes (AttrMapSym1 r) @@ -2023,8 +2023,8 @@ ipeReadObject (Proxy Path forall {k} (t :: k). Proxy t Proxy :: Proxy Path) Proxy r -r Node ConversionError ConversionError -x +r Node ConversionError ConversionError +x , (Group r :+ Attributes (AttrMapSym1 r) '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]) @@ -2058,8 +2058,8 @@ ipeReadObject (Proxy Group forall {k} (t :: k). Proxy t Proxy :: Proxy Group) Proxy r -r Node ConversionError ConversionError -x +r Node ConversionError ConversionError +x , (TextLabel r :+ Attributes (AttrMapSym1 r) CommonAttributes) -> IpeObject r IpeObject' TextLabel r -> IpeObject r @@ -2087,8 +2087,8 @@ ipeReadObject (Proxy TextLabel forall {k} (t :: k). Proxy t Proxy :: Proxy TextLabel) Proxy r -r Node ConversionError ConversionError -x +r Node ConversionError ConversionError +x , (MiniPage r :+ Attributes (AttrMapSym1 r) CommonAttributes) -> IpeObject r IpeObject' MiniPage r -> IpeObject r @@ -2116,8 +2116,8 @@ ipeReadObject (Proxy MiniPage forall {k} (t :: k). Proxy t Proxy :: Proxy MiniPage) Proxy r -r Node ConversionError ConversionError -x +r Node ConversionError ConversionError +x , (Image r :+ Attributes (AttrMapSym1 r) CommonAttributes) -> IpeObject r IpeObject' Image r -> IpeObject r @@ -2145,16 +2145,16 @@ ipeReadObject (Proxy Image forall {k} (t :: k). Proxy t Proxy :: Proxy Image) Proxy r -r Node ConversionError ConversionError -x +r Node ConversionError ConversionError +x ] where - r :: Proxy r -r = Proxy r + r :: Proxy r +r = Proxy r forall {k} (t :: k). Proxy t -Proxy :: Proxy r +Proxy :: Proxy r -firstRight :: [Either ConversionError a] -> Either ConversionError a +firstRight :: [Either ConversionError a] -> Either ConversionError a firstRight :: forall a. [Either ConversionError a] -> Either ConversionError a firstRight = Either ConversionError a -> (a -> Either ConversionError a) @@ -2202,13 +2202,13 @@ _Right) -instance (Coordinate r, Eq r) => IpeRead (Group r) where - ipeRead :: Node ConversionError ConversionError +instance (Coordinate r, Eq r) => IpeRead (Group r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (Group r) ipeRead (Element ConversionError "group" [(ConversionError, ConversionError)] -_ [Node ConversionError ConversionError] -chs) = Group r -> Either ConversionError (Group r) +_ [Node ConversionError ConversionError] +chs) = Group r -> Either ConversionError (Group r) forall a b. b -> Either a b Right (Group r -> Either ConversionError (Group r)) -> ([Node ConversionError ConversionError] -> Group r) @@ -2246,7 +2246,7 @@ -> Either ConversionError (Group r) forall a b. (a -> b) -> a -> b $ [Node ConversionError ConversionError] -chs +chs ipeRead Node ConversionError ConversionError _ = ConversionError -> Either ConversionError (Group r) forall a b. a -> Either a b @@ -2255,11 +2255,11 @@ instance IpeRead LayerName where - ipeRead :: Node ConversionError ConversionError + ipeRead :: Node ConversionError ConversionError -> Either ConversionError LayerName ipeRead (Element ConversionError -"layer" [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] +"layer" [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] _) = ConversionError -> LayerName LayerName (ConversionError -> LayerName) -> Either ConversionError ConversionError @@ -2273,7 +2273,7 @@ -> [(ConversionError, a)] -> Either ConversionError a lookup' ConversionError "name" [(ConversionError, ConversionError)] -ats +ats ipeRead Node ConversionError ConversionError _ = ConversionError -> Either ConversionError LayerName forall a b. a -> Either a b @@ -2281,13 +2281,13 @@ "layer: Expected element, found text" instance IpeRead View where - ipeRead :: Node ConversionError ConversionError -> Either ConversionError View + ipeRead :: Node ConversionError ConversionError -> Either ConversionError View ipeRead (Element ConversionError -"view" [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] -_) = (\ConversionError -lrs LayerName -a -> [LayerName] -> LayerName -> View +"view" [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] +_) = (\ConversionError +lrs LayerName +a -> [LayerName] -> LayerName -> View View ((ConversionError -> LayerName) -> [ConversionError] -> [LayerName] forall a b. (a -> b) -> [a] -> [b] map ConversionError -> LayerName @@ -2296,8 +2296,8 @@ forall a b. (a -> b) -> a -> b $ ConversionError -> [ConversionError] T.words ConversionError -lrs) LayerName -a) +lrs) LayerName +a) (ConversionError -> LayerName -> View) -> Either ConversionError ConversionError -> Either ConversionError (LayerName -> View) @@ -2310,7 +2310,7 @@ -> [(ConversionError, a)] -> Either ConversionError a lookup' ConversionError "layers" [(ConversionError, ConversionError)] -ats +ats Either ConversionError (LayerName -> View) -> Either ConversionError LayerName -> Either ConversionError View forall a b. @@ -2325,7 +2325,7 @@ -> [(ConversionError, a)] -> Either ConversionError a lookup' ConversionError "active" [(ConversionError, ConversionError)] -ats Either ConversionError ConversionError +ats Either ConversionError ConversionError -> (ConversionError -> Either ConversionError LayerName) -> Either ConversionError LayerName forall a b. @@ -2346,13 +2346,13 @@ -- TODO: this instance throws away all of our error collecting (and is pretty -- slow/stupid since it tries parsing all children with all parsers) -instance (Coordinate r, Eq r) => IpeRead (IpePage r) where - ipeRead :: Node ConversionError ConversionError +instance (Coordinate r, Eq r) => IpeRead (IpePage r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (IpePage r) ipeRead (Element ConversionError "page" [(ConversionError, ConversionError)] -_ [Node ConversionError ConversionError] -chs) = IpePage r -> Either ConversionError (IpePage r) +_ [Node ConversionError ConversionError] +chs) = IpePage r -> Either ConversionError (IpePage r) forall a b. b -> Either a b Right (IpePage r -> Either ConversionError (IpePage r)) -> IpePage r -> Either ConversionError (IpePage r) @@ -2364,17 +2364,17 @@ IpeRead a => [Node ConversionError ConversionError] -> [a] readAll [Node ConversionError ConversionError] -chs) ([Node ConversionError ConversionError] -> [View] +chs) ([Node ConversionError ConversionError] -> [View] forall a. IpeRead a => [Node ConversionError ConversionError] -> [a] readAll [Node ConversionError ConversionError] -chs) ([Node ConversionError ConversionError] -> [IpeObject r] +chs) ([Node ConversionError ConversionError] -> [IpeObject r] forall a. IpeRead a => [Node ConversionError ConversionError] -> [a] readAll [Node ConversionError ConversionError] -chs) +chs) ipeRead Node ConversionError ConversionError _ = ConversionError -> Either ConversionError (IpePage r) forall a b. a -> Either a b @@ -2388,7 +2388,7 @@ -- readObjects = withDef [] . readAll -- | try reading everything as an a. Throw away whatever fails. -readAll :: IpeRead a => [Node Text Text] -> [a] +readAll :: IpeRead a => [Node Text Text] -> [a] readAll :: forall a. IpeRead a => [Node ConversionError ConversionError] -> [a] @@ -2411,24 +2411,24 @@ ipeRead -instance (Coordinate r, Eq r) => IpeRead (IpeFile r) where - ipeRead :: Node ConversionError ConversionError +instance (Coordinate r, Eq r) => IpeRead (IpeFile r) where + ipeRead :: Node ConversionError ConversionError -> Either ConversionError (IpeFile r) ipeRead (Element ConversionError "ipe" [(ConversionError, ConversionError)] -_ [Node ConversionError ConversionError] -chs) = case [Node ConversionError ConversionError] -> [IpePage r] +_ [Node ConversionError ConversionError] +chs) = case [Node ConversionError ConversionError] -> [IpePage r] forall a. IpeRead a => [Node ConversionError ConversionError] -> [a] readAll [Node ConversionError ConversionError] -chs of +chs of [] -> ConversionError -> Either ConversionError (IpeFile r) forall a b. a -> Either a b Left ConversionError "Ipe: no pages found" - [IpePage r] -pgs -> IpeFile r -> Either ConversionError (IpeFile r) + [IpePage r] +pgs -> IpeFile r -> Either ConversionError (IpeFile r) forall a b. b -> Either a b Right (IpeFile r -> Either ConversionError (IpeFile r)) -> IpeFile r -> Either ConversionError (IpeFile r) @@ -2443,7 +2443,7 @@ Nothing [] ([IpePage r] -> NonEmpty (IpePage r) forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList [IpePage r] -pgs) +pgs) ipeRead Node ConversionError ConversionError _ = ConversionError -> Either ConversionError (IpeFile r) forall a b. a -> Either a b @@ -2452,13 +2452,13 @@ instance IpeRead IpeStyle where - ipeRead :: Node ConversionError ConversionError + ipeRead :: Node ConversionError ConversionError -> Either ConversionError IpeStyle ipeRead = \case - xml :: Node ConversionError ConversionError -xml@(Element ConversionError -"ipestyle" [(ConversionError, ConversionError)] -ats [Node ConversionError ConversionError] + xml :: Node ConversionError ConversionError +xml@(Element ConversionError +"ipestyle" [(ConversionError, ConversionError)] +ats [Node ConversionError ConversionError] _) -> IpeStyle -> Either ConversionError IpeStyle forall a b. b -> Either a b Right (IpeStyle -> Either ConversionError IpeStyle) @@ -2471,8 +2471,8 @@ forall a b. Eq a => a -> [(a, b)] -> Maybe b lookup ConversionError "name" [(ConversionError, ConversionError)] -ats) Node ConversionError ConversionError -xml +ats) Node ConversionError ConversionError +xml Node ConversionError ConversionError _ -> ConversionError -> Either ConversionError IpeStyle forall a b. a -> Either a b @@ -2513,28 +2513,28 @@ -- | Given a path to a stylesheet, add it to the ipe file with the -- highest priority. Throws an error when this fails. -addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r) +addStyleSheetFrom :: OsPath -> IpeFile r -> IO (IpeFile r) addStyleSheetFrom :: forall r. OsPath -> IpeFile r -> IO (IpeFile r) -addStyleSheetFrom OsPath -fp IpeFile r -f = OsPath -> IO (Either ConversionError IpeStyle) +addStyleSheetFrom OsPath +fp IpeFile r +f = OsPath -> IO (Either ConversionError IpeStyle) readIpeStylesheet OsPath -fp IO (Either ConversionError IpeStyle) +fp IO (Either ConversionError IpeStyle) -> (Either ConversionError IpeStyle -> IO (IpeFile r)) -> IO (IpeFile r) forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Left ConversionError -err -> String -> IO (IpeFile r) + Left ConversionError +err -> String -> IO (IpeFile r) forall a. String -> IO a forall (m :: * -> *) a. MonadFail m => String -> m a fail (ConversionError -> String forall a. Show a => a -> String show ConversionError -err) - Right IpeStyle -s -> IpeFile r -> IO (IpeFile r) +err) + Right IpeStyle +s -> IpeFile r -> IO (IpeFile r) forall a. a -> IO a forall (f :: * -> *) a. Applicative f => a -> f a pure (IpeFile r -> IO (IpeFile r)) -> IpeFile r -> IO (IpeFile r) @@ -2542,8 +2542,8 @@ $ IpeStyle -> IpeFile r -> IpeFile r forall r. IpeStyle -> IpeFile r -> IpeFile r addStyleSheet IpeStyle -s IpeFile r -f +s IpeFile r +f --------------------------------------------------------------------------------
\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/src/Ipe.Types.html b/haddocks/hgeometry/ipe/src/Ipe.Types.html index fb0bfe56e..23b41c3ab 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.Types.html +++ b/haddocks/hgeometry/ipe/src/Ipe.Types.html @@ -75,14 +75,14 @@
, View -> LayerName _activeLayer :: LayerName } - deriving (View -> View -> Bool + deriving (View -> View -> Bool (View -> View -> Bool) -> (View -> View -> Bool) -> Eq View forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: View -> View -> Bool == :: View -> View -> Bool $c/= :: View -> View -> Bool /= :: View -> View -> Bool -Eq, Eq View +Eq, Eq View Eq View => (View -> View -> Ordering) -> (View -> View -> Bool) @@ -119,7 +119,7 @@ max :: View -> View -> View $cmin :: View -> View -> View min :: View -> View -> View -Ord, Int -> View -> ShowS +Ord, Int -> View -> ShowS [View] -> ShowS View -> String (Int -> View -> ShowS) @@ -144,7 +144,7 @@ , IpeStyle -> Node Text Text _styleData :: Node Text Text } - deriving (IpeStyle -> IpeStyle -> Bool + deriving (IpeStyle -> IpeStyle -> Bool (IpeStyle -> IpeStyle -> Bool) -> (IpeStyle -> IpeStyle -> Bool) -> Eq IpeStyle forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -152,7 +152,7 @@ == :: IpeStyle -> IpeStyle -> Bool $c/= :: IpeStyle -> IpeStyle -> Bool /= :: IpeStyle -> IpeStyle -> Bool -Eq,Int -> IpeStyle -> ShowS +Eq,Int -> IpeStyle -> ShowS [IpeStyle] -> ShowS IpeStyle -> String (Int -> IpeStyle -> ShowS) @@ -197,7 +197,7 @@ , IpePreamble -> Text _preambleData :: Text } - deriving (IpePreamble -> IpePreamble -> Bool + deriving (IpePreamble -> IpePreamble -> Bool (IpePreamble -> IpePreamble -> Bool) -> (IpePreamble -> IpePreamble -> Bool) -> Eq IpePreamble forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -205,7 +205,7 @@ == :: IpePreamble -> IpePreamble -> Bool $c/= :: IpePreamble -> IpePreamble -> Bool /= :: IpePreamble -> IpePreamble -> Bool -Eq,ReadPrec [IpePreamble] +Eq,ReadPrec [IpePreamble] ReadPrec IpePreamble Int -> ReadS IpePreamble ReadS [IpePreamble] @@ -225,7 +225,7 @@ readPrec :: ReadPrec IpePreamble $creadListPrec :: ReadPrec [IpePreamble] readListPrec :: ReadPrec [IpePreamble] -Read,Int -> IpePreamble -> ShowS +Read,Int -> IpePreamble -> ShowS [IpePreamble] -> ShowS IpePreamble -> String (Int -> IpePreamble -> ShowS) @@ -240,7 +240,7 @@ show :: IpePreamble -> String $cshowList :: [IpePreamble] -> ShowS showList :: [IpePreamble] -> ShowS -Show,Eq IpePreamble +Show,Eq IpePreamble Eq IpePreamble => (IpePreamble -> IpePreamble -> Ordering) -> (IpePreamble -> IpePreamble -> Bool) @@ -289,14 +289,14 @@ -- | An IpePage is essentially a Group, together with a list of layers and a -- list of views. -data IpePage r = IpePage { forall r. IpePage r -> [LayerName] +data IpePage r = IpePage { forall r. IpePage r -> [LayerName] _layers :: [LayerName] , forall r. IpePage r -> [View] _views :: [View] , forall r. IpePage r -> [IpeObject r] -_content :: [IpeObject r] +_content :: [IpeObject r] } - deriving (IpePage r -> IpePage r -> Bool + deriving (IpePage r -> IpePage r -> Bool (IpePage r -> IpePage r -> Bool) -> (IpePage r -> IpePage r -> Bool) -> Eq (IpePage r) forall r. Eq r => IpePage r -> IpePage r -> Bool @@ -305,7 +305,7 @@ == :: IpePage r -> IpePage r -> Bool $c/= :: forall r. Eq r => IpePage r -> IpePage r -> Bool /= :: IpePage r -> IpePage r -> Bool -Eq,Int -> IpePage r -> ShowS +Eq,Int -> IpePage r -> ShowS [IpePage r] -> ShowS IpePage r -> String (Int -> IpePage r -> ShowS) @@ -324,30 +324,30 @@ $cshowList :: forall r. Show r => [IpePage r] -> ShowS showList :: [IpePage r] -> ShowS Show) -makeLenses ''IpePage +makeLenses ''IpePage -- | Creates an empty page with one layer and view. -emptyPage :: IpePage r +emptyPage :: IpePage r emptyPage :: forall r. IpePage r emptyPage = [IpeObject r] -> IpePage r forall r. [IpeObject r] -> IpePage r fromContent [] -- | Creates a simple page with a single view. -fromContent :: [IpeObject r] -> IpePage r +fromContent :: [IpeObject r] -> IpePage r fromContent :: forall r. [IpeObject r] -> IpePage r -fromContent [IpeObject r] -obs = [LayerName] -> [View] -> [IpeObject r] -> IpePage r +fromContent [IpeObject r] +obs = [LayerName] -> [View] -> [IpeObject r] -> IpePage r forall r. [LayerName] -> [View] -> [IpeObject r] -> IpePage r IpePage [LayerName] -layers' [[LayerName] -> LayerName -> View +layers' [[LayerName] -> LayerName -> View View [LayerName] -layers' LayerName -a] [IpeObject r] -obs +layers' LayerName +a] [IpeObject r] +obs where - layers' :: [LayerName] -layers' = Set LayerName -> [LayerName] + layers' :: [LayerName] +layers' = Set LayerName -> [LayerName] forall a. Set a -> [a] Set.toList (Set LayerName -> [LayerName]) -> ([LayerName] -> Set LayerName) -> [LayerName] -> [LayerName] @@ -357,7 +357,7 @@ Set.fromList ([LayerName] -> [LayerName]) -> [LayerName] -> [LayerName] forall a b. (a -> b) -> a -> b $ LayerName -a LayerName -> [LayerName] -> [LayerName] +a LayerName -> [LayerName] -> [LayerName] forall a. a -> [a] -> [a] : (IpeObject r -> Maybe LayerName) -> [IpeObject r] -> [LayerName] forall a b. (a -> Maybe b) -> [a] -> [b] @@ -394,9 +394,9 @@ proxy at -> Lens' (Attributes f ats) (Maybe (Apply f at)) ixAttr SAttributeUniverse 'Layer SLayer) [IpeObject r] -obs - a :: LayerName -a = LayerName +obs + a :: LayerName +a = LayerName "alpha" -- | Makes sure that the page has at least one layer and at least one @@ -405,11 +405,11 @@ -- - if the page does not have any layers, it creates a layer named "alpha", and -- - if the page does not have any views, it creates a view in which all layers are visible. -- -withDefaults :: IpePage r -> IpePage r +withDefaults :: IpePage r -> IpePage r withDefaults :: forall r. IpePage r -> IpePage r -withDefaults IpePage r -p = case IpePage r -pIpePage r +withDefaults IpePage r +p = case IpePage r +pIpePage r -> Getting [LayerName] (IpePage r) [LayerName] -> [LayerName] forall s a. s -> Getting a s a -> a ^.Getting [LayerName] (IpePage r) [LayerName] @@ -418,20 +418,20 @@ ([LayerName] -> f [LayerName]) -> IpePage r -> f (IpePage r) layers of [] -> LayerName -> [LayerName] -> IpePage r -makeNonEmpty LayerName +makeNonEmpty LayerName "alpha" [] - (LayerName -l:[LayerName] -lrs) -> LayerName -> [LayerName] -> IpePage r -makeNonEmpty LayerName -l [LayerName] -lrs + (LayerName +l:[LayerName] +lrs) -> LayerName -> [LayerName] -> IpePage r +makeNonEmpty LayerName +l [LayerName] +lrs where - makeNonEmpty :: LayerName -> [LayerName] -> IpePage r -makeNonEmpty LayerName -l [LayerName] -lrs = IpePage r -pIpePage r -> (IpePage r -> IpePage r) -> IpePage r + makeNonEmpty :: LayerName -> [LayerName] -> IpePage r +makeNonEmpty LayerName +l [LayerName] +lrs = IpePage r +pIpePage r -> (IpePage r -> IpePage r) -> IpePage r forall a b. a -> (a -> b) -> b &([LayerName] -> Identity [LayerName]) -> IpePage r -> Identity (IpePage r) @@ -443,10 +443,10 @@ -> [LayerName] -> IpePage r -> IpePage r forall s t a b. ASetter s t a b -> b -> s -> t .~ (LayerName -lLayerName -> [LayerName] -> [LayerName] +lLayerName -> [LayerName] -> [LayerName] forall a. a -> [a] -> [a] :[LayerName] -lrs) +lrs) IpePage r -> (IpePage r -> IpePage r) -> IpePage r forall a b. a -> (a -> b) -> b &([View] -> Identity [View]) -> IpePage r -> Identity (IpePage r) @@ -459,26 +459,26 @@ %~ \case [] -> [[LayerName] -> LayerName -> View View (LayerName -lLayerName -> [LayerName] -> [LayerName] +lLayerName -> [LayerName] -> [LayerName] forall a. a -> [a] -> [a] :[LayerName] -lrs) LayerName -l] - [View] -vs -> [View] -vs +lrs) LayerName +l] + [View] +vs -> [View] +vs -- | This allows you to filter the objects on some layer. -- -- >>> let page = IpePage [] [] [] -- >>> page^..content.onLayer "myLayer" -- [] -onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r) +onLayer :: LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r) onLayer :: forall r. LayerName -> Getting (Endo [IpeObject r]) [IpeObject r] (IpeObject r) -onLayer LayerName -n = (IpeObject r -> Const (Endo [IpeObject r]) (IpeObject r)) +onLayer LayerName +n = (IpeObject r -> Const (Endo [IpeObject r]) (IpeObject r)) -> [IpeObject r] -> Const (Endo [IpeObject r]) [IpeObject r] forall (f :: * -> *) a. Foldable f => IndexedFold Int (f a) a IndexedFold Int [IpeObject r] (IpeObject r) @@ -497,9 +497,9 @@ forall (p :: * -> * -> *) (f :: * -> *) a. (Choice p, Applicative f) => (a -> Bool) -> Optic' p f a a -filtered (\IpeObject r -o -> IpeObject r -oIpeObject r +filtered (\IpeObject r +o -> IpeObject r +oIpeObject r -> Getting (First LayerName) (IpeObject r) LayerName -> Maybe LayerName forall s a. s -> Getting (First a) s a -> Maybe a @@ -536,7 +536,7 @@ == LayerName -> Maybe LayerName forall a. a -> Maybe a Just LayerName -n) +n) -- | Gets all objects that are visible in the given view. -- @@ -547,23 +547,23 @@ -- >>> let page = IpePage [] [] [] -- >>> page^.contentInView 0 -- [] -contentInView :: Word -> Getter (IpePage r) [IpeObject r] +contentInView :: Word -> Getter (IpePage r) [IpeObject r] contentInView :: forall r. Word -> Getter (IpePage r) [IpeObject r] contentInView (Word -> Int forall a b. (Integral a, Num b) => a -> b -fromIntegral -> Int -i) = (IpePage r -> [IpeObject r]) +fromIntegral -> Int +i) = (IpePage r -> [IpeObject r]) -> ([IpeObject r] -> f [IpeObject r]) -> IpePage r -> f (IpePage r) forall (p :: * -> * -> *) (f :: * -> *) s a. (Profunctor p, Contravariant f) => (s -> a) -> Optic' p f s a to IpePage r -> [IpeObject r] -inView' +inView' where - inView' :: IpePage r -> [IpeObject r] -inView' IpePage r -p = let lrs :: Set LayerName -lrs = [LayerName] -> Set LayerName + inView' :: IpePage r -> [IpeObject r] +inView' IpePage r +p = let lrs :: Set LayerName +lrs = [LayerName] -> Set LayerName forall a. Ord a => [a] -> Set a Set.fromList ([LayerName] -> Set LayerName) -> ([View] -> [LayerName]) -> [View] -> Set LayerName @@ -577,7 +577,7 @@ layerNames) ([View] -> Set LayerName) -> [View] -> Set LayerName forall a b. (a -> b) -> a -> b $ IpePage r -pIpePage r -> Getting (Endo [View]) (IpePage r) View -> [View] +pIpePage r -> Getting (Endo [View]) (IpePage r) View -> [View] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..([View] -> Const (Endo [View]) [View]) -> IpePage r -> Const (Endo [View]) (IpePage r) @@ -594,9 +594,9 @@ forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix Int Index [View] -i +i in IpePage r -pIpePage r +pIpePage r -> Getting (Endo [IpeObject r]) (IpePage r) (IpeObject r) -> [IpeObject r] forall s a. s -> Getting (Endo [a]) s a -> [a] @@ -632,13 +632,13 @@ (a -> Bool) -> Optic' p f a a filtered (Set LayerName -> IpeObject r -> Bool forall {r}. Set LayerName -> IpeObject r -> Bool -inVisibleLayer Set LayerName -lrs) +inVisibleLayer Set LayerName +lrs) - inVisibleLayer :: Set (Apply (AttrMapSym1 r) 'Layer) -> IpeObject r -> Bool -inVisibleLayer Set (Apply (AttrMapSym1 r) 'Layer) -lrs IpeObject r -o = Bool + inVisibleLayer :: Set (Apply (AttrMapSym1 r) 'Layer) -> IpeObject r -> Bool +inVisibleLayer Set (Apply (AttrMapSym1 r) 'Layer) +lrs IpeObject r +o = Bool -> (Apply (AttrMapSym1 r) 'Layer -> Bool) -> Maybe (Apply (AttrMapSym1 r) 'Layer) -> Bool @@ -648,11 +648,11 @@ -> Set (Apply (AttrMapSym1 r) 'Layer) -> Bool forall a. Ord a => a -> Set a -> Bool `Set.member` Set (Apply (AttrMapSym1 r) 'Layer) -lrs) (Maybe (Apply (AttrMapSym1 r) 'Layer) -> Bool) +lrs) (Maybe (Apply (AttrMapSym1 r) 'Layer) -> Bool) -> Maybe (Apply (AttrMapSym1 r) 'Layer) -> Bool forall a b. (a -> b) -> a -> b $ IpeObject r -oIpeObject r +oIpeObject r -> Getting (First (Apply (AttrMapSym1 r) 'Layer)) (IpeObject r) @@ -703,14 +703,14 @@ -------------------------------------------------------------------------------- -- | A complete ipe file -data IpeFile r = IpeFile { forall r. IpeFile r -> Maybe IpePreamble +data IpeFile r = IpeFile { forall r. IpeFile r -> Maybe IpePreamble _preamble :: Maybe IpePreamble , forall r. IpeFile r -> [IpeStyle] _styles :: [IpeStyle] , forall r. IpeFile r -> NonEmpty (IpePage r) -_pages :: NE.NonEmpty (IpePage r) +_pages :: NE.NonEmpty (IpePage r) } - deriving (IpeFile r -> IpeFile r -> Bool + deriving (IpeFile r -> IpeFile r -> Bool (IpeFile r -> IpeFile r -> Bool) -> (IpeFile r -> IpeFile r -> Bool) -> Eq (IpeFile r) forall r. Eq r => IpeFile r -> IpeFile r -> Bool @@ -719,7 +719,7 @@ == :: IpeFile r -> IpeFile r -> Bool $c/= :: forall r. Eq r => IpeFile r -> IpeFile r -> Bool /= :: IpeFile r -> IpeFile r -> Bool -Eq,Int -> IpeFile r -> ShowS +Eq,Int -> IpeFile r -> ShowS [IpeFile r] -> ShowS IpeFile r -> String (Int -> IpeFile r -> ShowS) @@ -738,12 +738,12 @@ $cshowList :: forall r. Show r => [IpeFile r] -> ShowS showList :: [IpeFile r] -> ShowS Show) -makeLenses ''IpeFile +makeLenses ''IpeFile -- | Convenience constructor for creating an ipe file without preamble -- and with the default stylesheet. -ipeFile :: NE.NonEmpty (IpePage r) -> IpeFile r +ipeFile :: NE.NonEmpty (IpePage r) -> IpeFile r ipeFile :: forall r. NonEmpty (IpePage r) -> IpeFile r ipeFile = Maybe IpePreamble -> [IpeStyle] -> NonEmpty (IpePage r) -> IpeFile r @@ -756,7 +756,7 @@ basicIpeStyle] -- | Convenience function to construct an ipe file consisting of a single page. -singlePageFile :: IpePage r -> IpeFile r +singlePageFile :: IpePage r -> IpeFile r singlePageFile :: forall r. IpePage r -> IpeFile r singlePageFile = NonEmpty (IpePage r) -> IpeFile r forall r. NonEmpty (IpePage r) -> IpeFile r @@ -768,7 +768,7 @@ NE.:| []) -- | Create a single page ipe file from a list of IpeObjects -singlePageFromContent :: [IpeObject r] -> IpeFile r +singlePageFromContent :: [IpeObject r] -> IpeFile r singlePageFromContent :: forall r. [IpeObject r] -> IpeFile r singlePageFromContent = IpePage r -> IpeFile r forall r. IpePage r -> IpeFile r @@ -782,12 +782,12 @@ -- | Adds a stylesheet to the ipe file. This will be the first -- stylesheet, i.e. it has priority over all previously imported stylesheets. -addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r +addStyleSheet :: IpeStyle -> IpeFile r -> IpeFile r addStyleSheet :: forall r. IpeStyle -> IpeFile r -> IpeFile r -addStyleSheet IpeStyle -s IpeFile r -f = IpeFile r -fIpeFile r -> (IpeFile r -> IpeFile r) -> IpeFile r +addStyleSheet IpeStyle +s IpeFile r +f = IpeFile r +fIpeFile r -> (IpeFile r -> IpeFile r) -> IpeFile r forall a b. a -> (a -> b) -> b &([IpeStyle] -> Identity [IpeStyle]) -> IpeFile r -> Identity (IpeFile r) @@ -799,5 +799,5 @@ -> ([IpeStyle] -> [IpeStyle]) -> IpeFile r -> IpeFile r forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ (IpeStyle -s:) +s:)
\ No newline at end of file diff --git a/haddocks/hgeometry/ipe/src/Ipe.Value.html b/haddocks/hgeometry/ipe/src/Ipe.Value.html index 97a5c2723..ee43005ad 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.Value.html +++ b/haddocks/hgeometry/ipe/src/Ipe.Value.html @@ -17,8 +17,8 @@ -------------------------------------------------------------------------------- -- | Many types either consist of a symbolc value, or a value of type v -data IpeValue v = Named Text | Valued v - deriving (Int -> IpeValue v -> ShowS +data IpeValue v = Named Text | Valued v + deriving (Int -> IpeValue v -> ShowS [IpeValue v] -> ShowS IpeValue v -> String (Int -> IpeValue v -> ShowS) @@ -36,7 +36,7 @@ show :: IpeValue v -> String $cshowList :: forall v. Show v => [IpeValue v] -> ShowS showList :: [IpeValue v] -> ShowS -Show,ReadPrec [IpeValue v] +Show,ReadPrec [IpeValue v] ReadPrec (IpeValue v) Int -> ReadS (IpeValue v) ReadS [IpeValue v] @@ -60,7 +60,7 @@ readPrec :: ReadPrec (IpeValue v) $creadListPrec :: forall v. Read v => ReadPrec [IpeValue v] readListPrec :: ReadPrec [IpeValue v] -Read,IpeValue v -> IpeValue v -> Bool +Read,IpeValue v -> IpeValue v -> Bool (IpeValue v -> IpeValue v -> Bool) -> (IpeValue v -> IpeValue v -> Bool) -> Eq (IpeValue v) forall v. Eq v => IpeValue v -> IpeValue v -> Bool @@ -69,7 +69,7 @@ == :: IpeValue v -> IpeValue v -> Bool $c/= :: forall v. Eq v => IpeValue v -> IpeValue v -> Bool /= :: IpeValue v -> IpeValue v -> Bool -Eq,Eq (IpeValue v) +Eq,Eq (IpeValue v) Eq (IpeValue v) => (IpeValue v -> IpeValue v -> Ordering) -> (IpeValue v -> IpeValue v -> Bool) @@ -110,7 +110,7 @@ max :: IpeValue v -> IpeValue v -> IpeValue v $cmin :: forall v. Ord v => IpeValue v -> IpeValue v -> IpeValue v min :: IpeValue v -> IpeValue v -> IpeValue v -Ord,(forall a b. (a -> b) -> IpeValue a -> IpeValue b) +Ord,(forall a b. (a -> b) -> IpeValue a -> IpeValue b) -> (forall a b. a -> IpeValue b -> IpeValue a) -> Functor IpeValue forall a b. a -> IpeValue b -> IpeValue a forall a b. (a -> b) -> IpeValue a -> IpeValue b @@ -121,7 +121,7 @@ fmap :: forall a b. (a -> b) -> IpeValue a -> IpeValue b $c<$ :: forall a b. a -> IpeValue b -> IpeValue a <$ :: forall a b. a -> IpeValue b -> IpeValue a -Functor,(forall m. Monoid m => IpeValue m -> m) +Functor,(forall m. Monoid m => IpeValue m -> m) -> (forall m a. Monoid m => (a -> m) -> IpeValue a -> m) -> (forall m a. Monoid m => (a -> m) -> IpeValue a -> m) -> (forall a b. (a -> b -> b) -> b -> IpeValue a -> b) @@ -203,7 +203,7 @@ sum :: forall a. Num a => IpeValue a -> a $cproduct :: forall a. Num a => IpeValue a -> a product :: forall a. Num a => IpeValue a -> a -Foldable,Functor IpeValue +Foldable,Functor IpeValue Foldable IpeValue (Functor IpeValue, Foldable IpeValue) => (forall (f :: * -> *) a b. @@ -262,8 +262,8 @@ sequence :: forall (m :: * -> *) a. Monad m => IpeValue (m a) -> m (IpeValue a) Traversable) -instance IsString (IpeValue v) where - fromString :: String -> IpeValue v +instance IsString (IpeValue v) where + fromString :: String -> IpeValue v fromString = Text -> IpeValue v forall v. Text -> IpeValue v Named (Text -> IpeValue v) -> (String -> Text) -> String -> IpeValue v diff --git a/haddocks/hgeometry/ipe/src/Ipe.Writer.html b/haddocks/hgeometry/ipe/src/Ipe.Writer.html index 30a156bf0..a339a39ae 100644 --- a/haddocks/hgeometry/ipe/src/Ipe.Writer.html +++ b/haddocks/hgeometry/ipe/src/Ipe.Writer.html @@ -67,7 +67,7 @@ -------------------------------------------------------------------------------- -- | Write an IpeFiele to file. -writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO () +writeIpeFile :: IpeWriteText r => OsPath -> IpeFile r -> IO () writeIpeFile :: forall r. IpeWriteText r => OsPath -> IpeFile r -> IO () writeIpeFile = (IpeFile r -> OsPath -> IO ()) -> OsPath -> IpeFile r -> IO () forall a b c. (a -> b -> c) -> b -> a -> c @@ -76,13 +76,13 @@ writeIpeFile' -- | Creates a single page ipe file with the given page -writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO () +writeIpePage :: IpeWriteText r => OsPath -> IpePage r -> IO () writeIpePage :: forall r. IpeWriteText r => OsPath -> IpePage r -> IO () -writeIpePage OsPath -fp = OsPath -> IpeFile r -> IO () +writeIpePage OsPath +fp = OsPath -> IpeFile r -> IO () forall r. IpeWriteText r => OsPath -> IpeFile r -> IO () writeIpeFile OsPath -fp (IpeFile r -> IO ()) +fp (IpeFile r -> IO ()) -> (IpePage r -> IpeFile r) -> IpePage r -> IO () forall b c a. (b -> c) -> (a -> b) -> a -> c . IpePage r -> IpeFile r @@ -92,7 +92,7 @@ -- | Convert the input to ipeXml, and prints it to standard out in such a way -- that the copied text can be pasted into ipe as a geometry object. -printAsIpeSelection :: IpeWrite t => t -> IO () +printAsIpeSelection :: IpeWrite t => t -> IO () printAsIpeSelection :: forall t. IpeWrite t => t -> IO () printAsIpeSelection = ByteString -> IO () C.putStrLn (ByteString -> IO ()) -> (t -> ByteString) -> t -> IO () @@ -108,7 +108,7 @@ toIpeSelectionXML -- | Convert input into an ipe selection. -toIpeSelectionXML :: IpeWrite t => t -> Maybe B.ByteString +toIpeSelectionXML :: IpeWrite t => t -> Maybe B.ByteString toIpeSelectionXML :: forall t. IpeWrite t => t -> Maybe ByteString toIpeSelectionXML = (NodeG [] Text Text -> ByteString) -> Maybe (NodeG [] Text Text) -> Maybe ByteString @@ -127,25 +127,25 @@ forall {tag} {text}. IsString tag => NodeG [] tag text -> NodeG [] tag text -ipeSelection) (Maybe (NodeG [] Text Text) -> Maybe ByteString) +ipeSelection) (Maybe (NodeG [] Text Text) -> Maybe ByteString) -> (t -> Maybe (NodeG [] Text Text)) -> t -> Maybe ByteString forall b c a. (b -> c) -> (a -> b) -> a -> c . t -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite where - ipeSelection :: NodeG [] tag text -> NodeG [] tag text -ipeSelection NodeG [] tag text -x = tag -> [(tag, text)] -> [NodeG [] tag text] -> NodeG [] tag text + ipeSelection :: NodeG [] tag text -> NodeG [] tag text +ipeSelection NodeG [] tag text +x = tag -> [(tag, text)] -> [NodeG [] tag text] -> NodeG [] tag text forall (c :: * -> *) tag text. tag -> [(tag, text)] -> c (NodeG c tag text) -> NodeG c tag text Element tag "ipeselection" [] [NodeG [] tag text -x] +x] -- | Convert to Ipe xml -toIpeXML :: IpeWrite t => t -> Maybe B.ByteString +toIpeXML :: IpeWrite t => t -> Maybe B.ByteString toIpeXML :: forall t. IpeWrite t => t -> Maybe ByteString toIpeXML = (NodeG [] Text Text -> ByteString) -> Maybe (NodeG [] Text Text) -> Maybe ByteString @@ -164,16 +164,16 @@ -- | Convert to ipe XML and write the output to a file. -writeIpeFile' :: IpeWrite t => t -> OsPath -> IO () +writeIpeFile' :: IpeWrite t => t -> OsPath -> IO () writeIpeFile' :: forall t. IpeWrite t => t -> OsPath -> IO () -writeIpeFile' t -i OsPath -fp = IO () -> (ByteString -> IO ()) -> Maybe ByteString -> IO () +writeIpeFile' t +i OsPath +fp = IO () -> (ByteString -> IO ()) -> Maybe ByteString -> IO () forall b a. b -> (a -> b) -> Maybe a -> b maybe IO () -err (OsPath -> ByteString -> IO () +err (OsPath -> ByteString -> IO () File.writeFile OsPath -fp) (Maybe ByteString -> IO ()) +fp) (Maybe ByteString -> IO ()) -> (t -> Maybe ByteString) -> t -> IO () forall b c a. (b -> c) -> (a -> b) -> a -> c . t -> Maybe ByteString @@ -181,10 +181,10 @@ toIpeXML (t -> IO ()) -> t -> IO () forall a b. (a -> b) -> a -> b $ t -i +i where - err :: IO () -err = Handle -> String -> IO () + err :: IO () +err = Handle -> String -> IO () hPutStrLn Handle stderr (String -> IO ()) -> String -> IO () forall a b. (a -> b) -> a -> b @@ -195,7 +195,7 @@ <> OsPath -> String forall a. Show a => a -> String show OsPath -fp String -> String -> String +fp String -> String -> String forall a. Semigroup a => a -> a -> a <> String "'not written" @@ -203,29 +203,29 @@ -------------------------------------------------------------------------------- -- | For types that can produce a text value -class IpeWriteText t where - ipeWriteText :: t -> Maybe Text +class IpeWriteText t where + ipeWriteText :: t -> Maybe Text -- | Types that correspond to an XML Element. All instances should produce an -- Element. If the type should produce a Node with the Text constructor, use -- the `IpeWriteText` typeclass instead. -class IpeWrite t where - ipeWrite :: t -> Maybe (Node Text Text) +class IpeWrite t where + ipeWrite :: t -> Maybe (Node Text Text) -instance IpeWrite t => IpeWrite [t] where - ipeWrite :: [t] -> Maybe (NodeG [] Text Text) -ipeWrite [t] -gs = case (t -> Maybe (NodeG [] Text Text)) -> [t] -> [NodeG [] Text Text] +instance IpeWrite t => IpeWrite [t] where + ipeWrite :: [t] -> Maybe (NodeG [] Text Text) +ipeWrite [t] +gs = case (t -> Maybe (NodeG [] Text Text)) -> [t] -> [NodeG [] Text Text] forall a b. (a -> Maybe b) -> [a] -> [b] mapMaybe t -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite [t] -gs of +gs of [] -> Maybe (NodeG [] Text Text) forall a. Maybe a Nothing - [NodeG [] Text Text] -ns -> (NodeG [] Text Text -> Maybe (NodeG [] Text Text) + [NodeG [] Text Text] +ns -> (NodeG [] Text Text -> Maybe (NodeG [] Text Text) forall a. a -> Maybe a Just (NodeG [] Text Text -> Maybe (NodeG [] Text Text)) -> NodeG [] Text Text -> Maybe (NodeG [] Text Text) @@ -236,10 +236,10 @@ tag -> [(tag, text)] -> c (NodeG c tag text) -> NodeG c tag text Element Text "group" [] [NodeG [] Text Text] -ns) +ns) -instance IpeWrite t => IpeWrite (NonEmpty t) where - ipeWrite :: NonEmpty t -> Maybe (NodeG [] Text Text) +instance IpeWrite t => IpeWrite (NonEmpty t) where + ipeWrite :: NonEmpty t -> Maybe (NodeG [] Text Text) ipeWrite = [t] -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite ([t] -> Maybe (NodeG [] Text Text)) @@ -250,8 +250,8 @@ forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList -instance (IpeWrite l, IpeWrite r) => IpeWrite (Either l r) where - ipeWrite :: Either l r -> Maybe (NodeG [] Text Text) +instance (IpeWrite l, IpeWrite r) => IpeWrite (Either l r) where + ipeWrite :: Either l r -> Maybe (NodeG [] Text Text) ipeWrite = (l -> Maybe (NodeG [] Text Text)) -> (r -> Maybe (NodeG [] Text Text)) -> Either l r @@ -263,22 +263,22 @@ forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite -instance IpeWriteText (Apply f at) => IpeWriteText (Attr f at) where - ipeWriteText :: Attr f at -> Maybe Text -ipeWriteText Attr f at -att = Attr f at -> Maybe (Apply f at) +instance IpeWriteText (Apply f at) => IpeWriteText (Attr f at) where + ipeWriteText :: Attr f at -> Maybe Text +ipeWriteText Attr f at +att = Attr f at -> Maybe (Apply f at) forall u (f :: TyFun u (*) -> *) (label :: u). Attr f label -> Maybe (Apply f label) _getAttr Attr f at -att Maybe (Apply f at) -> (Apply f at -> Maybe Text) -> Maybe Text +att Maybe (Apply f at) -> (Apply f at -> Maybe Text) -> Maybe Text forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= Apply f at -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText -instance (IpeWriteText l, IpeWriteText r) => IpeWriteText (Either l r) where - ipeWriteText :: Either l r -> Maybe Text +instance (IpeWriteText l, IpeWriteText r) => IpeWriteText (Either l r) where + ipeWriteText :: Either l r -> Maybe Text ipeWriteText = (l -> Maybe Text) -> (r -> Maybe Text) -> Either l r -> Maybe Text forall a c b. (a -> c) -> (b -> c) -> Either a b -> c either l -> Maybe Text @@ -289,19 +289,19 @@ -- | Functon to write all attributes in a Rec -ipeWriteAttrs :: ( RecordToList rs, RMap rs - , ReifyConstraint IpeWriteText (Attr f) rs - , AllConstrained IpeAttrName rs - , RecAll (Attr f) rs IpeWriteText - ) => IA.Attributes f rs -> [(Text,Text)] +ipeWriteAttrs :: ( RecordToList rs, RMap rs + , ReifyConstraint IpeWriteText (Attr f) rs + , AllConstrained IpeAttrName rs + , RecAll (Attr f) rs IpeWriteText + ) => IA.Attributes f rs -> [(Text,Text)] ipeWriteAttrs :: forall (rs :: [AttributeUniverse]) (f :: TyFun AttributeUniverse (*) -> *). (RecordToList rs, RMap rs, ReifyConstraint IpeWriteText (Attr f) rs, AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)] -ipeWriteAttrs (Attrs Rec (Attr f) rs -r) = [Maybe (Text, Text)] -> [(Text, Text)] +ipeWriteAttrs (Attrs Rec (Attr f) rs +r) = [Maybe (Text, Text)] -> [(Text, Text)] forall a. [Maybe a] -> [a] catMaybes ([Maybe (Text, Text)] -> [(Text, Text)]) -> (Rec (Const (Maybe (Text, Text))) rs -> [Maybe (Text, Text)]) @@ -334,37 +334,37 @@ forall (a :: AttributeUniverse). Const Text a -> Const (Maybe Text) a -> Const (Maybe (Text, Text)) a -f (Rec (Attr f) rs -> Rec (Const Text) rs +f (Rec (Attr f) rs -> Rec (Const Text) rs forall (rs :: [AttributeUniverse]) (f :: AttributeUniverse -> *). AllConstrained IpeAttrName rs => Rec f rs -> Rec (Const Text) rs writeAttrNames Rec (Attr f) rs -r) +r) (Rec (Attr f) rs -> Rec (Const (Maybe Text)) rs forall {u} (rs :: [u]) (f :: u -> *). (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => Rec f rs -> Rec (Const (Maybe Text)) rs writeAttrValues Rec (Attr f) rs -r) +r) where - f :: Const t b -> Const (f a) b -> Const (f (t, a)) b -f (Const t -n) (Const f a -mv) = f (t, a) -> Const (f (t, a)) b + f :: Const t b -> Const (f a) b -> Const (f (t, a)) b +f (Const t +n) (Const f a +mv) = f (t, a) -> Const (f (t, a)) b forall k a (b :: k). a -> Const a b Const (f (t, a) -> Const (f (t, a)) b) -> f (t, a) -> Const (f (t, a)) b forall a b. (a -> b) -> a -> b $ (t -n,) (a -> (t, a)) -> f a -> f (t, a) +n,) (a -> (t, a)) -> f a -> f (t, a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> f a -mv +mv -- | Writing the attribute values -writeAttrValues :: ( RMap rs, ReifyConstraint IpeWriteText f rs - , RecAll f rs IpeWriteText) - => Rec f rs -> Rec (Const (Maybe Text)) rs +writeAttrValues :: ( RMap rs, ReifyConstraint IpeWriteText f rs + , RecAll f rs IpeWriteText) + => Rec f rs -> Rec (Const (Maybe Text)) rs writeAttrValues :: forall {u} (rs :: [u]) (f :: u -> *). (RMap rs, ReifyConstraint IpeWriteText f rs, RecAll f rs IpeWriteText) => @@ -377,8 +377,8 @@ (forall (x :: u). f x -> g x) -> Rec f rs -> Rec g rs forall (f :: u -> *) (g :: u -> *). (forall (x :: u). f x -> g x) -> Rec f rs -> Rec g rs -rmap (\(Compose (Dict f x -x)) -> Maybe Text -> Const (Maybe Text) x +rmap (\(Compose (Dict f x +x)) -> Maybe Text -> Const (Maybe Text) x forall k a (b :: k). a -> Const a b Const (Maybe Text -> Const (Maybe Text) x) -> Maybe Text -> Const (Maybe Text) x @@ -386,7 +386,7 @@ $ f x -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText f x -x) +x) (Rec (Dict IpeWriteText :. f) rs -> Rec (Const (Maybe Text)) rs) -> (Rec f rs -> Rec (Dict IpeWriteText :. f) rs) -> Rec f rs @@ -402,13 +402,13 @@ instance IpeWriteText Text where - ipeWriteText :: Text -> Maybe Text + ipeWriteText :: Text -> Maybe Text ipeWriteText = Text -> Maybe Text forall a. a -> Maybe a Just instance IpeWriteText String where - ipeWriteText :: String -> Maybe Text + ipeWriteText :: String -> Maybe Text ipeWriteText = Text -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText (Text -> Maybe Text) -> (String -> Text) -> String -> Maybe Text @@ -419,11 +419,11 @@ -- | Add attributes to a node addAtts :: Node Text Text -> [(Text,Text)] -> Node Text Text -n :: NodeG [] Text Text -n@(Element {}) addAtts :: NodeG [] Text Text -> [(Text, Text)] -> NodeG [] Text Text -`addAtts` [(Text, Text)] -ats = NodeG [] Text Text -n { eAttributes = ats ++ eAttributes n } +n :: NodeG [] Text Text +n@(Element {}) addAtts :: NodeG [] Text Text -> [(Text, Text)] -> NodeG [] Text Text +`addAtts` [(Text, Text)] +ats = NodeG [] Text Text +n { eAttributes = ats ++ eAttributes n } NodeG [] Text Text _ `addAtts` [(Text, Text)] _ = String -> NodeG [] Text Text @@ -433,71 +433,71 @@ -- | Same as `addAtts` but then for a Maybe node mAddAtts :: Maybe (Node Text Text) -> [(Text, Text)] -> Maybe (Node Text Text) -Maybe (NodeG [] Text Text) -mn mAddAtts :: Maybe (NodeG [] Text Text) +Maybe (NodeG [] Text Text) +mn mAddAtts :: Maybe (NodeG [] Text Text) -> [(Text, Text)] -> Maybe (NodeG [] Text Text) -`mAddAtts` [(Text, Text)] -ats = (NodeG [] Text Text -> NodeG [] Text Text) +`mAddAtts` [(Text, Text)] +ats = (NodeG [] Text Text -> NodeG [] Text Text) -> Maybe (NodeG [] Text Text) -> Maybe (NodeG [] Text Text) forall a b. (a -> b) -> Maybe a -> Maybe b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap (NodeG [] Text Text -> [(Text, Text)] -> NodeG [] Text Text `addAtts` [(Text, Text)] -ats) Maybe (NodeG [] Text Text) -mn +ats) Maybe (NodeG [] Text Text) +mn -------------------------------------------------------------------------------- instance IpeWriteText Double where - ipeWriteText :: Double -> Maybe Text + ipeWriteText :: Double -> Maybe Text ipeWriteText = Double -> Maybe Text forall t. Show t => t -> Maybe Text writeByShow instance IpeWriteText Float where - ipeWriteText :: Float -> Maybe Text + ipeWriteText :: Float -> Maybe Text ipeWriteText = Float -> Maybe Text forall t. Show t => t -> Maybe Text writeByShow instance IpeWriteText Int where - ipeWriteText :: Int -> Maybe Text + ipeWriteText :: Int -> Maybe Text ipeWriteText = Int -> Maybe Text forall t. Show t => t -> Maybe Text writeByShow instance IpeWriteText Integer where - ipeWriteText :: Integer -> Maybe Text + ipeWriteText :: Integer -> Maybe Text ipeWriteText = Integer -> Maybe Text forall t. Show t => t -> Maybe Text writeByShow -instance IpeWriteText (RealNumber p) where - ipeWriteText :: RealNumber p -> Maybe Text +instance IpeWriteText (RealNumber p) where + ipeWriteText :: RealNumber p -> Maybe Text ipeWriteText = Rational -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText (Rational -> Maybe Text) -> (RealNumber p -> Rational) -> RealNumber p -> Maybe Text forall b c a. (b -> c) -> (a -> b) -> a -> c . forall a b. (Real a, Fractional b) => a -> b -realToFrac @(RealNumber p) @Rational +realToFrac @(RealNumber p) @Rational -instance HasResolution p => IpeWriteText (Fixed p) where - ipeWriteText :: Fixed p -> Maybe Text +instance HasResolution p => IpeWriteText (Fixed p) where + ipeWriteText :: Fixed p -> Maybe Text ipeWriteText = Fixed p -> Maybe Text forall t. Show t => t -> Maybe Text writeByShow -- | This instance converts the ratio to a Pico, and then displays that. -instance Integral a => IpeWriteText (Ratio a) where - ipeWriteText :: Ratio a -> Maybe Text +instance Integral a => IpeWriteText (Ratio a) where + ipeWriteText :: Ratio a -> Maybe Text ipeWriteText = Pico -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText (Pico -> Maybe Text) -> (Ratio a -> Pico) -> Ratio a -> Maybe Text forall b c a. (b -> c) -> (a -> b) -> a -> c . Pico -> Pico -f (Pico -> Pico) -> (Ratio a -> Pico) -> Ratio a -> Pico +f (Pico -> Pico) -> (Ratio a -> Pico) -> Ratio a -> Pico forall b c a. (b -> c) -> (a -> b) -> a -> c . Rational -> Pico forall a. Fractional a => Rational -> a @@ -507,13 +507,13 @@ forall a. Real a => a -> Rational toRational where - f :: Pico -> Pico - f :: Pico -> Pico -f = Pico -> Pico + f :: Pico -> Pico + f :: Pico -> Pico +f = Pico -> Pico forall a. a -> a id -writeByShow :: Show t => t -> Maybe Text +writeByShow :: Show t => t -> Maybe Text writeByShow :: forall t. Show t => t -> Maybe Text writeByShow = Text -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text @@ -559,37 +559,37 @@ sequence -instance IpeWriteText r => IpeWriteText (Point 2 r) where - ipeWriteText :: Point 2 r -> Maybe Text -ipeWriteText (Point2 r -x r -y) = [Maybe Text] -> Maybe Text +instance IpeWriteText r => IpeWriteText (Point 2 r) where + ipeWriteText :: Point 2 r -> Maybe Text +ipeWriteText (Point2 r +x r +y) = [Maybe Text] -> Maybe Text unwords' [r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText r -x, r -> Maybe Text +x, r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText r -y] +y] -------------------------------------------------------------------------------- -instance IpeWriteText v => IpeWriteText (IpeValue v) where - ipeWriteText :: IpeValue v -> Maybe Text -ipeWriteText (Named Text -t) = Text -> Maybe Text +instance IpeWriteText v => IpeWriteText (IpeValue v) where + ipeWriteText :: IpeValue v -> Maybe Text +ipeWriteText (Named Text +t) = Text -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Text -t - ipeWriteText (Valued v -v) = v -> Maybe Text +t + ipeWriteText (Valued v +v) = v -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText v -v +v instance IpeWriteText TransformationTypes where - ipeWriteText :: TransformationTypes -> Maybe Text + ipeWriteText :: TransformationTypes -> Maybe Text ipeWriteText TransformationTypes Affine = Text -> Maybe Text forall a. a -> Maybe a @@ -607,7 +607,7 @@ "translations" instance IpeWriteText PinType where - ipeWriteText :: PinType -> Maybe Text + ipeWriteText :: PinType -> Maybe Text ipeWriteText PinType No = Maybe Text forall a. Maybe a @@ -628,12 +628,12 @@ Just Text "v" -instance IpeWriteText r => IpeWriteText (RGB r) where - ipeWriteText :: RGB r -> Maybe Text -ipeWriteText (RGB r -r r -g r -b) = [Maybe Text] -> Maybe Text +instance IpeWriteText r => IpeWriteText (RGB r) where + ipeWriteText :: RGB r -> Maybe Text +ipeWriteText (RGB r +r r +g r +b) = [Maybe Text] -> Maybe Text unwords' ([Maybe Text] -> Maybe Text) -> ([r] -> [Maybe Text]) -> [r] -> Maybe Text forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -644,36 +644,36 @@ ipeWriteText ([r] -> Maybe Text) -> [r] -> Maybe Text forall a b. (a -> b) -> a -> b $ [r -r,r -g,r -b] +r,r +g,r +b] -deriving instance IpeWriteText r => IpeWriteText (IpeSize r) -deriving instance IpeWriteText r => IpeWriteText (IpePen r) -deriving instance IpeWriteText r => IpeWriteText (IpeColor r) +deriving instance IpeWriteText r => IpeWriteText (IpeSize r) +deriving instance IpeWriteText r => IpeWriteText (IpePen r) +deriving instance IpeWriteText r => IpeWriteText (IpeColor r) -instance IpeWriteText r => IpeWriteText (IpeDash r) where - ipeWriteText :: IpeDash r -> Maybe Text -ipeWriteText (DashNamed Text -t) = Text -> Maybe Text +instance IpeWriteText r => IpeWriteText (IpeDash r) where + ipeWriteText :: IpeDash r -> Maybe Text +ipeWriteText (DashNamed Text +t) = Text -> Maybe Text forall a. a -> Maybe a Just Text -t - ipeWriteText (DashPattern [r] -xs r -x) = (\[Text] -ts Text -t -> [Text] -> Text +t + ipeWriteText (DashPattern [r] +xs r +x) = (\[Text] +ts Text +t -> [Text] -> Text forall a. Monoid a => [a] -> a mconcat [ Text "[" , Text -> [Text] -> Text Text.intercalate Text " " [Text] -ts +ts , Text "] ", Text -t ]) +t ]) ([Text] -> Text -> Text) -> Maybe [Text] -> Maybe (Text -> Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (r -> Maybe Text) -> [r] -> Maybe [Text] @@ -684,17 +684,17 @@ mapM r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText [r] -xs +xs Maybe (Text -> Text) -> Maybe Text -> Maybe Text forall a b. Maybe (a -> b) -> Maybe a -> Maybe b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText r -x +x instance IpeWriteText FillType where - ipeWriteText :: FillType -> Maybe Text + ipeWriteText :: FillType -> Maybe Text ipeWriteText FillType Wind = Text -> Maybe Text forall a. a -> Maybe a @@ -706,40 +706,40 @@ Just Text "eofill" -instance IpeWriteText r => IpeWriteText (IpeArrow r) where - ipeWriteText :: IpeArrow r -> Maybe Text -ipeWriteText (IpeArrow Text -n IpeSize r -s) = (\Text -n' Text -s' -> Text -n' Text -> Text -> Text +instance IpeWriteText r => IpeWriteText (IpeArrow r) where + ipeWriteText :: IpeArrow r -> Maybe Text +ipeWriteText (IpeArrow Text +n IpeSize r +s) = (\Text +n' Text +s' -> Text +n' Text -> Text -> Text forall a. Semigroup a => a -> a -> a <> Text "/" Text -> Text -> Text forall a. Semigroup a => a -> a -> a <> Text -s') (Text -> Text -> Text) -> Maybe Text -> Maybe (Text -> Text) +s') (Text -> Text -> Text) -> Maybe Text -> Maybe (Text -> Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Text -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Text -n +n Maybe (Text -> Text) -> Maybe Text -> Maybe Text forall a b. Maybe (a -> b) -> Maybe a -> Maybe b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> IpeSize r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText IpeSize r -s +s -instance IpeWriteText r => IpeWriteText (Path r) where - ipeWriteText :: Path r -> Maybe Text +instance IpeWriteText r => IpeWriteText (Path r) where + ipeWriteText :: Path r -> Maybe Text ipeWriteText = (Seq Text -> Text) -> Maybe (Seq Text) -> Maybe Text forall a b. (a -> b) -> Maybe a -> Maybe b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap Seq Text -> Text -concat' (Maybe (Seq Text) -> Maybe Text) +concat' (Maybe (Seq Text) -> Maybe Text) -> (Path r -> Maybe (Seq Text)) -> Path r -> Maybe Text forall b c a. (b -> c) -> (a -> b) -> a -> c . Seq (Maybe Text) -> Maybe (Seq Text) @@ -769,24 +769,24 @@ -> p (Path r1) (f (Path r2)) pathSegments where - concat' :: Seq Text -> Text -concat' = (Text -> Text -> Text) -> Seq Text -> Text + concat' :: Seq Text -> Text +concat' = (Text -> Text -> Text) -> Seq Text -> Text forall a. (a -> a -> a) -> Seq a -> a forall (t :: * -> *) a. Foldable t => (a -> a -> a) -> t a -> a -F.foldr1 (\Text -t Text -t' -> Text -t Text -> Text -> Text +F.foldr1 (\Text +t Text +t' -> Text +t Text -> Text -> Text forall a. Semigroup a => a -> a -> a <> Text "\n" Text -> Text -> Text forall a. Semigroup a => a -> a -> a <> Text -t') +t') instance IpeWriteText HorizontalAlignment where - ipeWriteText :: HorizontalAlignment -> Maybe Text + ipeWriteText :: HorizontalAlignment -> Maybe Text ipeWriteText = \case HorizontalAlignment AlignLeft -> Text -> Maybe Text @@ -805,7 +805,7 @@ "right" instance IpeWriteText VerticalAlignment where - ipeWriteText :: VerticalAlignment -> Maybe Text + ipeWriteText :: VerticalAlignment -> Maybe Text ipeWriteText = \case VerticalAlignment AlignTop -> Text -> Maybe Text @@ -829,153 +829,153 @@ "baseline" -------------------------------------------------------------------------------- -instance IpeWriteText r => IpeWrite (IpeSymbol r) where - ipeWrite :: IpeSymbol r -> Maybe (NodeG [] Text Text) -ipeWrite (Symbol Point 2 r -p Text -n) = Text -> NodeG [] Text Text -f (Text -> NodeG [] Text Text) +instance IpeWriteText r => IpeWrite (IpeSymbol r) where + ipeWrite :: IpeSymbol r -> Maybe (NodeG [] Text Text) +ipeWrite (Symbol Point 2 r +p Text +n) = Text -> NodeG [] Text Text +f (Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (NodeG [] Text Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p +p where - f :: Text -> NodeG [] Text Text -f Text -ps = Text + f :: Text -> NodeG [] Text Text +f Text +ps = Text -> [(Text, Text)] -> [NodeG [] Text Text] -> NodeG [] Text Text forall (c :: * -> *) tag text. tag -> [(tag, text)] -> c (NodeG c tag text) -> NodeG c tag text Element Text "use" [ (Text "pos", Text -ps) +ps) , (Text "name", Text -n) +n) ] [] -------------------------------------------------------------------------------- -instance IpeWriteText r => IpeWriteText (Matrix.Matrix 3 3 r) where - ipeWriteText :: Matrix 3 3 r -> Maybe Text -ipeWriteText (Matrix.Matrix Vector 3 (Vector 3 r) -m) = [Maybe Text] -> Maybe Text +instance IpeWriteText r => IpeWriteText (Matrix.Matrix 3 3 r) where + ipeWriteText :: Matrix 3 3 r -> Maybe Text +ipeWriteText (Matrix.Matrix Vector 3 (Vector 3 r) +m) = [Maybe Text] -> Maybe Text unwords' [Maybe Text -a,Maybe Text -b,Maybe Text -c,Maybe Text -d,Maybe Text -e,Maybe Text -f] +a,Maybe Text +b,Maybe Text +c,Maybe Text +d,Maybe Text +e,Maybe Text +f] where - (Vector3 Vector 3 r -r1 Vector 3 r -r2 Vector 3 r + (Vector3 Vector 3 r +r1 Vector 3 r +r2 Vector 3 r _) = Vector 3 (Vector 3 r) -m +m - (Vector3 Maybe Text -a Maybe Text -c Maybe Text -e) = r -> Maybe Text + (Vector3 Maybe Text +a Maybe Text +c Maybe Text +e) = r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText (r -> Maybe Text) -> Vector 3 r -> Vector 3 (Maybe Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Vector 3 r -r1 - (Vector3 Maybe Text -b Maybe Text -d Maybe Text -f) = r -> Maybe Text +r1 + (Vector3 Maybe Text +b Maybe Text +d Maybe Text +f) = r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText (r -> Maybe Text) -> Vector 3 r -> Vector 3 (Maybe Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Vector 3 r -r2 +r2 -- TODO: The third row should be (0,0,1) I guess. -instance IpeWriteText r => IpeWriteText (Operation r) where - ipeWriteText :: Operation r -> Maybe Text -ipeWriteText (MoveTo Point 2 r -p) = [Maybe Text] -> Maybe Text +instance IpeWriteText r => IpeWriteText (Operation r) where + ipeWriteText :: Operation r -> Maybe Text +ipeWriteText (MoveTo Point 2 r +p) = [Maybe Text] -> Maybe Text unwords' [ Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p, Text -> Maybe Text +p, Text -> Maybe Text forall a. a -> Maybe a Just Text "m"] - ipeWriteText (LineTo Point 2 r -p) = [Maybe Text] -> Maybe Text + ipeWriteText (LineTo Point 2 r +p) = [Maybe Text] -> Maybe Text unwords' [ Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p, Text -> Maybe Text +p, Text -> Maybe Text forall a. a -> Maybe a Just Text "l"] - ipeWriteText (CurveTo Point 2 r -p Point 2 r -q Point 2 r -r) = [Maybe Text] -> Maybe Text + ipeWriteText (CurveTo Point 2 r +p Point 2 r +q Point 2 r +r) = [Maybe Text] -> Maybe Text unwords' [ Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p +p , Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -q +q , Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -r, Text -> Maybe Text +r, Text -> Maybe Text forall a. a -> Maybe a Just Text "c"] - ipeWriteText (QCurveTo Point 2 r -p Point 2 r -q) = [Maybe Text] -> Maybe Text + ipeWriteText (QCurveTo Point 2 r +p Point 2 r +q) = [Maybe Text] -> Maybe Text unwords' [ Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p +p , Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -q, Text -> Maybe Text +q, Text -> Maybe Text forall a. a -> Maybe a Just Text "q"] - ipeWriteText (Ellipse Matrix 3 3 r -m) = [Maybe Text] -> Maybe Text + ipeWriteText (Ellipse Matrix 3 3 r +m) = [Maybe Text] -> Maybe Text unwords' [ Matrix 3 3 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Matrix 3 3 r -m, Text -> Maybe Text +m, Text -> Maybe Text forall a. a -> Maybe a Just Text "e"] - ipeWriteText (ArcTo Matrix 3 3 r -m Point 2 r -p) = [Maybe Text] -> Maybe Text + ipeWriteText (ArcTo Matrix 3 3 r +m Point 2 r +p) = [Maybe Text] -> Maybe Text unwords' [ Matrix 3 3 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Matrix 3 3 r -m +m , Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p, Text -> Maybe Text +p, Text -> Maybe Text forall a. a -> Maybe a Just Text "a"] - ipeWriteText (Spline [Point 2 r] -pts) = [Maybe Text] -> Maybe Text + ipeWriteText (Spline [Point 2 r] +pts) = [Maybe Text] -> Maybe Text unlines' ([Maybe Text] -> Maybe Text) -> [Maybe Text] -> Maybe Text forall a b. (a -> b) -> a -> b $ (Point 2 r -> Maybe Text) -> [Point 2 r] -> [Maybe Text] @@ -983,14 +983,14 @@ map Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText [Point 2 r] -pts [Maybe Text] -> [Maybe Text] -> [Maybe Text] +pts [Maybe Text] -> [Maybe Text] -> [Maybe Text] forall a. Semigroup a => a -> a -> a <> [Text -> Maybe Text forall a. a -> Maybe a Just Text "s"] - ipeWriteText (ClosedSpline [Point 2 r] -pts) = [Maybe Text] -> Maybe Text + ipeWriteText (ClosedSpline [Point 2 r] +pts) = [Maybe Text] -> Maybe Text unlines' ([Maybe Text] -> Maybe Text) -> [Maybe Text] -> Maybe Text forall a b. (a -> b) -> a -> b $ (Point 2 r -> Maybe Text) -> [Point 2 r] -> [Maybe Text] @@ -998,7 +998,7 @@ map Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText [Point 2 r] -pts [Maybe Text] -> [Maybe Text] -> [Maybe Text] +pts [Maybe Text] -> [Maybe Text] -> [Maybe Text] forall a. Semigroup a => a -> a -> a <> [Text -> Maybe Text forall a. a -> Maybe a @@ -1011,11 +1011,11 @@ "h" -instance (IpeWriteText r, Point_ point 2 r) => IpeWriteText (PolyLine point) where - ipeWriteText :: PolyLine point -> Maybe Text -ipeWriteText PolyLine point -pl = case PolyLine point -plPolyLine point +instance (IpeWriteText r, Point_ point 2 r) => IpeWriteText (PolyLine point) where + ipeWriteText :: PolyLine point -> Maybe Text +ipeWriteText PolyLine point +pl = case PolyLine point +plPolyLine point -> Getting (Endo [Point 2 r]) (PolyLine point) (Point 2 r) -> [Point 2 r] forall s a. s -> Getting (Endo [a]) s a -> [a] @@ -1047,9 +1047,9 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint of - (Point 2 r -p : [Point 2 r] -rest) -> [Maybe Text] -> Maybe Text + (Point 2 r +p : [Point 2 r] +rest) -> [Maybe Text] -> Maybe Text unlines' ([Maybe Text] -> Maybe Text) -> ([Operation r] -> [Maybe Text]) -> [Operation r] -> Maybe Text forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -1062,14 +1062,14 @@ $ Point 2 r -> Operation r forall r. Point 2 r -> Operation r MoveTo Point 2 r -p Operation r -> [Operation r] -> [Operation r] +p Operation r -> [Operation r] -> [Operation r] forall a. a -> [a] -> [a] : (Point 2 r -> Operation r) -> [Point 2 r] -> [Operation r] forall a b. (a -> b) -> [a] -> [b] map Point 2 r -> Operation r forall r. Point 2 r -> Operation r LineTo [Point 2 r] -rest +rest [Point 2 r] _ -> String -> Maybe Text forall a. HasCallStack => String -> a @@ -1077,10 +1077,10 @@ "ipeWriteText. absurd. no vertices polyline" -- the polyline type guarantees that there is at least one point -instance (IpeWriteText r, Point_ point 2 r) => IpeWriteText (SimplePolygon point) where - ipeWriteText :: SimplePolygon point -> Maybe Text -ipeWriteText SimplePolygon point -pg = case Getting +instance (IpeWriteText r, Point_ point 2 r) => IpeWriteText (SimplePolygon point) where + ipeWriteText :: SimplePolygon point -> Maybe Text +ipeWriteText SimplePolygon point +pg = case Getting (NonEmptyDList (Point 2 r)) (SimplePolygon point) (Point 2 r) -> SimplePolygon point -> NonEmpty (Point 2 r) forall a s. Getting (NonEmptyDList a) s a -> s -> NonEmpty a @@ -1114,10 +1114,10 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) SimplePolygon point -pg of - (Point 2 r -p :| [Point 2 r] -rest) -> [Maybe Text] -> Maybe Text +pg of + (Point 2 r +p :| [Point 2 r] +rest) -> [Maybe Text] -> Maybe Text unlines' ([Maybe Text] -> Maybe Text) -> ([Operation r] -> [Maybe Text]) -> [Operation r] -> Maybe Text forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -1131,21 +1131,21 @@ $ Point 2 r -> Operation r forall r. Point 2 r -> Operation r MoveTo Point 2 r -p Operation r -> [Operation r] -> [Operation r] +p Operation r -> [Operation r] -> [Operation r] forall a. a -> [a] -> [a] : (Point 2 r -> Operation r) -> [Point 2 r] -> [Operation r] forall a b. (a -> b) -> [a] -> [b] map Point 2 r -> Operation r forall r. Point 2 r -> Operation r LineTo [Point 2 r] -rest [Operation r] -> [Operation r] -> [Operation r] +rest [Operation r] -> [Operation r] -> [Operation r] forall a. [a] -> [a] -> [a] ++ [Operation r forall r. Operation r ClosePath] -instance (IpeWriteText r, Point_ point 2 r) => IpeWriteText (CubicBezier point) where - ipeWriteText :: CubicBezier point -> Maybe Text +instance (IpeWriteText r, Point_ point 2 r) => IpeWriteText (CubicBezier point) where + ipeWriteText :: CubicBezier point -> Maybe Text ipeWriteText ((point -> Point 2 r) -> CubicBezier point -> BezierSplineF (Vector 4) (Point 2 r) forall a b. @@ -1159,11 +1159,11 @@ Point_ point d r => Lens' point (Point d r) Lens' point (Point 2 r) -asPoint) -> Bezier3 Point 2 r -p Point 2 r -q Point 2 r -r Point 2 r -s) = +asPoint) -> Bezier3 Point 2 r +p Point 2 r +q Point 2 r +r Point 2 r +s) = [Maybe Text] -> Maybe Text unlines' ([Maybe Text] -> Maybe Text) -> ([Operation r] -> [Maybe Text]) -> [Operation r] -> Maybe Text @@ -1177,34 +1177,34 @@ $ [Point 2 r -> Operation r forall r. Point 2 r -> Operation r MoveTo Point 2 r -p, Point 2 r -> Point 2 r -> Point 2 r -> Operation r +p, Point 2 r -> Point 2 r -> Point 2 r -> Operation r forall r. Point 2 r -> Point 2 r -> Point 2 r -> Operation r CurveTo Point 2 r -q Point 2 r -r Point 2 r -s] +q Point 2 r +r Point 2 r +s] -instance IpeWriteText r => IpeWriteText (PathSegment r) where - ipeWriteText :: PathSegment r -> Maybe Text -ipeWriteText (PolyLineSegment PolyLine (Point 2 r) -p) = PolyLine (Point 2 r) -> Maybe Text +instance IpeWriteText r => IpeWriteText (PathSegment r) where + ipeWriteText :: PathSegment r -> Maybe Text +ipeWriteText (PolyLineSegment PolyLine (Point 2 r) +p) = PolyLine (Point 2 r) -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText PolyLine (Point 2 r) -p - ipeWriteText (PolygonPath SimplePolygon (Point 2 r) -p) = SimplePolygon (Point 2 r) -> Maybe Text +p + ipeWriteText (PolygonPath SimplePolygon (Point 2 r) +p) = SimplePolygon (Point 2 r) -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText SimplePolygon (Point 2 r) -p - ipeWriteText (EllipseSegment Ellipse r -e) = Operation r -> Maybe Text +p + ipeWriteText (EllipseSegment Ellipse r +e) = Operation r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText (Operation r -> Maybe Text) -> Operation r -> Maybe Text forall a b. (a -> b) -> a -> b $ Matrix 3 3 r -> Operation r forall r. Matrix 3 3 r -> Operation r Ellipse (Ellipse r -eEllipse r +eEllipse r -> Getting (Matrix 3 3 r) (Ellipse r) (Matrix 3 3 r) -> Matrix 3 3 r forall s a. s -> Getting a s a -> a @@ -1214,22 +1214,22 @@ p (Matrix 3 3 r) (f (Matrix 3 3 s)) -> p (Ellipse r) (f (Ellipse s)) ellipseMatrix) - ipeWriteText (CubicBezierSegment CubicBezier (Point 2 r) -b) = CubicBezier (Point 2 r) -> Maybe Text + ipeWriteText (CubicBezierSegment CubicBezier (Point 2 r) +b) = CubicBezier (Point 2 r) -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText CubicBezier (Point 2 r) -b +b ipeWriteText PathSegment r _ = String -> Maybe Text forall a. HasCallStack => String -> a error String "ipeWriteText: PathSegment, not implemented yet." -instance IpeWriteText r => IpeWrite (Path r) where - ipeWrite :: Path r -> Maybe (NodeG [] Text Text) -ipeWrite Path r -p = (\Text -t -> Text +instance IpeWriteText r => IpeWrite (Path r) where + ipeWrite :: Path r -> Maybe (NodeG [] Text Text) +ipeWrite Path r +p = (\Text +t -> Text -> [(Text, Text)] -> [NodeG [] Text Text] -> NodeG [] Text Text forall (c :: * -> *) tag text. tag -> [(tag, text)] -> c (NodeG c tag text) -> NodeG c tag text @@ -1237,39 +1237,39 @@ "path" [] [Text -> NodeG [] Text Text forall (c :: * -> *) tag text. text -> NodeG c tag text Text Text -t]) (Text -> NodeG [] Text Text) +t]) (Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (NodeG [] Text Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Path r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Path r -p +p -------------------------------------------------------------------------------- -instance (IpeWriteText r) => IpeWrite (Group r) where - ipeWrite :: Group r -> Maybe (NodeG [] Text Text) -ipeWrite (Group [IpeObject r] -gs) = [IpeObject r] -> Maybe (NodeG [] Text Text) +instance (IpeWriteText r) => IpeWrite (Group r) where + ipeWrite :: Group r -> Maybe (NodeG [] Text Text) +ipeWrite (Group [IpeObject r] +gs) = [IpeObject r] -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite [IpeObject r] -gs +gs -instance ( AllConstrained IpeAttrName rs - , RecordToList rs, RMap rs - , ReifyConstraint IpeWriteText (Attr f) rs - , RecAll (Attr f) rs IpeWriteText - , IpeWrite g - ) => IpeWrite (g :+ IA.Attributes f rs) where - ipeWrite :: (g :+ Attributes f rs) -> Maybe (NodeG [] Text Text) -ipeWrite (g -g :+ Attributes f rs -ats) = g -> Maybe (NodeG [] Text Text) +instance ( AllConstrained IpeAttrName rs + , RecordToList rs, RMap rs + , ReifyConstraint IpeWriteText (Attr f) rs + , RecAll (Attr f) rs IpeWriteText + , IpeWrite g + ) => IpeWrite (g :+ IA.Attributes f rs) where + ipeWrite :: (g :+ Attributes f rs) -> Maybe (NodeG [] Text Text) +ipeWrite (g +g :+ Attributes f rs +ats) = g -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite g -g Maybe (NodeG [] Text Text) +g Maybe (NodeG [] Text Text) -> [(Text, Text)] -> Maybe (NodeG [] Text Text) `mAddAtts` Attributes f rs -> [(Text, Text)] forall (rs :: [AttributeUniverse]) @@ -1279,17 +1279,17 @@ AllConstrained IpeAttrName rs, RecAll (Attr f) rs IpeWriteText) => Attributes f rs -> [(Text, Text)] ipeWriteAttrs Attributes f rs -ats +ats -instance IpeWriteText r => IpeWrite (MiniPage r) where - ipeWrite :: MiniPage r -> Maybe (NodeG [] Text Text) -ipeWrite (MiniPage Text -t Point 2 r -p r -w) = (\Text -pt Text -wt -> +instance IpeWriteText r => IpeWrite (MiniPage r) where + ipeWrite :: MiniPage r -> Maybe (NodeG [] Text Text) +ipeWrite (MiniPage Text +t Point 2 r +p r +w) = (\Text +pt Text +wt -> Text -> [(Text, Text)] -> [NodeG [] Text Text] -> NodeG [] Text Text forall (c :: * -> *) tag text. @@ -1297,24 +1297,24 @@ Element Text "text" [ (Text "pos", Text -pt) +pt) , (Text "type", Text "minipage") , (Text "width", Text -wt) +wt) ] [Text -> NodeG [] Text Text forall (c :: * -> *) tag text. text -> NodeG c tag text Text Text -t] +t] ) (Text -> Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (Text -> NodeG [] Text Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p +p Maybe (Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (NodeG [] Text Text) forall a b. Maybe (a -> b) -> Maybe a -> Maybe b @@ -1322,17 +1322,17 @@ <*> r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText r -w +w -instance IpeWriteText r => IpeWrite (Image r) where - ipeWrite :: Image r -> Maybe (NodeG [] Text Text) -ipeWrite (Image () -d (Box Point 2 r -a Point 2 r -b)) = (\Text -dt Text -p Text -q -> +instance IpeWriteText r => IpeWrite (Image r) where + ipeWrite :: Image r -> Maybe (NodeG [] Text Text) +ipeWrite (Image () +d (Box Point 2 r +a Point 2 r +b)) = (\Text +dt Text +p Text +q -> Text -> [(Text, Text)] -> [NodeG [] Text Text] -> NodeG [] Text Text forall (c :: * -> *) tag text. @@ -1340,16 +1340,16 @@ Element Text "image" [(Text "rect", Text -p Text -> Text -> Text +p Text -> Text -> Text forall a. Semigroup a => a -> a -> a <> Text " " Text -> Text -> Text forall a. Semigroup a => a -> a -> a <> Text -q)] [Text -> NodeG [] Text Text +q)] [Text -> NodeG [] Text Text forall (c :: * -> *) tag text. text -> NodeG c tag text Text Text -dt] +dt] ) (Text -> Text -> Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (Text -> Text -> NodeG [] Text Text) @@ -1357,7 +1357,7 @@ <$> () -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText () -d +d Maybe (Text -> Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (Text -> NodeG [] Text Text) forall a b. Maybe (a -> b) -> Maybe a -> Maybe b @@ -1365,7 +1365,7 @@ <*> Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -a +a Maybe (Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (NodeG [] Text Text) forall a b. Maybe (a -> b) -> Maybe a -> Maybe b @@ -1373,21 +1373,21 @@ <*> Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -b +b -- TODO: Replace this one with s.t. that writes the actual image payload instance IpeWriteText () where - ipeWriteText :: () -> Maybe Text + ipeWriteText :: () -> Maybe Text ipeWriteText () = Maybe Text forall a. Maybe a Nothing -instance IpeWriteText r => IpeWrite (TextLabel r) where - ipeWrite :: TextLabel r -> Maybe (NodeG [] Text Text) -ipeWrite (Label Text -t Point 2 r -p) = (\Text -pt -> +instance IpeWriteText r => IpeWrite (TextLabel r) where + ipeWrite :: TextLabel r -> Maybe (NodeG [] Text Text) +ipeWrite (Label Text +t Point 2 r +p) = (\Text +pt -> Text -> [(Text, Text)] -> [NodeG [] Text Text] -> NodeG [] Text Text forall (c :: * -> *) tag text. @@ -1395,27 +1395,27 @@ Element Text "text" [(Text "pos", Text -pt) +pt) ,(Text "type", Text "label") ] [Text -> NodeG [] Text Text forall (c :: * -> *) tag text. text -> NodeG c tag text Text Text -t] +t] ) (Text -> NodeG [] Text Text) -> Maybe Text -> Maybe (NodeG [] Text Text) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Point 2 r -> Maybe Text forall t. IpeWriteText t => t -> Maybe Text ipeWriteText Point 2 r -p +p -instance (IpeWriteText r) => IpeWrite (IpeObject r) where - ipeWrite :: IpeObject r -> Maybe (NodeG [] Text Text) -ipeWrite (IpeGroup IpeObject' Group r -g) = (Group r +instance (IpeWriteText r) => IpeWrite (IpeObject r) where + ipeWrite :: IpeObject r -> Maybe (NodeG [] Text Text) +ipeWrite (IpeGroup IpeObject' Group r +g) = (Group r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]) -> Maybe (NodeG [] Text Text) @@ -1423,30 +1423,30 @@ ipeWrite Group r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip] IpeObject' Group r -g - ipeWrite (IpeImage IpeObject' Image r -i) = (Image r :+ Attributes' r CommonAttributes) +g + ipeWrite (IpeImage IpeObject' Image r +i) = (Image r :+ Attributes' r CommonAttributes) -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite Image r :+ Attributes' r CommonAttributes IpeObject' Image r -i - ipeWrite (IpeTextLabel IpeObject' TextLabel r -l) = (TextLabel r :+ Attributes' r CommonAttributes) +i + ipeWrite (IpeTextLabel IpeObject' TextLabel r +l) = (TextLabel r :+ Attributes' r CommonAttributes) -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite TextLabel r :+ Attributes' r CommonAttributes IpeObject' TextLabel r -l - ipeWrite (IpeMiniPage IpeObject' MiniPage r -m) = (MiniPage r :+ Attributes' r CommonAttributes) +l + ipeWrite (IpeMiniPage IpeObject' MiniPage r +m) = (MiniPage r :+ Attributes' r CommonAttributes) -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite MiniPage r :+ Attributes' r CommonAttributes IpeObject' MiniPage r -m - ipeWrite (IpeUse IpeObject' IpeSymbol r -s) = (IpeSymbol r +m + ipeWrite (IpeUse IpeObject' IpeSymbol r +s) = (IpeSymbol r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen, @@ -1459,9 +1459,9 @@ '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen, 'Size] IpeObject' IpeSymbol r -s - ipeWrite (IpePath IpeObject' Path r -p) = (Path r +s + ipeWrite (IpePath IpeObject' Path r +p) = (Path r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash, @@ -1476,16 +1476,16 @@ 'Pen, 'LineCap, 'LineJoin, 'FillRule, 'Arrow, 'RArrow, 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] IpeObject' Path r -p +p -------------------------------------------------------------------------------- -deriving instance IpeWriteText LayerName +deriving instance IpeWriteText LayerName instance IpeWrite LayerName where - ipeWrite :: LayerName -> Maybe (NodeG [] Text Text) -ipeWrite (LayerName Text -n) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) + ipeWrite :: LayerName -> Maybe (NodeG [] Text Text) +ipeWrite (LayerName Text +n) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) forall a. a -> Maybe a Just (NodeG [] Text Text -> Maybe (NodeG [] Text Text)) -> NodeG [] Text Text -> Maybe (NodeG [] Text Text) @@ -1497,13 +1497,13 @@ Element Text "layer" [(Text "name",Text -n)] [] +n)] [] instance IpeWrite View where - ipeWrite :: View -> Maybe (NodeG [] Text Text) -ipeWrite (View [LayerName] -lrs LayerName -act) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) + ipeWrite :: View -> Maybe (NodeG [] Text Text) +ipeWrite (View [LayerName] +lrs LayerName +act) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) forall a. a -> Maybe a Just (NodeG [] Text Text -> Maybe (NodeG [] Text Text)) -> NodeG [] Text Text -> Maybe (NodeG [] Text Text) @@ -1515,18 +1515,18 @@ Element Text "view" [ (Text "layers", Text -ls) +ls) , (Text "active", LayerName -actLayerName -> Getting Text LayerName Text -> Text +actLayerName -> Getting Text LayerName Text -> Text forall s a. s -> Getting a s a -> a ^.Getting Text LayerName Text Iso' LayerName Text layerName) ] [] where - ls :: Text -ls = [Text] -> Text + ls :: Text +ls = [Text] -> Text Text.unwords ([Text] -> Text) -> ([LayerName] -> [Text]) -> [LayerName] -> Text forall b c a. (b -> c) -> (a -> b) -> a -> c . (LayerName -> Text) -> [LayerName] -> [Text] @@ -1538,14 +1538,14 @@ layerName) ([LayerName] -> Text) -> [LayerName] -> Text forall a b. (a -> b) -> a -> b $ [LayerName] -lrs +lrs -instance (IpeWriteText r) => IpeWrite (IpePage r) where - ipeWrite :: IpePage r -> Maybe (NodeG [] Text Text) -ipeWrite (IpePage [LayerName] -lrs [View] -vs [IpeObject r] -objs) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) +instance (IpeWriteText r) => IpeWrite (IpePage r) where + ipeWrite :: IpePage r -> Maybe (NodeG [] Text Text) +ipeWrite (IpePage [LayerName] +lrs [View] +vs [IpeObject r] +objs) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) forall a. a -> Maybe a Just (NodeG [] Text Text -> Maybe (NodeG [] Text Text)) -> ([[Maybe (NodeG [] Text Text)]] -> NodeG [] Text Text) @@ -1582,39 +1582,39 @@ map LayerName -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite [LayerName] -lrs +lrs , (View -> Maybe (NodeG [] Text Text)) -> [View] -> [Maybe (NodeG [] Text Text)] forall a b. (a -> b) -> [a] -> [b] map View -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite [View] -vs +vs , (IpeObject r -> Maybe (NodeG [] Text Text)) -> [IpeObject r] -> [Maybe (NodeG [] Text Text)] forall a b. (a -> b) -> [a] -> [b] map IpeObject r -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite [IpeObject r] -objs +objs ] instance IpeWrite IpeStyle where - ipeWrite :: IpeStyle -> Maybe (NodeG [] Text Text) + ipeWrite :: IpeStyle -> Maybe (NodeG [] Text Text) ipeWrite (IpeStyle Maybe Text -_ NodeG [] Text Text -xml) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) +_ NodeG [] Text Text +xml) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) forall a. a -> Maybe a Just NodeG [] Text Text -xml +xml instance IpeWrite IpePreamble where - ipeWrite :: IpePreamble -> Maybe (NodeG [] Text Text) + ipeWrite :: IpePreamble -> Maybe (NodeG [] Text Text) ipeWrite (IpePreamble Maybe Text -_ Text -latex) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) +_ Text +latex) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) forall a. a -> Maybe a Just (NodeG [] Text Text -> Maybe (NodeG [] Text Text)) -> NodeG [] Text Text -> Maybe (NodeG [] Text Text) @@ -1627,15 +1627,15 @@ "preamble" [] [Text -> NodeG [] Text Text forall (c :: * -> *) tag text. text -> NodeG c tag text Text Text -latex] +latex] -- TODO: I probably want to do something with the encoding .... -instance (IpeWriteText r) => IpeWrite (IpeFile r) where - ipeWrite :: IpeFile r -> Maybe (NodeG [] Text Text) -ipeWrite (IpeFile Maybe IpePreamble -mp [IpeStyle] -ss NonEmpty (IpePage r) -pgs) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) +instance (IpeWriteText r) => IpeWrite (IpeFile r) where + ipeWrite :: IpeFile r -> Maybe (NodeG [] Text Text) +ipeWrite (IpeFile Maybe IpePreamble +mp [IpeStyle] +ss NonEmpty (IpePage r) +pgs) = NodeG [] Text Text -> Maybe (NodeG [] Text Text) forall a. a -> Maybe a Just (NodeG [] Text Text -> Maybe (NodeG [] Text Text)) -> NodeG [] Text Text -> Maybe (NodeG [] Text Text) @@ -1646,22 +1646,22 @@ tag -> [(tag, text)] -> c (NodeG c tag text) -> NodeG c tag text Element Text "ipe" [(Text, Text)] -ipeAtts [NodeG [] Text Text] -chs +ipeAtts [NodeG [] Text Text] +chs where - ipeAtts :: [(Text, Text)] -ipeAtts = [(Text + ipeAtts :: [(Text, Text)] +ipeAtts = [(Text "version",Text "70005"),(Text "creator", Text "HGeometry")] - chs :: [NodeG [] Text Text] -chs = [[NodeG [] Text Text]] -> [NodeG [] Text Text] + chs :: [NodeG [] Text Text] +chs = [[NodeG [] Text Text]] -> [NodeG [] Text Text] forall a. Monoid a => [a] -> a mconcat [ [Maybe (NodeG [] Text Text)] -> [NodeG [] Text Text] forall a. [Maybe a] -> [a] catMaybes [Maybe IpePreamble -mp Maybe IpePreamble +mp Maybe IpePreamble -> (IpePreamble -> Maybe (NodeG [] Text Text)) -> Maybe (NodeG [] Text Text) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b @@ -1675,7 +1675,7 @@ mapMaybe IpeStyle -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite [IpeStyle] -ss +ss , (IpePage r -> Maybe (NodeG [] Text Text)) -> [IpePage r] -> [NodeG [] Text Text] forall a b. (a -> Maybe b) -> [a] -> [b] @@ -1693,7 +1693,7 @@ -> NonEmpty (IpePage r) -> [NodeG [] Text Text] forall a b. (a -> b) -> a -> b $ NonEmpty (IpePage r) -pgs +pgs ] @@ -1701,9 +1701,9 @@ -------------------------------------------------------------------------------- -instance (IpeWriteText r, Point_ point 2 r, Functor f, Foldable1 f - ) => IpeWrite (PolyLineF f point) where - ipeWrite :: PolyLineF f point -> Maybe (NodeG [] Text Text) +instance (IpeWriteText r, Point_ point 2 r, Functor f, Foldable1 f + ) => IpeWrite (PolyLineF f point) where + ipeWrite :: PolyLineF f point -> Maybe (NodeG [] Text Text) ipeWrite = Path r -> Maybe (NodeG [] Text Text) forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) ipeWrite (Path r -> Maybe (NodeG [] Text Text)) @@ -1717,13 +1717,13 @@ PolyLineF f point -> Path r fromPolyLine -fromPolyLine :: (Point_ point 2 r, Functor f, Foldable1 f) - => PolyLineF f point -> Path r +fromPolyLine :: (Point_ point 2 r, Functor f, Foldable1 f) + => PolyLineF f point -> Path r fromPolyLine :: forall point r (f :: * -> *). (Point_ point 2 r, Functor f, Foldable1 f) => PolyLineF f point -> Path r -fromPolyLine (PolyLine f point -vs) = +fromPolyLine (PolyLine f point +vs) = Seq (PathSegment r) -> Path r forall r. Seq (PathSegment r) -> Path r Path (Seq (PathSegment r) -> Path r) @@ -1769,19 +1769,19 @@ asPoint) (f point -> Path r) -> f point -> Path r forall a b. (a -> b) -> a -> b $ f point -vs +vs -instance ( IpeWriteText r - , EndPoint_ (endPoint point) - , IxValue (endPoint point) ~ point - , Vertex (LineSegment endPoint point) ~ point +instance ( IpeWriteText r + , EndPoint_ (endPoint point) + , IxValue (endPoint point) ~ point + , Vertex (LineSegment endPoint point) ~ point - , Point_ point 2 r - ) => IpeWrite (LineSegment endPoint point) where - ipeWrite :: LineSegment endPoint point -> Maybe (NodeG [] Text Text) + , Point_ point 2 r + ) => IpeWrite (LineSegment endPoint point) where + ipeWrite :: LineSegment endPoint point -> Maybe (NodeG [] Text Text) ipeWrite = forall t. IpeWrite t => t -> Maybe (NodeG [] Text Text) -ipeWrite @(PolyLineF NonEmpty point) (PolyLineF NonEmpty point -> Maybe (NodeG [] Text Text)) +ipeWrite @(PolyLineF NonEmpty point) (PolyLineF NonEmpty point -> Maybe (NodeG [] Text Text)) -> (LineSegment endPoint point -> PolyLineF NonEmpty point) -> LineSegment endPoint point -> Maybe (NodeG [] Text Text) @@ -1798,7 +1798,7 @@ _PolyLineLineSegment instance IpeWrite () where - ipeWrite :: () -> Maybe (NodeG [] Text Text) + ipeWrite :: () -> Maybe (NodeG [] Text Text) ipeWrite = Maybe (NodeG [] Text Text) -> () -> Maybe (NodeG [] Text Text) forall a b. a -> b -> a const Maybe (NodeG [] Text Text) diff --git a/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Instances.html b/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Instances.html index 73d8687c5..70bfe2286 100644 --- a/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Instances.html +++ b/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Instances.html @@ -41,38 +41,38 @@ -- instance Arbitrary v => Arbitrary (PointF v) where -- arbitrary = Point <$> arbitrary -instance Arbitrary r => Arbitrary (EndPoint ep r) where - arbitrary :: Gen (EndPoint ep r) -arbitrary = r -> EndPoint ep r +instance Arbitrary r => Arbitrary (EndPoint ep r) where + arbitrary :: Gen (EndPoint ep r) +arbitrary = r -> EndPoint ep r forall (et :: EndPointType) r. r -> EndPoint et r EndPoint (r -> EndPoint ep r) -> Gen r -> Gen (EndPoint ep r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Gen r forall a. Arbitrary a => Gen a arbitrary - shrink :: EndPoint ep r -> [EndPoint ep r] -shrink (EndPoint r -p) = r -> EndPoint ep r + shrink :: EndPoint ep r -> [EndPoint ep r] +shrink (EndPoint r +p) = r -> EndPoint ep r forall (et :: EndPointType) r. r -> EndPoint et r EndPoint (r -> EndPoint ep r) -> [r] -> [EndPoint ep r] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> [r] forall a. Arbitrary a => a -> [a] shrink r -p +p instance Arbitrary EndPointType where - arbitrary :: Gen EndPointType -arbitrary = (\Bool -b -> if Bool -b then EndPointType + arbitrary :: Gen EndPointType +arbitrary = (\Bool +b -> if Bool +b then EndPointType Open else EndPointType Closed) (Bool -> EndPointType) -> Gen Bool -> Gen EndPointType forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Gen Bool forall a. Arbitrary a => Gen a arbitrary - shrink :: EndPointType -> [EndPointType] + shrink :: EndPointType -> [EndPointType] shrink = \case EndPointType Open -> [EndPointType @@ -80,8 +80,8 @@ EndPointType Closed -> [] -instance Arbitrary r => Arbitrary (AnEndPoint r) where - arbitrary :: Gen (AnEndPoint r) +instance Arbitrary r => Arbitrary (AnEndPoint r) where + arbitrary :: Gen (AnEndPoint r) arbitrary = EndPointType -> r -> AnEndPoint r forall r. EndPointType -> r -> AnEndPoint r AnEndPoint (EndPointType -> r -> AnEndPoint r) @@ -95,23 +95,23 @@ <*> Gen r forall a. Arbitrary a => Gen a arbitrary - shrink :: AnEndPoint r -> [AnEndPoint r] + shrink :: AnEndPoint r -> [AnEndPoint r] shrink = AnEndPoint r -> [AnEndPoint r] forall a. (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a] genericShrink -instance ( Arbitrary (endPoint r) - , Eq (endPoint r), Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r) - ) => Arbitrary (Interval endPoint r) where - arbitrary :: Gen (Interval endPoint r) -arbitrary = do endPoint r -p <- Gen (endPoint r) +instance ( Arbitrary (endPoint r) + , Eq (endPoint r), Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r) + ) => Arbitrary (Interval endPoint r) where + arbitrary :: Gen (Interval endPoint r) +arbitrary = do endPoint r +p <- Gen (endPoint r) forall a. Arbitrary a => Gen a arbitrary - endPoint r -q <- Gen (endPoint r) + endPoint r +q <- Gen (endPoint r) forall a. Arbitrary a => Gen a arbitrary Gen (endPoint r) -> (endPoint r -> Bool) -> Gen (endPoint r) forall a. Gen a -> (a -> Bool) -> Gen a @@ -121,7 +121,7 @@ EndPoint_ (endPoint r)) => endPoint r -> endPoint r -> Bool isValidInterval endPoint r -p) +p) Interval endPoint r -> Gen (Interval endPoint r) forall a. a -> Gen a forall (f :: * -> *) a. Applicative f => a -> f a @@ -136,12 +136,12 @@ StartPointOf interval -> EndPointOf interval -> interval buildInterval endPoint r StartPointOf (Interval endPoint r) -p endPoint r +p endPoint r EndPointOf (Interval endPoint r) -q - shrink :: Interval endPoint r -> [Interval endPoint r] -shrink Interval endPoint r -i = [ StartPointOf (Interval endPoint r) +q + shrink :: Interval endPoint r -> [Interval endPoint r] +shrink Interval endPoint r +i = [ StartPointOf (Interval endPoint r) -> EndPointOf (Interval endPoint r) -> Interval endPoint r forall interval point. (ConstructableInterval_ interval point, Ord point, @@ -149,16 +149,16 @@ StartPointOf interval -> EndPointOf interval -> interval buildInterval endPoint r StartPointOf (Interval endPoint r) -p endPoint r +p endPoint r EndPointOf (Interval endPoint r) -q - | endPoint r -p <- endPoint r -> [endPoint r] +q + | endPoint r +p <- endPoint r -> [endPoint r] forall a. Arbitrary a => a -> [a] shrink (endPoint r -> [endPoint r]) -> endPoint r -> [endPoint r] forall a b. (a -> b) -> a -> b $ Interval endPoint r -iInterval endPoint r +iInterval endPoint r -> Getting (endPoint r) (Interval endPoint r) (endPoint r) -> endPoint r forall s a. s -> Getting a s a -> a @@ -166,13 +166,13 @@ forall seg p. HasStartPoint seg p => Lens' seg p Lens' (Interval endPoint r) (endPoint r) startPoint - , endPoint r -q <- endPoint r -> [endPoint r] + , endPoint r +q <- endPoint r -> [endPoint r] forall a. Arbitrary a => a -> [a] shrink (endPoint r -> [endPoint r]) -> endPoint r -> [endPoint r] forall a b. (a -> b) -> a -> b $ Interval endPoint r -iInterval endPoint r +iInterval endPoint r -> Getting (endPoint r) (Interval endPoint r) (endPoint r) -> endPoint r forall s a. s -> Getting a s a -> a @@ -186,25 +186,25 @@ EndPoint_ (endPoint r)) => endPoint r -> endPoint r -> Bool isValidInterval endPoint r -p endPoint r -q +p endPoint r +q ] -isValidInterval :: (Eq (endPoint r), Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)) - => endPoint r -> endPoint r -> Bool +isValidInterval :: (Eq (endPoint r), Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)) + => endPoint r -> endPoint r -> Bool isValidInterval :: forall (endPoint :: * -> *) r. (Eq (endPoint r), Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)) => endPoint r -> endPoint r -> Bool -isValidInterval endPoint r -p endPoint r -q = endPoint r -p endPoint r -> endPoint r -> Bool +isValidInterval endPoint r +p endPoint r +q = endPoint r +p endPoint r -> endPoint r -> Bool forall a. Eq a => a -> a -> Bool /= endPoint r -q Bool -> Bool -> Bool +q Bool -> Bool -> Bool && ((endPoint r -pendPoint r -> Getting r (endPoint r) r -> r +pendPoint r -> Getting r (endPoint r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (endPoint r) r (IxValue (endPoint r) -> Const r (IxValue (endPoint r))) @@ -220,7 +220,7 @@ _endPoint r -> r -> Bool forall a. Eq a => a -> a -> Bool == endPoint r -qendPoint r -> Getting r (endPoint r) r -> r +qendPoint r -> Getting r (endPoint r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (endPoint r) r (IxValue (endPoint r) -> Const r (IxValue (endPoint r))) @@ -239,59 +239,59 @@ EndPoint_ (endPoint r) => endPoint r -> endPoint r -> Bool bothClosed endPoint r -p endPoint r -q) +p endPoint r +q) -bothClosed :: EndPoint_ (endPoint r) => endPoint r -> endPoint r -> Bool +bothClosed :: EndPoint_ (endPoint r) => endPoint r -> endPoint r -> Bool bothClosed :: forall {k} (endPoint :: k -> *) (r :: k). EndPoint_ (endPoint r) => endPoint r -> endPoint r -> Bool -bothClosed endPoint r -p endPoint r -q = endPoint r -> EndPointType +bothClosed endPoint r +p endPoint r +q = endPoint r -> EndPointType forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType endPointType endPoint r -p EndPointType -> EndPointType -> Bool +p EndPointType -> EndPointType -> Bool forall a. Eq a => a -> a -> Bool == EndPointType Closed Bool -> Bool -> Bool && endPoint r -> EndPointType forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType endPointType endPoint r -q EndPointType -> EndPointType -> Bool +q EndPointType -> EndPointType -> Bool forall a. Eq a => a -> a -> Bool == EndPointType Closed implies :: Bool -> Bool -> Bool implies :: Bool -> Bool -> Bool -implies Bool -p Bool -q = Bool -> Bool +implies Bool +p Bool +q = Bool -> Bool not Bool -p Bool -> Bool -> Bool +p Bool -> Bool -> Bool || Bool -q +q -instance ( Arbitrary (endPoint point) - , IsEndPoint (endPoint point) (endPoint point) - , IxValue (endPoint point) ~ point - , Eq point - ) => Arbitrary (LineSegment endPoint point) where - arbitrary :: Gen (LineSegment endPoint point) -arbitrary = do endPoint point -p <- Gen (endPoint point) +instance ( Arbitrary (endPoint point) + , IsEndPoint (endPoint point) (endPoint point) + , IxValue (endPoint point) ~ point + , Eq point + ) => Arbitrary (LineSegment endPoint point) where + arbitrary :: Gen (LineSegment endPoint point) +arbitrary = do endPoint point +p <- Gen (endPoint point) forall a. Arbitrary a => Gen a arbitrary - endPoint point -q <- Gen (endPoint point) + endPoint point +q <- Gen (endPoint point) forall a. Arbitrary a => Gen a arbitrary Gen (endPoint point) -> (endPoint point -> Bool) -> Gen (endPoint point) forall a. Gen a -> (a -> Bool) -> Gen a -`suchThat` (\endPoint point -q' -> endPoint point -q'endPoint point -> Getting point (endPoint point) point -> point +`suchThat` (\endPoint point +q' -> endPoint point +q'endPoint point -> Getting point (endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (endPoint point) point (IxValue (endPoint point) @@ -308,7 +308,7 @@ _endPoint point -> point -> Bool forall a. Eq a => a -> a -> Bool /= endPoint point -pendPoint point -> Getting point (endPoint point) point -> point +pendPoint point -> Getting point (endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (endPoint point) point (IxValue (endPoint point) @@ -333,24 +333,24 @@ forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment endPoint point -p endPoint point -q - shrink :: LineSegment endPoint point -> [LineSegment endPoint point] -shrink LineSegment endPoint point -s = [ endPoint point -> endPoint point -> LineSegment endPoint point +p endPoint point +q + shrink :: LineSegment endPoint point -> [LineSegment endPoint point] +shrink LineSegment endPoint point +s = [ endPoint point -> endPoint point -> LineSegment endPoint point forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment endPoint point -p endPoint point -q - | endPoint point -p <- endPoint point -> [endPoint point] +p endPoint point +q + | endPoint point +p <- endPoint point -> [endPoint point] forall a. Arbitrary a => a -> [a] shrink (endPoint point -> [endPoint point]) -> endPoint point -> [endPoint point] forall a b. (a -> b) -> a -> b $ LineSegment endPoint point -sLineSegment endPoint point +sLineSegment endPoint point -> Getting (endPoint point) (LineSegment endPoint point) (endPoint point) -> endPoint point @@ -360,14 +360,14 @@ forall seg p. HasStartPoint seg p => Lens' seg p Lens' (LineSegment endPoint point) (endPoint point) startPoint - , endPoint point -q <- endPoint point -> [endPoint point] + , endPoint point +q <- endPoint point -> [endPoint point] forall a. Arbitrary a => a -> [a] shrink (endPoint point -> [endPoint point]) -> endPoint point -> [endPoint point] forall a b. (a -> b) -> a -> b $ LineSegment endPoint point -sLineSegment endPoint point +sLineSegment endPoint point -> Getting (endPoint point) (LineSegment endPoint point) (endPoint point) -> endPoint point @@ -378,7 +378,7 @@ Lens' (LineSegment endPoint point) (endPoint point) endPoint , endPoint point -qendPoint point -> Getting point (endPoint point) point -> point +qendPoint point -> Getting point (endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (endPoint point) point (IxValue (endPoint point) @@ -395,7 +395,7 @@ _endPoint point -> point -> Bool forall a. Eq a => a -> a -> Bool /= endPoint point -pendPoint point -> Getting point (endPoint point) point -> point +pendPoint point -> Getting point (endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (endPoint point) point (IxValue (endPoint point) @@ -412,12 +412,12 @@ _endPoint ] -instance ( Arbitrary point - , Arbitrary (NumType point) - , Ord (NumType point) - , Num (NumType point) - ) => Arbitrary (Ball point) where - arbitrary :: Gen (Ball point) +instance ( Arbitrary point + , Arbitrary (NumType point) + , Ord (NumType point) + , Num (NumType point) + ) => Arbitrary (Ball point) where + arbitrary :: Gen (Ball point) arbitrary = point -> NumType point -> Ball point forall point. point -> NumType point -> Ball point Ball (point -> NumType point -> Ball point) @@ -439,77 +439,77 @@ forall a. Ord a => a -> a -> Bool > NumType point 0)) - shrink :: Ball point -> [Ball point] -shrink (Ball point -c NumType point -r) = [ point -> NumType point -> Ball point + shrink :: Ball point -> [Ball point] +shrink (Ball point +c NumType point +r) = [ point -> NumType point -> Ball point forall point. point -> NumType point -> Ball point Ball point -c' NumType point -r' - | point -c' <- point -> [point] +c' NumType point +r' + | point +c' <- point -> [point] forall a. Arbitrary a => a -> [a] shrink point -c - , NumType point -r' <- NumType point +c + , NumType point +r' <- NumType point 1 NumType point -> [NumType point] -> [NumType point] forall a. a -> [a] -> [a] : NumType point -> [NumType point] forall a. Arbitrary a => a -> [a] shrink NumType point -r +r , NumType point -r' NumType point -> NumType point -> Bool +r' NumType point -> NumType point -> Bool forall a. Ord a => a -> a -> Bool > NumType point 0 ] -instance ( Arbitrary point - , Point_ point 2 r, Num r, Ord r - , Eq point - ) => Arbitrary (Triangle point) where - arbitrary :: Gen (Triangle point) -arbitrary = do point -a <- Gen point +instance ( Arbitrary point + , Point_ point 2 r, Num r, Ord r + , Eq point + ) => Arbitrary (Triangle point) where + arbitrary :: Gen (Triangle point) +arbitrary = do point +a <- Gen point forall a. Arbitrary a => Gen a arbitrary - point -b <- Gen point + point +b <- Gen point forall a. Arbitrary a => Gen a arbitrary Gen point -> (point -> Bool) -> Gen point forall a. Gen a -> (a -> Bool) -> Gen a `suchThat` (point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -a) - point -c <- Gen point +a) + point +c <- Gen point forall a. Arbitrary a => Gen a arbitrary Gen point -> (point -> Bool) -> Gen point forall a. Gen a -> (a -> Bool) -> Gen a -`suchThat` (\point -c' -> point -c' point -> point -> Bool +`suchThat` (\point +c' -> point +c' point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -a Bool -> Bool -> Bool +a Bool -> Bool -> Bool && point -c' point -> point -> Bool +c' point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -b Bool -> Bool -> Bool +b Bool -> Bool -> Bool && point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -a point -b point -c' CCW -> CCW -> Bool +a point +b point +c' CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool /= CCW CoLinear) @@ -522,62 +522,62 @@ $ point -> point -> point -> Triangle point forall point. point -> point -> point -> Triangle point Triangle point -a point -b point -c - shrink :: Triangle point -> [Triangle point] -shrink (Triangle point -a point -b point -c) = [ point -> point -> point -> Triangle point +a point +b point +c + shrink :: Triangle point -> [Triangle point] +shrink (Triangle point +a point +b point +c) = [ point -> point -> point -> Triangle point forall point. point -> point -> point -> Triangle point Triangle point -a' point -b' point -c' - | point -a' <- point -> [point] +a' point +b' point +c' + | point +a' <- point -> [point] forall a. Arbitrary a => a -> [a] shrink point -a - , point -b' <- point -> [point] +a + , point +b' <- point -> [point] forall a. Arbitrary a => a -> [a] shrink point -b - , point -c' <- point -> [point] +b + , point +c' <- point -> [point] forall a. Arbitrary a => a -> [a] shrink point -c +c , point -b' point -> point -> Bool +b' point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -a', point -c' point -> point -> Bool +a', point +c' point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -a', point -c' point -> point -> Bool +a', point +c' point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -b', point -> point -> point -> CCW +b', point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -a' point -b' point -c' CCW -> CCW -> Bool +a' point +b' point +c' CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool /= CCW CoLinear ] -instance Arbitrary r => Arbitrary (LineEQ r) where - arbitrary :: Gen (LineEQ r) +instance Arbitrary r => Arbitrary (LineEQ r) where + arbitrary :: Gen (LineEQ r) arbitrary = r -> r -> LineEQ r forall r. r -> r -> LineEQ r LineEQ (r -> r -> LineEQ r) -> Gen r -> Gen (r -> LineEQ r) @@ -591,8 +591,8 @@ forall a. Arbitrary a => Gen a arbitrary -instance Arbitrary r => Arbitrary (VerticalOrLineEQ r) where - arbitrary :: Gen (VerticalOrLineEQ r) +instance Arbitrary r => Arbitrary (VerticalOrLineEQ r) where + arbitrary :: Gen (VerticalOrLineEQ r) arbitrary = [(Int, Gen (VerticalOrLineEQ r))] -> Gen (VerticalOrLineEQ r) forall a. HasCallStack => [(Int, Gen a)] -> Gen a frequency [ (Int @@ -615,12 +615,12 @@ ] -instance ( Arbitrary r - , Has_ Additive_ d r - , Eq (Vector d r), Num r - , KnownNat d - ) => Arbitrary (LinePV d r) where - arbitrary :: Gen (LinePV d r) +instance ( Arbitrary r + , Has_ Additive_ d r + , Eq (Vector d r), Num r + , KnownNat d + ) => Arbitrary (LinePV d r) where + arbitrary :: Gen (LinePV d r) arbitrary = Point d r -> Vector d r -> LinePV d r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (Point d r -> Vector d r -> LinePV d r) @@ -644,26 +644,26 @@ zero)) -instance ( Arbitrary point - , Arbitrary r - , Point_ point d r - , Num r - , Ord r - , Zip (Vector d) - ) => Arbitrary (Box point) where - arbitrary :: Gen (Box point) -arbitrary = (\point -p Vector d r -v -> point -> point -> Box point +instance ( Arbitrary point + , Arbitrary r + , Point_ point d r + , Num r + , Ord r + , Zip (Vector d) + ) => Arbitrary (Box point) where + arbitrary :: Gen (Box point) +arbitrary = (\point +p Vector d r +v -> point -> point -> Box point forall point. point -> point -> Box point Box point -p (point -p point -> Vector d r -> point +p (point +p point -> Vector d r -> point forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector d r -v)) (point -> Vector d r -> Box point) +v)) (point -> Vector d r -> Box point) -> Gen point -> Gen (Vector d r -> Box point) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Gen point @@ -696,32 +696,32 @@ forall a. Ord a => a -> a -> Bool > r 0)) - shrink :: Box point -> [Box point] -shrink Box point -b = [ point -> point -> Box point + shrink :: Box point -> [Box point] +shrink Box point +b = [ point -> point -> Box point forall point. point -> point -> Box point Box point -p (point -p point -> Vector d r -> point +p (point +p point -> Vector d r -> point forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector d r -v) - | point -p <- point -> [point] +v) + | point +p <- point -> [point] forall a. Arbitrary a => a -> [a] shrink (point -> [point]) -> point -> [point] forall a b. (a -> b) -> a -> b $ Box point -bBox point -> Getting point (Box point) point -> point +bBox point -> Getting point (Box point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (Box point) point forall box point. HasMinPoint box point => Lens' box point Lens' (Box point) point minPoint - , Vector d r -v <- Vector d r -> [Vector d r] + , Vector d r +v <- Vector d r -> [Vector d r] forall a. Arbitrary a => a -> [a] shrink (Vector d r -> [Vector d r]) -> Vector d r -> [Vector d r] forall a b. (a -> b) -> a -> b @@ -730,7 +730,7 @@ (Box_ box point, Point_ point d r, Num r, Functor (Vector d)) => box -> Vector d r size Box point -b +b , Getting All (Vector d r) r -> (r -> Bool) -> Vector d r -> Bool forall s a. Getting All s a -> (a -> Bool) -> s -> Bool allOf Getting All (Vector d r) r @@ -750,17 +750,17 @@ forall a. Ord a => a -> a -> Bool > r 0) Vector d r -v +v ] -instance ( Has_ Additive_ m r - , Has_ Vector_ n (Vector m r) - , Ixed (Vector n (Vector m r)) - , Ixed (Vector m r) - , Arbitrary r +instance ( Has_ Additive_ m r + , Has_ Vector_ n (Vector m r) + , Ixed (Vector n (Vector m r)) + , Ixed (Vector m r) + , Arbitrary r ) => - Arbitrary (Matrix n m r) where - arbitrary :: Gen (Matrix n m r) + Arbitrary (Matrix n m r) where + arbitrary :: Gen (Matrix n m r) arbitrary = (Vector n (Vector m r) -> Matrix n m r forall rowVector. Vector_ rowVector n (Vector m r) => @@ -768,7 +768,7 @@ forall matrix (n :: Nat) (m :: Nat) r rowVector. (Matrix_ matrix n m r, Vector_ rowVector n (Vector m r)) => rowVector -> matrix -matrixFromRows :: Vector n (Vector m r) -> Matrix n m r) +matrixFromRows :: Vector n (Vector m r) -> Matrix n m r) (Vector n (Vector m r) -> Matrix n m r) -> Gen (Vector n (Vector m r)) -> Gen (Matrix n m r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -776,15 +776,15 @@ forall a. Arbitrary a => Gen a arbitrary -instance ( Arbitrary r, Has_ Vector_ (d+1) r, Has_ Additive_ d r - , Num r, Eq (Vector d r)) => Arbitrary (HyperPlane d r) where - arbitrary :: Gen (HyperPlane d r) -arbitrary = do r -a0 <- Gen r +instance ( Arbitrary r, Has_ Vector_ (d+1) r, Has_ Additive_ d r + , Num r, Eq (Vector d r)) => Arbitrary (HyperPlane d r) where + arbitrary :: Gen (HyperPlane d r) +arbitrary = do r +a0 <- Gen r forall a. Arbitrary a => Gen a arbitrary - (Vector d r -a :: Vector d r) <- Gen (Vector d r) + (Vector d r +a :: Vector d r) <- Gen (Vector d r) forall a. Arbitrary a => Gen a arbitrary Gen (Vector d r) -> (Vector d r -> Bool) -> Gen (Vector d r) forall a. Gen a -> (a -> Bool) -> Gen a @@ -809,12 +809,12 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => r -> vector -> vector' cons r -a0 Vector d r -a +a0 Vector d r +a -instance (Arbitrary r, Has_ Additive_ d r - , Num r, Eq (Vector d r)) => Arbitrary (NonVerticalHyperPlane d r) where - arbitrary :: Gen (NonVerticalHyperPlane d r) +instance (Arbitrary r, Has_ Additive_ d r + , Num r, Eq (Vector d r)) => Arbitrary (NonVerticalHyperPlane d r) where + arbitrary :: Gen (NonVerticalHyperPlane d r) arbitrary = Vector d r -> NonVerticalHyperPlane d r forall (d :: Nat) r. Vector d r -> NonVerticalHyperPlane d r NonVerticalHyperPlane (Vector d r -> NonVerticalHyperPlane d r) @@ -831,8 +831,8 @@ zero) -instance Arbitrary boundingHyperPlane => Arbitrary (HalfSpaceF boundingHyperPlane) where - arbitrary :: Gen (HalfSpaceF boundingHyperPlane) +instance Arbitrary boundingHyperPlane => Arbitrary (HalfSpaceF boundingHyperPlane) where + arbitrary :: Gen (HalfSpaceF boundingHyperPlane) arbitrary = Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane forall boundingHyperPlane. Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane diff --git a/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Test.Box.html b/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Test.Box.html index 47e9f274e..130cb8e71 100644 --- a/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Test.Box.html +++ b/haddocks/hgeometry/kernel-quickcheck/src/HGeometry.Kernel.Test.Box.html @@ -22,19 +22,19 @@ -- | Generate an arbitrary point in the given rectangle. arbitraryPointInBoundingBox :: Rectangle (Point 2 Rational) -> Gen (Point 2 Rational) arbitraryPointInBoundingBox :: Rectangle (Point 2 Rational) -> Gen (Point 2 Rational) -arbitraryPointInBoundingBox Rectangle (Point 2 Rational) -b = do - ZeroToOne Rational -rX <- Gen ZeroToOne +arbitraryPointInBoundingBox Rectangle (Point 2 Rational) +b = do + ZeroToOne Rational +rX <- Gen ZeroToOne forall a. Arbitrary a => Gen a arbitrary - ZeroToOne Rational -rY <- Gen ZeroToOne + ZeroToOne Rational +rY <- Gen ZeroToOne forall a. Arbitrary a => Gen a arbitrary - let minPt :: Point 2 Rational -minPt = Rectangle (Point 2 Rational) -bRectangle (Point 2 Rational) + let minPt :: Point 2 Rational +minPt = Rectangle (Point 2 Rational) +bRectangle (Point 2 Rational) -> Getting (Point 2 Rational) (Rectangle (Point 2 Rational)) @@ -48,8 +48,8 @@ forall box point. HasMinPoint box point => Lens' box point Lens' (Rectangle (Point 2 Rational)) (Point 2 Rational) minPoint - offsetVector :: Vector 2 Rational -offsetVector = Rational -> Rational -> Vector 2 Rational + offsetVector :: Vector 2 Rational +offsetVector = Rational -> Rational -> Vector 2 Rational forall r. r -> r -> Vector 2 r Vector2 (Rectangle (Point 2 Rational) -> Rational forall box point (d :: Natural) r. @@ -57,19 +57,19 @@ Num r) => box -> r width Rectangle (Point 2 Rational) -b Rational -> Rational -> Rational +b Rational -> Rational -> Rational forall a. Num a => a -> a -> a * Rational -rX) (Rectangle (Point 2 Rational) -> Rational +rX) (Rectangle (Point 2 Rational) -> Rational forall box point (d :: Natural) r. (Box_ box point, Point_ point d r, 2 <= d, Functor (Vector d), Num r) => box -> r height Rectangle (Point 2 Rational) -b Rational -> Rational -> Rational +b Rational -> Rational -> Rational forall a. Num a => a -> a -> a * Rational -rY) +rY) Point 2 Rational -> Gen (Point 2 Rational) forall a. a -> Gen a forall (f :: * -> *) a. Applicative f => a -> f a @@ -77,32 +77,32 @@ -> Point 2 Rational -> Gen (Point 2 Rational) forall a b. (a -> b) -> a -> b $ Point 2 Rational -minPt Point 2 Rational -> Vector 2 Rational -> Point 2 Rational +minPt Point 2 Rational -> Vector 2 Rational -> Point 2 Rational forall point (d :: Natural) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector 2 Rational -offsetVector +offsetVector newtype ZeroToOne = ZeroToOne Rational -instance Show ZeroToOne where - show :: ZeroToOne -> String -show (ZeroToOne Rational -r) = Rational -> String +instance Show ZeroToOne where + show :: ZeroToOne -> String +show (ZeroToOne Rational +r) = Rational -> String forall a. Show a => a -> String show Rational -r +r instance Arbitrary ZeroToOne where - arbitrary :: Gen ZeroToOne + arbitrary :: Gen ZeroToOne arbitrary = do - Integer -k <- (Integer, Integer) -> Gen Integer + Integer +k <- (Integer, Integer) -> Gen Integer chooseInteger (Integer 0, Integer -granularity) +granularity) ZeroToOne -> Gen ZeroToOne forall a. a -> Gen a forall (f :: * -> *) a. Applicative f => a -> f a @@ -112,21 +112,21 @@ ZeroToOne (Rational -> ZeroToOne) -> Rational -> ZeroToOne forall a b. (a -> b) -> a -> b $ Integer -k Integer -> Integer -> Rational +k Integer -> Integer -> Rational forall a. Integral a => a -> a -> Ratio a % Integer -granularity +granularity where - granularity :: Integer -granularity = Integer + granularity :: Integer +granularity = Integer 1000000 - shrink :: ZeroToOne -> [ZeroToOne] -shrink (ZeroToOne Rational + shrink :: ZeroToOne -> [ZeroToOne] +shrink (ZeroToOne Rational 1) = [] shrink (ZeroToOne Rational 0) = [] - shrink (ZeroToOne Rational -r) = [ Rational -> ZeroToOne + shrink (ZeroToOne Rational +r) = [ Rational -> ZeroToOne ZeroToOne (Rational -> ZeroToOne) -> Rational -> ZeroToOne forall a b. (a -> b) -> a -> b $ Integer -> Integer -> Integer @@ -134,7 +134,7 @@ div (Rational -> Integer forall a. Ratio a -> a numerator Rational -r) Integer +r) Integer 2 Integer -> Integer -> Rational forall a. Integral a => a -> a -> Ratio a % Integer -> Integer -> Integer @@ -142,6 +142,6 @@ div (Rational -> Integer forall a. Ratio a -> a denominator Rational -r) Integer +r) Integer 2] \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/HGeometry-HyperPlane-Class.html b/haddocks/hgeometry/kernel/HGeometry-HyperPlane-Class.html index a7cb0dc58..906ed3860 100644 --- a/haddocks/hgeometry/kernel/HGeometry-HyperPlane-Class.html +++ b/haddocks/hgeometry/kernel/HGeometry-HyperPlane-Class.html @@ -61,7 +61,7 @@

fromPointAndNormal :: (Point_ point d r, Num r) => point -> Vector d r -> hyperPlane Source #

Construct a Hyperplane from a point and a normal. The normal points into the halfplane for which the side-test is positive.

>>> myVerticalLine == fromPointAndNormal (Point2 5 30) (Vector2 1 0)
 True
-

default fromPointAndNormal :: (Point_ point d r, Num r, ConstructableHyperPlane_ hyperPlane d r, HyperPlaneFromEquationConstraint hyperPlane d r, Has_ Metric_ d r) => point -> Vector d r -> hyperPlane Source #

Instances

Instances details
(Fractional r, Eq r) => ConstructableHyperPlane_ (VerticalOrLineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.General

Methods

hyperPlaneFromEquation :: Vector (2 + 1) r -> VerticalOrLineEQ r Source #

fromPointAndNormal :: (Point_ point 2 r, Num r) => point -> Vector 2 r -> VerticalOrLineEQ r Source #

(MkHyperPlaneConstraints 2 r, Fractional r, Eq r) => ConstructableHyperPlane_ (LineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.LineEQ

Associated Types

type HyperPlaneFromEquationConstraint (LineEQ r) 2 r Source #

Methods

hyperPlaneFromEquation :: Vector (2 + 1) r -> LineEQ r Source #

fromPointAndNormal :: (Point_ point 2 r, Num r) => point -> Vector 2 r -> LineEQ r Source #

MkHyperPlaneConstraints d r => ConstructableHyperPlane_ (HyperPlane d r) d r Source # 
Instance details

Defined in HGeometry.HyperPlane.Internal

Associated Types

type HyperPlaneFromEquationConstraint (HyperPlane d r) d r Source #

Methods

hyperPlaneFromEquation :: Vector (d + 1) r -> HyperPlane d r Source #

fromPointAndNormal :: (Point_ point d r, Num r) => point -> Vector d r -> HyperPlane d r Source #

(MkHyperPlaneConstraints d r, Has_ Additive_ (d - 1) r, Fractional r, Eq r, 2 <= d) => ConstructableHyperPlane_ (NonVerticalHyperPlane d r) d r Source # 
Instance details

Defined in HGeometry.HyperPlane.NonVertical

Methods

hyperPlaneFromEquation :: Vector (d + 1) r -> NonVerticalHyperPlane d r Source #

fromPointAndNormal :: (Point_ point d r, Num r) => point -> Vector d r -> NonVerticalHyperPlane d r Source #

(Eq r, Num r) => ConstructableHyperPlane_ (LinePV 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Line.PointAndVector

Associated Types

type HyperPlaneFromEquationConstraint (LinePV 2 r) 2 r Source #

Methods

hyperPlaneFromEquation :: Vector (2 + 1) r -> LinePV 2 r Source #

fromPointAndNormal :: (Point_ point 2 r, Num r) => point -> Vector 2 r -> LinePV 2 r Source #

(ConstructableHyperPlane_ hyperPlane d r, Default extra) => ConstructableHyperPlane_ (hyperPlane :+ extra) d r Source # 
Instance details

Defined in HGeometry.HyperPlane.Class

Associated Types

type HyperPlaneFromEquationConstraint (hyperPlane :+ extra) d r Source #

Methods

hyperPlaneFromEquation :: Vector (d + 1) r -> hyperPlane :+ extra Source #

fromPointAndNormal :: (Point_ point d r, Num r) => point -> Vector d r -> hyperPlane :+ extra Source #

class HyperPlane_ hyperPlane d r => NonVerticalHyperPlane_ hyperPlane d r where Source #

Non-vertical hyperplanes.

Minimal complete definition

hyperPlaneCoefficients

Methods

evalAt :: (Num r, 1 <= d, Point_ point (d - 1) r) => point -> hyperPlane -> r Source #

Get the coordinate in dimension \(d\) of the hyperplane at the given position.

>>> evalAt (Point1 1) myLineAsNV
+

default fromPointAndNormal :: (Point_ point d r, Num r, ConstructableHyperPlane_ hyperPlane d r, HyperPlaneFromEquationConstraint hyperPlane d r, Has_ Metric_ d r) => point -> Vector d r -> hyperPlane Source #

Instances

Instances details
(Fractional r, Eq r) => ConstructableHyperPlane_ (VerticalOrLineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.General

Methods

hyperPlaneFromEquation :: Vector (2 + 1) r -> VerticalOrLineEQ r Source #

fromPointAndNormal :: (Point_ point 2 r, Num r) => point -> Vector 2 r -> VerticalOrLineEQ r Source #

(MkHyperPlaneConstraints 2 r, Fractional r, Eq r) => ConstructableHyperPlane_ (LineEQ r) 2 r Source # 
Instance details

Defined in HGeometry.Line.LineEQ

Associated Types

type HyperPlaneFromEquationConstraint (LineEQ r) 2 r Source #

Methods

hyperPlaneFromEquation :: Vector (2 + 1) r -> LineEQ r Source #

fromPointAndNormal :: (Point_ point 2 r, Num r) => point -> Vector 2 r -> LineEQ r Source #

MkHyperPlaneConstraints d r => ConstructableHyperPlane_ (HyperPlane d r) d r Source # 
Instance details

Defined in HGeometry.HyperPlane.Internal

Associated Types

type HyperPlaneFromEquationConstraint (HyperPlane d r) d r Source #

Methods

hyperPlaneFromEquation :: Vector (d + 1) r -> HyperPlane d r Source #

fromPointAndNormal :: (Point_ point d r, Num r) => point -> Vector d r -> HyperPlane d r Source #

(MkHyperPlaneConstraints d r, Has_ Additive_ (d - 1) r, Fractional r, Eq r, 2 <= d) => ConstructableHyperPlane_ (NonVerticalHyperPlane d r) d r Source # 
Instance details

Defined in HGeometry.HyperPlane.NonVertical

Methods

hyperPlaneFromEquation :: Vector (d + 1) r -> NonVerticalHyperPlane d r Source #

fromPointAndNormal :: (Point_ point d r, Num r) => point -> Vector d r -> NonVerticalHyperPlane d r Source #

(Eq r, Num r) => ConstructableHyperPlane_ (LinePV 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Line.PointAndVector

Associated Types

type HyperPlaneFromEquationConstraint (LinePV 2 r) 2 r Source #

Methods

hyperPlaneFromEquation :: Vector (2 + 1) r -> LinePV 2 r Source #

fromPointAndNormal :: (Point_ point 2 r, Num r) => point -> Vector 2 r -> LinePV 2 r Source #

(ConstructableHyperPlane_ hyperPlane d r, Default extra) => ConstructableHyperPlane_ (hyperPlane :+ extra) d r Source # 
Instance details

Defined in HGeometry.HyperPlane.Class

Associated Types

type HyperPlaneFromEquationConstraint (hyperPlane :+ extra) d r Source #

Methods

hyperPlaneFromEquation :: Vector (d + 1) r -> hyperPlane :+ extra Source #

fromPointAndNormal :: (Point_ point d r, Num r) => point -> Vector d r -> hyperPlane :+ extra Source #

class HyperPlane_ hyperPlane d r => NonVerticalHyperPlane_ hyperPlane d r where Source #

Non-vertical hyperplanes.

Minimal complete definition

hyperPlaneCoefficients

Methods

evalAt :: (Num r, 1 <= d, Point_ point (d - 1) r) => point -> hyperPlane -> r Source #

Get the coordinate in dimension \(d\) of the hyperplane at the given position.

>>> evalAt (Point1 1) myLineAsNV
 3.0
 >>> evalAt (Point1 10) myLineAsNV
 12.0
diff --git a/haddocks/hgeometry/kernel/HGeometry-Interval-Class.html b/haddocks/hgeometry/kernel/HGeometry-Interval-Class.html
index 20f126c48..74c12eff6 100644
--- a/haddocks/hgeometry/kernel/HGeometry-Interval-Class.html
+++ b/haddocks/hgeometry/kernel/HGeometry-Interval-Class.html
@@ -1,14 +1,14 @@
 HGeometry.Interval.Class
hgeometry:kernel
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Interval.Class

Description

Intervals

Synopsis

Documentation

class (IntervalLike_ interval r, NumType interval ~ r) => Interval_ interval r | interval -> r Source #

A class for types representing Intervals

Instances

Instances details
Interval_ (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

Interval_ interval r => Interval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => Interval_ (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

pattern Interval_ :: Interval_ interval r => StartPointOf interval -> EndPointOf interval -> interval Source #

Pattern to match on intervals

class (HasStart interval point, HasStartPoint interval (StartPointOf interval), HasEnd interval point, HasEndPoint interval (EndPointOf interval), EndPoint_ (EndPointOf interval), IxValue (EndPointOf interval) ~ point, EndPoint_ (StartPointOf interval), IxValue (StartPointOf interval) ~ point) => IntervalLike_ interval point | interval -> point Source #

A class for types representing interval like objects

Instances

Instances details
IntervalLike_ (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => IntervalLike_ (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

IntervalLike_ interval point => IntervalLike_ (interval :+ extra) point Source # 
Instance details

Defined in HGeometry.Interval.Class

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => IntervalLike_ (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

class Interval_ interval point => ConstructableInterval_ interval point where Source #

A class for constructable intervals

Minimal complete definition

mkInterval

Methods

mkInterval :: StartPointOf interval -> EndPointOf interval -> interval Source #

Construct an interval given its start and end point.

pre: start < end

buildInterval :: (Ord point, StartPointOf interval ~ EndPointOf interval) => StartPointOf interval -> EndPointOf interval -> interval Source #

Construct an interval given two points. This makes sure the start-point comes before the endpoint.

pre: it is possible to construct a valid, non-empty interval this way. - so if either endpoint is open the endpoints should not coincide.

Instances

Instances details
ConstructableInterval_ (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(ConstructableInterval_ interval point, Default extra) => ConstructableInterval_ (interval :+ extra) point Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

mkInterval :: StartPointOf (interval :+ extra) -> EndPointOf (interval :+ extra) -> interval :+ extra Source #

buildInterval :: StartPointOf (interval :+ extra) -> EndPointOf (interval :+ extra) -> interval :+ extra Source #

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => ConstructableInterval_ (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

mkInterval :: StartPointOf (Interval endPoint r) -> EndPointOf (Interval endPoint r) -> Interval endPoint r Source #

buildInterval :: StartPointOf (Interval endPoint r) -> EndPointOf (Interval endPoint r) -> Interval endPoint r Source #

class (Interval_ interval r, StartPointOf interval ~ EndPoint Closed r, EndPointOf interval ~ EndPoint Closed r) => ClosedInterval_ interval r Source #

A class representing closed intervals, i.e. intervals that include their endpoints

Instances

Instances details
ClosedInterval_ (ClosedInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

ClosedInterval_ interval r => ClosedInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

pattern ClosedInterval_ :: ClosedInterval_ interval r => r -> r -> interval Source #

Pattern matching on an arbitrary closed interval

class (ClosedInterval_ interval r, ConstructableInterval_ interval r) => ConstructableClosedInterval_ interval r where Source #

A class representing constructable closed intervals

Minimal complete definition

Nothing

Methods

mkClosedInterval :: r -> r -> interval Source #

Construct an interval given its start and end point.

buildClosedInterval :: Ord r => r -> r -> interval Source #

Construct an interval given two points. This makes sure - the start-point comes before the endpoint.

Instances

Instances details
ConstructableClosedInterval_ (ClosedInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

(ConstructableClosedInterval_ interval r, Default extra) => ConstructableClosedInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

mkClosedInterval :: r -> r -> interval :+ extra Source #

buildClosedInterval :: r -> r -> interval :+ extra Source #

clampTo :: (ClosedInterval_ interval r, Ord r) => interval -> r -> r Source #

Clamps a value to an interval. I.e. if the value lies outside the range we + so if either endpoint is open the endpoints should not coincide.

Instances

Instances details
ConstructableInterval_ (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(ConstructableInterval_ interval point, Default extra) => ConstructableInterval_ (interval :+ extra) point Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

mkInterval :: StartPointOf (interval :+ extra) -> EndPointOf (interval :+ extra) -> interval :+ extra Source #

buildInterval :: StartPointOf (interval :+ extra) -> EndPointOf (interval :+ extra) -> interval :+ extra Source #

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => ConstructableInterval_ (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

mkInterval :: StartPointOf (Interval endPoint r) -> EndPointOf (Interval endPoint r) -> Interval endPoint r Source #

buildInterval :: StartPointOf (Interval endPoint r) -> EndPointOf (Interval endPoint r) -> Interval endPoint r Source #

class (Interval_ interval r, StartPointOf interval ~ EndPoint Closed r, EndPointOf interval ~ EndPoint Closed r) => ClosedInterval_ interval r Source #

A class representing closed intervals, i.e. intervals that include their endpoints

Instances

Instances details
ClosedInterval_ (ClosedInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

ClosedInterval_ interval r => ClosedInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

pattern ClosedInterval_ :: ClosedInterval_ interval r => r -> r -> interval Source #

Pattern matching on an arbitrary closed interval

class (ClosedInterval_ interval r, ConstructableInterval_ interval r) => ConstructableClosedInterval_ interval r where Source #

A class representing constructable closed intervals

Minimal complete definition

Nothing

Methods

mkClosedInterval :: r -> r -> interval Source #

Construct an interval given its start and end point.

buildClosedInterval :: Ord r => r -> r -> interval Source #

Construct an interval given two points. This makes sure + the start-point comes before the endpoint.

Instances

Instances details
ConstructableClosedInterval_ (ClosedInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

(ConstructableClosedInterval_ interval r, Default extra) => ConstructableClosedInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

mkClosedInterval :: r -> r -> interval :+ extra Source #

buildClosedInterval :: r -> r -> interval :+ extra Source #

clampTo :: (ClosedInterval_ interval r, Ord r) => interval -> r -> r Source #

Clamps a value to an interval. I.e. if the value lies outside the range we report the closest value "in the range".

>>> clampTo (ClosedInterval 0 10) 20
 10
 >>> clampTo (ClosedInterval 0 10) (-20)
 0
 >>> clampTo (ClosedInterval 0 10) 5
 5
-

class (Interval_ interval r, StartPointOf interval ~ EndPoint Open r, EndPointOf interval ~ EndPoint Open r) => OpenInterval_ interval r | interval -> r Source #

A class representing open intervals, i.e. intervals that exclude their endpoints

Instances

Instances details
OpenInterval_ (OpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

OpenInterval_ interval r => OpenInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

pattern OpenInterval_ :: OpenInterval_ interval r => r -> r -> interval Source #

Pattern matching on an arbitrary open interval

class (OpenInterval_ interval r, ConstructableInterval_ interval r) => ConstructableOpenInterval_ interval r | interval -> r where Source #

Constructable Open intervals

Minimal complete definition

Nothing

Methods

mkOpenInterval :: r -> r -> interval Source #

Construct an interval given its start s and end point t.

pre: s < t

Instances

Instances details
ConstructableOpenInterval_ (OpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

mkOpenInterval :: r -> r -> OpenInterval r Source #

(ConstructableOpenInterval_ interval r, Default extra) => ConstructableOpenInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

mkOpenInterval :: r -> r -> interval :+ extra Source #

class HasStart seg p | seg -> p where Source #

Things that have a start point

Methods

start :: Lens' seg p Source #

Lens to access the start point

Instances

Instances details
HasStart (HalfLine point) point Source # 
Instance details

Defined in HGeometry.HalfLine

Methods

start :: Lens' (HalfLine point) point Source #

HasStart (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasStart (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

start :: Lens' (LineSegment endPoint point) point Source #

HasStart seg p => HasStart (seg :+ extra) p Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

start :: Lens' (seg :+ extra) p Source #

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => HasStart (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

start :: Lens' (Interval endPoint r) r Source #

class HasEnd seg p | seg -> p where Source #

Things that have an end point

Methods

end :: Lens' seg p Source #

Lens to access the ending point

Instances

Instances details
HasEnd (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasEnd (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

end :: Lens' (LineSegment endPoint point) point Source #

HasEnd seg p => HasEnd (seg :+ extra) p Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

end :: Lens' (seg :+ extra) p Source #

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => HasEnd (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

end :: Lens' (Interval endPoint r) r Source #

startAndEnd :: (HasStart seg p, HasEnd seg p) => seg -> (p, p) Source #

Get both the start and end of something that has a start and end.

type family StartPointOf interval Source #

type family to declare the type of startpoint for an interval, the +

class (Interval_ interval r, StartPointOf interval ~ EndPoint Open r, EndPointOf interval ~ EndPoint Open r) => OpenInterval_ interval r | interval -> r Source #

A class representing open intervals, i.e. intervals that exclude their endpoints

Instances

Instances details
OpenInterval_ (OpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

OpenInterval_ interval r => OpenInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

pattern OpenInterval_ :: OpenInterval_ interval r => r -> r -> interval Source #

Pattern matching on an arbitrary open interval

class (OpenInterval_ interval r, ConstructableInterval_ interval r) => ConstructableOpenInterval_ interval r | interval -> r where Source #

Constructable Open intervals

Minimal complete definition

Nothing

Methods

mkOpenInterval :: r -> r -> interval Source #

Construct an interval given its start s and end point t.

pre: s < t

Instances

Instances details
ConstructableOpenInterval_ (OpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

mkOpenInterval :: r -> r -> OpenInterval r Source #

(ConstructableOpenInterval_ interval r, Default extra) => ConstructableOpenInterval_ (interval :+ extra) r Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

mkOpenInterval :: r -> r -> interval :+ extra Source #

class HasStart seg p | seg -> p where Source #

Things that have a start point

Methods

start :: Lens' seg p Source #

Lens to access the start point

Instances

Instances details
HasStart (HalfLine point) point Source # 
Instance details

Defined in HGeometry.HalfLine

Methods

start :: Lens' (HalfLine point) point Source #

HasStart (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasStart (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

start :: Lens' (LineSegment endPoint point) point Source #

HasStart seg p => HasStart (seg :+ extra) p Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

start :: Lens' (seg :+ extra) p Source #

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => HasStart (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

start :: Lens' (Interval endPoint r) r Source #

class HasEnd seg p | seg -> p where Source #

Things that have an end point

Methods

end :: Lens' seg p Source #

Lens to access the ending point

Instances

Instances details
HasEnd (HalfOpenInterval r) r Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => HasEnd (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

end :: Lens' (LineSegment endPoint point) point Source #

HasEnd seg p => HasEnd (seg :+ extra) p Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

end :: Lens' (seg :+ extra) p Source #

(EndPoint_ (endPoint r), IxValue (endPoint r) ~ r) => HasEnd (Interval endPoint r) r Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

end :: Lens' (Interval endPoint r) r Source #

startAndEnd :: (HasStart seg p, HasEnd seg p) => seg -> (p, p) Source #

Get both the start and end of something that has a start and end.

type family StartPointOf interval Source #

type family to declare the type of startpoint for an interval, the idea is to define this as one of the endpoinst form the Endpoints module

Instances

Instances details
type StartPointOf (HalfOpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

type StartPointOf (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type StartPointOf (LineSegment endPoint point) = endPoint point
type StartPointOf (interval :+ extra) Source # 
Instance details

Defined in HGeometry.Interval.Class

type StartPointOf (interval :+ extra) = StartPointOf interval
type StartPointOf (Interval endPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

type StartPointOf (Interval endPoint r) = endPoint r

type family EndPointOf interval Source #

type family to declare the type of endpoint for an interval, the idea is to define this as one of the endpoinst form the Endpoints module

Instances

Instances details
type EndPointOf (HalfOpenInterval r) Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

type EndPointOf (LineSegment endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

type EndPointOf (LineSegment endPoint point) = endPoint point
type EndPointOf (interval :+ extra) Source # 
Instance details

Defined in HGeometry.Interval.Class

type EndPointOf (interval :+ extra) = EndPointOf interval
type EndPointOf (Interval endPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

type EndPointOf (Interval endPoint r) = endPoint r

class HasStartPoint seg p | seg -> p where Source #

Things that have a start point

Methods

startPoint :: Lens' seg p Source #

Lens to access the start point

Instances

Instances details
HasStartPoint (HalfOpenInterval r) (EndPoint 'Open r) Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

HasStartPoint seg p => HasStartPoint (seg :+ extra) p Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

startPoint :: Lens' (seg :+ extra) p Source #

IxValue (endPoint point) ~ point => HasStartPoint (LineSegment endPoint point) (endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

startPoint :: Lens' (LineSegment endPoint point) (endPoint point) Source #

HasStartPoint (Interval endPoint r) (endPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

startPoint :: Lens' (Interval endPoint r) (endPoint r) Source #

class HasEndPoint seg p | seg -> p where Source #

Things that have an end point

Methods

endPoint :: Lens' seg p Source #

Lens to access the ending point

Instances

Instances details
HasEndPoint (HalfOpenInterval r) (EndPoint 'Closed r) Source # 
Instance details

Defined in HGeometry.Interval.HalfOpen

HasEndPoint seg p => HasEndPoint (seg :+ extra) p Source # 
Instance details

Defined in HGeometry.Interval.Class

Methods

endPoint :: Lens' (seg :+ extra) p Source #

IxValue (endPoint point) ~ point => HasEndPoint (LineSegment endPoint point) (endPoint point) Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

endPoint :: Lens' (LineSegment endPoint point) (endPoint point) Source #

HasEndPoint (Interval endPoint r) (endPoint r) Source # 
Instance details

Defined in HGeometry.Interval.Internal

Methods

endPoint :: Lens' (Interval endPoint r) (endPoint r) Source #

startAndEndPoint :: (HasStartPoint seg s, HasEndPoint seg e) => seg -> (s, e) Source #

Get both the start and end of something that has a start and end.

inInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> PointLocationResult Source #

Compute where the given query value is with respect to the interval.

Note that even if the boundary of the interval is open we may return OnBoundary.

stabsInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> Bool Source #

Test if the point lies inside in,or on the boundary of, the diff --git a/haddocks/hgeometry/kernel/HGeometry-LineSegment-Class.html b/haddocks/hgeometry/kernel/HGeometry-LineSegment-Class.html index 127e916cf..727a42090 100644 --- a/haddocks/hgeometry/kernel/HGeometry-LineSegment-Class.html +++ b/haddocks/hgeometry/kernel/HGeometry-LineSegment-Class.html @@ -1,5 +1,5 @@ HGeometry.LineSegment.Class

hgeometry:kernel
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.LineSegment.Class

Description

A class representing line segments

Synopsis

Documentation

class (IntervalLike_ lineSegment point, Point_ point (Dimension lineSegment) (NumType lineSegment)) => LineSegment_ lineSegment point | lineSegment -> point Source #

A class representing line segments

Instances

Instances details
(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), Point_ point (Dimension point) (NumType point)) => LineSegment_ (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

LineSegment_ segment point => LineSegment_ (segment :+ extra) point Source # 
Instance details

Defined in HGeometry.LineSegment.Class

pattern LineSegment_ :: forall lineSegment point. LineSegment_ lineSegment point => point -> point -> lineSegment Source #

Deconstructs a line segment from the start and end point

class LineSegment_ lineSegment point => ConstructableLineSegment_ lineSegment point where Source #

A class representing line segments

Minimal complete definition

uncheckedLineSegment

Methods

uncheckedLineSegment :: point -> point -> lineSegment Source #

Create a segment

pre: the points are disjoint

mkLineSegment :: Eq (Vector (Dimension point) (NumType point)) => point -> point -> Maybe lineSegment Source #

smart constructor that creates a valid segment, i.e. it - validates that the endpoints are disjoint.

Instances

Instances details
(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), Point_ point (Dimension point) (NumType point)) => ConstructableLineSegment_ (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

uncheckedLineSegment :: point -> point -> LineSegment endPoint point Source #

mkLineSegment :: point -> point -> Maybe (LineSegment endPoint point) Source #

(ConstructableLineSegment_ segment point, Default extra) => ConstructableLineSegment_ (segment :+ extra) point Source # 
Instance details

Defined in HGeometry.LineSegment.Class

Methods

uncheckedLineSegment :: point -> point -> segment :+ extra Source #

mkLineSegment :: point -> point -> Maybe (segment :+ extra) Source #

class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Closed point, EndPointOf lineSegment ~ EndPoint Closed point) => ClosedLineSegment_ lineSegment point Source #

A class representing Closed Linesegments

Instances

Instances details
Point_ point (Dimension point) (NumType point) => ClosedLineSegment_ (ClosedLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

ClosedLineSegment_ segment point => ClosedLineSegment_ (segment :+ extra) point Source # 
Instance details

Defined in HGeometry.LineSegment.Class

class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Open point, EndPointOf lineSegment ~ EndPoint Open point) => OpenLineSegment_ lineSegment point Source #

A Class representing Open ended linesegments

Instances

Instances details
Point_ point (Dimension point) (NumType point) => OpenLineSegment_ (OpenLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

OpenLineSegment_ segment point => OpenLineSegment_ (segment :+ extra) point Source # 
Instance details

Defined in HGeometry.LineSegment.Class

interpolate :: forall lineSegment d point r. (Fractional r, LineSegment_ lineSegment point, ConstructablePoint_ point d r) => r -> lineSegment -> point Source #

Linearly interpolate the two endpoints with a value in the range [0,1]

>>> interpolate 0.5 $ ClosedLineSegment origin (Point2 10.0 10.0)
+ validates that the endpoints are disjoint.

Instances

Instances details
(IxValue (endPoint point) ~ point, EndPoint_ (endPoint point), Point_ point (Dimension point) (NumType point)) => ConstructableLineSegment_ (LineSegment endPoint point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

Methods

uncheckedLineSegment :: point -> point -> LineSegment endPoint point Source #

mkLineSegment :: point -> point -> Maybe (LineSegment endPoint point) Source #

(ConstructableLineSegment_ segment point, Default extra) => ConstructableLineSegment_ (segment :+ extra) point Source # 
Instance details

Defined in HGeometry.LineSegment.Class

Methods

uncheckedLineSegment :: point -> point -> segment :+ extra Source #

mkLineSegment :: point -> point -> Maybe (segment :+ extra) Source #

class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Closed point, EndPointOf lineSegment ~ EndPoint Closed point) => ClosedLineSegment_ lineSegment point Source #

A class representing Closed Linesegments

Instances

Instances details
Point_ point (Dimension point) (NumType point) => ClosedLineSegment_ (ClosedLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

ClosedLineSegment_ segment point => ClosedLineSegment_ (segment :+ extra) point Source # 
Instance details

Defined in HGeometry.LineSegment.Class

class (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPoint Open point, EndPointOf lineSegment ~ EndPoint Open point) => OpenLineSegment_ lineSegment point Source #

A Class representing Open ended linesegments

Instances

Instances details
Point_ point (Dimension point) (NumType point) => OpenLineSegment_ (OpenLineSegment point) point Source # 
Instance details

Defined in HGeometry.LineSegment.Internal

OpenLineSegment_ segment point => OpenLineSegment_ (segment :+ extra) point Source # 
Instance details

Defined in HGeometry.LineSegment.Class

interpolate :: forall lineSegment d point r. (Fractional r, LineSegment_ lineSegment point, ConstructablePoint_ point d r) => r -> lineSegment -> point Source #

Linearly interpolate the two endpoints with a value in the range [0,1]

>>> interpolate 0.5 $ ClosedLineSegment origin (Point2 10.0 10.0)
 Point2 5.0 5.0
 >>> interpolate 0.1 $ ClosedLineSegment origin (Point2 10.0 10.0)
 Point2 1.0 1.0
diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Ball.CenterAndRadius.html b/haddocks/hgeometry/kernel/src/HGeometry.Ball.CenterAndRadius.html
index 7af8da4d7..fd83f638f 100644
--- a/haddocks/hgeometry/kernel/src/HGeometry.Ball.CenterAndRadius.html
+++ b/haddocks/hgeometry/kernel/src/HGeometry.Ball.CenterAndRadius.html
@@ -41,50 +41,50 @@
 --------------------------------------------------------------------------------
 
 -- | d-dimensional ball, specified by center and squared radius.
-data Ball point = Ball !point !(NumType point)
+data Ball point = Ball !point !(NumType point)
 
-deriving stock instance (Show point, Show (NumType point)) => Show (Ball point)
-deriving stock instance (Eq point, Eq (NumType point)) => Eq (Ball point)
+deriving stock instance (Show point, Show (NumType point)) => Show (Ball point)
+deriving stock instance (Eq point, Eq (NumType point)) => Eq (Ball point)
 
-type instance NumType   (Ball point) = NumType point
-type instance Dimension (Ball point) = Dimension point
+type instance NumType   (Ball point) = NumType point
+type instance Dimension (Ball point) = Dimension point
 
-instance HasCenter (Ball point) point where
-  center :: Lens' (Ball point) point
-center = (Ball point -> point)
+instance HasCenter (Ball point) point where
+  center :: Lens' (Ball point) point
+center = (Ball point -> point)
 -> (Ball point -> point -> Ball point) -> Lens' (Ball point) point
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens (\(Ball point
-c NumType point
+lens (\(Ball point
+c NumType point
 _) -> point
-c) (\(Ball point
-_ NumType point
-r) point
-c -> point -> NumType point -> Ball point
+c) (\(Ball point
+_ NumType point
+r) point
+c -> point -> NumType point -> Ball point
 forall point. point -> NumType point -> Ball point
 Ball point
-c NumType point
-r)
+c NumType point
+r)
 
-instance Point_ point (Dimension point) (NumType point) => Ball_ (Ball point) point where
-  squaredRadius :: Lens' (Ball point) (NumType (Ball point))
-squaredRadius = (Ball point -> NumType point)
+instance Point_ point (Dimension point) (NumType point) => Ball_ (Ball point) point where
+  squaredRadius :: Lens' (Ball point) (NumType (Ball point))
+squaredRadius = (Ball point -> NumType point)
 -> (Ball point -> NumType point -> Ball point)
 -> Lens (Ball point) (Ball point) (NumType point) (NumType point)
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
 lens (\(Ball point
-_ NumType point
-r) -> NumType point
-r) (\(Ball point
-c NumType point
-_) NumType point
-r -> point -> NumType point -> Ball point
+_ NumType point
+r) -> NumType point
+r) (\(Ball point
+c NumType point
+_) NumType point
+r -> point -> NumType point -> Ball point
 forall point. point -> NumType point -> Ball point
 Ball point
-c NumType point
-r)
-  fromCenterAndSquaredRadius :: point -> NumType (Ball point) -> Ball point
-fromCenterAndSquaredRadius = point -> NumType point -> Ball point
+c NumType point
+r)
+  fromCenterAndSquaredRadius :: point -> NumType (Ball point) -> Ball point
+fromCenterAndSquaredRadius = point -> NumType point -> Ball point
 point -> NumType (Ball point) -> Ball point
 forall point. point -> NumType point -> Ball point
 Ball
@@ -92,24 +92,24 @@
 --------------------------------------------------------------------------------
 -- * Point in ball
 
-type instance Intersection (Point d r) (Ball point) = Maybe (Point d r)
+type instance Intersection (Point d r) (Ball point) = Maybe (Point d r)
 
-instance ( Point_ point d r
-         , Ord r, Num r
-         , Has_ Metric_ d r
-         ) => (Point d r) `HasIntersectionWith` (Ball point) where
-  intersects :: Point d r -> Ball point -> Bool
-intersects Point d r
-q (Ball point
-c NumType point
-r) = Point d r -> Point d r -> r
+instance ( Point_ point d r
+         , Ord r, Num r
+         , Has_ Metric_ d r
+         ) => (Point d r) `HasIntersectionWith` (Ball point) where
+  intersects :: Point d r -> Ball point -> Bool
+intersects Point d r
+q (Ball point
+c NumType point
+r) = Point d r -> Point d r -> r
 forall r point (d :: Nat) point'.
 (Num r, Point_ point d r, Point_ point' d r,
  Metric_ (Vector d r) d r) =>
 point -> point' -> r
 squaredEuclideanDist Point d r
-q (point
-cpoint -> Getting (Point d r) point (Point d r) -> Point d r
+q (point
+cpoint -> Getting (Point d r) point (Point d r) -> Point d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Point d r) point (Point d r)
 forall point (d :: Nat) r.
@@ -120,23 +120,23 @@
 forall a. Ord a => a -> a -> Bool
 <= r
 NumType point
-r
+r
 
-instance ( Point_ point d r
-         , Ord r, Num r
-         , Has_ Metric_ d r
-         ) => (Point d r) `IsIntersectableWith` (Ball point) where
-  intersect :: Point d r -> Ball point -> Intersection (Point d r) (Ball point)
-intersect Point d r
-q Ball point
-b | Point d r
-q Point d r -> Ball point -> Bool
+instance ( Point_ point d r
+         , Ord r, Num r
+         , Has_ Metric_ d r
+         ) => (Point d r) `IsIntersectableWith` (Ball point) where
+  intersect :: Point d r -> Ball point -> Intersection (Point d r) (Ball point)
+intersect Point d r
+q Ball point
+b | Point d r
+q Point d r -> Ball point -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` Ball point
-b = Point d r -> Maybe (Point d r)
+b = Point d r -> Maybe (Point d r)
 forall a. a -> Maybe a
 Just Point d r
-q
+q
                 | Bool
 otherwise        = Maybe (Point d r)
 Intersection (Point d r) (Ball point)
@@ -150,15 +150,15 @@
 -- essentially this is all just computing  the squared euclidean distance
 -- between the object and the center, and testing if it is at most r
 
-instance ( Point_ point d r
-         , Ord r, Fractional r
-         , Has_ Metric_ d r
-         ) => (LinePV d r) `HasIntersectionWith` (Ball point) where
-  intersects :: LinePV d r -> Ball point -> Bool
-intersects LinePV d r
-l (Ball point
-c NumType point
-r) = point -> LinePV d r -> r
+instance ( Point_ point d r
+         , Ord r, Fractional r
+         , Has_ Metric_ d r
+         ) => (LinePV d r) `HasIntersectionWith` (Ball point) where
+  intersects :: LinePV d r -> Ball point -> Bool
+intersects LinePV d r
+l (Ball point
+c NumType point
+r) = point -> LinePV d r -> r
 forall g r (d :: Nat) point.
 (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g,
  Num r, Point_ point d r) =>
@@ -168,24 +168,24 @@
  Point_ point d r) =>
 point -> LinePV d r -> r
 squaredEuclideanDistTo point
-c LinePV d r
-l r -> r -> Bool
+c LinePV d r
+l r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 <= r
 NumType point
-r
+r
 
-instance ( Point_ point d r, Point_ point' d r
-         , Ord r, Fractional r
-         , Has_ Metric_ d r
-         , HasSquaredEuclideanDistance point'
-         , MkHyperPlaneConstraints d r
-         ) => (ClosedLineSegment point') `HasIntersectionWith` (Ball point) where
-  intersects :: ClosedLineSegment point' -> Ball point -> Bool
-intersects ClosedLineSegment point'
-s (Ball point
-c NumType point
-r) = point -> ClosedLineSegment point' -> r
+instance ( Point_ point d r, Point_ point' d r
+         , Ord r, Fractional r
+         , Has_ Metric_ d r
+         , HasSquaredEuclideanDistance point'
+         , MkHyperPlaneConstraints d r
+         ) => (ClosedLineSegment point') `HasIntersectionWith` (Ball point) where
+  intersects :: ClosedLineSegment point' -> Ball point -> Bool
+intersects ClosedLineSegment point'
+s (Ball point
+c NumType point
+r) = point -> ClosedLineSegment point' -> r
 forall g r (d :: Nat) point.
 (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g,
  Num r, Point_ point d r) =>
@@ -196,24 +196,24 @@
  Point_ point d r) =>
 point -> ClosedLineSegment point' -> r
 squaredEuclideanDistTo point
-c ClosedLineSegment point'
-s r -> r -> Bool
+c ClosedLineSegment point'
+s r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 <= r
 NumType point
-r
+r
 
-instance ( Point_ point d r, Point_ point' d r
-         , Ord r, Fractional r
-         , Has_ Metric_ d r
-         , HasSquaredEuclideanDistance point'
-         , MkHyperPlaneConstraints d r
-         ) => (HalfLine point') `HasIntersectionWith` (Ball point) where
-  intersects :: HalfLine point' -> Ball point -> Bool
-intersects HalfLine point'
-hl (Ball point
-c NumType point
-r) = point -> HalfLine point' -> r
+instance ( Point_ point d r, Point_ point' d r
+         , Ord r, Fractional r
+         , Has_ Metric_ d r
+         , HasSquaredEuclideanDistance point'
+         , MkHyperPlaneConstraints d r
+         ) => (HalfLine point') `HasIntersectionWith` (Ball point) where
+  intersects :: HalfLine point' -> Ball point -> Bool
+intersects HalfLine point'
+hl (Ball point
+c NumType point
+r) = point -> HalfLine point' -> r
 forall g r (d :: Nat) point.
 (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g,
  Num r, Point_ point d r) =>
@@ -223,37 +223,37 @@
  Num r, Point_ point d r) =>
 point -> HalfLine point' -> r
 squaredEuclideanDistTo point
-c HalfLine point'
-hl r -> r -> Bool
+c HalfLine point'
+hl r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 <= r
 NumType point
-r
+r
 
 ----------------------------------------
 
-type instance Intersection (LinePV d r) (Ball point) =
-  Maybe (IntersectionOf (LinePV d r) (Ball point))
+type instance Intersection (LinePV d r) (Ball point) =
+  Maybe (IntersectionOf (LinePV d r) (Ball point))
 
-data instance IntersectionOf (LinePV d r) (Ball point) =
-    Line_x_Ball_Point   (Point d r)
-  | Line_x_Ball_Segment (ClosedLineSegment (Point d r))
+data instance IntersectionOf (LinePV d r) (Ball point) =
+    Line_x_Ball_Point   (Point d r)
+  | Line_x_Ball_Segment (ClosedLineSegment (Point d r))
 
-deriving instance (Show r, Has_ Additive_ d r) => Show (IntersectionOf (LinePV d r) (Ball point))
-deriving instance (Eq r, Eq (Vector d r))      => Eq   (IntersectionOf (LinePV d r) (Ball point))
+deriving instance (Show r, Has_ Additive_ d r) => Show (IntersectionOf (LinePV d r) (Ball point))
+deriving instance (Eq r, Eq (Vector d r))      => Eq   (IntersectionOf (LinePV d r) (Ball point))
 
 
-instance ( Point_ point d r
-         , Ord r, Fractional r, Radical r
-         , Has_ Metric_ d r
-         ) => (LinePV d r) `IsIntersectableWith` (Ball point) where
-  intersect :: LinePV d r -> Ball point -> Intersection (LinePV d r) (Ball point)
-intersect (LinePV Point d r
-p Vector d r
-v) (Ball point
-c' NumType point
-r) = case r
-discr r -> r -> Ordering
+instance ( Point_ point d r
+         , Ord r, Fractional r, Radical r
+         , Has_ Metric_ d r
+         ) => (LinePV d r) `IsIntersectableWith` (Ball point) where
+  intersect :: LinePV d r -> Ball point -> Intersection (LinePV d r) (Ball point)
+intersect (LinePV Point d r
+p Vector d r
+v) (Ball point
+c' NumType point
+r) = case r
+discr r -> r -> Ordering
 forall a. Ord a => a -> a -> Ordering
 `compare` r
 0 of
@@ -275,7 +275,7 @@
 forall (d :: Nat) r point.
 Point d r -> IntersectionOf (LinePV d r) (Ball point)
 Line_x_Ball_Point Point d r
-q0 -- line touches in q
+q0 -- line touches in q
       Ordering
 GT -> IntersectionOf (LinePV d r) (Ball point)
 -> Maybe (IntersectionOf (LinePV d r) (Ball point))
@@ -293,8 +293,8 @@
 Line_x_Ball_Segment (Point d r -> Point d r -> ClosedLineSegment (Point d r)
 forall point. point -> point -> ClosedLineSegment point
 ClosedLineSegment Point d r
-q1 Point d r
-q2)
+q1 Point d r
+q2)
     where
       -- main idea: let q = p + \lambda v be an intersection point, we also have
       -- squaredEuclideanDist q c' == squaredRadius (=r) this yields some quadratic
@@ -307,46 +307,46 @@
       -- (lambda^2 sum_i=1^d v_i^2\ + \lambda sum_i=1^d 2v_i(p_i- c'_i)  + sum_i=1^d (p_i- c'_i)^2)  - r = 0 )
 
 
-      a :: r
-a = Vector d r
-v Vector d r -> Vector d r -> r
+      a :: r
+a = Vector d r
+v Vector d r -> Vector d r -> r
 forall vector (d :: Nat) r.
 (Metric_ vector d r, Num r) =>
 vector -> vector -> r
 `dot` Vector d r
-v -- sum_i v_i^2
-      b :: r
-b = r
+v -- sum_i v_i^2
+      b :: r
+b = r
 2 r -> r -> r
 forall a. Num a => a -> a -> a
 * (Vector d r
-v Vector d r -> Vector d r -> r
+v Vector d r -> Vector d r -> r
 forall vector (d :: Nat) r.
 (Metric_ vector d r, Num r) =>
 vector -> vector -> r
 `dot` Vector d r
-u) -- sum_i v_i(p_i-c_i)
-      c :: r
-c = (Vector d r
-u Vector d r -> Vector d r -> r
+u) -- sum_i v_i(p_i-c_i)
+      c :: r
+c = (Vector d r
+u Vector d r -> Vector d r -> r
 forall vector (d :: Nat) r.
 (Metric_ vector d r, Num r) =>
 vector -> vector -> r
 `dot` Vector d r
-u) r -> r -> r
+u) r -> r -> r
 forall a. Num a => a -> a -> a
 - r
 NumType point
-r -- sum_i (p_i-c_i)^2  - radius^2
+r -- sum_i (p_i-c_i)^2  - radius^2
 
-      u :: Vector d r
-u = Point d r
-p Point d r -> Point d r -> Vector d r
+      u :: Vector d r
+u = Point d r
+p Point d r -> Point d r -> Vector d r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> point -> Vector d r
 .-. (point
-c'point -> Getting (Point d r) point (Point d r) -> Point d r
+c'point -> Getting (Point d r) point (Point d r) -> Point d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Point d r) point (Point d r)
 forall point (d :: Nat) r.
@@ -355,9 +355,9 @@
 Lens' point (Point d r)
 asPoint) -- helper
 
-      discr :: r
-discr  = r
-br -> Integer -> r
+      discr :: r
+discr  = r
+br -> Integer -> r
 forall a b. (Num a, Integral b) => a -> b -> a
 ^Integer
 2 r -> r -> r
@@ -366,132 +366,132 @@
 4r -> r -> r
 forall a. Num a => a -> a -> a
 *r
-ar -> r -> r
+ar -> r -> r
 forall a. Num a => a -> a -> a
 *r
-c
-      discr' :: r
-discr' = r -> r
+c
+      discr' :: r
+discr' = r -> r
 forall r. Radical r => r -> r
 sqrt r
-discr
-      da :: r
-da = r
+discr
+      da :: r
+da = r
 2r -> r -> r
 forall a. Num a => a -> a -> a
 *r
-a
+a
 
-      lambda1 :: r
-lambda1 = ((r -> r
+      lambda1 :: r
+lambda1 = ((r -> r
 forall a. Num a => a -> a
 negate r
-discr') r -> r -> r
+discr') r -> r -> r
 forall a. Num a => a -> a -> a
 - r
-b) r -> r -> r
+b) r -> r -> r
 forall a. Fractional a => a -> a -> a
 / r
-da -- the two solutions
-      lambda2 :: r
-lambda2 = (r
-discr'          r -> r -> r
+da -- the two solutions
+      lambda2 :: r
+lambda2 = (r
+discr'          r -> r -> r
 forall a. Num a => a -> a -> a
 - r
-b) r -> r -> r
+b) r -> r -> r
 forall a. Fractional a => a -> a -> a
 / r
-da --
+da --
       -- note: v must have non-zero length; and thus a (and therefore da) are non-zero.
 
-      q1 :: Point d r
-q1 = Point d r
-p Point d r -> Vector d r -> Point d r
+      q1 :: Point d r
+q1 = Point d r
+p Point d r -> Vector d r -> Point d r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> Vector d r -> point
 .+^ (r
-lambda1 r -> Vector d r -> Vector d r
+lambda1 r -> Vector d r -> Vector d r
 forall r vector (d :: Nat).
 (Num r, Vector_ vector d r) =>
 r -> vector -> vector
 *^ Vector d r
-v)
-      q2 :: Point d r
-q2 = Point d r
-p Point d r -> Vector d r -> Point d r
+v)
+      q2 :: Point d r
+q2 = Point d r
+p Point d r -> Vector d r -> Point d r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> Vector d r -> point
 .+^ (r
-lambda2 r -> Vector d r -> Vector d r
+lambda2 r -> Vector d r -> Vector d r
 forall r vector (d :: Nat).
 (Num r, Vector_ vector d r) =>
 r -> vector -> vector
 *^ Vector d r
-v)
+v)
 
       -- if the discr is zer0 there is only one solution:
-      lambda0 :: r
-lambda0 = (r -> r
+      lambda0 :: r
+lambda0 = (r -> r
 forall a. Num a => a -> a
 negate r
-b) r -> r -> r
+b) r -> r -> r
 forall a. Fractional a => a -> a -> a
 / r
-da
-      q0 :: Point d r
-q0 = Point d r
-p Point d r -> Vector d r -> Point d r
+da
+      q0 :: Point d r
+q0 = Point d r
+p Point d r -> Vector d r -> Point d r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> Vector d r -> point
 .+^ (r
-lambda0 r -> Vector d r -> Vector d r
+lambda0 r -> Vector d r -> Vector d r
 forall r vector (d :: Nat).
 (Num r, Vector_ vector d r) =>
 r -> vector -> vector
 *^ Vector d r
-v)
+v)
 
 ----------------------------------------
 
-type instance Intersection (HalfLine point') (Ball point) =
-  Maybe (IntersectionOf (LinePV (Dimension point) (NumType point)) (Ball point))
+type instance Intersection (HalfLine point') (Ball point) =
+  Maybe (IntersectionOf (LinePV (Dimension point) (NumType point)) (Ball point))
 
-instance ( Point_ point d r, Point_ point' d r
-         , Ord r, Fractional r, Radical r
-         , Has_ Metric_ d r
-         , MkHyperPlaneConstraints d r
-         , HasSquaredEuclideanDistance point'
-         ) => (HalfLine point') `IsIntersectableWith` (Ball point) where
-  intersect :: HalfLine point'
+instance ( Point_ point d r, Point_ point' d r
+         , Ord r, Fractional r, Radical r
+         , Has_ Metric_ d r
+         , MkHyperPlaneConstraints d r
+         , HasSquaredEuclideanDistance point'
+         ) => (HalfLine point') `IsIntersectableWith` (Ball point) where
+  intersect :: HalfLine point'
 -> Ball point -> Intersection (HalfLine point') (Ball point)
-intersect (HalfLine point'
-p Vector (Dimension point') (NumType point')
-v) Ball point
-b = LinePV d r -> Ball point -> Intersection (LinePV d r) (Ball point)
+intersect (HalfLine point'
+p Vector (Dimension point') (NumType point')
+v) Ball point
+b = LinePV d r -> Ball point -> Intersection (LinePV d r) (Ball point)
 forall g h. IsIntersectableWith g h => g -> h -> Intersection g h
 intersect (Point d r -> Vector d r -> LinePV d r
 forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r
 LinePV Point d r
-p' Vector d r
+p' Vector d r
 Vector (Dimension point') (NumType point')
-v) Ball point
-b Maybe (IntersectionOf (LinePV d r) (Ball point))
+v) Ball point
+b Maybe (IntersectionOf (LinePV d r) (Ball point))
 -> (IntersectionOf (LinePV d r) (Ball point)
     -> Maybe (IntersectionOf (LinePV d r) (Ball point)))
 -> Maybe (IntersectionOf (LinePV d r) (Ball point))
 forall a b. Maybe a -> (a -> Maybe b) -> Maybe b
 forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
 >>= \case
-      Line_x_Ball_Point Point d r
-q
+      Line_x_Ball_Point Point d r
+q
         | Point d r
-q Point d r -> HalfSpace d r -> Bool
+q Point d r -> HalfSpace d r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` HalfSpace d r
-h    -> IntersectionOf (LinePV d r) (Ball point)
+h    -> IntersectionOf (LinePV d r) (Ball point)
 -> Maybe (IntersectionOf (LinePV d r) (Ball point))
 forall a. a -> Maybe a
 Just (IntersectionOf (LinePV d r) (Ball point)
@@ -503,24 +503,24 @@
 forall (d :: Nat) r point.
 Point d r -> IntersectionOf (LinePV d r) (Ball point)
 Line_x_Ball_Point Point d r
-q
+q
         | Bool
 otherwise           -> Maybe (IntersectionOf (LinePV d r) (Ball point))
 forall a. Maybe a
 Nothing
-      Line_x_Ball_Segment seg :: ClosedLineSegment (Point d r)
-seg@(ClosedLineSegment Point d r
-a Point d r
-c) ->
+      Line_x_Ball_Segment seg :: ClosedLineSegment (Point d r)
+seg@(ClosedLineSegment Point d r
+a Point d r
+c) ->
         case (Point d r
-a Point d r -> HalfSpace d r -> Bool
+a Point d r -> HalfSpace d r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` HalfSpace d r
-h, Point d r
-c Point d r -> HalfSpace d r -> Bool
+h, Point d r
+c Point d r -> HalfSpace d r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` HalfSpace d r
-h) of
+h) of
           (Bool
 False,Bool
 False) -> Maybe (IntersectionOf (LinePV d r) (Ball point))
@@ -544,8 +544,8 @@
 Line_x_Ball_Segment (Point d r -> Point d r -> ClosedLineSegment (Point d r)
 forall point. point -> point -> ClosedLineSegment point
 ClosedLineSegment Point d r
-p' Point d r
-c)
+p' Point d r
+c)
           (Bool
 True,Bool
 False)  -> IntersectionOf (LinePV d r) (Ball point)
@@ -564,8 +564,8 @@
 Line_x_Ball_Segment (Point d r -> Point d r -> ClosedLineSegment (Point d r)
 forall point. point -> point -> ClosedLineSegment point
 ClosedLineSegment Point d r
-a  Point d r
-p')
+a  Point d r
+p')
           (Bool
 True,Bool
 True)   -> IntersectionOf (LinePV d r) (Ball point)
@@ -582,11 +582,11 @@
 ClosedLineSegment (Point d r)
 -> IntersectionOf (LinePV d r) (Ball point)
 Line_x_Ball_Segment ClosedLineSegment (Point d r)
-seg
+seg
     where
-      h :: HalfSpace d r
-      h :: HalfSpace d r
-h  = Sign -> HyperPlane d r -> HalfSpace d r
+      h :: HalfSpace d r
+      h :: HalfSpace d r
+h  = Sign -> HyperPlane d r -> HalfSpace d r
 forall boundingHyperPlane.
 Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane
 HalfSpace Sign
@@ -599,12 +599,12 @@
  Num r) =>
 point -> Vector d r -> hyperPlane
 fromPointAndNormal Point d r
-p' Vector d r
+p' Vector d r
 Vector (Dimension point') (NumType point')
-v)
-      p' :: Point d r
-p' = point'
-ppoint' -> Getting (Point d r) point' (Point d r) -> Point d r
+v)
+      p' :: Point d r
+p' = point'
+ppoint' -> Getting (Point d r) point' (Point d r) -> Point d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Point d r) point' (Point d r)
 forall point (d :: Nat) r.
@@ -613,8 +613,8 @@
 Lens' point' (Point d r)
 asPoint
 
-type instance Intersection (ClosedLineSegment point') (Ball point) =
-  Maybe (IntersectionOf (LinePV (Dimension point) (NumType point)) (Ball point))
+type instance Intersection (ClosedLineSegment point') (Ball point) =
+  Maybe (IntersectionOf (LinePV (Dimension point) (NumType point)) (Ball point))
 
 -- data instance IntersectionOf (ClosedLineSegment point) (Ball point) =
 --     LineSegment_x_Ball_Point   point
@@ -638,72 +638,72 @@
 
 
 
-instance Point_ point 2 (NumType point) => Disk_ (Ball point) point where
+instance Point_ point 2 (NumType point) => Disk_ (Ball point) point where
 
 -- | Balls in 2D are also known as Disks
 type Disk = Ball
 
 -- | Construct a disk
-pattern Disk     :: point -> NumType point -> Disk point
+pattern Disk     :: point -> NumType point -> Disk point
 pattern $mDisk :: forall {r} {point}.
 Disk point -> (point -> NumType point -> r) -> ((# #) -> r) -> r
 $bDisk :: forall point. point -> NumType point -> Ball point
-Disk c r = Ball c r
+Disk c r = Ball c r
 {-# COMPLETE Disk #-}
 
 --------------------------------------------------------------------------------
 
 -- | A sphere, i.e. the boudary of a Ball.
-newtype Sphere point = MkSphere (Ball point)
+newtype Sphere point = MkSphere (Ball point)
 
 -- | Construct a Sphere; the boundary of a ball
-pattern Sphere     :: point -> NumType point -> Sphere point
+pattern Sphere     :: point -> NumType point -> Sphere point
 pattern $mSphere :: forall {r} {point}.
 Sphere point -> (point -> NumType point -> r) -> ((# #) -> r) -> r
 $bSphere :: forall point. point -> NumType point -> Sphere point
-Sphere c r = MkSphere (Ball c r)
+Sphere c r = MkSphere (Ball c r)
 {-# COMPLETE Sphere #-}
 
 -- | A circle, i.e. the boundary of a Disk
 type Circle = Sphere
 
 -- | Construct a Circle
-pattern Circle     :: point -> NumType point -> Circle point
+pattern Circle     :: point -> NumType point -> Circle point
 pattern $mCircle :: forall {r} {point}.
 Sphere point -> (point -> NumType point -> r) -> ((# #) -> r) -> r
 $bCircle :: forall point. point -> NumType point -> Sphere point
-Circle c r = Sphere c r
+Circle c r = Sphere c r
 {-# COMPLETE Circle #-}
 
 
-deriving stock instance (Show point, Show (NumType point)) => Show (Sphere point)
-deriving stock instance (Eq point, Eq (NumType point)) => Eq (Sphere point)
+deriving stock instance (Show point, Show (NumType point)) => Show (Sphere point)
+deriving stock instance (Eq point, Eq (NumType point)) => Eq (Sphere point)
 
-type instance NumType   (Sphere point) = NumType point
-type instance Dimension (Sphere point) = Dimension point
+type instance NumType   (Sphere point) = NumType point
+type instance Dimension (Sphere point) = Dimension point
 
-instance HasCenter (Sphere point) point where
-  center :: Lens' (Sphere point) point
+instance HasCenter (Sphere point) point where
+  center :: Lens' (Sphere point) point
 center = (Sphere point -> point)
 -> (Sphere point -> point -> Sphere point)
 -> Lens' (Sphere point) point
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens (\(Sphere point
-c NumType point
+lens (\(Sphere point
+c NumType point
 _) -> point
-c) (\(Sphere point
-_ NumType point
-r) point
-c -> point -> NumType point -> Sphere point
+c) (\(Sphere point
+_ NumType point
+r) point
+c -> point -> NumType point -> Sphere point
 forall point. point -> NumType point -> Sphere point
 Sphere point
-c NumType point
-r)
+c NumType point
+r)
 
 --------------------------------------------------------------------------------
 
 -- | Iso to convert between a ball and a sphere.
-_BallSphere :: Iso (Ball point) (Ball point') (Sphere point) (Sphere point')
+_BallSphere :: Iso (Ball point) (Ball point') (Sphere point) (Sphere point')
 _BallSphere :: forall point point' (p :: * -> * -> *) (f :: * -> *).
 (Profunctor p, Functor f) =>
 p (Sphere point) (f (Sphere point'))
@@ -716,7 +716,7 @@
 {-# INLINE _BallSphere #-}
 
 -- | Iso to convert between a Disk and a Circle
-_DiskCircle :: Iso (Disk point) (Disk point') (Circle point) (Circle point')
+_DiskCircle :: Iso (Disk point) (Disk point') (Circle point) (Circle point')
 _DiskCircle :: forall point point' (p :: * -> * -> *) (f :: * -> *).
 (Profunctor p, Functor f) =>
 p (Sphere point) (f (Sphere point'))
@@ -732,24 +732,24 @@
 
 --------------------------------------------------------------------------------
 
-type instance Intersection (Point d r) (Sphere point) = Maybe (Point d r)
+type instance Intersection (Point d r) (Sphere point) = Maybe (Point d r)
 
-instance ( Point_ point d r
-         , Eq r, Num r
-         , Has_ Metric_ d r
-         ) => (Point d r) `HasIntersectionWith` (Sphere point) where
-  intersects :: Point d r -> Sphere point -> Bool
-intersects Point d r
-q (Sphere point
-c NumType point
-r) = Point d r -> Point d r -> r
+instance ( Point_ point d r
+         , Eq r, Num r
+         , Has_ Metric_ d r
+         ) => (Point d r) `HasIntersectionWith` (Sphere point) where
+  intersects :: Point d r -> Sphere point -> Bool
+intersects Point d r
+q (Sphere point
+c NumType point
+r) = Point d r -> Point d r -> r
 forall r point (d :: Nat) point'.
 (Num r, Point_ point d r, Point_ point' d r,
  Metric_ (Vector d r) d r) =>
 point -> point' -> r
 squaredEuclideanDist Point d r
-q (point
-cpoint -> Getting (Point d r) point (Point d r) -> Point d r
+q (point
+cpoint -> Getting (Point d r) point (Point d r) -> Point d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Point d r) point (Point d r)
 forall point (d :: Nat) r.
@@ -760,41 +760,41 @@
 forall a. Eq a => a -> a -> Bool
 == r
 NumType point
-r
+r
 
-instance ( Point_ point d r
-         , Eq r, Num r
-         , Has_ Metric_ d r
+instance ( Point_ point d r
+         , Eq r, Num r
+         , Has_ Metric_ d r
          -- , OptVector_ d r, OptMetric_ d r
-         ) => (Point d r) `IsIntersectableWith` (Sphere point) where
-  intersect :: Point d r
+         ) => (Point d r) `IsIntersectableWith` (Sphere point) where
+  intersect :: Point d r
 -> Sphere point -> Intersection (Point d r) (Sphere point)
-intersect Point d r
-q Sphere point
-b | Point d r
-q Point d r -> Sphere point -> Bool
+intersect Point d r
+q Sphere point
+b | Point d r
+q Point d r -> Sphere point -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` Sphere point
-b = Point d r -> Maybe (Point d r)
+b = Point d r -> Maybe (Point d r)
 forall a. a -> Maybe a
 Just Point d r
-q
+q
                 | Bool
 otherwise        = Maybe (Point d r)
 Intersection (Point d r) (Sphere point)
 forall a. Maybe a
 Nothing
 
-instance ( Point_ point d r, Point_ point' d r
-         , Ord r, Fractional r
-         , Has_ Metric_ d r
-         , HasSquaredEuclideanDistance point'
-         ) => (ClosedLineSegment point') `HasIntersectionWith` (Sphere point) where
-  intersects :: ClosedLineSegment point' -> Sphere point -> Bool
-intersects ClosedLineSegment point'
-s (Sphere point
-c NumType point
-r) = point -> ClosedLineSegment point' -> r
+instance ( Point_ point d r, Point_ point' d r
+         , Ord r, Fractional r
+         , Has_ Metric_ d r
+         , HasSquaredEuclideanDistance point'
+         ) => (ClosedLineSegment point') `HasIntersectionWith` (Sphere point) where
+  intersects :: ClosedLineSegment point' -> Sphere point -> Bool
+intersects ClosedLineSegment point'
+s (Sphere point
+c NumType point
+r) = point -> ClosedLineSegment point' -> r
 forall g r (d :: Nat) point.
 (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g,
  Num r, Point_ point d r) =>
@@ -805,10 +805,10 @@
  Point_ point d r) =>
 point -> ClosedLineSegment point' -> r
 squaredEuclideanDistTo point
-c ClosedLineSegment point'
-s r -> r -> Bool
+c ClosedLineSegment point'
+s r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 <= r
 NumType point
-r
+r
 
\ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Ball.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.Ball.Class.html index 6b7033819..add9cf176 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Ball.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Ball.Class.html @@ -31,27 +31,27 @@ -------------------------------------------------------------------------------- -- | Types that have a 'center' field lens -class HasCenter geom point | geom -> point where +class HasCenter geom point | geom -> point where -- | Lens to access the center point of a geometry - center :: Lens' geom point + center :: Lens' geom point -- | Balls in d-dimensional space -class ( HasCenter ball point - , NumType ball ~ NumType point - , Point_ point (Dimension ball) (NumType ball) - ) => Ball_ ball point | ball -> point where +class ( HasCenter ball point + , NumType ball ~ NumType point + , Point_ point (Dimension ball) (NumType ball) + ) => Ball_ ball point | ball -> point where {-# MINIMAL squaredRadius, fromCenterAndSquaredRadius #-} -- | Lens to access the squared radius of a ball - squaredRadius :: Lens' ball (NumType ball) + squaredRadius :: Lens' ball (NumType ball) -- | Construct a ball from the center and *squared* radius - fromCenterAndSquaredRadius :: point -> NumType ball -> ball + fromCenterAndSquaredRadius :: point -> NumType ball -> ball -- | A d dimensional unit ball centered at the origin. - unitBall :: (r ~ NumType ball, d ~ Dimension ball - , Num r, ConstructablePoint_ point d r) => ball - unitBall = point -> NumType ball -> ball + unitBall :: (r ~ NumType ball, d ~ Dimension ball + , Num r, ConstructablePoint_ point d r) => ball + unitBall = point -> NumType ball -> ball forall ball point. Ball_ ball point => point -> NumType ball -> ball @@ -64,8 +64,8 @@ 1 -- | A lens to get/set the radius of a Ball - radius :: Radical.Radical (NumType ball) => Lens' ball (NumType ball) - radius = (ball -> NumType point) + radius :: Radical.Radical (NumType ball) => Lens' ball (NumType ball) + radius = (ball -> NumType point) -> (ball -> NumType point -> ball) -> Lens ball ball (NumType point) (NumType point) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b @@ -82,9 +82,9 @@ Getting (NumType point) ball (NumType point) forall ball point. Ball_ ball point => Lens' ball (NumType ball) Lens' ball (NumType ball) -squaredRadius) (\ball -b NumType point -r -> ASetter ball ball (NumType point) (NumType point) +squaredRadius) (\ball +b NumType point +r -> ASetter ball ball (NumType point) (NumType point) -> NumType point -> ball -> ball forall s t a b. ASetter s t a b -> b -> s -> t set (NumType ball -> Identity (NumType ball)) -> ball -> Identity ball @@ -92,31 +92,31 @@ forall ball point. Ball_ ball point => Lens' ball (NumType ball) Lens' ball (NumType ball) squaredRadius (NumType point -rNumType point -> NumType point -> NumType point +rNumType point -> NumType point -> NumType point forall a. Num a => a -> a -> a *NumType point -r) ball -b) +r) ball +b) -- | Constructs a Ball from its center and squared radius. -pattern Ball_ :: Ball_ ball point => point -> NumType ball -> ball +pattern Ball_ :: Ball_ ball point => point -> NumType ball -> ball pattern $mBall_ :: forall {r} {ball} {point}. Ball_ ball point => ball -> (point -> NumType ball -> r) -> ((# #) -> r) -> r $bBall_ :: forall ball point. Ball_ ball point => point -> NumType ball -> ball -Ball_ c r <- ((view center &&& view squaredRadius) -> (c,r)) +Ball_ c r <- ((view center &&& view squaredRadius) -> (c,r)) where - Ball_ point -c NumType ball -r = point -> NumType ball -> ball + Ball_ point +c NumType ball +r = point -> NumType ball -> ball forall ball point. Ball_ ball point => point -> NumType ball -> ball fromCenterAndSquaredRadius point -c NumType ball -r +c NumType ball +r {-# COMPLETE Ball_ #-} -------------------------------------------------------------------------------- @@ -128,80 +128,80 @@ -- | Given two points on the diameter of the ball, construct a ball. -fromDiametralPair :: (Fractional r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) - => point -> point -> ball +fromDiametralPair :: (Fractional r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) + => point -> point -> ball fromDiametralPair :: forall r point (d :: Nat) ball. (Fractional r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) => point -> point -> ball -fromDiametralPair point -p point -q = point -> point -> ball +fromDiametralPair point +p point +q = point -> point -> ball forall r point (d :: Nat) ball. (Num r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) => point -> point -> ball fromCenterAndPoint (point -p point -> Vector d r -> point +p point -> Vector d r -> point forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ ((point -q point -> point -> Vector d r +q point -> point -> Vector d r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -p) Vector d r -> r -> Vector d r +p) Vector d r -> r -> Vector d r forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector ^/ r 2)) point -p +p -- | Construct a ball given the center point and a point p on the boundary. -fromCenterAndPoint :: ( Num r, Point_ point d r, Ball_ ball point - , Has_ Metric_ d r +fromCenterAndPoint :: ( Num r, Point_ point d r, Ball_ ball point + , Has_ Metric_ d r ) - => point -> point -> ball + => point -> point -> ball fromCenterAndPoint :: forall r point (d :: Nat) ball. (Num r, Point_ point d r, Ball_ ball point, Has_ Metric_ d r) => point -> point -> ball -fromCenterAndPoint point -c point -p = point -> NumType ball -> ball +fromCenterAndPoint point +c point +p = point -> NumType ball -> ball forall ball point. Ball_ ball point => point -> NumType ball -> ball fromCenterAndSquaredRadius point -c (point -> point -> r +c (point -> point -> r forall r point (d :: Nat) point'. (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r squaredEuclideanDist point -c point -p) +c point +p) -------------------------------------------------------------------------------- -- | Disks are two dimensional balls -class (Ball_ disk point, Dimension disk ~ 2) => Disk_ disk point where +class (Ball_ disk point, Dimension disk ~ 2) => Disk_ disk point where -- class (Sphere_ disk point, Dimension disk ~ 2) => Circle_ disk point where -- | Constructs a Disk by its center and squared radius. -pattern Disk_ :: Disk_ ball point => point -> NumType ball -> ball +pattern Disk_ :: Disk_ ball point => point -> NumType ball -> ball pattern $mDisk_ :: forall {r} {ball} {point}. Disk_ ball point => ball -> (point -> NumType ball -> r) -> ((# #) -> r) -> r $bDisk_ :: forall ball point. Disk_ ball point => point -> NumType ball -> ball -Disk_ c r = Ball_ c r +Disk_ c r = Ball_ c r {-# COMPLETE Disk_ #-} -- -- | Constructs a Circle by its center and squared radius. @@ -209,77 +209,77 @@ -- pattern Circle_ c r = Sphere_ c r -- | Creates a circle from three points on the boundary -fromBoundaryPoints :: ( Disk_ disk (Point 2 r) - , Point_ point 2 r - , Fractional r) => Vector 3 point -> disk +fromBoundaryPoints :: ( Disk_ disk (Point 2 r) + , Point_ point 2 r + , Fractional r) => Vector 3 point -> disk fromBoundaryPoints :: forall disk r point. (Disk_ disk (Point 2 r), Point_ point 2 r, Fractional r) => Vector 3 point -> disk -fromBoundaryPoints (Vector3 (Point2_ r -px r -py) (Point2_ r -qx r -qy) (Point2_ r -sx r -sy) +fromBoundaryPoints (Vector3 (Point2_ r +px r +py) (Point2_ r +qx r +qy) (Point2_ r +sx r +sy) ) = Point 2 r -> NumType disk -> disk forall ball point. Disk_ ball point => point -> NumType ball -> ball Disk_ Point 2 r -c (Point 2 r -> Point 2 r -> r +c (Point 2 r -> Point 2 r -> r forall r point (d :: Nat) point'. (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r squaredEuclideanDist Point 2 r -c (r -> r -> Point 2 r +c (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -px r -py)) +px r +py)) where - f :: a -> a -> a -f a -x a -y = a -xa -> Integer -> a + f :: a -> a -> a +f a +x a +y = a +xa -> Integer -> a forall a b. (Num a, Integral b) => a -> b -> a ^Integer 2 a -> a -> a forall a. Num a => a -> a -> a + a -ya -> Integer -> a +ya -> Integer -> a forall a b. (Num a, Integral b) => a -> b -> a ^Integer 2 - fx :: a -> a -> V3 a -fx a -x a -y = a -> a -> a -> V3 a + fx :: a -> a -> V3 a +fx a +x a +y = a -> a -> a -> V3 a forall a. a -> a -> a -> V3 a V3 (a -> a -> a forall a. Num a => a -> a -> a -f a -x a -y) a -y a +f a +x a +y) a +y a 1 - fy :: a -> a -> V3 a -fy a -x a -y = a -> a -> a -> V3 a + fy :: a -> a -> V3 a +fy a +x a +y = a -> a -> a -> V3 a forall a. a -> a -> a -> V3 a V3 a -x (a -> a -> a +x (a -> a -> a forall a. Num a => a -> a -> a -f a -x a -y) a +f a +x a +y) a 1 - xnom :: r -xnom = M33 r -> r + xnom :: r +xnom = M33 r -> r forall a. Num a => M33 a -> a det33 (M33 r -> r) -> M33 r -> r forall a b. (a -> b) -> a -> b @@ -287,19 +287,19 @@ forall a. a -> a -> a -> V3 a V3 (r -> r -> V3 r forall {a}. Num a => a -> a -> V3 a -fx r -px r -py) (r -> r -> V3 r +fx r +px r +py) (r -> r -> V3 r forall {a}. Num a => a -> a -> V3 a -fx r -qx r -qy) (r -> r -> V3 r +fx r +qx r +qy) (r -> r -> V3 r forall {a}. Num a => a -> a -> V3 a -fx r -sx r -sy) - ynom :: r -ynom = M33 r -> r +fx r +sx r +sy) + ynom :: r +ynom = M33 r -> r forall a. Num a => M33 a -> a det33 (M33 r -> r) -> M33 r -> r forall a b. (a -> b) -> a -> b @@ -307,20 +307,20 @@ forall a. a -> a -> a -> V3 a V3 (r -> r -> V3 r forall {a}. Num a => a -> a -> V3 a -fy r -px r -py) (r -> r -> V3 r +fy r +px r +py) (r -> r -> V3 r forall {a}. Num a => a -> a -> V3 a -fy r -qx r -qy) (r -> r -> V3 r +fy r +qx r +qy) (r -> r -> V3 r forall {a}. Num a => a -> a -> V3 a -fy r -sx r -sy) +fy r +sx r +sy) - denom :: r -denom = (r + denom :: r +denom = (r 2 *) (r -> r) -> (M33 r -> r) -> M33 r -> r forall b c a. (b -> c) -> (a -> b) -> a -> c . M33 r -> r @@ -332,29 +332,29 @@ V3 (r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a V3 r -px r -py r +px r +py r 1) (r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a V3 r -qx r -qy r +qx r +qy r 1) (r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a V3 r -sx r -sy r +sx r +sy r 1) - c :: Point 2 r -c = r -> r -> Point 2 r + c :: Point 2 r +c = r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (r -xnom r -> r -> r +xnom r -> r -> r forall a. Fractional a => a -> a -> a / r -denom) (r -ynom r -> r -> r +denom) (r +ynom r -> r -> r forall a. Fractional a => a -> a -> a / r -denom) +denom) \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Boundary.html b/haddocks/hgeometry/kernel/src/HGeometry.Boundary.html index 12207ff1f..8fec31651 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Boundary.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Boundary.html @@ -20,8 +20,8 @@ -------------------------------------------------------------------------------- -- | The boundary of a geometric object. -newtype Boundary g = Boundary g - deriving (Int -> Boundary g -> ShowS +newtype Boundary g = Boundary g + deriving (Int -> Boundary g -> ShowS [Boundary g] -> ShowS Boundary g -> String (Int -> Boundary g -> ShowS) @@ -39,7 +39,7 @@ show :: Boundary g -> String $cshowList :: forall g. Show g => [Boundary g] -> ShowS showList :: [Boundary g] -> ShowS -Show,Boundary g -> Boundary g -> Bool +Show,Boundary g -> Boundary g -> Bool (Boundary g -> Boundary g -> Bool) -> (Boundary g -> Boundary g -> Bool) -> Eq (Boundary g) forall g. Eq g => Boundary g -> Boundary g -> Bool @@ -48,7 +48,7 @@ == :: Boundary g -> Boundary g -> Bool $c/= :: forall g. Eq g => Boundary g -> Boundary g -> Bool /= :: Boundary g -> Boundary g -> Bool -Eq,Eq (Boundary g) +Eq,Eq (Boundary g) Eq (Boundary g) => (Boundary g -> Boundary g -> Ordering) -> (Boundary g -> Boundary g -> Bool) @@ -89,7 +89,7 @@ max :: Boundary g -> Boundary g -> Boundary g $cmin :: forall g. Ord g => Boundary g -> Boundary g -> Boundary g min :: Boundary g -> Boundary g -> Boundary g -Ord,ReadPrec [Boundary g] +Ord,ReadPrec [Boundary g] ReadPrec (Boundary g) Int -> ReadS (Boundary g) ReadS [Boundary g] @@ -114,7 +114,7 @@ $creadListPrec :: forall g. Read g => ReadPrec [Boundary g] readListPrec :: ReadPrec [Boundary g] Read --,IsTransformable - ,(forall a b. (a -> b) -> Boundary a -> Boundary b) + ,(forall a b. (a -> b) -> Boundary a -> Boundary b) -> (forall a b. a -> Boundary b -> Boundary a) -> Functor Boundary forall a b. a -> Boundary b -> Boundary a forall a b. (a -> b) -> Boundary a -> Boundary b @@ -125,7 +125,7 @@ fmap :: forall a b. (a -> b) -> Boundary a -> Boundary b $c<$ :: forall a b. a -> Boundary b -> Boundary a <$ :: forall a b. a -> Boundary b -> Boundary a -Functor,(forall m. Monoid m => Boundary m -> m) +Functor,(forall m. Monoid m => Boundary m -> m) -> (forall m a. Monoid m => (a -> m) -> Boundary a -> m) -> (forall m a. Monoid m => (a -> m) -> Boundary a -> m) -> (forall a b. (a -> b -> b) -> b -> Boundary a -> b) @@ -207,7 +207,7 @@ sum :: forall a. Num a => Boundary a -> a $cproduct :: forall a. Num a => Boundary a -> a product :: forall a. Num a => Boundary a -> a -Foldable,Functor Boundary +Foldable,Functor Boundary Foldable Boundary (Functor Boundary, Foldable Boundary) => (forall (f :: * -> *) a b. @@ -266,11 +266,11 @@ sequence :: forall (m :: * -> *) a. Monad m => Boundary (m a) -> m (Boundary a) Traversable) -type instance NumType (Boundary g) = NumType g -type instance Dimension (Boundary g) = Dimension g +type instance NumType (Boundary g) = NumType g +type instance Dimension (Boundary g) = Dimension g -- | Iso for converting between things with a boundary and without its boundary -_Boundary :: Iso g h (Boundary g) (Boundary h) +_Boundary :: Iso g h (Boundary g) (Boundary h) _Boundary :: forall g h (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Boundary g) (f (Boundary h)) -> p g (f h) @@ -279,9 +279,9 @@ forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b iso g -> Boundary g forall g. g -> Boundary g -Boundary (\(Boundary h -b) -> h -b) +Boundary (\(Boundary h +b) -> h +b) -- | Result of a query that asks if something is Inside a g, *on* the boundary @@ -289,7 +289,7 @@ data PointLocationResult = Inside | OnBoundary | Outside - deriving (Int -> PointLocationResult -> ShowS + deriving (Int -> PointLocationResult -> ShowS [PointLocationResult] -> ShowS PointLocationResult -> String (Int -> PointLocationResult -> ShowS) @@ -304,7 +304,7 @@ show :: PointLocationResult -> String $cshowList :: [PointLocationResult] -> ShowS showList :: [PointLocationResult] -> ShowS -Show,ReadPrec [PointLocationResult] +Show,ReadPrec [PointLocationResult] ReadPrec PointLocationResult Int -> ReadS PointLocationResult ReadS [PointLocationResult] @@ -324,7 +324,7 @@ readPrec :: ReadPrec PointLocationResult $creadListPrec :: ReadPrec [PointLocationResult] readListPrec :: ReadPrec [PointLocationResult] -Read,PointLocationResult -> PointLocationResult -> Bool +Read,PointLocationResult -> PointLocationResult -> Bool (PointLocationResult -> PointLocationResult -> Bool) -> (PointLocationResult -> PointLocationResult -> Bool) -> Eq PointLocationResult @@ -338,10 +338,10 @@ -- | Result of a query that asks if something is Inside a g, *on* the -- boundary of the g, or outside. This type allows us to provide some -- sort of proof for the claim. -data PointLocationResultWith edge = StrictlyInside - | OnBoundaryEdge !edge +data PointLocationResultWith edge = StrictlyInside + | OnBoundaryEdge !edge | StrictlyOutside - deriving (Int -> PointLocationResultWith edge -> ShowS + deriving (Int -> PointLocationResultWith edge -> ShowS [PointLocationResultWith edge] -> ShowS PointLocationResultWith edge -> String (Int -> PointLocationResultWith edge -> ShowS) @@ -363,7 +363,7 @@ show :: PointLocationResultWith edge -> String $cshowList :: forall edge. Show edge => [PointLocationResultWith edge] -> ShowS showList :: [PointLocationResultWith edge] -> ShowS -Show,ReadPrec [PointLocationResultWith edge] +Show,ReadPrec [PointLocationResultWith edge] ReadPrec (PointLocationResultWith edge) Int -> ReadS (PointLocationResultWith edge) ReadS [PointLocationResultWith edge] @@ -391,7 +391,7 @@ readPrec :: ReadPrec (PointLocationResultWith edge) $creadListPrec :: forall edge. Read edge => ReadPrec [PointLocationResultWith edge] readListPrec :: ReadPrec [PointLocationResultWith edge] -Read,PointLocationResultWith edge +Read,PointLocationResultWith edge -> PointLocationResultWith edge -> Bool (PointLocationResultWith edge -> PointLocationResultWith edge -> Bool) @@ -415,7 +415,7 @@ -> PointLocationResultWith edge -> Bool /= :: PointLocationResultWith edge -> PointLocationResultWith edge -> Bool -Eq,(forall a b. +Eq,(forall a b. (a -> b) -> PointLocationResultWith a -> PointLocationResultWith b) -> (forall a b. a -> PointLocationResultWith b -> PointLocationResultWith a) @@ -439,7 +439,7 @@ -- | Forget on which edge the point was. -asPointLocationResult :: PointLocationResultWith edge -> PointLocationResult +asPointLocationResult :: PointLocationResultWith edge -> PointLocationResult asPointLocationResult :: forall edge. PointLocationResultWith edge -> PointLocationResult asPointLocationResult = \case PointLocationResultWith edge diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Box.Boxable.html b/haddocks/hgeometry/kernel/src/HGeometry.Box.Boxable.html index 3692cd52e..a4e6edb2f 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Box.Boxable.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Box.Boxable.html @@ -34,19 +34,19 @@ -- foo' u v = andOf components $ liftU2 (==) u v -- | Types for which we can compute an axis parallel boundingbox -class IsBoxable g where +class IsBoxable g where -- | Compute the axis-parallel boundingbox of the given geometry. - boundingBox :: ( d ~ Dimension g, r ~ NumType g - , Ord r - ) => g -> Box (Point d r) - default boundingBox :: ( d ~ Dimension g, r ~ NumType g - , Ord r - , HasPoints' g point - , Point_ point d r - , Ord (Vector d r) + boundingBox :: ( d ~ Dimension g, r ~ NumType g + , Ord r + ) => g -> Box (Point d r) + default boundingBox :: ( d ~ Dimension g, r ~ NumType g + , Ord r + , HasPoints' g point + , Point_ point d r + , Ord (Vector d r) ) - => g -> Box (Point d r) - boundingBox = g -> Box (Point d r) + => g -> Box (Point d r) + boundingBox = g -> Box (Point d r) forall (d :: Nat) g r point. (d ~ Dimension g, r ~ NumType g, HasPoints' g point, Point_ point d r, Ord (Vector d r), Ord r) => @@ -55,12 +55,12 @@ {-# INLINE boundingBox #-} -- | default implementation of boundingBox -defaultBBox :: ( d ~ Dimension g, r ~ NumType g - , HasPoints' g point - , Point_ point d r - , Ord (Vector d r), Ord r +defaultBBox :: ( d ~ Dimension g, r ~ NumType g + , HasPoints' g point + , Point_ point d r + , Ord (Vector d r), Ord r ) - => g -> Box (Point d r) + => g -> Box (Point d r) defaultBBox :: forall (d :: Nat) g r point. (d ~ Dimension g, r ~ NumType g, HasPoints' g point, Point_ point d r, Ord (Vector d r), Ord r) => @@ -107,23 +107,23 @@ -------------------------------------------------------------------------------- -- Instances -instance IsBoxable (Point d r) where - boundingBox :: forall (d :: Nat) r. +instance IsBoxable (Point d r) where + boundingBox :: forall (d :: Nat) r. (d ~ Dimension (Point d r), r ~ NumType (Point d r), Ord r) => Point d r -> Box (Point d r) -boundingBox Point d r -p = Point d r -> Point d r -> Box (Point d r) +boundingBox Point d r +p = Point d r -> Point d r -> Box (Point d r) forall point. point -> point -> Box point Box Point d r Point d r -p Point d r +p Point d r Point d r -p +p -instance ( Box_ (Box point) point - , Point_ point d r - ) => IsBoxable (Box point) where - boundingBox :: forall (d :: Nat) r. +instance ( Box_ (Box point) point + , Point_ point d r + ) => IsBoxable (Box point) where + boundingBox :: forall (d :: Nat) r. (d ~ Dimension (Box point), r ~ NumType (Box point), Ord r) => Box point -> Box (Point d r) boundingBox = (point -> Point d r) -> Box point -> Box (Point d r) @@ -139,8 +139,8 @@ asPoint) {-# INLINE boundingBox #-} -instance IsBoxable g => IsBoxable (g :+ extra) where - boundingBox :: forall (d :: Nat) r. +instance IsBoxable g => IsBoxable (g :+ extra) where + boundingBox :: forall (d :: Nat) r. (d ~ Dimension (g :+ extra), r ~ NumType (g :+ extra), Ord r) => (g :+ extra) -> Box (Point d r) boundingBox = g -> Box (Point d r) @@ -163,16 +163,16 @@ {-# INLINE boundingBox #-} ---------------------------------------- -newtype Union point = Union { forall point. Union point -> Box point -unUnion :: Box point } +newtype Union point = Union { forall point. Union point -> Box point +unUnion :: Box point } -instance (Point_ point d r, Ord r) => Semigroup (Union point) where - (Union (Box point -p point -q)) <> :: Union point -> Union point -> Union point -<> (Union (Box point -p' point -q')) = Box point -> Union point +instance (Point_ point d r, Ord r) => Semigroup (Union point) where + (Union (Box point +p point +q)) <> :: Union point -> Union point -> Union point +<> (Union (Box point +p' point +q')) = Box point -> Union point forall point. Box point -> Union point Union (Box point -> Union point) -> Box point -> Union point forall a b. (a -> b) -> a -> b @@ -187,12 +187,12 @@ (Vector (Dimension a) (NumType a)) (Dimension a) (NumType a), HasVector a b, HasVector s s) => (NumType a -> NumType a -> NumType a) -> s -> a -> b -f r -> r -> r +f r -> r -> r NumType point -> NumType point -> NumType point forall a. Ord a => a -> a -> a min point -p point -p') ((NumType point -> NumType point -> NumType point) +p point +p') ((NumType point -> NumType point -> NumType point) -> point -> point -> point forall {s} {a} {b}. (Dimension s ~ Dimension a, Dimension b ~ Dimension a, @@ -201,19 +201,19 @@ (Vector (Dimension a) (NumType a)) (Dimension a) (NumType a), HasVector a b, HasVector s s) => (NumType a -> NumType a -> NumType a) -> s -> a -> b -f r -> r -> r +f r -> r -> r NumType point -> NumType point -> NumType point forall a. Ord a => a -> a -> a max point -q point -q') +q point +q') where - f :: (NumType a -> NumType a -> NumType a) -> s -> a -> b -f NumType a -> NumType a -> NumType a -combine s -a a -b = a -ba -> (a -> b) -> b + f :: (NumType a -> NumType a -> NumType a) -> s -> a -> b +f NumType a -> NumType a -> NumType a +combine s +a a +b = a +ba -> (a -> b) -> b forall a b. a -> (a -> b) -> b &(Vector (Dimension a) (NumType a) -> Identity (Vector (Dimension a) (NumType a))) @@ -246,8 +246,8 @@ Additive_ vector d r => (r -> r -> r) -> vector -> vector -> vector liftI2 NumType a -> NumType a -> NumType a -combine (s -as +combine (s +as -> Getting (Vector (Dimension a) (NumType a)) s @@ -272,11 +272,11 @@ (Vector (Dimension a) (NumType a)) vector) -instance ( IsBoxable g - , Has_ Additive_ d r - , d ~ Dimension g, r ~ NumType g - ) => IsBoxable (NonEmpty g) where - boundingBox :: forall (d :: Nat) r. +instance ( IsBoxable g + , Has_ Additive_ d r + , d ~ Dimension g, r ~ NumType g + ) => IsBoxable (NonEmpty g) where + boundingBox :: forall (d :: Nat) r. (d ~ Dimension (NonEmpty g), r ~ NumType (NonEmpty g), Ord r) => NonEmpty g -> Box (Point d r) boundingBox = Union (Point d r) -> Box (Point d r) diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Box.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.Box.Class.html index edc09e956..8cf032b25 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Box.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Box.Class.html @@ -43,33 +43,33 @@ -- >>> let myRect = Rectangle (Point2 1 1) (Point2 10 20.0) :: Rectangle (Point 2 Double) -- | Types that have a 'minPoint' field lens -class HasMinPoint box point | box -> point where +class HasMinPoint box point | box -> point where -- | Lens to access the lexicographically smallest point - minPoint :: Lens' box point + minPoint :: Lens' box point -- | Types that have a 'maxPoint' field lens -class HasMaxPoint box point | box -> point where +class HasMaxPoint box point | box -> point where -- | Lens to access the lexicographically largest point - maxPoint :: Lens' box point + maxPoint :: Lens' box point -- | d-dimensional Boxes -class ( HasMinPoint box point - , HasMaxPoint box point - , Point_ point (Dimension box) (NumType box) +class ( HasMinPoint box point + , HasMaxPoint box point + , Point_ point (Dimension box) (NumType box) -- , PointFor box ~ point -- , NumType box ~ NumType point - ) => Box_ box point | box -> point where + ) => Box_ box point | box -> point where -- | Get a vector with the extent of the box in each dimension. Note -- that the resulting vector is 0 indexed whereas one would normally -- count dimensions starting at zero. - extent :: ( r ~ NumType box - , d ~ Dimension box - , Num r - ) => box -> Vector d (ClosedInterval r) + extent :: ( r ~ NumType box + , d ~ Dimension box + , Num r + ) => box -> Vector d (ClosedInterval r) -- | Rectangles are two dimensional boxes. -type Rectangle_ rectangle point = (Box_ rectangle point, Dimension rectangle ~ 2) +type Rectangle_ rectangle point = (Box_ rectangle point, Dimension rectangle ~ 2) -------------------------------------------------------------------------------- @@ -79,11 +79,11 @@ -- -- >>> size myRect -- Vector2 9.0 19.0 -size :: forall box d point r. - ( Box_ box point, Point_ point d r - , Num r - , Functor (Vector d) - ) => box -> Vector d r +size :: forall box d point r. + ( Box_ box point, Point_ point d r + , Num r + , Functor (Vector d) + ) => box -> Vector d r size :: forall box (d :: Nat) point r. (Box_ box point, Point_ point d r, Num r, Functor (Vector d)) => box -> Vector d r @@ -108,12 +108,12 @@ -- | Given a dimension, get the width of the box in that dimension. -- Dimensions are 0 indexed. -widthIn :: forall i box d point r. ( Box_ box point, Point_ point d r - , i <= d - 1 - , KnownNat i - , Functor (Vector d) - , Num r - ) => box -> r +widthIn :: forall i box d point r. ( Box_ box point, Point_ point d r + , i <= d - 1 + , KnownNat i + , Functor (Vector d) + , Num r + ) => box -> r widthIn :: forall (i :: Nat) box (d :: Nat) point r. (Box_ box point, Point_ point d r, i <= (d - 1), KnownNat i, Functor (Vector d), Num r) => @@ -123,7 +123,7 @@ view (forall (i :: Nat) vector r (d :: Nat). (i <= (d - 1), KnownNat i, Vector_ vector d r) => IndexedLens' Int vector r -component @i) (Vector d r -> r) -> (box -> Vector d r) -> box -> r +component @i) (Vector d r -> r) -> (box -> Vector d r) -> box -> r forall b c a. (b -> c) -> (a -> b) -> a -> c . box -> Vector d r forall box (d :: Nat) point r. @@ -133,11 +133,11 @@ -- | Get the width of a rectangle. -width :: ( Box_ box point, Point_ point d r - , 1 <= d - , Functor (Vector d) - , Num r - ) => box -> r +width :: ( Box_ box point, Point_ point d r + , 1 <= d + , Functor (Vector d) + , Num r + ) => box -> r width :: forall box point (d :: Nat) r. (Box_ box point, Point_ point d r, 1 <= d, Functor (Vector d), Num r) => @@ -149,11 +149,11 @@ widthIn @0 -- | get the height of a rectangle -height :: ( Box_ box point, Point_ point d r - , 2 <= d - , Functor (Vector d) - , Num r - ) => box -> r +height :: ( Box_ box point, Point_ point d r + , 2 <= d + , Functor (Vector d) + , Num r + ) => box -> r height :: forall box point (d :: Nat) r. (Box_ box point, Point_ point d r, 2 <= d, Functor (Vector d), Num r) => @@ -168,15 +168,15 @@ -- -- >>> centerPoint myRect -- Point2 5.5 10.5 -centerPoint :: (Box_ box point, Point_ point d r, Fractional r) - => box -> point +centerPoint :: (Box_ box point, Point_ point d r, Fractional r) + => box -> point centerPoint :: forall box point (d :: Nat) r. (Box_ box point, Point_ point d r, Fractional r) => box -> point -centerPoint box -r = let v :: Vector d r -v = (box -rbox -> Getting point box point -> point +centerPoint box +r = let v :: Vector d r +v = (box +rbox -> Getting point box point -> point forall s a. s -> Getting a s a -> a ^.Getting point box point forall box point. HasMaxPoint box point => Lens' box point @@ -186,14 +186,14 @@ (Affine_ point d r, Num r) => point -> point -> Vector d r .-. (box -rbox -> Getting point box point -> point +rbox -> Getting point box point -> point forall s a. s -> Getting a s a -> a ^.Getting point box point forall box point. HasMinPoint box point => Lens' box point Lens' box point minPoint) in (box -rbox -> Getting point box point -> point +rbox -> Getting point box point -> point forall s a. s -> Getting a s a -> a ^.Getting point box point forall box point. HasMinPoint box point => Lens' box point @@ -211,12 +211,12 @@ (Num r, Vector_ vector d r) => r -> vector -> vector *^ Vector d r -v) +v) -------------------------------------------------------------------------------- -instance HasMinPoint box point => HasMinPoint (box :+ extra) point where - minPoint :: Lens' (box :+ extra) point +instance HasMinPoint box point => HasMinPoint (box :+ extra) point where + minPoint :: Lens' (box :+ extra) point minPoint = (box -> f box) -> (box :+ extra) -> f (box :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -232,8 +232,8 @@ Lens' box point minPoint {-# INLINE minPoint #-} -instance HasMaxPoint box point => HasMaxPoint (box :+ extra) point where - maxPoint :: Lens' (box :+ extra) point +instance HasMaxPoint box point => HasMaxPoint (box :+ extra) point where + maxPoint :: Lens' (box :+ extra) point maxPoint = (box -> f box) -> (box :+ extra) -> f (box :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -249,8 +249,8 @@ Lens' box point maxPoint {-# INLINE maxPoint #-} -instance Box_ box point => Box_ (box :+ extra) point where - extent :: forall r (d :: Nat). +instance Box_ box point => Box_ (box :+ extra) point where + extent :: forall r (d :: Nat). (r ~ NumType (box :+ extra), d ~ Dimension (box :+ extra), Num r) => (box :+ extra) -> Vector d (ClosedInterval r) diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Box.Corners.html b/haddocks/hgeometry/kernel/src/HGeometry.Box.Corners.html index 433650041..545c8588a 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Box.Corners.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Box.Corners.html @@ -26,16 +26,16 @@ -- | A data type rperesenting the corners of a box. the order of the -- Corners is 'northWest, northEast, southEast, southWest', i.e. in -- clockwise order starting from the topleft. -data Corners a = Corners { forall a. Corners a -> a -_northWest :: !a +data Corners a = Corners { forall a. Corners a -> a +_northWest :: !a , forall a. Corners a -> a -_northEast :: !a +_northEast :: !a , forall a. Corners a -> a -_southEast :: !a +_southEast :: !a , forall a. Corners a -> a -_southWest :: !a +_southWest :: !a } - deriving stock (Int -> Corners a -> ShowS + deriving stock (Int -> Corners a -> ShowS [Corners a] -> ShowS Corners a -> String (Int -> Corners a -> ShowS) @@ -53,7 +53,7 @@ show :: Corners a -> String $cshowList :: forall a. Show a => [Corners a] -> ShowS showList :: [Corners a] -> ShowS -Show,Corners a -> Corners a -> Bool +Show,Corners a -> Corners a -> Bool (Corners a -> Corners a -> Bool) -> (Corners a -> Corners a -> Bool) -> Eq (Corners a) forall a. Eq a => Corners a -> Corners a -> Bool @@ -62,7 +62,7 @@ == :: Corners a -> Corners a -> Bool $c/= :: forall a. Eq a => Corners a -> Corners a -> Bool /= :: Corners a -> Corners a -> Bool -Eq,Eq (Corners a) +Eq,Eq (Corners a) Eq (Corners a) => (Corners a -> Corners a -> Ordering) -> (Corners a -> Corners a -> Bool) @@ -103,7 +103,7 @@ max :: Corners a -> Corners a -> Corners a $cmin :: forall a. Ord a => Corners a -> Corners a -> Corners a min :: Corners a -> Corners a -> Corners a -Ord,(forall x. Corners a -> Rep (Corners a) x) +Ord,(forall x. Corners a -> Rep (Corners a) x) -> (forall x. Rep (Corners a) x -> Corners a) -> Generic (Corners a) forall x. Rep (Corners a) x -> Corners a @@ -116,7 +116,7 @@ from :: forall x. Corners a -> Rep (Corners a) x $cto :: forall a x. Rep (Corners a) x -> Corners a to :: forall x. Rep (Corners a) x -> Corners a -Generic,(forall a b. (a -> b) -> Corners a -> Corners b) +Generic,(forall a b. (a -> b) -> Corners a -> Corners b) -> (forall a b. a -> Corners b -> Corners a) -> Functor Corners forall a b. a -> Corners b -> Corners a forall a b. (a -> b) -> Corners a -> Corners b @@ -127,7 +127,7 @@ fmap :: forall a b. (a -> b) -> Corners a -> Corners b $c<$ :: forall a b. a -> Corners b -> Corners a <$ :: forall a b. a -> Corners b -> Corners a -Functor,(forall m. Monoid m => Corners m -> m) +Functor,(forall m. Monoid m => Corners m -> m) -> (forall m a. Monoid m => (a -> m) -> Corners a -> m) -> (forall m a. Monoid m => (a -> m) -> Corners a -> m) -> (forall a b. (a -> b -> b) -> b -> Corners a -> b) @@ -209,7 +209,7 @@ sum :: forall a. Num a => Corners a -> a $cproduct :: forall a. Num a => Corners a -> a product :: forall a. Num a => Corners a -> a -Foldable,Functor Corners +Foldable,Functor Corners Foldable Corners (Functor Corners, Foldable Corners) => (forall (f :: * -> *) a b. @@ -269,7 +269,7 @@ Traversable) -- | Access the northwest corner -northWest :: Lens' (Corners a) a +northWest :: Lens' (Corners a) a northWest :: forall a (f :: * -> *). Functor f => (a -> f a) -> Corners a -> f (Corners a) @@ -279,13 +279,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Corners a -> a forall a. Corners a -> a -_northWest (\Corners a -c a -x -> Corners a -c { _northWest = x}) +_northWest (\Corners a +c a +x -> Corners a +c { _northWest = x}) -- | Access the northeast corner -northEast :: Lens' (Corners a) a +northEast :: Lens' (Corners a) a northEast :: forall a (f :: * -> *). Functor f => (a -> f a) -> Corners a -> f (Corners a) @@ -295,13 +295,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Corners a -> a forall a. Corners a -> a -_northEast (\Corners a -c a -x -> Corners a -c { _northEast = x}) +_northEast (\Corners a +c a +x -> Corners a +c { _northEast = x}) -- | Access the southwest corner -southWest :: Lens' (Corners a) a +southWest :: Lens' (Corners a) a southWest :: forall a (f :: * -> *). Functor f => (a -> f a) -> Corners a -> f (Corners a) @@ -311,13 +311,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Corners a -> a forall a. Corners a -> a -_southWest (\Corners a -c a -x -> Corners a -c { _southWest = x}) +_southWest (\Corners a +c a +x -> Corners a +c { _southWest = x}) -- | Access the southeast corner -southEast :: Lens' (Corners a) a +southEast :: Lens' (Corners a) a southEast :: forall a (f :: * -> *). Functor f => (a -> f a) -> Corners a -> f (Corners a) @@ -327,17 +327,17 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Corners a -> a forall a. Corners a -> a -_southEast (\Corners a -c a -x -> Corners a -c { _southEast = x}) +_southEast (\Corners a +c a +x -> Corners a +c { _southEast = x}) -type instance Index (Corners a) = InterCardinalDirection -type instance IxValue (Corners a) = a +type instance Index (Corners a) = InterCardinalDirection +type instance IxValue (Corners a) = a -instance Ixed (Corners a) where - ix :: Index (Corners a) -> Traversal' (Corners a) (IxValue (Corners a)) -ix = \case +instance Ixed (Corners a) where + ix :: Index (Corners a) -> Traversal' (Corners a) (IxValue (Corners a)) +ix = \case Index (Corners a) InterCardinalDirection NorthWest -> (a -> f a) -> Corners a -> f (Corners a) @@ -375,108 +375,108 @@ (a -> f a) -> Corners a -> f (Corners a) southWest -instance Foldable1 Corners where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> Corners a -> m -foldMap1 a -> m -f (Corners a -a a -b a -c a -d) = a -> m -f a -a m -> m -> m +instance Foldable1 Corners where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> Corners a -> m +foldMap1 a -> m +f (Corners a +a a +b a +c a +d) = a -> m +f a +a m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -b m -> m -> m +f a +b m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -c m -> m -> m +f a +c m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -d -instance Traversable1 Corners where - traverse1 :: forall (f :: * -> *) a b. +f a +d +instance Traversable1 Corners where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Corners a -> f (Corners b) -traverse1 a -> f b -f (Corners a -a a -b a -c a -d) = b -> b -> b -> b -> Corners b +traverse1 a -> f b +f (Corners a +a a +b a +c a +d) = b -> b -> b -> b -> Corners b forall a. a -> a -> a -> a -> Corners a Corners (b -> b -> b -> b -> Corners b) -> f b -> f (b -> b -> b -> Corners b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -a f (b -> b -> b -> Corners b) -> f b -> f (b -> b -> Corners b) +f a +a f (b -> b -> b -> Corners b) -> f b -> f (b -> b -> Corners b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b <.> a -> f b -f a -b f (b -> b -> Corners b) -> f b -> f (b -> Corners b) +f a +b f (b -> b -> Corners b) -> f b -> f (b -> Corners b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b <.> a -> f b -f a -c f (b -> Corners b) -> f b -> f (Corners b) +f a +c f (b -> Corners b) -> f b -> f (Corners b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b <.> a -> f b -f a -d +f a +d -instance Applicative Corners where - pure :: forall a. a -> Corners a -pure a -x = a -> a -> a -> a -> Corners a +instance Applicative Corners where + pure :: forall a. a -> Corners a +pure a +x = a -> a -> a -> a -> Corners a forall a. a -> a -> a -> a -> Corners a Corners a -x a -x a -x a -x - (Corners a -> b -f a -> b -g a -> b -h a -> b -i) <*> :: forall a b. Corners (a -> b) -> Corners a -> Corners b -<*> (Corners a -a a -b a -c a -d) = b -> b -> b -> b -> Corners b +x a +x a +x a +x + (Corners a -> b +f a -> b +g a -> b +h a -> b +i) <*> :: forall a b. Corners (a -> b) -> Corners a -> Corners b +<*> (Corners a +a a +b a +c a +d) = b -> b -> b -> b -> Corners b forall a. a -> a -> a -> a -> Corners a Corners (a -> b -f a -a) (a -> b -g a -b) (a -> b -h a -c) (a -> b -i a -d) +f a +a) (a -> b +g a +b) (a -> b +h a +c) (a -> b +i a +d) -instance Semigroup a => Semigroup (Corners a) where - Corners a -s <> :: Corners a -> Corners a -> Corners a -<> Corners a -s' = a -> a -> a +instance Semigroup a => Semigroup (Corners a) where + Corners a +s <> :: Corners a -> Corners a -> Corners a +<> Corners a +s' = a -> a -> a forall a. Semigroup a => a -> a -> a (<>) (a -> a -> a) -> Corners a -> Corners (a -> a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Corners a -s Corners (a -> a) -> Corners a -> Corners a +s Corners (a -> a) -> Corners a -> Corners a forall a b. Corners (a -> b) -> Corners a -> Corners b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Corners a -s' -instance Monoid a => Monoid (Corners a) where - mempty :: Corners a +s' +instance Monoid a => Monoid (Corners a) where + mempty :: Corners a mempty = a -> Corners a forall a. a -> Corners a forall (f :: * -> *) a. Applicative f => a -> f a @@ -490,33 +490,33 @@ -- -- Any additional information from in the top points is taken from the Top point, -- Any additional information from in the bottom points is taken from the Bottom point, -corners :: ( Num r, Rectangle_ rectangle point, Point_ point 2 r +corners :: ( Num r, Rectangle_ rectangle point, Point_ point 2 r -- , HasComponents (Vector 2 (ClosedInterval r)) (Vector 2 r) ) - => rectangle -> Corners point + => rectangle -> Corners point corners :: forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Corners point -corners rectangle -r = let w :: r -w = rectangle -> r +corners rectangle +r = let w :: r +w = rectangle -> r forall box point (d :: Natural) r. (Box_ box point, Point_ point d r, 1 <= d, Functor (Vector d), Num r) => box -> r width rectangle -r - p :: point -p = rectangle -rrectangle -> Getting point rectangle point -> point +r + p :: point +p = rectangle +rrectangle -> Getting point rectangle point -> point forall s a. s -> Getting a s a -> a ^.Getting point rectangle point forall box point. HasMinPoint box point => Lens' box point Lens' rectangle point minPoint - q :: point -q = rectangle -rrectangle -> Getting point rectangle point -> point + q :: point +q = rectangle +rrectangle -> Getting point rectangle point -> point forall s a. s -> Getting a s a -> a ^.Getting point rectangle point forall box point. HasMaxPoint box point => Lens' box point @@ -525,7 +525,7 @@ in point -> point -> point -> point -> Corners point forall a. a -> a -> a -> a -> Corners a Corners (point -qpoint -> (point -> point) -> point +qpoint -> (point -> point) -> point forall a b. a -> (a -> b) -> b &(r -> Identity r) -> point -> Identity point forall (d :: Natural) point r. @@ -538,9 +538,9 @@ %~ r -> r -> r forall a. Num a => a -> a -> a subtract r -w) point -q (point -ppoint -> (point -> point) -> point +w) point +q (point +ppoint -> (point -> point) -> point forall a b. a -> (a -> b) -> b &(r -> Identity r) -> point -> Identity point forall (d :: Natural) point r. @@ -553,28 +553,28 @@ %~ (r -> r -> r forall a. Num a => a -> a -> a + r -w)) point -p +w)) point +p -------------------------------------------------------------------------------- -- | Gets the corners in a particular direction -cornersInDirection :: CardinalDirection -> Corners p -> Vector 2 p +cornersInDirection :: CardinalDirection -> Corners p -> Vector 2 p cornersInDirection :: forall p. CardinalDirection -> Corners p -> Vector 2 p -cornersInDirection CardinalDirection -d Corners p -c = (\InterCardinalDirection -icd -> Corners p -cCorners p -> Getting (Endo p) (Corners p) p -> p +cornersInDirection CardinalDirection +d Corners p +c = (\InterCardinalDirection +icd -> Corners p +cCorners p -> Getting (Endo p) (Corners p) p -> p forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!Index (Corners p) -> Traversal' (Corners p) (IxValue (Corners p)) forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix Index (Corners p) InterCardinalDirection -icd) (InterCardinalDirection -> p) +icd) (InterCardinalDirection -> p) -> Vector 2 InterCardinalDirection -> Vector 2 p forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> CardinalDirection -> Vector 2 InterCardinalDirection interCardinalsOf CardinalDirection -d +d \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Box.Internal.html b/haddocks/hgeometry/kernel/src/HGeometry.Box.Internal.html index f3d4035ce..8ef165b4b 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Box.Internal.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Box.Internal.html @@ -32,8 +32,8 @@ -- -- A box is represented by two points; a point with lexicographically minimal coordinates, -- and a point with lexicographically maximal coordinates. -newtype Box point = MkBox (Vector 2 point) - deriving stock ((forall x. Box point -> Rep (Box point) x) +newtype Box point = MkBox (Vector 2 point) + deriving stock ((forall x. Box point -> Rep (Box point) x) -> (forall x. Rep (Box point) x -> Box point) -> Generic (Box point) forall x. Rep (Box point) x -> Box point @@ -47,7 +47,7 @@ $cto :: forall point x. Rep (Box point) x -> Box point to :: forall x. Rep (Box point) x -> Box point Generic) - deriving newtype (Box point -> Box point -> Bool + deriving newtype (Box point -> Box point -> Bool (Box point -> Box point -> Bool) -> (Box point -> Box point -> Bool) -> Eq (Box point) forall point. Eq point => Box point -> Box point -> Bool @@ -56,7 +56,7 @@ == :: Box point -> Box point -> Bool $c/= :: forall point. Eq point => Box point -> Box point -> Bool /= :: Box point -> Box point -> Bool -Eq,Eq (Box point) +Eq,Eq (Box point) Eq (Box point) => (Box point -> Box point -> Ordering) -> (Box point -> Box point -> Bool) @@ -100,11 +100,11 @@ Ord) -- | Construct a box -pattern Box :: point -> point -> Box point +pattern Box :: point -> point -> Box point pattern $mBox :: forall {r} {point}. Box point -> (point -> point -> r) -> ((# #) -> r) -> r $bBox :: forall point. point -> point -> Box point -Box minP maxP = MkBox (Vector2 minP maxP) +Box minP maxP = MkBox (Vector2 minP maxP) {-# COMPLETE Box #-} -- | Defines a rectangle @@ -114,110 +114,110 @@ -- | Construct a Rectangle -- -- -pattern Rectangle :: Dimension point ~ 2 - => point -> point -> Box point +pattern Rectangle :: Dimension point ~ 2 + => point -> point -> Box point pattern $mRectangle :: forall {r} {point}. (Dimension point ~ 2) => Box point -> (point -> point -> r) -> ((# #) -> r) -> r $bRectangle :: forall point. (Dimension point ~ 2) => point -> point -> Box point -Rectangle minP maxP = Box minP maxP +Rectangle minP maxP = Box minP maxP {-# COMPLETE Rectangle #-} {-# INLINE Rectangle #-} -- type instance PointFor (Box point) = point -type instance Dimension (Box point) = Dimension point -type instance NumType (Box point) = NumType point +type instance Dimension (Box point) = Dimension point +type instance NumType (Box point) = NumType point -- instance Constrained Box where -- type Dom Box point = OptCVector_ 2 point -instance Functor Box where - fmap :: forall a b. (a -> b) -> Box a -> Box b -fmap a -> b -f (Box a -p a -q) = b -> b -> Box b +instance Functor Box where + fmap :: forall a b. (a -> b) -> Box a -> Box b +fmap a -> b +f (Box a +p a +q) = b -> b -> Box b forall point. point -> point -> Box point Box (a -> b -f a -p) (a -> b -f a -q) +f a +p) (a -> b +f a +q) -- -- cmap f (MkBox v) = MkBox $ v&components %~ f -instance Foldable Box where - foldMap :: forall m a. Monoid m => (a -> m) -> Box a -> m -foldMap a -> m -f (Box a -p a -q) = a -> m -f a -p m -> m -> m +instance Foldable Box where + foldMap :: forall m a. Monoid m => (a -> m) -> Box a -> m +foldMap a -> m +f (Box a +p a +q) = a -> m +f a +p m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -q -instance Traversable Box where - traverse :: forall (f :: * -> *) a b. +f a +q +instance Traversable Box where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Box a -> f (Box b) -traverse a -> f b -f (Box a -p a -q) = b -> b -> Box b +traverse a -> f b +f (Box a +p a +q) = b -> b -> Box b forall point. point -> point -> Box point Box (b -> b -> Box b) -> f b -> f (b -> Box b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -p f (b -> Box b) -> f b -> f (Box b) +f a +p f (b -> Box b) -> f b -> f (Box b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> a -> f b -f a -q +f a +q -instance HasMinPoint (Box point) point where - minPoint :: Lens' (Box point) point -minPoint = (Box point -> point) +instance HasMinPoint (Box point) point where + minPoint :: Lens' (Box point) point +minPoint = (Box point -> point) -> (Box point -> point -> Box point) -> Lens' (Box point) point forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(Box point -p point +lens (\(Box point +p point _) -> point -p) (\(Box point -_ point -q) point -p -> point -> point -> Box point +p) (\(Box point +_ point +q) point +p -> point -> point -> Box point forall point. point -> point -> Box point Box point -p point -q) +p point +q) -instance HasMaxPoint (Box point) point where - maxPoint :: Lens' (Box point) point -maxPoint = (Box point -> point) +instance HasMaxPoint (Box point) point where + maxPoint :: Lens' (Box point) point +maxPoint = (Box point -> point) -> (Box point -> point -> Box point) -> Lens' (Box point) point forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(Box point -_ point -q) -> point -q) (\(Box point -p point -_) point -q -> point -> point -> Box point +_ point +q) -> point +q) (\(Box point +p point +_) point +q -> point -> point -> Box point forall point. point -> point -> Box point Box point -p point -q) +p point +q) -instance HasPoints (Box point) (Box point') point point' where - allPoints :: forall (d :: Nat) r r'. +instance HasPoints (Box point) (Box point') point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (Box point) ~ r, NumType (Box point') ~ r', Dimension (Box point) ~ d, Dimension (Box point') ~ d) => Traversal1 (Box point) (Box point') point point' -allPoints point -> f point' -f (MkBox Vector 2 point -v) = Vector 2 point' -> Box point' +allPoints point -> f point' +f (MkBox Vector 2 point +v) = Vector 2 point' -> Box point' forall point. Vector 2 point -> Box point MkBox (Vector 2 point' -> Box point') -> f (Vector 2 point') -> f (Box point') @@ -236,18 +236,18 @@ (IxValue (Vector 2 point')) components point -> f point' IxValue (Vector 2 point) -> f (IxValue (Vector 2 point')) -f Vector 2 point -v +f Vector 2 point +v -instance ( Point_ point d r - , Zip (Vector d) - ) => Box_ (Box point) point where - extent :: forall r (d :: Nat). +instance ( Point_ point d r + , Zip (Vector d) + ) => Box_ (Box point) point where + extent :: forall r (d :: Nat). (r ~ NumType (Box point), d ~ Dimension (Box point), Num r) => Box point -> Vector d (ClosedInterval r) -extent (Box point -p point -q) = (r -> r -> ClosedInterval r) +extent (Box point +p point +q) = (r -> r -> ClosedInterval r) -> Vector d r -> Vector d r -> Vector d (ClosedInterval r) forall a b c. (a -> b -> c) -> Vector d a -> Vector d b -> Vector d c @@ -257,7 +257,7 @@ zipWith r -> r -> ClosedInterval r forall r. r -> r -> ClosedInterval r ClosedInterval (point -ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r +ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) point (Vector d r) forall (d :: Nat) r s. @@ -270,7 +270,7 @@ Lens point point' (Vector d r) (Vector d s) Lens point point (Vector d r) (Vector d r) vector) (point -qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r +qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) point (Vector d r) forall (d :: Nat) r s. @@ -285,14 +285,14 @@ vector) -instance (Show point) => Show (Box point) where - showsPrec :: Int -> Box point -> ShowS -showsPrec Int -k (Box point -p point -q) = Bool -> ShowS -> ShowS +instance (Show point) => Show (Box point) where + showsPrec :: Int -> Box point -> ShowS +showsPrec Int +k (Box point +p point +q) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int appPrec) (ShowS -> ShowS) -> ShowS -> ShowS @@ -310,7 +310,7 @@ forall a. Num a => a -> a -> a +Int 1) point -p +p ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -325,16 +325,16 @@ forall a. Num a => a -> a -> a +Int 1) point -q +q appPrec :: Int appPrec :: Int appPrec = Int 10 -instance (Read point) => Read (Box point) where - readPrec :: ReadPrec (Box point) -readPrec = ReadPrec (Box point) -> ReadPrec (Box point) +instance (Read point) => Read (Box point) where + readPrec :: ReadPrec (Box point) +readPrec = ReadPrec (Box point) -> ReadPrec (Box point) forall a. ReadPrec a -> ReadPrec a parens (Int -> ReadPrec (Box point) -> ReadPrec (Box point) forall a. Int -> ReadPrec a -> ReadPrec a @@ -346,14 +346,14 @@ Ident String "Box" <- ReadPrec Lexeme lexP - point -p <- ReadPrec point -> ReadPrec point + point +p <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a readPrec - point -q <- ReadPrec point -> ReadPrec point + point +q <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a @@ -364,8 +364,8 @@ return (point -> point -> Box point forall point. point -> point -> Box point Box point -p point -q)) +p point +q)) -------------------------------------------------------------------------------- @@ -373,12 +373,12 @@ -- -- >>> fromExtent (Vector2 (ClosedInterval 1 2) (ClosedInterval 10 20)) -- Box (Point2 1 10) (Point2 2 20) -fromExtent :: ( Vector_ vector d interval - , ClosedInterval_ interval r - , Has_ Additive_ d r - , Has_ Vector_ d interval - , HasComponents (Vector d interval) (Vector d r) - ) => vector -> Box (Point d r) +fromExtent :: ( Vector_ vector d interval + , ClosedInterval_ interval r + , Has_ Additive_ d r + , Has_ Vector_ d interval + , HasComponents (Vector d interval) (Vector d r) + ) => vector -> Box (Point d r) fromExtent :: forall vector (d :: Nat) interval r. (Vector_ vector d interval, ClosedInterval_ interval r, Has_ Additive_ d r, Has_ Vector_ d interval, @@ -402,15 +402,15 @@ vector (Vector (Dimension vector) (IxValue vector)) (Vector (Dimension vector) (IxValue vector)) -_Vector -> Vector (Dimension vector) (IxValue vector) -v) = Point d r -> Point d r -> Box (Point d r) +_Vector -> Vector (Dimension vector) (IxValue vector) +v) = Point d r -> Point d r -> Box (Point d r) forall point. point -> point -> Box point Box Point d r -minP Point d r -maxP +minP Point d r +maxP where - minP :: Point d r -minP = Vector d r -> Point d r + minP :: Point d r +minP = Vector d r -> Point d r forall point (d :: Nat) r. ConstructablePoint_ point d r => Vector d r -> point @@ -456,9 +456,9 @@ -> Vector (Dimension vector) (IxValue vector) -> Point d r forall a b. (a -> b) -> a -> b $ Vector (Dimension vector) (IxValue vector) -v - maxP :: Point d r -maxP = Vector d r -> Point d r +v + maxP :: Point d r +maxP = Vector d r -> Point d r forall point (d :: Nat) r. ConstructablePoint_ point d r => Vector d r -> point @@ -504,5 +504,5 @@ -> Vector (Dimension vector) (IxValue vector) -> Point d r forall a b. (a -> b) -> a -> b $ Vector (Dimension vector) (IxValue vector) -v +v \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Box.Intersection.html b/haddocks/hgeometry/kernel/src/HGeometry.Box.Intersection.html index 28fb75bc8..d326affd6 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Box.Intersection.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Box.Intersection.html @@ -27,8 +27,8 @@ -------------------------------------------------------------------------------- -type instance Intersection (Box point) (Box point) = - Maybe (Box (Point (Dimension point) (NumType point))) +type instance Intersection (Box point) (Box point) = + Maybe (Box (Point (Dimension point) (NumType point))) -- TODO, maybe make this more precise: @@ -37,40 +37,40 @@ -- | Box_x_Box_Segment (ClosedLineSegment point) -- | Box_x_Box_Box (Box point) -instance (Ord r, Num r, Point_ point d r - , HasComponents (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r))) - (Vector d (ClosedInterval r)) - , HasComponents (Vector d (ClosedInterval r)) (Vector d r) - , Has_ Vector_ d (ClosedInterval r) - , Has_ Additive_ d r - , Traversable (Vector d), Applicative (Vector d), Zip (Vector d) - ) => Box point `HasIntersectionWith` Box point where - Box point -a intersects :: Box point -> Box point -> Bool -`intersects` Box point -b = Maybe (Box (Point d r)) -> Bool +instance (Ord r, Num r, Point_ point d r + , HasComponents (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r))) + (Vector d (ClosedInterval r)) + , HasComponents (Vector d (ClosedInterval r)) (Vector d r) + , Has_ Vector_ d (ClosedInterval r) + , Has_ Additive_ d r + , Traversable (Vector d), Applicative (Vector d), Zip (Vector d) + ) => Box point `HasIntersectionWith` Box point where + Box point +a intersects :: Box point -> Box point -> Bool +`intersects` Box point +b = Maybe (Box (Point d r)) -> Bool forall a. Maybe a -> Bool isJust (Maybe (Box (Point d r)) -> Bool) -> Maybe (Box (Point d r)) -> Bool forall a b. (a -> b) -> a -> b $ Box point -a Box point -> Box point -> Intersection (Box point) (Box point) +a Box point -> Box point -> Intersection (Box point) (Box point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` Box point -b +b -instance ( Point_ point d r, Ord r, Num r - , HasComponents (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r))) - (Vector d (ClosedInterval r)) - , HasComponents (Vector d (ClosedInterval r)) (Vector d r) - , Has_ Vector_ d (ClosedInterval r) - , Has_ Additive_ d r - , Traversable (Vector d), Applicative (Vector d), Zip (Vector d) - ) => Box point `IsIntersectableWith` Box point where - Box point -bx intersect :: Box point -> Box point -> Intersection (Box point) (Box point) -`intersect` Box point -bx' = (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r)) +instance ( Point_ point d r, Ord r, Num r + , HasComponents (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r))) + (Vector d (ClosedInterval r)) + , HasComponents (Vector d (ClosedInterval r)) (Vector d r) + , Has_ Vector_ d (ClosedInterval r) + , Has_ Additive_ d r + , Traversable (Vector d), Applicative (Vector d), Zip (Vector d) + ) => Box point `IsIntersectableWith` Box point where + Box point +bx intersect :: Box point -> Box point -> Intersection (Box point) (Box point) +`intersect` Box point +bx' = (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r)) -> Box (Point d r)) -> Maybe (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r))) @@ -79,7 +79,7 @@ forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap Vector d (Interval_x_IntervalIntersection r (ClosedInterval r)) -> Box (Point d r) -fromExtent' (Maybe +fromExtent' (Maybe (Vector d (Interval_x_IntervalIntersection r (ClosedInterval r))) -> Intersection (Box point) (Box point)) -> (Vector @@ -132,7 +132,7 @@ (Box_ box point, r ~ NumType box, d ~ Dimension box, Num r) => box -> Vector d (ClosedInterval r) extent Box point -bx) (Box point -> Vector d (ClosedInterval r) +bx) (Box point -> Vector d (ClosedInterval r) forall r (d :: Nat). (r ~ NumType (Box point), d ~ Dimension (Box point), Num r) => Box point -> Vector d (ClosedInterval r) @@ -140,11 +140,11 @@ (Box_ box point, r ~ NumType box, d ~ Dimension box, Num r) => box -> Vector d (ClosedInterval r) extent Box point -bx') +bx') where - fromExtent' :: Vector d (Interval_x_IntervalIntersection r (ClosedInterval r)) + fromExtent' :: Vector d (Interval_x_IntervalIntersection r (ClosedInterval r)) -> Box (Point d r) -fromExtent' = Vector d (ClosedInterval r) -> Box (Point d r) +fromExtent' = Vector d (ClosedInterval r) -> Box (Point d r) forall vector (d :: Nat) interval r. (Vector_ vector d interval, ClosedInterval_ interval r, Has_ Additive_ d r, Has_ Vector_ d interval, @@ -170,26 +170,26 @@ HasComponents vector vector' => IndexedTraversal1 Int vector vector' (IxValue vector) (IxValue vector') -components @_ @(Vector d (ClosedInterval r))) Interval_x_IntervalIntersection r (ClosedInterval r) +components @_ @(Vector d (ClosedInterval r))) Interval_x_IntervalIntersection r (ClosedInterval r) -> ClosedInterval r forall {r}. Interval_x_IntervalIntersection r (ClosedInterval r) -> ClosedInterval r -f - f :: Interval_x_IntervalIntersection r (ClosedInterval r) +f + f :: Interval_x_IntervalIntersection r (ClosedInterval r) -> ClosedInterval r -f = \case - Interval_x_Interval_Point r -x -> r -> r -> ClosedInterval r +f = \case + Interval_x_Interval_Point r +x -> r -> r -> ClosedInterval r forall r. r -> r -> ClosedInterval r ClosedInterval r -x r -x - Interval_x_Interval_Contained ClosedInterval r -i -> ClosedInterval r -i - Interval_x_Interval_Partial ClosedInterval r -i -> ClosedInterval r -i +x r +x + Interval_x_Interval_Contained ClosedInterval r +i -> ClosedInterval r +i + Interval_x_Interval_Partial ClosedInterval r +i -> ClosedInterval r +i {-# INLINE intersect #-} \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Box.Sides.html b/haddocks/hgeometry/kernel/src/HGeometry.Box.Sides.html index 5210fb72e..796b50158 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Box.Sides.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Box.Sides.html @@ -28,16 +28,16 @@ -------------------------------------------------------------------------------- -- | The four sides of a rectangle -data Sides a = Sides { forall a. Sides a -> a -_north :: !a +data Sides a = Sides { forall a. Sides a -> a +_north :: !a , forall a. Sides a -> a -_east :: !a +_east :: !a , forall a. Sides a -> a -_south :: !a +_south :: !a , forall a. Sides a -> a -_west :: !a +_west :: !a } - deriving stock (Int -> Sides a -> ShowS + deriving stock (Int -> Sides a -> ShowS [Sides a] -> ShowS Sides a -> String (Int -> Sides a -> ShowS) @@ -53,7 +53,7 @@ show :: Sides a -> String $cshowList :: forall a. Show a => [Sides a] -> ShowS showList :: [Sides a] -> ShowS -Show,ReadPrec [Sides a] +Show,ReadPrec [Sides a] ReadPrec (Sides a) Int -> ReadS (Sides a) ReadS [Sides a] @@ -77,7 +77,7 @@ readPrec :: ReadPrec (Sides a) $creadListPrec :: forall a. Read a => ReadPrec [Sides a] readListPrec :: ReadPrec [Sides a] -Read,Sides a -> Sides a -> Bool +Read,Sides a -> Sides a -> Bool (Sides a -> Sides a -> Bool) -> (Sides a -> Sides a -> Bool) -> Eq (Sides a) forall a. Eq a => Sides a -> Sides a -> Bool @@ -86,7 +86,7 @@ == :: Sides a -> Sides a -> Bool $c/= :: forall a. Eq a => Sides a -> Sides a -> Bool /= :: Sides a -> Sides a -> Bool -Eq,(forall x. Sides a -> Rep (Sides a) x) +Eq,(forall x. Sides a -> Rep (Sides a) x) -> (forall x. Rep (Sides a) x -> Sides a) -> Generic (Sides a) forall x. Rep (Sides a) x -> Sides a forall x. Sides a -> Rep (Sides a) x @@ -98,7 +98,7 @@ from :: forall x. Sides a -> Rep (Sides a) x $cto :: forall a x. Rep (Sides a) x -> Sides a to :: forall x. Rep (Sides a) x -> Sides a -Generic,Eq (Sides a) +Generic,Eq (Sides a) Eq (Sides a) => (Sides a -> Sides a -> Ordering) -> (Sides a -> Sides a -> Bool) @@ -139,7 +139,7 @@ max :: Sides a -> Sides a -> Sides a $cmin :: forall a. Ord a => Sides a -> Sides a -> Sides a min :: Sides a -> Sides a -> Sides a -Ord,(forall m. Monoid m => Sides m -> m) +Ord,(forall m. Monoid m => Sides m -> m) -> (forall m a. Monoid m => (a -> m) -> Sides a -> m) -> (forall m a. Monoid m => (a -> m) -> Sides a -> m) -> (forall a b. (a -> b -> b) -> b -> Sides a -> b) @@ -221,7 +221,7 @@ sum :: forall a. Num a => Sides a -> a $cproduct :: forall a. Num a => Sides a -> a product :: forall a. Num a => Sides a -> a -Foldable,(forall a b. (a -> b) -> Sides a -> Sides b) +Foldable,(forall a b. (a -> b) -> Sides a -> Sides b) -> (forall a b. a -> Sides b -> Sides a) -> Functor Sides forall a b. a -> Sides b -> Sides a forall a b. (a -> b) -> Sides a -> Sides b @@ -232,7 +232,7 @@ fmap :: forall a b. (a -> b) -> Sides a -> Sides b $c<$ :: forall a b. a -> Sides b -> Sides a <$ :: forall a b. a -> Sides b -> Sides a -Functor,Functor Sides +Functor,Functor Sides Foldable Sides (Functor Sides, Foldable Sides) => (forall (f :: * -> *) a b. @@ -284,7 +284,7 @@ Traversable) -- | Access the north side -north :: Lens' (Sides a) a +north :: Lens' (Sides a) a north :: forall a (f :: * -> *). Functor f => (a -> f a) -> Sides a -> f (Sides a) @@ -293,13 +293,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Sides a -> a forall a. Sides a -> a -_north (\Sides a -s a -x -> Sides a -s { _north = x }) +_north (\Sides a +s a +x -> Sides a +s { _north = x }) -- | Access the east side -east :: Lens' (Sides a) a +east :: Lens' (Sides a) a east :: forall a (f :: * -> *). Functor f => (a -> f a) -> Sides a -> f (Sides a) @@ -308,13 +308,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Sides a -> a forall a. Sides a -> a -_east (\Sides a -s a -x -> Sides a -s { _east = x }) +_east (\Sides a +s a +x -> Sides a +s { _east = x }) -- | Access the south side -south :: Lens' (Sides a) a +south :: Lens' (Sides a) a south :: forall a (f :: * -> *). Functor f => (a -> f a) -> Sides a -> f (Sides a) @@ -323,13 +323,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Sides a -> a forall a. Sides a -> a -_south (\Sides a -s a -x -> Sides a -s { _south = x }) +_south (\Sides a +s a +x -> Sides a +s { _south = x }) -- | Access the west side -west :: Lens' (Sides a) a +west :: Lens' (Sides a) a west :: forall a (f :: * -> *). Functor f => (a -> f a) -> Sides a -> f (Sides a) @@ -338,112 +338,112 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Sides a -> a forall a. Sides a -> a -_west (\Sides a -s a -x -> Sides a -s { _west = x }) +_west (\Sides a +s a +x -> Sides a +s { _west = x }) -instance Applicative Sides where - pure :: forall a. a -> Sides a -pure a -x = a -> a -> a -> a -> Sides a +instance Applicative Sides where + pure :: forall a. a -> Sides a +pure a +x = a -> a -> a -> a -> Sides a forall a. a -> a -> a -> a -> Sides a Sides a -x a -x a -x a -x - (Sides a -> b -f a -> b -g a -> b -h a -> b -i) <*> :: forall a b. Sides (a -> b) -> Sides a -> Sides b -<*> (Sides a -a a -b a -c a -d) = b -> b -> b -> b -> Sides b +x a +x a +x a +x + (Sides a -> b +f a -> b +g a -> b +h a -> b +i) <*> :: forall a b. Sides (a -> b) -> Sides a -> Sides b +<*> (Sides a +a a +b a +c a +d) = b -> b -> b -> b -> Sides b forall a. a -> a -> a -> a -> Sides a Sides (a -> b -f a -a) (a -> b -g a -b) (a -> b -h a -c) (a -> b -i a -d) +f a +a) (a -> b +g a +b) (a -> b +h a +c) (a -> b +i a +d) -instance Foldable1 Sides where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> Sides a -> m -foldMap1 a -> m -f (Sides a -a a -b a -c a -d) = a -> m -f a -a m -> m -> m +instance Foldable1 Sides where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> Sides a -> m +foldMap1 a -> m +f (Sides a +a a +b a +c a +d) = a -> m +f a +a m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -b m -> m -> m +f a +b m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -c m -> m -> m +f a +c m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -d -instance Traversable1 Sides where - traverse1 :: forall (f :: * -> *) a b. +f a +d +instance Traversable1 Sides where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Sides a -> f (Sides b) -traverse1 a -> f b -f (Sides a -a a -b a -c a -d) = b -> b -> b -> b -> Sides b +traverse1 a -> f b +f (Sides a +a a +b a +c a +d) = b -> b -> b -> b -> Sides b forall a. a -> a -> a -> a -> Sides a Sides (b -> b -> b -> b -> Sides b) -> f b -> f (b -> b -> b -> Sides b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -a f (b -> b -> b -> Sides b) -> f b -> f (b -> b -> Sides b) +f a +a f (b -> b -> b -> Sides b) -> f b -> f (b -> b -> Sides b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b <.> a -> f b -f a -b f (b -> b -> Sides b) -> f b -> f (b -> Sides b) +f a +b f (b -> b -> Sides b) -> f b -> f (b -> Sides b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b <.> a -> f b -f a -c f (b -> Sides b) -> f b -> f (Sides b) +f a +c f (b -> Sides b) -> f b -> f (Sides b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b <.> a -> f b -f a -d +f a +d -instance Semigroup a => Semigroup (Sides a) where - Sides a -s <> :: Sides a -> Sides a -> Sides a -<> Sides a -s' = a -> a -> a +instance Semigroup a => Semigroup (Sides a) where + Sides a +s <> :: Sides a -> Sides a -> Sides a +<> Sides a +s' = a -> a -> a forall a. Semigroup a => a -> a -> a (<>) (a -> a -> a) -> Sides a -> Sides (a -> a) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Sides a -s Sides (a -> a) -> Sides a -> Sides a +s Sides (a -> a) -> Sides a -> Sides a forall a b. Sides (a -> b) -> Sides a -> Sides b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Sides a -s' -instance Monoid a => Monoid (Sides a) where - mempty :: Sides a +s' +instance Monoid a => Monoid (Sides a) where + mempty :: Sides a mempty = a -> Sides a forall a. a -> Sides a forall (f :: * -> *) a. Applicative f => a -> f a @@ -452,12 +452,12 @@ mempty -type instance Index (Sides a) = CardinalDirection -type instance IxValue (Sides a) = a +type instance Index (Sides a) = CardinalDirection +type instance IxValue (Sides a) = a -instance Ixed (Sides a) where - ix :: Index (Sides a) -> Traversal' (Sides a) (IxValue (Sides a)) -ix = \case +instance Ixed (Sides a) where + ix :: Index (Sides a) -> Traversal' (Sides a) (IxValue (Sides a)) +ix = \case Index (Sides a) CardinalDirection North -> (a -> f a) -> Sides a -> f (Sides a) @@ -514,21 +514,21 @@ -------------------------------------------------------------------------------- -- | The top side of the box, from left to right. -topSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r +topSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r ) - => rectangle -> ClosedLineSegment point + => rectangle -> ClosedLineSegment point topSide :: forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point -topSide = (\(Corners point -l point -r point +topSide = (\(Corners point +l point +r point _ point _) -> point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -l point -r) (Corners point -> ClosedLineSegment point) +l point +r) (Corners point -> ClosedLineSegment point) -> (rectangle -> Corners point) -> rectangle -> ClosedLineSegment point @@ -540,21 +540,21 @@ corners -- | Oriented from *left to right* -bottomSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r +bottomSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r ) - => rectangle -> ClosedLineSegment point + => rectangle -> ClosedLineSegment point bottomSide :: forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point bottomSide = (\(Corners point _ point -_ point -r point -l) -> point -> point -> ClosedLineSegment point +_ point +r point +l) -> point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -l point -r) (Corners point -> ClosedLineSegment point) +l point +r) (Corners point -> ClosedLineSegment point) -> (rectangle -> Corners point) -> rectangle -> ClosedLineSegment point @@ -566,21 +566,21 @@ corners -- | Left side of the box, from bottom to top -leftSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r +leftSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r ) - => rectangle -> ClosedLineSegment point + => rectangle -> ClosedLineSegment point leftSide :: forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point -leftSide = (\(Corners point -t point +leftSide = (\(Corners point +t point _ point -_ point -b) -> point -> point -> ClosedLineSegment point +_ point +b) -> point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -b point -t) (Corners point -> ClosedLineSegment point) +b point +t) (Corners point -> ClosedLineSegment point) -> (rectangle -> Corners point) -> rectangle -> ClosedLineSegment point @@ -592,21 +592,21 @@ corners -- | The right side, oriented from *bottom* to top -rightSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r +rightSide :: (Num r, Rectangle_ rectangle point, Point_ point 2 r ) - => rectangle -> ClosedLineSegment point + => rectangle -> ClosedLineSegment point rightSide :: forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point rightSide = (\(Corners point -_ point -t point -b point +_ point +t point +b point _) -> point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -b point -t) (Corners point -> ClosedLineSegment point) +b point +t) (Corners point -> ClosedLineSegment point) -> (rectangle -> Corners point) -> rectangle -> ClosedLineSegment point @@ -622,23 +622,23 @@ -- themselves are also oriented in clockwise order. If, you want them in the -- same order as the functions `topSide`, `bottomSide`, `leftSide`, and -- `rightSide`, use `sides'` instead. -sides :: (Num r, Rectangle_ rectangle point, Point_ point 2 r +sides :: (Num r, Rectangle_ rectangle point, Point_ point 2 r ) - => rectangle -> Sides (ClosedLineSegment point) + => rectangle -> Sides (ClosedLineSegment point) sides :: forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point) -sides rectangle -r = let Corners point -nw point -ne point -se point -sw = rectangle -> Corners point +sides rectangle +r = let Corners point +nw point +ne point +se point +sw = rectangle -> Corners point forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Corners point corners rectangle -r +r in ClosedLineSegment point -> ClosedLineSegment point -> ClosedLineSegment point @@ -648,35 +648,35 @@ Sides (point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -nw point -ne) (point -> point -> ClosedLineSegment point +nw point +ne) (point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -ne point -se) +ne point +se) (point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -se point -sw) (point -> point -> ClosedLineSegment point +se point +sw) (point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -sw point -nw) +sw point +nw) -- | The sides of the rectangle. The order of the segments is (Top, Right, -- Bottom, Left). Note that the segments themselves, are oriented as described -- by the functions topSide, bottomSide, leftSide, rightSide (basically: from -- left to right, and from bottom to top). If you want the segments oriented -- along the boundary of the rectangle, use the `sides` function instead. -sides' :: (Num r, Rectangle_ rectangle point, Point_ point 2 r +sides' :: (Num r, Rectangle_ rectangle point, Point_ point 2 r ) - => rectangle -> Sides (ClosedLineSegment point) + => rectangle -> Sides (ClosedLineSegment point) sides' :: forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point) -sides' rectangle -r = ClosedLineSegment point +sides' rectangle +r = ClosedLineSegment point -> ClosedLineSegment point -> ClosedLineSegment point -> ClosedLineSegment point @@ -687,36 +687,36 @@ (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point topSide rectangle -r) (rectangle -> ClosedLineSegment point +r) (rectangle -> ClosedLineSegment point forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point rightSide rectangle -r) (rectangle -> ClosedLineSegment point +r) (rectangle -> ClosedLineSegment point forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point bottomSide rectangle -r) (rectangle -> ClosedLineSegment point +r) (rectangle -> ClosedLineSegment point forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> ClosedLineSegment point leftSide rectangle -r) +r) -- | The side values of the rectangle, i.e. the coordinates of the top, right, bottom, and -- left sides. -sideValues :: (Rectangle_ rectangle point, Point_ point 2 r - ) => rectangle -> Sides r +sideValues :: (Rectangle_ rectangle point, Point_ point 2 r + ) => rectangle -> Sides r sideValues :: forall rectangle point r. (Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides r -sideValues rectangle -rect = r -> r -> r -> r -> Sides r +sideValues rectangle +rect = r -> r -> r -> r -> Sides r forall a. a -> a -> a -> a -> Sides a Sides (rectangle -rectrectangle -> Getting r rectangle r -> r +rectrectangle -> Getting r rectangle r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> rectangle -> Const r rectangle forall box point. HasMaxPoint box point => Lens' box point @@ -731,7 +731,7 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) (rectangle -rectrectangle -> Getting r rectangle r -> r +rectrectangle -> Getting r rectangle r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> rectangle -> Const r rectangle forall box point. HasMaxPoint box point => Lens' box point @@ -747,7 +747,7 @@ IndexedLens' Int point r xCoord) (rectangle -rectrectangle -> Getting r rectangle r -> r +rectrectangle -> Getting r rectangle r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> rectangle -> Const r rectangle forall box point. HasMinPoint box point => Lens' box point @@ -762,7 +762,7 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) (rectangle -rectrectangle -> Getting r rectangle r -> r +rectrectangle -> Getting r rectangle r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> rectangle -> Const r rectangle forall box point. HasMinPoint box point => Lens' box point diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Box.html b/haddocks/hgeometry/kernel/src/HGeometry.Box.html index 056d7d92e..79f0d5a2f 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Box.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Box.html @@ -58,13 +58,13 @@ -------------------------------------------------------------------------------- -instance ( Point_ point d r, Num r, Ord r - , Foldable1 (Vector d), Zip (Vector d) - ) => HasIntersectionWith (Point d r) (Box point) where - Point d r -q intersects :: Point d r -> Box point -> Bool -`intersects` Box point -box = All -> Bool +instance ( Point_ point d r, Num r, Ord r + , Foldable1 (Vector d), Zip (Vector d) + ) => HasIntersectionWith (Point d r) (Box point) where + Point d r +q intersects :: Point d r -> Box point -> Bool +`intersects` Box point +box = All -> Bool getAll (All -> Bool) -> (Vector d All -> All) -> Vector d All -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . Vector d All -> All @@ -80,19 +80,19 @@ forall (f :: * -> *) a b c. Zip f => (a -> b -> c) -> f a -> f b -> f c -zipWith (\r -x ClosedInterval r -i -> Bool -> All +zipWith (\r +x ClosedInterval r +i -> Bool -> All All (Bool -> All) -> Bool -> All forall a b. (a -> b) -> a -> b $ r -> Point 1 r forall r. r -> Point 1 r Point1 r -x Point 1 r -> ClosedInterval r -> Bool +x Point 1 r -> ClosedInterval r -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedInterval r -i) (Point d r -qPoint d r +i) (Point d r +qPoint d r -> Getting (Vector d r) (Point d r) (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) (Point d r) (Vector d r) @@ -113,26 +113,26 @@ (Box_ box point, r ~ NumType box, d ~ Dimension box, Num r) => box -> Vector d (ClosedInterval r) extent Box point -box) +box) {-# INLINE intersects #-} -type instance Intersection (Point d r) (Box point) = Maybe (Point d r) +type instance Intersection (Point d r) (Box point) = Maybe (Point d r) -instance ( Point_ point d r, Num r, Ord r - , Foldable1 (Vector d), Zip (Vector d) - ) => IsIntersectableWith (Point d r) (Box point) where - Point d r -q intersect :: Point d r -> Box point -> Intersection (Point d r) (Box point) -`intersect` Box point -box +instance ( Point_ point d r, Num r, Ord r + , Foldable1 (Vector d), Zip (Vector d) + ) => IsIntersectableWith (Point d r) (Box point) where + Point d r +q intersect :: Point d r -> Box point -> Intersection (Point d r) (Box point) +`intersect` Box point +box | Point d r -q Point d r -> Box point -> Bool +q Point d r -> Box point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Box point -box = Point d r -> Maybe (Point d r) +box = Point d r -> Maybe (Point d r) forall a. a -> Maybe a Just Point d r -q +q | Bool otherwise = Maybe (Point d r) Intersection (Point d r) (Box point) @@ -145,37 +145,37 @@ -- * Intersection with a line -- | Data type representing the intersection of a Box and a line -data LineBoxIntersection d r = Line_x_Box_Point (Point d r) - | Line_x_Box_LineSegment (ClosedLineSegment (Point d r)) +data LineBoxIntersection d r = Line_x_Box_Point (Point d r) + | Line_x_Box_LineSegment (ClosedLineSegment (Point d r)) -deriving instance (Show (Point d r), Show (ClosedLineSegment (Point d r))) => - Show (LineBoxIntersection d r) -deriving instance (Eq (Point d r), Eq (ClosedLineSegment (Point d r))) => - Eq (LineBoxIntersection d r) +deriving instance (Show (Point d r), Show (ClosedLineSegment (Point d r))) => + Show (LineBoxIntersection d r) +deriving instance (Eq (Point d r), Eq (ClosedLineSegment (Point d r))) => + Eq (LineBoxIntersection d r) -type instance Intersection (LineEQ r) (Rectangle point) = Maybe (LineBoxIntersection 2 r) +type instance Intersection (LineEQ r) (Rectangle point) = Maybe (LineBoxIntersection 2 r) -instance (Num r, Ord r - , Point_ point 2 r - ) => HasIntersectionWith (LineEQ r) (Rectangle point) where - l :: LineEQ r -l@(LineEQ r -a r -b) intersects :: LineEQ r -> Rectangle point -> Bool -`intersects` (Rectangle point -p point -q) = case r -a r -> r -> Ordering +instance (Num r, Ord r + , Point_ point 2 r + ) => HasIntersectionWith (LineEQ r) (Rectangle point) where + l :: LineEQ r +l@(LineEQ r +a r +b) intersects :: LineEQ r -> Rectangle point -> Bool +`intersects` (Rectangle point +p point +q) = case r +a r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r 0 of Ordering LT -> r -ly r -> r -> Bool +ly r -> r -> Bool forall a. Ord a => a -> a -> Bool >= point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -184,10 +184,10 @@ IndexedLens' Int point r yCoord Bool -> Bool -> Bool && r -ry r -> r -> Bool +ry r -> r -> Bool forall a. Ord a => a -> a -> Bool <= point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -199,12 +199,12 @@ EQ -> r -> Point 1 r forall r. r -> Point 1 r Point1 r -b Point 1 r -> ClosedInterval r -> Bool +b Point 1 r -> ClosedInterval r -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` r -> r -> ClosedInterval r forall r. r -> r -> ClosedInterval r ClosedInterval (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -212,7 +212,7 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -222,10 +222,10 @@ yCoord) Ordering GT -> r -ly r -> r -> Bool +ly r -> r -> Bool forall a. Ord a => a -> a -> Bool <= point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -234,10 +234,10 @@ IndexedLens' Int point r yCoord Bool -> Bool -> Bool && r -ry r -> r -> Bool +ry r -> r -> Bool forall a. Ord a => a -> a -> Bool >= point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -246,11 +246,11 @@ IndexedLens' Int point r yCoord where - ly :: r -ly = r -> LineEQ r -> r + ly :: r +ly = r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -258,12 +258,12 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) LineEQ r -l - ry :: r -ry = r -> LineEQ r -> r +l + ry :: r +ry = r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -271,30 +271,30 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) LineEQ r -l +l {-# INLINE intersects #-} -instance (Fractional r, Ord r - , Point_ point 2 r - ) => IsIntersectableWith (LineEQ r) (Rectangle point) where - l :: LineEQ r -l@(LineEQ r -a r -b) intersect :: LineEQ r +instance (Fractional r, Ord r + , Point_ point 2 r + ) => IsIntersectableWith (LineEQ r) (Rectangle point) where + l :: LineEQ r +l@(LineEQ r +a r +b) intersect :: LineEQ r -> Rectangle point -> Intersection (LineEQ r) (Rectangle point) -`intersect` (Rectangle point -p point -q) = case r -a r -> r -> Ordering +`intersect` (Rectangle point +p point +q) = case r +a r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r 0 of Ordering LT -> case r -ly r -> r -> Ordering +ly r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -326,7 +326,7 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -334,7 +334,7 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -344,10 +344,10 @@ yCoord) Ordering GT -> case r -ry r -> r -> Ordering +ry r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -356,9 +356,9 @@ IndexedLens' Int point r yCoord) of Ordering -LT -> let s :: Point 2 r -s = if point -ppoint -> Getting r point r -> r +LT -> let s :: Point 2 r +s = if point +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -368,11 +368,11 @@ xCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -tx then r -> r -> Point 2 r +tx then r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -tx (point -qpoint -> Getting r point r -> r +tx (point +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -383,7 +383,7 @@ else r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -391,13 +391,13 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) r -ly - t :: Point 2 r -t = if r -bx r -> r -> Bool +ly + t :: Point 2 r +t = if r +bx r -> r -> Bool forall a. Ord a => a -> a -> Bool <= point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -407,8 +407,8 @@ xCoord then r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -bx (point -ppoint -> Getting r point r -> r +bx (point +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -419,7 +419,7 @@ else r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -427,7 +427,7 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) r -ry +ry in LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) LineBoxIntersection 2 r -> Intersection (LineEQ r) (Rectangle point) @@ -449,8 +449,8 @@ $ Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) forall point. point -> point -> ClosedLineSegment point ClosedLineSegment Point 2 r -s Point 2 r -t +s Point 2 r +t Ordering EQ -> LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) LineBoxIntersection 2 r @@ -470,7 +470,7 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -478,7 +478,7 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -493,7 +493,7 @@ Nothing Ordering EQ | Bool -inRange -> LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) +inRange -> LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) LineBoxIntersection 2 r -> Intersection (LineEQ r) (Rectangle point) forall a. a -> Maybe a @@ -517,7 +517,7 @@ ClosedLineSegment (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -525,10 +525,10 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) r -b) (r -> r -> Point 2 r +b) (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -536,7 +536,7 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) r -b) +b) | Bool otherwise -> Maybe (LineBoxIntersection 2 r) Intersection (LineEQ r) (Rectangle point) @@ -544,10 +544,10 @@ Nothing Ordering GT -> case r -ly r -> r -> Ordering +ly r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -557,10 +557,10 @@ yCoord) of Ordering LT -> case r -ry r -> r -> Ordering +ry r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -592,7 +592,7 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -600,7 +600,7 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -610,9 +610,9 @@ yCoord) Ordering GT -> let - s :: Point 2 r -s = if point -ppoint -> Getting r point r -> r + s :: Point 2 r +s = if point +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -622,11 +622,11 @@ xCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -bx then r -> r -> Point 2 r +bx then r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -bx (point -ppoint -> Getting r point r -> r +bx (point +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -637,7 +637,7 @@ else r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -645,13 +645,13 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) r -ly - t :: Point 2 r -t = if r -tx r -> r -> Bool +ly + t :: Point 2 r +t = if r +tx r -> r -> Bool forall a. Ord a => a -> a -> Bool <= point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -661,8 +661,8 @@ xCoord then r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -tx (point -qpoint -> Getting r point r -> r +tx (point +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -673,7 +673,7 @@ else r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -681,7 +681,7 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) r -ry +ry in LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) LineBoxIntersection 2 r -> Intersection (LineEQ r) (Rectangle point) @@ -703,8 +703,8 @@ $ Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) forall point. point -> point -> ClosedLineSegment point ClosedLineSegment Point 2 r -s Point 2 r -t +s Point 2 r +t Ordering EQ -> LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) LineBoxIntersection 2 r @@ -724,7 +724,7 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -732,7 +732,7 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -746,11 +746,11 @@ forall a. Maybe a Nothing where - ly :: r -ly = r -> LineEQ r -> r + ly :: r +ly = r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -758,12 +758,12 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) LineEQ r -l - ry :: r -ry = r -> LineEQ r -> r +l + ry :: r +ry = r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -771,12 +771,12 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) LineEQ r -l +l - bx :: r -bx = r -> r -horX (point -ppoint -> Getting r point r -> r + bx :: r +bx = r -> r +horX (point +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -784,10 +784,10 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) - tx :: r -tx = r -> r -horX (point -qpoint -> Getting r point r -> r + tx :: r +tx = r -> r +horX (point +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -796,16 +796,16 @@ IndexedLens' Int point r yCoord) - inRange :: Bool -inRange = r -> Point 1 r + inRange :: Bool +inRange = r -> Point 1 r forall r. r -> Point 1 r Point1 r -b Point 1 r -> ClosedInterval r -> Bool +b Point 1 r -> ClosedInterval r -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` r -> r -> ClosedInterval r forall r. r -> r -> ClosedInterval r ClosedInterval (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -813,7 +813,7 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -823,37 +823,37 @@ yCoord) -- x-coordinate of the intersection with a horizontal line at height h - horX :: r -> r -horX r -h = (r -hr -> r -> r + horX :: r -> r +horX r +h = (r +hr -> r -> r forall a. Num a => a -> a -> a -r -b) r -> r -> r +b) r -> r -> r forall a. Fractional a => a -> a -> a / r -a +a {-# INLINE intersect #-} ---------------------------------------- -- with general line -type instance Intersection (VerticalOrLineEQ r) (Rectangle point) = - Maybe (LineBoxIntersection 2 r) +type instance Intersection (VerticalOrLineEQ r) (Rectangle point) = + Maybe (LineBoxIntersection 2 r) -instance (Num r, Ord r - , Point_ point 2 r - ) => HasIntersectionWith (VerticalOrLineEQ r) (Rectangle point) where - VerticalOrLineEQ r -l intersects :: VerticalOrLineEQ r -> Rectangle point -> Bool -`intersects` rect :: Rectangle point -rect@(Rectangle point -p point -q) = case VerticalOrLineEQ r -l of - VerticalLineThrough r -x -> (point -ppoint -> Getting r point r -> r +instance (Num r, Ord r + , Point_ point 2 r + ) => HasIntersectionWith (VerticalOrLineEQ r) (Rectangle point) where + VerticalOrLineEQ r +l intersects :: VerticalOrLineEQ r -> Rectangle point -> Bool +`intersects` rect :: Rectangle point +rect@(Rectangle point +p point +q) = case VerticalOrLineEQ r +l of + VerticalLineThrough r +x -> (point +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -863,12 +863,12 @@ xCoord) r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -x Bool -> Bool -> Bool +x Bool -> Bool -> Bool && r -x r -> r -> Bool +x r -> r -> Bool forall a. Ord a => a -> a -> Bool <= (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -876,30 +876,30 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) - NonVertical LineEQ r -l' -> LineEQ r -l' LineEQ r -> Rectangle point -> Bool + NonVertical LineEQ r +l' -> LineEQ r +l' LineEQ r -> Rectangle point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Rectangle point -rect +rect {-# INLINE intersects #-} -instance (Fractional r, Ord r - , Point_ point 2 r - ) => IsIntersectableWith (VerticalOrLineEQ r) (Rectangle point) where - VerticalOrLineEQ r -l intersect :: VerticalOrLineEQ r +instance (Fractional r, Ord r + , Point_ point 2 r + ) => IsIntersectableWith (VerticalOrLineEQ r) (Rectangle point) where + VerticalOrLineEQ r +l intersect :: VerticalOrLineEQ r -> Rectangle point -> Intersection (VerticalOrLineEQ r) (Rectangle point) -`intersect` rect :: Rectangle point -rect@(Rectangle point -p point -q) = case VerticalOrLineEQ r -l of - VerticalLineThrough r -x +`intersect` rect :: Rectangle point +rect@(Rectangle point +p point +q) = case VerticalOrLineEQ r +l of + VerticalLineThrough r +x | (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -909,12 +909,12 @@ xCoord) r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -x Bool -> Bool -> Bool +x Bool -> Bool -> Bool && r -x r -> r -> Bool +x r -> r -> Bool forall a. Ord a => a -> a -> Bool <= (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -945,10 +945,10 @@ ClosedLineSegment (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x (r -> Point 2 r) -> r -> Point 2 r +x (r -> Point 2 r) -> r -> Point 2 r forall a b. (a -> b) -> a -> b $ point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -959,10 +959,10 @@ (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x (r -> Point 2 r) -> r -> Point 2 r +x (r -> Point 2 r) -> r -> Point 2 r forall a b. (a -> b) -> a -> b $ point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -975,27 +975,27 @@ Intersection (VerticalOrLineEQ r) (Rectangle point) forall a. Maybe a Nothing - NonVertical LineEQ r -l' -> LineEQ r -l' LineEQ r + NonVertical LineEQ r +l' -> LineEQ r +l' LineEQ r -> Rectangle point -> Intersection (LineEQ r) (Rectangle point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` Rectangle point -rect +rect {-# INLINE intersect #-} -instance (Point_ point d r, IsTransformable point) => IsTransformable (Box point) where +instance (Point_ point d r, IsTransformable point) => IsTransformable (Box point) where -- ^ this instance is slighly misleading, as for arbitrary affine -- transformations (e.g. rotations) the result may no longer be an -- axis aligned box. So use with care! - transformBy :: Transformation (Dimension (Box point)) (NumType (Box point)) + transformBy :: Transformation (Dimension (Box point)) (NumType (Box point)) -> Box point -> Box point -transformBy Transformation (Dimension (Box point)) (NumType (Box point)) -t = ASetter (Box point) (Box point) point point +transformBy Transformation (Dimension (Box point)) (NumType (Box point)) +t = ASetter (Box point) (Box point) point point -> (point -> point) -> Box point -> Box point forall s t a b. ASetter s t a b -> (a -> b) -> s -> t over ASetter (Box point) (Box point) point point @@ -1015,38 +1015,38 @@ Transformation (Dimension g) (NumType g) -> g -> g transformBy Transformation (Dimension point) (NumType point) Transformation (Dimension (Box point)) (NumType (Box point)) -t) +t) -type instance Intersection (LinePV 2 r) (Rectangle point) = Maybe (LineBoxIntersection 2 r) +type instance Intersection (LinePV 2 r) (Rectangle point) = Maybe (LineBoxIntersection 2 r) -instance ( Num r, Ord r - , Point_ point 2 r - ) => HasIntersectionWith (LinePV 2 r) (Rectangle point) where - LinePV 2 r -l intersects :: LinePV 2 r -> Rectangle point -> Bool +instance ( Num r, Ord r + , Point_ point 2 r + ) => HasIntersectionWith (LinePV 2 r) (Rectangle point) where + LinePV 2 r +l intersects :: LinePV 2 r -> Rectangle point -> Bool `intersects` (Rectangle point -> Corners point forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Corners point -corners -> Corners point -tl point -tr point -br point -bl) = +corners -> Corners point +tl point +tr point +br point +bl) = point -> point -> Bool -onOppositeSides point -tl point -br Bool -> Bool -> Bool +onOppositeSides point +tl point +br Bool -> Bool -> Bool || point -> point -> Bool -onOppositeSides point -tr point -bl +onOppositeSides point +tr point +bl where - onOppositeSides :: point -> point -> Bool -onOppositeSides point -p point -q = point -> LinePV 2 r -> Ordering + onOppositeSides :: point -> point -> Bool +onOppositeSides point +p point +q = point -> LinePV 2 r -> Ordering forall point. (Point_ point 2 r, Ord r, Num r) => point -> LinePV 2 r -> Ordering @@ -1054,8 +1054,8 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering onSideTest point -p LinePV 2 r -l Ordering -> Ordering -> Bool +p LinePV 2 r +l Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool /= point -> LinePV 2 r -> Ordering forall point. @@ -1065,27 +1065,27 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering onSideTest point -q LinePV 2 r -l +q LinePV 2 r +l {-# INLINE intersects #-} -instance ( Fractional r, Ord r - , Point_ point 2 r - ) => IsIntersectableWith (LinePV 2 r) (Rectangle point) where - l :: LinePV 2 r -l@(LinePV Point 2 r -p Vector 2 r -_) intersect :: LinePV 2 r +instance ( Fractional r, Ord r + , Point_ point 2 r + ) => IsIntersectableWith (LinePV 2 r) (Rectangle point) where + l :: LinePV 2 r +l@(LinePV Point 2 r +p Vector 2 r +_) intersect :: LinePV 2 r -> Rectangle point -> Intersection (LinePV 2 r) (Rectangle point) -`intersect` Rectangle point -r = case LinePV 2 r -> Maybe (LineEQ r) +`intersect` Rectangle point +r = case LinePV 2 r -> Maybe (LineEQ r) forall r. (Fractional r, Ord r) => LinePV 2 r -> Maybe (LineEQ r) toLinearFunction LinePV 2 r -l of +l of Maybe (LineEQ r) Nothing | (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1097,7 +1097,7 @@ (Ord r, Interval_ interval r) => r -> interval -> Bool `stabsInterval` ClosedInterval r -xRange -> LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) +xRange -> LineBoxIntersection 2 r -> Maybe (LineBoxIntersection 2 r) LineBoxIntersection 2 r -> Intersection (LinePV 2 r) (Rectangle point) forall a. a -> Maybe a @@ -1121,7 +1121,7 @@ ClosedLineSegment (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1129,11 +1129,11 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r xCoord) r -minY) +minY) (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1141,24 +1141,24 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r xCoord) r -maxY) +maxY) | Bool otherwise -> Maybe (LineBoxIntersection 2 r) Intersection (LinePV 2 r) (Rectangle point) forall a. Maybe a Nothing - Just LineEQ r -l' -> LineEQ r -l' LineEQ r + Just LineEQ r +l' -> LineEQ r +l' LineEQ r -> Rectangle point -> Intersection (LineEQ r) (Rectangle point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` Rectangle point -r +r where - Vector2 ClosedInterval r -xRange (ClosedInterval r -minY r -maxY) = Rectangle point -> Vector 2 (ClosedInterval r) + Vector2 ClosedInterval r +xRange (ClosedInterval r +minY r +maxY) = Rectangle point -> Vector 2 (ClosedInterval r) forall r (d :: Nat). (r ~ NumType (Rectangle point), d ~ Dimension (Rectangle point), Num r) => @@ -1167,7 +1167,7 @@ (Box_ box point, r ~ NumType box, d ~ Dimension box, Num r) => box -> Vector d (ClosedInterval r) extent Rectangle point -r +r {-# INLINE intersect #-} -------------------------------------------------------------------------------- @@ -1182,22 +1182,22 @@ -- * Intersection with a linesegment -- | Figure out where a query point is with respect to a rectangle -inBox :: ( Point_ point 2 r, Point_ queryPoint 2 r, Rectangle_ rectangle point - , Ord r, Num r - ) => queryPoint -> rectangle -> PointLocationResultWith CardinalDirection -queryPoint -q inBox :: forall point r queryPoint rectangle. +inBox :: ( Point_ point 2 r, Point_ queryPoint 2 r, Rectangle_ rectangle point + , Ord r, Num r + ) => queryPoint -> rectangle -> PointLocationResultWith CardinalDirection +queryPoint +q inBox :: forall point r queryPoint rectangle. (Point_ point 2 r, Point_ queryPoint 2 r, Rectangle_ rectangle point, Ord r, Num r) => queryPoint -> rectangle -> PointLocationResultWith CardinalDirection -`inBox` rectangle -rect = case r -> ClosedInterval r -> CompareInterval +`inBox` rectangle +rect = case r -> ClosedInterval r -> CompareInterval forall r interval. (Ord r, Interval_ interval r) => r -> interval -> CompareInterval compareIntervalExact (queryPoint -qqueryPoint -> Getting r queryPoint r -> r +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Nat) point r. @@ -1205,7 +1205,7 @@ IndexedLens' Int point r IndexedLens' Int queryPoint r xCoord) ClosedInterval r -xRange of +xRange of CompareInterval Before -> PointLocationResultWith CardinalDirection forall edge. PointLocationResultWith edge @@ -1216,7 +1216,7 @@ (Ord r, Interval_ interval r) => r -> interval -> CompareInterval compareIntervalExact (queryPoint -qqueryPoint -> Getting r queryPoint r -> r +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Nat) point r. @@ -1224,7 +1224,7 @@ IndexedLens' Int point r IndexedLens' Int queryPoint r yCoord) ClosedInterval r -yRange of +yRange of CompareInterval Before -> PointLocationResultWith CardinalDirection forall edge. PointLocationResultWith edge @@ -1254,7 +1254,7 @@ (Ord r, Interval_ interval r) => r -> interval -> CompareInterval compareIntervalExact (queryPoint -qqueryPoint -> Getting r queryPoint r -> r +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Nat) point r. @@ -1262,7 +1262,7 @@ IndexedLens' Int point r IndexedLens' Int queryPoint r yCoord) ClosedInterval r -yRange of +yRange of CompareInterval Before -> PointLocationResultWith CardinalDirection forall edge. PointLocationResultWith edge @@ -1291,7 +1291,7 @@ (Ord r, Interval_ interval r) => r -> interval -> CompareInterval compareIntervalExact (queryPoint -qqueryPoint -> Getting r queryPoint r -> r +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Nat) point r. @@ -1299,7 +1299,7 @@ IndexedLens' Int point r IndexedLens' Int queryPoint r yCoord) ClosedInterval r -yRange of +yRange of CompareInterval Before -> PointLocationResultWith CardinalDirection forall edge. PointLocationResultWith edge @@ -1328,9 +1328,9 @@ forall edge. PointLocationResultWith edge StrictlyOutside where - Vector2 ClosedInterval r -xRange ClosedInterval r -yRange = rectangle -> Vector 2 (ClosedInterval r) + Vector2 ClosedInterval r +xRange ClosedInterval r +yRange = rectangle -> Vector 2 (ClosedInterval r) forall r (d :: Nat). (r ~ NumType rectangle, d ~ Dimension rectangle, Num r) => rectangle -> Vector d (ClosedInterval r) @@ -1338,23 +1338,23 @@ (Box_ box point, r ~ NumType box, d ~ Dimension box, Num r) => box -> Vector d (ClosedInterval r) extent rectangle -rect +rect -instance ( Ord r, Num r, Point_ point 2 r, Point_ point' 2 r - , IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - , HasIntersectionWith (LineSegment endPoint point) (ClosedLineSegment point') - ) => HasIntersectionWith (LineSegment endPoint point) (Rectangle point') where - LineSegment endPoint point -seg intersects :: LineSegment endPoint point -> Rectangle point' -> Bool -`intersects` Rectangle point' -rect = Bool -intersects' +instance ( Ord r, Num r, Point_ point 2 r, Point_ point' 2 r + , IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + , HasIntersectionWith (LineSegment endPoint point) (ClosedLineSegment point') + ) => HasIntersectionWith (LineSegment endPoint point) (Rectangle point') where + LineSegment endPoint point +seg intersects :: LineSegment endPoint point -> Rectangle point' -> Bool +`intersects` Rectangle point' +rect = Bool +intersects' where - intersects' :: Bool -intersects' = case (LineSegment endPoint point -segLineSegment endPoint point + intersects' :: Bool +intersects' = case (LineSegment endPoint point +segLineSegment endPoint point -> Getting point (LineSegment endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (LineSegment endPoint point) point @@ -1368,14 +1368,14 @@ queryPoint -> rectangle -> PointLocationResultWith CardinalDirection `inBox` Rectangle point' -rect of +rect of PointLocationResultWith CardinalDirection StrictlyInside -> Bool True OnBoundaryEdge CardinalDirection _ -> endPoint point -> Bool -isClosed (LineSegment endPoint point -segLineSegment endPoint point +isClosed (LineSegment endPoint point +segLineSegment endPoint point -> Getting (endPoint point) (LineSegment endPoint point) (endPoint point) -> endPoint point @@ -1387,7 +1387,7 @@ startPoint) Bool -> Bool -> Bool || case (LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting point (LineSegment endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (LineSegment endPoint point) point @@ -1401,7 +1401,7 @@ queryPoint -> rectangle -> PointLocationResultWith CardinalDirection `inBox` Rectangle point' -rect of +rect of PointLocationResultWith CardinalDirection StrictlyInside -> Bool True @@ -1410,10 +1410,10 @@ True PointLocationResultWith CardinalDirection StrictlyOutside -> Bool -intersectsBoundary +intersectsBoundary PointLocationResultWith CardinalDirection StrictlyOutside -> case (LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting point (LineSegment endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (LineSegment endPoint point) point @@ -1427,14 +1427,14 @@ queryPoint -> rectangle -> PointLocationResultWith CardinalDirection `inBox` Rectangle point' -rect of +rect of PointLocationResultWith CardinalDirection StrictlyInside -> Bool True OnBoundaryEdge CardinalDirection _ -> endPoint point -> Bool -isClosed (LineSegment endPoint point -segLineSegment endPoint point +isClosed (LineSegment endPoint point +segLineSegment endPoint point -> Getting (endPoint point) (LineSegment endPoint point) (endPoint point) -> endPoint point @@ -1445,20 +1445,20 @@ Lens' (LineSegment endPoint point) (endPoint point) endPoint) Bool -> Bool -> Bool || Bool -intersectsBoundary +intersectsBoundary PointLocationResultWith CardinalDirection StrictlyOutside -> Bool -intersectsBoundary - intersectsBoundary :: Bool -intersectsBoundary = LineSegment endPoint point -seg LineSegment endPoint point -> Boundary (Rectangle point') -> Bool +intersectsBoundary + intersectsBoundary :: Bool +intersectsBoundary = LineSegment endPoint point +seg LineSegment endPoint point -> Boundary (Rectangle point') -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Rectangle point' -> Boundary (Rectangle point') forall g. g -> Boundary g Boundary Rectangle point' -rect - isClosed :: endPoint point -> Bool -isClosed = (EndPointType -> EndPointType -> Bool +rect + isClosed :: endPoint point -> Bool +isClosed = (EndPointType -> EndPointType -> Bool forall a. Eq a => a -> a -> Bool == EndPointType Closed) (EndPointType -> Bool) @@ -1477,24 +1477,24 @@ -- diagonals (corners -> Corners a b c d) = Vector2 (ClosedLineSegment a c) (ClosedLineSegment b d) -instance ( Ord r, Num r, Point_ point 2 r, Point_ point' 2 r +instance ( Ord r, Num r, Point_ point 2 r, Point_ point' 2 r -- , IxValue (endPoint point) ~ point -- , EndPoint_ (endPoint point) - , HasIntersectionWith (LineSegment endPoint point) (ClosedLineSegment point') - ) => HasIntersectionWith (LineSegment endPoint point) (Boundary (Rectangle point')) where - LineSegment endPoint point -seg intersects :: LineSegment endPoint point -> Boundary (Rectangle point') -> Bool -`intersects` (Boundary Rectangle point' -rect) = (ClosedLineSegment point' -> Bool) + , HasIntersectionWith (LineSegment endPoint point) (ClosedLineSegment point') + ) => HasIntersectionWith (LineSegment endPoint point) (Boundary (Rectangle point')) where + LineSegment endPoint point +seg intersects :: LineSegment endPoint point -> Boundary (Rectangle point') -> Bool +`intersects` (Boundary Rectangle point' +rect) = (ClosedLineSegment point' -> Bool) -> Sides (ClosedLineSegment point') -> Bool forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool any (LineSegment endPoint point -seg `intersects`) (Rectangle point' -> Sides (ClosedLineSegment point') +seg `intersects`) (Rectangle point' -> Sides (ClosedLineSegment point') forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point) sides Rectangle point' -rect) +rect) -- TODO: I guess we should be able to speed up this implmeentation, since the various -- intersection tests against the sidees are probably doing double work. @@ -1537,14 +1537,14 @@ -- * Intersection with a HalfLine -instance ( Point_ point 2 r, Ord r, Num r - ) => HasIntersectionWith (HalfLine point) (Rectangle point) where - HalfLine point -hl intersects :: HalfLine point -> Rectangle point -> Bool -`intersects` Rectangle point -box = +instance ( Point_ point 2 r, Ord r, Num r + ) => HasIntersectionWith (HalfLine point) (Rectangle point) where + HalfLine point +hl intersects :: HalfLine point -> Rectangle point -> Bool +`intersects` Rectangle point +box = (HalfLine point -hlHalfLine point +hlHalfLine point -> Getting (Point 2 r) (HalfLine point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -1566,28 +1566,28 @@ asPoint) Point 2 r -> Rectangle point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Rectangle point -box Bool -> Bool -> Bool +box Bool -> Bool -> Bool || (ClosedLineSegment point -> Bool) -> Sides (ClosedLineSegment point) -> Bool forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool any (HalfLine point -hl `intersects`) (Rectangle point -> Sides (ClosedLineSegment point) +hl `intersects`) (Rectangle point -> Sides (ClosedLineSegment point) forall r rectangle point. (Num r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Sides (ClosedLineSegment point) sides Rectangle point -box) +box) -- the first condition is redundant, but probably sufficiently cheap that it may -- actually help/be faster when the starting point lies inside the box. {-# INLINE intersects #-} -type instance Intersection (HalfLine point) (Rectangle point) = - Maybe (HalfLineBoxIntersection (Point 2 (NumType point))) +type instance Intersection (HalfLine point) (Rectangle point) = + Maybe (HalfLineBoxIntersection (Point 2 (NumType point))) -data HalfLineBoxIntersection point = - HalfLine_x_Box_Point point - | HalfLine_x_Box_LineSegment (ClosedLineSegment point) - deriving (Int -> HalfLineBoxIntersection point -> ShowS +data HalfLineBoxIntersection point = + HalfLine_x_Box_Point point + | HalfLine_x_Box_LineSegment (ClosedLineSegment point) + deriving (Int -> HalfLineBoxIntersection point -> ShowS [HalfLineBoxIntersection point] -> ShowS HalfLineBoxIntersection point -> String (Int -> HalfLineBoxIntersection point -> ShowS) @@ -1613,7 +1613,7 @@ Show point => [HalfLineBoxIntersection point] -> ShowS showList :: [HalfLineBoxIntersection point] -> ShowS -Show,HalfLineBoxIntersection point +Show,HalfLineBoxIntersection point -> HalfLineBoxIntersection point -> Bool (HalfLineBoxIntersection point -> HalfLineBoxIntersection point -> Bool) @@ -1637,7 +1637,7 @@ -> HalfLineBoxIntersection point -> Bool /= :: HalfLineBoxIntersection point -> HalfLineBoxIntersection point -> Bool -Eq,ReadPrec [HalfLineBoxIntersection point] +Eq,ReadPrec [HalfLineBoxIntersection point] ReadPrec (HalfLineBoxIntersection point) Int -> ReadS (HalfLineBoxIntersection point) ReadS [HalfLineBoxIntersection point] @@ -1673,7 +1673,7 @@ Read point => ReadPrec [HalfLineBoxIntersection point] readListPrec :: ReadPrec [HalfLineBoxIntersection point] -Read,(forall x. +Read,(forall x. HalfLineBoxIntersection point -> Rep (HalfLineBoxIntersection point) x) -> (forall x. @@ -1706,7 +1706,7 @@ to :: forall x. Rep (HalfLineBoxIntersection point) x -> HalfLineBoxIntersection point -Generic,(forall a b. +Generic,(forall a b. (a -> b) -> HalfLineBoxIntersection a -> HalfLineBoxIntersection b) -> (forall a b. a -> HalfLineBoxIntersection b -> HalfLineBoxIntersection a) @@ -1728,30 +1728,30 @@ a -> HalfLineBoxIntersection b -> HalfLineBoxIntersection a Functor) -instance ( Point_ point 2 r, Ord r, Fractional r - ) => IsIntersectableWith (HalfLine point) (Rectangle point) where - HalfLine point -hl intersect :: HalfLine point +instance ( Point_ point 2 r, Ord r, Fractional r + ) => IsIntersectableWith (HalfLine point) (Rectangle point) where + HalfLine point +hl intersect :: HalfLine point -> Rectangle point -> Intersection (HalfLine point) (Rectangle point) -`intersect` Rectangle point -box = LinePV 2 r +`intersect` Rectangle point +box = LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m LinePV 2 r +m LinePV 2 r -> Rectangle point -> Intersection (LinePV 2 r) (Rectangle point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` Rectangle point -box Maybe (LineBoxIntersection 2 r) +box Maybe (LineBoxIntersection 2 r) -> (LineBoxIntersection 2 r -> Maybe (HalfLineBoxIntersection (Point 2 r))) -> Maybe (HalfLineBoxIntersection (Point 2 r)) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Line_x_Box_Point Point 2 r -p + Line_x_Box_Point Point 2 r +p | Point 2 r -p Point 2 r -> LinePV 2 r -> SideTest +p Point 2 r -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest @@ -1759,7 +1759,7 @@ forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m SideTest -> SideTest -> Bool +m SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest LeftSide -> HalfLineBoxIntersection (Point 2 r) @@ -1773,14 +1773,14 @@ $ Point 2 r -> HalfLineBoxIntersection (Point 2 r) forall point. point -> HalfLineBoxIntersection point HalfLine_x_Box_Point Point 2 r -p +p | Bool otherwise -> Maybe (HalfLineBoxIntersection (Point 2 r)) forall a. Maybe a Nothing - Line_x_Box_LineSegment LineSegment (EndPoint 'Closed) (Point 2 r) -seg -> let seg' :: LineSegment (EndPoint 'Closed) (Point 2 r) -seg' = Vector 2 r + Line_x_Box_LineSegment LineSegment (EndPoint 'Closed) (Point 2 r) +seg -> let seg' :: LineSegment (EndPoint 'Closed) (Point 2 r) +seg' = Vector 2 r -> LineSegment (EndPoint 'Closed) (Point 2 r) -> LineSegment (EndPoint 'Closed) (Point 2 r) forall point r (endPoint :: * -> *). @@ -1789,7 +1789,7 @@ Vector 2 r -> LineSegment endPoint point -> LineSegment endPoint point reorientTo (HalfLine point -hlHalfLine point +hlHalfLine point -> Getting (Vector 2 r) (HalfLine point) (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 r) (HalfLine point) (Vector 2 r) @@ -1801,7 +1801,7 @@ Lens' t (Vector d r) Lens' (HalfLine point) (Vector 2 r) direction) LineSegment (EndPoint 'Closed) (Point 2 r) -seg +seg in case LinePV 2 r -> LineSegment (EndPoint 'Closed) (Point 2 r) -> CompareInterval forall r point (endPoint :: * -> *). @@ -1810,8 +1810,8 @@ LinePV 2 r -> LineSegment endPoint point -> CompareInterval compareColinearInterval LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m LineSegment (EndPoint 'Closed) (Point 2 r) -seg' of +m LineSegment (EndPoint 'Closed) (Point 2 r) +seg' of CompareInterval Before -> HalfLineBoxIntersection (Point 2 r) -> Maybe (HalfLineBoxIntersection (Point 2 r)) @@ -1826,7 +1826,7 @@ forall point. ClosedLineSegment point -> HalfLineBoxIntersection point HalfLine_x_Box_LineSegment LineSegment (EndPoint 'Closed) (Point 2 r) -seg' +seg' CompareInterval OnStart -> HalfLineBoxIntersection (Point 2 r) -> Maybe (HalfLineBoxIntersection (Point 2 r)) @@ -1841,7 +1841,7 @@ forall point. ClosedLineSegment point -> HalfLineBoxIntersection point HalfLine_x_Box_LineSegment LineSegment (EndPoint 'Closed) (Point 2 r) -seg' +seg' CompareInterval Interior -> HalfLineBoxIntersection (Point 2 r) -> Maybe (HalfLineBoxIntersection (Point 2 r)) @@ -1861,7 +1861,7 @@ -> HalfLineBoxIntersection (Point 2 r) forall a b. (a -> b) -> a -> b $ LineSegment (EndPoint 'Closed) (Point 2 r) -seg'LineSegment (EndPoint 'Closed) (Point 2 r) +seg'LineSegment (EndPoint 'Closed) (Point 2 r) -> (LineSegment (EndPoint 'Closed) (Point 2 r) -> LineSegment (EndPoint 'Closed) (Point 2 r)) -> LineSegment (EndPoint 'Closed) (Point 2 r) @@ -1879,7 +1879,7 @@ -> LineSegment (EndPoint 'Closed) (Point 2 r) forall s t a b. ASetter s t a b -> b -> s -> t .~ (HalfLine point -hlHalfLine point +hlHalfLine point -> Getting (Point 2 r) (HalfLine point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -1911,7 +1911,7 @@ $ Point 2 r -> HalfLineBoxIntersection (Point 2 r) forall point. point -> HalfLineBoxIntersection point HalfLine_x_Box_Point (LineSegment (EndPoint 'Closed) (Point 2 r) -seg'LineSegment (EndPoint 'Closed) (Point 2 r) +seg'LineSegment (EndPoint 'Closed) (Point 2 r) -> Getting (Point 2 r) (LineSegment (EndPoint 'Closed) (Point 2 r)) @@ -1930,30 +1930,30 @@ forall a. Maybe a Nothing -- no intersection where - m :: LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m = HalfLine point + m :: LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) +m = HalfLine point -> LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) forall t. HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine HalfLine point -hl +hl -- | Given some vector v, and a line segment (that suposedly either has direction v or -- -v), flip the seg so that it has direction v. -reorientTo :: ( Point_ point 2 r, Ord r, Num r - , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) +reorientTo :: ( Point_ point 2 r, Ord r, Num r + , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) ) - => Vector 2 r -> LineSegment endPoint point -> LineSegment endPoint point + => Vector 2 r -> LineSegment endPoint point -> LineSegment endPoint point reorientTo :: forall point r (endPoint :: * -> *). (Point_ point 2 r, Ord r, Num r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => Vector 2 r -> LineSegment endPoint point -> LineSegment endPoint point -reorientTo Vector 2 r -v LineSegment endPoint point -seg = case (LineSegment endPoint point -segLineSegment endPoint point +reorientTo Vector 2 r +v LineSegment endPoint point +seg = case (LineSegment endPoint point +segLineSegment endPoint point -> Getting point (LineSegment endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (LineSegment endPoint point) point @@ -1964,26 +1964,26 @@ (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -m of +m of SideTest RightSide -> LineSegment endPoint point -> LineSegment endPoint point forall {endPoint :: * -> *} {point}. LineSegment endPoint point -> LineSegment endPoint point -flipSegment LineSegment endPoint point -seg +flipSegment LineSegment endPoint point +seg SideTest _ -> LineSegment endPoint point -seg +seg where - m :: LinePV 2 r -m = LinePV 2 r -> LinePV 2 r + m :: LinePV 2 r +m = LinePV 2 r -> LinePV 2 r forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r -> LinePV 2 r forall a b. (a -> b) -> a -> b $ Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting (Point 2 r) (LineSegment endPoint point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a @@ -2006,15 +2006,15 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) Vector 2 r -v +v -- v points into the left halfplane of m - flipSegment :: LineSegment endPoint point -> LineSegment endPoint point -flipSegment (LineSegment endPoint point -s endPoint point -t) = endPoint point -> endPoint point -> LineSegment endPoint point + flipSegment :: LineSegment endPoint point -> LineSegment endPoint point +flipSegment (LineSegment endPoint point +s endPoint point +t) = endPoint point -> endPoint point -> LineSegment endPoint point forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment endPoint point -t endPoint point -s +t endPoint point +s \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Direction.html b/haddocks/hgeometry/kernel/src/HGeometry.Direction.html index 0ca41292a..fba18fbf5 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Direction.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Direction.html @@ -1,4 +1,4 @@ -
--------------------------------------------------------------------------------
+
--------------------------------------------------------------------------------
 -- |
 -- Module      :  HGeometry.Direction
 -- Copyright   :  (C) Frank Staals
@@ -25,7 +25,7 @@
 --------------------------------------------------------------------------------
 
 -- | The four cardinal directions.
-data CardinalDirection = North | East | South | West deriving (Int -> CardinalDirection -> ShowS
+data CardinalDirection = North | East | South | West deriving (Int -> CardinalDirection -> ShowS
 [CardinalDirection] -> ShowS
 CardinalDirection -> String
 (Int -> CardinalDirection -> ShowS)
@@ -40,7 +40,7 @@
 show :: CardinalDirection -> String
 $cshowList :: [CardinalDirection] -> ShowS
 showList :: [CardinalDirection] -> ShowS
-Show,ReadPrec [CardinalDirection]
+Show,ReadPrec [CardinalDirection]
 ReadPrec CardinalDirection
 Int -> ReadS CardinalDirection
 ReadS [CardinalDirection]
@@ -60,7 +60,7 @@
 readPrec :: ReadPrec CardinalDirection
 $creadListPrec :: ReadPrec [CardinalDirection]
 readListPrec :: ReadPrec [CardinalDirection]
-Read,CardinalDirection -> CardinalDirection -> Bool
+Read,CardinalDirection -> CardinalDirection -> Bool
 (CardinalDirection -> CardinalDirection -> Bool)
 -> (CardinalDirection -> CardinalDirection -> Bool)
 -> Eq CardinalDirection
@@ -69,7 +69,7 @@
 == :: CardinalDirection -> CardinalDirection -> Bool
 $c/= :: CardinalDirection -> CardinalDirection -> Bool
 /= :: CardinalDirection -> CardinalDirection -> Bool
-Eq,Eq CardinalDirection
+Eq,Eq CardinalDirection
 Eq CardinalDirection =>
 (CardinalDirection -> CardinalDirection -> Ordering)
 -> (CardinalDirection -> CardinalDirection -> Bool)
@@ -106,7 +106,7 @@
 max :: CardinalDirection -> CardinalDirection -> CardinalDirection
 $cmin :: CardinalDirection -> CardinalDirection -> CardinalDirection
 min :: CardinalDirection -> CardinalDirection -> CardinalDirection
-Ord,Int -> CardinalDirection
+Ord,Int -> CardinalDirection
 CardinalDirection -> Int
 CardinalDirection -> [CardinalDirection]
 CardinalDirection -> CardinalDirection
@@ -151,7 +151,7 @@
 -> CardinalDirection -> CardinalDirection -> [CardinalDirection]
 enumFromThenTo :: CardinalDirection
 -> CardinalDirection -> CardinalDirection -> [CardinalDirection]
-Enum,CardinalDirection
+Enum,CardinalDirection
 CardinalDirection -> CardinalDirection -> Bounded CardinalDirection
 forall a. a -> a -> Bounded a
 $cminBound :: CardinalDirection
@@ -185,7 +185,7 @@
 
 -- | Intercardinal directions
 data InterCardinalDirection = NorthWest | NorthEast | SouthEast | SouthWest
-  deriving (Int -> InterCardinalDirection -> ShowS
+  deriving (Int -> InterCardinalDirection -> ShowS
 [InterCardinalDirection] -> ShowS
 InterCardinalDirection -> String
 (Int -> InterCardinalDirection -> ShowS)
@@ -200,7 +200,7 @@
 show :: InterCardinalDirection -> String
 $cshowList :: [InterCardinalDirection] -> ShowS
 showList :: [InterCardinalDirection] -> ShowS
-Show,ReadPrec [InterCardinalDirection]
+Show,ReadPrec [InterCardinalDirection]
 ReadPrec InterCardinalDirection
 Int -> ReadS InterCardinalDirection
 ReadS [InterCardinalDirection]
@@ -220,7 +220,7 @@
 readPrec :: ReadPrec InterCardinalDirection
 $creadListPrec :: ReadPrec [InterCardinalDirection]
 readListPrec :: ReadPrec [InterCardinalDirection]
-Read,InterCardinalDirection -> InterCardinalDirection -> Bool
+Read,InterCardinalDirection -> InterCardinalDirection -> Bool
 (InterCardinalDirection -> InterCardinalDirection -> Bool)
 -> (InterCardinalDirection -> InterCardinalDirection -> Bool)
 -> Eq InterCardinalDirection
@@ -229,7 +229,7 @@
 == :: InterCardinalDirection -> InterCardinalDirection -> Bool
 $c/= :: InterCardinalDirection -> InterCardinalDirection -> Bool
 /= :: InterCardinalDirection -> InterCardinalDirection -> Bool
-Eq,Eq InterCardinalDirection
+Eq,Eq InterCardinalDirection
 Eq InterCardinalDirection =>
 (InterCardinalDirection -> InterCardinalDirection -> Ordering)
 -> (InterCardinalDirection -> InterCardinalDirection -> Bool)
@@ -273,7 +273,7 @@
 -> InterCardinalDirection -> InterCardinalDirection
 min :: InterCardinalDirection
 -> InterCardinalDirection -> InterCardinalDirection
-Ord,Int -> InterCardinalDirection
+Ord,Int -> InterCardinalDirection
 InterCardinalDirection -> Int
 InterCardinalDirection -> [InterCardinalDirection]
 InterCardinalDirection -> InterCardinalDirection
@@ -333,7 +333,7 @@
 -> InterCardinalDirection
 -> InterCardinalDirection
 -> [InterCardinalDirection]
-Enum,(forall x. InterCardinalDirection -> Rep InterCardinalDirection x)
+Enum,(forall x. InterCardinalDirection -> Rep InterCardinalDirection x)
 -> (forall x.
     Rep InterCardinalDirection x -> InterCardinalDirection)
 -> Generic InterCardinalDirection
diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Duality.html b/haddocks/hgeometry/kernel/src/HGeometry.Duality.html
index 9f86c8aa7..ac4ceaee7 100644
--- a/haddocks/hgeometry/kernel/src/HGeometry.Duality.html
+++ b/haddocks/hgeometry/kernel/src/HGeometry.Duality.html
@@ -33,8 +33,8 @@
 --
 -- >>> dualPoint (LineEQ 10 20)
 -- Point2 10 (-20)
-dualPoint :: forall hyperPlane d r. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d)
-          => hyperPlane -> Point d r
+dualPoint :: forall hyperPlane d r. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d)
+          => hyperPlane -> Point d r
 dualPoint :: forall hyperPlane (d :: Natural) r.
 (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d) =>
 hyperPlane -> Point d r
@@ -49,7 +49,7 @@
 over (forall (i :: Natural) vector r (d :: Natural).
 (i <= (d - 1), KnownNat i, Vector_ vector d r) =>
 IndexedLens' Int vector r
-component @(d-1)) r -> r
+component @(d-1)) r -> r
 forall a. Num a => a -> a
 negate (Vector d r -> Vector d r)
 -> (hyperPlane -> Vector d r) -> hyperPlane -> Vector d r
@@ -68,8 +68,8 @@
 --
 -- >>> dualHyperPlane (Point2 10 (-20))
 -- NonVerticalHyperPlane [10,20]
-dualHyperPlane :: forall point d r. (Point_ point d r, Num r, 1 <= d)
-               => point -> NonVerticalHyperPlane d r
+dualHyperPlane :: forall point d r. (Point_ point d r, Num r, 1 <= d)
+               => point -> NonVerticalHyperPlane d r
 dualHyperPlane :: forall point (d :: Natural) r.
 (Point_ point d r, Num r, 1 <= d) =>
 point -> NonVerticalHyperPlane d r
@@ -84,7 +84,7 @@
 over (forall (i :: Natural) vector r (d :: Natural).
 (i <= (d - 1), KnownNat i, Vector_ vector d r) =>
 IndexedLens' Int vector r
-component @(d-1)) r -> r
+component @(d-1)) r -> r
 forall a. Num a => a -> a
 negate (Vector d r -> Vector d r)
 -> (point -> Vector d r) -> point -> Vector d r
@@ -107,7 +107,7 @@
 --
 -- >>> dualLine (Point2 10 (-20))
 -- LineEQ 10 20
-dualLine :: (Point_ point 2 r, Num r) => point -> LineEQ r
+dualLine :: (Point_ point 2 r, Num r) => point -> LineEQ r
 dualLine :: forall point r. (Point_ point 2 r, Num r) => point -> LineEQ r
 dualLine = NonVerticalHyperPlane 2 r -> LineEQ r
 forall r. NonVerticalHyperPlane 2 r -> LineEQ r
@@ -125,37 +125,37 @@
 
 -- | The standard lifting transform, that lifts a point to the plane
 -- tangent to the unit hyperboloid.
-liftPointToPlane               :: (Point_ point 2 r, Num r) => point -> NonVerticalHyperPlane 3 r
+liftPointToPlane               :: (Point_ point 2 r, Num r) => point -> NonVerticalHyperPlane 3 r
 liftPointToPlane :: forall point r.
 (Point_ point 2 r, Num r) =>
 point -> NonVerticalHyperPlane 3 r
-liftPointToPlane (Point2_ r
-x r
-y) = r -> r -> r -> Plane r
+liftPointToPlane (Point2_ r
+x r
+y) = r -> r -> r -> Plane r
 forall r. r -> r -> r -> Plane r
 Plane (r
 2r -> r -> r
 forall a. Num a => a -> a -> a
 *r
-x) (r
+x) (r
 2r -> r -> r
 forall a. Num a => a -> a -> a
 *r
-y) (r -> r
+y) (r -> r
 forall a. Num a => a -> a
 negate (r -> r) -> r -> r
 forall a b. (a -> b) -> a -> b
 $ r
-xr -> r -> r
+xr -> r -> r
 forall a. Num a => a -> a -> a
 *r
-x r -> r -> r
+x r -> r -> r
 forall a. Num a => a -> a -> a
 + r
-yr -> r -> r
+yr -> r -> r
 forall a. Num a => a -> a -> a
 *r
-y)
+y)
 
 
 --------------------------------------------------------------------------------
diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Ellipse.html b/haddocks/hgeometry/kernel/src/HGeometry.Ellipse.html
index 5930a726f..0f1ddf4d1 100644
--- a/haddocks/hgeometry/kernel/src/HGeometry.Ellipse.html
+++ b/haddocks/hgeometry/kernel/src/HGeometry.Ellipse.html
@@ -27,9 +27,9 @@
 --------------------------------------------------------------------------------
 
 -- | A type representing planar ellipses
-newtype Ellipse r = Ellipse { forall r. Ellipse r -> Transformation 2 r
-_affineTransformation :: Transformation 2 r }
-                   deriving (Int -> Ellipse r -> ShowS
+newtype Ellipse r = Ellipse { forall r. Ellipse r -> Transformation 2 r
+_affineTransformation :: Transformation 2 r }
+                   deriving (Int -> Ellipse r -> ShowS
 [Ellipse r] -> ShowS
 Ellipse r -> String
 (Int -> Ellipse r -> ShowS)
@@ -47,7 +47,7 @@
 show :: Ellipse r -> String
 $cshowList :: forall r. Show r => [Ellipse r] -> ShowS
 showList :: [Ellipse r] -> ShowS
-Show,Ellipse r -> Ellipse r -> Bool
+Show,Ellipse r -> Ellipse r -> Bool
 (Ellipse r -> Ellipse r -> Bool)
 -> (Ellipse r -> Ellipse r -> Bool) -> Eq (Ellipse r)
 forall r. Eq r => Ellipse r -> Ellipse r -> Bool
@@ -60,7 +60,7 @@
 
 -- | Iso to access the transformation (applied on the unit circle)
 -- that we use to actually represent the ellipse
-affineTransformation :: Iso (Ellipse r) (Ellipse s) (Transformation 2 r) (Transformation 2 s)
+affineTransformation :: Iso (Ellipse r) (Ellipse s) (Transformation 2 r) (Transformation 2 s)
 affineTransformation :: forall r s (p :: * -> * -> *) (f :: * -> *).
 (Profunctor p, Functor f) =>
 p (Transformation 2 r) (f (Transformation 2 s))
@@ -76,11 +76,11 @@
 forall r. Transformation 2 r -> Ellipse r
 Ellipse
 
-type instance Dimension (Ellipse r) = 2
-type instance NumType   (Ellipse r) = r
+type instance Dimension (Ellipse r) = 2
+type instance NumType   (Ellipse r) = r
 
-instance Functor Ellipse where
-  fmap :: forall a b. (a -> b) -> Ellipse a -> Ellipse b
+instance Functor Ellipse where
+  fmap :: forall a b. (a -> b) -> Ellipse a -> Ellipse b
 fmap = ASetter (Ellipse a) (Ellipse b) a b
 -> (a -> b) -> Ellipse a -> Ellipse b
 forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
@@ -133,9 +133,9 @@
   (NumType (Matrix 3 3 b))
 elements
 
-instance Foldable Ellipse where
-  foldMap :: forall m a. Monoid m => (a -> m) -> Ellipse a -> m
-foldMap = Getting m (Ellipse a) a -> (a -> m) -> Ellipse a -> m
+instance Foldable Ellipse where
+  foldMap :: forall m a. Monoid m => (a -> m) -> Ellipse a -> m
+foldMap = Getting m (Ellipse a) a -> (a -> m) -> Ellipse a -> m
 forall r s a. Getting r s a -> (a -> r) -> s -> r
 foldMapOf (Getting m (Ellipse a) a -> (a -> m) -> Ellipse a -> m)
 -> Getting m (Ellipse a) a -> (a -> m) -> Ellipse a -> m
@@ -182,26 +182,26 @@
   (NumType (Matrix 3 3 a))
 elements
 
-instance Traversable Ellipse where
-  traverse :: forall (f :: * -> *) a b.
+instance Traversable Ellipse where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> Ellipse a -> f (Ellipse b)
-traverse a -> f b
-f Ellipse a
-e = Ellipse a
-eEllipse a -> (Ellipse a -> f (Ellipse b)) -> f (Ellipse b)
+traverse a -> f b
+f Ellipse a
+e = Ellipse a
+eEllipse a -> (Ellipse a -> f (Ellipse b)) -> f (Ellipse b)
 forall a b. a -> (a -> b) -> b
 &(a -> f b) -> Ellipse a -> f (Ellipse b)
 forall {a} {b}. (a -> f b) -> Ellipse a -> f (Ellipse b)
-elements' ((a -> f b) -> Ellipse a -> f (Ellipse b))
+elements' ((a -> f b) -> Ellipse a -> f (Ellipse b))
 -> (a -> f b) -> Ellipse a -> f (Ellipse b)
 forall {k} (f :: k -> *) s (t :: k) a (b :: k).
 LensLike f s t a b -> LensLike f s t a b
 %%~ a -> f b
-f
+f
     where
-      elements' :: (a -> f b) -> Ellipse a -> f (Ellipse b)
-elements' = ATraversal (Ellipse a) (Ellipse b) a b
+      elements' :: (a -> f b) -> Ellipse a -> f (Ellipse b)
+elements' = ATraversal (Ellipse a) (Ellipse b) a b
 -> Traversal (Ellipse a) (Ellipse b) a b
 forall s t a b. ATraversal s t a b -> Traversal s t a b
 cloneTraversal (ATraversal (Ellipse a) (Ellipse b) a b
@@ -256,27 +256,27 @@
 elements
 
 
-instance Num r => IsTransformable (Ellipse r) where
-  transformBy :: Transformation (Dimension (Ellipse r)) (NumType (Ellipse r))
+instance Num r => IsTransformable (Ellipse r) where
+  transformBy :: Transformation (Dimension (Ellipse r)) (NumType (Ellipse r))
 -> Ellipse r -> Ellipse r
-transformBy Transformation (Dimension (Ellipse r)) (NumType (Ellipse r))
-t (Ellipse Transformation 2 r
-t') = Transformation 2 r -> Ellipse r
+transformBy Transformation (Dimension (Ellipse r)) (NumType (Ellipse r))
+t (Ellipse Transformation 2 r
+t') = Transformation 2 r -> Ellipse r
 forall r. Transformation 2 r -> Ellipse r
 Ellipse (Transformation 2 r -> Ellipse r)
 -> Transformation 2 r -> Ellipse r
 forall a b. (a -> b) -> a -> b
 $ Transformation 2 r
 Transformation (Dimension (Ellipse r)) (NumType (Ellipse r))
-t Transformation 2 r -> Transformation 2 r -> Transformation 2 r
+t Transformation 2 r -> Transformation 2 r -> Transformation 2 r
 forall r (d :: Nat).
 (Num r, OptMatrix_ (d + 1) r) =>
 Transformation d r -> Transformation d r -> Transformation d r
 |.| Transformation 2 r
-t'
+t'
 
 -- | Get the matrix describing the ellipse.
-ellipseMatrix :: Iso (Ellipse r) (Ellipse s) (Matrix 3 3 r) (Matrix 3 3 s)
+ellipseMatrix :: Iso (Ellipse r) (Ellipse s) (Matrix 3 3 r) (Matrix 3 3 s)
 ellipseMatrix :: forall r s (p :: * -> * -> *) (f :: * -> *).
 (Profunctor p, Functor f) =>
 p (Matrix 3 3 r) (f (Matrix 3 3 s))
@@ -305,7 +305,7 @@
 transformationMatrix
 
 -- | Ellipse representing the unit circle
-unitEllipse :: Num r => Ellipse r
+unitEllipse :: Num r => Ellipse r
 unitEllipse :: forall r. Num r => Ellipse r
 unitEllipse = Transformation 2 r -> Ellipse r
 forall r. Transformation 2 r -> Ellipse r
@@ -325,7 +325,7 @@
 -- | Converting between ellipses and circles
 
 -- | Prims to convert between an Ellipse and a Circle.
-_EllipseCircle :: (Radical.Radical r, Eq r) => Prism' (Ellipse r) (Circle (Point 2 r))
+_EllipseCircle :: (Radical.Radical r, Eq r) => Prism' (Ellipse r) (Circle (Point 2 r))
 _EllipseCircle :: forall r.
 (Radical r, Eq r) =>
 Prism' (Ellipse r) (Circle (Point 2 r))
@@ -344,11 +344,11 @@
 
 -- | Try to Convert a circle into an ellipse. Returns a Nothing if the
 -- ellipse is not an actual circle.
-ellipseToCircle   :: (Num r, Eq r) => Ellipse r -> Maybe (Circle (Point 2 r))
+ellipseToCircle   :: (Num r, Eq r) => Ellipse r -> Maybe (Circle (Point 2 r))
 ellipseToCircle :: forall r. (Num r, Eq r) => Ellipse r -> Maybe (Circle (Point 2 r))
-ellipseToCircle Ellipse r
-e = case Ellipse r
-eEllipse r
+ellipseToCircle Ellipse r
+e = case Ellipse r
+eEllipse r
 -> Getting (Matrix 3 3 r) (Ellipse r) (Matrix 3 3 r)
 -> Matrix 3 3 r
 forall s a. s -> Getting a s a -> a
@@ -358,24 +358,24 @@
 p (Matrix 3 3 r) (f (Matrix 3 3 s))
 -> p (Ellipse r) (f (Ellipse s))
 ellipseMatrix of
-      Matrix (Vector3 (Vector3 r
-sx r
-0 r
-x)
+      Matrix (Vector3 (Vector3 r
+sx r
+0 r
+x)
                       (Vector3 r
-0 r
-sy r
-y)
+0 r
+sy r
+y)
                       (Vector3 r
 0 r
 0  r
 1)
              )
            | r
-sx r -> r -> Bool
+sx r -> r -> Bool
 forall a. Eq a => a -> a -> Bool
 == r
-sy -> Circle (Point 2 r) -> Maybe (Circle (Point 2 r))
+sy -> Circle (Point 2 r) -> Maybe (Circle (Point 2 r))
 forall a. a -> Maybe a
 Just (Circle (Point 2 r) -> Maybe (Circle (Point 2 r)))
 -> Circle (Point 2 r) -> Maybe (Circle (Point 2 r))
@@ -385,27 +385,27 @@
 Circle (r -> r -> Point 2 r
 forall r. r -> r -> Point 2 r
 Point2 r
-x r
-y) (r
-sxr -> r -> r
+x r
+y) (r
+sxr -> r -> r
 forall a. Num a => a -> a -> a
 *r
-sx)
+sx)
       Matrix 3 3 r
 _               -> Maybe (Circle (Point 2 r))
 forall a. Maybe a
 Nothing
 
 -- | Convert a circle to an ellipse
-circleToEllipse                            :: ( Radical.Radical r
-                                              , Point_ point 2 r
-                                              ) => Circle point -> Ellipse r
+circleToEllipse                            :: ( Radical.Radical r
+                                              , Point_ point 2 r
+                                              ) => Circle point -> Ellipse r
 circleToEllipse :: forall r point.
 (Radical r, Point_ point 2 r) =>
 Circle point -> Ellipse r
-circleToEllipse (Circle point
-p NumType point
-rr) =
+circleToEllipse (Circle point
+p NumType point
+rr) =
   Transformation 2 r -> Ellipse r
 forall r. Transformation 2 r -> Ellipse r
 Ellipse (Transformation 2 r -> Ellipse r)
@@ -416,7 +416,7 @@
 (Num r, Vector_ vector d r, TransformationConstraints d r) =>
 vector -> Transformation d r
 translation (point
-ppoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r
+ppoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector 2 r) point (Vector 2 r)
 forall (d :: Nat) r s.
@@ -440,5 +440,5 @@
 forall r. Radical r => r -> r
 Radical.sqrt r
 NumType point
-rr)
+rr)
 
\ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.HalfLine.html b/haddocks/hgeometry/kernel/src/HGeometry.HalfLine.html index 612fa2301..88c443862 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.HalfLine.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.HalfLine.html @@ -32,25 +32,25 @@
-------------------------------------------------------------------------------- -- | A Halfline in R^d -data HalfLine point = HalfLine !point - !(Vector (Dimension point) (NumType point)) +data HalfLine point = HalfLine !point + !(Vector (Dimension point) (NumType point)) -type instance Dimension (HalfLine point) = Dimension point -type instance NumType (HalfLine point) = NumType point +type instance Dimension (HalfLine point) = Dimension point +type instance NumType (HalfLine point) = NumType point -deriving instance ( Eq point, Eq (Vector d r) - , d ~ Dimension point, r ~ NumType point) => Eq (HalfLine point) +deriving instance ( Eq point, Eq (Vector d r) + , d ~ Dimension point, r ~ NumType point) => Eq (HalfLine point) -instance ( Show point, Show r, d ~ Dimension point, r ~ NumType point - , KnownNat d, Has_ Additive_ d r - ) => Show (HalfLine point) where - showsPrec :: Int -> HalfLine point -> ShowS -showsPrec Int -k (HalfLine point -p Vector (Dimension point) (NumType point) -v) = Bool -> ShowS -> ShowS +instance ( Show point, Show r, d ~ Dimension point, r ~ NumType point + , KnownNat d, Has_ Additive_ d r + ) => Show (HalfLine point) where + showsPrec :: Int -> HalfLine point -> ShowS +showsPrec Int +k (HalfLine point +p Vector (Dimension point) (NumType point) +v) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int appPrec) (ShowS -> ShowS) -> ShowS -> ShowS @@ -68,7 +68,7 @@ forall a. Num a => a -> a -> a +Int 1) point -p +p ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -84,7 +84,7 @@ +Int 1) Vector d r Vector (Dimension point) (NumType point) -v +v -- instance ( Show r, KnownNat d, Has_ Additive_ d r -- ) => Show (HalfLine d r) where @@ -94,11 +94,11 @@ appPrec = Int 10 -instance ( Read r, Read point, Has_ Additive_ d r, KnownNat d - , d ~ Dimension point, r ~ NumType point - ) => Read (HalfLine point) where - readPrec :: ReadPrec (HalfLine point) -readPrec = ReadPrec (HalfLine point) -> ReadPrec (HalfLine point) +instance ( Read r, Read point, Has_ Additive_ d r, KnownNat d + , d ~ Dimension point, r ~ NumType point + ) => Read (HalfLine point) where + readPrec :: ReadPrec (HalfLine point) +readPrec = ReadPrec (HalfLine point) -> ReadPrec (HalfLine point) forall a. ReadPrec a -> ReadPrec a parens (Int -> ReadPrec (HalfLine point) -> ReadPrec (HalfLine point) forall a. Int -> ReadPrec a -> ReadPrec a @@ -110,14 +110,14 @@ Ident String "HalfLine" <- ReadPrec Lexeme lexP - point -p <- ReadPrec point -> ReadPrec point + point +p <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a readPrec - Vector d r -v <- ReadPrec (Vector d r) -> ReadPrec (Vector d r) + Vector d r +v <- ReadPrec (Vector d r) -> ReadPrec (Vector d r) forall a. ReadPrec a -> ReadPrec a step ReadPrec (Vector d r) forall a. Read a => ReadPrec a @@ -129,63 +129,63 @@ forall point. point -> Vector (Dimension point) (NumType point) -> HalfLine point HalfLine point -p Vector d r +p Vector d r Vector (Dimension point) (NumType point) -v)) +v)) -instance HasStart (HalfLine point) point where - start :: Lens' (HalfLine point) point -start = (HalfLine point -> point) +instance HasStart (HalfLine point) point where + start :: Lens' (HalfLine point) point +start = (HalfLine point -> point) -> (HalfLine point -> point -> HalfLine point) -> Lens' (HalfLine point) point forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(HalfLine point -p Vector (Dimension point) (NumType point) +lens (\(HalfLine point +p Vector (Dimension point) (NumType point) _) -> point -p) (\(HalfLine point -_ Vector (Dimension point) (NumType point) -v) point -p -> point -> Vector (Dimension point) (NumType point) -> HalfLine point +p) (\(HalfLine point +_ Vector (Dimension point) (NumType point) +v) point +p -> point -> Vector (Dimension point) (NumType point) -> HalfLine point forall point. point -> Vector (Dimension point) (NumType point) -> HalfLine point HalfLine point -p Vector (Dimension point) (NumType point) -v) +p Vector (Dimension point) (NumType point) +v) {-# INLINE start #-} -instance HasDirection (HalfLine point) where - direction :: forall (d :: Nat) r. +instance HasDirection (HalfLine point) where + direction :: forall (d :: Nat) r. (Dimension (HalfLine point) ~ d, NumType (HalfLine point) ~ r) => Lens' (HalfLine point) (Vector d r) -direction = (HalfLine point -> Vector d r) +direction = (HalfLine point -> Vector d r) -> (HalfLine point -> Vector d r -> HalfLine point) -> Lens (HalfLine point) (HalfLine point) (Vector d r) (Vector d r) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(HalfLine point -_ Vector (Dimension point) (NumType point) -v) -> Vector d r +_ Vector (Dimension point) (NumType point) +v) -> Vector d r Vector (Dimension point) (NumType point) -v) (\(HalfLine point -p Vector (Dimension point) (NumType point) -_) Vector d r -v -> point -> Vector (Dimension point) (NumType point) -> HalfLine point +v) (\(HalfLine point +p Vector (Dimension point) (NumType point) +_) Vector d r +v -> point -> Vector (Dimension point) (NumType point) -> HalfLine point forall point. point -> Vector (Dimension point) (NumType point) -> HalfLine point HalfLine point -p Vector d r +p Vector d r Vector (Dimension point) (NumType point) -v) +v) {-# INLINE direction #-} -instance Point_ point d r => HasSupportingLine (HalfLine point) where - supportingLine :: HalfLine point +instance Point_ point d r => HasSupportingLine (HalfLine point) where + supportingLine :: HalfLine point -> LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -supportingLine (HalfLine point -p Vector (Dimension point) (NumType point) -v) = Point d r -> Vector d r -> LinePV d r +supportingLine (HalfLine point +p Vector (Dimension point) (NumType point) +v) = Point d r -> Vector d r -> LinePV d r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point -ppoint -> Getting (Point d r) point (Point d r) -> Point d r +ppoint -> Getting (Point d r) point (Point d r) -> Point d r forall s a. s -> Getting a s a -> a ^.Getting (Point d r) point (Point d r) forall point (d :: Nat) r. @@ -194,70 +194,70 @@ Lens' point (Point d r) asPoint) Vector d r Vector (Dimension point) (NumType point) -v +v {-# INLINE supportingLine #-} -------------------------------------------------------------------------------- -instance (Ord r, Num r, Point_ point 2 r - ) => HasIntersectionWith (LinePV 2 r) (HalfLine point) where - l :: LinePV 2 r -l@(LinePV Point 2 r -_ Vector 2 r -u) intersects :: LinePV 2 r -> HalfLine point -> Bool -`intersects` (HalfLine point -q Vector (Dimension point) (NumType point) -w) = case point -q point -> LinePV 2 r -> SideTest +instance (Ord r, Num r, Point_ point 2 r + ) => HasIntersectionWith (LinePV 2 r) (HalfLine point) where + l :: LinePV 2 r +l@(LinePV Point 2 r +_ Vector 2 r +u) intersects :: LinePV 2 r -> HalfLine point -> Bool +`intersects` (HalfLine point +q Vector (Dimension point) (NumType point) +w) = case point +q point -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -l of +l of SideTest OnLine -> Bool True SideTest LeftSide -> (point -q point -> Vector 2 r -> point +q point -> Vector 2 r -> point forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector 2 r Vector (Dimension point) (NumType point) -w) point -> LinePV 2 r -> SideTest +w) point -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -l' SideTest -> SideTest -> Bool +l' SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest RightSide SideTest RightSide -> (point -q point -> Vector 2 r -> point +q point -> Vector 2 r -> point forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector 2 r Vector (Dimension point) (NumType point) -w) point -> LinePV 2 r -> SideTest +w) point -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -l' SideTest -> SideTest -> Bool +l' SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest LeftSide where - l' :: LinePV 2 r -l' = Point 2 r -> Vector 2 r -> LinePV 2 r + l' :: LinePV 2 r +l' = Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point -qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -265,7 +265,7 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) Vector 2 r -u +u -- we construct a line l' parallel to l that goes through the startPoint of our -- ray/halfline. -- @@ -273,14 +273,14 @@ -- up right of l'. Symmetrically, if the starting point was right of the ray, we must -- go left to intersect instead. -type instance Intersection (LinePV 2 r) (HalfLine point) = - Maybe (LineHalfLineIntersection (Point 2 r) (HalfLine point)) +type instance Intersection (LinePV 2 r) (HalfLine point) = + Maybe (LineHalfLineIntersection (Point 2 r) (HalfLine point)) -- | Data type representing the intersection of a Line and a HalfLine -data LineHalfLineIntersection point halfLine = - Line_x_HalfLine_Point point - | Line_x_HalfLine_HalfLine halfLine - deriving (Int -> LineHalfLineIntersection point halfLine -> ShowS +data LineHalfLineIntersection point halfLine = + Line_x_HalfLine_Point point + | Line_x_HalfLine_HalfLine halfLine + deriving (Int -> LineHalfLineIntersection point halfLine -> ShowS [LineHalfLineIntersection point halfLine] -> ShowS LineHalfLineIntersection point halfLine -> String (Int -> LineHalfLineIntersection point halfLine -> ShowS) @@ -310,7 +310,7 @@ (Show point, Show halfLine) => [LineHalfLineIntersection point halfLine] -> ShowS showList :: [LineHalfLineIntersection point halfLine] -> ShowS -Show,LineHalfLineIntersection point halfLine +Show,LineHalfLineIntersection point halfLine -> LineHalfLineIntersection point halfLine -> Bool (LineHalfLineIntersection point halfLine -> LineHalfLineIntersection point halfLine -> Bool) @@ -334,7 +334,7 @@ -> LineHalfLineIntersection point halfLine -> Bool /= :: LineHalfLineIntersection point halfLine -> LineHalfLineIntersection point halfLine -> Bool -Eq,ReadPrec [LineHalfLineIntersection point halfLine] +Eq,ReadPrec [LineHalfLineIntersection point halfLine] ReadPrec (LineHalfLineIntersection point halfLine) Int -> ReadS (LineHalfLineIntersection point halfLine) ReadS [LineHalfLineIntersection point halfLine] @@ -374,7 +374,7 @@ (Read point, Read halfLine) => ReadPrec [LineHalfLineIntersection point halfLine] readListPrec :: ReadPrec [LineHalfLineIntersection point halfLine] -Read,Eq (LineHalfLineIntersection point halfLine) +Read,Eq (LineHalfLineIntersection point halfLine) Eq (LineHalfLineIntersection point halfLine) => (LineHalfLineIntersection point halfLine -> LineHalfLineIntersection point halfLine -> Ordering) @@ -472,7 +472,7 @@ min :: LineHalfLineIntersection point halfLine -> LineHalfLineIntersection point halfLine -> LineHalfLineIntersection point halfLine -Ord,(forall x. +Ord,(forall x. LineHalfLineIntersection point halfLine -> Rep (LineHalfLineIntersection point halfLine) x) -> (forall x. @@ -505,7 +505,7 @@ to :: forall x. Rep (LineHalfLineIntersection point halfLine) x -> LineHalfLineIntersection point halfLine -Generic,(forall a b. +Generic,(forall a b. (a -> b) -> LineHalfLineIntersection point a -> LineHalfLineIntersection point b) @@ -552,28 +552,28 @@ Functor) -instance ( Ord r, Fractional r, Point_ point 2 r - ) => IsIntersectableWith (LinePV 2 r) (HalfLine point) where - LinePV 2 r -l intersect :: LinePV 2 r +instance ( Ord r, Fractional r, Point_ point 2 r + ) => IsIntersectableWith (LinePV 2 r) (HalfLine point) where + LinePV 2 r +l intersect :: LinePV 2 r -> HalfLine point -> Intersection (LinePV 2 r) (HalfLine point) -`intersect` HalfLine point -hl = LinePV 2 r +`intersect` HalfLine point +hl = LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m LinePV 2 r -> LinePV 2 r -> Intersection (LinePV 2 r) (LinePV 2 r) +m LinePV 2 r -> LinePV 2 r -> Intersection (LinePV 2 r) (LinePV 2 r) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` LinePV 2 r -l Maybe (LineLineIntersectionG r (LinePV 2 r)) +l Maybe (LineLineIntersectionG r (LinePV 2 r)) -> (LineLineIntersectionG r (LinePV 2 r) -> Maybe (LineHalfLineIntersection (Point 2 r) (HalfLine point))) -> Maybe (LineHalfLineIntersection (Point 2 r) (HalfLine point)) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Line_x_Line_Point Point 2 r -p + Line_x_Line_Point Point 2 r +p | Point 2 r -p Point 2 r -> LinePV 2 r -> SideTest +p Point 2 r -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest @@ -581,7 +581,7 @@ forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m SideTest -> SideTest -> Bool +m SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest LeftSide -> LineHalfLineIntersection (Point 2 r) (HalfLine point) @@ -596,7 +596,7 @@ forall point halfLine. point -> LineHalfLineIntersection point halfLine Line_x_HalfLine_Point Point 2 r -p +p | Bool otherwise -> Maybe (LineHalfLineIntersection (Point 2 r) (HalfLine point)) forall a. Maybe a @@ -615,47 +615,47 @@ forall point halfLine. halfLine -> LineHalfLineIntersection point halfLine Line_x_HalfLine_HalfLine HalfLine point -hl +hl where - m :: LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m = HalfLine point + m :: LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) +m = HalfLine point -> LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) forall t. HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine HalfLine point -hl +hl -- the left side is suposedly the halfplane containing the halfLine -------------------------------------------------------------------------------- -instance ( Point_ point d r - , Has_ Metric_ d r - , Ord r, Fractional r - , MkHyperPlaneConstraints d r - ) => HasSquaredEuclideanDistance (HalfLine point) where - pointClosestTo :: forall r (d :: Nat) point. +instance ( Point_ point d r + , Has_ Metric_ d r + , Ord r, Fractional r + , MkHyperPlaneConstraints d r + ) => HasSquaredEuclideanDistance (HalfLine point) where + pointClosestTo :: forall r (d :: Nat) point. (r ~ NumType (HalfLine point), d ~ Dimension (HalfLine point), Num r, Point_ point d r) => point -> HalfLine point -> Point d r -pointClosestTo point -q hl :: HalfLine point -hl@(HalfLine point -p Vector (Dimension point) (NumType point) -v) +pointClosestTo point +q hl :: HalfLine point +hl@(HalfLine point +p Vector (Dimension point) (NumType point) +v) | Point d r -r Point d r -> HalfSpace d r -> Bool +r Point d r -> HalfSpace d r -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` HalfSpace d r -h = Point d r -r +h = Point d r +r | Bool otherwise = Point d r -p' +p' where - p' :: Point d r -p' = point -ppoint -> Getting (Point d r) point (Point d r) -> Point d r + p' :: Point d r +p' = point +ppoint -> Getting (Point d r) point (Point d r) -> Point d r forall s a. s -> Getting a s a -> a ^.Getting (Point d r) point (Point d r) forall point (d :: Nat) r. @@ -663,8 +663,8 @@ Lens' point (Point d r) Lens' point (Point d r) asPoint - r :: Point d r -r = point -> LinePV d r -> Point d r + r :: Point d r +r = point -> LinePV d r -> Point d r forall g r (d :: Nat) point. (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) => @@ -674,15 +674,15 @@ Point_ point d r) => point -> LinePV d r -> Point d r pointClosestTo point -q (HalfLine point +q (HalfLine point -> LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) forall t. HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine HalfLine point -hl) - h :: HalfSpace d r -h = Sign -> HyperPlane d r -> HalfSpace d r +hl) + h :: HalfSpace d r +h = Sign -> HyperPlane d r -> HalfSpace d r forall boundingHyperPlane. Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane HalfSpace Sign @@ -695,9 +695,9 @@ Num r) => point -> Vector d r -> hyperPlane fromPointAndNormal Point d r -p' Vector d r +p' Vector d r Vector (Dimension point) (NumType point) -v) :: HalfSpace d r +v) :: HalfSpace d r -- main idea: compute the point closest to the supporting line of the halfline. if this -- point lies in the halfspace h defined by the ray (e.g. for which the ray is the -- normal), then we've actually found the point closest to the ray. Otherwise the origin @@ -711,21 +711,21 @@ -- -- >>> halfLineThrough (Point2 5 10) (Point2 10 30 :: Point 2 Int) -- HalfLine (Point2 5 10) (Vector2 5 20) -halfLineThrough :: (Point_ point d r, Num r) => point -> point -> HalfLine point +halfLineThrough :: (Point_ point d r, Num r) => point -> point -> HalfLine point halfLineThrough :: forall point (d :: Nat) r. (Point_ point d r, Num r) => point -> point -> HalfLine point -halfLineThrough point -p point -q = point -> Vector (Dimension point) (NumType point) -> HalfLine point +halfLineThrough point +p point +q = point -> Vector (Dimension point) (NumType point) -> HalfLine point forall point. point -> Vector (Dimension point) (NumType point) -> HalfLine point HalfLine point -p (point -q point -> point -> Vector d r +p (point +q point -> point -> Vector d r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -p) +p)
\ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.Class.html index e9328598b..f17d0a6b9 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.Class.html @@ -21,22 +21,22 @@
-------------------------------------------------------------------------------- -- | Types modelling halfspaces. -class ( HyperPlane_ (BoundingHyperPlane halfSpace d r) d r - , Dimension halfSpace ~ d, Dimension (BoundingHyperPlane halfSpace d r) ~ d - , NumType halfSpace ~ r, NumType (BoundingHyperPlane halfSpace d r) ~ r +class ( HyperPlane_ (BoundingHyperPlane halfSpace d r) d r + , Dimension halfSpace ~ d, Dimension (BoundingHyperPlane halfSpace d r) ~ d + , NumType halfSpace ~ r, NumType (BoundingHyperPlane halfSpace d r) ~ r ) - => HalfSpace_ halfSpace d r | halfSpace -> d, - halfSpace -> r where - type BoundingHyperPlane halfSpace d r + => HalfSpace_ halfSpace d r | halfSpace -> d, + halfSpace -> r where + type BoundingHyperPlane halfSpace d r -- | Access the bounding hyperplane - boundingHyperPlane :: Lens' halfSpace (BoundingHyperPlane halfSpace d r) + boundingHyperPlane :: Lens' halfSpace (BoundingHyperPlane halfSpace d r) -- | Lens to access the sign of the halfspace. - halfSpaceSign :: Lens' halfSpace Sign + halfSpaceSign :: Lens' halfSpace Sign -- | Type synonym for halfplanes in R^2 -type HalfPlane_ halfPlane r = HalfSpace_ halfPlane 2 r +type HalfPlane_ halfPlane r = HalfSpace_ halfPlane 2 r -- class Line_ (BoundingLine halfPlane r) 2 r diff --git a/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.html b/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.html index 6ad587d67..8a088cd80 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.HalfSpace.html @@ -33,9 +33,9 @@ -- positive value. -- -- Half spaces include their bounding hyperplane. -data HalfSpaceF boundingHyperPlane = - HalfSpace {-# UNPACK #-} !Sign boundingHyperPlane - deriving (Int -> HalfSpaceF boundingHyperPlane -> ShowS +data HalfSpaceF boundingHyperPlane = + HalfSpace {-# UNPACK #-} !Sign boundingHyperPlane + deriving (Int -> HalfSpaceF boundingHyperPlane -> ShowS [HalfSpaceF boundingHyperPlane] -> ShowS HalfSpaceF boundingHyperPlane -> String (Int -> HalfSpaceF boundingHyperPlane -> ShowS) @@ -65,7 +65,7 @@ Show boundingHyperPlane => [HalfSpaceF boundingHyperPlane] -> ShowS showList :: [HalfSpaceF boundingHyperPlane] -> ShowS -Show,HalfSpaceF boundingHyperPlane +Show,HalfSpaceF boundingHyperPlane -> HalfSpaceF boundingHyperPlane -> Bool (HalfSpaceF boundingHyperPlane -> HalfSpaceF boundingHyperPlane -> Bool) @@ -89,7 +89,7 @@ -> HalfSpaceF boundingHyperPlane -> Bool /= :: HalfSpaceF boundingHyperPlane -> HalfSpaceF boundingHyperPlane -> Bool -Eq,Eq (HalfSpaceF boundingHyperPlane) +Eq,Eq (HalfSpaceF boundingHyperPlane) Eq (HalfSpaceF boundingHyperPlane) => (HalfSpaceF boundingHyperPlane -> HalfSpaceF boundingHyperPlane -> Ordering) @@ -179,7 +179,7 @@ -> HalfSpaceF boundingHyperPlane -> HalfSpaceF boundingHyperPlane min :: HalfSpaceF boundingHyperPlane -> HalfSpaceF boundingHyperPlane -> HalfSpaceF boundingHyperPlane -Ord,(forall a b. (a -> b) -> HalfSpaceF a -> HalfSpaceF b) +Ord,(forall a b. (a -> b) -> HalfSpaceF a -> HalfSpaceF b) -> (forall a b. a -> HalfSpaceF b -> HalfSpaceF a) -> Functor HalfSpaceF forall a b. a -> HalfSpaceF b -> HalfSpaceF a @@ -191,7 +191,7 @@ fmap :: forall a b. (a -> b) -> HalfSpaceF a -> HalfSpaceF b $c<$ :: forall a b. a -> HalfSpaceF b -> HalfSpaceF a <$ :: forall a b. a -> HalfSpaceF b -> HalfSpaceF a -Functor,(forall m. Monoid m => HalfSpaceF m -> m) +Functor,(forall m. Monoid m => HalfSpaceF m -> m) -> (forall m a. Monoid m => (a -> m) -> HalfSpaceF a -> m) -> (forall m a. Monoid m => (a -> m) -> HalfSpaceF a -> m) -> (forall a b. (a -> b -> b) -> b -> HalfSpaceF a -> b) @@ -273,7 +273,7 @@ sum :: forall a. Num a => HalfSpaceF a -> a $cproduct :: forall a. Num a => HalfSpaceF a -> a product :: forall a. Num a => HalfSpaceF a -> a -Foldable,Functor HalfSpaceF +Foldable,Functor HalfSpaceF Foldable HalfSpaceF (Functor HalfSpaceF, Foldable HalfSpaceF) => (forall (f :: * -> *) a b. @@ -338,33 +338,33 @@ HalfSpaceF (m a) -> m (HalfSpaceF a) Traversable) -instance ( HyperPlane_ boundingHyperPlane d r - ) => HalfSpace_ (HalfSpaceF boundingHyperPlane) d r where - type BoundingHyperPlane (HalfSpaceF boundingHyperPlane) d r = boundingHyperPlane +instance ( HyperPlane_ boundingHyperPlane d r + ) => HalfSpace_ (HalfSpaceF boundingHyperPlane) d r where + type BoundingHyperPlane (HalfSpaceF boundingHyperPlane) d r = boundingHyperPlane - halfSpaceSign :: Lens' (HalfSpaceF boundingHyperPlane) Sign -halfSpaceSign = (HalfSpaceF boundingHyperPlane -> Sign) + halfSpaceSign :: Lens' (HalfSpaceF boundingHyperPlane) Sign +halfSpaceSign = (HalfSpaceF boundingHyperPlane -> Sign) -> (HalfSpaceF boundingHyperPlane -> Sign -> HalfSpaceF boundingHyperPlane) -> Lens' (HalfSpaceF boundingHyperPlane) Sign forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(HalfSpace Sign -s boundingHyperPlane +lens (\(HalfSpace Sign +s boundingHyperPlane _) -> Sign -s) (\(HalfSpace Sign -_ boundingHyperPlane -h) Sign -s -> Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane +s) (\(HalfSpace Sign +_ boundingHyperPlane +h) Sign +s -> Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane forall boundingHyperPlane. Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane HalfSpace Sign -s boundingHyperPlane -h) +s boundingHyperPlane +h) {-# INLINE halfSpaceSign #-} - boundingHyperPlane :: Lens' + boundingHyperPlane :: Lens' (HalfSpaceF boundingHyperPlane) (BoundingHyperPlane (HalfSpaceF boundingHyperPlane) d r) -boundingHyperPlane = (boundingHyperPlane -> f boundingHyperPlane) +boundingHyperPlane = (boundingHyperPlane -> f boundingHyperPlane) -> HalfSpaceF boundingHyperPlane -> f (HalfSpaceF boundingHyperPlane) (BoundingHyperPlane (HalfSpaceF boundingHyperPlane) d r @@ -379,8 +379,8 @@ boundingHyperPlaneLens -- | Lens to access the hyperplane bounding the halfspace -boundingHyperPlaneLens :: Lens (HalfSpaceF boundingHyperPlane) (HalfSpaceF boundingHyperPlane') - boundingHyperPlane boundingHyperPlane' +boundingHyperPlaneLens :: Lens (HalfSpaceF boundingHyperPlane) (HalfSpaceF boundingHyperPlane') + boundingHyperPlane boundingHyperPlane' boundingHyperPlaneLens :: forall boundingHyperPlane boundingHyperPlane' (f :: * -> *). Functor f => (boundingHyperPlane -> f boundingHyperPlane') @@ -396,37 +396,37 @@ boundingHyperPlane' forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(HalfSpace Sign -_ boundingHyperPlane -h) -> boundingHyperPlane -h) (\(HalfSpace Sign -s boundingHyperPlane -_) boundingHyperPlane' -h -> Sign -> boundingHyperPlane' -> HalfSpaceF boundingHyperPlane' +_ boundingHyperPlane +h) -> boundingHyperPlane +h) (\(HalfSpace Sign +s boundingHyperPlane +_) boundingHyperPlane' +h -> Sign -> boundingHyperPlane' -> HalfSpaceF boundingHyperPlane' forall boundingHyperPlane. Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane HalfSpace Sign -s boundingHyperPlane' -h) +s boundingHyperPlane' +h) {-# INLINE boundingHyperPlaneLens #-} -- | Arbitrary halfspaces in r^d. -type HalfSpace d r = HalfSpaceF (HyperPlane d r) +type HalfSpace d r = HalfSpaceF (HyperPlane d r) -type instance Dimension (HalfSpaceF boundingHyperPlane) = Dimension boundingHyperPlane -type instance NumType (HalfSpaceF boundingHyperPlane) = NumType boundingHyperPlane +type instance Dimension (HalfSpaceF boundingHyperPlane) = Dimension boundingHyperPlane +type instance NumType (HalfSpaceF boundingHyperPlane) = NumType boundingHyperPlane -instance ( HyperPlane_ boudingHyperPlane d r, Ord r, Num r - , Has_ Additive_ d r - ) => HasIntersectionWith (Point d r) (HalfSpaceF boudingHyperPlane) where - Point d r -q intersects :: Point d r -> HalfSpaceF boudingHyperPlane -> Bool -`intersects` (HalfSpace Sign -s boudingHyperPlane -h) = case Sign -s of +instance ( HyperPlane_ boudingHyperPlane d r, Ord r, Num r + , Has_ Additive_ d r + ) => HasIntersectionWith (Point d r) (HalfSpaceF boudingHyperPlane) where + Point d r +q intersects :: Point d r -> HalfSpaceF boudingHyperPlane -> Bool +`intersects` (HalfSpace Sign +s boudingHyperPlane +h) = case Sign +s of Sign Positive -> Point d r -q Point d r -> boudingHyperPlane -> Ordering +q Point d r -> boudingHyperPlane -> Ordering forall point. (Point_ point d r, Ord r, Num r) => point -> boudingHyperPlane -> Ordering @@ -434,13 +434,13 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering `onSideTest` boudingHyperPlane -h Ordering -> Ordering -> Bool +h Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool /= Ordering LT Sign Negative -> Point d r -q Point d r -> boudingHyperPlane -> Ordering +q Point d r -> boudingHyperPlane -> Ordering forall point. (Point_ point d r, Ord r, Num r) => point -> boudingHyperPlane -> Ordering @@ -448,30 +448,30 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering `onSideTest` boudingHyperPlane -h Ordering -> Ordering -> Bool +h Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool /= Ordering GT -type instance Intersection (Point d r) (HalfSpaceF boudingHyperPlane) = Maybe (Point d r) +type instance Intersection (Point d r) (HalfSpaceF boudingHyperPlane) = Maybe (Point d r) -instance ( HyperPlane_ boudingHyperPlane d r, Ord r, Num r - , Has_ Additive_ d r - ) => IsIntersectableWith (Point d r) (HalfSpaceF boudingHyperPlane) where - Point d r -q intersect :: Point d r +instance ( HyperPlane_ boudingHyperPlane d r, Ord r, Num r + , Has_ Additive_ d r + ) => IsIntersectableWith (Point d r) (HalfSpaceF boudingHyperPlane) where + Point d r +q intersect :: Point d r -> HalfSpaceF boudingHyperPlane -> Intersection (Point d r) (HalfSpaceF boudingHyperPlane) -`intersect` HalfSpaceF boudingHyperPlane -h +`intersect` HalfSpaceF boudingHyperPlane +h | Point d r -q Point d r -> HalfSpaceF boudingHyperPlane -> Bool +q Point d r -> HalfSpaceF boudingHyperPlane -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` HalfSpaceF boudingHyperPlane -h = Point d r -> Maybe (Point d r) +h = Point d r -> Maybe (Point d r) forall a. a -> Maybe a Just Point d r -q +q | Bool otherwise = Maybe (Point d r) Intersection (Point d r) (HalfSpaceF boudingHyperPlane) diff --git a/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Class.html index b468c1bde..6c2671517 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Class.html @@ -65,13 +65,13 @@ -- | A class to represent hyperplanes in d-dimensional space. -class ( NumType hyperPlane ~ r - , Dimension hyperPlane ~ d - , Has_ Vector_ d r - , Has_ Vector_ (1+d) r +class ( NumType hyperPlane ~ r + , Dimension hyperPlane ~ d + , Has_ Vector_ d r + , Has_ Vector_ (1+d) r -- , NumType (EquationFor hyperPlane) ~ r - ) => HyperPlane_ hyperPlane d r | hyperPlane -> d - , hyperPlane -> r where + ) => HyperPlane_ hyperPlane d r | hyperPlane -> d + , hyperPlane -> r where -- {-# MINIMAL hyperPlaneTrough #-} -- | Evalute the expression \(a_0 + \sum_i=1^d a_i*p_i \) at the given point. @@ -79,17 +79,17 @@ -- -- >>> evalHyperPlaneEquation myLine (Point2 5 10) -- -3.0 - evalHyperPlaneEquation :: (Num r, Point_ point d r) => hyperPlane -> point -> r - default evalHyperPlaneEquation :: (Num r, Point_ point d r, Has_ Metric_ (d+1) r) - => hyperPlane -> point -> r - evalHyperPlaneEquation hyperPlane -h point -p = hyperPlane -> Vector (d + 1) r + evalHyperPlaneEquation :: (Num r, Point_ point d r) => hyperPlane -> point -> r + default evalHyperPlaneEquation :: (Num r, Point_ point d r, Has_ Metric_ (d+1) r) + => hyperPlane -> point -> r + evalHyperPlaneEquation hyperPlane +h point +p = hyperPlane -> Vector (d + 1) r forall hyperPlane (d :: Natural) r. (HyperPlane_ hyperPlane d r, Num r) => hyperPlane -> Vector (d + 1) r hyperPlaneEquation hyperPlane -h Vector (d + 1) r -> Vector (d + 1) r -> r +h Vector (d + 1) r -> Vector (d + 1) r -> r forall vector (d :: Natural) r. (Metric_ vector d r, Num r) => vector -> vector -> r @@ -101,7 +101,7 @@ 1 (Vector d r -> Vector (d + 1) r) -> Vector d r -> Vector (d + 1) r forall a b. (a -> b) -> a -> b $ point -ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r +ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) point (Vector d r) forall (d :: Natural) r s. @@ -136,25 +136,25 @@ -- -- so for example myLineAsNV actually a line with slope 1 through the point (0,2) -- - hyperPlaneEquation :: ( Num r - ) => hyperPlane -> Vector (d+1) r - default hyperPlaneEquation :: ( NonVerticalHyperPlane_ hyperPlane d r - , Num r - , 1 <= d + hyperPlaneEquation :: ( Num r + ) => hyperPlane -> Vector (d+1) r + default hyperPlaneEquation :: ( NonVerticalHyperPlane_ hyperPlane d r + , Num r + , 1 <= d ) - => hyperPlane -> Vector (d+1) r - hyperPlaneEquation hyperPlane -h = r -> Vector d r -> Vector (d + 1) r + => hyperPlane -> Vector (d+1) r + hyperPlaneEquation hyperPlane +h = r -> Vector d r -> Vector (d + 1) r forall vector' vector (d :: Natural) r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => r -> vector -> vector' cons r -a0 Vector d r -a +a0 Vector d r +a where - a' :: Vector d r -a' = hyperPlane -hhyperPlane + a' :: Vector d r +a' = hyperPlane +hhyperPlane -> Getting (Vector d r) hyperPlane (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) hyperPlane (Vector d r) @@ -163,9 +163,9 @@ Lens' hyperPlane (Vector d r) Lens' hyperPlane (Vector d r) hyperPlaneCoefficients - a :: Vector d r -a = Vector d r -a'Vector d r -> (Vector d r -> Vector d r) -> Vector d r + a :: Vector d r +a = Vector d r +a'Vector d r -> (Vector d r -> Vector d r) -> Vector d r forall a b. a -> (a -> b) -> b &(r -> Identity r) -> Vector d r -> Identity (Vector d r) forall vector (d :: Natural) r. @@ -177,9 +177,9 @@ forall s t a b. ASetter s t a b -> b -> s -> t .~ -r 1 - a0 :: r -a0 = Vector d r -a'Vector d r -> Getting r (Vector d r) r -> r + a0 :: r +a0 = Vector d r +a'Vector d r -> Getting r (Vector d r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Vector d r) r forall vector (d :: Natural) r. @@ -197,11 +197,11 @@ -- Vector2 1.0 (-0.0) -- >>> normalVector myLine -- Vector2 (-1.0) 1.0 - normalVector :: (Num r, Eq r, 1 <= d) => hyperPlane -> Vector d r - default normalVector :: (KnownNat d, Num r, Eq r, 1 <= d) - => hyperPlane -> Vector d r - normalVector hyperPlane -h = Vector d r -> Vector d r + normalVector :: (Num r, Eq r, 1 <= d) => hyperPlane -> Vector d r + default normalVector :: (KnownNat d, Num r, Eq r, 1 <= d) + => hyperPlane -> Vector d r + normalVector hyperPlane +h = Vector d r -> Vector d r forall r vector (d :: Natural). (Num r, Vector_ vector d r) => vector -> vector @@ -221,7 +221,7 @@ (HyperPlane_ hyperPlane d r, Num r) => hyperPlane -> Vector (d + 1) r hyperPlaneEquation hyperPlane -h +h {-# INLINE normalVector #-} -- https://en.wikipedia.org/wiki/Normal_(geometry)#Hypersurfaces_in_n-dimensional_space -- states that: if the hyperplane is defined as the solution set of a single linear equation @@ -244,12 +244,12 @@ -- True -- >>> Point2 1 5 `onHyperPlane` myLineAsNV -- False - onHyperPlane :: (Point_ point d r, Eq r, Num r) => point -> hyperPlane -> Bool - default onHyperPlane :: ( Point_ point d r, Eq r, Num r - ) => point -> hyperPlane -> Bool - point -q `onHyperPlane` hyperPlane -h = (r -> r -> Bool + onHyperPlane :: (Point_ point d r, Eq r, Num r) => point -> hyperPlane -> Bool + default onHyperPlane :: ( Point_ point d r, Eq r, Num r + ) => point -> hyperPlane -> Bool + point +q `onHyperPlane` hyperPlane +h = (r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0) (r -> Bool) -> r -> Bool @@ -260,8 +260,8 @@ (HyperPlane_ hyperPlane d r, Num r, Point_ point d r) => hyperPlane -> point -> r evalHyperPlaneEquation hyperPlane -h point -q +h point +q {-# INLINE onHyperPlane #-} -- | Test if a point lies on a hyperplane. Returns the sign when evaluating the @@ -293,10 +293,10 @@ -- EQ -- >>> Point2 1 (-4) `onSideTest` myOtherLine -- GT - onSideTest :: (Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering - onSideTest point -q hyperPlane -h = r + onSideTest :: (Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering + onSideTest point +q hyperPlane +h = r 0 r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` hyperPlane -> point -> r @@ -305,25 +305,25 @@ (HyperPlane_ hyperPlane d r, Num r, Point_ point d r) => hyperPlane -> point -> r evalHyperPlaneEquation hyperPlane -h point -q +h point +q {-# INLINE onSideTest #-} -- | Produce a point that lies on the hyperplane. No gurantees are given about which point -- -- >>> pointOn myLine -- Point2 (-2.0) 0.0 -pointOn :: forall hyperPlane d r. - ( HyperPlane_ hyperPlane d r, Eq r, Fractional r, Has_ Additive_ d r - , FoldableWithIndex Int (Vector d) +pointOn :: forall hyperPlane d r. + ( HyperPlane_ hyperPlane d r, Eq r, Fractional r, Has_ Additive_ d r + , FoldableWithIndex Int (Vector d) ) - => hyperPlane -> Point d r + => hyperPlane -> Point d r pointOn :: forall hyperPlane (d :: Natural) r. (HyperPlane_ hyperPlane d r, Eq r, Fractional r, Has_ Additive_ d r, FoldableWithIndex Int (Vector d)) => hyperPlane -> Point d r -pointOn hyperPlane -h = case Vector (d + 1) r -> (r, Vector d r) +pointOn hyperPlane +h = case Vector (d + 1) r -> (r, Vector d r) forall vector' vector (d :: Natural) r. (Vector_ vector (d + 1) r, Vector_ vector' d r, 0 <= ((d + 1) - 1), d <= Dimension vector) => @@ -336,7 +336,7 @@ (HyperPlane_ hyperPlane d r, Num r) => hyperPlane -> Vector (d + 1) r hyperPlaneEquation hyperPlane -h of +h of (r 0, Vector d r _) -> Point d r @@ -344,9 +344,9 @@ (Num r, ConstructablePoint_ point d r) => point origin - (r -a0, Vector d r -a) -> case (Int -> r -> Bool) -> Vector d r -> Maybe (Int, r) + (r +a0, Vector d r +a) -> case (Int -> r -> Bool) -> Vector d r -> Maybe (Int, r) forall i (f :: * -> *) a. FoldableWithIndex i f => (i -> a -> Bool) -> f a -> Maybe (i, a) @@ -356,20 +356,20 @@ forall a. Eq a => a -> a -> Bool /= r 0)) (Vector d r -a :: Vector d r) of +a :: Vector d r) of Maybe (Int, r) Nothing -> [Char] -> Point d r forall a. HasCallStack => [Char] -> a error [Char] "pointOn: Invalid hyperplane" - Just (Int -i,r -ai) -> + Just (Int +i,r +ai) -> (Point d r forall point (d :: Natural) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point d r)Point d r -> (Point d r -> Point d r) -> Point d r +origin :: Point d r)Point d r -> (Point d r -> Point d r) -> Point d r forall a b. a -> (a -> b) -> b &(Vector d r -> Identity (Vector d r)) -> Point d r -> Identity (Point d r) @@ -394,16 +394,16 @@ Vector_ vector d r => Int -> IndexedTraversal' Int vector r component' Int -i ((r -> Identity r) -> Point d r -> Identity (Point d r)) +i ((r -> Identity r) -> Point d r -> Identity (Point d r)) -> r -> Point d r -> Point d r forall s t a b. ASetter s t a b -> b -> s -> t .~ ((r -> r forall a. Num a => a -> a negate r -a0) r -> r -> r +a0) r -> r -> r forall a. Fractional a => a -> a -> a / r -ai) +ai) -- We are trying to find a point p so that a0 + sum_{i=1}^d ai*pi = 0, -- in other words, so that -- @@ -418,12 +418,12 @@ -- | Class representing hyperplanes with methods to construct the -- hyperplane. -class HyperPlane_ hyperPlane d r - => ConstructableHyperPlane_ hyperPlane d r where +class HyperPlane_ hyperPlane d r + => ConstructableHyperPlane_ hyperPlane d r where -- | Additional constraints for constructing a hyperplane from its equation. - type HyperPlaneFromEquationConstraint hyperPlane d r :: Constraint - type HyperPlaneFromEquationConstraint hyperPlane d r = () + type HyperPlaneFromEquationConstraint hyperPlane d r :: Constraint + type HyperPlaneFromEquationConstraint hyperPlane d r = () -- | Given the coefficients \(a_0,..,a_d\) of the equation, i.e. -- so that @@ -439,8 +439,8 @@ -- -- >>> myOtherLine == hyperPlaneFromEquation (Vector3 4 3 2) -- True - hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint hyperPlane d r - => Vector (d+1) r -> hyperPlane + hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint hyperPlane d r + => Vector (d+1) r -> hyperPlane -- | Construct a Hyperplane from a point and a normal. The normal points into the halfplane @@ -448,17 +448,17 @@ -- -- >>> myVerticalLine == fromPointAndNormal (Point2 5 30) (Vector2 1 0) -- True - fromPointAndNormal :: ( Point_ point d r, Num r) - => point -> Vector d r -> hyperPlane - default fromPointAndNormal :: ( Point_ point d r, Num r - , ConstructableHyperPlane_ hyperPlane d r - , HyperPlaneFromEquationConstraint hyperPlane d r - , Has_ Metric_ d r + fromPointAndNormal :: ( Point_ point d r, Num r) + => point -> Vector d r -> hyperPlane + default fromPointAndNormal :: ( Point_ point d r, Num r + , ConstructableHyperPlane_ hyperPlane d r + , HyperPlaneFromEquationConstraint hyperPlane d r + , Has_ Metric_ d r ) - => point -> Vector d r -> hyperPlane - fromPointAndNormal point -q Vector d r -n = Vector (d + 1) r -> hyperPlane + => point -> Vector d r -> hyperPlane + fromPointAndNormal point +q Vector d r +n = Vector (d + 1) r -> hyperPlane forall hyperPlane (d :: Natural) r. (ConstructableHyperPlane_ hyperPlane d r, HyperPlaneFromEquationConstraint hyperPlane d r) => @@ -470,16 +470,16 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => r -> vector -> vector' cons r -a0 (Vector d r -> Vector d r +a0 (Vector d r -> Vector d r forall r vector (d :: Natural). (Num r, Vector_ vector d r) => vector -> vector negated Vector d r -n) +n) where - a0 :: r -a0 = (point -qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r + a0 :: r +a0 = (point +qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) point (Vector d r) forall (d :: Natural) r s. @@ -496,7 +496,7 @@ (Metric_ vector d r, Num r) => vector -> vector -> r `dot` Vector d r -n +n {-# INLINE fromPointAndNormal #-} @@ -507,7 +507,7 @@ -------------------------------------------------------------------------------- -- | Non-vertical hyperplanes. -class HyperPlane_ hyperPlane d r => NonVerticalHyperPlane_ hyperPlane d r where +class HyperPlane_ hyperPlane d r => NonVerticalHyperPlane_ hyperPlane d r where {-# MINIMAL hyperPlaneCoefficients #-} -- | Get the coordinate in dimension \(d\) of the hyperplane at the given position. @@ -518,20 +518,20 @@ -- 12.0 -- >>> evalAt (Point1 5) <$> asNonVerticalHyperPlane myOtherLine -- Just (-9.5) - evalAt :: ( Num r - , 1 <= d - , Point_ point (d-1) r - ) => point -> hyperPlane -> r - default evalAt :: ( Num r - , 1 <= d - , Point_ point (d-1) r - , 1 + (d-1) ~ d -- silly silly agian :( - , Has_ Metric_ d r - ) => point -> hyperPlane -> r - evalAt point -p hyperPlane -h = (hyperPlane -hhyperPlane + evalAt :: ( Num r + , 1 <= d + , Point_ point (d-1) r + ) => point -> hyperPlane -> r + default evalAt :: ( Num r + , 1 <= d + , Point_ point (d-1) r + , 1 + (d-1) ~ d -- silly silly agian :( + , Has_ Metric_ d r + ) => point -> hyperPlane -> r + evalAt point +p hyperPlane +h = (hyperPlane +hhyperPlane -> Getting (Vector d r) hyperPlane (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) hyperPlane (Vector d r) @@ -548,7 +548,7 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' snoc (point -ppoint +ppoint -> Getting (Vector (Dimension point) r) point (Vector (Dimension point) r) -> Vector (Dimension point) r @@ -587,7 +587,7 @@ -- Vector3 1 2 3 -- >>> asNonVerticalHyperPlane myOtherLine ^?_Just.hyperPlaneCoefficients -- Just (Vector2 (-1.5) (-2.0)) - hyperPlaneCoefficients :: Lens' hyperPlane (Vector d r) + hyperPlaneCoefficients :: Lens' hyperPlane (Vector d r) -- | Test if a point q lies above a non-vertical hyperplane h (i.e. verticalSideTest q h -- == GT), on the hyperplane (== EQ), or below (LT). @@ -609,19 +609,19 @@ -- EQ -- >>> Point2 1 (-4) `verticalSideTest` myOtherNVLine -- LT - verticalSideTest :: (1 <= d, Point_ point d r, Ord r, Num r) - => point -> hyperPlane -> Ordering - default verticalSideTest :: ( Point_ point d r - , Num r, Ord r - , 1 <= d - , 1 + (d-1) ~ d -- silly silly agian :( - , Has_ Metric_ d r - , Has_ Additive_ (d-1) r - ) => point -> hyperPlane -> Ordering - verticalSideTest point -q hyperPlane -h = (point -qpoint -> Getting r point r -> r + verticalSideTest :: (1 <= d, Point_ point d r, Ord r, Num r) + => point -> hyperPlane -> Ordering + default verticalSideTest :: ( Point_ point d r + , Num r, Ord r + , 1 <= d + , 1 + (d-1) ~ d -- silly silly agian :( + , Has_ Metric_ d r + , Has_ Additive_ (d-1) r + ) => point -> hyperPlane -> Ordering + verticalSideTest point +q hyperPlane +h = (point +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall point (d :: Natural) r. @@ -643,25 +643,25 @@ (Point_ point d r, i <= d, Has_ Vector_ i r) => point -> Point i r projectPoint point -q :: Point (d-1) r) hyperPlane -h +q :: Point (d-1) r) hyperPlane +h -------------------------------------------------------------------------------- -- * Functions on Hyperplanes -- | Test if two hyperplanes are parallel. -isParallelTo :: ( HyperPlane_ hyperPlane d r - , HyperPlane_ hyperPlane' d r - , Has_ Metric_ d r - , Num r, Eq r, 1 <= d - ) => hyperPlane -> hyperPlane' -> Bool +isParallelTo :: ( HyperPlane_ hyperPlane d r + , HyperPlane_ hyperPlane' d r + , Has_ Metric_ d r + , Num r, Eq r, 1 <= d + ) => hyperPlane -> hyperPlane' -> Bool isParallelTo :: forall hyperPlane (d :: Natural) r hyperPlane'. (HyperPlane_ hyperPlane d r, HyperPlane_ hyperPlane' d r, Has_ Metric_ d r, Num r, Eq r, 1 <= d) => hyperPlane -> hyperPlane' -> Bool -isParallelTo hyperPlane -h1 hyperPlane' -h2 = Vector d r -> Vector d r -> Bool +isParallelTo hyperPlane +h1 hyperPlane' +h2 = Vector d r -> Vector d r -> Bool forall r vector (d :: Natural). (Eq r, Num r, Metric_ vector d r) => vector -> vector -> Bool @@ -670,36 +670,36 @@ (HyperPlane_ hyperPlane d r, Num r, Eq r, 1 <= d) => hyperPlane -> Vector d r normalVector hyperPlane -h1) (hyperPlane' -> Vector d r +h1) (hyperPlane' -> Vector d r forall hyperPlane (d :: Natural) r. (HyperPlane_ hyperPlane d r, Num r, Eq r, 1 <= d) => hyperPlane -> Vector d r normalVector hyperPlane' -h2) +h2) -- | Class that tells us we can construct a hyperplane from a vector -- of points. -class HyperPlaneFromPoints hyperPlane where +class HyperPlaneFromPoints hyperPlane where -- | Construct a hyperplane through the given d points. - hyperPlaneThrough :: ( Point_ point d r - , HyperPlane_ hyperPlane d r - , Num r - ) => Vector d point -> hyperPlane + hyperPlaneThrough :: ( Point_ point d r + , HyperPlane_ hyperPlane d r + , Num r + ) => Vector d point -> hyperPlane -instance (HyperPlane_ hyperPlane d r) - => HyperPlane_ (hyperPlane :+ extra) d r where - evalHyperPlaneEquation :: forall point. +instance (HyperPlane_ hyperPlane d r) + => HyperPlane_ (hyperPlane :+ extra) d r where + evalHyperPlaneEquation :: forall point. (Num r, Point_ point d r) => (hyperPlane :+ extra) -> point -> r -evalHyperPlaneEquation hyperPlane :+ extra -h = hyperPlane -> point -> r +evalHyperPlaneEquation hyperPlane :+ extra +h = hyperPlane -> point -> r forall point. (Num r, Point_ point d r) => hyperPlane -> point -> r forall hyperPlane (d :: Natural) r point. (HyperPlane_ hyperPlane d r, Num r, Point_ point d r) => hyperPlane -> point -> r evalHyperPlaneEquation (hyperPlane :+ extra -h(hyperPlane :+ extra) +h(hyperPlane :+ extra) -> Getting hyperPlane (hyperPlane :+ extra) hyperPlane -> hyperPlane forall s a. s -> Getting a s a -> a @@ -709,7 +709,7 @@ (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core) {-# INLINE evalHyperPlaneEquation #-} - hyperPlaneEquation :: Num r => (hyperPlane :+ extra) -> Vector (d + 1) r + hyperPlaneEquation :: Num r => (hyperPlane :+ extra) -> Vector (d + 1) r hyperPlaneEquation = hyperPlane -> Vector (d + 1) r forall hyperPlane (d :: Natural) r. (HyperPlane_ hyperPlane d r, Num r) => @@ -728,7 +728,7 @@ (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core {-# INLINE hyperPlaneEquation #-} - normalVector :: (Num r, Eq r, 1 <= d) => (hyperPlane :+ extra) -> Vector d r + normalVector :: (Num r, Eq r, 1 <= d) => (hyperPlane :+ extra) -> Vector d r normalVector = hyperPlane -> Vector d r forall hyperPlane (d :: Natural) r. (HyperPlane_ hyperPlane d r, Num r, Eq r, 1 <= d) => @@ -747,11 +747,11 @@ (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core {-# INLINE normalVector #-} - onHyperPlane :: forall point. + onHyperPlane :: forall point. (Point_ point d r, Eq r, Num r) => point -> (hyperPlane :+ extra) -> Bool -onHyperPlane point -q = point -> hyperPlane -> Bool +onHyperPlane point +q = point -> hyperPlane -> Bool forall point. (Point_ point d r, Eq r, Num r) => point -> hyperPlane -> Bool @@ -759,7 +759,7 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Eq r, Num r) => point -> hyperPlane -> Bool onHyperPlane point -q (hyperPlane -> Bool) +q (hyperPlane -> Bool) -> ((hyperPlane :+ extra) -> hyperPlane) -> (hyperPlane :+ extra) -> Bool @@ -773,11 +773,11 @@ (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core {-# INLINE onHyperPlane #-} - onSideTest :: forall point. + onSideTest :: forall point. (Point_ point d r, Ord r, Num r) => point -> (hyperPlane :+ extra) -> Ordering -onSideTest point -q = point -> hyperPlane -> Ordering +onSideTest point +q = point -> hyperPlane -> Ordering forall point. (Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering @@ -785,7 +785,7 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering onSideTest point -q (hyperPlane -> Ordering) +q (hyperPlane -> Ordering) -> ((hyperPlane :+ extra) -> hyperPlane) -> (hyperPlane :+ extra) -> Ordering @@ -800,31 +800,31 @@ core {-# INLINE onSideTest #-} -instance (ConstructableHyperPlane_ hyperPlane d r, Default extra) - => ConstructableHyperPlane_ (hyperPlane :+ extra) d r where - type HyperPlaneFromEquationConstraint (hyperPlane :+ extra) d r = - HyperPlaneFromEquationConstraint hyperPlane d r - hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (hyperPlane :+ extra) d r => +instance (ConstructableHyperPlane_ hyperPlane d r, Default extra) + => ConstructableHyperPlane_ (hyperPlane :+ extra) d r where + type HyperPlaneFromEquationConstraint (hyperPlane :+ extra) d r = + HyperPlaneFromEquationConstraint hyperPlane d r + hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (hyperPlane :+ extra) d r => Vector (d + 1) r -> hyperPlane :+ extra -hyperPlaneFromEquation Vector (d + 1) r -v = Vector (d + 1) r -> hyperPlane +hyperPlaneFromEquation Vector (d + 1) r +v = Vector (d + 1) r -> hyperPlane forall hyperPlane (d :: Natural) r. (ConstructableHyperPlane_ hyperPlane d r, HyperPlaneFromEquationConstraint hyperPlane d r) => Vector (d + 1) r -> hyperPlane hyperPlaneFromEquation Vector (d + 1) r -v hyperPlane -> extra -> hyperPlane :+ extra +v hyperPlane -> extra -> hyperPlane :+ extra forall core extra. core -> extra -> core :+ extra :+ extra forall a. Default a => a def {-# INLINE hyperPlaneFromEquation #-} - fromPointAndNormal :: forall point. + fromPointAndNormal :: forall point. (Point_ point d r, Num r) => point -> Vector d r -> hyperPlane :+ extra -fromPointAndNormal point -p Vector d r -v = point -> Vector d r -> hyperPlane +fromPointAndNormal point +p Vector d r +v = point -> Vector d r -> hyperPlane forall point. (Point_ point d r, Num r) => point -> Vector d r -> hyperPlane @@ -833,21 +833,21 @@ Num r) => point -> Vector d r -> hyperPlane fromPointAndNormal point -p Vector d r -v hyperPlane -> extra -> hyperPlane :+ extra +p Vector d r +v hyperPlane -> extra -> hyperPlane :+ extra forall core extra. core -> extra -> core :+ extra :+ extra forall a. Default a => a def {-# INLINE fromPointAndNormal #-} -instance (NonVerticalHyperPlane_ hyperPlane d r) - => NonVerticalHyperPlane_ (hyperPlane :+ extra) d r where - evalAt :: forall point. +instance (NonVerticalHyperPlane_ hyperPlane d r) + => NonVerticalHyperPlane_ (hyperPlane :+ extra) d r where + evalAt :: forall point. (Num r, 1 <= d, Point_ point (d - 1) r) => point -> (hyperPlane :+ extra) -> r -evalAt point -p = point -> hyperPlane -> r +evalAt point +p = point -> hyperPlane -> r forall point. (Num r, 1 <= d, Point_ point (d - 1) r) => point -> hyperPlane -> r @@ -856,7 +856,7 @@ Point_ point (d - 1) r) => point -> hyperPlane -> r evalAt point -p (hyperPlane -> r) +p (hyperPlane -> r) -> ((hyperPlane :+ extra) -> hyperPlane) -> (hyperPlane :+ extra) -> r @@ -870,7 +870,7 @@ (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core {-# INLINE evalAt #-} - hyperPlaneCoefficients :: Lens' (hyperPlane :+ extra) (Vector d r) + hyperPlaneCoefficients :: Lens' (hyperPlane :+ extra) (Vector d r) hyperPlaneCoefficients = (hyperPlane -> f hyperPlane) -> (hyperPlane :+ extra) -> f (hyperPlane :+ extra) forall core extra core' (f :: * -> *). @@ -890,11 +890,11 @@ Lens' hyperPlane (Vector d r) hyperPlaneCoefficients {-# INLINE hyperPlaneCoefficients #-} - verticalSideTest :: forall point. + verticalSideTest :: forall point. (1 <= d, Point_ point d r, Ord r, Num r) => point -> (hyperPlane :+ extra) -> Ordering -verticalSideTest point -q = point -> hyperPlane -> Ordering +verticalSideTest point +q = point -> hyperPlane -> Ordering forall point. (1 <= d, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering @@ -903,7 +903,7 @@ Ord r, Num r) => point -> hyperPlane -> Ordering verticalSideTest point -q (hyperPlane -> Ordering) +q (hyperPlane -> Ordering) -> ((hyperPlane :+ extra) -> hyperPlane) -> (hyperPlane :+ extra) -> Ordering diff --git a/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Internal.html b/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Internal.html index 9e609ddd0..a08112480 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Internal.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.Internal.html @@ -41,44 +41,44 @@ -- -- a \point \( (p_1,..,p_d) \) lies on \(h) iff: -- \( a_0 + \sum_i=1^d a_i*p_i = 0 \) -newtype HyperPlane d r = HyperPlane (Vector (d+1) r) +newtype HyperPlane d r = HyperPlane (Vector (d+1) r) -- | Construct a Hyperplane, i.e. a line in R^2 -- -- HyperPlane2 c a b represents the line ax + by + c = 0 -pattern HyperPlane2 :: r -> r -> r -> HyperPlane 2 r +pattern HyperPlane2 :: r -> r -> r -> HyperPlane 2 r pattern $mHyperPlane2 :: forall {r} {r}. HyperPlane 2 r -> (r -> r -> r -> r) -> ((# #) -> r) -> r $bHyperPlane2 :: forall r. r -> r -> r -> HyperPlane 2 r -HyperPlane2 c a b = HyperPlane (Vector3 c a b) +HyperPlane2 c a b = HyperPlane (Vector3 c a b) {-# COMPLETE HyperPlane2 #-} -- | Construct a plane in R^3 -- -- HyperPlane3 d a b c represnest the plane ax + by + cz + d = 0 -pattern HyperPlane3 :: r -> r -> r -> r -> HyperPlane 3 r +pattern HyperPlane3 :: r -> r -> r -> r -> HyperPlane 3 r pattern $mHyperPlane3 :: forall {r} {r}. HyperPlane 3 r -> (r -> r -> r -> r -> r) -> ((# #) -> r) -> r $bHyperPlane3 :: forall r. r -> r -> r -> r -> HyperPlane 3 r -HyperPlane3 d a b c = HyperPlane (Vector4 d a b c) +HyperPlane3 d a b c = HyperPlane (Vector4 d a b c) {-# COMPLETE HyperPlane3 #-} -type instance NumType (HyperPlane d r) = r -type instance Dimension (HyperPlane d r) = d +type instance NumType (HyperPlane d r) = r +type instance Dimension (HyperPlane d r) = d -deriving newtype instance Eq (Vector (d+1) r) => Eq (HyperPlane d r) +deriving newtype instance Eq (Vector (d+1) r) => Eq (HyperPlane d r) -instance (Show r, Foldable (Vector (d+1))) => Show (HyperPlane d r) where - showsPrec :: Int -> HyperPlane d r -> ShowS -showsPrec Int -k (HyperPlane Vector (d + 1) r -v) = Bool -> ShowS -> ShowS +instance (Show r, Foldable (Vector (d+1))) => Show (HyperPlane d r) where + showsPrec :: Int -> HyperPlane d r -> ShowS +showsPrec Int +k (HyperPlane Vector (d + 1) r +v) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ShowS -> ShowS) -> ShowS -> ShowS +app_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ String -> ShowS @@ -93,15 +93,15 @@ forall a. Vector (d + 1) a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList Vector (d + 1) r -v) +v) where - app_prec :: Int -app_prec = Int + app_prec :: Int +app_prec = Int 10 -instance ( Read r, Has_ Vector_ (d+1) r) => Read (HyperPlane d r) where - readPrec :: ReadPrec (HyperPlane d r) -readPrec = ReadPrec (HyperPlane d r) -> ReadPrec (HyperPlane d r) +instance ( Read r, Has_ Vector_ (d+1) r) => Read (HyperPlane d r) where + readPrec :: ReadPrec (HyperPlane d r) +readPrec = ReadPrec (HyperPlane d r) -> ReadPrec (HyperPlane d r) forall a. ReadPrec a -> ReadPrec a readData (ReadPrec (HyperPlane d r) -> ReadPrec (HyperPlane d r)) -> ReadPrec (HyperPlane d r) -> ReadPrec (HyperPlane d r) @@ -112,35 +112,35 @@ -> ReadPrec (HyperPlane d r) forall a t. ReadPrec a -> String -> (a -> t) -> ReadPrec t readUnaryWith ReadPrec (Vector (d + 1) r) -parseVec String +parseVec String "HyperPlane" Vector (d + 1) r -> HyperPlane d r forall (d :: Natural) r. Vector (d + 1) r -> HyperPlane d r HyperPlane where - parseVec :: ReadPrec (Vector (d + 1) r) -parseVec = do [r] -lst <- ReadPrec [r] + parseVec :: ReadPrec (Vector (d + 1) r) +parseVec = do [r] +lst <- ReadPrec [r] forall a. Read a => ReadPrec a readPrec case forall vector (d :: Natural) r. Vector_ vector d r => [r] -> Maybe vector -vectorFromList @(Vector (d+1) r) [r] -lst of - Just Vector (d + 1) r -v -> Vector (d + 1) r -> ReadPrec (Vector (d + 1) r) +vectorFromList @(Vector (d+1) r) [r] +lst of + Just Vector (d + 1) r +v -> Vector (d + 1) r -> ReadPrec (Vector (d + 1) r) forall a. a -> ReadPrec a forall (f :: * -> *) a. Applicative f => a -> f a pure Vector (d + 1) r -v +v Maybe (Vector (d + 1) r) _ -> String -> ReadPrec (Vector (d + 1) r) forall a. String -> ReadPrec a forall (m :: * -> *) a. MonadFail m => String -> m a fail String "HyperPlane.read expected d+1 reals" - readListPrec :: ReadPrec [HyperPlane d r] -readListPrec = ReadPrec [HyperPlane d r] + readListPrec :: ReadPrec [HyperPlane d r] +readListPrec = ReadPrec [HyperPlane d r] forall a. Read a => ReadPrec [a] readListPrecDefault @@ -148,75 +148,75 @@ -- | Constraints on d needed to be able to construct hyperplanes; pretty much all of -- these are satisfied by default, it is just that the typechecker does not realize that. -type MkHyperPlaneConstraints d r = - ( d < d+1, KnownNat d - , Has_ Metric_ d r, Has_ Metric_ (d+1) r - , Has_ Vector_ d r, Has_ Vector_ (d+1) r +type MkHyperPlaneConstraints d r = + ( d < d+1, KnownNat d + , Has_ Metric_ d r, Has_ Metric_ (d+1) r + , Has_ Vector_ d r, Has_ Vector_ (d+1) r ) -instance ( MkHyperPlaneConstraints d r - ) => HyperPlane_ (HyperPlane d r) d r where +instance ( MkHyperPlaneConstraints d r + ) => HyperPlane_ (HyperPlane d r) d r where -- >>> hyperPlaneEquation myHyperPlane2 -- Vector3 2 1 (-1) - hyperPlaneEquation :: Num r => HyperPlane d r -> Vector (d + 1) r -hyperPlaneEquation (HyperPlane Vector (d + 1) r -v) = Vector (d + 1) r -v + hyperPlaneEquation :: Num r => HyperPlane d r -> Vector (d + 1) r +hyperPlaneEquation (HyperPlane Vector (d + 1) r +v) = Vector (d + 1) r +v -instance ( MkHyperPlaneConstraints d r - ) => ConstructableHyperPlane_ (HyperPlane d r) d r where - hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (HyperPlane d r) d r => +instance ( MkHyperPlaneConstraints d r + ) => ConstructableHyperPlane_ (HyperPlane d r) d r where + hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (HyperPlane d r) d r => Vector (d + 1) r -> HyperPlane d r -hyperPlaneFromEquation = Vector (d + 1) r -> HyperPlane d r +hyperPlaneFromEquation = Vector (d + 1) r -> HyperPlane d r forall (d :: Natural) r. Vector (d + 1) r -> HyperPlane d r HyperPlane -instance ( Eq r - ) => HyperPlaneFromPoints (HyperPlane 2 r) where +instance ( Eq r + ) => HyperPlaneFromPoints (HyperPlane 2 r) where -- -- - hyperPlaneThrough :: forall point (d :: Natural) r. + hyperPlaneThrough :: forall point (d :: Natural) r. (Point_ point d r, HyperPlane_ (HyperPlane 2 r) d r, Num r) => Vector d point -> HyperPlane 2 r -hyperPlaneThrough (Vector2 (Point2_ r -px r -py) (Point2_ r -qx r -qy)) +hyperPlaneThrough (Vector2 (Point2_ r +px r +py) (Point2_ r +qx r +qy)) | r -px r -> r -> Bool +px r -> r -> Bool forall a. Eq a => a -> a -> Bool /= r -qx = let a :: r -a = r -qy r -> r -> r +qx = let a :: r +a = r +qy r -> r -> r forall a. Num a => a -> a -> a - r -py - b :: r -b = r -px r -> r -> r +py + b :: r +b = r +px r -> r -> r forall a. Num a => a -> a -> a - r -qx - c :: r -c = (r -qxr -> r -> r +qx + c :: r +c = (r +qxr -> r -> r forall a. Num a => a -> a -> a -r -px)r -> r -> r +px)r -> r -> r forall a. Num a => a -> a -> a *r -py r -> r -> r +py r -> r -> r forall a. Num a => a -> a -> a - r -pxr -> r -> r +pxr -> r -> r forall a. Num a => a -> a -> a *(r -qyr -> r -> r +qyr -> r -> r forall a. Num a => a -> a -> a -r -py) +py) in Vector (2 + 1) r -> HyperPlane 2 r forall (d :: Natural) r. Vector (d + 1) r -> HyperPlane d r HyperPlane (Vector (2 + 1) r -> HyperPlane 2 r) @@ -225,9 +225,9 @@ $ r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -c r -a r -b +c r +a r +b | Bool otherwise = Vector (2 + 1) r -> HyperPlane 2 r forall (d :: Natural) r. Vector (d + 1) r -> HyperPlane d r @@ -237,33 +237,33 @@ $ r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -px (-r +px (-r 1) r 0 -instance (Num r) => HyperPlaneFromPoints (HyperPlane 3 r) where - hyperPlaneThrough :: forall point (d :: Natural) r. +instance (Num r) => HyperPlaneFromPoints (HyperPlane 3 r) where + hyperPlaneThrough :: forall point (d :: Natural) r. (Point_ point d r, HyperPlane_ (HyperPlane 3 r) d r, Num r) => Vector d point -> HyperPlane 3 r -hyperPlaneThrough (Vector3 point -p point -q point -r) = let u :: Vector 3 r -u = point -q point -> point -> Vector 3 r +hyperPlaneThrough (Vector3 point +p point +q point +r) = let u :: Vector 3 r +u = point +q point -> point -> Vector 3 r forall point (d :: Natural) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -p - v :: Vector 3 r -v = point -r point -> point -> Vector 3 r +p + v :: Vector 3 r +v = point +r point -> point -> Vector 3 r forall point (d :: Natural) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -p +p in point -> Vector 3 r -> HyperPlane 3 r forall point. (Point_ point 3 r, Num r) => @@ -273,11 +273,11 @@ Num r) => point -> Vector d r -> hyperPlane fromPointAndNormal point -p (Vector 3 r -u Vector 3 r -> Vector 3 r -> Vector 3 r +p (Vector 3 r +u Vector 3 r -> Vector 3 r -> Vector 3 r forall r. Num r => Vector 3 r -> Vector 3 r -> Vector 3 r `cross` Vector 3 r -v) +v) -- hyperPlaneTrough pts = fromPointAndNormal p0 n @@ -301,23 +301,23 @@ -- GT -- >>> cmpInDirection (Vector2 1 0) (Point2 15 15) (Point2 15 (10 :: Int)) -- EQ -cmpInDirection :: forall point d r. - ( Ord r, Num r - , Has_ Metric_ (d+1) r - , Has_ Metric_ d r - , Point_ point d r - , d < d+1--, 0 < d +cmpInDirection :: forall point d r. + ( Ord r, Num r + , Has_ Metric_ (d+1) r + , Has_ Metric_ d r + , Point_ point d r + , d < d+1--, 0 < d ) - => Vector d r -> point -> point -> Ordering + => Vector d r -> point -> point -> Ordering cmpInDirection :: forall point (d :: Natural) r. (Ord r, Num r, Has_ Metric_ (d + 1) r, Has_ Metric_ d r, Point_ point d r, d < (d + 1)) => Vector d r -> point -> point -> Ordering -cmpInDirection Vector d r -n point -p point -q = point -p point -> HyperPlane d r -> Ordering +cmpInDirection Vector d r +n point +p point +q = point +p point -> HyperPlane d r -> Ordering forall point. (Point_ point d r, Ord r, Num r) => point -> HyperPlane d r -> Ordering @@ -339,17 +339,17 @@ s -> Vector (Dimension s) (NumType s) -> HyperPlane (Dimension s) (NumType s) -fromPointAndNormal' point -q Vector d r +fromPointAndNormal' point +q Vector d r Vector (Dimension point) (NumType point) -n +n where - fromPointAndNormal' :: s + fromPointAndNormal' :: s -> Vector (Dimension s) (NumType s) -> HyperPlane (Dimension s) (NumType s) -fromPointAndNormal' s -q' Vector (Dimension s) (NumType s) -n' = Vector (Dimension s + 1) (NumType s) +fromPointAndNormal' s +q' Vector (Dimension s) (NumType s) +n' = Vector (Dimension s + 1) (NumType s) -> HyperPlane (Dimension s) (NumType s) forall (d :: Natural) r. Vector (d + 1) r -> HyperPlane d r HyperPlane (Vector (Dimension s + 1) (NumType s) @@ -364,16 +364,16 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => r -> vector -> vector' cons NumType s -a0 Vector (Dimension s) (NumType s) -n' +a0 Vector (Dimension s) (NumType s) +n' where - a0 :: NumType s -a0 = NumType s -> NumType s + a0 :: NumType s +a0 = NumType s -> NumType s forall a. Num a => a -> a negate (NumType s -> NumType s) -> NumType s -> NumType s forall a b. (a -> b) -> a -> b $ (s -q's +q's -> Getting (Vector (Dimension s) (NumType s)) s @@ -402,5 +402,5 @@ (Metric_ vector d r, Num r) => vector -> vector -> r `dot` Vector (Dimension s) (NumType s) -n' +n' \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.NonVertical.html b/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.NonVertical.html index 9d67789ea..e051193a7 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.NonVertical.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.HyperPlane.NonVertical.html @@ -48,31 +48,31 @@ -- -- y = 2 + 1*x -- -newtype NonVerticalHyperPlane d r = NonVerticalHyperPlane (Vector d r) +newtype NonVerticalHyperPlane d r = NonVerticalHyperPlane (Vector d r) -type instance NumType (NonVerticalHyperPlane d r) = r -type instance Dimension (NonVerticalHyperPlane d r) = d +type instance NumType (NonVerticalHyperPlane d r) = r +type instance Dimension (NonVerticalHyperPlane d r) = d -deriving newtype instance Eq (Vector d r) => Eq (NonVerticalHyperPlane d r) -deriving newtype instance Ord (Vector d r) => Ord (NonVerticalHyperPlane d r) -deriving newtype instance NFData (Vector d r) => NFData (NonVerticalHyperPlane d r) +deriving newtype instance Eq (Vector d r) => Eq (NonVerticalHyperPlane d r) +deriving newtype instance Ord (Vector d r) => Ord (NonVerticalHyperPlane d r) +deriving newtype instance NFData (Vector d r) => NFData (NonVerticalHyperPlane d r) -deriving stock instance Functor (Vector d) => Functor (NonVerticalHyperPlane d) -deriving stock instance Foldable (Vector d) => Foldable (NonVerticalHyperPlane d) -deriving stock instance Traversable (Vector d) => Traversable (NonVerticalHyperPlane d) +deriving stock instance Functor (Vector d) => Functor (NonVerticalHyperPlane d) +deriving stock instance Foldable (Vector d) => Foldable (NonVerticalHyperPlane d) +deriving stock instance Traversable (Vector d) => Traversable (NonVerticalHyperPlane d) -instance (Show r, Foldable (Vector d)) => Show (NonVerticalHyperPlane d r) where - showsPrec :: Int -> NonVerticalHyperPlane d r -> ShowS -showsPrec Int -k (NonVerticalHyperPlane Vector d r -v) = Bool -> ShowS -> ShowS +instance (Show r, Foldable (Vector d)) => Show (NonVerticalHyperPlane d r) where + showsPrec :: Int -> NonVerticalHyperPlane d r -> ShowS +showsPrec Int +k (NonVerticalHyperPlane Vector d r +v) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ShowS -> ShowS) -> ShowS -> ShowS +app_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ String -> ShowS @@ -87,15 +87,15 @@ forall a. Vector d a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList Vector d r -v) +v) where - app_prec :: Int -app_prec = Int + app_prec :: Int +app_prec = Int 10 -instance ( Read r, Has_ Vector_ d r) => Read (NonVerticalHyperPlane d r) where - readPrec :: ReadPrec (NonVerticalHyperPlane d r) -readPrec = ReadPrec (NonVerticalHyperPlane d r) +instance ( Read r, Has_ Vector_ d r) => Read (NonVerticalHyperPlane d r) where + readPrec :: ReadPrec (NonVerticalHyperPlane d r) +readPrec = ReadPrec (NonVerticalHyperPlane d r) -> ReadPrec (NonVerticalHyperPlane d r) forall a. ReadPrec a -> ReadPrec a readData (ReadPrec (NonVerticalHyperPlane d r) @@ -109,27 +109,27 @@ -> ReadPrec (NonVerticalHyperPlane d r) forall a t. ReadPrec a -> String -> (a -> t) -> ReadPrec t readUnaryWith ReadPrec (Vector d r) -parseVec String +parseVec String "NonVerticalHyperPlane" Vector d r -> NonVerticalHyperPlane d r forall (d :: Nat) r. Vector d r -> NonVerticalHyperPlane d r NonVerticalHyperPlane where - parseVec :: ReadPrec (Vector d r) -parseVec = do [r] -lst <- ReadPrec [r] + parseVec :: ReadPrec (Vector d r) +parseVec = do [r] +lst <- ReadPrec [r] forall a. Read a => ReadPrec a readPrec case forall vector (d :: Nat) r. Vector_ vector d r => [r] -> Maybe vector -vectorFromList @(Vector d r) [r] -lst of - Just Vector d r -v -> Vector d r -> ReadPrec (Vector d r) +vectorFromList @(Vector d r) [r] +lst of + Just Vector d r +v -> Vector d r -> ReadPrec (Vector d r) forall a. a -> ReadPrec a forall (f :: * -> *) a. Applicative f => a -> f a pure Vector d r -v +v Maybe (Vector d r) _ -> String -> ReadPrec (Vector d r) forall a. String -> ReadPrec a @@ -137,8 +137,8 @@ fail String "NonVerticalHyperPlane.read expected d reals" -- TODO, should we verify the hyperplane is non-vertical? - readListPrec :: ReadPrec [NonVerticalHyperPlane d r] -readListPrec = ReadPrec [NonVerticalHyperPlane d r] + readListPrec :: ReadPrec [NonVerticalHyperPlane d r] +readListPrec = ReadPrec [NonVerticalHyperPlane d r] forall a. Read a => ReadPrec [a] readListPrecDefault @@ -153,10 +153,10 @@ -- Just (NonVerticalHyperPlane [-1.5,-2.0]) -- >>> asNonVerticalHyperPlane myPlane -- Just (NonVerticalHyperPlane [2.0,3.0,10.0]) -asNonVerticalHyperPlane :: ( HyperPlane_ hyperPlane d r - , Fractional r, Eq r, 1 <= d +asNonVerticalHyperPlane :: ( HyperPlane_ hyperPlane d r + , Fractional r, Eq r, 1 <= d ) - => hyperPlane -> Maybe (NonVerticalHyperPlane d r) + => hyperPlane -> Maybe (NonVerticalHyperPlane d r) asNonVerticalHyperPlane :: forall hyperPlane (d :: Nat) r. (HyperPlane_ hyperPlane d r, Fractional r, Eq r, 1 <= d) => hyperPlane -> Maybe (NonVerticalHyperPlane d r) @@ -178,17 +178,17 @@ {-# INLINE asNonVerticalHyperPlane #-} -- | Constructs a non-vertical hyperplane from a vector -asNonVerticalHyperPlane' :: forall d r. ( Has_ Vector_ d r, Has_ Vector_ (d+1) r, 1 <= d - , Fractional r, Eq r) - => Vector (d+1) r -> Maybe (NonVerticalHyperPlane d r) +asNonVerticalHyperPlane' :: forall d r. ( Has_ Vector_ d r, Has_ Vector_ (d+1) r, 1 <= d + , Fractional r, Eq r) + => Vector (d+1) r -> Maybe (NonVerticalHyperPlane d r) asNonVerticalHyperPlane' :: forall (d :: Nat) r. (Has_ Vector_ d r, Has_ Vector_ (d + 1) r, 1 <= d, Fractional r, Eq r) => Vector (d + 1) r -> Maybe (NonVerticalHyperPlane d r) -asNonVerticalHyperPlane' Vector (d + 1) r -e +asNonVerticalHyperPlane' Vector (d + 1) r +e | r -ad r -> r -> Bool +ad r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 = Maybe (NonVerticalHyperPlane d r) @@ -206,27 +206,27 @@ -> Vector d r -> NonVerticalHyperPlane d r forall a b. (a -> b) -> a -> b $ Vector d r -a Vector d r -> r -> Vector d r +a Vector d r -> r -> Vector d r forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector ^/ (r -> r forall a. Num a => a -> a negate r -ad) +ad) where - (r -a0 :: r, Vector d r -as :: Vector d r) = Vector (d + 1) r -> (r, Vector d r) + (r +a0 :: r, Vector d r +as :: Vector d r) = Vector (d + 1) r -> (r, Vector d r) forall vector' vector (d :: Nat) r. (Vector_ vector (d + 1) r, Vector_ vector' d r, 0 <= ((d + 1) - 1), d <= Dimension vector) => vector -> (r, vector') uncons Vector (d + 1) r -e - ad :: r -ad = Vector d r -asVector d r -> Getting r (Vector d r) r -> r +e + ad :: r +ad = Vector d r +asVector d r -> Getting r (Vector d r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Vector d r) r forall vector (d :: Nat) r. @@ -234,9 +234,9 @@ IndexedLens' Int vector r IndexedLens' Int (Vector d r) r last - a :: Vector d r -a = Vector d r -asVector d r -> (Vector d r -> Vector d r) -> Vector d r + a :: Vector d r +a = Vector d r +asVector d r -> (Vector d r -> Vector d r) -> Vector d r forall a b. a -> (a -> b) -> b &(r -> Identity r) -> Vector d r -> Identity (Vector d r) forall vector (d :: Nat) r. @@ -247,41 +247,41 @@ -> r -> Vector d r -> Vector d r forall s t a b. ASetter s t a b -> b -> s -> t .~ r -a0 +a0 {-# INLINE asNonVerticalHyperPlane' #-} -instance ( MkHyperPlaneConstraints d r, Has_ Additive_ (d-1) r - , 2 <= d - ) => HyperPlane_ (NonVerticalHyperPlane d r) d r where +instance ( MkHyperPlaneConstraints d r, Has_ Additive_ (d-1) r + , 2 <= d + ) => HyperPlane_ (NonVerticalHyperPlane d r) d r where -- normalVector h = let a = suffix $ hyperPlaneEquation h -- in if signum (a^.last) == 1 then a else negated a -instance ( MkHyperPlaneConstraints d r, Has_ Additive_ (d-1) r - , Fractional r, Eq r - , 2 <= d - ) => ConstructableHyperPlane_ (NonVerticalHyperPlane d r) d r where +instance ( MkHyperPlaneConstraints d r, Has_ Additive_ (d-1) r + , Fractional r, Eq r + , 2 <= d + ) => ConstructableHyperPlane_ (NonVerticalHyperPlane d r) d r where -- | pre: the last component is not zero -- -- -- >>> hyperPlaneFromEquation $ Vector3 2 1 (-1) -- NonVerticalHyperPlane [1,2] - hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (NonVerticalHyperPlane d r) d r => + hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (NonVerticalHyperPlane d r) d r => Vector (d + 1) r -> NonVerticalHyperPlane d r -hyperPlaneFromEquation Vector (d + 1) r -e = case Vector (d + 1) r -> Maybe (NonVerticalHyperPlane d r) +hyperPlaneFromEquation Vector (d + 1) r +e = case Vector (d + 1) r -> Maybe (NonVerticalHyperPlane d r) forall (d :: Nat) r. (Has_ Vector_ d r, Has_ Vector_ (d + 1) r, 1 <= d, Fractional r, Eq r) => Vector (d + 1) r -> Maybe (NonVerticalHyperPlane d r) asNonVerticalHyperPlane' Vector (d + 1) r -e of - Just NonVerticalHyperPlane d r -h -> NonVerticalHyperPlane d r -h +e of + Just NonVerticalHyperPlane d r +h -> NonVerticalHyperPlane d r +h Maybe (NonVerticalHyperPlane d r) Nothing -> String -> NonVerticalHyperPlane d r forall a. HasCallStack => String -> a @@ -290,14 +290,14 @@ {-# INLINE hyperPlaneFromEquation #-} -instance ( MkHyperPlaneConstraints d r, 1 + (d-1) ~ d, Has_ Additive_ (d-1) r - , Num r - , 2 <= d - ) => NonVerticalHyperPlane_ (NonVerticalHyperPlane d r) d r where +instance ( MkHyperPlaneConstraints d r, 1 + (d-1) ~ d, Has_ Additive_ (d-1) r + , Num r + , 2 <= d + ) => NonVerticalHyperPlane_ (NonVerticalHyperPlane d r) d r where -- >>> myLineAsNV^.hyperPlaneCoefficients -- Vector2 1 2 - hyperPlaneCoefficients :: Lens' (NonVerticalHyperPlane d r) (Vector d r) -hyperPlaneCoefficients = (Vector d r -> f (Vector d r)) + hyperPlaneCoefficients :: Lens' (NonVerticalHyperPlane d r) (Vector d r) +hyperPlaneCoefficients = (Vector d r -> f (Vector d r)) -> NonVerticalHyperPlane d r -> f (NonVerticalHyperPlane d r) forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Iso @@ -327,20 +327,20 @@ type Plane = NonVerticalHyperPlane 3 -- | Constructs a Plane in R^3 for the equation z = ax + by + c -pattern Plane :: r -> r -> r -> Plane r +pattern Plane :: r -> r -> r -> Plane r pattern $mPlane :: forall {r} {r}. Plane r -> (r -> r -> r -> r) -> ((# #) -> r) -> r $bPlane :: forall r. r -> r -> r -> Plane r -Plane a b c = NonVerticalHyperPlane (Vector3 a b c) +Plane a b c = NonVerticalHyperPlane (Vector3 a b c) {-# COMPLETE Plane #-} -- | Shorthand for Non-vertical hyperplanes in R^3 -type Plane_ plane = NonVerticalHyperPlane_ plane 3 +type Plane_ plane = NonVerticalHyperPlane_ plane 3 -- | Destructs a Plane in R^3 into the equation z = ax + by + c -pattern Plane_ :: Plane_ plane r => r -> r -> r -> plane +pattern Plane_ :: Plane_ plane r => r -> r -> r -> plane pattern $mPlane_ :: forall {r} {plane} {r}. Plane_ plane r => plane -> (r -> r -> r -> r) -> ((# #) -> r) -> r -Plane_ a b c <- (view hyperPlaneCoefficients -> (Vector3 a b c)) +Plane_ a b c <- (view hyperPlaneCoefficients -> (Vector3 a b c)) {-# COMPLETE Plane_ #-} \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Intersection.html b/haddocks/hgeometry/kernel/src/HGeometry.Intersection.html index 75a25616a..d2bc13189 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Intersection.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Intersection.html @@ -25,47 +25,47 @@ ------------------------------------------------------------------------------- -- | The result of interesecting two geometries, -type family Intersection g h :: Type +type family Intersection g h :: Type -- | The data family specifying to help implement the 'Intersection' -- type family. -data family IntersectionOf g h +data family IntersectionOf g h -- | Class for types for which we can test if they intersect. -class HasIntersectionWith g h where +class HasIntersectionWith g h where -- | g `intersects` h <=> The intersection of g and h is non-empty. - intersects :: g -> h -> Bool - default intersects :: ( Intersection g h ~ Maybe (IntersectionOf g h) - , IsIntersectableWith g h - ) => g -> h -> Bool - g -g `intersects` h -h = Maybe (IntersectionOf g h) -> Bool + intersects :: g -> h -> Bool + default intersects :: ( Intersection g h ~ Maybe (IntersectionOf g h) + , IsIntersectableWith g h + ) => g -> h -> Bool + g +g `intersects` h +h = Maybe (IntersectionOf g h) -> Bool forall a. Maybe a -> Bool isJust (Maybe (IntersectionOf g h) -> Bool) -> Maybe (IntersectionOf g h) -> Bool forall a b. (a -> b) -> a -> b $ g -g g -> h -> Intersection g h +g g -> h -> Intersection g h forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` h -h +h -- | Class relationship between intersectable geometric objects. -class HasIntersectionWith g h => IsIntersectableWith g h where +class HasIntersectionWith g h => IsIntersectableWith g h where -- | Computes te intersection of two geometric objects. - intersect :: g -> h -> Intersection g h + intersect :: g -> h -> Intersection g h -- type instance Intersection (geomA :+ extra) (geomB :+ extra) = Intersection geomA geomB -instance HasIntersectionWith geomA geomB - => HasIntersectionWith (geomA :+ extra) (geomB :+ extra) where - geomA :+ extra -ga intersects :: (geomA :+ extra) -> (geomB :+ extra) -> Bool -`intersects` geomB :+ extra -gb = (geomA :+ extra -ga(geomA :+ extra) -> Getting geomA (geomA :+ extra) geomA -> geomA +instance HasIntersectionWith geomA geomB + => HasIntersectionWith (geomA :+ extra) (geomB :+ extra) where + geomA :+ extra +ga intersects :: (geomA :+ extra) -> (geomB :+ extra) -> Bool +`intersects` geomB :+ extra +gb = (geomA :+ extra +ga(geomA :+ extra) -> Getting geomA (geomA :+ extra) geomA -> geomA forall s a. s -> Getting a s a -> a ^.Getting geomA (geomA :+ extra) geomA forall core extra core' (f :: * -> *). @@ -74,7 +74,7 @@ core) geomA -> geomB -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` (geomB :+ extra -gb(geomB :+ extra) -> Getting geomB (geomB :+ extra) geomB -> geomB +gb(geomB :+ extra) -> Getting geomB (geomB :+ extra) geomB -> geomB forall s a. s -> Getting a s a -> a ^.Getting geomB (geomB :+ extra) geomB forall core extra core' (f :: * -> *). diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Interval.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.Interval.Class.html index cc97dda04..88fd0f291 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Interval.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Interval.Class.html @@ -63,27 +63,27 @@ -------------------------------------------------------------------------------- -- | Things that have a start point -class HasStart seg p | seg -> p where +class HasStart seg p | seg -> p where -- | Lens to access the start point - start :: Lens' seg p + start :: Lens' seg p -- | Things that have an end point -class HasEnd seg p | seg -> p where +class HasEnd seg p | seg -> p where -- | Lens to access the ending point - end :: Lens' seg p + end :: Lens' seg p -- | Get both the start and end of something that has a start and end. -startAndEnd :: (HasStart seg p, HasEnd seg p) => seg -> (p,p) +startAndEnd :: (HasStart seg p, HasEnd seg p) => seg -> (p,p) startAndEnd :: forall seg p. (HasStart seg p, HasEnd seg p) => seg -> (p, p) -startAndEnd seg -i = (seg -iseg -> Getting p seg p -> p +startAndEnd seg +i = (seg +iseg -> Getting p seg p -> p forall s a. s -> Getting a s a -> a ^.Getting p seg p forall seg p. HasStart seg p => Lens' seg p Lens' seg p start,seg -iseg -> Getting p seg p -> p +iseg -> Getting p seg p -> p forall s a. s -> Getting a s a -> a ^.Getting p seg p forall seg p. HasEnd seg p => Lens' seg p @@ -93,29 +93,29 @@ -------------------------------------------------------------------------------- -- | Things that have a start point -class HasStartPoint seg p | seg -> p where +class HasStartPoint seg p | seg -> p where -- | Lens to access the start point - startPoint :: Lens' seg p + startPoint :: Lens' seg p -- | Things that have an end point -class HasEndPoint seg p | seg -> p where +class HasEndPoint seg p | seg -> p where -- | Lens to access the ending point - endPoint :: Lens' seg p + endPoint :: Lens' seg p -- | Get both the start and end of something that has a start and end. -startAndEndPoint :: (HasStartPoint seg s, HasEndPoint seg e) => seg -> (s,e) +startAndEndPoint :: (HasStartPoint seg s, HasEndPoint seg e) => seg -> (s,e) startAndEndPoint :: forall seg s e. (HasStartPoint seg s, HasEndPoint seg e) => seg -> (s, e) -startAndEndPoint seg -i = (seg -iseg -> Getting s seg s -> s +startAndEndPoint seg +i = (seg +iseg -> Getting s seg s -> s forall s a. s -> Getting a s a -> a ^.Getting s seg s forall seg p. HasStartPoint seg p => Lens' seg p Lens' seg s startPoint, seg -iseg -> Getting e seg e -> e +iseg -> Getting e seg e -> e forall s a. s -> Getting a s a -> a ^.Getting e seg e forall seg p. HasEndPoint seg p => Lens' seg p @@ -124,55 +124,55 @@ -- | type family to declare the type of startpoint for an interval, the -- idea is to define this as one of the endpoinst form the Endpoints module -type family StartPointOf interval +type family StartPointOf interval -- | type family to declare the type of endpoint for an interval, the -- idea is to define this as one of the endpoinst form the Endpoints module -type family EndPointOf interval +type family EndPointOf interval -------------------------------------------------------------------------------- -- | A class for types representing interval like objects type IntervalLike_ :: Type -> Type -> Constraint -class ( HasStart interval point, HasStartPoint interval (StartPointOf interval) - , HasEnd interval point, HasEndPoint interval (EndPointOf interval) - , EndPoint_ (EndPointOf interval), IxValue (EndPointOf interval) ~ point - , EndPoint_ (StartPointOf interval), IxValue (StartPointOf interval) ~ point - ) => IntervalLike_ interval point | interval -> point where +class ( HasStart interval point, HasStartPoint interval (StartPointOf interval) + , HasEnd interval point, HasEndPoint interval (EndPointOf interval) + , EndPoint_ (EndPointOf interval), IxValue (EndPointOf interval) ~ point + , EndPoint_ (StartPointOf interval), IxValue (StartPointOf interval) ~ point + ) => IntervalLike_ interval point | interval -> point where {-# MINIMAL #-} -- | A class for types representing Intervals type Interval_ :: Type -> Type -> Constraint -class ( IntervalLike_ interval r - , NumType interval ~ r - ) => Interval_ interval r | interval -> r where +class ( IntervalLike_ interval r + , NumType interval ~ r + ) => Interval_ interval r | interval -> r where -------------------------------------------------------------------------------- -- | A class for constructable intervals type ConstructableInterval_ :: Type -> Type -> Constraint -class Interval_ interval point => ConstructableInterval_ interval point where +class Interval_ interval point => ConstructableInterval_ interval point where {-# MINIMAL mkInterval #-} -- | Construct an interval given its start and end point. -- -- pre: start < end - mkInterval :: StartPointOf interval -> EndPointOf interval -> interval + mkInterval :: StartPointOf interval -> EndPointOf interval -> interval -- | Construct an interval given two points. This makes sure -- the start-point comes before the endpoint. -- -- pre: it is possible to construct a valid, non-empty interval this way. -- so if either endpoint is open the endpoints should not coincide. - buildInterval :: ( Ord point - , StartPointOf interval ~ EndPointOf interval - ) => StartPointOf interval -> EndPointOf interval -> interval - buildInterval StartPointOf interval -a EndPointOf interval -b + buildInterval :: ( Ord point + , StartPointOf interval ~ EndPointOf interval + ) => StartPointOf interval -> EndPointOf interval -> interval + buildInterval StartPointOf interval +a EndPointOf interval +b | (EndPointOf interval StartPointOf interval -aEndPointOf interval +aEndPointOf interval -> Getting point (EndPointOf interval) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (EndPointOf interval) point @@ -190,7 +190,7 @@ _endPoint) point -> point -> Bool forall a. Ord a => a -> a -> Bool <= (EndPointOf interval -bEndPointOf interval +bEndPointOf interval -> Getting point (EndPointOf interval) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (EndPointOf interval) point @@ -210,8 +210,8 @@ ConstructableInterval_ interval point => StartPointOf interval -> EndPointOf interval -> interval mkInterval StartPointOf interval -a EndPointOf interval -b +a EndPointOf interval +b | Bool otherwise = StartPointOf interval -> EndPointOf interval -> interval forall interval point. @@ -219,9 +219,9 @@ StartPointOf interval -> EndPointOf interval -> interval mkInterval EndPointOf interval StartPointOf interval -b EndPointOf interval +b EndPointOf interval StartPointOf interval -a +a {-# INLINE buildInterval #-} @@ -230,39 +230,39 @@ -- | A class representing closed intervals, i.e. intervals that include their endpoints type ClosedInterval_ :: Type -> Type -> Constraint -class ( Interval_ interval r - , StartPointOf interval ~ EndPoint Closed r - , EndPointOf interval ~ EndPoint Closed r - ) => ClosedInterval_ interval r where +class ( Interval_ interval r + , StartPointOf interval ~ EndPoint Closed r + , EndPointOf interval ~ EndPoint Closed r + ) => ClosedInterval_ interval r where -- | A class representing constructable closed intervals -class ( ClosedInterval_ interval r - , ConstructableInterval_ interval r - ) => ConstructableClosedInterval_ interval r where +class ( ClosedInterval_ interval r + , ConstructableInterval_ interval r + ) => ConstructableClosedInterval_ interval r where -- | Construct an interval given its start and end point. - mkClosedInterval :: r -> r -> interval - mkClosedInterval r -s r -e = StartPointOf interval -> EndPointOf interval -> interval + mkClosedInterval :: r -> r -> interval + mkClosedInterval r +s r +e = StartPointOf interval -> EndPointOf interval -> interval forall interval point. ConstructableInterval_ interval point => StartPointOf interval -> EndPointOf interval -> interval mkInterval (r -> EndPoint 'Closed r forall r. r -> EndPoint 'Closed r ClosedE r -s) (r -> EndPoint 'Closed r +s) (r -> EndPoint 'Closed r forall r. r -> EndPoint 'Closed r ClosedE r -e) +e) {-# MINIMAL #-} -- | Construct an interval given two points. This makes sure -- the start-point comes before the endpoint. - buildClosedInterval :: Ord r => r -> r -> interval - buildClosedInterval r -a r -b = StartPointOf interval -> EndPointOf interval -> interval + buildClosedInterval :: Ord r => r -> r -> interval + buildClosedInterval r +a r +b = StartPointOf interval -> EndPointOf interval -> interval forall interval point. (ConstructableInterval_ interval point, Ord point, StartPointOf interval ~ EndPointOf interval) => @@ -270,19 +270,19 @@ buildInterval (r -> EndPoint 'Closed r forall r. r -> EndPoint 'Closed r ClosedE r -a) (r -> EndPoint 'Closed r +a) (r -> EndPoint 'Closed r forall r. r -> EndPoint 'Closed r ClosedE r -b) +b) {-# INLINE buildClosedInterval #-} -- | Pattern matching on an arbitrary closed interval -pattern ClosedInterval_ :: ClosedInterval_ interval r => r -> r -> interval +pattern ClosedInterval_ :: ClosedInterval_ interval r => r -> r -> interval pattern $mClosedInterval_ :: forall {r} {interval} {r}. ClosedInterval_ interval r => interval -> (r -> r -> r) -> ((# #) -> r) -> r -ClosedInterval_ l u <- (startAndEnd -> (l,u)) +ClosedInterval_ l u <- (startAndEnd -> (l,u)) {-# COMPLETE ClosedInterval_ #-} -- where -- ClosedInterval_ l u = mkClosedInterval l u @@ -297,60 +297,60 @@ -- 0 -- >>> clampTo (ClosedInterval 0 10) 5 -- 5 -clampTo :: (ClosedInterval_ interval r, Ord r) => interval -> r -> r +clampTo :: (ClosedInterval_ interval r, Ord r) => interval -> r -> r clampTo :: forall interval r. (ClosedInterval_ interval r, Ord r) => interval -> r -> r -clampTo (ClosedInterval_ r -l r -u) r -x = (r -x r -> r -> r +clampTo (ClosedInterval_ r +l r +u) r +x = (r +x r -> r -> r forall a. Ord a => a -> a -> a `max` r -l) r -> r -> r +l) r -> r -> r forall a. Ord a => a -> a -> a `min` r -u +u -------------------------------------------------------------------------------- -- | A class representing open intervals, i.e. intervals that exclude their endpoints -class ( Interval_ interval r - , StartPointOf interval ~ EndPoint Open r - , EndPointOf interval ~ EndPoint Open r - ) => OpenInterval_ interval r | interval -> r where +class ( Interval_ interval r + , StartPointOf interval ~ EndPoint Open r + , EndPointOf interval ~ EndPoint Open r + ) => OpenInterval_ interval r | interval -> r where -- | Constructable Open intervals -class ( OpenInterval_ interval r - , ConstructableInterval_ interval r - ) => ConstructableOpenInterval_ interval r | interval -> r where +class ( OpenInterval_ interval r + , ConstructableInterval_ interval r + ) => ConstructableOpenInterval_ interval r | interval -> r where -- | Construct an interval given its start s and end point t. -- -- pre: s < t - mkOpenInterval :: r -> r -> interval - mkOpenInterval r -s r -e = StartPointOf interval -> EndPointOf interval -> interval + mkOpenInterval :: r -> r -> interval + mkOpenInterval r +s r +e = StartPointOf interval -> EndPointOf interval -> interval forall interval point. ConstructableInterval_ interval point => StartPointOf interval -> EndPointOf interval -> interval mkInterval (r -> EndPoint 'Open r forall r. r -> EndPoint 'Open r OpenE r -s) (r -> EndPoint 'Open r +s) (r -> EndPoint 'Open r forall r. r -> EndPoint 'Open r OpenE r -e) +e) {-# MINIMAL #-} -- | Pattern matching on an arbitrary open interval -pattern OpenInterval_ :: OpenInterval_ interval r => r -> r -> interval +pattern OpenInterval_ :: OpenInterval_ interval r => r -> r -> interval pattern $mOpenInterval_ :: forall {r} {interval} {r}. OpenInterval_ interval r => interval -> (r -> r -> r) -> ((# #) -> r) -> r -OpenInterval_ l u <- (startAndEnd -> (l,u)) +OpenInterval_ l u <- (startAndEnd -> (l,u)) -- where -- OpenInterval_ l u = mkOpenInterval l u {-# COMPLETE OpenInterval_ #-} @@ -358,15 +358,15 @@ -------------------------------------------------------------------------------- -- | Pattern to match on intervals -pattern Interval_ :: Interval_ interval r - => StartPointOf interval -> EndPointOf interval -> interval +pattern Interval_ :: Interval_ interval r + => StartPointOf interval -> EndPointOf interval -> interval pattern $mInterval_ :: forall {r} {interval} {r}. Interval_ interval r => interval -> (StartPointOf interval -> EndPointOf interval -> r) -> ((# #) -> r) -> r -Interval_ s t <- (startAndEndPoint -> (s,t)) +Interval_ s t <- (startAndEndPoint -> (s,t)) {-# COMPLETE Interval_ #-} -- where -- Interval_ s t = mkInterval s t @@ -376,22 +376,22 @@ -- -- Note that even if the boundary of the interval is open we may -- return "OnBoundary". -inInterval :: forall interval r. - ( Ord r - , Interval_ interval r +inInterval :: forall interval r. + ( Ord r + , Interval_ interval r ) - => r -> interval -> PointLocationResult -r -x inInterval :: forall interval r. + => r -> interval -> PointLocationResult +r +x inInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> PointLocationResult -`inInterval` interval -i = +`inInterval` interval +i = case r -x r -> r -> Ordering +x r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p @@ -405,10 +405,10 @@ OnBoundary Ordering GT -> case r -x r -> r -> Ordering +x r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -429,23 +429,23 @@ -- -- Note that even if the boundary of the interval is open we may -- return "OnBoundary". -stabsInterval :: forall interval r. - ( Ord r - , Interval_ interval r +stabsInterval :: forall interval r. + ( Ord r + , Interval_ interval r ) - => r -> interval -> Bool -r -q stabsInterval :: forall interval r. + => r -> interval -> Bool +r +q stabsInterval :: forall interval r. (Ord r, Interval_ interval r) => r -> interval -> Bool -`stabsInterval` interval -i = r -q r -> interval -> PointLocationResult +`stabsInterval` interval +i = r +q r -> interval -> PointLocationResult forall interval r. (Ord r, Interval_ interval r) => r -> interval -> PointLocationResult `inInterval` interval -i PointLocationResult -> PointLocationResult -> Bool +i PointLocationResult -> PointLocationResult -> Bool forall a. Eq a => a -> a -> Bool /= PointLocationResult Outside @@ -462,17 +462,17 @@ -- GT -- >>> 10 `compareInterval` (ClosedInterval 0 1) -- GT -compareInterval :: (Ord r, Interval_ interval r) => r -> interval -> Ordering +compareInterval :: (Ord r, Interval_ interval r) => r -> interval -> Ordering compareInterval :: forall r interval. (Ord r, Interval_ interval r) => r -> interval -> Ordering -compareInterval r -q interval -i = case r -q r -> r -> Ordering +compareInterval r +q interval +i = case r +q r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p @@ -483,7 +483,7 @@ LT Ordering EQ -> if interval -iinterval +iinterval -> Getting EndPointType interval EndPointType -> EndPointType forall s a. s -> Getting a s a -> a ^.(StartPointOf interval @@ -518,10 +518,10 @@ -- larger than the left endpoint Ordering GT -> case r -q r -> r -> Ordering +q r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -532,7 +532,7 @@ EQ Ordering EQ -> if interval -iinterval +iinterval -> Getting EndPointType interval EndPointType -> EndPointType forall s a. s -> Getting a s a -> a ^.(EndPointOf interval -> Const EndPointType (EndPointOf interval)) @@ -577,17 +577,17 @@ -- OnEnd -- >>> 10 `compareIntervalExact` (ClosedInterval 0 1) -- After -compareIntervalExact :: (Ord r, Interval_ interval r) => r -> interval -> CompareInterval +compareIntervalExact :: (Ord r, Interval_ interval r) => r -> interval -> CompareInterval compareIntervalExact :: forall r interval. (Ord r, Interval_ interval r) => r -> interval -> CompareInterval -compareIntervalExact r -q interval -i = case r -q r -> r -> Ordering +compareIntervalExact r +q interval +i = case r +q r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p @@ -601,10 +601,10 @@ OnStart Ordering GT -> case r -q r -> r -> Ordering +q r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -622,7 +622,7 @@ -- | Data type to represent the result of where a point is with respect to an interval. data CompareInterval = Before | OnStart | Interior | OnEnd | After - deriving (Int -> CompareInterval -> ShowS + deriving (Int -> CompareInterval -> ShowS [CompareInterval] -> ShowS CompareInterval -> String (Int -> CompareInterval -> ShowS) @@ -637,7 +637,7 @@ show :: CompareInterval -> String $cshowList :: [CompareInterval] -> ShowS showList :: [CompareInterval] -> ShowS -Show,ReadPrec [CompareInterval] +Show,ReadPrec [CompareInterval] ReadPrec CompareInterval Int -> ReadS CompareInterval ReadS [CompareInterval] @@ -657,7 +657,7 @@ readPrec :: ReadPrec CompareInterval $creadListPrec :: ReadPrec [CompareInterval] readListPrec :: ReadPrec [CompareInterval] -Read,CompareInterval -> CompareInterval -> Bool +Read,CompareInterval -> CompareInterval -> Bool (CompareInterval -> CompareInterval -> Bool) -> (CompareInterval -> CompareInterval -> Bool) -> Eq CompareInterval @@ -666,7 +666,7 @@ == :: CompareInterval -> CompareInterval -> Bool $c/= :: CompareInterval -> CompareInterval -> Bool /= :: CompareInterval -> CompareInterval -> Bool -Eq,Eq CompareInterval +Eq,Eq CompareInterval Eq CompareInterval => (CompareInterval -> CompareInterval -> Ordering) -> (CompareInterval -> CompareInterval -> Bool) @@ -706,14 +706,14 @@ Ord) -- | Shifts the interval to the left by delta -shiftLeft :: ( Num r, Interval_ interval r) => r -> interval -> interval +shiftLeft :: ( Num r, Interval_ interval r) => r -> interval -> interval shiftLeft :: forall r interval. (Num r, Interval_ interval r) => r -> interval -> interval -shiftLeft r -delta interval -i = interval -iinterval -> (interval -> interval) -> interval +shiftLeft r +delta interval +i = interval +iinterval -> (interval -> interval) -> interval forall a b. a -> (a -> b) -> b &(r -> Identity r) -> interval -> Identity interval forall seg p. HasStart seg p => Lens' seg p @@ -724,7 +724,7 @@ %~ r -> r -> r forall a. Num a => a -> a -> a subtract r -delta +delta interval -> (interval -> interval) -> interval forall a b. a -> (a -> b) -> b &(r -> Identity r) -> interval -> Identity interval @@ -736,17 +736,17 @@ %~ r -> r -> r forall a. Num a => a -> a -> a subtract r -delta +delta -- | Shifts the interval to the right by delta -shiftRight :: ( Num r, Interval_ interval r ) => r -> interval -> interval +shiftRight :: ( Num r, Interval_ interval r ) => r -> interval -> interval shiftRight :: forall r interval. (Num r, Interval_ interval r) => r -> interval -> interval -shiftRight r -delta interval -i = interval -iinterval -> (interval -> interval) -> interval +shiftRight r +delta interval +i = interval +iinterval -> (interval -> interval) -> interval forall a b. a -> (a -> b) -> b &(r -> Identity r) -> interval -> Identity interval forall seg p. HasStart seg p => Lens' seg p @@ -757,7 +757,7 @@ %~ (r -> r -> r forall a. Num a => a -> a -> a + r -delta) +delta) interval -> (interval -> interval) -> interval forall a b. a -> (a -> b) -> b &(r -> Identity r) -> interval -> Identity interval @@ -769,18 +769,18 @@ %~ (r -> r -> r forall a. Num a => a -> a -> a + r -delta) +delta) -- -- | Flips the start and endpoint of the interval. -- flipInterval :: Interval_ interval r => interval -> interval -- flipInterval = uncurry mkInterval . swap . startAndEndPoint -- | Get the duration, or length of an interval. -duration :: (Interval_ interval r, Num r) => interval -> r +duration :: (Interval_ interval r, Num r) => interval -> r duration :: forall interval r. (Interval_ interval r, Num r) => interval -> r -duration interval -i = interval -iinterval -> Getting r interval r -> r +duration interval +i = interval +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -788,7 +788,7 @@ end r -> r -> r forall a. Num a => a -> a -> a - interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p @@ -798,8 +798,8 @@ -------------------------------------------------------------------------------- -instance HasStart seg p => HasStart (seg :+ extra) p where - start :: Lens' (seg :+ extra) p +instance HasStart seg p => HasStart (seg :+ extra) p where + start :: Lens' (seg :+ extra) p start = (seg -> f seg) -> (seg :+ extra) -> f (seg :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -814,8 +814,8 @@ forall seg p. HasStart seg p => Lens' seg p Lens' seg p start -instance HasEnd seg p => HasEnd (seg :+ extra) p where - end :: Lens' (seg :+ extra) p +instance HasEnd seg p => HasEnd (seg :+ extra) p where + end :: Lens' (seg :+ extra) p end = (seg -> f seg) -> (seg :+ extra) -> f (seg :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -830,8 +830,8 @@ forall seg p. HasEnd seg p => Lens' seg p Lens' seg p end -instance HasStartPoint seg p => HasStartPoint (seg :+ extra) p where - startPoint :: Lens' (seg :+ extra) p +instance HasStartPoint seg p => HasStartPoint (seg :+ extra) p where + startPoint :: Lens' (seg :+ extra) p startPoint = (seg -> f seg) -> (seg :+ extra) -> f (seg :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -846,8 +846,8 @@ forall seg p. HasStartPoint seg p => Lens' seg p Lens' seg p startPoint -instance HasEndPoint seg p => HasEndPoint (seg :+ extra) p where - endPoint :: Lens' (seg :+ extra) p +instance HasEndPoint seg p => HasEndPoint (seg :+ extra) p where + endPoint :: Lens' (seg :+ extra) p endPoint = (seg -> f seg) -> (seg :+ extra) -> f (seg :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -863,73 +863,73 @@ Lens' seg p endPoint -type instance StartPointOf (interval :+ extra) = StartPointOf interval -type instance EndPointOf (interval :+ extra) = EndPointOf interval +type instance StartPointOf (interval :+ extra) = StartPointOf interval +type instance EndPointOf (interval :+ extra) = EndPointOf interval -instance ( IntervalLike_ interval point - ) => IntervalLike_ (interval :+ extra) point where +instance ( IntervalLike_ interval point + ) => IntervalLike_ (interval :+ extra) point where -instance ( Interval_ interval r - ) => Interval_ (interval :+ extra) r +instance ( Interval_ interval r + ) => Interval_ (interval :+ extra) r -instance ( ClosedInterval_ interval r - ) => ClosedInterval_ (interval :+ extra) r +instance ( ClosedInterval_ interval r + ) => ClosedInterval_ (interval :+ extra) r -instance ( OpenInterval_ interval r - ) => OpenInterval_ (interval :+ extra) r +instance ( OpenInterval_ interval r + ) => OpenInterval_ (interval :+ extra) r -instance ( ConstructableInterval_ interval point - , Default extra - ) => ConstructableInterval_ (interval :+ extra) point where - mkInterval :: StartPointOf (interval :+ extra) +instance ( ConstructableInterval_ interval point + , Default extra + ) => ConstructableInterval_ (interval :+ extra) point where + mkInterval :: StartPointOf (interval :+ extra) -> EndPointOf (interval :+ extra) -> interval :+ extra -mkInterval StartPointOf (interval :+ extra) -s EndPointOf (interval :+ extra) -t = StartPointOf interval -> EndPointOf interval -> interval +mkInterval StartPointOf (interval :+ extra) +s EndPointOf (interval :+ extra) +t = StartPointOf interval -> EndPointOf interval -> interval forall interval point. ConstructableInterval_ interval point => StartPointOf interval -> EndPointOf interval -> interval mkInterval StartPointOf interval StartPointOf (interval :+ extra) -s EndPointOf interval +s EndPointOf interval EndPointOf (interval :+ extra) -t interval -> extra -> interval :+ extra +t interval -> extra -> interval :+ extra forall core extra. core -> extra -> core :+ extra :+ extra forall a. Default a => a def -instance ( ConstructableClosedInterval_ interval r - , Default extra - ) => ConstructableClosedInterval_ (interval :+ extra) r where - mkClosedInterval :: r -> r -> interval :+ extra -mkClosedInterval r -s r -t = r -> r -> interval +instance ( ConstructableClosedInterval_ interval r + , Default extra + ) => ConstructableClosedInterval_ (interval :+ extra) r where + mkClosedInterval :: r -> r -> interval :+ extra +mkClosedInterval r +s r +t = r -> r -> interval forall interval r. ConstructableClosedInterval_ interval r => r -> r -> interval mkClosedInterval r -s r -t interval -> extra -> interval :+ extra +s r +t interval -> extra -> interval :+ extra forall core extra. core -> extra -> core :+ extra :+ extra forall a. Default a => a def -instance ( ConstructableOpenInterval_ interval r - , Default extra - ) => ConstructableOpenInterval_ (interval :+ extra) r where - mkOpenInterval :: r -> r -> interval :+ extra -mkOpenInterval r -s r -t = r -> r -> interval +instance ( ConstructableOpenInterval_ interval r + , Default extra + ) => ConstructableOpenInterval_ (interval :+ extra) r where + mkOpenInterval :: r -> r -> interval :+ extra +mkOpenInterval r +s r +t = r -> r -> interval forall interval r. ConstructableOpenInterval_ interval r => r -> r -> interval mkOpenInterval r -s r -t interval -> extra -> interval :+ extra +s r +t interval -> extra -> interval :+ extra forall core extra. core -> extra -> core :+ extra :+ extra forall a. Default a => a diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Interval.EndPoint.html b/haddocks/hgeometry/kernel/src/HGeometry.Interval.EndPoint.html index b5d88c52c..962dbd2e5 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Interval.EndPoint.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Interval.EndPoint.html @@ -1,4 +1,4 @@ -
{-# LANGUAGE AllowAmbiguousTypes  #-}
+
{-# LANGUAGE AllowAmbiguousTypes  #-}
 {-# LANGUAGE UndecidableInstances #-}
 --------------------------------------------------------------------------------
 -- |
@@ -29,19 +29,19 @@
 --------------------------------------------------------------------------------
 
 -- | Types that have an '_endPoint' field lens.
-class IsEndPoint endPoint endPoint' where
+class IsEndPoint endPoint endPoint' where
   -- | Lens to access the actual data value of the end point
-  _endPoint :: Lens endPoint endPoint' (IxValue endPoint) (IxValue endPoint')
+  _endPoint :: Lens endPoint endPoint' (IxValue endPoint) (IxValue endPoint')
 
 -- | An endpoint storing values of some type r
-class IsEndPoint endPoint endPoint => EndPoint_ endPoint where
+class IsEndPoint endPoint endPoint => EndPoint_ endPoint where
   -- | Report the type of the endpoint
-  endPointType :: endPoint -> EndPointType
+  endPointType :: endPoint -> EndPointType
   -- | constructs a "default" enpoint
-  mkEndPoint :: IxValue endPoint -> endPoint
+  mkEndPoint :: IxValue endPoint -> endPoint
 
 -- | Possible endpoint types; open or closed
-data EndPointType = Open | Closed deriving (Int -> EndPointType -> ShowS
+data EndPointType = Open | Closed deriving (Int -> EndPointType -> ShowS
 [EndPointType] -> ShowS
 EndPointType -> String
 (Int -> EndPointType -> ShowS)
@@ -56,7 +56,7 @@
 show :: EndPointType -> String
 $cshowList :: [EndPointType] -> ShowS
 showList :: [EndPointType] -> ShowS
-Show,ReadPrec [EndPointType]
+Show,ReadPrec [EndPointType]
 ReadPrec EndPointType
 Int -> ReadS EndPointType
 ReadS [EndPointType]
@@ -76,7 +76,7 @@
 readPrec :: ReadPrec EndPointType
 $creadListPrec :: ReadPrec [EndPointType]
 readListPrec :: ReadPrec [EndPointType]
-Read,EndPointType -> EndPointType -> Bool
+Read,EndPointType -> EndPointType -> Bool
 (EndPointType -> EndPointType -> Bool)
 -> (EndPointType -> EndPointType -> Bool) -> Eq EndPointType
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -84,7 +84,7 @@
 == :: EndPointType -> EndPointType -> Bool
 $c/= :: EndPointType -> EndPointType -> Bool
 /= :: EndPointType -> EndPointType -> Bool
-Eq,Eq EndPointType
+Eq,Eq EndPointType
 Eq EndPointType =>
 (EndPointType -> EndPointType -> Ordering)
 -> (EndPointType -> EndPointType -> Bool)
@@ -121,7 +121,7 @@
 max :: EndPointType -> EndPointType -> EndPointType
 $cmin :: EndPointType -> EndPointType -> EndPointType
 min :: EndPointType -> EndPointType -> EndPointType
-Ord,Int -> EndPointType
+Ord,Int -> EndPointType
 EndPointType -> Int
 EndPointType -> [EndPointType]
 EndPointType -> EndPointType
@@ -162,14 +162,14 @@
 enumFromTo :: EndPointType -> EndPointType -> [EndPointType]
 $cenumFromThenTo :: EndPointType -> EndPointType -> EndPointType -> [EndPointType]
 enumFromThenTo :: EndPointType -> EndPointType -> EndPointType -> [EndPointType]
-Enum,EndPointType
+Enum,EndPointType
 EndPointType -> EndPointType -> Bounded EndPointType
 forall a. a -> a -> Bounded a
 $cminBound :: EndPointType
 minBound :: EndPointType
 $cmaxBound :: EndPointType
 maxBound :: EndPointType
-Bounded,(forall x. EndPointType -> Rep EndPointType x)
+Bounded,(forall x. EndPointType -> Rep EndPointType x)
 -> (forall x. Rep EndPointType x -> EndPointType)
 -> Generic EndPointType
 forall x. Rep EndPointType x -> EndPointType
@@ -192,8 +192,8 @@
 --------------------------------------------------------------------------------
 
 -- | EndPoint with a type safe tag
-newtype EndPoint (et :: EndPointType) r = EndPoint r
-  deriving stock (EndPoint et r -> EndPoint et r -> Bool
+newtype EndPoint (et :: EndPointType) r = EndPoint r
+  deriving stock (EndPoint et r -> EndPoint et r -> Bool
 (EndPoint et r -> EndPoint et r -> Bool)
 -> (EndPoint et r -> EndPoint et r -> Bool) -> Eq (EndPoint et r)
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -208,7 +208,7 @@
 Eq r =>
 EndPoint et r -> EndPoint et r -> Bool
 /= :: EndPoint et r -> EndPoint et r -> Bool
-Eq,Eq (EndPoint et r)
+Eq,Eq (EndPoint et r)
 Eq (EndPoint et r) =>
 (EndPoint et r -> EndPoint et r -> Ordering)
 -> (EndPoint et r -> EndPoint et r -> Bool)
@@ -269,7 +269,7 @@
 Ord r =>
 EndPoint et r -> EndPoint et r -> EndPoint et r
 min :: EndPoint et r -> EndPoint et r -> EndPoint et r
-Ord,(forall a b. (a -> b) -> EndPoint et a -> EndPoint et b)
+Ord,(forall a b. (a -> b) -> EndPoint et a -> EndPoint et b)
 -> (forall a b. a -> EndPoint et b -> EndPoint et a)
 -> Functor (EndPoint et)
 forall a b. a -> EndPoint et b -> EndPoint et a
@@ -287,7 +287,7 @@
 $c<$ :: forall (et :: EndPointType) a b.
 a -> EndPoint et b -> EndPoint et a
 <$ :: forall a b. a -> EndPoint et b -> EndPoint et a
-Functor,(forall m. Monoid m => EndPoint et m -> m)
+Functor,(forall m. Monoid m => EndPoint et m -> m)
 -> (forall m a. Monoid m => (a -> m) -> EndPoint et a -> m)
 -> (forall m a. Monoid m => (a -> m) -> EndPoint et a -> m)
 -> (forall a b. (a -> b -> b) -> b -> EndPoint et a -> b)
@@ -392,7 +392,7 @@
 sum :: forall a. Num a => EndPoint et a -> a
 $cproduct :: forall (et :: EndPointType) a. Num a => EndPoint et a -> a
 product :: forall a. Num a => EndPoint et a -> a
-Foldable,Functor (EndPoint et)
+Foldable,Functor (EndPoint et)
 Foldable (EndPoint et)
 (Functor (EndPoint et), Foldable (EndPoint et)) =>
 (forall (f :: * -> *) a b.
@@ -469,7 +469,7 @@
 sequence :: forall (m :: * -> *) a.
 Monad m =>
 EndPoint et (m a) -> m (EndPoint et a)
-Traversable,(forall x. EndPoint et r -> Rep (EndPoint et r) x)
+Traversable,(forall x. EndPoint et r -> Rep (EndPoint et r) x)
 -> (forall x. Rep (EndPoint et r) x -> EndPoint et r)
 -> Generic (EndPoint et r)
 forall x. Rep (EndPoint et r) x -> EndPoint et r
@@ -488,16 +488,16 @@
 to :: forall x. Rep (EndPoint et r) x -> EndPoint et r
 Generic)
 
-instance Show r => Show (EndPoint Closed r) where
-  showsPrec :: Int -> EndPoint 'Closed r -> ShowS
-showsPrec = String -> Int -> EndPoint 'Closed r -> ShowS
+instance Show r => Show (EndPoint Closed r) where
+  showsPrec :: Int -> EndPoint 'Closed r -> ShowS
+showsPrec = String -> Int -> EndPoint 'Closed r -> ShowS
 forall r (et :: EndPointType).
 Show r =>
 String -> Int -> EndPoint et r -> ShowS
 showsPrecImpl String
 "ClosedE"
-instance Show r => Show (EndPoint Open r) where
-  showsPrec :: Int -> EndPoint 'Open r -> ShowS
+instance Show r => Show (EndPoint Open r) where
+  showsPrec :: Int -> EndPoint 'Open r -> ShowS
 showsPrec = String -> Int -> EndPoint 'Open r -> ShowS
 forall r (et :: EndPointType).
 Show r =>
@@ -506,16 +506,16 @@
 "OpenE"
 
 -- | Implementation for Show
-showsPrecImpl                        :: Show r => String -> Int -> EndPoint et r -> ShowS
+showsPrecImpl                        :: Show r => String -> Int -> EndPoint et r -> ShowS
 showsPrecImpl :: forall r (et :: EndPointType).
 Show r =>
 String -> Int -> EndPoint et r -> ShowS
-showsPrecImpl String
-ctrName Int
-k (EndPoint r
-x) = Bool -> ShowS -> ShowS
+showsPrecImpl String
+ctrName Int
+k (EndPoint r
+x) = Bool -> ShowS -> ShowS
 showParen (Int
-k Int -> Int -> Bool
+k Int -> Int -> Bool
 forall a. Ord a => a -> a -> Bool
 > Int
 app_prec) (ShowS -> ShowS) -> ShowS -> ShowS
@@ -523,7 +523,7 @@
 $
                                            String -> ShowS
 showString String
-ctrName
+ctrName
                                          ShowS -> ShowS -> ShowS
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Char -> ShowS
@@ -538,7 +538,7 @@
 forall a. Num a => a -> a -> a
 +Int
 1) r
-x
+x
 
 -- | application precedence
 app_prec :: Int
@@ -546,9 +546,9 @@
 app_prec = Int
 10
 
-instance Read r => Read (EndPoint Closed r) where
-  readPrec :: ReadPrec (EndPoint 'Closed r)
-readPrec = ReadPrec (EndPoint 'Closed r) -> ReadPrec (EndPoint 'Closed r)
+instance Read r => Read (EndPoint Closed r) where
+  readPrec :: ReadPrec (EndPoint 'Closed r)
+readPrec = ReadPrec (EndPoint 'Closed r) -> ReadPrec (EndPoint 'Closed r)
 forall a. ReadPrec a -> ReadPrec a
 parens (ReadPrec (EndPoint 'Closed r) -> ReadPrec (EndPoint 'Closed r))
 -> ReadPrec (EndPoint 'Closed r) -> ReadPrec (EndPoint 'Closed r)
@@ -564,8 +564,8 @@
                           Ident String
 "ClosedE" <- ReadPrec Lexeme
 lexP
-                          r
-p <- ReadPrec r -> ReadPrec r
+                          r
+p <- ReadPrec r -> ReadPrec r
 forall a. ReadPrec a -> ReadPrec a
 step ReadPrec r
 forall a. Read a => ReadPrec a
@@ -576,10 +576,10 @@
 return (r -> EndPoint 'Closed r
 forall r. r -> EndPoint 'Closed r
 ClosedE r
-p))
+p))
 
-instance Read r => Read (EndPoint Open r) where
-  readPrec :: ReadPrec (EndPoint 'Open r)
+instance Read r => Read (EndPoint Open r) where
+  readPrec :: ReadPrec (EndPoint 'Open r)
 readPrec = ReadPrec (EndPoint 'Open r) -> ReadPrec (EndPoint 'Open r)
 forall a. ReadPrec a -> ReadPrec a
 parens (ReadPrec (EndPoint 'Open r) -> ReadPrec (EndPoint 'Open r))
@@ -595,8 +595,8 @@
                           Ident String
 "OpenE" <- ReadPrec Lexeme
 lexP
-                          r
-p <- ReadPrec r -> ReadPrec r
+                          r
+p <- ReadPrec r -> ReadPrec r
 forall a. ReadPrec a -> ReadPrec a
 step ReadPrec r
 forall a. Read a => ReadPrec a
@@ -607,37 +607,37 @@
 return (r -> EndPoint 'Open r
 forall r. r -> EndPoint 'Open r
 OpenE r
-p))
+p))
 
-instance Foldable1 (EndPoint et) where
-  foldMap1 :: forall m a. Semigroup m => (a -> m) -> EndPoint et a -> m
-foldMap1 a -> m
-f (EndPoint a
-x) = a -> m
-f a
-x
-instance Traversable1 (EndPoint et) where
-  traverse1 :: forall (f :: * -> *) a b.
+instance Foldable1 (EndPoint et) where
+  foldMap1 :: forall m a. Semigroup m => (a -> m) -> EndPoint et a -> m
+foldMap1 a -> m
+f (EndPoint a
+x) = a -> m
+f a
+x
+instance Traversable1 (EndPoint et) where
+  traverse1 :: forall (f :: * -> *) a b.
 Apply f =>
 (a -> f b) -> EndPoint et a -> f (EndPoint et b)
-traverse1 a -> f b
-f (EndPoint a
-x) = b -> EndPoint et b
+traverse1 a -> f b
+f (EndPoint a
+x) = b -> EndPoint et b
 forall (et :: EndPointType) r. r -> EndPoint et r
 EndPoint (b -> EndPoint et b) -> f b -> f (EndPoint et b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> a -> f b
-f a
-x
+f a
+x
 
 
-type instance NumType   (EndPoint et r) = r
-type instance IxValue   (EndPoint et r) = r
+type instance NumType   (EndPoint et r) = r
+type instance IxValue   (EndPoint et r) = r
 
 
 -- | Class for types that have '_endPoint' field.
-instance IsEndPoint (EndPoint et r) (EndPoint et r') where
-  _endPoint :: Lens
+instance IsEndPoint (EndPoint et r) (EndPoint et r') where
+  _endPoint :: Lens
   (EndPoint et r)
   (EndPoint et r')
   (IxValue (EndPoint et r))
@@ -646,54 +646,54 @@
 -> (EndPoint et r -> r' -> EndPoint et r')
 -> Lens (EndPoint et r) (EndPoint et r') r r'
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens (\(EndPoint r
-x) -> r
-x) (\EndPoint et r
-_ r'
-x -> r' -> EndPoint et r'
+lens (\(EndPoint r
+x) -> r
+x) (\EndPoint et r
+_ r'
+x -> r' -> EndPoint et r'
 forall (et :: EndPointType) r. r -> EndPoint et r
 EndPoint r'
-x)
+x)
 
-instance EndPoint_ (EndPoint Closed r) where
-  endPointType :: EndPoint 'Closed r -> EndPointType
+instance EndPoint_ (EndPoint Closed r) where
+  endPointType :: EndPoint 'Closed r -> EndPointType
 endPointType EndPoint 'Closed r
 _ = EndPointType
 Closed
-  mkEndPoint :: IxValue (EndPoint 'Closed r) -> EndPoint 'Closed r
+  mkEndPoint :: IxValue (EndPoint 'Closed r) -> EndPoint 'Closed r
 mkEndPoint = r -> EndPoint 'Closed r
 IxValue (EndPoint 'Closed r) -> EndPoint 'Closed r
 forall (et :: EndPointType) r. r -> EndPoint et r
 EndPoint
 
-instance EndPoint_ (EndPoint Open r) where
-  endPointType :: EndPoint 'Open r -> EndPointType
+instance EndPoint_ (EndPoint Open r) where
+  endPointType :: EndPoint 'Open r -> EndPointType
 endPointType EndPoint 'Open r
 _ = EndPointType
 Open
-  mkEndPoint :: IxValue (EndPoint 'Open r) -> EndPoint 'Open r
+  mkEndPoint :: IxValue (EndPoint 'Open r) -> EndPoint 'Open r
 mkEndPoint = r -> EndPoint 'Open r
 IxValue (EndPoint 'Open r) -> EndPoint 'Open r
 forall (et :: EndPointType) r. r -> EndPoint et r
 EndPoint
 
 -- | Constructs a closed endpoint
-pattern ClosedE   :: r -> EndPoint Closed r
+pattern ClosedE   :: r -> EndPoint Closed r
 pattern $mClosedE :: forall {r} {r}. EndPoint 'Closed r -> (r -> r) -> ((# #) -> r) -> r
 $bClosedE :: forall r. r -> EndPoint 'Closed r
-ClosedE x = EndPoint x
+ClosedE x = EndPoint x
 {-# COMPLETE ClosedE #-}
 
 -- | Constructs an Open endpoint
-pattern OpenE   :: r -> EndPoint Open r
+pattern OpenE   :: r -> EndPoint Open r
 pattern $mOpenE :: forall {r} {r}. EndPoint 'Open r -> (r -> r) -> ((# #) -> r) -> r
 $bOpenE :: forall r. r -> EndPoint 'Open r
-OpenE x = EndPoint x
+OpenE x = EndPoint x
 {-# COMPLETE OpenE #-}
 
 -- | Data type modelling an endpoint that can both be open and closed.
-data AnEndPoint r = AnEndPoint {-# UNPACK #-} !EndPointType !r
-                  deriving (Int -> AnEndPoint r -> ShowS
+data AnEndPoint r = AnEndPoint {-# UNPACK #-} !EndPointType !r
+                  deriving (Int -> AnEndPoint r -> ShowS
 [AnEndPoint r] -> ShowS
 AnEndPoint r -> String
 (Int -> AnEndPoint r -> ShowS)
@@ -711,7 +711,7 @@
 show :: AnEndPoint r -> String
 $cshowList :: forall r. Show r => [AnEndPoint r] -> ShowS
 showList :: [AnEndPoint r] -> ShowS
-Show,ReadPrec [AnEndPoint r]
+Show,ReadPrec [AnEndPoint r]
 ReadPrec (AnEndPoint r)
 Int -> ReadS (AnEndPoint r)
 ReadS [AnEndPoint r]
@@ -735,7 +735,7 @@
 readPrec :: ReadPrec (AnEndPoint r)
 $creadListPrec :: forall r. Read r => ReadPrec [AnEndPoint r]
 readListPrec :: ReadPrec [AnEndPoint r]
-Read,AnEndPoint r -> AnEndPoint r -> Bool
+Read,AnEndPoint r -> AnEndPoint r -> Bool
 (AnEndPoint r -> AnEndPoint r -> Bool)
 -> (AnEndPoint r -> AnEndPoint r -> Bool) -> Eq (AnEndPoint r)
 forall r. Eq r => AnEndPoint r -> AnEndPoint r -> Bool
@@ -744,7 +744,7 @@
 == :: AnEndPoint r -> AnEndPoint r -> Bool
 $c/= :: forall r. Eq r => AnEndPoint r -> AnEndPoint r -> Bool
 /= :: AnEndPoint r -> AnEndPoint r -> Bool
-Eq,Eq (AnEndPoint r)
+Eq,Eq (AnEndPoint r)
 Eq (AnEndPoint r) =>
 (AnEndPoint r -> AnEndPoint r -> Ordering)
 -> (AnEndPoint r -> AnEndPoint r -> Bool)
@@ -785,7 +785,7 @@
 max :: AnEndPoint r -> AnEndPoint r -> AnEndPoint r
 $cmin :: forall r. Ord r => AnEndPoint r -> AnEndPoint r -> AnEndPoint r
 min :: AnEndPoint r -> AnEndPoint r -> AnEndPoint r
-Ord,(forall a b. (a -> b) -> AnEndPoint a -> AnEndPoint b)
+Ord,(forall a b. (a -> b) -> AnEndPoint a -> AnEndPoint b)
 -> (forall a b. a -> AnEndPoint b -> AnEndPoint a)
 -> Functor AnEndPoint
 forall a b. a -> AnEndPoint b -> AnEndPoint a
@@ -797,7 +797,7 @@
 fmap :: forall a b. (a -> b) -> AnEndPoint a -> AnEndPoint b
 $c<$ :: forall a b. a -> AnEndPoint b -> AnEndPoint a
 <$ :: forall a b. a -> AnEndPoint b -> AnEndPoint a
-Functor,(forall m. Monoid m => AnEndPoint m -> m)
+Functor,(forall m. Monoid m => AnEndPoint m -> m)
 -> (forall m a. Monoid m => (a -> m) -> AnEndPoint a -> m)
 -> (forall m a. Monoid m => (a -> m) -> AnEndPoint a -> m)
 -> (forall a b. (a -> b -> b) -> b -> AnEndPoint a -> b)
@@ -879,7 +879,7 @@
 sum :: forall a. Num a => AnEndPoint a -> a
 $cproduct :: forall a. Num a => AnEndPoint a -> a
 product :: forall a. Num a => AnEndPoint a -> a
-Foldable,Functor AnEndPoint
+Foldable,Functor AnEndPoint
 Foldable AnEndPoint
 (Functor AnEndPoint, Foldable AnEndPoint) =>
 (forall (f :: * -> *) a b.
@@ -942,7 +942,7 @@
 sequence :: forall (m :: * -> *) a.
 Monad m =>
 AnEndPoint (m a) -> m (AnEndPoint a)
-Traversable,(forall x. AnEndPoint r -> Rep (AnEndPoint r) x)
+Traversable,(forall x. AnEndPoint r -> Rep (AnEndPoint r) x)
 -> (forall x. Rep (AnEndPoint r) x -> AnEndPoint r)
 -> Generic (AnEndPoint r)
 forall x. Rep (AnEndPoint r) x -> AnEndPoint r
@@ -957,51 +957,51 @@
 to :: forall x. Rep (AnEndPoint r) x -> AnEndPoint r
 Generic)
 
-type instance NumType (AnEndPoint r) = r
-type instance IxValue (AnEndPoint r) = r
+type instance NumType (AnEndPoint r) = r
+type instance IxValue (AnEndPoint r) = r
 
 
 -- | Constructs a closed endpoint
-pattern AnClosedE   :: r -> AnEndPoint r
+pattern AnClosedE   :: r -> AnEndPoint r
 pattern $mAnClosedE :: forall {r} {r}. AnEndPoint r -> (r -> r) -> ((# #) -> r) -> r
 $bAnClosedE :: forall r. r -> AnEndPoint r
-AnClosedE x = AnEndPoint Closed x
+AnClosedE x = AnEndPoint Closed x
 
 -- | Constructs an Open endpoint
-pattern AnOpenE   :: r -> AnEndPoint r
+pattern AnOpenE   :: r -> AnEndPoint r
 pattern $mAnOpenE :: forall {r} {r}. AnEndPoint r -> (r -> r) -> ((# #) -> r) -> r
 $bAnOpenE :: forall r. r -> AnEndPoint r
-AnOpenE x = AnEndPoint Open x
+AnOpenE x = AnEndPoint Open x
 
 -- type instance VectorFamily d (AnEndPoint r) = Boxed.Vector d (AnEndPoint r)
 
-instance Foldable1 AnEndPoint where
-  foldMap1 :: forall m a. Semigroup m => (a -> m) -> AnEndPoint a -> m
-foldMap1 a -> m
-f (AnEndPoint EndPointType
-_ a
-x) = a -> m
-f a
-x
-instance Traversable1 AnEndPoint where
-  traverse1 :: forall (f :: * -> *) a b.
+instance Foldable1 AnEndPoint where
+  foldMap1 :: forall m a. Semigroup m => (a -> m) -> AnEndPoint a -> m
+foldMap1 a -> m
+f (AnEndPoint EndPointType
+_ a
+x) = a -> m
+f a
+x
+instance Traversable1 AnEndPoint where
+  traverse1 :: forall (f :: * -> *) a b.
 Apply f =>
 (a -> f b) -> AnEndPoint a -> f (AnEndPoint b)
-traverse1 a -> f b
-f (AnEndPoint EndPointType
-et a
-x) = EndPointType -> b -> AnEndPoint b
+traverse1 a -> f b
+f (AnEndPoint EndPointType
+et a
+x) = EndPointType -> b -> AnEndPoint b
 forall r. EndPointType -> r -> AnEndPoint r
 AnEndPoint EndPointType
-et (b -> AnEndPoint b) -> f b -> f (AnEndPoint b)
+et (b -> AnEndPoint b) -> f b -> f (AnEndPoint b)
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> a -> f b
-f a
-x
+f a
+x
 
 
-instance IsEndPoint (AnEndPoint r) (AnEndPoint r') where
-  _endPoint :: Lens
+instance IsEndPoint (AnEndPoint r) (AnEndPoint r') where
+  _endPoint :: Lens
   (AnEndPoint r)
   (AnEndPoint r')
   (IxValue (AnEndPoint r))
@@ -1011,45 +1011,45 @@
 -> Lens (AnEndPoint r) (AnEndPoint r') r r'
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
 lens (\(AnEndPoint EndPointType
-_ r
-p) -> r
-p) (\(AnEndPoint EndPointType
-t r
-_) r'
-p -> EndPointType -> r' -> AnEndPoint r'
+_ r
+p) -> r
+p) (\(AnEndPoint EndPointType
+t r
+_) r'
+p -> EndPointType -> r' -> AnEndPoint r'
 forall r. EndPointType -> r -> AnEndPoint r
 AnEndPoint EndPointType
-t r'
-p)
+t r'
+p)
 
-instance EndPoint_ (AnEndPoint r) where
-  endPointType :: AnEndPoint r -> EndPointType
-endPointType (AnEndPoint EndPointType
-t r
+instance EndPoint_ (AnEndPoint r) where
+  endPointType :: AnEndPoint r -> EndPointType
+endPointType (AnEndPoint EndPointType
+t r
 _) = EndPointType
-t
+t
   -- | By default we consider endpoints closed
-  mkEndPoint :: IxValue (AnEndPoint r) -> AnEndPoint r
+  mkEndPoint :: IxValue (AnEndPoint r) -> AnEndPoint r
 mkEndPoint = EndPointType -> r -> AnEndPoint r
 forall r. EndPointType -> r -> AnEndPoint r
 AnEndPoint EndPointType
 Closed
 
 -- | Convert the endpoint into a, AnEndPoint
-asAnEndPoint   :: EndPoint_ endPoint => endPoint -> AnEndPoint (IxValue endPoint)
+asAnEndPoint   :: EndPoint_ endPoint => endPoint -> AnEndPoint (IxValue endPoint)
 asAnEndPoint :: forall endPoint.
 EndPoint_ endPoint =>
 endPoint -> AnEndPoint (IxValue endPoint)
-asAnEndPoint endPoint
-p = case endPoint -> EndPointType
+asAnEndPoint endPoint
+p = case endPoint -> EndPointType
 forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType
 endPointType endPoint
-p of
+p of
                    EndPointType
 Closed -> IxValue endPoint -> AnEndPoint (IxValue endPoint)
 forall r. r -> AnEndPoint r
 AnClosedE (endPoint
-pendPoint
+pendPoint
 -> Getting (IxValue endPoint) endPoint (IxValue endPoint)
 -> IxValue endPoint
 forall s a. s -> Getting a s a -> a
@@ -1063,7 +1063,7 @@
 Open   -> IxValue endPoint -> AnEndPoint (IxValue endPoint)
 forall r. r -> AnEndPoint r
 AnOpenE   (endPoint
-pendPoint
+pendPoint
 -> Getting (IxValue endPoint) endPoint (IxValue endPoint)
 -> IxValue endPoint
 forall s a. s -> Getting a s a -> a
diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Interval.HalfOpen.html b/haddocks/hgeometry/kernel/src/HGeometry.Interval.HalfOpen.html
index 9c7cd70bf..dbd6838d1 100644
--- a/haddocks/hgeometry/kernel/src/HGeometry.Interval.HalfOpen.html
+++ b/haddocks/hgeometry/kernel/src/HGeometry.Interval.HalfOpen.html
@@ -29,12 +29,12 @@
 --------------------------------------------------------------------------------
 
 -- | An interval that is open on the left and closed on the right
-data HalfOpenInterval r = HalfOpenInterval { forall r. HalfOpenInterval r -> EndPoint 'Open r
-_left  :: !(EndPoint Open   r)
+data HalfOpenInterval r = HalfOpenInterval { forall r. HalfOpenInterval r -> EndPoint 'Open r
+_left  :: !(EndPoint Open   r)
                                            , forall r. HalfOpenInterval r -> EndPoint 'Closed r
-_right :: !(EndPoint Closed r)
+_right :: !(EndPoint Closed r)
                                            }
-                        deriving (Int -> HalfOpenInterval r -> ShowS
+                        deriving (Int -> HalfOpenInterval r -> ShowS
 [HalfOpenInterval r] -> ShowS
 HalfOpenInterval r -> String
 (Int -> HalfOpenInterval r -> ShowS)
@@ -52,7 +52,7 @@
 show :: HalfOpenInterval r -> String
 $cshowList :: forall r. Show r => [HalfOpenInterval r] -> ShowS
 showList :: [HalfOpenInterval r] -> ShowS
-Show,HalfOpenInterval r -> HalfOpenInterval r -> Bool
+Show,HalfOpenInterval r -> HalfOpenInterval r -> Bool
 (HalfOpenInterval r -> HalfOpenInterval r -> Bool)
 -> (HalfOpenInterval r -> HalfOpenInterval r -> Bool)
 -> Eq (HalfOpenInterval r)
@@ -62,7 +62,7 @@
 == :: HalfOpenInterval r -> HalfOpenInterval r -> Bool
 $c/= :: forall r. Eq r => HalfOpenInterval r -> HalfOpenInterval r -> Bool
 /= :: HalfOpenInterval r -> HalfOpenInterval r -> Bool
-Eq,(forall a b. (a -> b) -> HalfOpenInterval a -> HalfOpenInterval b)
+Eq,(forall a b. (a -> b) -> HalfOpenInterval a -> HalfOpenInterval b)
 -> (forall a b. a -> HalfOpenInterval b -> HalfOpenInterval a)
 -> Functor HalfOpenInterval
 forall a b. a -> HalfOpenInterval b -> HalfOpenInterval a
@@ -74,7 +74,7 @@
 fmap :: forall a b. (a -> b) -> HalfOpenInterval a -> HalfOpenInterval b
 $c<$ :: forall a b. a -> HalfOpenInterval b -> HalfOpenInterval a
 <$ :: forall a b. a -> HalfOpenInterval b -> HalfOpenInterval a
-Functor,(forall m. Monoid m => HalfOpenInterval m -> m)
+Functor,(forall m. Monoid m => HalfOpenInterval m -> m)
 -> (forall m a. Monoid m => (a -> m) -> HalfOpenInterval a -> m)
 -> (forall m a. Monoid m => (a -> m) -> HalfOpenInterval a -> m)
 -> (forall a b. (a -> b -> b) -> b -> HalfOpenInterval a -> b)
@@ -156,7 +156,7 @@
 sum :: forall a. Num a => HalfOpenInterval a -> a
 $cproduct :: forall a. Num a => HalfOpenInterval a -> a
 product :: forall a. Num a => HalfOpenInterval a -> a
-Foldable,Functor HalfOpenInterval
+Foldable,Functor HalfOpenInterval
 Foldable HalfOpenInterval
 (Functor HalfOpenInterval, Foldable HalfOpenInterval) =>
 (forall (f :: * -> *) a b.
@@ -221,14 +221,14 @@
 HalfOpenInterval (m a) -> m (HalfOpenInterval a)
 Traversable)
 
-type instance NumType (HalfOpenInterval r) = r
+type instance NumType (HalfOpenInterval r) = r
 
-type instance StartPointOf (HalfOpenInterval r) = EndPoint Open   r
-type instance EndPointOf  (HalfOpenInterval r)  = EndPoint Closed r
+type instance StartPointOf (HalfOpenInterval r) = EndPoint Open   r
+type instance EndPointOf  (HalfOpenInterval r)  = EndPoint Closed r
 
-instance HasStart (HalfOpenInterval r) r where
-  start :: Lens' (HalfOpenInterval r) r
-start = (EndPoint 'Open r -> f (EndPoint 'Open r))
+instance HasStart (HalfOpenInterval r) r where
+  start :: Lens' (HalfOpenInterval r) r
+start = (EndPoint 'Open r -> f (EndPoint 'Open r))
 -> HalfOpenInterval r -> f (HalfOpenInterval r)
 forall seg p. HasStartPoint seg p => Lens' seg p
 Lens' (HalfOpenInterval r) (EndPoint 'Open r)
@@ -252,9 +252,9 @@
   (IxValue (EndPoint 'Open r))
 _endPoint
 
-instance HasEnd (HalfOpenInterval r) r where
-  end :: Lens' (HalfOpenInterval r) r
-end = (EndPoint 'Closed r -> f (EndPoint 'Closed r))
+instance HasEnd (HalfOpenInterval r) r where
+  end :: Lens' (HalfOpenInterval r) r
+end = (EndPoint 'Closed r -> f (EndPoint 'Closed r))
 -> HalfOpenInterval r -> f (HalfOpenInterval r)
 forall seg p. HasEndPoint seg p => Lens' seg p
 Lens' (HalfOpenInterval r) (EndPoint 'Closed r)
@@ -278,64 +278,64 @@
   (IxValue (EndPoint 'Closed r))
 _endPoint
 
-instance HasStartPoint (HalfOpenInterval r) (EndPoint Open r) where
-  startPoint :: Lens' (HalfOpenInterval r) (EndPoint 'Open r)
+instance HasStartPoint (HalfOpenInterval r) (EndPoint Open r) where
+  startPoint :: Lens' (HalfOpenInterval r) (EndPoint 'Open r)
 startPoint = (HalfOpenInterval r -> EndPoint 'Open r)
 -> (HalfOpenInterval r -> EndPoint 'Open r -> HalfOpenInterval r)
 -> Lens' (HalfOpenInterval r) (EndPoint 'Open r)
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
 lens HalfOpenInterval r -> EndPoint 'Open r
 forall r. HalfOpenInterval r -> EndPoint 'Open r
-_left (\HalfOpenInterval r
-ai EndPoint 'Open r
-x -> HalfOpenInterval r
-ai { _left = x})
+_left (\HalfOpenInterval r
+ai EndPoint 'Open r
+x -> HalfOpenInterval r
+ai { _left = x})
 
-instance HasEndPoint (HalfOpenInterval r) (EndPoint Closed r) where
-  endPoint :: Lens' (HalfOpenInterval r) (EndPoint 'Closed r)
+instance HasEndPoint (HalfOpenInterval r) (EndPoint Closed r) where
+  endPoint :: Lens' (HalfOpenInterval r) (EndPoint 'Closed r)
 endPoint = (HalfOpenInterval r -> EndPoint 'Closed r)
 -> (HalfOpenInterval r -> EndPoint 'Closed r -> HalfOpenInterval r)
 -> Lens' (HalfOpenInterval r) (EndPoint 'Closed r)
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
 lens HalfOpenInterval r -> EndPoint 'Closed r
 forall r. HalfOpenInterval r -> EndPoint 'Closed r
-_right (\HalfOpenInterval r
-ai EndPoint 'Closed r
-x -> HalfOpenInterval r
-ai { _right = x})
+_right (\HalfOpenInterval r
+ai EndPoint 'Closed r
+x -> HalfOpenInterval r
+ai { _right = x})
 
-instance IntervalLike_ (HalfOpenInterval r) r where
+instance IntervalLike_ (HalfOpenInterval r) r where
 
-instance Interval_ (HalfOpenInterval r) r where
+instance Interval_ (HalfOpenInterval r) r where
 
-instance ConstructableInterval_ (HalfOpenInterval r) r where
-  mkInterval :: StartPointOf (HalfOpenInterval r)
+instance ConstructableInterval_ (HalfOpenInterval r) r where
+  mkInterval :: StartPointOf (HalfOpenInterval r)
 -> EndPointOf (HalfOpenInterval r) -> HalfOpenInterval r
-mkInterval = EndPoint 'Open r -> EndPoint 'Closed r -> HalfOpenInterval r
+mkInterval = EndPoint 'Open r -> EndPoint 'Closed r -> HalfOpenInterval r
 StartPointOf (HalfOpenInterval r)
 -> EndPointOf (HalfOpenInterval r) -> HalfOpenInterval r
 forall r.
 EndPoint 'Open r -> EndPoint 'Closed r -> HalfOpenInterval r
 HalfOpenInterval
 
-instance (Ord r) => Point 1 r `HasIntersectionWith` HalfOpenInterval r where
-  (Point1 r
-q) intersects :: Point 1 r -> HalfOpenInterval r -> Bool
-`intersects` HalfOpenInterval r
-i = r
-q r -> HalfOpenInterval r -> Bool
+instance (Ord r) => Point 1 r `HasIntersectionWith` HalfOpenInterval r where
+  (Point1 r
+q) intersects :: Point 1 r -> HalfOpenInterval r -> Bool
+`intersects` HalfOpenInterval r
+i = r
+q r -> HalfOpenInterval r -> Bool
 forall interval r.
 (Ord r, Interval_ interval r) =>
 r -> interval -> Bool
 `stabsInterval` HalfOpenInterval r
-i
+i
 
-instance (Ord r) => ClosedInterval r `HasIntersectionWith` HalfOpenInterval r where
-  ClosedInterval r
-closedInt intersects :: ClosedInterval r -> HalfOpenInterval r -> Bool
-`intersects` HalfOpenInterval r
-hoInt = case (ClosedInterval r
-closedIntClosedInterval r -> Getting r (ClosedInterval r) r -> r
+instance (Ord r) => ClosedInterval r `HasIntersectionWith` HalfOpenInterval r where
+  ClosedInterval r
+closedInt intersects :: ClosedInterval r -> HalfOpenInterval r -> Bool
+`intersects` HalfOpenInterval r
+hoInt = case (ClosedInterval r
+closedIntClosedInterval r -> Getting r (ClosedInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (ClosedInterval r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -345,10 +345,10 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` HalfOpenInterval r
-hoInt of
+hoInt of
     Ordering
 LT -> case (ClosedInterval r
-closedIntClosedInterval r -> Getting r (ClosedInterval r) r -> r
+closedIntClosedInterval r -> Getting r (ClosedInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (ClosedInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -358,7 +358,7 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` HalfOpenInterval r
-hoInt of
+hoInt of
             Ordering
 LT -> Bool
 False
diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Interval.Internal.html b/haddocks/hgeometry/kernel/src/HGeometry.Interval.Internal.html
index 4c5cb96bf..e6714f57d 100644
--- a/haddocks/hgeometry/kernel/src/HGeometry.Interval.Internal.html
+++ b/haddocks/hgeometry/kernel/src/HGeometry.Interval.Internal.html
@@ -29,8 +29,8 @@
 
 --------------------------------------------------------------------------------
 -- | Data type representing intervals
-newtype Interval endPoint r = MkInterval (Vector 2 (endPoint r))
-  deriving newtype (Interval endPoint r -> Interval endPoint r -> Bool
+newtype Interval endPoint r = MkInterval (Vector 2 (endPoint r))
+  deriving newtype (Interval endPoint r -> Interval endPoint r -> Bool
 (Interval endPoint r -> Interval endPoint r -> Bool)
 -> (Interval endPoint r -> Interval endPoint r -> Bool)
 -> Eq (Interval endPoint r)
@@ -46,7 +46,7 @@
 Eq (endPoint r) =>
 Interval endPoint r -> Interval endPoint r -> Bool
 /= :: Interval endPoint r -> Interval endPoint r -> Bool
-Eq,Eq (Interval endPoint r)
+Eq,Eq (Interval endPoint r)
 Eq (Interval endPoint r) =>
 (Interval endPoint r -> Interval endPoint r -> Ordering)
 -> (Interval endPoint r -> Interval endPoint r -> Bool)
@@ -113,75 +113,75 @@
 min :: Interval endPoint r -> Interval endPoint r -> Interval endPoint r
 Ord)
 
-type instance NumType (Interval endPoint r) = r
+type instance NumType (Interval endPoint r) = r
 
 -- | Construct an interval
-pattern Interval     :: endPoint r -> endPoint r -> Interval endPoint r
+pattern Interval     :: endPoint r -> endPoint r -> Interval endPoint r
 pattern $mInterval :: forall {r} {k} {endPoint :: k -> *} {r :: k}.
 Interval endPoint r
 -> (endPoint r -> endPoint r -> r) -> ((# #) -> r) -> r
 $bInterval :: forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
-Interval s t = MkInterval (Vector2 s t)
+Interval s t = MkInterval (Vector2 s t)
 {-# COMPLETE Interval #-}
 
 
 -- | Cosed intervals (using a boxed representation)
-type ClosedInterval r = Interval (EndPoint Closed) r
+type ClosedInterval r = Interval (EndPoint Closed) r
 
 -- | Construct a closed interval
-pattern ClosedInterval     :: r -> r -> ClosedInterval r
+pattern ClosedInterval     :: r -> r -> ClosedInterval r
 pattern $mClosedInterval :: forall {r} {r}.
 ClosedInterval r -> (r -> r -> r) -> ((# #) -> r) -> r
 $bClosedInterval :: forall r. r -> r -> ClosedInterval r
-ClosedInterval s t = Interval (ClosedE s) (ClosedE t)
+ClosedInterval s t = Interval (ClosedE s) (ClosedE t)
 {-# COMPLETE ClosedInterval #-}
 
 
 -- | Open intervals (using a boxed representation)
-type OpenInterval r   = Interval (EndPoint Open) r
+type OpenInterval r   = Interval (EndPoint Open) r
 
 -- | Construct an open ended interval
-pattern OpenInterval     :: r -> r -> OpenInterval r
+pattern OpenInterval     :: r -> r -> OpenInterval r
 pattern $mOpenInterval :: forall {r} {r}.
 OpenInterval r -> (r -> r -> r) -> ((# #) -> r) -> r
 $bOpenInterval :: forall r. r -> r -> OpenInterval r
-OpenInterval s t = Interval (OpenE s) (OpenE t)
+OpenInterval s t = Interval (OpenE s) (OpenE t)
 {-# COMPLETE OpenInterval #-}
 
 
-instance Functor endPoint => Functor (Interval endPoint) where
-  fmap :: forall a b. (a -> b) -> Interval endPoint a -> Interval endPoint b
-fmap a -> b
-f (Interval endPoint a
-s endPoint a
-t) = endPoint b -> endPoint b -> Interval endPoint b
+instance Functor endPoint => Functor (Interval endPoint) where
+  fmap :: forall a b. (a -> b) -> Interval endPoint a -> Interval endPoint b
+fmap a -> b
+f (Interval endPoint a
+s endPoint a
+t) = endPoint b -> endPoint b -> Interval endPoint b
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval ((a -> b) -> endPoint a -> endPoint b
 forall a b. (a -> b) -> endPoint a -> endPoint b
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 fmap a -> b
-f endPoint a
-s) ((a -> b) -> endPoint a -> endPoint b
+f endPoint a
+s) ((a -> b) -> endPoint a -> endPoint b
 forall a b. (a -> b) -> endPoint a -> endPoint b
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 fmap a -> b
-f endPoint a
-t)
-instance Foldable endPoint => Foldable (Interval endPoint) where
-  foldMap :: forall m a. Monoid m => (a -> m) -> Interval endPoint a -> m
-foldMap a -> m
-f (Interval endPoint a
-s endPoint a
-t) = (a -> m) -> endPoint a -> m
+f endPoint a
+t)
+instance Foldable endPoint => Foldable (Interval endPoint) where
+  foldMap :: forall m a. Monoid m => (a -> m) -> Interval endPoint a -> m
+foldMap a -> m
+f (Interval endPoint a
+s endPoint a
+t) = (a -> m) -> endPoint a -> m
 forall m a. Monoid m => (a -> m) -> endPoint a -> m
 forall (t :: * -> *) m a.
 (Foldable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMap a -> m
-f endPoint a
-s m -> m -> m
+f endPoint a
+s m -> m -> m
 forall a. Semigroup a => a -> a -> a
 <> (a -> m) -> endPoint a -> m
 forall m a. Monoid m => (a -> m) -> endPoint a -> m
@@ -189,16 +189,16 @@
 (Foldable t, Monoid m) =>
 (a -> m) -> t a -> m
 foldMap a -> m
-f endPoint a
-t
-instance Traversable endPoint => Traversable (Interval endPoint) where
-  traverse :: forall (f :: * -> *) a b.
+f endPoint a
+t
+instance Traversable endPoint => Traversable (Interval endPoint) where
+  traverse :: forall (f :: * -> *) a b.
 Applicative f =>
 (a -> f b) -> Interval endPoint a -> f (Interval endPoint b)
-traverse a -> f b
-f (Interval endPoint a
-s endPoint a
-t) = endPoint b -> endPoint b -> Interval endPoint b
+traverse a -> f b
+f (Interval endPoint a
+s endPoint a
+t) = endPoint b -> endPoint b -> Interval endPoint b
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval (endPoint b -> endPoint b -> Interval endPoint b)
@@ -212,8 +212,8 @@
 Applicative f =>
 (a -> f b) -> endPoint a -> f (endPoint b)
 traverse a -> f b
-f endPoint a
-s f (endPoint b -> Interval endPoint b)
+f endPoint a
+s f (endPoint b -> Interval endPoint b)
 -> f (endPoint b) -> f (Interval endPoint b)
 forall a b. f (a -> b) -> f a -> f b
 forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
@@ -225,13 +225,13 @@
 Applicative f =>
 (a -> f b) -> endPoint a -> f (endPoint b)
 traverse a -> f b
-f endPoint a
-t
+f endPoint a
+t
 
-instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
-         ) => HasStart (Interval endPoint r) r where
-  start :: Lens' (Interval endPoint r) r
-start = (endPoint r -> f (endPoint r))
+instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
+         ) => HasStart (Interval endPoint r) r where
+  start :: Lens' (Interval endPoint r) r
+start = (endPoint r -> f (endPoint r))
 -> Interval endPoint r -> f (Interval endPoint r)
 forall seg p. HasStartPoint seg p => Lens' seg p
 Lens' (Interval endPoint r) (endPoint r)
@@ -254,10 +254,10 @@
   (IxValue (endPoint r))
   (IxValue (endPoint r))
 _endPoint
-instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
-         ) => HasEnd (Interval endPoint r) r where
-  end :: Lens' (Interval endPoint r) r
-end = (endPoint r -> f (endPoint r))
+instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
+         ) => HasEnd (Interval endPoint r) r where
+  end :: Lens' (Interval endPoint r) r
+end = (endPoint r -> f (endPoint r))
 -> Interval endPoint r -> f (Interval endPoint r)
 forall seg p. HasEndPoint seg p => Lens' seg p
 Lens' (Interval endPoint r) (endPoint r)
@@ -281,81 +281,81 @@
   (IxValue (endPoint r))
 _endPoint
 
-instance HasStartPoint (Interval endPoint r) (endPoint r) where
-  startPoint :: Lens' (Interval endPoint r) (endPoint r)
+instance HasStartPoint (Interval endPoint r) (endPoint r) where
+  startPoint :: Lens' (Interval endPoint r) (endPoint r)
 startPoint = (Interval endPoint r -> endPoint r)
 -> (Interval endPoint r -> endPoint r -> Interval endPoint r)
 -> Lens' (Interval endPoint r) (endPoint r)
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens (\(Interval endPoint r
-s endPoint r
+lens (\(Interval endPoint r
+s endPoint r
 _) -> endPoint r
-s) (\(Interval endPoint r
-_ endPoint r
-t) endPoint r
-s -> endPoint r -> endPoint r -> Interval endPoint r
+s) (\(Interval endPoint r
+_ endPoint r
+t) endPoint r
+s -> endPoint r -> endPoint r -> Interval endPoint r
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval endPoint r
-s endPoint r
-t)
+s endPoint r
+t)
 
-instance HasEndPoint (Interval endPoint r) (endPoint r) where
-  endPoint :: Lens' (Interval endPoint r) (endPoint r)
+instance HasEndPoint (Interval endPoint r) (endPoint r) where
+  endPoint :: Lens' (Interval endPoint r) (endPoint r)
 endPoint = (Interval endPoint r -> endPoint r)
 -> (Interval endPoint r -> endPoint r -> Interval endPoint r)
 -> Lens' (Interval endPoint r) (endPoint r)
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
 lens (\(Interval endPoint r
-_ endPoint r
-t) -> endPoint r
-t) (\(Interval endPoint r
-s endPoint r
-_) endPoint r
-t -> endPoint r -> endPoint r -> Interval endPoint r
+_ endPoint r
+t) -> endPoint r
+t) (\(Interval endPoint r
+s endPoint r
+_) endPoint r
+t -> endPoint r -> endPoint r -> Interval endPoint r
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval endPoint r
-s endPoint r
-t)
+s endPoint r
+t)
 
-type instance StartPointOf (Interval endPoint r) = endPoint r
-type instance EndPointOf   (Interval endPoint r) = endPoint r
+type instance StartPointOf (Interval endPoint r) = endPoint r
+type instance EndPointOf   (Interval endPoint r) = endPoint r
 
-instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
-         ) => IntervalLike_ (Interval endPoint r) r where
+instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
+         ) => IntervalLike_ (Interval endPoint r) r where
 
-instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
-         ) => Interval_ (Interval endPoint r) r where
+instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
+         ) => Interval_ (Interval endPoint r) r where
 
-instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
-         ) => ConstructableInterval_ (Interval endPoint r) r where
-  mkInterval :: StartPointOf (Interval endPoint r)
+instance ( EndPoint_ (endPoint r), IxValue (endPoint r) ~ r
+         ) => ConstructableInterval_ (Interval endPoint r) r where
+  mkInterval :: StartPointOf (Interval endPoint r)
 -> EndPointOf (Interval endPoint r) -> Interval endPoint r
-mkInterval = endPoint r -> endPoint r -> Interval endPoint r
+mkInterval = endPoint r -> endPoint r -> Interval endPoint r
 StartPointOf (Interval endPoint r)
 -> EndPointOf (Interval endPoint r) -> Interval endPoint r
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval
 
-instance ClosedInterval_ (ClosedInterval r) r
-instance ConstructableClosedInterval_ (ClosedInterval r) r
+instance ClosedInterval_ (ClosedInterval r) r
+instance ConstructableClosedInterval_ (ClosedInterval r) r
 
-instance OpenInterval_ (OpenInterval r) r
-instance ConstructableOpenInterval_ (OpenInterval r) r
+instance OpenInterval_ (OpenInterval r) r
+instance ConstructableOpenInterval_ (OpenInterval r) r
 
 --------------------------------------------------------------------------------
 
-instance ( Show (endPoint r)
-         ) => Show (Interval endPoint r) where
-  showsPrec :: Int -> Interval endPoint r -> ShowS
-showsPrec Int
-k (Interval endPoint r
-s endPoint r
-t) = Bool -> ShowS -> ShowS
+instance ( Show (endPoint r)
+         ) => Show (Interval endPoint r) where
+  showsPrec :: Int -> Interval endPoint r -> ShowS
+showsPrec Int
+k (Interval endPoint r
+s endPoint r
+t) = Bool -> ShowS -> ShowS
 showParen (Int
-k Int -> Int -> Bool
+k Int -> Int -> Bool
 forall a. Ord a => a -> a -> Bool
 > Int
 app_prec) (ShowS -> ShowS) -> ShowS -> ShowS
@@ -373,7 +373,7 @@
 forall a. Num a => a -> a -> a
 +Int
 1) endPoint r
-s
+s
                                ShowS -> ShowS -> ShowS
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Char -> ShowS
@@ -388,7 +388,7 @@
 forall a. Num a => a -> a -> a
 +Int
 1) endPoint r
-t
+t
 
 -- | application precedence
 app_prec :: Int
@@ -396,9 +396,9 @@
 app_prec = Int
 10
 
-instance Read (endPoint r) => Read (Interval endPoint r) where
-  readPrec :: ReadPrec (Interval endPoint r)
-readPrec = ReadPrec (Interval endPoint r) -> ReadPrec (Interval endPoint r)
+instance Read (endPoint r) => Read (Interval endPoint r) where
+  readPrec :: ReadPrec (Interval endPoint r)
+readPrec = ReadPrec (Interval endPoint r) -> ReadPrec (Interval endPoint r)
 forall a. ReadPrec a -> ReadPrec a
 parens (ReadPrec (Interval endPoint r) -> ReadPrec (Interval endPoint r))
 -> ReadPrec (Interval endPoint r) -> ReadPrec (Interval endPoint r)
@@ -414,14 +414,14 @@
                           Ident String
 "Interval" <- ReadPrec Lexeme
 lexP
-                          endPoint r
-p <- ReadPrec (endPoint r) -> ReadPrec (endPoint r)
+                          endPoint r
+p <- ReadPrec (endPoint r) -> ReadPrec (endPoint r)
 forall a. ReadPrec a -> ReadPrec a
 step ReadPrec (endPoint r)
 forall a. Read a => ReadPrec a
 readPrec
-                          endPoint r
-q <- ReadPrec (endPoint r) -> ReadPrec (endPoint r)
+                          endPoint r
+q <- ReadPrec (endPoint r) -> ReadPrec (endPoint r)
 forall a. ReadPrec a -> ReadPrec a
 step ReadPrec (endPoint r)
 forall a. Read a => ReadPrec a
@@ -433,19 +433,19 @@
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval endPoint r
-p endPoint r
-q))
+p endPoint r
+q))
 
 
 --------------------------------------------------------------------------------
 
 -- | Try to interpret the interval as an OpenInterval, i.e. with both endpoints open
-asOpenInterval   :: Interval_ interval r => interval -> Maybe (OpenInterval r)
+asOpenInterval   :: Interval_ interval r => interval -> Maybe (OpenInterval r)
 asOpenInterval :: forall interval r.
 Interval_ interval r =>
 interval -> Maybe (OpenInterval r)
-asOpenInterval interval
-i
+asOpenInterval interval
+i
   | EndPointType -> EndPointType -> interval -> Bool
 forall interval r.
 Interval_ interval r =>
@@ -453,7 +453,7 @@
 isIntervalOfType EndPointType
 Open EndPointType
 Open interval
-i = OpenInterval r -> Maybe (OpenInterval r)
+i = OpenInterval r -> Maybe (OpenInterval r)
 forall a. a -> Maybe a
 Just (OpenInterval r -> Maybe (OpenInterval r))
 -> OpenInterval r -> Maybe (OpenInterval r)
@@ -461,13 +461,13 @@
 $ r -> r -> OpenInterval r
 forall r. r -> r -> OpenInterval r
 OpenInterval (interval
-iinterval -> Getting r interval r -> r
+iinterval -> Getting r interval r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r interval r
 forall seg p. HasStart seg p => Lens' seg p
 Lens' interval r
 start) (interval
-iinterval -> Getting r interval r -> r
+iinterval -> Getting r interval r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r interval r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -480,12 +480,12 @@
 {-# INLINE asOpenInterval #-}
 
 -- | Try to interpret the interval as a ClosedInterval, i.e. with both endpoints Closed
-asClosedInterval   :: Interval_ interval r => interval -> Maybe (ClosedInterval r)
+asClosedInterval   :: Interval_ interval r => interval -> Maybe (ClosedInterval r)
 asClosedInterval :: forall interval r.
 Interval_ interval r =>
 interval -> Maybe (ClosedInterval r)
-asClosedInterval interval
-i
+asClosedInterval interval
+i
   | EndPointType -> EndPointType -> interval -> Bool
 forall interval r.
 Interval_ interval r =>
@@ -493,7 +493,7 @@
 isIntervalOfType EndPointType
 Closed EndPointType
 Closed interval
-i = ClosedInterval r -> Maybe (ClosedInterval r)
+i = ClosedInterval r -> Maybe (ClosedInterval r)
 forall a. a -> Maybe a
 Just (ClosedInterval r -> Maybe (ClosedInterval r))
 -> ClosedInterval r -> Maybe (ClosedInterval r)
@@ -501,13 +501,13 @@
 $ r -> r -> ClosedInterval r
 forall r. r -> r -> ClosedInterval r
 ClosedInterval (interval
-iinterval -> Getting r interval r -> r
+iinterval -> Getting r interval r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r interval r
 forall seg p. HasStart seg p => Lens' seg p
 Lens' interval r
 start) (interval
-iinterval -> Getting r interval r -> r
+iinterval -> Getting r interval r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r interval r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -520,12 +520,12 @@
 {-# INLINE asClosedInterval #-}
 
 -- | convert into an interval whose endpoints are explicitly tagged.
-asAnInterval   :: Interval_ interval r => interval -> Interval AnEndPoint r
+asAnInterval   :: Interval_ interval r => interval -> Interval AnEndPoint r
 asAnInterval :: forall interval r.
 Interval_ interval r =>
 interval -> Interval AnEndPoint r
-asAnInterval interval
-i = StartPointOf (Interval AnEndPoint r)
+asAnInterval interval
+i = StartPointOf (Interval AnEndPoint r)
 -> EndPointOf (Interval AnEndPoint r) -> Interval AnEndPoint r
 forall interval point.
 ConstructableInterval_ interval point =>
@@ -541,7 +541,7 @@
 -> AnEndPoint (IxValue (StartPointOf interval))
 forall a b. (a -> b) -> a -> b
 $ interval
-iinterval
+iinterval
 -> Getting (StartPointOf interval) interval (StartPointOf interval)
 -> StartPointOf interval
 forall s a. s -> Getting a s a -> a
@@ -557,7 +557,7 @@
 -> AnEndPoint (IxValue (EndPointOf interval))
 forall a b. (a -> b) -> a -> b
 $ interval
-iinterval
+iinterval
 -> Getting (EndPointOf interval) interval (EndPointOf interval)
 -> EndPointOf interval
 forall s a. s -> Getting a s a -> a
@@ -567,20 +567,20 @@
 endPoint)
 
 -- | Test if the interval is of a particular type
-isIntervalOfType       :: Interval_ interval r
+isIntervalOfType       :: Interval_ interval r
                        => EndPointType -- ^ startPoint type
                        -> EndPointType -- ^ endPoint type
-                       -> interval -> Bool
+                       -> interval -> Bool
 isIntervalOfType :: forall interval r.
 Interval_ interval r =>
 EndPointType -> EndPointType -> interval -> Bool
-isIntervalOfType EndPointType
-s EndPointType
-t interval
-i = StartPointOf interval -> EndPointType
+isIntervalOfType EndPointType
+s EndPointType
+t interval
+i = StartPointOf interval -> EndPointType
 forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType
 endPointType (interval
-iinterval
+iinterval
 -> Getting (StartPointOf interval) interval (StartPointOf interval)
 -> StartPointOf interval
 forall s a. s -> Getting a s a -> a
@@ -590,11 +590,11 @@
 startPoint) EndPointType -> EndPointType -> Bool
 forall a. Eq a => a -> a -> Bool
 == EndPointType
-s Bool -> Bool -> Bool
+s Bool -> Bool -> Bool
 &&  EndPointOf interval -> EndPointType
 forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType
 endPointType (interval
-iinterval
+iinterval
 -> Getting (EndPointOf interval) interval (EndPointOf interval)
 -> EndPointOf interval
 forall s a. s -> Getting a s a -> a
@@ -604,7 +604,7 @@
 endPoint) EndPointType -> EndPointType -> Bool
 forall a. Eq a => a -> a -> Bool
 == EndPointType
-t
+t
 {-# INLINE isIntervalOfType #-}
 
 --------------------------------------------------------------------------------
@@ -646,14 +646,14 @@
 
 --       g (Arg _ x) = x
 
-type instance Intersection (Point 1 r) (Interval endPoint r) = Maybe r
+type instance Intersection (Point 1 r) (Interval endPoint r) = Maybe r
 
-instance Ord r => Point 1 r `HasIntersectionWith` ClosedInterval r where
-  (Point1 r
-q) intersects :: Point 1 r -> ClosedInterval r -> Bool
-`intersects` ClosedInterval r
-int = ClosedInterval r
-intClosedInterval r -> Getting r (ClosedInterval r) r -> r
+instance Ord r => Point 1 r `HasIntersectionWith` ClosedInterval r where
+  (Point1 r
+q) intersects :: Point 1 r -> ClosedInterval r -> Bool
+`intersects` ClosedInterval r
+int = ClosedInterval r
+intClosedInterval r -> Getting r (ClosedInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (ClosedInterval r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -661,23 +661,23 @@
 start r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 <= r
-q Bool -> Bool -> Bool
+q Bool -> Bool -> Bool
 && r
-q r -> r -> Bool
+q r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 <= ClosedInterval r
-intClosedInterval r -> Getting r (ClosedInterval r) r -> r
+intClosedInterval r -> Getting r (ClosedInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (ClosedInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
 Lens' (ClosedInterval r) r
 end
-instance Ord r => Point 1 r `HasIntersectionWith` OpenInterval r where
-  (Point1 r
-q) intersects :: Point 1 r -> OpenInterval r -> Bool
-`intersects` OpenInterval r
-int = OpenInterval r
-intOpenInterval r -> Getting r (OpenInterval r) r -> r
+instance Ord r => Point 1 r `HasIntersectionWith` OpenInterval r where
+  (Point1 r
+q) intersects :: Point 1 r -> OpenInterval r -> Bool
+`intersects` OpenInterval r
+int = OpenInterval r
+intOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -685,26 +685,26 @@
 start r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 < r
-q Bool -> Bool -> Bool
+q Bool -> Bool -> Bool
 && r
-q r -> r -> Bool
+q r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 < OpenInterval r
-intOpenInterval r -> Getting r (OpenInterval r) r -> r
+intOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
 Lens' (OpenInterval r) r
 end
 
-instance Ord r
-         => Point 1 r `HasIntersectionWith` Interval AnEndPoint r where
-  (Point1 r
-q) intersects :: Point 1 r -> Interval AnEndPoint r -> Bool
-`intersects` Interval AnEndPoint r
-int = EndPointType -> r -> r -> Bool
-compare' (Interval AnEndPoint r
-intInterval AnEndPoint r
+instance Ord r
+         => Point 1 r `HasIntersectionWith` Interval AnEndPoint r where
+  (Point1 r
+q) intersects :: Point 1 r -> Interval AnEndPoint r -> Bool
+`intersects` Interval AnEndPoint r
+int = EndPointType -> r -> r -> Bool
+compare' (Interval AnEndPoint r
+intInterval AnEndPoint r
 -> Getting EndPointType (Interval AnEndPoint r) EndPointType
 -> EndPointType
 forall s a. s -> Getting a s a -> a
@@ -730,17 +730,17 @@
 to AnEndPoint r -> EndPointType
 forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType
 endPointType) (Interval AnEndPoint r
-intInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
+intInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval AnEndPoint r) r
 forall seg p. HasStart seg p => Lens' seg p
 Lens' (Interval AnEndPoint r) r
 start) r
-q
+q
                              Bool -> Bool -> Bool
 && EndPointType -> r -> r -> Bool
-compare' (Interval AnEndPoint r
-intInterval AnEndPoint r
+compare' (Interval AnEndPoint r
+intInterval AnEndPoint r
 -> Getting EndPointType (Interval AnEndPoint r) EndPointType
 -> EndPointType
 forall s a. s -> Getting a s a -> a
@@ -766,16 +766,16 @@
 to AnEndPoint r -> EndPointType
 forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType
 endPointType)   r
-q            (Interval AnEndPoint r
-intInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
+q            (Interval AnEndPoint r
+intInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval AnEndPoint r) r
 forall seg p. HasEnd seg p => Lens' seg p
 Lens' (Interval AnEndPoint r) r
 end)
     where
-      compare' :: EndPointType -> r -> r -> Bool
-compare' = \case
+      compare' :: EndPointType -> r -> r -> Bool
+compare' = \case
         EndPointType
 Open   -> r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
@@ -786,38 +786,38 @@
 (<=)
 
 -- | intersect implementation
-intersectImpl  :: HasIntersectionWith (Point 1 r) i => Point 1 r -> i -> Maybe r
-q :: Point 1 r
-q@(Point1 r
-q') intersectImpl :: forall r i.
+intersectImpl  :: HasIntersectionWith (Point 1 r) i => Point 1 r -> i -> Maybe r
+q :: Point 1 r
+q@(Point1 r
+q') intersectImpl :: forall r i.
 HasIntersectionWith (Point 1 r) i =>
 Point 1 r -> i -> Maybe r
-`intersectImpl` i
-int | Point 1 r
-q Point 1 r -> i -> Bool
+`intersectImpl` i
+int | Point 1 r
+q Point 1 r -> i -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` i
-int = r -> Maybe r
+int = r -> Maybe r
 forall a. a -> Maybe a
 Just r
-q'
+q'
                                   | Bool
 otherwise          = Maybe r
 forall a. Maybe a
 Nothing
 
-instance Ord r => Point 1 r `IsIntersectableWith` ClosedInterval r where
-  intersect :: Point 1 r
+instance Ord r => Point 1 r `IsIntersectableWith` ClosedInterval r where
+  intersect :: Point 1 r
 -> ClosedInterval r -> Intersection (Point 1 r) (ClosedInterval r)
-intersect = Point 1 r -> ClosedInterval r -> Maybe r
+intersect = Point 1 r -> ClosedInterval r -> Maybe r
 Point 1 r
 -> ClosedInterval r -> Intersection (Point 1 r) (ClosedInterval r)
 forall r i.
 HasIntersectionWith (Point 1 r) i =>
 Point 1 r -> i -> Maybe r
 intersectImpl
-instance Ord r => Point 1 r `IsIntersectableWith` OpenInterval r where
-  intersect :: Point 1 r
+instance Ord r => Point 1 r `IsIntersectableWith` OpenInterval r where
+  intersect :: Point 1 r
 -> OpenInterval r -> Intersection (Point 1 r) (OpenInterval r)
 intersect = Point 1 r -> OpenInterval r -> Maybe r
 Point 1 r
@@ -826,9 +826,9 @@
 HasIntersectionWith (Point 1 r) i =>
 Point 1 r -> i -> Maybe r
 intersectImpl
-instance Ord r
-         => Point 1 r `IsIntersectableWith` Interval AnEndPoint r where
-  intersect :: Point 1 r
+instance Ord r
+         => Point 1 r `IsIntersectableWith` Interval AnEndPoint r where
+  intersect :: Point 1 r
 -> Interval AnEndPoint r
 -> Intersection (Point 1 r) (Interval AnEndPoint r)
 intersect = Point 1 r -> Interval AnEndPoint r -> Maybe r
@@ -856,11 +856,11 @@
 -- * Representing Interval intersections
 
 -- | Data type representing intersections of intervals of the same type
-data Interval_x_IntervalIntersection r interval =
-    Interval_x_Interval_Point     !r
-  | Interval_x_Interval_Contained !interval
-  | Interval_x_Interval_Partial   !interval
-  deriving (Int -> Interval_x_IntervalIntersection r interval -> ShowS
+data Interval_x_IntervalIntersection r interval =
+    Interval_x_Interval_Point     !r
+  | Interval_x_Interval_Contained !interval
+  | Interval_x_Interval_Partial   !interval
+  deriving (Int -> Interval_x_IntervalIntersection r interval -> ShowS
 [Interval_x_IntervalIntersection r interval] -> ShowS
 Interval_x_IntervalIntersection r interval -> String
 (Int -> Interval_x_IntervalIntersection r interval -> ShowS)
@@ -890,7 +890,7 @@
 (Show r, Show interval) =>
 [Interval_x_IntervalIntersection r interval] -> ShowS
 showList :: [Interval_x_IntervalIntersection r interval] -> ShowS
-Show,Interval_x_IntervalIntersection r interval
+Show,Interval_x_IntervalIntersection r interval
 -> Interval_x_IntervalIntersection r interval -> Bool
 (Interval_x_IntervalIntersection r interval
  -> Interval_x_IntervalIntersection r interval -> Bool)
@@ -914,7 +914,7 @@
 -> Interval_x_IntervalIntersection r interval -> Bool
 /= :: Interval_x_IntervalIntersection r interval
 -> Interval_x_IntervalIntersection r interval -> Bool
-Eq,Eq (Interval_x_IntervalIntersection r interval)
+Eq,Eq (Interval_x_IntervalIntersection r interval)
 Eq (Interval_x_IntervalIntersection r interval) =>
 (Interval_x_IntervalIntersection r interval
  -> Interval_x_IntervalIntersection r interval -> Ordering)
@@ -1012,7 +1012,7 @@
 min :: Interval_x_IntervalIntersection r interval
 -> Interval_x_IntervalIntersection r interval
 -> Interval_x_IntervalIntersection r interval
-Ord,(forall a b.
+Ord,(forall a b.
  (a -> b)
  -> Interval_x_IntervalIntersection r a
  -> Interval_x_IntervalIntersection r b)
@@ -1056,7 +1056,7 @@
 a
 -> Interval_x_IntervalIntersection r b
 -> Interval_x_IntervalIntersection r a
-Functor,(forall m. Monoid m => Interval_x_IntervalIntersection r m -> m)
+Functor,(forall m. Monoid m => Interval_x_IntervalIntersection r m -> m)
 -> (forall m a.
     Monoid m =>
     (a -> m) -> Interval_x_IntervalIntersection r a -> m)
@@ -1192,7 +1192,7 @@
 sum :: forall a. Num a => Interval_x_IntervalIntersection r a -> a
 $cproduct :: forall r a. Num a => Interval_x_IntervalIntersection r a -> a
 product :: forall a. Num a => Interval_x_IntervalIntersection r a -> a
-Foldable,Functor (Interval_x_IntervalIntersection r)
+Foldable,Functor (Interval_x_IntervalIntersection r)
 Foldable (Interval_x_IntervalIntersection r)
 (Functor (Interval_x_IntervalIntersection r),
  Foldable (Interval_x_IntervalIntersection r)) =>
@@ -1302,8 +1302,8 @@
 -> m (Interval_x_IntervalIntersection r a)
 Traversable)
 
-type instance Intersection (Interval endPoint r) (Interval endPoint r) =
-  Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
+type instance Intersection (Interval endPoint r) (Interval endPoint r) =
+  Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 
 --------------------------------------------------------------------------------
 -- * HasIntersection
@@ -1311,17 +1311,17 @@
 ----------------------------------------
 -- ** Closed Interval
 
-instance ( Ord r
-         , IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)
-         ) => ClosedInterval r `HasIntersectionWith` Interval endPoint r where
-  {-# SPECIALIZE instance Ord r => ClosedInterval r `HasIntersectionWith` ClosedInterval r #-}
-  {-# SPECIALIZE instance Ord r => ClosedInterval r `HasIntersectionWith` OpenInterval r #-}
-  {-# SPECIALIZE instance Ord r => ClosedInterval r `HasIntersectionWith` Interval AnEndPoint r #-}
-  ClosedInterval r
-intA intersects :: ClosedInterval r -> Interval endPoint r -> Bool
-`intersects` Interval endPoint r
-intB = case (ClosedInterval r
-intAClosedInterval r -> Getting r (ClosedInterval r) r -> r
+instance ( Ord r
+         , IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)
+         ) => ClosedInterval r `HasIntersectionWith` Interval endPoint r where
+  {-# SPECIALIZE instance Ord r => ClosedInterval r `HasIntersectionWith` ClosedInterval r #-}
+  {-# SPECIALIZE instance Ord r => ClosedInterval r `HasIntersectionWith` OpenInterval r #-}
+  {-# SPECIALIZE instance Ord r => ClosedInterval r `HasIntersectionWith` Interval AnEndPoint r #-}
+  ClosedInterval r
+intA intersects :: ClosedInterval r -> Interval endPoint r -> Bool
+`intersects` Interval endPoint r
+intB = case (ClosedInterval r
+intAClosedInterval r -> Getting r (ClosedInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (ClosedInterval r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1331,10 +1331,10 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` Interval endPoint r
-intB of
+intB of
     Ordering
 LT -> case (ClosedInterval r
-intAClosedInterval r -> Getting r (ClosedInterval r) r -> r
+intAClosedInterval r -> Getting r (ClosedInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (ClosedInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1344,7 +1344,7 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` Interval endPoint r
-intB of
+intB of
             Ordering
 LT -> Bool
 False
@@ -1365,12 +1365,12 @@
 ----------------------------------------
 -- ** Open intervals
 
-instance Ord r => OpenInterval r  `HasIntersectionWith` OpenInterval r where
-  OpenInterval r
-intA intersects :: OpenInterval r -> OpenInterval r -> Bool
-`intersects` OpenInterval r
-intB = case (OpenInterval r
-intAOpenInterval r -> Getting r (OpenInterval r) r -> r
+instance Ord r => OpenInterval r  `HasIntersectionWith` OpenInterval r where
+  OpenInterval r
+intA intersects :: OpenInterval r -> OpenInterval r -> Bool
+`intersects` OpenInterval r
+intB = case (OpenInterval r
+intAOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1380,10 +1380,10 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` OpenInterval r
-intB of
+intB of
     Ordering
 LT -> case (OpenInterval r
-intAOpenInterval r -> Getting r (OpenInterval r) r -> r
+intAOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1393,7 +1393,7 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` OpenInterval r
-intB of
+intB of
             Ordering
 LT -> Bool
 False
@@ -1402,7 +1402,7 @@
 True -- IntB is non-empty
             Ordering
 GT -> OpenInterval r
-intBOpenInterval r -> Getting r (OpenInterval r) r -> r
+intBOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1410,7 +1410,7 @@
 start r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 < OpenInterval r
-intBOpenInterval r -> Getting r (OpenInterval r) r -> r
+intBOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1424,23 +1424,23 @@
 False -- by invariant, intA^.end >= intA.start, so they don't intersect
   {-# INLINE intersects #-}
 
-instance Ord r => OpenInterval r  `HasIntersectionWith` ClosedInterval r where
-  intersects :: OpenInterval r -> ClosedInterval r -> Bool
-intersects OpenInterval r
-intA ClosedInterval r
-intB = ClosedInterval r -> OpenInterval r -> Bool
+instance Ord r => OpenInterval r  `HasIntersectionWith` ClosedInterval r where
+  intersects :: OpenInterval r -> ClosedInterval r -> Bool
+intersects OpenInterval r
+intA ClosedInterval r
+intB = ClosedInterval r -> OpenInterval r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 intersects ClosedInterval r
-intB OpenInterval r
-intA
+intB OpenInterval r
+intA
   {-# INLINE intersects #-}
 
-instance Ord r => OpenInterval r  `HasIntersectionWith` Interval AnEndPoint r where
-  OpenInterval r
-intA intersects :: OpenInterval r -> Interval AnEndPoint r -> Bool
-`intersects` Interval AnEndPoint r
-intB = case (OpenInterval r
-intAOpenInterval r -> Getting r (OpenInterval r) r -> r
+instance Ord r => OpenInterval r  `HasIntersectionWith` Interval AnEndPoint r where
+  OpenInterval r
+intA intersects :: OpenInterval r -> Interval AnEndPoint r -> Bool
+`intersects` Interval AnEndPoint r
+intB = case (OpenInterval r
+intAOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1450,10 +1450,10 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` Interval AnEndPoint r
-intB of
+intB of
       Ordering
 LT -> case (OpenInterval r
-intAOpenInterval r -> Getting r (OpenInterval r) r -> r
+intAOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1463,13 +1463,13 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> Ordering
 `compareInterval` Interval AnEndPoint r
-intB of
+intB of
               Ordering
 LT -> Bool
 False
               Ordering
 EQ -> OpenInterval r
-intAOpenInterval r -> Getting r (OpenInterval r) r -> r
+intAOpenInterval r -> Getting r (OpenInterval r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (OpenInterval r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1477,7 +1477,7 @@
 end r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 > Interval AnEndPoint r
-intBInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
+intBInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval AnEndPoint r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1491,10 +1491,10 @@
 isIntervalOfType EndPointType
 Open EndPointType
 Open Interval AnEndPoint r
-intB
+intB
                     Bool -> Bool -> Bool
-`implies` (Interval AnEndPoint r
-intBInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
+`implies` (Interval AnEndPoint r
+intBInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval AnEndPoint r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1502,7 +1502,7 @@
 start r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 < Interval AnEndPoint r
-intBInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
+intBInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval AnEndPoint r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1515,25 +1515,25 @@
 GT -> Bool
 False -- by invariant, intA^.end >= intA.start, so they don't intersect
     where
-      Bool
-p implies :: Bool -> Bool -> Bool
-`implies` Bool
-q = Bool -> Bool
+      Bool
+p implies :: Bool -> Bool -> Bool
+`implies` Bool
+q = Bool -> Bool
 not Bool
-p Bool -> Bool -> Bool
+p Bool -> Bool -> Bool
 || Bool
-q
+q
   {-# INLINE intersects #-}
 
 ----------------------------------------
 -- * Mixed
 
-instance Ord r => Interval AnEndPoint r `HasIntersectionWith` Interval AnEndPoint r where
-  Interval AnEndPoint r
-intA intersects :: Interval AnEndPoint r -> Interval AnEndPoint r -> Bool
-`intersects` Interval AnEndPoint r
-intB = case (Interval AnEndPoint r
-intAInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
+instance Ord r => Interval AnEndPoint r `HasIntersectionWith` Interval AnEndPoint r where
+  Interval AnEndPoint r
+intA intersects :: Interval AnEndPoint r -> Interval AnEndPoint r -> Bool
+`intersects` Interval AnEndPoint r
+intB = case (Interval AnEndPoint r
+intAInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval AnEndPoint r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1543,10 +1543,10 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> CompareInterval
 `compareIntervalExact` Interval AnEndPoint r
-intB of
+intB of
       CompareInterval
 Before   -> case (Interval AnEndPoint r
-intAInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
+intAInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval AnEndPoint r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1556,14 +1556,14 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> CompareInterval
 `compareIntervalExact` Interval AnEndPoint r
-intB of
+intB of
                     CompareInterval
 Before   -> Bool
 False
                     CompareInterval
 OnStart  -> AnEndPoint r -> Bool
-isClosed (Interval AnEndPoint r
-intAInterval AnEndPoint r
+isClosed (Interval AnEndPoint r
+intAInterval AnEndPoint r
 -> Getting (AnEndPoint r) (Interval AnEndPoint r) (AnEndPoint r)
 -> AnEndPoint r
 forall s a. s -> Getting a s a -> a
@@ -1572,8 +1572,8 @@
 Lens' (Interval AnEndPoint r) (AnEndPoint r)
 endPoint) Bool -> Bool -> Bool
 && AnEndPoint r -> Bool
-isClosed (Interval AnEndPoint r
-intBInterval AnEndPoint r
+isClosed (Interval AnEndPoint r
+intBInterval AnEndPoint r
 -> Getting (AnEndPoint r) (Interval AnEndPoint r) (AnEndPoint r)
 -> AnEndPoint r
 forall s a. s -> Getting a s a -> a
@@ -1599,8 +1599,8 @@
 True -- by invariant intA is non-empty, so intA^.start+eps inside intB
       CompareInterval
 OnEnd    -> AnEndPoint r -> Bool
-isClosed (Interval AnEndPoint r
-intAInterval AnEndPoint r
+isClosed (Interval AnEndPoint r
+intAInterval AnEndPoint r
 -> Getting (AnEndPoint r) (Interval AnEndPoint r) (AnEndPoint r)
 -> AnEndPoint r
 forall s a. s -> Getting a s a -> a
@@ -1609,8 +1609,8 @@
 Lens' (Interval AnEndPoint r) (AnEndPoint r)
 startPoint) Bool -> Bool -> Bool
 && AnEndPoint r -> Bool
-isClosed (Interval AnEndPoint r
-intBInterval AnEndPoint r
+isClosed (Interval AnEndPoint r
+intBInterval AnEndPoint r
 -> Getting (AnEndPoint r) (Interval AnEndPoint r) (AnEndPoint r)
 -> AnEndPoint r
 forall s a. s -> Getting a s a -> a
@@ -1622,8 +1622,8 @@
 After    -> Bool
 False -- by invariant, intA^.end >= intA.start, so they don't intersect
     where
-      isClosed :: AnEndPoint r -> Bool
-isClosed = (EndPointType -> EndPointType -> Bool
+      isClosed :: AnEndPoint r -> Bool
+isClosed = (EndPointType -> EndPointType -> Bool
 forall a. Eq a => a -> a -> Bool
 == EndPointType
 Closed) (EndPointType -> Bool)
@@ -1634,46 +1634,46 @@
 endPointType
   {-# INLINE intersects #-}
 
-instance Ord r => Interval AnEndPoint r `HasIntersectionWith` ClosedInterval r where
-  intersects :: Interval AnEndPoint r -> ClosedInterval r -> Bool
-intersects Interval AnEndPoint r
-intA ClosedInterval r
-intB = ClosedInterval r -> Interval AnEndPoint r -> Bool
+instance Ord r => Interval AnEndPoint r `HasIntersectionWith` ClosedInterval r where
+  intersects :: Interval AnEndPoint r -> ClosedInterval r -> Bool
+intersects Interval AnEndPoint r
+intA ClosedInterval r
+intB = ClosedInterval r -> Interval AnEndPoint r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 intersects ClosedInterval r
-intB Interval AnEndPoint r
-intA
+intB Interval AnEndPoint r
+intA
   {-# INLINE intersects #-}
 
-instance Ord r => Interval AnEndPoint r `HasIntersectionWith` OpenInterval r where
-  intersects :: Interval AnEndPoint r -> OpenInterval r -> Bool
-intersects Interval AnEndPoint r
-intA OpenInterval r
-intB = OpenInterval r -> Interval AnEndPoint r -> Bool
+instance Ord r => Interval AnEndPoint r `HasIntersectionWith` OpenInterval r where
+  intersects :: Interval AnEndPoint r -> OpenInterval r -> Bool
+intersects Interval AnEndPoint r
+intA OpenInterval r
+intB = OpenInterval r -> Interval AnEndPoint r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 intersects OpenInterval r
-intB Interval AnEndPoint r
-intA
+intB Interval AnEndPoint r
+intA
   {-# INLINE intersects #-}
 
 --------------------------------------------------------------------------------
 -- * IsIntersectableWith implementations
 
 -- | Implementation of interval intersection
-intersectIntervalImpl     :: ( Ord r, IxValue (endPoint r) ~ r
-                             , EndPoint_ (endPoint r)
+intersectIntervalImpl     :: ( Ord r, IxValue (endPoint r) ~ r
+                             , EndPoint_ (endPoint r)
                              )
-                          => Interval endPoint r -> Interval endPoint r
-                          -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
+                          => Interval endPoint r -> Interval endPoint r
+                          -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 intersectIntervalImpl :: forall r (endPoint :: * -> *).
 (Ord r, IxValue (endPoint r) ~ r, EndPoint_ (endPoint r)) =>
 Interval endPoint r
 -> Interval endPoint r
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
-intersectIntervalImpl Interval endPoint r
-a Interval endPoint r
-b = case (Interval endPoint r
-aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
+intersectIntervalImpl Interval endPoint r
+a Interval endPoint r
+b = case (Interval endPoint r
+aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval endPoint r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1683,10 +1683,10 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> CompareInterval
 `compareIntervalExact` Interval endPoint r
-b of
+b of
     CompareInterval
 Before   -> case (Interval endPoint r
-aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
+aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval endPoint r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1696,7 +1696,7 @@
 (Ord r, Interval_ interval r) =>
 r -> interval -> CompareInterval
 `compareIntervalExact` Interval endPoint r
-b of
+b of
         CompareInterval
 Before   -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 forall a. Maybe a
@@ -1707,8 +1707,8 @@
 guard (Bool -> Maybe ()) -> Bool -> Maybe ()
 forall a b. (a -> b) -> a -> b
 $ endPoint r -> Bool
-isClosed (Interval endPoint r
-aInterval endPoint r
+isClosed (Interval endPoint r
+aInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1717,8 +1717,8 @@
 Lens' (Interval endPoint r) (endPoint r)
 endPoint) Bool -> Bool -> Bool
 && endPoint r -> Bool
-isClosed (Interval endPoint r
-bInterval endPoint r
+isClosed (Interval endPoint r
+bInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1738,7 +1738,7 @@
 $ r -> Interval_x_IntervalIntersection r (Interval endPoint r)
 forall r interval. r -> Interval_x_IntervalIntersection r interval
 Interval_x_Interval_Point (Interval endPoint r
-aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
+aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval endPoint r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1749,12 +1749,12 @@
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 forall a. a -> Maybe a
 Just Interval_x_IntervalIntersection r (Interval endPoint r)
-partialBA
+partialBA
         CompareInterval
 OnEnd
           | endPoint r -> Bool
-isClosed (Interval endPoint r
-aInterval endPoint r
+isClosed (Interval endPoint r
+aInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1763,8 +1763,8 @@
 Lens' (Interval endPoint r) (endPoint r)
 endPoint) Bool -> Bool -> Bool
 || endPoint r -> Bool
-isOpen (Interval endPoint r
-bInterval endPoint r
+isOpen (Interval endPoint r
+bInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1785,13 +1785,13 @@
 forall r interval.
 interval -> Interval_x_IntervalIntersection r interval
 Interval_x_Interval_Contained Interval endPoint r
-b
+b
           | Bool
 otherwise  -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 forall a. a -> Maybe a
 Just Interval_x_IntervalIntersection r (Interval endPoint r)
-partialBA
+partialBA
             -- if b's endpoint is "contained" in that of b, i.e. if
             -- a is closed, or if b is open, then b is fully contained.
         CompareInterval
@@ -1808,13 +1808,13 @@
 forall r interval.
 interval -> Interval_x_IntervalIntersection r interval
 Interval_x_Interval_Contained Interval endPoint r
-b
+b
 
     CompareInterval
 OnStart
       | endPoint r -> Bool
-isClosed (Interval endPoint r
-bInterval endPoint r
+isClosed (Interval endPoint r
+bInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1823,8 +1823,8 @@
 Lens' (Interval endPoint r) (endPoint r)
 startPoint) Bool -> Bool -> Bool
 || endPoint r -> Bool
-isOpen (Interval endPoint r
-aInterval endPoint r
+isOpen (Interval endPoint r
+aInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1835,45 +1835,45 @@
                       Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
-aInteriorCase (Interval endPoint r
+aInteriorCase (Interval endPoint r
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 forall r interval.
 interval -> Interval_x_IntervalIntersection r interval
 Interval_x_Interval_Contained Interval endPoint r
-a)
+a)
                                     (Interval endPoint r
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 forall r interval.
 interval -> Interval_x_IntervalIntersection r interval
 Interval_x_Interval_Contained Interval endPoint r
-b)
+b)
       | Bool
 otherwise  -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
-aInteriorCase Interval_x_IntervalIntersection r (Interval endPoint r)
-partialAB Interval_x_IntervalIntersection r (Interval endPoint r)
-partialAB
+aInteriorCase Interval_x_IntervalIntersection r (Interval endPoint r)
+partialAB Interval_x_IntervalIntersection r (Interval endPoint r)
+partialAB
 
     CompareInterval
 Interior -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
-aInteriorCase (Interval endPoint r
+aInteriorCase (Interval endPoint r
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 forall r interval.
 interval -> Interval_x_IntervalIntersection r interval
 Interval_x_Interval_Contained Interval endPoint r
-a) Interval_x_IntervalIntersection r (Interval endPoint r)
-partialAB
+a) Interval_x_IntervalIntersection r (Interval endPoint r)
+partialAB
     CompareInterval
 OnEnd    -> do Bool -> Maybe ()
 forall (f :: * -> *). Alternative f => Bool -> f ()
 guard (Bool -> Maybe ()) -> Bool -> Maybe ()
 forall a b. (a -> b) -> a -> b
 $ endPoint r -> Bool
-isClosed (Interval endPoint r
-aInterval endPoint r
+isClosed (Interval endPoint r
+aInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1882,8 +1882,8 @@
 Lens' (Interval endPoint r) (endPoint r)
 startPoint) Bool -> Bool -> Bool
 && endPoint r -> Bool
-isClosed (Interval endPoint r
-bInterval endPoint r
+isClosed (Interval endPoint r
+bInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1903,7 +1903,7 @@
 $ r -> Interval_x_IntervalIntersection r (Interval endPoint r)
 forall r interval. r -> Interval_x_IntervalIntersection r interval
 Interval_x_Interval_Point (Interval endPoint r
-aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
+aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval endPoint r) r
 forall seg p. HasStart seg p => Lens' seg p
@@ -1914,8 +1914,8 @@
 forall a. Maybe a
 Nothing -- by invariant, a^.end >= a.start, so they don't intersect
   where
-    isClosed :: endPoint r -> Bool
-isClosed = (EndPointType -> EndPointType -> Bool
+    isClosed :: endPoint r -> Bool
+isClosed = (EndPointType -> EndPointType -> Bool
 forall a. Eq a => a -> a -> Bool
 == EndPointType
 Closed) (EndPointType -> Bool)
@@ -1924,22 +1924,22 @@
 . endPoint r -> EndPointType
 forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType
 endPointType
-    isOpen :: endPoint r -> Bool
-isOpen = Bool -> Bool
+    isOpen :: endPoint r -> Bool
+isOpen = Bool -> Bool
 not (Bool -> Bool) -> (endPoint r -> Bool) -> endPoint r -> Bool
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . endPoint r -> Bool
-isClosed
+isClosed
 
     -- the case when the startpoint of a is contained in B or coincides witht the start of
     -- B the argument is how to actually construct a contained interval
-    aInteriorCase :: Interval_x_IntervalIntersection r (Interval endPoint r)
+    aInteriorCase :: Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
-aInteriorCase Interval_x_IntervalIntersection r (Interval endPoint r)
-containedA Interval_x_IntervalIntersection r (Interval endPoint r)
-partialAB' = case (Interval endPoint r
-aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
+aInteriorCase Interval_x_IntervalIntersection r (Interval endPoint r)
+containedA Interval_x_IntervalIntersection r (Interval endPoint r)
+partialAB' = case (Interval endPoint r
+aInterval endPoint r -> Getting r (Interval endPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval endPoint r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1947,7 +1947,7 @@
 end) r -> r -> Ordering
 forall a. Ord a => a -> a -> Ordering
 `compare` (Interval endPoint r
-bInterval endPoint r -> Getting r (Interval endPoint r) r -> r
+bInterval endPoint r -> Getting r (Interval endPoint r) r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r (Interval endPoint r) r
 forall seg p. HasEnd seg p => Lens' seg p
@@ -1958,12 +1958,12 @@
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 forall a. a -> Maybe a
 Just Interval_x_IntervalIntersection r (Interval endPoint r)
-containedA
+containedA
       Ordering
 EQ
         | endPoint r -> Bool
-isClosed (Interval endPoint r
-bInterval endPoint r
+isClosed (Interval endPoint r
+bInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1972,8 +1972,8 @@
 Lens' (Interval endPoint r) (endPoint r)
 endPoint) Bool -> Bool -> Bool
 || endPoint r -> Bool
-isOpen (Interval endPoint r
-aInterval endPoint r
+isOpen (Interval endPoint r
+aInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -1984,22 +1984,22 @@
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 forall a. a -> Maybe a
 Just Interval_x_IntervalIntersection r (Interval endPoint r)
-containedA
+containedA
         | Bool
 otherwise                                      -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 forall a. a -> Maybe a
 Just Interval_x_IntervalIntersection r (Interval endPoint r)
-partialAB
+partialAB
       Ordering
 GT -> Interval_x_IntervalIntersection r (Interval endPoint r)
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 forall a. a -> Maybe a
 Just Interval_x_IntervalIntersection r (Interval endPoint r)
-partialAB'
+partialAB'
 
-    partialAB :: Interval_x_IntervalIntersection r (Interval endPoint r)
-partialAB = Interval endPoint r
+    partialAB :: Interval_x_IntervalIntersection r (Interval endPoint r)
+partialAB = Interval endPoint r
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 forall r interval.
 interval -> Interval_x_IntervalIntersection r interval
@@ -2012,7 +2012,7 @@
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval (Interval endPoint r
-aInterval endPoint r
+aInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -2020,7 +2020,7 @@
 forall seg p. HasStartPoint seg p => Lens' seg p
 Lens' (Interval endPoint r) (endPoint r)
 startPoint) (Interval endPoint r
-bInterval endPoint r
+bInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -2028,8 +2028,8 @@
 forall seg p. HasEndPoint seg p => Lens' seg p
 Lens' (Interval endPoint r) (endPoint r)
 endPoint)
-    partialBA :: Interval_x_IntervalIntersection r (Interval endPoint r)
-partialBA = Interval endPoint r
+    partialBA :: Interval_x_IntervalIntersection r (Interval endPoint r)
+partialBA = Interval endPoint r
 -> Interval_x_IntervalIntersection r (Interval endPoint r)
 forall r interval.
 interval -> Interval_x_IntervalIntersection r interval
@@ -2042,7 +2042,7 @@
 forall {k} (endPoint :: k -> *) (r :: k).
 endPoint r -> endPoint r -> Interval endPoint r
 Interval (Interval endPoint r
-bInterval endPoint r
+bInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -2050,7 +2050,7 @@
 forall seg p. HasStartPoint seg p => Lens' seg p
 Lens' (Interval endPoint r) (endPoint r)
 startPoint) (Interval endPoint r
-aInterval endPoint r
+aInterval endPoint r
 -> Getting (endPoint r) (Interval endPoint r) (endPoint r)
 -> endPoint r
 forall s a. s -> Getting a s a -> a
@@ -2063,8 +2063,8 @@
 ----------------------------------------
 -- ** IsIntersectable
 
-instance Ord r => ClosedInterval r `IsIntersectableWith` ClosedInterval r where
-  intersect :: ClosedInterval r
+instance Ord r => ClosedInterval r `IsIntersectableWith` ClosedInterval r where
+  intersect :: ClosedInterval r
 -> ClosedInterval r
 -> Intersection (ClosedInterval r) (ClosedInterval r)
 intersect = ClosedInterval r
@@ -2098,8 +2098,8 @@
   --       | l == r    = ClosedInterval_x_ClosedInterval_Point l
   --       | otherwise = ClosedInterval_x_ClosedInterval_Partial $ ClosedInterval l r
 
-instance Ord r => OpenInterval r `IsIntersectableWith` OpenInterval r where
-  intersect :: OpenInterval r
+instance Ord r => OpenInterval r `IsIntersectableWith` OpenInterval r where
+  intersect :: OpenInterval r
 -> OpenInterval r -> Intersection (OpenInterval r) (OpenInterval r)
 intersect = OpenInterval r
 -> OpenInterval r
@@ -2113,8 +2113,8 @@
 -> Maybe (Interval_x_IntervalIntersection r (Interval endPoint r))
 intersectIntervalImpl
 
-instance Ord r => Interval AnEndPoint r `IsIntersectableWith` Interval AnEndPoint r where
-  intersect :: Interval AnEndPoint r
+instance Ord r => Interval AnEndPoint r `IsIntersectableWith` Interval AnEndPoint r where
+  intersect :: Interval AnEndPoint r
 -> Interval AnEndPoint r
 -> Intersection (Interval AnEndPoint r) (Interval AnEndPoint r)
 intersect = Interval AnEndPoint r
diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Line.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.Line.Class.html
index bc2be98a8..5f9e513f6 100644
--- a/haddocks/hgeometry/kernel/src/HGeometry.Line.Class.html
+++ b/haddocks/hgeometry/kernel/src/HGeometry.Line.Class.html
@@ -29,29 +29,29 @@
 -- >>> import HGeometry.Line
 
 -- | Types that can act as lines in d-dimensional space.
-class Line_ line d r | line -> d
-                     , line -> r where
+class Line_ line d r | line -> d
+                     , line -> r where
   -- | Constructs a line through a point and a vector
-  fromPointAndVec ::  ( Point_ point d r
-                      , Line_ line d r
-                      , Num r
-                      ) => point -> Vector d r -> line
+  fromPointAndVec ::  ( Point_ point d r
+                      , Line_ line d r
+                      , Num r
+                      ) => point -> Vector d r -> line
 
 -- | Construct a line through two points.
 --
 -- >>> lineThrough origin (Point2 4 5) :: LinePV 2 Int
 -- LinePV (Point2 0 0) (Vector2 4 5)
-lineThrough     :: forall line point d r.
-                   ( Line_ line d r
-                   , Point_ point d r
-                   , Num r
-                   ) => point -> point -> line
+lineThrough     :: forall line point d r.
+                   ( Line_ line d r
+                   , Point_ point d r
+                   , Num r
+                   ) => point -> point -> line
 lineThrough :: forall line point (d :: Nat) r.
 (Line_ line d r, Point_ point d r, Num r) =>
 point -> point -> line
-lineThrough point
-p point
-q = point -> Vector d r -> line
+lineThrough point
+p point
+q = point -> Vector d r -> line
 forall point.
 (Point_ point d r, Line_ line d r, Num r) =>
 point -> Vector d r -> line
@@ -59,27 +59,27 @@
 (Line_ line d r, Point_ point d r, Line_ line d r, Num r) =>
 point -> Vector d r -> line
 fromPointAndVec point
-p (point
-q point -> point -> Vector d r
+p (point
+q point -> point -> Vector d r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> point -> Vector d r
 .-. point
-p)
+p)
 
 
 -- | Synonym for a line-like class.
-type Line2_ line r = (Line_ line 2 r, HyperPlane_ line 2 r)
+type Line2_ line r = (Line_ line 2 r, HyperPlane_ line 2 r)
 
 
 
 -- | Vertical line with a given X-coordinate.
-verticalLine   :: forall r line.
-                  ( Line_ line 2 r, Num r)
-               => r -> line
+verticalLine   :: forall r line.
+                  ( Line_ line 2 r, Num r)
+               => r -> line
 verticalLine :: forall r line. (Line_ line 2 r, Num r) => r -> line
-verticalLine r
-x = PointF (Vector 2 r) -> Vector 2 r -> line
+verticalLine r
+x = PointF (Vector 2 r) -> Vector 2 r -> line
 forall point.
 (Point_ point 2 r, Line_ line 2 r, Num r) =>
 point -> Vector 2 r -> line
@@ -94,7 +94,7 @@
 $ r -> r -> Vector 2 r
 forall r. r -> r -> Vector 2 r
 Vector2 r
-x r
+x r
 0) (r -> r -> Vector 2 r
 forall r. r -> r -> Vector 2 r
 Vector2 r
@@ -102,11 +102,11 @@
 1)
 
 -- | Horizontal line with a given Y-coordinate.
-horizontalLine   :: forall r line. (Line_ line 2 r, Num r)
-                 => r -> line
+horizontalLine   :: forall r line. (Line_ line 2 r, Num r)
+                 => r -> line
 horizontalLine :: forall r line. (Line_ line 2 r, Num r) => r -> line
-horizontalLine r
-y = PointF (Vector 2 r) -> Vector 2 r -> line
+horizontalLine r
+y = PointF (Vector 2 r) -> Vector 2 r -> line
 forall point.
 (Point_ point 2 r, Line_ line 2 r, Num r) =>
 point -> Vector 2 r -> line
@@ -122,7 +122,7 @@
 forall r. r -> r -> Vector 2 r
 Vector2 r
 0 r
-y) (r -> r -> Vector 2 r
+y) (r -> r -> Vector 2 r
 forall r. r -> r -> Vector 2 r
 Vector2 r
 1 r
@@ -130,7 +130,7 @@
 
 
 -- | Types that have an 'onLine' function that allows testing if a point lies on a line.
-class HasOnLine line d | line -> d where
+class HasOnLine line d | line -> d where
   -- | Test if the point lies on the line
   --
   -- >>> Point2 0 0 `onLine` lineThrough @(LinePV 2 Double) origin (Point2 1 0)
@@ -139,9 +139,9 @@
   -- True
   -- >>> Point2 10 5 `onLine` lineThrough @(LinePV 2 Double) origin (Point2 2 2)
   -- False
-  onLine :: ( Point_ point d r, Num r, Eq r
-            , r ~ NumType line, d ~ Dimension line
-            ) => point -> line -> Bool
+  onLine :: ( Point_ point d r, Num r, Eq r
+            , r ~ NumType line, d ~ Dimension line
+            ) => point -> line -> Bool
 
 
 
diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Line.General.html b/haddocks/hgeometry/kernel/src/HGeometry.Line.General.html
index 371aaca81..432741003 100644
--- a/haddocks/hgeometry/kernel/src/HGeometry.Line.General.html
+++ b/haddocks/hgeometry/kernel/src/HGeometry.Line.General.html
@@ -27,9 +27,9 @@
 --------------------------------------------------------------------------------
 
 -- | A line type that explicitly represents vertical lines.
-data VerticalOrLineEQ r = VerticalLineThrough !r
-                        | NonVertical !(LineEQ r)
-                        deriving (Int -> VerticalOrLineEQ r -> ShowS
+data VerticalOrLineEQ r = VerticalLineThrough !r
+                        | NonVertical !(LineEQ r)
+                        deriving (Int -> VerticalOrLineEQ r -> ShowS
 [VerticalOrLineEQ r] -> ShowS
 VerticalOrLineEQ r -> String
 (Int -> VerticalOrLineEQ r -> ShowS)
@@ -47,7 +47,7 @@
 show :: VerticalOrLineEQ r -> String
 $cshowList :: forall r. Show r => [VerticalOrLineEQ r] -> ShowS
 showList :: [VerticalOrLineEQ r] -> ShowS
-Show,VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
+Show,VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
 (VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool)
 -> (VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool)
 -> Eq (VerticalOrLineEQ r)
@@ -57,7 +57,7 @@
 == :: VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
 $c/= :: forall r. Eq r => VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
 /= :: VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
-Eq,Eq (VerticalOrLineEQ r)
+Eq,Eq (VerticalOrLineEQ r)
 Eq (VerticalOrLineEQ r) =>
 (VerticalOrLineEQ r -> VerticalOrLineEQ r -> Ordering)
 -> (VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool)
@@ -108,7 +108,7 @@
 Ord r =>
 VerticalOrLineEQ r -> VerticalOrLineEQ r -> VerticalOrLineEQ r
 min :: VerticalOrLineEQ r -> VerticalOrLineEQ r -> VerticalOrLineEQ r
-Ord,(forall x. VerticalOrLineEQ r -> Rep (VerticalOrLineEQ r) x)
+Ord,(forall x. VerticalOrLineEQ r -> Rep (VerticalOrLineEQ r) x)
 -> (forall x. Rep (VerticalOrLineEQ r) x -> VerticalOrLineEQ r)
 -> Generic (VerticalOrLineEQ r)
 forall x. Rep (VerticalOrLineEQ r) x -> VerticalOrLineEQ r
@@ -123,38 +123,38 @@
 to :: forall x. Rep (VerticalOrLineEQ r) x -> VerticalOrLineEQ r
 Generic)
 
-type instance NumType   (VerticalOrLineEQ r) = r
-type instance Dimension (VerticalOrLineEQ r) = 2
+type instance NumType   (VerticalOrLineEQ r) = r
+type instance Dimension (VerticalOrLineEQ r) = 2
 
-instance NFData r => NFData (VerticalOrLineEQ r)
+instance NFData r => NFData (VerticalOrLineEQ r)
 
 -- fromGeneralLine :: (Line2_ line r, Num r) => line -> VerticalOrLineEQ r
 -- fromGeneralLine
 
-instance (Fractional r, Eq r) =>  Line_ (VerticalOrLineEQ r) 2 r where
-  fromPointAndVec :: forall point.
+instance (Fractional r, Eq r) =>  Line_ (VerticalOrLineEQ r) 2 r where
+  fromPointAndVec :: forall point.
 (Point_ point 2 r, Line_ (VerticalOrLineEQ r) 2 r, Num r) =>
 point -> Vector 2 r -> VerticalOrLineEQ r
-fromPointAndVec (Point2_ r
-px r
-py) (Vector2 r
-vx r
-vy)
+fromPointAndVec (Point2_ r
+px r
+py) (Vector2 r
+vx r
+vy)
     | r
-vx r -> r -> Bool
+vx r -> r -> Bool
 forall a. Eq a => a -> a -> Bool
 == r
 0  = r -> VerticalOrLineEQ r
 forall r. r -> VerticalOrLineEQ r
 VerticalLineThrough r
-px
+px
     | Bool
-otherwise = let a :: r
-a = r
-vyr -> r -> r
+otherwise = let a :: r
+a = r
+vyr -> r -> r
 forall a. Fractional a => a -> a -> a
 /r
-vx
+vx
                   in LineEQ r -> VerticalOrLineEQ r
 forall r. LineEQ r -> VerticalOrLineEQ r
 NonVertical (LineEQ r -> VerticalOrLineEQ r) -> LineEQ r -> VerticalOrLineEQ r
@@ -162,26 +162,26 @@
 $ r -> r -> LineEQ r
 forall r. r -> r -> LineEQ r
 LineEQ r
-a (r
-pyr -> r -> r
+a (r
+pyr -> r -> r
 forall a. Num a => a -> a -> a
 -r
-pxr -> r -> r
+pxr -> r -> r
 forall a. Num a => a -> a -> a
 *r
-a)
+a)
     -- in principle we get py = a*px + b, with a = (vy/vx), and thus b=py - px*(vy/vx)
 
-instance HasOnLine (VerticalOrLineEQ r) 2 where
-  onLine :: forall point r.
+instance HasOnLine (VerticalOrLineEQ r) 2 where
+  onLine :: forall point r.
 (Point_ point 2 r, Num r, Eq r, r ~ NumType (VerticalOrLineEQ r),
  2 ~ Dimension (VerticalOrLineEQ r)) =>
 point -> VerticalOrLineEQ r -> Bool
-onLine point
-q = \case
-    VerticalLineThrough r
-x -> point
-qpoint -> Getting r point r -> r
+onLine point
+q = \case
+    VerticalLineThrough r
+x -> point
+qpoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
 forall (d :: Nat) point r.
@@ -191,9 +191,9 @@
 xCoord r -> r -> Bool
 forall a. Eq a => a -> a -> Bool
 == r
-x
-    NonVertical LineEQ r
-l         -> point -> LineEQ r -> Bool
+x
+    NonVertical LineEQ r
+l         -> point -> LineEQ r -> Bool
 forall line (d :: Nat) point r.
 (HasOnLine line d, Point_ point d r, Num r, Eq r, r ~ NumType line,
  d ~ Dimension line) =>
@@ -203,30 +203,30 @@
  2 ~ Dimension (LineEQ r)) =>
 point -> LineEQ r -> Bool
 onLine point
-q LineEQ r
-l
+q LineEQ r
+l
 
-instance HyperPlane_ (VerticalOrLineEQ r) 2 r where
-  hyperPlaneEquation :: Num r => VerticalOrLineEQ r -> Vector (2 + 1) r
-hyperPlaneEquation = \case
-    VerticalLineThrough r
-x -> r -> r -> r -> Vector 3 r
+instance HyperPlane_ (VerticalOrLineEQ r) 2 r where
+  hyperPlaneEquation :: Num r => VerticalOrLineEQ r -> Vector (2 + 1) r
+hyperPlaneEquation = \case
+    VerticalLineThrough r
+x -> r -> r -> r -> Vector 3 r
 forall r. r -> r -> r -> Vector 3 r
 Vector3 r
 1 r
 0 (-r
-x)
-    NonVertical LineEQ r
-l         -> LineEQ r -> Vector (2 + 1) r
+x)
+    NonVertical LineEQ r
+l         -> LineEQ r -> Vector (2 + 1) r
 forall hyperPlane (d :: Nat) r.
 (HyperPlane_ hyperPlane d r, Num r) =>
 hyperPlane -> Vector (d + 1) r
 hyperPlaneEquation LineEQ r
-l
-  onHyperPlane :: forall point.
+l
+  onHyperPlane :: forall point.
 (Point_ point 2 r, Eq r, Num r) =>
 point -> VerticalOrLineEQ r -> Bool
-onHyperPlane = point -> VerticalOrLineEQ r -> Bool
+onHyperPlane = point -> VerticalOrLineEQ r -> Bool
 forall line (d :: Nat) point r.
 (HasOnLine line d, Point_ point d r, Num r, Eq r, r ~ NumType line,
  d ~ Dimension line) =>
@@ -238,14 +238,14 @@
 onLine
 
   -- FIXME: remove this implementation; just use the default
-  onSideTest :: forall point.
+  onSideTest :: forall point.
 (Point_ point 2 r, Ord r, Num r) =>
 point -> VerticalOrLineEQ r -> Ordering
-onSideTest point
-q = \case
-    VerticalLineThrough r
-x -> (point
-qpoint -> Getting r point r -> r
+onSideTest point
+q = \case
+    VerticalLineThrough r
+x -> (point
+qpoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
 forall (d :: Nat) point r.
@@ -255,9 +255,9 @@
 xCoord) r -> r -> Ordering
 forall a. Ord a => a -> a -> Ordering
 `compare` r
-x
-    NonVertical LineEQ r
-l         -> point -> LineEQ r -> Ordering
+x
+    NonVertical LineEQ r
+l         -> point -> LineEQ r -> Ordering
 forall point.
 (Point_ point 2 r, Ord r, Num r) =>
 point -> LineEQ r -> Ordering
@@ -265,29 +265,29 @@
 (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) =>
 point -> hyperPlane -> Ordering
 onSideTest point
-q LineEQ r
-l
+q LineEQ r
+l
 
-instance (Fractional r, Eq r) => ConstructableHyperPlane_ (VerticalOrLineEQ r) 2 r where
-  type HyperPlaneFromEquationConstraint (VerticalOrLineEQ r) 2 r = ()
-  hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (VerticalOrLineEQ r) 2 r =>
+instance (Fractional r, Eq r) => ConstructableHyperPlane_ (VerticalOrLineEQ r) 2 r where
+  type HyperPlaneFromEquationConstraint (VerticalOrLineEQ r) 2 r = ()
+  hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (VerticalOrLineEQ r) 2 r =>
 Vector (2 + 1) r -> VerticalOrLineEQ r
-hyperPlaneFromEquation v :: Vector (2 + 1) r
-v@(Vector3 r
-a r
-b r
-c)
+hyperPlaneFromEquation v :: Vector (2 + 1) r
+v@(Vector3 r
+a r
+b r
+c)
     | r
-b r -> r -> Bool
+b r -> r -> Bool
 forall a. Eq a => a -> a -> Bool
 == r
 0    = r -> VerticalOrLineEQ r
 forall r. r -> VerticalOrLineEQ r
 VerticalLineThrough ((-r
-c)r -> r -> r
+c)r -> r -> r
 forall a. Fractional a => a -> a -> a
 /r
-a)
+a)
     | Bool
 otherwise = LineEQ r -> VerticalOrLineEQ r
 forall r. LineEQ r -> VerticalOrLineEQ r
@@ -299,16 +299,16 @@
  HyperPlaneFromEquationConstraint hyperPlane d r) =>
 Vector (d + 1) r -> hyperPlane
 hyperPlaneFromEquation Vector (2 + 1) r
-v
+v
 
 
-  fromPointAndNormal :: forall point.
+  fromPointAndNormal :: forall point.
 (Point_ point 2 r, Num r) =>
 point -> Vector 2 r -> VerticalOrLineEQ r
-fromPointAndNormal point
-p (Vector2 r
-vx r
-vy) = point -> Vector 2 r -> VerticalOrLineEQ r
+fromPointAndNormal point
+p (Vector2 r
+vx r
+vy) = point -> Vector 2 r -> VerticalOrLineEQ r
 forall point.
 (Point_ point 2 r, Line_ (VerticalOrLineEQ r) 2 r, Num r) =>
 point -> Vector 2 r -> VerticalOrLineEQ r
@@ -316,46 +316,46 @@
 (Line_ line d r, Point_ point d r, Line_ line d r, Num r) =>
 point -> Vector d r -> line
 fromPointAndVec point
-p (Vector 2 r -> VerticalOrLineEQ r)
+p (Vector 2 r -> VerticalOrLineEQ r)
 -> Vector 2 r -> VerticalOrLineEQ r
 forall a b. (a -> b) -> a -> b
 $ r -> r -> Vector 2 r
 forall r. r -> r -> Vector 2 r
 Vector2 r
-vy (-r
-vx)
+vy (-r
+vx)
     -- rotate the normal vector 90 degrees clockwise
 
-type instance Intersection (LineEQ r) (VerticalOrLineEQ r) =
-  Maybe (LineLineIntersection (LineEQ r))
+type instance Intersection (LineEQ r) (VerticalOrLineEQ r) =
+  Maybe (LineLineIntersection (LineEQ r))
 
-instance Eq r => HasIntersectionWith (LineEQ r) (VerticalOrLineEQ r) where
-  LineEQ r
-m intersects :: LineEQ r -> VerticalOrLineEQ r -> Bool
-`intersects` VerticalOrLineEQ r
-l = case VerticalOrLineEQ r
-l of
+instance Eq r => HasIntersectionWith (LineEQ r) (VerticalOrLineEQ r) where
+  LineEQ r
+m intersects :: LineEQ r -> VerticalOrLineEQ r -> Bool
+`intersects` VerticalOrLineEQ r
+l = case VerticalOrLineEQ r
+l of
     VerticalLineThrough r
 _ -> Bool
 True
-    NonVertical LineEQ r
-l'        -> LineEQ r
-m LineEQ r -> LineEQ r -> Bool
+    NonVertical LineEQ r
+l'        -> LineEQ r
+m LineEQ r -> LineEQ r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` LineEQ r
-l'
+l'
 
-instance (Eq r, Fractional r)
-         => IsIntersectableWith (LineEQ r) (VerticalOrLineEQ r) where
-  LineEQ r
-m intersect :: LineEQ r
+instance (Eq r, Fractional r)
+         => IsIntersectableWith (LineEQ r) (VerticalOrLineEQ r) where
+  LineEQ r
+m intersect :: LineEQ r
 -> VerticalOrLineEQ r
 -> Intersection (LineEQ r) (VerticalOrLineEQ r)
-`intersect` VerticalOrLineEQ r
-l = case VerticalOrLineEQ r
-l of
-    VerticalLineThrough r
-x -> LineLineIntersectionG r (LineEQ r)
+`intersect` VerticalOrLineEQ r
+l = case VerticalOrLineEQ r
+l of
+    VerticalLineThrough r
+x -> LineLineIntersectionG r (LineEQ r)
 -> Maybe (LineLineIntersectionG r (LineEQ r))
 LineLineIntersectionG r (LineEQ r)
 -> Intersection (LineEQ r) (VerticalOrLineEQ r)
@@ -374,71 +374,71 @@
 $ r -> r -> Point 2 r
 forall r. r -> r -> Point 2 r
 Point2 r
-x (r -> LineEQ r -> r
+x (r -> LineEQ r -> r
 forall r. Num r => r -> LineEQ r -> r
 evalAt' r
-x LineEQ r
-m)
-    NonVertical LineEQ r
-l'        -> LineEQ r
-m LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r)
+x LineEQ r
+m)
+    NonVertical LineEQ r
+l'        -> LineEQ r
+m LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r)
 forall g h. IsIntersectableWith g h => g -> h -> Intersection g h
 `intersect` LineEQ r
-l'
+l'
 
-type instance Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r) =
-  Maybe (LineLineIntersection  (VerticalOrLineEQ r))
+type instance Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r) =
+  Maybe (LineLineIntersection  (VerticalOrLineEQ r))
 
-instance Eq r => HasIntersectionWith (VerticalOrLineEQ r) (VerticalOrLineEQ r) where
-  VerticalOrLineEQ r
-m intersects :: VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
-`intersects` VerticalOrLineEQ r
-l = case VerticalOrLineEQ r
-m of
-    VerticalLineThrough r
-x -> case VerticalOrLineEQ r
-l of
-                               VerticalLineThrough r
-x' -> r
-x r -> r -> Bool
+instance Eq r => HasIntersectionWith (VerticalOrLineEQ r) (VerticalOrLineEQ r) where
+  VerticalOrLineEQ r
+m intersects :: VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
+`intersects` VerticalOrLineEQ r
+l = case VerticalOrLineEQ r
+m of
+    VerticalLineThrough r
+x -> case VerticalOrLineEQ r
+l of
+                               VerticalLineThrough r
+x' -> r
+x r -> r -> Bool
 forall a. Eq a => a -> a -> Bool
 == r
-x'
+x'
                                NonVertical LineEQ r
 _          -> Bool
 True
-    NonVertical LineEQ r
-m'        -> case VerticalOrLineEQ r
-l of
+    NonVertical LineEQ r
+m'        -> case VerticalOrLineEQ r
+l of
                                VerticalLineThrough r
 _  -> Bool
 True
-                               NonVertical LineEQ r
-l'         -> LineEQ r
-m' LineEQ r -> LineEQ r -> Bool
+                               NonVertical LineEQ r
+l'         -> LineEQ r
+m' LineEQ r -> LineEQ r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` LineEQ r
-l'
+l'
 
-instance (Eq r, Fractional r)
-         => IsIntersectableWith (VerticalOrLineEQ r) (VerticalOrLineEQ r) where
-  VerticalOrLineEQ r
-m intersect :: VerticalOrLineEQ r
+instance (Eq r, Fractional r)
+         => IsIntersectableWith (VerticalOrLineEQ r) (VerticalOrLineEQ r) where
+  VerticalOrLineEQ r
+m intersect :: VerticalOrLineEQ r
 -> VerticalOrLineEQ r
 -> Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
-`intersect` VerticalOrLineEQ r
-l = case VerticalOrLineEQ r
-m of
-    VerticalLineThrough r
-x -> case VerticalOrLineEQ r
-l of
-        VerticalLineThrough r
-x'
+`intersect` VerticalOrLineEQ r
+l = case VerticalOrLineEQ r
+m of
+    VerticalLineThrough r
+x -> case VerticalOrLineEQ r
+l of
+        VerticalLineThrough r
+x'
           | r
-x r -> r -> Bool
+x r -> r -> Bool
 forall a. Eq a => a -> a -> Bool
 == r
-x'            -> LineLineIntersectionG r (VerticalOrLineEQ r)
+x'            -> LineLineIntersectionG r (VerticalOrLineEQ r)
 -> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
 forall a. a -> Maybe a
 Just (LineLineIntersectionG r (VerticalOrLineEQ r)
@@ -449,14 +449,14 @@
 $ VerticalOrLineEQ r -> LineLineIntersectionG r (VerticalOrLineEQ r)
 forall r line. line -> LineLineIntersectionG r line
 Line_x_Line_Line VerticalOrLineEQ r
-m
+m
           | Bool
 otherwise          -> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
 Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
 forall a. Maybe a
 Nothing
-        NonVertical LineEQ r
-l'         -> LineLineIntersectionG r (VerticalOrLineEQ r)
+        NonVertical LineEQ r
+l'         -> LineLineIntersectionG r (VerticalOrLineEQ r)
 -> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
 LineLineIntersectionG r (VerticalOrLineEQ r)
 -> Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
@@ -477,16 +477,16 @@
 $ r -> r -> Point 2 r
 forall r. r -> r -> Point 2 r
 Point2 r
-x (r -> LineEQ r -> r
+x (r -> LineEQ r -> r
 forall r. Num r => r -> LineEQ r -> r
 evalAt' r
-x LineEQ r
-l')
-    NonVertical LineEQ r
-m'        -> case VerticalOrLineEQ r
-l of
-        VerticalLineThrough r
-x' -> LineLineIntersectionG r (VerticalOrLineEQ r)
+x LineEQ r
+l')
+    NonVertical LineEQ r
+m'        -> case VerticalOrLineEQ r
+l of
+        VerticalLineThrough r
+x' -> LineLineIntersectionG r (VerticalOrLineEQ r)
 -> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
 LineLineIntersectionG r (VerticalOrLineEQ r)
 -> Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
@@ -507,13 +507,13 @@
 $ r -> r -> Point 2 r
 forall r. r -> r -> Point 2 r
 Point2 r
-x' (r -> LineEQ r -> r
+x' (r -> LineEQ r -> r
 forall r. Num r => r -> LineEQ r -> r
 evalAt' r
-x' LineEQ r
-m')
-        NonVertical LineEQ r
-l'         -> (LineEQ r -> VerticalOrLineEQ r)
+x' LineEQ r
+m')
+        NonVertical LineEQ r
+l'         -> (LineEQ r -> VerticalOrLineEQ r)
 -> LineLineIntersectionG r (LineEQ r)
 -> LineLineIntersectionG r (VerticalOrLineEQ r)
 forall a b.
@@ -527,24 +527,24 @@
 -> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> LineEQ r
-m' LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r)
+m' LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r)
 forall g h. IsIntersectableWith g h => g -> h -> Intersection g h
 `intersect` LineEQ r
-l'
+l'
 
 
-type instance Intersection (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') =
-  Maybe (LineLineIntersection  (VerticalOrLineEQ r :+ extra))
+type instance Intersection (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') =
+  Maybe (LineLineIntersection  (VerticalOrLineEQ r :+ extra))
 
 
-instance Eq r => HasIntersectionWith (VerticalOrLineEQ r :+ extra)
-                                     (VerticalOrLineEQ r :+ extra') where
-  VerticalOrLineEQ r :+ extra
-m intersects :: (VerticalOrLineEQ r :+ extra)
+instance Eq r => HasIntersectionWith (VerticalOrLineEQ r :+ extra)
+                                     (VerticalOrLineEQ r :+ extra') where
+  VerticalOrLineEQ r :+ extra
+m intersects :: (VerticalOrLineEQ r :+ extra)
 -> (VerticalOrLineEQ r :+ extra') -> Bool
-`intersects` VerticalOrLineEQ r :+ extra'
-l = (VerticalOrLineEQ r :+ extra
-m(VerticalOrLineEQ r :+ extra)
+`intersects` VerticalOrLineEQ r :+ extra'
+l = (VerticalOrLineEQ r :+ extra
+m(VerticalOrLineEQ r :+ extra)
 -> Getting
      (VerticalOrLineEQ r)
      (VerticalOrLineEQ r :+ extra)
@@ -561,7 +561,7 @@
 core) VerticalOrLineEQ r -> VerticalOrLineEQ r -> Bool
 forall g h. HasIntersectionWith g h => g -> h -> Bool
 `intersects` (VerticalOrLineEQ r :+ extra'
-l(VerticalOrLineEQ r :+ extra')
+l(VerticalOrLineEQ r :+ extra')
 -> Getting
      (VerticalOrLineEQ r)
      (VerticalOrLineEQ r :+ extra')
@@ -577,17 +577,17 @@
 (core -> f core') -> (core :+ extra) -> f (core' :+ extra)
 core)
 
-instance (Eq r, Fractional r)
-         => IsIntersectableWith (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') where
-  VerticalOrLineEQ r :+ extra
-m intersect :: (VerticalOrLineEQ r :+ extra)
+instance (Eq r, Fractional r)
+         => IsIntersectableWith (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra') where
+  VerticalOrLineEQ r :+ extra
+m intersect :: (VerticalOrLineEQ r :+ extra)
 -> (VerticalOrLineEQ r :+ extra')
 -> Intersection
      (VerticalOrLineEQ r :+ extra) (VerticalOrLineEQ r :+ extra')
-`intersect` VerticalOrLineEQ r :+ extra'
-l = let ix :: Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
-ix = (VerticalOrLineEQ r :+ extra
-m(VerticalOrLineEQ r :+ extra)
+`intersect` VerticalOrLineEQ r :+ extra'
+l = let ix :: Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
+ix = (VerticalOrLineEQ r :+ extra
+m(VerticalOrLineEQ r :+ extra)
 -> Getting
      (VerticalOrLineEQ r)
      (VerticalOrLineEQ r :+ extra)
@@ -606,7 +606,7 @@
 -> Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
 forall g h. IsIntersectableWith g h => g -> h -> Intersection g h
 `intersect` (VerticalOrLineEQ r :+ extra'
-l(VerticalOrLineEQ r :+ extra')
+l(VerticalOrLineEQ r :+ extra')
 -> Getting
      (VerticalOrLineEQ r)
      (VerticalOrLineEQ r :+ extra')
@@ -631,12 +631,12 @@
 -> VerticalOrLineEQ r -> VerticalOrLineEQ r :+ extra
 forall a b. a -> b -> a
 const VerticalOrLineEQ r :+ extra
-m) (LineLineIntersectionG r (VerticalOrLineEQ r)
+m) (LineLineIntersectionG r (VerticalOrLineEQ r)
  -> LineLineIntersectionG r (VerticalOrLineEQ r :+ extra))
 -> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
 -> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r :+ extra))
 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
 <$> Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
 Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
-ix -- if it is a line, just replace it by m
+ix -- if it is a line, just replace it by m
 
\ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Line.Intersection.html b/haddocks/hgeometry/kernel/src/HGeometry.Line.Intersection.html index 7a59cf834..63d694f5c 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Line.Intersection.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Line.Intersection.html @@ -19,9 +19,9 @@
-------------------------------------------------------------------------------- -- | Line x Line intersections are either just points or lines. -data LineLineIntersectionG r line = Line_x_Line_Point (Point 2 r) - | Line_x_Line_Line line - deriving (Int -> LineLineIntersectionG r line -> ShowS +data LineLineIntersectionG r line = Line_x_Line_Point (Point 2 r) + | Line_x_Line_Line line + deriving (Int -> LineLineIntersectionG r line -> ShowS [LineLineIntersectionG r line] -> ShowS LineLineIntersectionG r line -> String (Int -> LineLineIntersectionG r line -> ShowS) @@ -51,7 +51,7 @@ (Show r, Show line) => [LineLineIntersectionG r line] -> ShowS showList :: [LineLineIntersectionG r line] -> ShowS -Show,LineLineIntersectionG r line +Show,LineLineIntersectionG r line -> LineLineIntersectionG r line -> Bool (LineLineIntersectionG r line -> LineLineIntersectionG r line -> Bool) @@ -75,7 +75,7 @@ -> LineLineIntersectionG r line -> Bool /= :: LineLineIntersectionG r line -> LineLineIntersectionG r line -> Bool -Eq,ReadPrec [LineLineIntersectionG r line] +Eq,ReadPrec [LineLineIntersectionG r line] ReadPrec (LineLineIntersectionG r line) Int -> ReadS (LineLineIntersectionG r line) ReadS [LineLineIntersectionG r line] @@ -115,7 +115,7 @@ (Read r, Read line) => ReadPrec [LineLineIntersectionG r line] readListPrec :: ReadPrec [LineLineIntersectionG r line] -Read,(forall a b. +Read,(forall a b. (a -> b) -> LineLineIntersectionG r a -> LineLineIntersectionG r b) -> (forall a b. a -> LineLineIntersectionG r b -> LineLineIntersectionG r a) @@ -141,7 +141,7 @@ a -> LineLineIntersectionG r b -> LineLineIntersectionG r a Functor) -type LineLineIntersection line = LineLineIntersectionG (NumType line) line +type LineLineIntersection line = LineLineIntersectionG (NumType line) line -- deriving instance (Show (Point 2 (NumType line)), Show line) => Show (LineLineIntersection line) diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Line.LineEQ.html b/haddocks/hgeometry/kernel/src/HGeometry.Line.LineEQ.html index 484644720..30538b0e3 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Line.LineEQ.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Line.LineEQ.html @@ -37,8 +37,8 @@ -------------------------------------------------------------------------------- -- | A Line by its equation -newtype LineEQ r = MkLineEQ (NonVerticalHyperPlane 2 r) - deriving newtype (LineEQ r -> LineEQ r -> Bool +newtype LineEQ r = MkLineEQ (NonVerticalHyperPlane 2 r) + deriving newtype (LineEQ r -> LineEQ r -> Bool (LineEQ r -> LineEQ r -> Bool) -> (LineEQ r -> LineEQ r -> Bool) -> Eq (LineEQ r) forall r. Eq r => LineEQ r -> LineEQ r -> Bool @@ -47,7 +47,7 @@ == :: LineEQ r -> LineEQ r -> Bool $c/= :: forall r. Eq r => LineEQ r -> LineEQ r -> Bool /= :: LineEQ r -> LineEQ r -> Bool -Eq,Eq (LineEQ r) +Eq,Eq (LineEQ r) Eq (LineEQ r) => (LineEQ r -> LineEQ r -> Ordering) -> (LineEQ r -> LineEQ r -> Bool) @@ -88,14 +88,14 @@ max :: LineEQ r -> LineEQ r -> LineEQ r $cmin :: forall r. Ord r => LineEQ r -> LineEQ r -> LineEQ r min :: LineEQ r -> LineEQ r -> LineEQ r -Ord,LineEQ r -> () +Ord,LineEQ r -> () (LineEQ r -> ()) -> NFData (LineEQ r) forall r. NFData r => LineEQ r -> () forall a. (a -> ()) -> NFData a $crnf :: forall r. NFData r => LineEQ r -> () rnf :: LineEQ r -> () NFData) - deriving stock ((forall x. LineEQ r -> Rep (LineEQ r) x) + deriving stock ((forall x. LineEQ r -> Rep (LineEQ r) x) -> (forall x. Rep (LineEQ r) x -> LineEQ r) -> Generic (LineEQ r) forall x. Rep (LineEQ r) x -> LineEQ r forall x. LineEQ r -> Rep (LineEQ r) x @@ -110,14 +110,14 @@ Generic) -- | Constructs a line in R^2, i.e. a line for the equation \(y = ax + b\) -pattern LineEQ :: r -> r -> LineEQ r +pattern LineEQ :: r -> r -> LineEQ r pattern $mLineEQ :: forall {r} {r}. LineEQ r -> (r -> r -> r) -> ((# #) -> r) -> r $bLineEQ :: forall r. r -> r -> LineEQ r -LineEQ a b = MkLineEQ (NonVerticalHyperPlane (Vector2 a b)) +LineEQ a b = MkLineEQ (NonVerticalHyperPlane (Vector2 a b)) {-# COMPLETE LineEQ #-} -type instance NumType (LineEQ r) = r -type instance Dimension (LineEQ r) = 2 +type instance NumType (LineEQ r) = r +type instance Dimension (LineEQ r) = 2 -- deriving instance Eq (VectorFamily' 2 r) => Eq (LineEQ r) @@ -133,14 +133,14 @@ -- cfoldMap f (LineEQ a b) = f a <> f b -instance (Show r) => Show (LineEQ r) where - showsPrec :: Int -> LineEQ r -> ShowS -showsPrec Int -k (LineEQ r -a r -b) = Bool -> ShowS -> ShowS +instance (Show r) => Show (LineEQ r) where + showsPrec :: Int -> LineEQ r -> ShowS +showsPrec Int +k (LineEQ r +a r +b) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int appPrec) (ShowS -> ShowS) -> ShowS -> ShowS @@ -158,7 +158,7 @@ forall a. Num a => a -> a -> a +Int 1) r -a +a ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -173,16 +173,16 @@ forall a. Num a => a -> a -> a +Int 1) r -b +b appPrec :: Int appPrec :: Int appPrec = Int 10 -instance (Read r) => Read (LineEQ r) where - readPrec :: ReadPrec (LineEQ r) -readPrec = ReadPrec (LineEQ r) -> ReadPrec (LineEQ r) +instance (Read r) => Read (LineEQ r) where + readPrec :: ReadPrec (LineEQ r) +readPrec = ReadPrec (LineEQ r) -> ReadPrec (LineEQ r) forall a. ReadPrec a -> ReadPrec a parens (Int -> ReadPrec (LineEQ r) -> ReadPrec (LineEQ r) forall a. Int -> ReadPrec a -> ReadPrec a @@ -194,14 +194,14 @@ Ident String "LineEQ" <- ReadPrec Lexeme lexP - r -a <- ReadPrec r -> ReadPrec r + r +a <- ReadPrec r -> ReadPrec r forall a. ReadPrec a -> ReadPrec a step ReadPrec r forall a. Read a => ReadPrec a readPrec - r -b <- ReadPrec r -> ReadPrec r + r +b <- ReadPrec r -> ReadPrec r forall a. ReadPrec a -> ReadPrec a step ReadPrec r forall a. Read a => ReadPrec a @@ -212,15 +212,15 @@ return (r -> r -> LineEQ r forall r. r -> r -> LineEQ r LineEQ r -a r -b)) +a r +b)) -instance ( MkHyperPlaneConstraints 2 r - ) => HyperPlane_ (LineEQ r) 2 r where - onHyperPlane :: forall point. +instance ( MkHyperPlaneConstraints 2 r + ) => HyperPlane_ (LineEQ r) 2 r where + onHyperPlane :: forall point. (Point_ point 2 r, Eq r, Num r) => point -> LineEQ r -> Bool -onHyperPlane = point -> LineEQ r -> Bool +onHyperPlane = point -> LineEQ r -> Bool forall line (d :: Nat) point r. (HasOnLine line d, Point_ point d r, Num r, Eq r, r ~ NumType line, d ~ Dimension line) => @@ -231,13 +231,13 @@ point -> LineEQ r -> Bool onLine -instance ( MkHyperPlaneConstraints 2 r - , Fractional r, Eq r - ) => ConstructableHyperPlane_ (LineEQ r) 2 r where +instance ( MkHyperPlaneConstraints 2 r + , Fractional r, Eq r + ) => ConstructableHyperPlane_ (LineEQ r) 2 r where -- | pre: the last component is not zero - hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (LineEQ r) 2 r => + hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (LineEQ r) 2 r => Vector (2 + 1) r -> LineEQ r -hyperPlaneFromEquation = NonVerticalHyperPlane 2 r -> LineEQ r +hyperPlaneFromEquation = NonVerticalHyperPlane 2 r -> LineEQ r forall r. NonVerticalHyperPlane 2 r -> LineEQ r MkLineEQ (NonVerticalHyperPlane 2 r -> LineEQ r) @@ -249,13 +249,13 @@ (ConstructableHyperPlane_ hyperPlane d r, HyperPlaneFromEquationConstraint hyperPlane d r) => Vector (d + 1) r -> hyperPlane -hyperPlaneFromEquation @(NonVerticalHyperPlane 2 r) +hyperPlaneFromEquation @(NonVerticalHyperPlane 2 r) {-# INLINE hyperPlaneFromEquation #-} - fromPointAndNormal :: forall point. + fromPointAndNormal :: forall point. (Point_ point 2 r, Num r) => point -> Vector 2 r -> LineEQ r -fromPointAndNormal point -p = NonVerticalHyperPlane 2 r -> LineEQ r +fromPointAndNormal point +p = NonVerticalHyperPlane 2 r -> LineEQ r forall r. NonVerticalHyperPlane 2 r -> LineEQ r MkLineEQ (NonVerticalHyperPlane 2 r -> LineEQ r) -> (Vector 2 r -> NonVerticalHyperPlane 2 r) @@ -271,21 +271,21 @@ Num r) => point -> Vector d r -> hyperPlane fromPointAndNormal point -p +p {-# INLINE fromPointAndNormal #-} -instance ( MkHyperPlaneConstraints 2 r, Num r - ) => NonVerticalHyperPlane_ (LineEQ r) 2 r where - evalAt :: forall point. +instance ( MkHyperPlaneConstraints 2 r, Num r + ) => NonVerticalHyperPlane_ (LineEQ r) 2 r where + evalAt :: forall point. (Num r, 1 <= 2, Point_ point (2 - 1) r) => point -> LineEQ r -> r -evalAt point -p = r -> LineEQ r -> r +evalAt point +p = r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' (r -> LineEQ r -> r) -> r -> LineEQ r -> r forall a b. (a -> b) -> a -> b $ point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -293,23 +293,23 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord - hyperPlaneCoefficients :: Lens' (LineEQ r) (Vector 2 r) -hyperPlaneCoefficients = (Vector 2 r -> f (Vector 2 r)) -> LineEQ r -> f (LineEQ r) + hyperPlaneCoefficients :: Lens' (LineEQ r) (Vector 2 r) +hyperPlaneCoefficients = (Vector 2 r -> f (Vector 2 r)) -> LineEQ r -> f (LineEQ r) forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Iso (LineEQ r) (LineEQ r) (Vector 2 r) (Vector 2 r) coerced -instance HasOnLine (LineEQ r) 2 where - onLine :: forall point r. +instance HasOnLine (LineEQ r) 2 where + onLine :: forall point r. (Point_ point 2 r, Num r, Eq r, r ~ NumType (LineEQ r), 2 ~ Dimension (LineEQ r)) => point -> LineEQ r -> Bool -onLine point -q LineEQ r -l = r -> LineEQ r -> r +onLine point +q LineEQ r +l = r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' (point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -317,10 +317,10 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) LineEQ r -l r -> r -> Bool +l r -> r -> Bool forall a. Eq a => a -> a -> Bool == point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -342,69 +342,69 @@ ---------------------------------------- -- | The intersection of two lines is either: NoIntersection, a point or a line. -type instance Intersection (LineEQ r) (LineEQ r) = - Maybe (LineLineIntersection (LineEQ r)) +type instance Intersection (LineEQ r) (LineEQ r) = + Maybe (LineLineIntersection (LineEQ r)) -instance (Eq r) => HasIntersectionWith (LineEQ r) (LineEQ r) where - (LineEQ r -a r -b) intersects :: LineEQ r -> LineEQ r -> Bool -`intersects` (LineEQ r -a' r -b') = r -a r -> r -> Bool +instance (Eq r) => HasIntersectionWith (LineEQ r) (LineEQ r) where + (LineEQ r +a r +b) intersects :: LineEQ r -> LineEQ r -> Bool +`intersects` (LineEQ r +a' r +b') = r +a r -> r -> Bool forall a. Eq a => a -> a -> Bool /= r -a' Bool -> Bool -> Bool +a' Bool -> Bool -> Bool || r -b r -> r -> Bool +b r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -b' +b' -- in case the slope are different, we certainly intersect. If the slopes are equal -- ( and thus a /= b == False ) the lines only intersect if their intercepts are also equal. -instance (Eq r, Fractional r) - => IsIntersectableWith (LineEQ r) (LineEQ r) where - l :: LineEQ r -l@(LineEQ r -a r -b) intersect :: LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) -`intersect` (LineEQ r -a' r -b') +instance (Eq r, Fractional r) + => IsIntersectableWith (LineEQ r) (LineEQ r) where + l :: LineEQ r +l@(LineEQ r +a r +b) intersect :: LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) +`intersect` (LineEQ r +a' r +b') | r -a r -> r -> Bool +a r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -a' = if r -b r -> r -> Bool +a' = if r +b r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -b' then LineLineIntersectionG r (LineEQ r) +b' then LineLineIntersectionG r (LineEQ r) -> Maybe (LineLineIntersectionG r (LineEQ r)) forall a. a -> Maybe a Just (LineEQ r -> LineLineIntersectionG r (LineEQ r) forall r line. line -> LineLineIntersectionG r line Line_x_Line_Line LineEQ r -l) else Maybe (LineLineIntersectionG r (LineEQ r)) +l) else Maybe (LineLineIntersectionG r (LineEQ r)) Intersection (LineEQ r) (LineEQ r) forall a. Maybe a Nothing | Bool -otherwise = let x :: r -x = (r -b'r -> r -> r +otherwise = let x :: r +x = (r +b'r -> r -> r forall a. Num a => a -> a -> a -r -b) r -> r -> r +b) r -> r -> r forall a. Fractional a => a -> a -> a / (r -ar -> r -> r +ar -> r -> r forall a. Num a => a -> a -> a -r -a') +a') in LineLineIntersectionG r (LineEQ r) -> Maybe (LineLineIntersectionG r (LineEQ r)) LineLineIntersectionG r (LineEQ r) @@ -424,35 +424,35 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x (r -> LineEQ r -> r +x (r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' r -x LineEQ r -l) +x LineEQ r +l) -type instance Intersection (LineEQ r :+ extra) (LineEQ r :+ extra') = - Maybe (LineLineIntersection (LineEQ r :+ extra)) +type instance Intersection (LineEQ r :+ extra) (LineEQ r :+ extra') = + Maybe (LineLineIntersection (LineEQ r :+ extra)) -- instance (Eq r) => HasIntersectionWith (LineEQ r :+ extra) (LineEQ r :+ extra') where -- l `intersects` m = (l^.core) `intersects` (m^.core) -instance (HasIntersectionWith (LineEQ r :+ extra) (LineEQ r :+ extra'), Fractional r, Eq r) - => IsIntersectableWith (LineEQ r :+ extra) (LineEQ r :+ extra') where - LineEQ r :+ extra -l intersect :: (LineEQ r :+ extra) +instance (HasIntersectionWith (LineEQ r :+ extra) (LineEQ r :+ extra'), Fractional r, Eq r) + => IsIntersectableWith (LineEQ r :+ extra) (LineEQ r :+ extra') where + LineEQ r :+ extra +l intersect :: (LineEQ r :+ extra) -> (LineEQ r :+ extra') -> Intersection (LineEQ r :+ extra) (LineEQ r :+ extra') -`intersect` LineEQ r :+ extra' -m = LineLineIntersectionG r (LineEQ r) +`intersect` LineEQ r :+ extra' +m = LineLineIntersectionG r (LineEQ r) -> LineLineIntersectionG r (LineEQ r :+ extra) -tag (LineLineIntersectionG r (LineEQ r) +tag (LineLineIntersectionG r (LineEQ r) -> LineLineIntersectionG r (LineEQ r :+ extra)) -> Maybe (LineLineIntersectionG r (LineEQ r)) -> Maybe (LineLineIntersectionG r (LineEQ r :+ extra)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (LineEQ r :+ extra -l(LineEQ r :+ extra) +l(LineEQ r :+ extra) -> Getting (LineEQ r) (LineEQ r :+ extra) (LineEQ r) -> LineEQ r forall s a. s -> Getting a s a -> a ^.Getting (LineEQ r) (LineEQ r :+ extra) (LineEQ r) @@ -462,7 +462,7 @@ core) LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` (LineEQ r :+ extra' -m(LineEQ r :+ extra') +m(LineEQ r :+ extra') -> Getting (LineEQ r) (LineEQ r :+ extra') (LineEQ r) -> LineEQ r forall s a. s -> Getting a s a -> a ^.Getting (LineEQ r) (LineEQ r :+ extra') (LineEQ r) @@ -471,123 +471,123 @@ (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core) where - tag :: LineLineIntersectionG r (LineEQ r) + tag :: LineLineIntersectionG r (LineEQ r) -> LineLineIntersectionG r (LineEQ r :+ extra) -tag = \case - Line_x_Line_Point Point 2 r -p -> Point 2 r -> LineLineIntersectionG r (LineEQ r :+ extra) +tag = \case + Line_x_Line_Point Point 2 r +p -> Point 2 r -> LineLineIntersectionG r (LineEQ r :+ extra) forall r line. Point 2 r -> LineLineIntersectionG r line Line_x_Line_Point Point 2 r -p - Line_x_Line_Line LineEQ r -_lCore -> (LineEQ r :+ extra) -> LineLineIntersectionG r (LineEQ r :+ extra) +p + Line_x_Line_Line LineEQ r +_lCore -> (LineEQ r :+ extra) -> LineLineIntersectionG r (LineEQ r :+ extra) forall r line. line -> LineLineIntersectionG r line Line_x_Line_Line LineEQ r :+ extra -l -- the line we return is the left line +l -- the line we return is the left line ---------------------------------------- -type instance Intersection (LineEQ r) (HyperPlane 2 r) = - Maybe (LineLineIntersection (LineEQ r)) +type instance Intersection (LineEQ r) (HyperPlane 2 r) = + Maybe (LineLineIntersection (LineEQ r)) -instance (Eq r, Fractional r - ) => HasIntersectionWith (LineEQ r) (HyperPlane 2 r) where - (LineEQ r -a r -_) intersects :: LineEQ r -> HyperPlane 2 r -> Bool +instance (Eq r, Fractional r + ) => HasIntersectionWith (LineEQ r) (HyperPlane 2 r) where + (LineEQ r +a r +_) intersects :: LineEQ r -> HyperPlane 2 r -> Bool `intersects` (HyperPlane (Vector3 r -_ r -a' r -b')) +_ r +a' r +b')) = r -b' r -> r -> Bool +b' r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 Bool -> Bool -> Bool || r -a r -> r -> Bool +a r -> r -> Bool forall a. Eq a => a -> a -> Bool /= (r -a'r -> r -> r +a'r -> r -> r forall a. Fractional a => a -> a -> a / (-r -b')) +b')) -instance (Eq r, Fractional r) - => IsIntersectableWith (LineEQ r) (HyperPlane 2 r) where - l :: LineEQ r -l@(LineEQ r -a r -b) intersect :: LineEQ r +instance (Eq r, Fractional r) + => IsIntersectableWith (LineEQ r) (HyperPlane 2 r) where + l :: LineEQ r +l@(LineEQ r +a r +b) intersect :: LineEQ r -> HyperPlane 2 r -> Intersection (LineEQ r) (HyperPlane 2 r) -`intersect` (HyperPlane (Vector3 r -c' r -a' r -b')) +`intersect` (HyperPlane (Vector3 r +c' r +a' r +b')) | r -b' r -> r -> Bool +b' r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 = r -> Maybe (LineLineIntersectionG r (LineEQ r)) -point (r -> Maybe (LineLineIntersectionG r (LineEQ r))) +point (r -> Maybe (LineLineIntersectionG r (LineEQ r))) -> r -> Maybe (LineLineIntersectionG r (LineEQ r)) forall a b. (a -> b) -> a -> b $ r -c'r -> r -> r +c'r -> r -> r forall a. Fractional a => a -> a -> a / (-r -a') +a') | r -a r -> r -> Bool +a r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -d' = if r -b r -> r -> Bool +d' = if r +b r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -e' then LineLineIntersectionG r (LineEQ r) +e' then LineLineIntersectionG r (LineEQ r) -> Maybe (LineLineIntersectionG r (LineEQ r)) forall a. a -> Maybe a Just (LineEQ r -> LineLineIntersectionG r (LineEQ r) forall r line. line -> LineLineIntersectionG r line Line_x_Line_Line LineEQ r -l) else Maybe (LineLineIntersectionG r (LineEQ r)) +l) else Maybe (LineLineIntersectionG r (LineEQ r)) Intersection (LineEQ r) (HyperPlane 2 r) forall a. Maybe a Nothing | Bool otherwise = r -> Maybe (LineLineIntersectionG r (LineEQ r)) -point (r -> Maybe (LineLineIntersectionG r (LineEQ r))) +point (r -> Maybe (LineLineIntersectionG r (LineEQ r))) -> r -> Maybe (LineLineIntersectionG r (LineEQ r)) forall a b. (a -> b) -> a -> b $ (r -e'r -> r -> r +e'r -> r -> r forall a. Num a => a -> a -> a -r -b) r -> r -> r +b) r -> r -> r forall a. Fractional a => a -> a -> a / (r -ar -> r -> r +ar -> r -> r forall a. Num a => a -> a -> a -r -d') +d') where - d' :: r -d' = r -a'r -> r -> r + d' :: r +d' = r +a'r -> r -> r forall a. Fractional a => a -> a -> a /(-r -b') - e' :: r -e' = r -c'r -> r -> r +b') + e' :: r +e' = r +c'r -> r -> r forall a. Fractional a => a -> a -> a /(-r -b') +b') - point :: r -> Maybe (LineLineIntersectionG r (LineEQ r)) -point r -x = LineLineIntersectionG r (LineEQ r) + point :: r -> Maybe (LineLineIntersectionG r (LineEQ r)) +point r +x = LineLineIntersectionG r (LineEQ r) -> Maybe (LineLineIntersectionG r (LineEQ r)) forall a. a -> Maybe a Just (LineLineIntersectionG r (LineEQ r) @@ -604,38 +604,38 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x (r -> LineEQ r -> r +x (r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' r -x LineEQ r -l) +x LineEQ r +l) ---------------------------------------- -type instance Intersection (HyperPlane 2 r) (HyperPlane 2 r) = - Maybe (LineLineIntersection (HyperPlane 2 r)) +type instance Intersection (HyperPlane 2 r) (HyperPlane 2 r) = + Maybe (LineLineIntersection (HyperPlane 2 r)) -instance ( Num r, Eq r - ) => HasIntersectionWith (HyperPlane 2 r) (HyperPlane 2 r) where - HyperPlane 2 r -l intersects :: HyperPlane 2 r -> HyperPlane 2 r -> Bool -`intersects` HyperPlane 2 r -h = Bool -> Bool +instance ( Num r, Eq r + ) => HasIntersectionWith (HyperPlane 2 r) (HyperPlane 2 r) where + HyperPlane 2 r +l intersects :: HyperPlane 2 r -> HyperPlane 2 r -> Bool +`intersects` HyperPlane 2 r +h = Bool -> Bool not (HyperPlane 2 r -> HyperPlane 2 r -> Bool forall hyperPlane (d :: Nat) r hyperPlane'. (HyperPlane_ hyperPlane d r, HyperPlane_ hyperPlane' d r, Has_ Metric_ d r, Num r, Eq r, 1 <= d) => hyperPlane -> hyperPlane' -> Bool isParallelTo HyperPlane 2 r -l HyperPlane 2 r -h) Bool -> Bool -> Bool +l HyperPlane 2 r +h) Bool -> Bool -> Bool || HyperPlane 2 r -l HyperPlane 2 r -> HyperPlane 2 r -> Bool +l HyperPlane 2 r -> HyperPlane 2 r -> Bool forall a. Eq a => a -> a -> Bool == HyperPlane 2 r -h +h -- two dimensional hyperplanes are lines; they intersect if they are not parallel, and in -- case they are parallel they better be same line @@ -648,19 +648,19 @@ -------------------------------------------------------------------------------- -- | Evaluate the line at at given position. -evalAt' :: Num r => r -> LineEQ r -> r +evalAt' :: Num r => r -> LineEQ r -> r evalAt' :: forall r. Num r => r -> LineEQ r -> r -evalAt' r -x (LineEQ r -a r -b) = r -ar -> r -> r +evalAt' r +x (LineEQ r +a r +b) = r +ar -> r -> r forall a. Num a => a -> a -> a *r -x r -> r -> r +x r -> r -> r forall a. Num a => a -> a -> a + r -b +b -- TODO: it would be nice if this was actually just evalAt from the typeclass .... -- evalAt'' :: Fractional r => r -> LineEQ r -> r diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Line.NonVertical.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.Line.NonVertical.Class.html index c07441292..87886690c 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Line.NonVertical.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Line.NonVertical.Class.html @@ -26,21 +26,21 @@ -- | Typeclass modelling Non-vertical lines -type NVLine2_ line r = (Line_ line 2 r, NonVerticalHyperPlane_ line 2 r) +type NVLine2_ line r = (Line_ line 2 r, NonVerticalHyperPlane_ line 2 r) -- | Match on a non-vertical line -pattern NVLine2_ :: NonVerticalHyperPlane_ line 2 r => r -> r -> line +pattern NVLine2_ :: NonVerticalHyperPlane_ line 2 r => r -> r -> line pattern $mNVLine2_ :: forall {r} {line} {r}. NonVerticalHyperPlane_ line 2 r => line -> (r -> r -> r) -> ((# #) -> r) -> r -NVLine2_ a b <- (view hyperPlaneCoefficients -> Vector2 a b) +NVLine2_ a b <- (view hyperPlaneCoefficients -> Vector2 a b) {-# COMPLETE NVLine2_ #-} -- | Lens to access the slope of a line -- -- >>> (LineEQ 10 20) ^. slope -- 10 -slope :: NonVerticalHyperPlane_ line 2 r => Lens' line r +slope :: NonVerticalHyperPlane_ line 2 r => Lens' line r slope :: forall line r. NonVerticalHyperPlane_ line 2 r => Lens' line r slope = (Vector 2 r -> f (Vector 2 r)) -> line -> f line forall hyperPlane (d :: Nat) r. @@ -65,7 +65,7 @@ -- -- >>> (LineEQ 10 20) ^. intercept -- 20 -intercept :: NonVerticalHyperPlane_ line 2 r => Lens' line r +intercept :: NonVerticalHyperPlane_ line 2 r => Lens' line r intercept :: forall line r. NonVerticalHyperPlane_ line 2 r => Lens' line r intercept = (Vector 2 r -> f (Vector 2 r)) -> line -> f line forall hyperPlane (d :: Nat) r. diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Line.PointAndVector.html b/haddocks/hgeometry/kernel/src/HGeometry.Line.PointAndVector.html index 6ec3fe832..d001afab2 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Line.PointAndVector.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Line.PointAndVector.html @@ -57,11 +57,11 @@ -- | A line is given by an anchor point and a vector indicating the -- direction. -data LinePV d r = LinePV { forall (d :: Nat) r. LinePV d r -> Point d r -_anchorPoint :: !(Point d r) +data LinePV d r = LinePV { forall (d :: Nat) r. LinePV d r -> Point d r +_anchorPoint :: !(Point d r) , forall (d :: Nat) r. LinePV d r -> Vector d r -_direction :: !(Vector d r) - } deriving (forall x. LinePV d r -> Rep (LinePV d r) x) +_direction :: !(Vector d r) + } deriving (forall x. LinePV d r -> Rep (LinePV d r) x) -> (forall x. Rep (LinePV d r) x -> LinePV d r) -> Generic (LinePV d r) forall (d :: Nat) r x. Rep (LinePV d r) x -> LinePV d r @@ -76,16 +76,16 @@ to :: forall x. Rep (LinePV d r) x -> LinePV d r Generic -type instance Dimension (LinePV d r) = d -type instance NumType (LinePV d r) = r +type instance Dimension (LinePV d r) = d +type instance NumType (LinePV d r) = r -- | Types that have a Direction field -class HasDirection t where +class HasDirection t where -- | Lens to access the direction field - direction :: (Dimension t ~ d, NumType t ~ r) => Lens' t (Vector d r) + direction :: (Dimension t ~ d, NumType t ~ r) => Lens' t (Vector d r) -instance HasDirection (LinePV d r) where - direction :: forall (d :: Nat) r. +instance HasDirection (LinePV d r) where + direction :: forall (d :: Nat) r. (Dimension (LinePV d r) ~ d, NumType (LinePV d r) ~ r) => Lens' (LinePV d r) (Vector d r) direction = (LinePV d r -> Vector d r) @@ -95,14 +95,14 @@ lens LinePV d r -> Vector d r LinePV d r -> Vector d r forall (d :: Nat) r. LinePV d r -> Vector d r -_direction (\LinePV d r -p Vector d r -v -> LinePV d r -p {_direction = v}) +_direction (\LinePV d r +p Vector d r +v -> LinePV d r +p {_direction = v}) {-# INLINE direction #-} -- | Lens to access the anchor point of the line -anchorPoint :: Lens' (LinePV d r) (Point d r) +anchorPoint :: Lens' (LinePV d r) (Point d r) anchorPoint :: forall (d :: Nat) r (f :: * -> *). Functor f => (Point d r -> f (Point d r)) -> LinePV d r -> f (LinePV d r) @@ -112,22 +112,22 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens LinePV d r -> Point d r forall (d :: Nat) r. LinePV d r -> Point d r -_anchorPoint (\LinePV d r -l Point d r -p -> LinePV d r -l { _anchorPoint = p }) +_anchorPoint (\LinePV d r +l Point d r +p -> LinePV d r +l { _anchorPoint = p }) -instance ( Has_ Metric_ d r ) => Line_ (LinePV d r) d r where - fromPointAndVec :: forall point. +instance ( Has_ Metric_ d r ) => Line_ (LinePV d r) d r where + fromPointAndVec :: forall point. (Point_ point d r, Line_ (LinePV d r) d r, Num r) => point -> Vector d r -> LinePV d r -fromPointAndVec point -p Vector d r -v = Point d r -> Vector d r -> LinePV d r +fromPointAndVec point +p Vector d r +v = Point d r -> Vector d r -> LinePV d r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point -ppoint -> Getting (Point d r) point (Point d r) -> Point d r +ppoint -> Getting (Point d r) point (Point d r) -> Point d r forall s a. s -> Getting a s a -> a ^.Getting (Point d r) point (Point d r) forall point (d :: Nat) r. @@ -135,7 +135,7 @@ Lens' point (Point d r) Lens' point (Point d r) asPoint) (Vector d r -vVector d r +vVector d r -> Getting (Vector d r) (Vector d r) (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.Getting (Vector d r) (Vector d r) (Vector d r) @@ -146,21 +146,21 @@ _Vector) -instance ( Eq r, Num r - ) => ConstructableHyperPlane_ (LinePV 2 r) 2 r where +instance ( Eq r, Num r + ) => ConstructableHyperPlane_ (LinePV 2 r) 2 r where - type HyperPlaneFromEquationConstraint (LinePV 2 r) 2 r = Fractional r + type HyperPlaneFromEquationConstraint (LinePV 2 r) 2 r = Fractional r -- equation: line equation is: c + ax + by = 0 -- pre: not all of a b and c are zero - hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (LinePV 2 r) 2 r => + hyperPlaneFromEquation :: HyperPlaneFromEquationConstraint (LinePV 2 r) 2 r => Vector (2 + 1) r -> LinePV 2 r -hyperPlaneFromEquation (Vector3 r -c r -a r -b) +hyperPlaneFromEquation (Vector3 r +c r +a r +b) | r -b r -> r -> Bool +b r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 = Point 2 r -> Vector 2 r -> LinePV 2 r @@ -168,10 +168,10 @@ LinePV (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (-r -cr -> r -> r +cr -> r -> r forall a. Fractional a => a -> a -> a /r -a) r +a) r 0) (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r @@ -184,25 +184,25 @@ forall r. r -> r -> Point 2 r Point2 r 0 (-r -cr -> r -> r +cr -> r -> r forall a. Fractional a => a -> a -> a /r -b)) (r -> r -> Vector 2 r +b)) (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r -c (-r -a)) +c (-r +a)) - fromPointAndNormal :: forall point. + fromPointAndNormal :: forall point. (Point_ point 2 r, Num r) => point -> Vector 2 r -> LinePV 2 r -fromPointAndNormal point -p (Vector2 r -vx r -vy) = Point 2 r -> Vector 2 r -> LinePV 2 r +fromPointAndNormal point +p (Vector2 r +vx r +vy) = Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point -ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -212,20 +212,20 @@ asPoint) (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (-r -vy) r -vx) +vy) r +vx) -instance Num r => HyperPlaneFromPoints (LinePV 2 r) where - hyperPlaneThrough :: forall point (d :: Nat) r. +instance Num r => HyperPlaneFromPoints (LinePV 2 r) where + hyperPlaneThrough :: forall point (d :: Nat) r. (Point_ point d r, HyperPlane_ (LinePV 2 r) d r, Num r) => Vector d point -> LinePV 2 r -hyperPlaneThrough (Vector2 point -p point -q) = Point 2 r -> Vector 2 r -> LinePV 2 r +hyperPlaneThrough (Vector2 point +p point +q) = Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point -ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -233,48 +233,48 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) (point -q point -> point -> Vector 2 r +q point -> point -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -p) +p) -instance ( Eq r, Num r - ) => HyperPlane_ (LinePV 2 r) 2 r where - hyperPlaneEquation :: Num r => LinePV 2 r -> Vector (2 + 1) r -hyperPlaneEquation (LinePV (Point2 r -px r -py) (Vector2 r -vx r -vy)) +instance ( Eq r, Num r + ) => HyperPlane_ (LinePV 2 r) 2 r where + hyperPlaneEquation :: Num r => LinePV 2 r -> Vector (2 + 1) r +hyperPlaneEquation (LinePV (Point2 r +px r +py) (Vector2 r +vx r +vy)) | r -vx r -> r -> Bool +vx r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 = r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (-r -px) r +px) r 1 r 0 -- vertical line at px | Bool otherwise = r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (r -vxr -> r -> r +vxr -> r -> r forall a. Num a => a -> a -> a *r -pyr -> r -> r +pyr -> r -> r forall a. Num a => a -> a -> a -r -vyr -> r -> r +vyr -> r -> r forall a. Num a => a -> a -> a *r -px) r -vy (-r -vx) +px) r +vy (-r +vx) -- we have some non-vertical line: y = a1*x + a0 that goes through p -- so we have: a0 + a1*px + a2*py = 0 -- our slope a1 = vy/vx, and our intercept a0 = py-(vy/vx)px, and a2 = (-1) @@ -283,21 +283,21 @@ {- HLINT ignore toLinearFunction -} -- | get values a,b s.t. the input line is described by y = ax + b. -- returns Nothing if the line is vertical -toLinearFunction :: forall r. - ( Fractional r, Ord r +toLinearFunction :: forall r. + ( Fractional r, Ord r ) - => LinePV 2 r -> Maybe (LineEQ r) + => LinePV 2 r -> Maybe (LineEQ r) toLinearFunction :: forall r. (Fractional r, Ord r) => LinePV 2 r -> Maybe (LineEQ r) -toLinearFunction l :: LinePV 2 r -l@(LinePV Point 2 r -_ ~(Vector2 r -vx r -vy)) = +toLinearFunction l :: LinePV 2 r +l@(LinePV Point 2 r +_ ~(Vector2 r +vx r +vy)) = case LinePV 2 r -l LinePV 2 r -> LinePV 2 r -> Intersection (LinePV 2 r) (LinePV 2 r) +l LinePV 2 r -> LinePV 2 r -> Intersection (LinePV 2 r) (LinePV 2 r) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` forall r line. (Line_ line 2 r, Num r) => r -> line -verticalLine @r @(LinePV 2 r) r +verticalLine @r @(LinePV 2 r) r 0 of Maybe (LineLineIntersectionG r (LinePV 2 r)) Intersection (LinePV 2 r) (LinePV 2 r) @@ -305,36 +305,36 @@ forall a. Maybe a Nothing -- l is vertical Just (Line_x_Line_Point (Point2 r -_ r -b)) -> LineEQ r -> Maybe (LineEQ r) +_ r +b)) -> LineEQ r -> Maybe (LineEQ r) forall a. a -> Maybe a Just (LineEQ r -> Maybe (LineEQ r)) -> LineEQ r -> Maybe (LineEQ r) forall a b. (a -> b) -> a -> b $ r -> r -> LineEQ r forall r. r -> r -> LineEQ r LineEQ (r -vy r -> r -> r +vy r -> r -> r forall a. Fractional a => a -> a -> a / r -vx) r -b +vx) r +b Just (Line_x_Line_Line LinePV 2 r _) -> Maybe (LineEQ r) forall a. Maybe a Nothing -- l is a vertical line (through x=0) -instance ( Show r, KnownNat d - , Has_ Additive_ d r +instance ( Show r, KnownNat d + , Has_ Additive_ d r -- , OptVector_ d r, OptMetric_ d r - ) => Show (LinePV d r) where - showsPrec :: Int -> LinePV d r -> ShowS -showsPrec Int -k (LinePV Point d r -p Vector d r -v) = Bool -> ShowS -> ShowS + ) => Show (LinePV d r) where + showsPrec :: Int -> LinePV d r -> ShowS +showsPrec Int +k (LinePV Point d r +p Vector d r +v) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int appPrec) (ShowS -> ShowS) -> ShowS -> ShowS @@ -352,7 +352,7 @@ forall a. Num a => a -> a -> a +Int 1) Point d r -p +p ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -367,20 +367,20 @@ forall a. Num a => a -> a -> a +Int 1) Vector d r -v +v appPrec :: Int appPrec :: Int appPrec = Int 10 -instance (Read r - , Has_ Additive_ d r +instance (Read r + , Has_ Additive_ d r -- , OptVector_ d r, OptMetric_ d r - , KnownNat d - ) => Read (LinePV d r) where - readPrec :: ReadPrec (LinePV d r) -readPrec = ReadPrec (LinePV d r) -> ReadPrec (LinePV d r) + , KnownNat d + ) => Read (LinePV d r) where + readPrec :: ReadPrec (LinePV d r) +readPrec = ReadPrec (LinePV d r) -> ReadPrec (LinePV d r) forall a. ReadPrec a -> ReadPrec a parens (Int -> ReadPrec (LinePV d r) -> ReadPrec (LinePV d r) forall a. Int -> ReadPrec a -> ReadPrec a @@ -392,14 +392,14 @@ Ident String "LinePV" <- ReadPrec Lexeme lexP - Point d r -p <- ReadPrec (Point d r) -> ReadPrec (Point d r) + Point d r +p <- ReadPrec (Point d r) -> ReadPrec (Point d r) forall a. ReadPrec a -> ReadPrec a step ReadPrec (Point d r) forall a. Read a => ReadPrec a readPrec - Vector d r -v <- ReadPrec (Vector d r) -> ReadPrec (Vector d r) + Vector d r +v <- ReadPrec (Vector d r) -> ReadPrec (Vector d r) forall a. ReadPrec a -> ReadPrec a step ReadPrec (Vector d r) forall a. Read a => ReadPrec a @@ -410,10 +410,10 @@ return (Point d r -> Vector d r -> LinePV d r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV Point d r -p Vector d r -v)) +p Vector d r +v)) -instance (NFData (Vector d r)) => NFData (LinePV d r) +instance (NFData (Vector d r)) => NFData (LinePV d r) -- deriving instance Arity d => Functor (Line d) -- deriving instance Arity d => F.Foldable (Line d) @@ -422,34 +422,34 @@ -- deriving instance (Arity d, Eq r) => Eq (LinePV d r) -instance {-# OVERLAPPING #-} (Ord r, Num r) => Eq (LinePV 2 r) where - l :: LinePV 2 r -l@(LinePV Point 2 r -p Vector 2 r -_) == :: LinePV 2 r -> LinePV 2 r -> Bool -== LinePV 2 r -l' = LinePV 2 r -l LinePV 2 r -> LinePV 2 r -> Bool +instance {-# OVERLAPPING #-} (Ord r, Num r) => Eq (LinePV 2 r) where + l :: LinePV 2 r +l@(LinePV Point 2 r +p Vector 2 r +_) == :: LinePV 2 r -> LinePV 2 r -> Bool +== LinePV 2 r +l' = LinePV 2 r +l LinePV 2 r -> LinePV 2 r -> Bool forall r. (Eq r, Num r) => LinePV 2 r -> LinePV 2 r -> Bool `isParallelTo2` LinePV 2 r -l' Bool -> Bool -> Bool +l' Bool -> Bool -> Bool && Point 2 r -p Point 2 r -> LinePV 2 r -> Bool +p Point 2 r -> LinePV 2 r -> Bool forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool `onLine2` LinePV 2 r -l' +l' -- instance (Eq r, Fractional r) => Eq (LinePV d r) where -- l@(LinePV p _) == m = l `isParallelTo` m && p `onLine` m -instance (Has_ Metric_ d r, Fractional r, Eq (Vector d r)) => HasOnLine (LinePV d r) d where - onLine :: forall point r. +instance (Has_ Metric_ d r, Fractional r, Eq (Vector d r)) => HasOnLine (LinePV d r) d where + onLine :: forall point r. (Point_ point d r, Num r, Eq r, r ~ NumType (LinePV d r), d ~ Dimension (LinePV d r)) => point -> LinePV d r -> Bool -onLine = point -> LinePV d r -> Bool +onLine = point -> LinePV d r -> Bool forall point (d :: Nat) r. (Point_ point d r, Has_ Metric_ d r, Fractional r, Eq r, Eq (Vector d r)) => @@ -457,19 +457,19 @@ onLineD -- | Test if point q lies on line l -onLineD :: ( Point_ point d r, Has_ Metric_ d r - , Fractional r, Eq r, Eq (Vector d r) - ) => point -> LinePV d r -> Bool +onLineD :: ( Point_ point d r, Has_ Metric_ d r + , Fractional r, Eq r, Eq (Vector d r) + ) => point -> LinePV d r -> Bool onLineD :: forall point (d :: Nat) r. (Point_ point d r, Has_ Metric_ d r, Fractional r, Eq r, Eq (Vector d r)) => point -> LinePV d r -> Bool -onLineD point -q (LinePV Point d r -p Vector d r -v) = let q' :: Point d r -q' = point -qpoint -> Getting (Point d r) point (Point d r) -> Point d r +onLineD point +q (LinePV Point d r +p Vector d r +v) = let q' :: Point d r +q' = point +qpoint -> Getting (Point d r) point (Point d r) -> Point d r forall s a. s -> Getting a s a -> a ^.Getting (Point d r) point (Point d r) forall point (d :: Nat) r. @@ -478,22 +478,22 @@ Lens' point (Point d r) asPoint in Point d r -p Point d r -> Point d r -> Bool +p Point d r -> Point d r -> Bool forall a. Eq a => a -> a -> Bool == Point d r -q' Bool -> Bool -> Bool +q' Bool -> Bool -> Bool || (Point d r -q' Point d r -> Point d r -> Vector d r +q' Point d r -> Point d r -> Vector d r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point d r -p) Vector d r -> Vector d r -> Bool +p) Vector d r -> Vector d r -> Bool forall r vector (d :: Nat). (Eq r, Num r, Metric_ vector d r) => vector -> vector -> Bool `isScalarMultipleOf` Vector d r -v +v -- instance (Arbitrary r, Arity d, Num r, Eq r) => Arbitrary (LinePV d r) where @@ -508,22 +508,22 @@ -- | Test if two lines are identical, meaning; if they have exactly the same -- anchor point and directional vector. -isIdenticalTo :: Eq (Vector d r) - => LinePV d r -> LinePV d r -> Bool -(LinePV Point d r -p Vector d r -u) isIdenticalTo :: forall (d :: Nat) r. +isIdenticalTo :: Eq (Vector d r) + => LinePV d r -> LinePV d r -> Bool +(LinePV Point d r +p Vector d r +u) isIdenticalTo :: forall (d :: Nat) r. Eq (Vector d r) => LinePV d r -> LinePV d r -> Bool -`isIdenticalTo` (LinePV Point d r -q Vector d r -v) = (Point d r -p,Vector d r -u) (Point d r, Vector d r) -> (Point d r, Vector d r) -> Bool +`isIdenticalTo` (LinePV Point d r +q Vector d r +v) = (Point d r +p,Vector d r +u) (Point d r, Vector d r) -> (Point d r, Vector d r) -> Bool forall a. Eq a => a -> a -> Bool == (Point d r -q,Vector d r -v) +q,Vector d r +v) -- {-# RULES @@ -532,36 +532,36 @@ -- #-} -- | Check whether two lines are parallel -isParallelTo2 :: (Eq r, Num r) => LinePV 2 r -> LinePV 2 r -> Bool +isParallelTo2 :: (Eq r, Num r) => LinePV 2 r -> LinePV 2 r -> Bool isParallelTo2 :: forall r. (Eq r, Num r) => LinePV 2 r -> LinePV 2 r -> Bool isParallelTo2 (LinePV Point 2 r -_ (Vector2 r -ux r -uy)) +_ (Vector2 r +ux r +uy)) (LinePV Point 2 r -_ (Vector2 r -vx r -vy)) = r -denom r -> r -> Bool +_ (Vector2 r +vx r +vy)) = r +denom r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 where - denom :: r -denom = r -vy r -> r -> r + denom :: r +denom = r +vy r -> r -> r forall a. Num a => a -> a -> a * r -ux r -> r -> r +ux r -> r -> r forall a. Num a => a -> a -> a - r -vx r -> r -> r +vx r -> r -> r forall a. Num a => a -> a -> a * r -uy +uy -instance {-# OVERLAPPING #-} Ord r => HasOnLine (LinePV 2 r) 2 where - onLine :: forall point r. +instance {-# OVERLAPPING #-} Ord r => HasOnLine (LinePV 2 r) 2 where + onLine :: forall point r. (Point_ point 2 r, Num r, Eq r, r ~ NumType (LinePV 2 r), 2 ~ Dimension (LinePV 2 r)) => point -> LinePV 2 r -> Bool @@ -572,20 +572,20 @@ onLine2 -- | Specific 2d version of testing if apoint lies on a line. -onLine2 :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool -point -q onLine2 :: forall r point. +onLine2 :: (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool +point +q onLine2 :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool -`onLine2` (LinePV Point 2 r -p Vector 2 r -v) = Point 2 r -> Point 2 r -> Point 2 r -> CCW +`onLine2` (LinePV Point 2 r +p Vector 2 r +v) = Point 2 r -> Point 2 r -> Point 2 r -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw (point -qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -593,67 +593,67 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) Point 2 r -p (Point 2 r -p Point 2 r -> Vector 2 r -> Point 2 r +p (Point 2 r +p Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector 2 r -v) CCW -> CCW -> Bool +v) CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CoLinear -- | The intersection of two lines is either: NoIntersection, a point or a line. -type instance Intersection (LinePV 2 r) (LinePV 2 r) = - Maybe (LineLineIntersection (LinePV 2 r)) +type instance Intersection (LinePV 2 r) (LinePV 2 r) = + Maybe (LineLineIntersection (LinePV 2 r)) -instance ( Ord r, Num r - ) => LinePV 2 r `HasIntersectionWith` LinePV 2 r where - LinePV 2 r -l1 intersects :: LinePV 2 r -> LinePV 2 r -> Bool -`intersects` l2 :: LinePV 2 r -l2@(LinePV Point 2 r -q Vector 2 r +instance ( Ord r, Num r + ) => LinePV 2 r `HasIntersectionWith` LinePV 2 r where + LinePV 2 r +l1 intersects :: LinePV 2 r -> LinePV 2 r -> Bool +`intersects` l2 :: LinePV 2 r +l2@(LinePV Point 2 r +q Vector 2 r _) = Bool -> Bool not (LinePV 2 r -l1 LinePV 2 r -> LinePV 2 r -> Bool +l1 LinePV 2 r -> LinePV 2 r -> Bool forall r. (Eq r, Num r) => LinePV 2 r -> LinePV 2 r -> Bool `isParallelTo2` LinePV 2 r -l2) Bool -> Bool -> Bool +l2) Bool -> Bool -> Bool || Point 2 r -q Point 2 r -> LinePV 2 r -> Bool +q Point 2 r -> LinePV 2 r -> Bool forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool `onLine2` LinePV 2 r -l1 +l1 -instance ( Ord r - , Fractional r +instance ( Ord r + , Fractional r -- , OptCVector_ 2 r, OptCVector_ 3 r -- , OptMetric_ 2 r, Eq (VectorFamily 2 r) - ) => LinePV 2 r `IsIntersectableWith` LinePV 2 r where - l :: LinePV 2 r -l@(LinePV Point 2 r -p ~(Vector2 r -ux r -uy)) intersect :: LinePV 2 r -> LinePV 2 r -> Intersection (LinePV 2 r) (LinePV 2 r) -`intersect` (LinePV Point 2 r -q ~v :: Vector 2 r -v@(Vector2 r -vx r -vy)) + ) => LinePV 2 r `IsIntersectableWith` LinePV 2 r where + l :: LinePV 2 r +l@(LinePV Point 2 r +p ~(Vector2 r +ux r +uy)) intersect :: LinePV 2 r -> LinePV 2 r -> Intersection (LinePV 2 r) (LinePV 2 r) +`intersect` (LinePV Point 2 r +q ~v :: Vector 2 r +v@(Vector2 r +vx r +vy)) | Bool -areParallel = if Point 2 r -q Point 2 r -> LinePV 2 r -> Bool +areParallel = if Point 2 r +q Point 2 r -> LinePV 2 r -> Bool forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool `onLine2` LinePV 2 r -l then LineLineIntersectionG r (LinePV 2 r) +l then LineLineIntersectionG r (LinePV 2 r) -> Maybe (LineLineIntersectionG r (LinePV 2 r)) forall a. a -> Maybe a Just (LineLineIntersectionG r (LinePV 2 r) @@ -664,7 +664,7 @@ $ LinePV 2 r -> LineLineIntersectionG r (LinePV 2 r) forall r line. line -> LineLineIntersectionG r line Line_x_Line_Line LinePV 2 r -l +l else Maybe (LineLineIntersectionG r (LinePV 2 r)) Intersection (LinePV 2 r) (LinePV 2 r) forall a. Maybe a @@ -681,84 +681,84 @@ $ Point 2 r -> LineLineIntersectionG r (LinePV 2 r) forall r line. Point 2 r -> LineLineIntersectionG r line Line_x_Line_Point Point 2 r -r +r where - r :: Point 2 r -r = Point 2 r -q Point 2 r -> Vector 2 r -> Point 2 r + r :: Point 2 r +r = Point 2 r +q Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ (r -alpha r -> Vector 2 r -> Vector 2 r +alpha r -> Vector 2 r -> Vector 2 r forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ Vector 2 r -v) +v) - denom :: r -denom = r -vy r -> r -> r + denom :: r +denom = r +vy r -> r -> r forall a. Num a => a -> a -> a * r -ux r -> r -> r +ux r -> r -> r forall a. Num a => a -> a -> a - r -vx r -> r -> r +vx r -> r -> r forall a. Num a => a -> a -> a * r -uy - areParallel :: Bool -areParallel = r -denom r -> r -> Bool +uy + areParallel :: Bool +areParallel = r +denom r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 -- Instead of using areParallel, we can also use the generic 'isParallelTo' function -- for lines of arbitrary dimension, but this is a bit more efficient. - alpha :: r -alpha = (r -ux r -> r -> r + alpha :: r +alpha = (r +ux r -> r -> r forall a. Num a => a -> a -> a * (r -py r -> r -> r +py r -> r -> r forall a. Num a => a -> a -> a - r -qy) r -> r -> r +qy) r -> r -> r forall a. Num a => a -> a -> a + r -uy r -> r -> r +uy r -> r -> r forall a. Num a => a -> a -> a * (r -qx r -> r -> r +qx r -> r -> r forall a. Num a => a -> a -> a - r -px)) r -> r -> r +px)) r -> r -> r forall a. Fractional a => a -> a -> a / r -denom +denom - Point2 r -px r -py = Point 2 r -p - Point2 r -qx r -qy = Point 2 r -q + Point2 r +px r +py = Point 2 r +p + Point2 r +qx r +qy = Point 2 r +q -------------------------------------------------------------------------------- -- * Supporting Lines -- | Types for which we can compute a supporting line, i.e. a line -- that contains the thing of type t. -class HasSupportingLine t where - supportingLine :: t -> LinePV (Dimension t) (NumType t) +class HasSupportingLine t where + supportingLine :: t -> LinePV (Dimension t) (NumType t) -instance HasSupportingLine t => HasSupportingLine (t :+ extra) where - supportingLine :: (t :+ extra) +instance HasSupportingLine t => HasSupportingLine (t :+ extra) where + supportingLine :: (t :+ extra) -> LinePV (Dimension (t :+ extra)) (NumType (t :+ extra)) supportingLine = t -> LinePV (Dimension t) (NumType t) forall t. @@ -777,8 +777,8 @@ (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core -instance HasSupportingLine (LinePV d r) where - supportingLine :: LinePV d r +instance HasSupportingLine (LinePV d r) where + supportingLine :: LinePV d r -> LinePV (Dimension (LinePV d r)) (NumType (LinePV d r)) supportingLine = LinePV d r -> LinePV d r LinePV d r @@ -790,84 +790,84 @@ -- * Convenience functions on Two dimensional lines -- | Create a line from the linear function ax + b -fromLinearFunction :: (Num r) => r -> r -> LinePV 2 r +fromLinearFunction :: (Num r) => r -> r -> LinePV 2 r fromLinearFunction :: forall r. Num r => r -> r -> LinePV 2 r -fromLinearFunction r -a r -b = Point 2 r -> Vector 2 r -> LinePV 2 r +fromLinearFunction r +a r +b = Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r 0 r -b) (r -> r -> Vector 2 r +b) (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r 1 r -a) +a) -instance (Fractional r, Has_ Metric_ d r - ) => HasSquaredEuclideanDistance (LinePV d r) where - pointClosestTo :: forall r (d :: Nat) point. +instance (Fractional r, Has_ Metric_ d r + ) => HasSquaredEuclideanDistance (LinePV d r) where + pointClosestTo :: forall r (d :: Nat) point. (r ~ NumType (LinePV d r), d ~ Dimension (LinePV d r), Num r, Point_ point d r) => point -> LinePV d r -> Point d r -pointClosestTo (Getting (Point d r) point (Point d r) -> point -> Point d r +pointClosestTo (Getting (Point d r) point (Point d r) -> point -> Point d r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view Getting (Point d r) point (Point d r) forall point (d :: Nat) r. Point_ point d r => Lens' point (Point d r) Lens' point (Point d r) -asPoint -> Point d r -p) (LinePV Point d r -a Vector d r -m) = Point d r +asPoint -> Point d r +p) (LinePV Point d r +a Vector d r +m) = Point d r Point d r -a Point d r -> Vector d r -> Point d r +a Point d r -> Vector d r -> Point d r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ (r -t0 r -> Vector d r -> Vector d r +t0 r -> Vector d r -> Vector d r forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ Vector d r -m) +m) where -- see https://monkeyproofsolutions.nl/wordpress/how-to-calculate-the-shortest-distance-between-a-point-and-a-line/ - t0 :: r -t0 = r -numerator r -> r -> r + t0 :: r +t0 = r +numerator r -> r -> r forall a. Fractional a => a -> a -> a / r -divisor - numerator :: r -numerator = (Point d r -p Point d r -> Point d r -> Vector d r +divisor + numerator :: r +numerator = (Point d r +p Point d r -> Point d r -> Vector d r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point d r -a) Vector d r -> Vector d r -> r +a) Vector d r -> Vector d r -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> vector -> r `dot` Vector d r -m - divisor :: r -divisor = Vector d r -m Vector d r -> Vector d r -> r +m + divisor :: r +divisor = Vector d r +m Vector d r -> Vector d r -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> vector -> r `dot` Vector d r -m +m -- | Result of a side test -data SideTestUpDown = Below | On | Above deriving (Int -> SideTestUpDown -> ShowS +data SideTestUpDown = Below | On | Above deriving (Int -> SideTestUpDown -> ShowS [SideTestUpDown] -> ShowS SideTestUpDown -> String (Int -> SideTestUpDown -> ShowS) @@ -882,7 +882,7 @@ show :: SideTestUpDown -> String $cshowList :: [SideTestUpDown] -> ShowS showList :: [SideTestUpDown] -> ShowS -Show,ReadPrec [SideTestUpDown] +Show,ReadPrec [SideTestUpDown] ReadPrec SideTestUpDown Int -> ReadS SideTestUpDown ReadS [SideTestUpDown] @@ -902,7 +902,7 @@ readPrec :: ReadPrec SideTestUpDown $creadListPrec :: ReadPrec [SideTestUpDown] readListPrec :: ReadPrec [SideTestUpDown] -Read,SideTestUpDown -> SideTestUpDown -> Bool +Read,SideTestUpDown -> SideTestUpDown -> Bool (SideTestUpDown -> SideTestUpDown -> Bool) -> (SideTestUpDown -> SideTestUpDown -> Bool) -> Eq SideTestUpDown forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -910,7 +910,7 @@ == :: SideTestUpDown -> SideTestUpDown -> Bool $c/= :: SideTestUpDown -> SideTestUpDown -> Bool /= :: SideTestUpDown -> SideTestUpDown -> Bool -Eq,Eq SideTestUpDown +Eq,Eq SideTestUpDown Eq SideTestUpDown => (SideTestUpDown -> SideTestUpDown -> Ordering) -> (SideTestUpDown -> SideTestUpDown -> Bool) @@ -951,13 +951,13 @@ -- | Class for types that support testing on which side (above, on, -- below) a particular point is. -class OnSideUpDownTest t where +class OnSideUpDownTest t where -- | Given a point q and a hyperplane h, compute to which side of h q lies. For -- vertical hyperplanes the left side of the hyperplane is interpeted as below. - onSideUpDown :: (d ~ Dimension t, r ~ NumType t, Ord r, Num r, Point_ point d r) - => point -> t -> SideTestUpDown + onSideUpDown :: (d ~ Dimension t, r ~ NumType t, Ord r, Num r, Point_ point d r) + => point -> t -> SideTestUpDown -instance OnSideUpDownTest (LinePV 2 r) where +instance OnSideUpDownTest (LinePV 2 r) where -- | Given a point q and a line l, compute to which side of l q lies. For -- vertical lines the left side of the line is interpeted as below. -- @@ -969,25 +969,25 @@ -- Below -- >>> Point2 5 5 `onSideUpDown` (lineThrough origin $ Point2 (-3) (-3)) -- On - point -q onSideUpDown :: forall (d :: Nat) r point. + point +q onSideUpDown :: forall (d :: Nat) r point. (d ~ Dimension (LinePV 2 r), r ~ NumType (LinePV 2 r), Ord r, Num r, Point_ point d r) => point -> LinePV 2 r -> SideTestUpDown -`onSideUpDown` (LinePV Point 2 r -p Vector 2 r -v) = let r :: Point 2 r -r = Point 2 r -p Point 2 r -> Vector 2 r -> Point 2 r +`onSideUpDown` (LinePV Point 2 r +p Vector 2 r +v) = let r :: Point 2 r +r = Point 2 r +p Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector 2 r -v - f :: s -> (NumType s, NumType s) -f s -z = (s -zs -> Getting (NumType s) s (NumType s) -> NumType s +v + f :: s -> (NumType s, NumType s) +f s +z = (s +zs -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -995,7 +995,7 @@ IndexedLens' Int point r IndexedLens' Int s (NumType s) xCoord, -s -zs -> Getting (NumType s) s (NumType s) -> NumType s +zs -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -1003,34 +1003,34 @@ IndexedLens' Int point r IndexedLens' Int s (NumType s) yCoord) - minBy :: (a -> a) -> a -> a -> a -minBy a -> a -g a -a a -b = (a -> a -> Ordering) -> [a] -> a + minBy :: (a -> a) -> a -> a -> a +minBy a -> a +g a +a a +b = (a -> a -> Ordering) -> [a] -> a forall (t :: * -> *) a. Foldable t => (a -> a -> Ordering) -> t a -> a F.minimumBy ((a -> a) -> a -> a -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing a -> a -g) [a -a,a -b] - maxBy :: (a -> a) -> a -> a -> a -maxBy a -> a -g a -a a -b = (a -> a -> Ordering) -> [a] -> a +g) [a +a,a +b] + maxBy :: (a -> a) -> a -> a -> a +maxBy a -> a +g a +a a +b = (a -> a -> Ordering) -> [a] -> a forall (t :: * -> *) a. Foldable t => (a -> a -> Ordering) -> t a -> a F.maximumBy ((a -> a) -> a -> a -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing a -> a -g) [a -a,a -b] +g) [a +a,a +b] in case Point 2 r -> Point 2 r -> Point 2 r -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, @@ -1038,7 +1038,7 @@ point -> point' -> point'' -> CCW ccw ((Point 2 r -> (r, r)) -> Point 2 r -> Point 2 r -> Point 2 r forall {a} {a}. Ord a => (a -> a) -> a -> a -> a -minBy Point 2 r -> (r, r) +minBy Point 2 r -> (r, r) Point 2 r -> (NumType (Point 2 r), NumType (Point 2 r)) forall {s}. (Assert @@ -1049,11 +1049,11 @@ (TypeError ...), Num (NumType s), Point_ s (Dimension s) (NumType s)) => s -> (NumType s, NumType s) -f Point 2 r -p Point 2 r -r) ((Point 2 r -> (r, r)) -> Point 2 r -> Point 2 r -> Point 2 r +f Point 2 r +p Point 2 r +r) ((Point 2 r -> (r, r)) -> Point 2 r -> Point 2 r -> Point 2 r forall {a} {a}. Ord a => (a -> a) -> a -> a -> a -maxBy Point 2 r -> (r, r) +maxBy Point 2 r -> (r, r) Point 2 r -> (NumType (Point 2 r), NumType (Point 2 r)) forall {s}. (Assert @@ -1064,10 +1064,10 @@ (TypeError ...), Num (NumType s), Point_ s (Dimension s) (NumType s)) => s -> (NumType s, NumType s) -f Point 2 r -p Point 2 r -r) (point -qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +f Point 2 r +p Point 2 r +r) (point +qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -1086,7 +1086,7 @@ On -- | Result of a side test -data SideTest = LeftSide | OnLine | RightSide deriving (Int -> SideTest -> ShowS +data SideTest = LeftSide | OnLine | RightSide deriving (Int -> SideTest -> ShowS [SideTest] -> ShowS SideTest -> String (Int -> SideTest -> ShowS) @@ -1099,7 +1099,7 @@ show :: SideTest -> String $cshowList :: [SideTest] -> ShowS showList :: [SideTest] -> ShowS -Show,ReadPrec [SideTest] +Show,ReadPrec [SideTest] ReadPrec SideTest Int -> ReadS SideTest ReadS [SideTest] @@ -1119,7 +1119,7 @@ readPrec :: ReadPrec SideTest $creadListPrec :: ReadPrec [SideTest] readListPrec :: ReadPrec [SideTest] -Read,SideTest -> SideTest -> Bool +Read,SideTest -> SideTest -> Bool (SideTest -> SideTest -> Bool) -> (SideTest -> SideTest -> Bool) -> Eq SideTest forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -1127,7 +1127,7 @@ == :: SideTest -> SideTest -> Bool $c/= :: SideTest -> SideTest -> Bool /= :: SideTest -> SideTest -> Bool -Eq,Eq SideTest +Eq,Eq SideTest Eq SideTest => (SideTest -> SideTest -> Ordering) -> (SideTest -> SideTest -> Bool) @@ -1177,24 +1177,24 @@ -- LeftSide -- >>> Point2 5 5 `onSide` (lineThrough origin $ Point2 (-3) (-3)) -- OnLine -onSide :: ( Ord r, Num r - , Point_ point 2 r +onSide :: ( Ord r, Num r + , Point_ point 2 r -- , OptCVector_ 2 r, OptMetric_ 2 r - ) => point -> LinePV 2 r -> SideTest -point -q onSide :: forall r point. + ) => point -> LinePV 2 r -> SideTest +point +q onSide :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest -`onSide` (LinePV Point 2 r -p Vector 2 r -v) = let r :: Point 2 r -r = Point 2 r -p Point 2 r -> Vector 2 r -> Point 2 r +`onSide` (LinePV Point 2 r +p Vector 2 r +v) = let r :: Point 2 r +r = Point 2 r +p Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector 2 r -v +v -- f z = (z^.xCoord, -z^.yCoord) -- minBy g a b = F.minimumBy (comparing g) [a,b] -- maxBy g a b = F.maximumBy (comparing g) [a,b] @@ -1204,9 +1204,9 @@ Ord r) => point -> point' -> point'' -> CCW ccw Point 2 r -p Point 2 r -r (point -qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +p Point 2 r +r (point +qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -1225,17 +1225,17 @@ OnLine -- | Test if the query point q lies (strictly) above line l -liesAbove :: ( Ord r, Num r - , Point_ point 2 r +liesAbove :: ( Ord r, Num r + , Point_ point 2 r -- , OptCVector_ 2 r, OptMetric_ 2 r - ) => point -> LinePV 2 r -> Bool -point -q liesAbove :: forall r point. + ) => point -> LinePV 2 r -> Bool +point +q liesAbove :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool -`liesAbove` LinePV 2 r -l = point -q point -> LinePV 2 r -> SideTestUpDown +`liesAbove` LinePV 2 r +l = point +q point -> LinePV 2 r -> SideTestUpDown forall (d :: Nat) r point. (d ~ Dimension (LinePV 2 r), r ~ NumType (LinePV 2 r), Ord r, Num r, Point_ point d r) => @@ -1245,22 +1245,22 @@ Point_ point d r) => point -> t -> SideTestUpDown `onSideUpDown` LinePV 2 r -l SideTestUpDown -> SideTestUpDown -> Bool +l SideTestUpDown -> SideTestUpDown -> Bool forall a. Eq a => a -> a -> Bool == SideTestUpDown Above -- | Test if the query point q lies (strictly) above line l -liesBelow :: (Ord r, Num r, Point_ point 2 r +liesBelow :: (Ord r, Num r, Point_ point 2 r -- , OptCVector_ 2 r, OptMetric_ 2 r - ) => point -> LinePV 2 r -> Bool -point -q liesBelow :: forall r point. + ) => point -> LinePV 2 r -> Bool +point +q liesBelow :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool -`liesBelow` LinePV 2 r -l = point -q point -> LinePV 2 r -> SideTestUpDown +`liesBelow` LinePV 2 r +l = point +q point -> LinePV 2 r -> SideTestUpDown forall (d :: Nat) r point. (d ~ Dimension (LinePV 2 r), r ~ NumType (LinePV 2 r), Ord r, Num r, Point_ point d r) => @@ -1270,30 +1270,30 @@ Point_ point d r) => point -> t -> SideTestUpDown `onSideUpDown` LinePV 2 r -l SideTestUpDown -> SideTestUpDown -> Bool +l SideTestUpDown -> SideTestUpDown -> Bool forall a. Eq a => a -> a -> Bool == SideTestUpDown Below -- | Get the bisector between two points -bisector :: (Fractional r, Point_ point 2 r +bisector :: (Fractional r, Point_ point 2 r -- , OptCVector_ 2 r, OptMetric_ 2 r - ) => point -> point -> LinePV 2 r + ) => point -> point -> LinePV 2 r bisector :: forall r point. (Fractional r, Point_ point 2 r) => point -> point -> LinePV 2 r -bisector point -p point -q = let v :: Vector 2 r -v = point -q point -> point -> Vector 2 r +bisector point +p point +q = let v :: Vector 2 r +v = point +q point -> point -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -p - h :: Point 2 r -h = Getting (Point 2 r) point (Point 2 r) -> point -> Point 2 r +p + h :: Point 2 r +h = Getting (Point 2 r) point (Point 2 r) -> point -> Point 2 r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -1303,12 +1303,12 @@ asPoint (point -> Point 2 r) -> point -> Point 2 r forall a b. (a -> b) -> a -> b $ point -p point -> Vector 2 r -> point +p point -> Vector 2 r -> point forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ (Vector 2 r -v Vector 2 r -> r -> Vector 2 r +v Vector 2 r -> r -> Vector 2 r forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector @@ -1319,8 +1319,8 @@ perpendicularTo (Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV Point 2 r -h Vector 2 r -v) +h Vector 2 r +v) -- | Given a line l with anchor point p and vector v, get the line m perpendicular to l -- that also goes through p. The line is oriented *into* the right halfplane of l. @@ -1329,11 +1329,11 @@ -- LinePV (Point2 3 4) (Vector2 2 1) -- >>> perpendicularTo $ LinePV (Point2 (-1000) 268) (Vector2 (-50) 8) -- LinePV (Point2 (-1000) 268) (Vector2 8 50) -perpendicularTo :: Num r => LinePV 2 r -> LinePV 2 r +perpendicularTo :: Num r => LinePV 2 r -> LinePV 2 r perpendicularTo :: forall r. Num r => LinePV 2 r -> LinePV 2 r -perpendicularTo LinePV 2 r -l = LinePV 2 r -lLinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r +perpendicularTo LinePV 2 r +l = LinePV 2 r +lLinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r forall a b. a -> (a -> b) -> b &(Vector 2 r -> Identity (Vector 2 r)) -> LinePV 2 r -> Identity (LinePV 2 r) @@ -1350,32 +1350,32 @@ forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Vector 2 r -> Vector 2 r forall {r}. Num r => Vector 2 r -> Vector 2 r -rot90cw +rot90cw where - rot90cw :: Vector 2 r -> Vector 2 r -rot90cw (Vector2 r -vx r -vy) = r -> r -> Vector 2 r + rot90cw :: Vector 2 r -> Vector 2 r +rot90cw (Vector2 r +vx r +vy) = r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r -vy (-r -vx) +vy (-r +vx) {-# INLINE perpendicularTo #-} -- | Test if a vector is perpendicular to the line. -isPerpendicularTo :: (Num r, Eq r - ) => Vector 2 r -> LinePV 2 r -> Bool -Vector 2 r -v isPerpendicularTo :: forall r. (Num r, Eq r) => Vector 2 r -> LinePV 2 r -> Bool +isPerpendicularTo :: (Num r, Eq r + ) => Vector 2 r -> LinePV 2 r -> Bool +Vector 2 r +v isPerpendicularTo :: forall r. (Num r, Eq r) => Vector 2 r -> LinePV 2 r -> Bool `isPerpendicularTo` (LinePV Point 2 r -_ Vector 2 r -u) = Vector 2 r -v Vector 2 r -> Vector 2 r -> r +_ Vector 2 r +u) = Vector 2 r +v Vector 2 r -> Vector 2 r -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> vector -> r `dot` Vector 2 r -u r -> r -> Bool +u r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 @@ -1390,14 +1390,14 @@ -- GT -- >>> (LinePV origin (Vector2 5 1)) `cmpSlope` (LinePV origin (Vector2 0 1)) -- LT -cmpSlope :: forall r. (Num r, Ord r - ) => LinePV 2 r -> LinePV 2 r -> Ordering +cmpSlope :: forall r. (Num r, Ord r + ) => LinePV 2 r -> LinePV 2 r -> Ordering (LinePV Point 2 r -_ Vector 2 r -u) cmpSlope :: forall r. (Num r, Ord r) => LinePV 2 r -> LinePV 2 r -> Ordering +_ Vector 2 r +u) cmpSlope :: forall r. (Num r, Ord r) => LinePV 2 r -> LinePV 2 r -> Ordering `cmpSlope` (LinePV Point 2 r -_ Vector 2 r -v) = case Point 2 r -> Point 2 r -> Point 2 r -> CCW +_ Vector 2 r +v) = case Point 2 r -> Point 2 r -> Point 2 r -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => @@ -1406,13 +1406,13 @@ forall point (d :: Nat) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point 2 r) (Vector 2 r -> Point 2 r +origin :: Point 2 r) (Vector 2 r -> Point 2 r forall {a}. (Ord a, Num a) => Vector 2 a -> PointF (Vector 2 a) -f Vector 2 r -u) (Vector 2 r -> Point 2 r +f Vector 2 r +u) (Vector 2 r -> Point 2 r forall {a}. (Ord a, Num a) => Vector 2 a -> PointF (Vector 2 a) -f Vector 2 r -v) of +f Vector 2 r +v) of CCW CCW -> Ordering LT @@ -1423,32 +1423,32 @@ CoLinear -> Ordering EQ where - f :: Vector 2 a -> PointF (Vector 2 a) -f w :: Vector 2 a -w@(Vector2 a -x a -y) = Vector 2 a -> PointF (Vector 2 a) + f :: Vector 2 a -> PointF (Vector 2 a) +f w :: Vector 2 a +w@(Vector2 a +x a +y) = Vector 2 a -> PointF (Vector 2 a) forall v. v -> PointF v Point (Vector 2 a -> PointF (Vector 2 a)) -> Vector 2 a -> PointF (Vector 2 a) forall a b. (a -> b) -> a -> b $ case (a -x a -> a -> Ordering +x a -> a -> Ordering forall a. Ord a => a -> a -> Ordering `compare` a 0, a -y a -> a -> Bool +y a -> a -> Bool forall a. Ord a => a -> a -> Bool >= a 0) of (Ordering GT,Bool _) -> Vector 2 a -w +w (Ordering EQ,Bool True) -> Vector 2 a -w +w (Ordering, Bool) _ -> (-a 1) a -> Vector 2 a -> Vector 2 a @@ -1456,7 +1456,7 @@ (Num r, Vector_ vector d r) => r -> vector -> vector *^ Vector 2 a -w +w -- x < 0, or (x==0 and y <0 ; i.e. a vertical line) @@ -1464,23 +1464,23 @@ -------------------------------------------------------------------------------- -- | Given the oriented line, computes the halfspace left of the line. -leftHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) +leftHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) leftHalfPlane :: forall r. (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) -leftHalfPlane LinePV 2 r -l = Sign -> LinePV 2 r -> HalfSpaceF (LinePV 2 r) +leftHalfPlane LinePV 2 r +l = Sign -> LinePV 2 r -> HalfSpaceF (LinePV 2 r) forall boundingHyperPlane. Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane HalfSpace Sign -sign LinePV 2 r -l +sign LinePV 2 r +l where - sign :: Sign -sign = let (LinePV Point 2 r -p Vector 2 r -v) = LinePV 2 r -> LinePV 2 r + sign :: Sign +sign = let (LinePV Point 2 r +p Vector 2 r +v) = LinePV 2 r -> LinePV 2 r forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo LinePV 2 r -l +l in case Point 2 r -> LinePV 2 r -> Ordering forall point. (Point_ point 2 r, Ord r, Num r) => @@ -1489,13 +1489,13 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering onSideTest (Point 2 r -p Point 2 r -> Vector 2 r -> Point 2 r +p Point 2 r -> Vector 2 r -> Point 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ Vector 2 r -v) LinePV 2 r -l of +v) LinePV 2 r +l of Ordering LT -> Sign Positive @@ -1504,22 +1504,22 @@ Negative -- | Given the oriented line, computes the halfspace right of the line. -rightHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) +rightHalfPlane :: (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) rightHalfPlane :: forall r. (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) -rightHalfPlane LinePV 2 r -l = let HalfSpace Sign -s LinePV 2 r +rightHalfPlane LinePV 2 r +l = let HalfSpace Sign +s LinePV 2 r _ = LinePV 2 r -> HalfSpaceF (LinePV 2 r) forall r. (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) leftHalfPlane LinePV 2 r -l +l in Sign -> LinePV 2 r -> HalfSpaceF (LinePV 2 r) forall boundingHyperPlane. Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane HalfSpace (Sign -> Sign flipSign Sign -s) LinePV 2 r -l +s) LinePV 2 r +l {- -- | Lines are transformable, via line segments diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Line.html b/haddocks/hgeometry/kernel/src/HGeometry.Line.html index 8b447f5cd..ddfc7f0e8 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Line.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Line.html @@ -28,26 +28,26 @@ -------------------------------------------------------------------------------- -type instance Intersection (LineEQ r) (LinePV 2 r) = - Maybe (LineLineIntersection (LineEQ r)) +type instance Intersection (LineEQ r) (LinePV 2 r) = + Maybe (LineLineIntersection (LineEQ r)) -instance (Eq r, Num r) => HasIntersectionWith (LineEQ r) (LinePV 2 r) where - (LineEQ r -a r -b) intersects :: LineEQ r -> LinePV 2 r -> Bool -`intersects` (LinePV Point 2 r -p Vector 2 r -v) = Bool -differentSlopes Bool -> Bool -> Bool +instance (Eq r, Num r) => HasIntersectionWith (LineEQ r) (LinePV 2 r) where + (LineEQ r +a r +b) intersects :: LineEQ r -> LinePV 2 r -> Bool +`intersects` (LinePV Point 2 r +p Vector 2 r +v) = Bool +differentSlopes Bool -> Bool -> Bool || Bool -sameLine +sameLine where - differentSlopes :: Bool -differentSlopes = (r -ar -> r -> r + differentSlopes :: Bool +differentSlopes = (r +ar -> r -> r forall a. Num a => a -> a -> a * Vector 2 r -vVector 2 r -> Getting r (Vector 2 r) r -> r +vVector 2 r -> Getting r (Vector 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Vector 2 r) r forall vector (d :: Natural) r. @@ -57,7 +57,7 @@ xComponent) r -> r -> Bool forall a. Eq a => a -> a -> Bool /= Vector 2 r -vVector 2 r -> Getting r (Vector 2 r) r -> r +vVector 2 r -> Getting r (Vector 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Vector 2 r) r forall vector (d :: Natural) r. @@ -65,12 +65,12 @@ IndexedLens' Int vector r IndexedLens' Int (Vector 2 r) r yComponent - sameLine :: Bool -sameLine = r -ar -> r -> r + sameLine :: Bool +sameLine = r +ar -> r -> r forall a. Num a => a -> a -> a *(Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Natural) point r. @@ -80,10 +80,10 @@ xCoord) r -> r -> r forall a. Num a => a -> a -> a + r -b r -> r -> Bool +b r -> r -> Bool forall a. Eq a => a -> a -> Bool == Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Natural) point r. @@ -95,19 +95,19 @@ -- line, and thus they intersect {-# INLINE intersects #-} -instance (Ord r, Fractional r) - => IsIntersectableWith (LineEQ r) (LinePV 2 r) where - LineEQ r -l intersect :: LineEQ r -> LinePV 2 r -> Intersection (LineEQ r) (LinePV 2 r) -`intersect` LinePV 2 r -m = case LinePV 2 r -> Maybe (LineEQ r) +instance (Ord r, Fractional r) + => IsIntersectableWith (LineEQ r) (LinePV 2 r) where + LineEQ r +l intersect :: LineEQ r -> LinePV 2 r -> Intersection (LineEQ r) (LinePV 2 r) +`intersect` LinePV 2 r +m = case LinePV 2 r -> Maybe (LineEQ r) forall r. (Fractional r, Ord r) => LinePV 2 r -> Maybe (LineEQ r) toLinearFunction LinePV 2 r -m of +m of Maybe (LineEQ r) -Nothing -> let x :: r -x = LinePV 2 r -mLinePV 2 r -> Getting r (LinePV 2 r) r -> r +Nothing -> let x :: r +x = LinePV 2 r +mLinePV 2 r -> Getting r (LinePV 2 r) r -> r forall s a. s -> Getting a s a -> a ^.(Point 2 r -> Const r (Point 2 r)) -> LinePV 2 r -> Const r (LinePV 2 r) @@ -144,16 +144,16 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x (r -> LineEQ r -> r +x (r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' r -x LineEQ r -l) +x LineEQ r +l) -- m is vertical, l is not, so they intersect in a point - Just LineEQ r -m' -> LineEQ r -l LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) + Just LineEQ r +m' -> LineEQ r +l LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` LineEQ r -m' +m'
\ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Class.html index 49afdcbba..2fd392cf1 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Class.html @@ -47,40 +47,40 @@
-- not sure why I made this a separate class again... -- | Class that expresses that we can test if the segment contains a point -class HasOnSegment lineSegment d | lineSegment -> d where +class HasOnSegment lineSegment d | lineSegment -> d where -- | Test if a point lies on a line segment. -- -- As a user, you should typically just use 'intersects' instead. - onSegment :: ( Ord r, Point_ point d r - , r ~ NumType lineSegment, d ~ Dimension lineSegment - ) => point -> lineSegment -> Bool + onSegment :: ( Ord r, Point_ point d r + , r ~ NumType lineSegment, d ~ Dimension lineSegment + ) => point -> lineSegment -> Bool -- | A class representing line segments -class ( IntervalLike_ lineSegment point - , Point_ point (Dimension lineSegment) (NumType lineSegment) - ) => LineSegment_ lineSegment point | lineSegment -> point where +class ( IntervalLike_ lineSegment point + , Point_ point (Dimension lineSegment) (NumType lineSegment) + ) => LineSegment_ lineSegment point | lineSegment -> point where {-# MINIMAL #-} -- | A class representing line segments -class ( LineSegment_ lineSegment point - ) => ConstructableLineSegment_ lineSegment point where +class ( LineSegment_ lineSegment point + ) => ConstructableLineSegment_ lineSegment point where {-# MINIMAL uncheckedLineSegment #-} -- | Create a segment -- -- pre: the points are disjoint - uncheckedLineSegment :: point -> point -> lineSegment + uncheckedLineSegment :: point -> point -> lineSegment -- uncheckedLineSegment s t = mkInterval (mkEndPoint s) (mkEndPoint t) -- | smart constructor that creates a valid segment, i.e. it -- validates that the endpoints are disjoint. - mkLineSegment :: Eq (Vector (Dimension point) (NumType point)) - => point -> point -> Maybe lineSegment - mkLineSegment point -s point -t + mkLineSegment :: Eq (Vector (Dimension point) (NumType point)) + => point -> point -> Maybe lineSegment + mkLineSegment point +s point +t | point -spoint +spoint -> Getting (Vector (Dimension point) (NumType point)) point @@ -108,7 +108,7 @@ -> Vector (Dimension point) (NumType point) -> Bool forall a. Eq a => a -> a -> Bool /= point -tpoint +tpoint -> Getting (Vector (Dimension point) (NumType point)) point @@ -142,8 +142,8 @@ ConstructableLineSegment_ lineSegment point => point -> point -> lineSegment uncheckedLineSegment point -s point -t +s point +t | Bool otherwise = Maybe lineSegment forall a. Maybe a @@ -153,25 +153,25 @@ -- | A class representing Closed Linesegments -class ( LineSegment_ lineSegment point - , StartPointOf lineSegment ~ EndPoint Closed point - , EndPointOf lineSegment ~ EndPoint Closed point - ) => ClosedLineSegment_ lineSegment point where +class ( LineSegment_ lineSegment point + , StartPointOf lineSegment ~ EndPoint Closed point + , EndPointOf lineSegment ~ EndPoint Closed point + ) => ClosedLineSegment_ lineSegment point where -- | A Class representing Open ended linesegments -class ( LineSegment_ lineSegment point - , StartPointOf lineSegment ~ EndPoint Open point - , EndPointOf lineSegment ~ EndPoint Open point - ) => OpenLineSegment_ lineSegment point where +class ( LineSegment_ lineSegment point + , StartPointOf lineSegment ~ EndPoint Open point + , EndPointOf lineSegment ~ EndPoint Open point + ) => OpenLineSegment_ lineSegment point where -- | Deconstructs a line segment from the start and end point -pattern LineSegment_ :: forall lineSegment point. LineSegment_ lineSegment point - => point -> point -> lineSegment +pattern LineSegment_ :: forall lineSegment point. LineSegment_ lineSegment point + => point -> point -> lineSegment pattern $mLineSegment_ :: forall {r} {lineSegment} {point}. LineSegment_ lineSegment point => lineSegment -> (point -> point -> r) -> ((# #) -> r) -> r -LineSegment_ s t <- (startAndEnd -> (s,t)) +LineSegment_
s t <- (startAndEnd -> (s,t)) {-# COMPLETE LineSegment_ #-} -------------------------------------------------------------------------------- @@ -186,19 +186,19 @@ -- Point2 0.0 0.0 -- >>> interpolate 1 $ ClosedLineSegment origin (Point2 10.0 10.0) -- Point2 10.0 10.0 -interpolate :: forall lineSegment d point r - . ( Fractional r, LineSegment_ lineSegment point - , ConstructablePoint_ point d r +interpolate :: forall lineSegment d point r + . ( Fractional r, LineSegment_ lineSegment point + , ConstructablePoint_ point d r ) - => r -> lineSegment -> point + => r -> lineSegment -> point interpolate :: forall lineSegment (d :: Nat) point r. (Fractional r, LineSegment_ lineSegment point, ConstructablePoint_ point d r) => r -> lineSegment -> point -interpolate r -lam (LineSegment_ point -s point -t) = +interpolate
r +lam (LineSegment_ point +s point +t) = Vector (Dimension point) (NumType point) -> point forall point (d :: Nat) r. ConstructablePoint_ point d r => @@ -207,7 +207,7 @@ -> Vector (Dimension point) (NumType point) -> point forall a b. (a -> b) -> a -> b $ (point -spoint +spoint -> Getting (Vector (Dimension point) (NumType point)) point @@ -240,14 +240,14 @@ 1r -> r -> r forall a. Num a => a -> a -> a -r -lam)) Vector (Dimension point) (NumType point) +lam)) Vector (Dimension point) (NumType point) -> Vector (Dimension point) (NumType point) -> Vector (Dimension point) (NumType point) forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector ^+^ (point -tpoint +tpoint -> Getting (Vector (Dimension point) (NumType point)) point @@ -277,7 +277,7 @@ (Num r, Vector_ vector d r) => vector -> r -> vector ^* r -lam) +lam
) -------------------------------------------------------------------------------- @@ -285,46 +285,46 @@ -- | Given a y-coordinate, compare the segments based on the -- x-coordinate of the intersection with the horizontal line through y -ordAtY :: (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) - => r - -> lineSegment -> lineSegment -> Ordering +ordAtY :: (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) + => r + -> lineSegment -> lineSegment -> Ordering ordAtY :: forall r lineSegment point. (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering -ordAtY r -y lineSegment -seg1 lineSegment -seg2 = r -> lineSegment -> lineSegment -> Ordering +ordAtY
r +y lineSegment +seg1 lineSegment +seg2 = r -> lineSegment -> lineSegment -> Ordering forall r lineSegment point. (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering ordAtX (-r -y) (lineSegment -> lineSegment +y) (lineSegment -> lineSegment forall {p} {p} {b}. (Dimension p ~ 2, Dimension p ~ 2, HasStart b p, HasEnd b p, HasVector p p, HasVector p p, Num (NumType p), Num (NumType p)) => b -> b -flipPlane lineSegment -seg1) (lineSegment -> lineSegment +flipPlane lineSegment +seg1) (lineSegment -> lineSegment forall {p} {p} {b}. (Dimension p ~ 2, Dimension p ~ 2, HasStart b p, HasEnd b p, HasVector p p, HasVector p p, Num (NumType p), Num (NumType p)) => b -> b -flipPlane lineSegment -seg2) +flipPlane
lineSegment +seg2) where - rot90 :: Vector 2 r -> Vector 2 r -rot90 (Vector2 r -x' r -y') = r -> r -> Vector 2 r + rot90 :: Vector 2 r -> Vector 2 r +rot90 (Vector2 r +x' r +y') = r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (-r -y') r -x' - flipPlane :: b -> b -flipPlane b -seg = b -segb -> (b -> b) -> b +y') r +x' + flipPlane :: b -> b +flipPlane b +seg = b +segb -> (b -> b) -> b forall a b. a -> (a -> b) -> b &(p -> Identity p) -> b -> Identity b forall seg p. HasStart seg p => Lens' seg p @@ -352,7 +352,7 @@ forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Vector 2 (NumType p) -> Vector 2 (NumType p) forall {r}. Num r => Vector 2 r -> Vector 2 r -rot90 +rot90 b -> (b -> b) -> b forall a b. a -> (a -> b) -> b &(p -> Identity p) -> b -> Identity b @@ -381,135 +381,135 @@ forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Vector 2 (NumType p) -> Vector 2 (NumType p) forall {r}. Num r => Vector 2 r -> Vector 2 r -rot90 +rot90
-- | Given a y coord and a line segment that intersects the horizontal line -- through y, compute the x-coordinate of this intersection point. -- -- note that we will pretend that the line segment is closed, even if it is not -xCoordAt :: (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) - => r -> lineSegment -> r +xCoordAt :: (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) + => r -> lineSegment -> r xCoordAt :: forall r lineSegment point. (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> r -xCoordAt r -y (LineSegment_ (Point2_ r -px r -py) (Point2_ r -qx r -qy)) +xCoordAt
r +y (LineSegment_ (Point2_ r +px r +py) (Point2_ r +qx r +qy)) | r -py r -> r -> Bool +py r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -qy = r -px r -> r -> r +qy = r +px r -> r -> r forall a. Ord a => a -> a -> a `max` r -qx -- s is horizontal, and since it by the +qx
-- s is horizontal, and since it by the -- precondition it intersects the sweep -- line, we return the x-coord of the -- rightmost endpoint. | Bool otherwise = r -px r -> r -> r +px r -> r -> r forall a. Num a => a -> a -> a + r -alpha r -> r -> r +alpha r -> r -> r forall a. Num a => a -> a -> a * (r -qx r -> r -> r +qx r -> r -> r forall a. Num a => a -> a -> a - r -px) +px
) where - alpha :: r -alpha = (r -y r -> r -> r + alpha :: r +alpha = (r +y r -> r -> r forall a. Num a => a -> a -> a - r -py) r -> r -> r +py) r -> r -> r forall a. Fractional a => a -> a -> a / (r -qy r -> r -> r +qy r -> r -> r forall a. Num a => a -> a -> a - r -py) +py) -- | Given an x-coordinate, compare the segments based on the -- y-coordinate of the intersection with the horizontal line through y -ordAtX :: ( Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) - => r - -> lineSegment -> lineSegment -> Ordering +ordAtX :: ( Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) + => r + -> lineSegment -> lineSegment -> Ordering ordAtX :: forall r lineSegment point. (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering -ordAtX r -x (lineSegment -> lineSegment +ordAtX
r +x (lineSegment -> lineSegment forall lineSegment point (d :: Nat) r. (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) => lineSegment -> lineSegment -orientLR -> LineSegment_ (Point2_ r -px r -py) (Point2_ r -qx r -qy)) +orientLR
-> LineSegment_ (Point2_ r +px r +py) (Point2_ r +qx r +qy)) (lineSegment -> lineSegment forall lineSegment point (d :: Nat) r. (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) => lineSegment -> lineSegment -orientLR -> LineSegment_ (Point2_ r -ax r -ay) (Point2_ r -bx r -by)) = +orientLR
-> LineSegment_ (Point2_ r +ax r +ay) (Point2_ r +bx r +by)) = case (Bool -pqVertical,Bool -abVertical) of +pqVertical
,Bool +abVertical) of (Bool True,Bool True) -> r -pqTop r -> r -> Ordering +pqTop r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r -abTop +abTop
(Bool True,Bool False) -> (r -pqTopr -> r -> r +pqTopr -> r -> r forall a. Num a => a -> a -> a *(r -bxr -> r -> r +bxr -> r -> r forall a. Num a => a -> a -> a -r -ax)) r -> r -> Ordering +ax)) r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r -abTerm +abTerm
(Bool False,Bool True) -> r -pqTerm r -> r -> Ordering +pqTerm r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (r -abTopr -> r -> r +abTopr -> r -> r forall a. Num a => a -> a -> a *(r -qxr -> r -> r +qxr -> r -> r forall a. Num a => a -> a -> a -r -px)) +px
)) (Bool False,Bool False) -> r -term1 r -> r -> Ordering +term1 r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r -term2 +term2
where -- For ease of argument we orient the segment from left to right. -- @@ -525,106 +525,106 @@ -- and we wish to : y `compare` y' -- hence we multiply both sides by (bx-ax)*(qx-px) to get rid of the factions. -- - pqVertical :: Bool -pqVertical = r -px r -> r -> Bool + pqVertical :: Bool +pqVertical = r +px r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -qx - abVertical :: Bool -abVertical = r -ax r -> r -> Bool +qx + abVertical :: Bool +abVertical = r +ax r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -bx - pqTop :: r -pqTop = r -py r -> r -> r +bx + pqTop :: r +pqTop = r +py r -> r -> r forall a. Ord a => a -> a -> a `max` r -qy - abTop :: r -abTop = r -ay r -> r -> r +qy + abTop :: r +abTop = r +ay r -> r -> r forall a. Ord a => a -> a -> a `max` r -by +by -- the py + alpha*(qy-py) term multiplied by (qx-px) so that there are no -- more fractions - pqTerm :: r -pqTerm = r -pyr -> r -> r + pqTerm :: r +pqTerm = r +pyr -> r -> r forall a. Num a => a -> a -> a *(r -qxr -> r -> r +qxr -> r -> r forall a. Num a => a -> a -> a -r -px) r -> r -> r +px) r -> r -> r forall a. Num a => a -> a -> a + (r -xr -> r -> r +xr -> r -> r forall a. Num a => a -> a -> a -r -px)r -> r -> r +px)r -> r -> r forall a. Num a => a -> a -> a *(r -qyr -> r -> r +qyr -> r -> r forall a. Num a => a -> a -> a -r -py) - abTerm :: r -abTerm = r -ayr -> r -> r +py) + abTerm :: r +abTerm = r +ayr -> r -> r forall a. Num a => a -> a -> a *(r -bxr -> r -> r +bxr -> r -> r forall a. Num a => a -> a -> a -r -ax) r -> r -> r +ax) r -> r -> r forall a. Num a => a -> a -> a + (r -xr -> r -> r +xr -> r -> r forall a. Num a => a -> a -> a -r -ax)r -> r -> r +ax)r -> r -> r forall a. Num a => a -> a -> a *(r -byr -> r -> r +byr -> r -> r forall a. Num a => a -> a -> a -r -ay) -- +ay) -- - term1 :: r -term1 = (r -bxr -> r -> r + term1 :: r +term1 = (r +bxr -> r -> r forall a. Num a => a -> a -> a -r -ax) r -> r -> r +ax) r -> r -> r forall a. Num a => a -> a -> a * r -pqTerm - term2 :: r -term2 = (r -qxr -> r -> r +pqTerm + term2 :: r +term2 = (r +qxr -> r -> r forall a. Num a => a -> a -> a -r -px) r -> r -> r +px) r -> r -> r forall a. Num a => a -> a -> a * r -abTerm +abTerm -- | Orient the segment from left to right -orientLR :: (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) - => lineSegment -> lineSegment +orientLR :: (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) + => lineSegment -> lineSegment orientLR :: forall lineSegment point (d :: Nat) r. (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) => lineSegment -> lineSegment -orientLR lineSegment -seg +orientLR
lineSegment +seg | lineSegment -seglineSegment -> Getting r lineSegment r -> r +seglineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasStart seg p => Lens' seg p @@ -641,7 +641,7 @@ xCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= lineSegment -seglineSegment -> Getting r lineSegment r -> r +seglineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasEnd seg p => Lens' seg p @@ -656,10 +656,10 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord = lineSegment -seg +seg
| Bool otherwise = lineSegment -seglineSegment -> (lineSegment -> lineSegment) -> lineSegment +seglineSegment -> (lineSegment -> lineSegment) -> lineSegment forall a b. a -> (a -> b) -> b &(point -> Identity point) -> lineSegment -> Identity lineSegment forall seg p. HasStart seg p => Lens' seg p @@ -668,7 +668,7 @@ -> point -> lineSegment -> lineSegment forall s t a b. ASetter s t a b -> b -> s -> t .~ (lineSegment -seglineSegment -> Getting point lineSegment point -> point +seglineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p @@ -683,7 +683,7 @@ -> point -> lineSegment -> lineSegment forall s t a b. ASetter s t a b -> b -> s -> t .~ (lineSegment -seglineSegment -> Getting point lineSegment point -> point +seglineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p @@ -692,16 +692,16 @@ -- | Orient the segment from bottom to top -orientBT :: (LineSegment_ lineSegment point, Point_ point d r, 2 <= d, Ord r) - => lineSegment -> lineSegment +orientBT :: (LineSegment_ lineSegment point, Point_ point d r, 2 <= d, Ord r) + => lineSegment -> lineSegment orientBT :: forall lineSegment point (d :: Nat) r. (LineSegment_ lineSegment point, Point_ point d r, 2 <= d, Ord r) => lineSegment -> lineSegment -orientBT lineSegment -seg +orientBT
lineSegment +seg | lineSegment -seglineSegment -> Getting r lineSegment r -> r +seglineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasStart seg p => Lens' seg p @@ -718,7 +718,7 @@ yCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= lineSegment -seglineSegment -> Getting r lineSegment r -> r +seglineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasEnd seg p => Lens' seg p @@ -733,10 +733,10 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord = lineSegment -seg +seg
| Bool otherwise = lineSegment -seglineSegment -> (lineSegment -> lineSegment) -> lineSegment +seglineSegment -> (lineSegment -> lineSegment) -> lineSegment forall a b. a -> (a -> b) -> b &(point -> Identity point) -> lineSegment -> Identity lineSegment forall seg p. HasStart seg p => Lens' seg p @@ -745,7 +745,7 @@ -> point -> lineSegment -> lineSegment forall s t a b. ASetter s t a b -> b -> s -> t .~ (lineSegment -seglineSegment -> Getting point lineSegment point -> point +seglineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p @@ -760,7 +760,7 @@ -> point -> lineSegment -> lineSegment forall s t a b. ASetter s t a b -> b -> s -> t .~ (lineSegment -seglineSegment -> Getting point lineSegment point -> point +seglineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p @@ -773,95 +773,95 @@ -- through x, compute the y-coordinate of this intersection point. -- -- note that we will pretend that the line segment is closed, even if it is not -yCoordAt :: ( Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) - => r -> lineSegment -> r +yCoordAt :: ( Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) + => r -> lineSegment -> r yCoordAt :: forall r lineSegment point. (Fractional r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> r -yCoordAt r -x (LineSegment_ (Point2_ r -px r -py) (Point2_ r -qx r -qy)) +yCoordAt
r +x (LineSegment_ (Point2_ r +px r +py) (Point2_ r +qx r +qy)) | r -px r -> r -> Bool +px r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -qx = r -py r -> r -> r +qx = r +py r -> r -> r forall a. Ord a => a -> a -> a `max` r -qy -- s is vertical, since by the precondition it +qy
-- s is vertical, since by the precondition it -- intersects we return the y-coord of the topmost -- endpoint. | Bool otherwise = r -py r -> r -> r +py r -> r -> r forall a. Num a => a -> a -> a + r -alpha r -> r -> r +alpha r -> r -> r forall a. Num a => a -> a -> a * (r -qy r -> r -> r +qy r -> r -> r forall a. Num a => a -> a -> a - r -py) +py
) where - alpha :: r -alpha = (r -x r -> r -> r + alpha :: r +alpha = (r +x r -> r -> r forall a. Num a => a -> a -> a - r -px) r -> r -> r +px) r -> r -> r forall a. Fractional a => a -> a -> a / (r -qx r -> r -> r +qx r -> r -> r forall a. Num a => a -> a -> a - r -px) +px) -------------------------------------------------------------------------------- -instance ( LineSegment_ segment point - ) => LineSegment_ (segment :+ extra) point where +instance ( LineSegment_ segment point + ) => LineSegment_ (segment :+ extra) point where -instance ( ConstructableLineSegment_ segment point - , Default extra - ) => ConstructableLineSegment_ (segment :+ extra) point where - uncheckedLineSegment :: point -> point -> segment :+ extra -uncheckedLineSegment point -p point -q = point -> point -> segment +instance ( ConstructableLineSegment_ segment point + , Default extra + ) => ConstructableLineSegment_ (segment :+ extra) point where + uncheckedLineSegment :: point -> point -> segment :+ extra +uncheckedLineSegment point +p point +q = point -> point -> segment forall lineSegment point. ConstructableLineSegment_ lineSegment point => point -> point -> lineSegment uncheckedLineSegment point -p point -q segment -> extra -> segment :+ extra +p point +q segment -> extra -> segment :+ extra forall core extra. core -> extra -> core :+ extra :+ extra forall a. Default a => a def -instance ( ClosedLineSegment_ segment point - ) => ClosedLineSegment_ (segment :+ extra) point where +instance ( ClosedLineSegment_ segment point + ) => ClosedLineSegment_ (segment :+ extra) point where -instance ( OpenLineSegment_ segment point - ) => OpenLineSegment_ (segment :+ extra) point where +instance ( OpenLineSegment_ segment point + ) => OpenLineSegment_ (segment :+ extra) point where -instance HasOnSegment lineSegment d => HasOnSegment (lineSegment :+ extra) d where - onSegment :: forall r point. +instance HasOnSegment lineSegment d => HasOnSegment (lineSegment :+ extra) d where + onSegment :: forall r point. (Ord r, Point_ point d r, r ~ NumType (lineSegment :+ extra), d ~ Dimension (lineSegment :+ extra)) => point -> (lineSegment :+ extra) -> Bool -onSegment point -q (lineSegment -s :+ extra +onSegment point +q (lineSegment +s :+ extra _) = point -q point -> lineSegment -> Bool +q point -> lineSegment -> Bool forall lineSegment (d :: Nat) r point. (HasOnSegment lineSegment d, Ord r, Point_ point d r, r ~ NumType lineSegment, d ~ Dimension lineSegment) => @@ -871,5 +871,5 @@ d ~ Dimension lineSegment) => point -> lineSegment -> Bool `onSegment` lineSegment -s +s \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Internal.html b/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Internal.html index 504ea57b3..68fd667bd 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Internal.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Internal.html @@ -61,63 +61,63 @@ -- | Data type representing intervals type LineSegment :: (Type -> Type) -> Type -> Type -newtype LineSegment endPoint point = MkLineSegment (Interval endPoint point) +newtype LineSegment endPoint point = MkLineSegment (Interval endPoint point) -- | A type representing Closed LineSegments -type ClosedLineSegment point = LineSegment (EndPoint Closed) point +type ClosedLineSegment point = LineSegment (EndPoint Closed) point -- | A type representing Open LineSegments -type OpenLineSegment point = LineSegment (EndPoint Open) point +type OpenLineSegment point = LineSegment (EndPoint Open) point -- | Construct a line Segment -pattern LineSegment :: endPoint point -> endPoint point -> LineSegment endPoint point +pattern LineSegment :: endPoint point -> endPoint point -> LineSegment endPoint point pattern $mLineSegment :: forall {r} {endPoint :: * -> *} {point}. LineSegment endPoint point -> (endPoint point -> endPoint point -> r) -> ((# #) -> r) -> r $bLineSegment :: forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point -LineSegment p q = MkLineSegment (Interval p q) +LineSegment
p q = MkLineSegment (Interval p q) {-# COMPLETE LineSegment #-} -- | Construct a closed interval -pattern ClosedLineSegment :: point -> point -> ClosedLineSegment point +pattern ClosedLineSegment :: point -> point -> ClosedLineSegment point pattern $mClosedLineSegment :: forall {r} {point}. ClosedLineSegment point -> (point -> point -> r) -> ((# #) -> r) -> r $bClosedLineSegment :: forall point. point -> point -> ClosedLineSegment point -ClosedLineSegment s t = LineSegment (ClosedE s) (ClosedE t) +ClosedLineSegment
s t = LineSegment (ClosedE s) (ClosedE t) {-# COMPLETE ClosedLineSegment #-} -- | Construct an open ended interval -pattern OpenLineSegment :: point -> point -> OpenLineSegment point +pattern OpenLineSegment :: point -> point -> OpenLineSegment point pattern $mOpenLineSegment :: forall {r} {point}. OpenLineSegment point -> (point -> point -> r) -> ((# #) -> r) -> r $bOpenLineSegment :: forall point. point -> point -> OpenLineSegment point -OpenLineSegment s t = LineSegment (OpenE s) (OpenE t) +OpenLineSegment
s t = LineSegment (OpenE s) (OpenE t) {-# COMPLETE OpenLineSegment #-} -type instance NumType (LineSegment endPoint point) = NumType point -type instance Dimension (LineSegment endPoint point) = Dimension point +type instance NumType (LineSegment endPoint point) = NumType point +type instance Dimension (LineSegment endPoint point) = Dimension point -deriving instance (Eq (endPoint point) - ) => Eq (LineSegment endPoint point) -deriving instance (Ord (endPoint point) - ) => Ord (LineSegment endPoint point) +deriving instance (Eq (endPoint point) + ) => Eq (LineSegment endPoint point) +deriving instance (Ord (endPoint point) + ) => Ord (LineSegment endPoint point) -instance Foldable endPoint => Foldable (LineSegment endPoint) where - foldMap :: forall m a. Monoid m => (a -> m) -> LineSegment endPoint a -> m -foldMap a -> m -f (LineSegment endPoint a -s endPoint a -t) = (a -> m) -> endPoint a -> m +instance Foldable endPoint => Foldable (LineSegment endPoint) where + foldMap :: forall m a. Monoid m => (a -> m) -> LineSegment endPoint a -> m +foldMap a -> m +f (LineSegment endPoint a +s endPoint a +t) = (a -> m) -> endPoint a -> m forall m a. Monoid m => (a -> m) -> endPoint a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f endPoint a -s m -> m -> m +f endPoint a +s m -> m -> m forall a. Semigroup a => a -> a -> a <> (a -> m) -> endPoint a -> m forall m a. Monoid m => (a -> m) -> endPoint a -> m @@ -125,38 +125,38 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f endPoint a -t +f endPoint a +t -instance Functor endPoint => Functor (LineSegment endPoint) where - fmap :: forall a b. +instance Functor endPoint => Functor (LineSegment endPoint) where + fmap :: forall a b. (a -> b) -> LineSegment endPoint a -> LineSegment endPoint b -fmap a -> b -f (LineSegment endPoint a -s endPoint a -t) = endPoint b -> endPoint b -> LineSegment endPoint b +fmap a -> b +f (LineSegment endPoint a +s endPoint a +t) = endPoint b -> endPoint b -> LineSegment endPoint b forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment ((a -> b) -> endPoint a -> endPoint b forall a b. (a -> b) -> endPoint a -> endPoint b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f endPoint a -s) ((a -> b) -> endPoint a -> endPoint b +f endPoint a +s) ((a -> b) -> endPoint a -> endPoint b forall a b. (a -> b) -> endPoint a -> endPoint b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f endPoint a -t) +f endPoint a +t) -instance Traversable endPoint => Traversable (LineSegment endPoint) where - traverse :: forall (f :: * -> *) a b. +instance Traversable endPoint => Traversable (LineSegment endPoint) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> LineSegment endPoint a -> f (LineSegment endPoint b) -traverse a -> f b -f (LineSegment endPoint a -s endPoint a -t) = endPoint b -> endPoint b -> LineSegment endPoint b +traverse a -> f b +f (LineSegment endPoint a +s endPoint a +t) = endPoint b -> endPoint b -> LineSegment endPoint b forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment (endPoint b -> endPoint b -> LineSegment endPoint b) @@ -170,8 +170,8 @@ Applicative f => (a -> f b) -> endPoint a -> f (endPoint b) traverse a -> f b -f endPoint a -s f (endPoint b -> LineSegment endPoint b) +f endPoint a +s f (endPoint b -> LineSegment endPoint b) -> f (endPoint b) -> f (LineSegment endPoint b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b @@ -183,13 +183,13 @@ Applicative f => (a -> f b) -> endPoint a -> f (endPoint b) traverse a -> f b -f endPoint a -t +f endPoint a +t -- | Lens to get the underlying interval -_LineSegmentInterval :: Iso (LineSegment endPoint point) (LineSegment endPoint' point') - (Interval endPoint point) (Interval endPoint' point') +_LineSegmentInterval :: Iso (LineSegment endPoint point) (LineSegment endPoint' point') + (Interval endPoint point) (Interval endPoint' point') _LineSegmentInterval :: forall (endPoint :: * -> *) point (endPoint' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -204,18 +204,18 @@ (Interval endPoint point) (Interval endPoint' point') forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b -iso (\(MkLineSegment Interval endPoint point -i) -> Interval endPoint point -i) Interval endPoint' point' -> LineSegment endPoint' point' +iso (\(MkLineSegment Interval endPoint point +i) -> Interval endPoint point +i) Interval endPoint' point' -> LineSegment endPoint' point' forall (endPoint :: * -> *) point. Interval endPoint point -> LineSegment endPoint point MkLineSegment -instance ( IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - ) => HasStart (LineSegment endPoint point) point where - start :: Lens' (LineSegment endPoint point) point -start = (Interval endPoint point -> f (Interval endPoint point)) +instance ( IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + ) => HasStart (LineSegment endPoint point) point where + start :: Lens' (LineSegment endPoint point) point +start = (Interval endPoint point -> f (Interval endPoint point)) -> LineSegment endPoint point -> f (LineSegment endPoint point) forall (endPoint :: * -> *) point (endPoint' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). @@ -237,10 +237,10 @@ Lens' (Interval endPoint point) point start -instance ( IxValue (endPoint point) ~ point - ) => HasStartPoint (LineSegment endPoint point) (endPoint point) where - startPoint :: Lens' (LineSegment endPoint point) (endPoint point) -startPoint = (Interval endPoint point -> f (Interval endPoint point)) +instance ( IxValue (endPoint point) ~ point + ) => HasStartPoint (LineSegment endPoint point) (endPoint point) where + startPoint :: Lens' (LineSegment endPoint point) (endPoint point) +startPoint = (Interval endPoint point -> f (Interval endPoint point)) -> LineSegment endPoint point -> f (LineSegment endPoint point) forall (endPoint :: * -> *) point (endPoint' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). @@ -263,11 +263,11 @@ startPoint -instance ( IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - ) => HasEnd (LineSegment endPoint point) point where - end :: Lens' (LineSegment endPoint point) point -end = (Interval endPoint point -> f (Interval endPoint point)) +instance ( IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + ) => HasEnd (LineSegment endPoint point) point where + end :: Lens' (LineSegment endPoint point) point +end = (Interval endPoint point -> f (Interval endPoint point)) -> LineSegment endPoint point -> f (LineSegment endPoint point) forall (endPoint :: * -> *) point (endPoint' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). @@ -289,10 +289,10 @@ Lens' (Interval endPoint point) point end -instance ( IxValue (endPoint point) ~ point - ) => HasEndPoint (LineSegment endPoint point) (endPoint point) where - endPoint :: Lens' (LineSegment endPoint point) (endPoint point) -endPoint = (Interval endPoint point -> f (Interval endPoint point)) +instance ( IxValue (endPoint point) ~ point + ) => HasEndPoint (LineSegment endPoint point) (endPoint point) where + endPoint :: Lens' (LineSegment endPoint point) (endPoint point) +endPoint = (Interval endPoint point -> f (Interval endPoint point)) -> LineSegment endPoint point -> f (LineSegment endPoint point) forall (endPoint :: * -> *) point (endPoint' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). @@ -314,51 +314,51 @@ Lens' (Interval endPoint point) (endPoint point) endPoint -type instance StartPointOf (LineSegment endPoint point) = endPoint point -type instance EndPointOf (LineSegment endPoint point) = endPoint point +type instance StartPointOf (LineSegment endPoint point) = endPoint point +type instance EndPointOf (LineSegment endPoint point) = endPoint point -instance ( IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - ) => IntervalLike_ (LineSegment endPoint point) point where +instance ( IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + ) => IntervalLike_ (LineSegment endPoint point) point where -instance ( IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - , Point_ point (Dimension point) (NumType point) - ) => LineSegment_ (LineSegment endPoint point) point where +instance ( IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + , Point_ point (Dimension point) (NumType point) + ) => LineSegment_ (LineSegment endPoint point) point where -instance ( IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - , Point_ point (Dimension point) (NumType point) - ) => ConstructableLineSegment_ (LineSegment endPoint point) point where - uncheckedLineSegment :: point -> point -> LineSegment endPoint point -uncheckedLineSegment point -s point -t = endPoint point -> endPoint point -> LineSegment endPoint point +instance ( IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + , Point_ point (Dimension point) (NumType point) + ) => ConstructableLineSegment_ (LineSegment endPoint point) point where + uncheckedLineSegment :: point -> point -> LineSegment endPoint point +uncheckedLineSegment point +s point +t = endPoint point -> endPoint point -> LineSegment endPoint point forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment (IxValue (endPoint point) -> endPoint point forall endPoint. EndPoint_ endPoint => IxValue endPoint -> endPoint mkEndPoint point IxValue (endPoint point) -s) (IxValue (endPoint point) -> endPoint point +s) (IxValue (endPoint point) -> endPoint point forall endPoint. EndPoint_ endPoint => IxValue endPoint -> endPoint mkEndPoint point IxValue (endPoint point) -t) +t) -instance ( Point_ point (Dimension point) (NumType point) - ) => ClosedLineSegment_ (ClosedLineSegment point) point where +instance ( Point_ point (Dimension point) (NumType point) + ) => ClosedLineSegment_ (ClosedLineSegment point) point where -instance ( Point_ point (Dimension point) (NumType point) - ) => OpenLineSegment_ (OpenLineSegment point) point where +instance ( Point_ point (Dimension point) (NumType point) + ) => OpenLineSegment_ (OpenLineSegment point) point where -instance ( Traversable1 endPoint - , Dimension point ~ Dimension point' - , Point_ point (Dimension point) (NumType point) - , Point_ point' (Dimension point) (NumType point') - ) => HasPoints (LineSegment endPoint point) (LineSegment endPoint point') - point point' where - allPoints :: forall (d :: Nat) r r'. +instance ( Traversable1 endPoint + , Dimension point ~ Dimension point' + , Point_ point (Dimension point) (NumType point) + , Point_ point' (Dimension point) (NumType point') + ) => HasPoints (LineSegment endPoint point) (LineSegment endPoint point') + point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (LineSegment endPoint point) ~ r, NumType (LineSegment endPoint point') ~ r', @@ -369,10 +369,10 @@ (LineSegment endPoint point') point point' -allPoints point -> f point' -f (LineSegment endPoint point -s endPoint point -t) = (endPoint point' -> endPoint point' -> LineSegment endPoint point') +allPoints point -> f point' +f (LineSegment endPoint point +s endPoint point +t) = (endPoint point' -> endPoint point' -> LineSegment endPoint point') -> f (endPoint point') -> f (endPoint point') -> f (LineSegment endPoint point') @@ -391,8 +391,8 @@ Apply f => (a -> f b) -> endPoint a -> f (endPoint b) traverse1 point -> f point' -f endPoint point -s) ((point -> f point') -> endPoint point -> f (endPoint point') +f endPoint point +s) ((point -> f point') -> endPoint point -> f (endPoint point') forall (t :: * -> *) (f :: * -> *) a b. (Traversable1 t, Apply f) => (a -> f b) -> t a -> f (t b) @@ -400,8 +400,8 @@ Apply f => (a -> f b) -> endPoint a -> f (endPoint b) traverse1 point -> f point' -f endPoint point -t) +f endPoint point +t) -- foo :: ( Eq r @@ -413,27 +413,27 @@ -instance ( Traversable1 endPoint - , Point_ point d r - , d ~ Dimension point, r ~ NumType point - , Ord r - , Ord (Vector d r) - ) => IsBoxable (LineSegment endPoint point) +instance ( Traversable1 endPoint + , Point_ point d r + , d ~ Dimension point, r ~ NumType point + , Ord r + , Ord (Vector d r) + ) => IsBoxable (LineSegment endPoint point) -- deriving instance (Show (Interval endPoint point)) => Show (LineSegment endPoint point) instance {-# OVERLAPPABLE #-} - ( Show (endPoint point) + ( Show (endPoint point) -- , OptCVector_ 2 (endPoint point) - ) => Show (LineSegment endPoint point) where - showsPrec :: Int -> LineSegment endPoint point -> ShowS -showsPrec Int -k (LineSegment endPoint point -s endPoint point -t) = Bool -> ShowS -> ShowS + ) => Show (LineSegment endPoint point) where + showsPrec :: Int -> LineSegment endPoint point -> ShowS +showsPrec Int +k (LineSegment endPoint point +s endPoint point +t) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int appPrec) (ShowS -> ShowS) -> ShowS -> ShowS @@ -451,7 +451,7 @@ forall a. Num a => a -> a -> a +Int 1) endPoint point -s +s ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -466,19 +466,19 @@ forall a. Num a => a -> a -> a +Int 1) endPoint point -t +t instance {-# OVERLAPPING #-} - ( Show point + ( Show point -- , OptCVector_ 2 point - ) => Show (ClosedLineSegment point) where - showsPrec :: Int -> ClosedLineSegment point -> ShowS -showsPrec Int -k (ClosedLineSegment point -s point -t) = Bool -> ShowS -> ShowS + ) => Show (ClosedLineSegment point) where + showsPrec :: Int -> ClosedLineSegment point -> ShowS +showsPrec Int +k (ClosedLineSegment point +s point +t) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int appPrec) (ShowS -> ShowS) -> ShowS -> ShowS @@ -496,7 +496,7 @@ forall a. Num a => a -> a -> a +Int 1) point -s +s ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -511,17 +511,17 @@ forall a. Num a => a -> a -> a +Int 1) point -t +t appPrec :: Int appPrec :: Int appPrec = Int 10 -instance ( Read (endPoint point) --, OptCVector_ 2 (endPoint point)) - ) => Read (LineSegment endPoint point) where - readPrec :: ReadPrec (LineSegment endPoint point) -readPrec = ReadPrec (LineSegment endPoint point) +instance ( Read (endPoint point) --, OptCVector_ 2 (endPoint point)) + ) => Read (LineSegment endPoint point) where + readPrec :: ReadPrec (LineSegment endPoint point) +readPrec = ReadPrec (LineSegment endPoint point) -> ReadPrec (LineSegment endPoint point) forall a. ReadPrec a -> ReadPrec a parens (Int @@ -538,14 +538,14 @@ Ident String "LineSegment" <- ReadPrec Lexeme lexP - endPoint point -p <- ReadPrec (endPoint point) -> ReadPrec (endPoint point) + endPoint point +p <- ReadPrec (endPoint point) -> ReadPrec (endPoint point) forall a. ReadPrec a -> ReadPrec a step ReadPrec (endPoint point) forall a. Read a => ReadPrec a readPrec - endPoint point -q <- ReadPrec (endPoint point) -> ReadPrec (endPoint point) + endPoint point +q <- ReadPrec (endPoint point) -> ReadPrec (endPoint point) forall a. ReadPrec a -> ReadPrec a step ReadPrec (endPoint point) forall a. Read a => ReadPrec a @@ -557,13 +557,13 @@ forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment endPoint point -p endPoint point -q)) +p endPoint point +q)) instance {-# OVERLAPPING #-} - (Read point -- , OptCVector_ 2 point) - ) => Read (ClosedLineSegment point) where - readPrec :: ReadPrec (ClosedLineSegment point) + (Read point -- , OptCVector_ 2 point) + ) => Read (ClosedLineSegment point) where + readPrec :: ReadPrec (ClosedLineSegment point) readPrec = ReadPrec (ClosedLineSegment point) -> ReadPrec (ClosedLineSegment point) forall a. ReadPrec a -> ReadPrec a @@ -581,14 +581,14 @@ Ident String "ClosedLineSegment" <- ReadPrec Lexeme lexP - point -p <- ReadPrec point -> ReadPrec point + point +p <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a readPrec - point -q <- ReadPrec point -> ReadPrec point + point +q <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a @@ -599,8 +599,8 @@ return (point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -p point -q)) +p point +q)) -- type instance VectorFamily d (LineSegment endPoint point) = @@ -608,30 +608,30 @@ -instance ( Point_ point d r - , Has_ Metric_ d r - , EndPoint_ (endPoint point) - , IxValue (endPoint point) ~ point - , Num r - ) => HasSupportingLine (LineSegment endPoint point) where - supportingLine :: LineSegment endPoint point +instance ( Point_ point d r + , Has_ Metric_ d r + , EndPoint_ (endPoint point) + , IxValue (endPoint point) ~ point + , Num r + ) => HasSupportingLine (LineSegment endPoint point) where + supportingLine :: LineSegment endPoint point -> LinePV (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) -supportingLine LineSegment endPoint point -seg = forall line point (d :: Nat) r. +supportingLine LineSegment endPoint point +seg = forall line point (d :: Nat) r. (Line_ line d r, Point_ point d r, Num r) => point -> point -> line -lineThrough @(LinePV d r) @point +lineThrough @(LinePV d r) @point (LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting point (LineSegment endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (LineSegment endPoint point) point forall seg p. HasStart seg p => Lens' seg p Lens' (LineSegment endPoint point) point start) (LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting point (LineSegment endPoint point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (LineSegment endPoint point) point @@ -640,34 +640,34 @@ end) {-# INLINE supportingLine #-} -instance ( Fractional r, Ord r - , HasSquaredEuclideanDistance point - , Point_ point d r - ) => HasSquaredEuclideanDistance (ClosedLineSegment point) where - pointClosestToWithDistance :: forall r (d :: Nat) point. +instance ( Fractional r, Ord r + , HasSquaredEuclideanDistance point + , Point_ point d r + ) => HasSquaredEuclideanDistance (ClosedLineSegment point) where + pointClosestToWithDistance :: forall r (d :: Nat) point. (r ~ NumType (ClosedLineSegment point), d ~ Dimension (ClosedLineSegment point), Num r, Point_ point d r) => point -> ClosedLineSegment point -> (Point d r, r) -pointClosestToWithDistance point -q seg :: ClosedLineSegment point -seg@(ClosedLineSegment point -a point -b) +pointClosestToWithDistance point +q seg :: ClosedLineSegment point +seg@(ClosedLineSegment point +a point +b) | Point d r -m Point d r -> ClosedLineSegment point -> Bool +m Point d r -> ClosedLineSegment point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment point -seg = (Point d r, r) +seg = (Point d r, r) (PointF (Vector d r), r) -z +z | Bool otherwise = ((PointF (Vector d r), r) -> r) -> (PointF (Vector d r), r) -> (PointF (Vector d r), r) -> (PointF (Vector d r), r) forall b a. Ord b => (a -> b) -> a -> a -> a -minOn (PointF (Vector d r), r) -> r +minOn (PointF (Vector d r), r) -> r forall a b. (a, b) -> b snd (point -> point -> (PointF (Vector d r), r) forall g r (d :: Nat) point. @@ -679,8 +679,8 @@ Point_ point d r) => point -> point -> (Point d r, r) pointClosestToWithDistance point -q point -a) +q point +a) (point -> point -> (PointF (Vector d r), r) forall g r (d :: Nat) point. (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g, @@ -691,13 +691,13 @@ Point_ point d r) => point -> point -> (Point d r, r) pointClosestToWithDistance point -q point -b) +q point +b) where - z :: (Point d r, r) - z :: (Point d r, r) -z@(Point d r -m,r + z :: (Point d r, r) + z :: (Point d r, r) +z@(Point d r +m,r _) = point -> LinePV d r -> (Point d r, r) forall g r (d :: Nat) point. (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g, @@ -708,7 +708,7 @@ Point_ point d r) => point -> LinePV d r -> (Point d r, r) pointClosestToWithDistance point -q (ClosedLineSegment point +q (ClosedLineSegment point -> LinePV (Dimension (ClosedLineSegment point)) (NumType (ClosedLineSegment point)) @@ -716,32 +716,32 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine ClosedLineSegment point -seg) +seg) - minOn :: Ord b => (a -> b) -> a -> a -> a - minOn :: forall b a. Ord b => (a -> b) -> a -> a -> a -minOn a -> b -f a -x a -y = if a -> b -f a -x b -> b -> Bool + minOn :: Ord b => (a -> b) -> a -> a -> a + minOn :: forall b a. Ord b => (a -> b) -> a -> a -> a +minOn a -> b +f a +x a +y = if a -> b +f a +x b -> b -> Bool forall a. Ord a => a -> a -> Bool <= a -> b -f a -y then a -x else a -y +f a +y then a +x else a +y -- type Intersection (Point d r) (ClosedLineSegment point) -instance ( HasOnSegment (LineSegment endPoint point) d - , Point_ point d r - , Fractional r, Ord r - ) => Point d r `HasIntersectionWith` LineSegment endPoint point where +instance ( HasOnSegment (LineSegment endPoint point) d + , Point_ point d r + , Fractional r, Ord r + ) => Point d r `HasIntersectionWith` LineSegment endPoint point where -- >>> test `intersects` testseg -- True - intersects :: Point d r -> LineSegment endPoint point -> Bool + intersects :: Point d r -> LineSegment endPoint point -> Bool intersects = Point d r -> LineSegment endPoint point -> Bool forall lineSegment (d :: Nat) r point. (HasOnSegment lineSegment d, Ord r, Point_ point d r, @@ -754,14 +754,14 @@ onSegment instance {-# OVERLAPPING #-} - ( HasOnSegment (LineSegment endPoint point) 2 - , Point_ point 2 r - , Num r, Ord r - , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) - ) => Point 2 r `HasIntersectionWith` LineSegment endPoint point where + ( HasOnSegment (LineSegment endPoint point) 2 + , Point_ point 2 r + , Num r, Ord r + , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) + ) => Point 2 r `HasIntersectionWith` LineSegment endPoint point where -- >>> test `intersects` testseg -- True - intersects :: Point 2 r -> LineSegment endPoint point -> Bool + intersects :: Point 2 r -> LineSegment endPoint point -> Bool intersects = Point 2 r -> LineSegment endPoint point -> Bool forall point r point' lineSegment. (Point_ point 2 r, Point_ point' 2 r, Ord r, Num r, @@ -772,18 +772,18 @@ -- | Implementation of OnSegment for 2 dimensional segments that only uses Ord and Num r -- constraints. -- -onSegment2 :: ( Point_ point 2 r, Point_ point' 2 r, Ord r, Num r - , LineSegment_ lineSegment point') - => point -> lineSegment -> Bool +onSegment2 :: ( Point_ point 2 r, Point_ point' 2 r, Ord r, Num r + , LineSegment_ lineSegment point') + => point -> lineSegment -> Bool onSegment2 :: forall point r point' lineSegment. (Point_ point 2 r, Point_ point' 2 r, Ord r, Num r, LineSegment_ lineSegment point') => point -> lineSegment -> Bool -onSegment2 point -q seg :: lineSegment -seg@(LineSegment_ point' -s point' -t) = +onSegment2 point +q seg :: lineSegment +seg@(LineSegment_ point' +s point' +t) = point -> LinePV 2 r -> Bool forall line (d :: Nat) point r. (HasOnLine line d, Point_ point d r, Num r, Eq r, r ~ NumType line, @@ -794,11 +794,11 @@ 2 ~ Dimension (LinePV 2 r)) => point -> LinePV 2 r -> Bool onLine point -q LinePV 2 r -supLine Bool -> Bool -> Bool +q LinePV 2 r +supLine Bool -> Bool -> Bool && EndPointType -> SideTest -> SideTest -> Bool -shouldBe (lineSegment -seglineSegment +shouldBe (lineSegment +seglineSegment -> Getting EndPointType lineSegment EndPointType -> EndPointType forall s a. s -> Getting a s a -> a ^.(StartPointOf lineSegment @@ -828,13 +828,13 @@ (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest onSide point -q LinePV 2 r -l) SideTest +q LinePV 2 r +l) SideTest LeftSide Bool -> Bool -> Bool && EndPointType -> SideTest -> SideTest -> Bool -shouldBe (lineSegment -seglineSegment +shouldBe (lineSegment +seglineSegment -> Getting EndPointType lineSegment EndPointType -> EndPointType forall s a. s -> Getting a s a -> a ^.(EndPointOf lineSegment @@ -864,15 +864,15 @@ (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest onSide point -q LinePV 2 r -r) SideTest +q LinePV 2 r +r) SideTest RightSide where - supLine :: LinePV 2 r -supLine = Point 2 r -> Vector 2 r -> LinePV 2 r + supLine :: LinePV 2 r +supLine = Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point' -spoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r +spoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point' (Point 2 r) forall point (d :: Nat) r. @@ -880,26 +880,26 @@ Lens' point (Point d r) Lens' point' (Point 2 r) asPoint) (point' -t point' -> point' -> Vector 2 r +t point' -> point' -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point' -s) - l :: LinePV 2 r -l = LinePV 2 r -> LinePV 2 r +s) + l :: LinePV 2 r +l = LinePV 2 r -> LinePV 2 r forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo LinePV 2 r -supLine - r :: LinePV 2 r -r = LinePV 2 r -> LinePV 2 r +supLine + r :: LinePV 2 r +r = LinePV 2 r -> LinePV 2 r forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r -> LinePV 2 r forall a b. (a -> b) -> a -> b $ Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point' -tpoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r +tpoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point' (Point 2 r) forall point (d :: Nat) r. @@ -907,42 +907,42 @@ Lens' point (Point d r) Lens' point' (Point 2 r) asPoint) (point' -t point' -> point' -> Vector 2 r +t point' -> point' -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point' -s) +s) -- shouldBe t a side is essentially a == side, but in case the type is open -- we alos allow to be on the line. - shouldBe :: EndPointType -> SideTest -> SideTest -> Bool -shouldBe EndPointType -et SideTest -a SideTest -side = case EndPointType -et of + shouldBe :: EndPointType -> SideTest -> SideTest -> Bool +shouldBe EndPointType +et SideTest +a SideTest +side = case EndPointType +et of EndPointType Open -> SideTest -a SideTest -> SideTest -> Bool +a SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest -side +side EndPointType Closed -> SideTest -a SideTest -> SideTest -> Bool +a SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest -side Bool -> Bool -> Bool +side Bool -> Bool -> Bool || SideTest -a SideTest -> SideTest -> Bool +a SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest OnLine -instance {-# OVERLAPPING #-} ( Point_ point 2 r, Num r - ) => HasOnSegment (ClosedLineSegment point) 2 where - onSegment :: forall r point. +instance {-# OVERLAPPING #-} ( Point_ point 2 r, Num r + ) => HasOnSegment (ClosedLineSegment point) 2 where + onSegment :: forall r point. (Ord r, Point_ point 2 r, r ~ NumType (ClosedLineSegment point), 2 ~ Dimension (ClosedLineSegment point)) => point -> ClosedLineSegment point -> Bool @@ -952,9 +952,9 @@ LineSegment_ lineSegment point') => point -> lineSegment -> Bool onSegment2 -instance {-# OVERLAPPING #-} ( Point_ point 2 r, Num r - ) => HasOnSegment (OpenLineSegment point) 2 where - onSegment :: forall r point. +instance {-# OVERLAPPING #-} ( Point_ point 2 r, Num r + ) => HasOnSegment (OpenLineSegment point) 2 where + onSegment :: forall r point. (Ord r, Point_ point 2 r, r ~ NumType (OpenLineSegment point), 2 ~ Dimension (OpenLineSegment point)) => point -> OpenLineSegment point -> Bool @@ -964,9 +964,9 @@ LineSegment_ lineSegment point') => point -> lineSegment -> Bool onSegment2 -instance {-# OVERLAPPING #-} ( Point_ point 2 r, Num r - ) => HasOnSegment (LineSegment AnEndPoint point) 2 where - onSegment :: forall r point. +instance {-# OVERLAPPING #-} ( Point_ point 2 r, Num r + ) => HasOnSegment (LineSegment AnEndPoint point) 2 where + onSegment :: forall r point. (Ord r, Point_ point 2 r, r ~ NumType (LineSegment AnEndPoint point), 2 ~ Dimension (LineSegment AnEndPoint point)) => @@ -978,8 +978,8 @@ point -> lineSegment -> Bool onSegment2 -instance ( Point_ point d r, Fractional r) => HasOnSegment (ClosedLineSegment point) d where - onSegment :: forall r point. +instance ( Point_ point d r, Fractional r) => HasOnSegment (ClosedLineSegment point) d where + onSegment :: forall r point. (Ord r, Point_ point d r, r ~ NumType (ClosedLineSegment point), d ~ Dimension (ClosedLineSegment point)) => point -> ClosedLineSegment point -> Bool @@ -990,8 +990,8 @@ point -> lineSegment -> Bool onClosedSegmentD -instance ( Point_ point d r, Fractional r) => HasOnSegment (OpenLineSegment point) d where - onSegment :: forall r point. +instance ( Point_ point d r, Fractional r) => HasOnSegment (OpenLineSegment point) d where + onSegment :: forall r point. (Ord r, Point_ point d r, r ~ NumType (OpenLineSegment point), d ~ Dimension (OpenLineSegment point)) => point -> OpenLineSegment point -> Bool @@ -1002,8 +1002,8 @@ point -> lineSegment -> Bool onOpenSegmentD -instance ( Point_ point d r, Fractional r) => HasOnSegment (LineSegment AnEndPoint point) d where - onSegment :: forall r point. +instance ( Point_ point d r, Fractional r) => HasOnSegment (LineSegment AnEndPoint point) d where + onSegment :: forall r point. (Ord r, Point_ point d r, r ~ NumType (LineSegment AnEndPoint point), d ~ Dimension (LineSegment AnEndPoint point)) => @@ -1015,42 +1015,42 @@ onSegmentD -- | Implementation of onSegment for d-dimensional segments. The function should -onSegmentDWith :: ( Point_ point d r - , Point_ point' d r - , LineSegment_ lineSegment point' - , Fractional r, Eq r +onSegmentDWith :: ( Point_ point d r + , Point_ point' d r + , LineSegment_ lineSegment point' + , Fractional r, Eq r ) - => (r -> Bool) - -> point -> lineSegment -> Bool + => (r -> Bool) + -> point -> lineSegment -> Bool onSegmentDWith :: forall point (d :: Nat) r point' lineSegment. (Point_ point d r, Point_ point' d r, LineSegment_ lineSegment point', Fractional r, Eq r) => (r -> Bool) -> point -> lineSegment -> Bool -onSegmentDWith r -> Bool -f (Getting (Point d r) point (Point d r) -> point -> Point d r +onSegmentDWith r -> Bool +f (Getting (Point d r) point (Point d r) -> point -> Point d r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view Getting (Point d r) point (Point d r) forall point (d :: Nat) r. Point_ point d r => Lens' point (Point d r) Lens' point (Point d r) -asPoint -> Point d r -q) lineSegment -seg = Bool -> (r -> Bool) -> Maybe r -> Bool +asPoint -> Point d r +q) lineSegment +seg = Bool -> (r -> Bool) -> Maybe r -> Bool forall b a. b -> (a -> b) -> Maybe a -> b maybe Bool False r -> Bool -f Maybe r -mLambda +f Maybe r +mLambda where - mLambda :: Maybe r -mLambda = (Point d r -q Point d r -> Point d r -> Vector d r + mLambda :: Maybe r +mLambda = (Point d r +q Point d r -> Point d r -> Vector d r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. (lineSegment -seglineSegment +seglineSegment -> Getting (Point d r) lineSegment (Point d r) -> Point d r forall s a. s -> Getting a s a -> a ^.(point' -> Const (Point d r) point') @@ -1074,7 +1074,7 @@ (Eq r, Fractional r, Additive_ vector d r) => vector -> vector -> Maybe r `scalarMultiple` ((lineSegment -seglineSegment -> Getting point' lineSegment point' -> point' +seglineSegment -> Getting point' lineSegment point' -> point' forall s a. s -> Getting a s a -> a ^.Getting point' lineSegment point' forall seg p. HasEnd seg p => Lens' seg p @@ -1084,16 +1084,16 @@ (Affine_ point d r, Num r) => point -> point -> Vector d r .-. (lineSegment -seglineSegment -> Getting point' lineSegment point' -> point' +seglineSegment -> Getting point' lineSegment point' -> point' forall s a. s -> Getting a s a -> a ^.Getting point' lineSegment point' forall seg p. HasStart seg p => Lens' seg p Lens' lineSegment point' start)) -onClosedSegmentD :: ( Point_ point d r, Point_ point' d r, Fractional r, Ord r - , ClosedLineSegment_ lineSegment point' - ) => point -> lineSegment -> Bool +onClosedSegmentD :: ( Point_ point d r, Point_ point' d r, Fractional r, Ord r + , ClosedLineSegment_ lineSegment point' + ) => point -> lineSegment -> Bool onClosedSegmentD :: forall point (d :: Nat) r point' lineSegment. (Point_ point d r, Point_ point' d r, Fractional r, Ord r, ClosedLineSegment_ lineSegment point') => @@ -1106,21 +1106,21 @@ onSegmentDWith ((r -> Bool) -> point -> lineSegment -> Bool) -> (r -> Bool) -> point -> lineSegment -> Bool forall a b. (a -> b) -> a -> b -$ \r -lambda -> r +$ \r +lambda -> r 0 r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -lambda Bool -> Bool -> Bool +lambda Bool -> Bool -> Bool && r -lambda r -> r -> Bool +lambda r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r 1 -onOpenSegmentD :: ( Point_ point d r, Point_ point' d r, Fractional r, Ord r - , OpenLineSegment_ lineSegment point' - ) => point -> lineSegment -> Bool +onOpenSegmentD :: ( Point_ point d r, Point_ point' d r, Fractional r, Ord r + , OpenLineSegment_ lineSegment point' + ) => point -> lineSegment -> Bool onOpenSegmentD :: forall point (d :: Nat) r point' lineSegment. (Point_ point d r, Point_ point' d r, Fractional r, Ord r, OpenLineSegment_ lineSegment point') => @@ -1133,40 +1133,40 @@ onSegmentDWith ((r -> Bool) -> point -> lineSegment -> Bool) -> (r -> Bool) -> point -> lineSegment -> Bool forall a b. (a -> b) -> a -> b -$ \r -lambda -> r +$ \r +lambda -> r 0 r -> r -> Bool forall a. Ord a => a -> a -> Bool < r -lambda Bool -> Bool -> Bool +lambda Bool -> Bool -> Bool && r -lambda r -> r -> Bool +lambda r -> r -> Bool forall a. Ord a => a -> a -> Bool < r 1 -onSegmentD :: ( Point_ point d r, Point_ point' d r, Fractional r, Ord r - ) => point -> LineSegment AnEndPoint point' -> Bool +onSegmentD :: ( Point_ point d r, Point_ point' d r, Fractional r, Ord r + ) => point -> LineSegment AnEndPoint point' -> Bool onSegmentD :: forall point (d :: Nat) r point'. (Point_ point d r, Point_ point' d r, Fractional r, Ord r) => point -> LineSegment AnEndPoint point' -> Bool -onSegmentD point -q LineSegment AnEndPoint point' -seg = (r -> Bool) -> point -> LineSegment AnEndPoint point' -> Bool +onSegmentD point +q LineSegment AnEndPoint point' +seg = (r -> Bool) -> point -> LineSegment AnEndPoint point' -> Bool forall point (d :: Nat) r point' lineSegment. (Point_ point d r, Point_ point' d r, LineSegment_ lineSegment point', Fractional r, Eq r) => (r -> Bool) -> point -> lineSegment -> Bool onSegmentDWith r -> Bool -f point -q LineSegment AnEndPoint point' -seg +f point +q LineSegment AnEndPoint point' +seg where - f :: r -> Bool -f r -lambda = EndPointType -> r -> r -> Bool -compare' (LineSegment AnEndPoint point' -segLineSegment AnEndPoint point' + f :: r -> Bool +f r +lambda = EndPointType -> r -> r -> Bool +compare' (LineSegment AnEndPoint point' +segLineSegment AnEndPoint point' -> Getting EndPointType (LineSegment AnEndPoint point') EndPointType -> EndPointType @@ -1195,11 +1195,11 @@ forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType endPointType) r 0 r -lambda +lambda Bool -> Bool -> Bool && EndPointType -> r -> r -> Bool -compare' (LineSegment AnEndPoint point' -segLineSegment AnEndPoint point' +compare' (LineSegment AnEndPoint point' +segLineSegment AnEndPoint point' -> Getting EndPointType (LineSegment AnEndPoint point') EndPointType -> EndPointType @@ -1227,10 +1227,10 @@ to AnEndPoint point' -> EndPointType forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType endPointType) r -lambda r +lambda r 1 - compare' :: EndPointType -> r -> r -> Bool -compare' = \case + compare' :: EndPointType -> r -> r -> Bool +compare' = \case EndPointType Open -> r -> r -> Bool forall a. Ord a => a -> a -> Bool @@ -1241,21 +1241,21 @@ (<=) -instance ( Point_ point d r - , IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - , IsTransformable point - ) => IsTransformable (LineSegment endPoint point) where - transformBy :: Transformation +instance ( Point_ point d r + , IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + , IsTransformable point + ) => IsTransformable (LineSegment endPoint point) where + transformBy :: Transformation (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) -> LineSegment endPoint point -> LineSegment endPoint point -transformBy Transformation +transformBy Transformation (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) -t LineSegment endPoint point -s = LineSegment endPoint point -sLineSegment endPoint point +t LineSegment endPoint point +s = LineSegment endPoint point +sLineSegment endPoint point -> (LineSegment endPoint point -> LineSegment endPoint point) -> LineSegment endPoint point forall a b. a -> (a -> b) -> b @@ -1279,7 +1279,7 @@ Transformation (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) -t +t LineSegment endPoint point -> (LineSegment endPoint point -> LineSegment endPoint point) -> LineSegment endPoint point @@ -1304,7 +1304,7 @@ Transformation (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) -t +t -- traverse1' f xs = @@ -1336,23 +1336,23 @@ -- Interval (AnEndPoint Closed 5) (AnEndPoint Closed 20) -- >>> spanIn yCoord (ClosedLineSegment (Point2 5 (10 :: Int)) (Point2 20 0)) -- Interval (AnEndPoint Closed 0) (AnEndPoint Closed 10) -spanIn :: ( Point_ point d r, Ord r - , IxValue (endPoint point) ~ point +spanIn :: ( Point_ point d r, Ord r + , IxValue (endPoint point) ~ point -- , EndPoint_ (endPoint r) - , EndPoint_ (endPoint point) + , EndPoint_ (endPoint point) ) - => Getter point r - -> LineSegment endPoint point - -> Interval AnEndPoint r + => Getter point r + -> LineSegment endPoint point + -> Interval AnEndPoint r spanIn :: forall point (d :: Nat) r (endPoint :: * -> *). (Point_ point d r, Ord r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => Getter point r -> LineSegment endPoint point -> Interval AnEndPoint r -spanIn Getter point r -coord'' LineSegment endPoint point -seg = case (Interval AnEndPoint r -iInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r +spanIn Getter point r +coord'' LineSegment endPoint point +seg = case (Interval AnEndPoint r +iInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Interval AnEndPoint r) r forall seg p. HasStart seg p => Lens' seg p @@ -1360,7 +1360,7 @@ start) r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (Interval AnEndPoint r -iInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r +iInterval AnEndPoint r -> Getting r (Interval AnEndPoint r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Interval AnEndPoint r) r forall seg p. HasEnd seg p => Lens' seg p @@ -1368,7 +1368,7 @@ end) of Ordering LT -> Interval AnEndPoint r -i +i Ordering EQ -> AnEndPoint r -> AnEndPoint r -> Interval AnEndPoint r forall {k} (endPoint :: k -> *) (r :: k). @@ -1376,7 +1376,7 @@ Interval (r -> AnEndPoint r forall r. r -> AnEndPoint r AnClosedE (AnEndPoint r -sAnEndPoint r -> Getting r (AnEndPoint r) r -> r +sAnEndPoint r -> Getting r (AnEndPoint r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (AnEndPoint r) r (IxValue (AnEndPoint r) -> Const r (IxValue (AnEndPoint r))) @@ -1392,7 +1392,7 @@ _endPoint)) (r -> AnEndPoint r forall r. r -> AnEndPoint r AnClosedE (AnEndPoint r -eAnEndPoint r -> Getting r (AnEndPoint r) r -> r +eAnEndPoint r -> Getting r (AnEndPoint r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (AnEndPoint r) r (IxValue (AnEndPoint r) -> Const r (IxValue (AnEndPoint r))) @@ -1411,20 +1411,20 @@ forall {k} (endPoint :: k -> *) (r :: k). endPoint r -> endPoint r -> Interval endPoint r Interval AnEndPoint r -e AnEndPoint r -s +e AnEndPoint r +s where - i :: Interval AnEndPoint r -i@(Interval AnEndPoint r -s AnEndPoint r -e) = Getting r point r -> point -> r + i :: Interval AnEndPoint r +i@(Interval AnEndPoint r +s AnEndPoint r +e) = Getting r point r -> point -> r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view Getting r point r Getter point r -coord'' (point -> r) -> Interval AnEndPoint point -> Interval AnEndPoint r +coord'' (point -> r) -> Interval AnEndPoint point -> Interval AnEndPoint r forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting (Interval AnEndPoint point) (LineSegment endPoint point) diff --git a/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Intersection.html b/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Intersection.html index 7c7708053..0104aca7a 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Intersection.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.LineSegment.Intersection.html @@ -25,38 +25,38 @@ -- * Line x LineSegment Intersection -- | Line x LineSegment intersection -data LineLineSegmentIntersection lineSegment = - Line_x_LineSegment_Point (Point 2 (NumType lineSegment)) - | Line_x_LineSegment_LineSegment lineSegment +data LineLineSegmentIntersection lineSegment = + Line_x_LineSegment_Point (Point 2 (NumType lineSegment)) + | Line_x_LineSegment_LineSegment lineSegment -deriving instance (Show (Point 2 (NumType lineSegment)), Show lineSegment - ) => Show (LineLineSegmentIntersection lineSegment) -deriving instance (Eq (Point 2 (NumType lineSegment)), Eq lineSegment - ) => Eq (LineLineSegmentIntersection lineSegment) +deriving instance (Show (Point 2 (NumType lineSegment)), Show lineSegment + ) => Show (LineLineSegmentIntersection lineSegment) +deriving instance (Eq (Point 2 (NumType lineSegment)), Eq lineSegment + ) => Eq (LineLineSegmentIntersection lineSegment) -type Intersection' lineSegment = Maybe (LineLineSegmentIntersection lineSegment) +type Intersection' lineSegment = Maybe (LineLineSegmentIntersection lineSegment) -type instance Intersection (LinePV 2 r) (LineSegment (EndPoint t) point) = - Intersection' (LineSegment (EndPoint t) point) +type instance Intersection (LinePV 2 r) (LineSegment (EndPoint t) point) = + Intersection' (LineSegment (EndPoint t) point) -type instance Intersection (LineEQ r) (LineSegment (EndPoint t) point) = - Intersection' (LineSegment (EndPoint t) point) +type instance Intersection (LineEQ r) (LineSegment (EndPoint t) point) = + Intersection' (LineSegment (EndPoint t) point) -type instance Intersection (LinePV 2 r) (LineSegment AnEndPoint point) = - Intersection' (LineSegment AnEndPoint point) +type instance Intersection (LinePV 2 r) (LineSegment AnEndPoint point) = + Intersection' (LineSegment AnEndPoint point) -type instance Intersection (LineEQ r) (LineSegment AnEndPoint point) = - Intersection' (LineSegment AnEndPoint point) +type instance Intersection (LineEQ r) (LineSegment AnEndPoint point) = + Intersection' (LineSegment AnEndPoint point) ---------------------------------------- -- * HasIntersectionWith -instance ( Point_ point 2 r, Num r, Ord r - , IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - ) => LinePV 2 r `HasIntersectionWith` LineSegment endPoint point where - intersects :: LinePV 2 r -> LineSegment endPoint point -> Bool -intersects = LinePV 2 r -> LineSegment endPoint point -> Bool +instance ( Point_ point 2 r, Num r, Ord r + , IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + ) => LinePV 2 r `HasIntersectionWith` LineSegment endPoint point where + intersects :: LinePV 2 r -> LineSegment endPoint point -> Bool +intersects = LinePV 2 r -> LineSegment endPoint point -> Bool forall line r point lineSegment. (HyperPlane_ line 2 r, Point_ point 2 r, Num r, Ord r, LineSegment_ lineSegment point) => @@ -64,14 +64,14 @@ intersectsImpl {-# INLINE intersects #-} -instance ( Point_ point 2 r, Num r, Ord r - , IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - ) => LineEQ r `HasIntersectionWith` LineSegment endPoint point where +instance ( Point_ point 2 r, Num r, Ord r + , IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + ) => LineEQ r `HasIntersectionWith` LineSegment endPoint point where -- -- >>> LineEQ 1 2 `intersects` ClosedLineSegment origin (Point2 1 10) -- True - intersects :: LineEQ r -> LineSegment endPoint point -> Bool + intersects :: LineEQ r -> LineSegment endPoint point -> Bool intersects = LineEQ r -> LineSegment endPoint point -> Bool forall line r point lineSegment. (HyperPlane_ line 2 r, Point_ point 2 r, Num r, Ord r, @@ -81,18 +81,18 @@ {-# INLINE intersects #-} -- | Test whether a line in R^2 intersects a closed linesegment -intersectsImpl :: ( HyperPlane_ line 2 r - , Point_ point 2 r - , Num r, Ord r - , LineSegment_ lineSegment point - ) => line -> lineSegment -> Bool -line -l intersectsImpl :: forall line r point lineSegment. +intersectsImpl :: ( HyperPlane_ line 2 r + , Point_ point 2 r + , Num r, Ord r + , LineSegment_ lineSegment point + ) => line -> lineSegment -> Bool +line +l intersectsImpl :: forall line r point lineSegment. (HyperPlane_ line 2 r, Point_ point 2 r, Num r, Ord r, LineSegment_ lineSegment point) => line -> lineSegment -> Bool -`intersectsImpl` lineSegment -s = case (point -> line -> Ordering +`intersectsImpl` lineSegment +s = case (point -> line -> Ordering forall point. (Point_ point 2 r, Ord r, Num r) => point -> line -> Ordering @@ -100,13 +100,13 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering onSideTest (lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p Lens' lineSegment point start) line -l, point -> line -> Ordering +l, point -> line -> Ordering forall point. (Point_ point 2 r, Ord r, Num r) => point -> line -> Ordering @@ -114,13 +114,13 @@ (HyperPlane_ hyperPlane d r, Point_ point d r, Ord r, Num r) => point -> hyperPlane -> Ordering onSideTest (lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p Lens' lineSegment point end) line -l) of +l) of (Ordering LT, Ordering LT) -> Bool @@ -128,7 +128,7 @@ (Ordering LT, Ordering EQ) -> lineSegment -slineSegment +slineSegment -> Getting EndPointType lineSegment EndPointType -> EndPointType forall s a. s -> Getting a s a -> a ^.(EndPointOf lineSegment @@ -168,7 +168,7 @@ (Ordering EQ, Ordering _) -> lineSegment -slineSegment +slineSegment -> Getting EndPointType lineSegment EndPointType -> EndPointType forall s a. s -> Getting a s a -> a ^.(StartPointOf lineSegment @@ -204,7 +204,7 @@ (Ordering GT, Ordering EQ) -> lineSegment -slineSegment +slineSegment -> Getting EndPointType lineSegment EndPointType -> EndPointType forall s a. s -> Getting a s a -> a ^.(EndPointOf lineSegment @@ -243,13 +243,13 @@ ---------------------------------------- -- * IsIntersectableWith -instance ( Point_ point 2 r - , Fractional r, Ord r - ) => LinePV 2 r `IsIntersectableWith` ClosedLineSegment point where - intersect :: LinePV 2 r +instance ( Point_ point 2 r + , Fractional r, Ord r + ) => LinePV 2 r `IsIntersectableWith` ClosedLineSegment point where + intersect :: LinePV 2 r -> ClosedLineSegment point -> Intersection (LinePV 2 r) (ClosedLineSegment point) -intersect = LinePV 2 r +intersect = LinePV 2 r -> ClosedLineSegment point -> Maybe (LineLineSegmentIntersection (ClosedLineSegment point)) LinePV 2 r @@ -267,10 +267,10 @@ intersectImpl {-# INLINE intersect #-} -instance ( Point_ point 2 r - , Fractional r, Ord r - ) => LineEQ r `IsIntersectableWith` ClosedLineSegment point where - intersect :: LineEQ r +instance ( Point_ point 2 r + , Fractional r, Ord r + ) => LineEQ r `IsIntersectableWith` ClosedLineSegment point where + intersect :: LineEQ r -> ClosedLineSegment point -> Intersection (LineEQ r) (ClosedLineSegment point) intersect = LineEQ r @@ -291,10 +291,10 @@ intersectImpl {-# INLINE intersect #-} -instance ( Point_ point 2 r - , Fractional r, Ord r - ) => LinePV 2 r `IsIntersectableWith` LineSegment AnEndPoint point where - intersect :: LinePV 2 r +instance ( Point_ point 2 r + , Fractional r, Ord r + ) => LinePV 2 r `IsIntersectableWith` LineSegment AnEndPoint point where + intersect :: LinePV 2 r -> LineSegment AnEndPoint point -> Intersection (LinePV 2 r) (LineSegment AnEndPoint point) intersect = LinePV 2 r @@ -316,10 +316,10 @@ intersectImpl {-# INLINE intersect #-} -instance ( Point_ point 2 r - , Fractional r, Ord r - ) => LineEQ r `IsIntersectableWith` LineSegment AnEndPoint point where - intersect :: LineEQ r +instance ( Point_ point 2 r + , Fractional r, Ord r + ) => LineEQ r `IsIntersectableWith` LineSegment AnEndPoint point where + intersect :: LineEQ r -> LineSegment AnEndPoint point -> Intersection (LineEQ r) (LineSegment AnEndPoint point) intersect = LineEQ r @@ -341,10 +341,10 @@ intersectImpl {-# INLINE intersect #-} -instance ( Point_ point 2 r - , Fractional r, Ord r - ) => LinePV 2 r `IsIntersectableWith` OpenLineSegment point where - intersect :: LinePV 2 r +instance ( Point_ point 2 r + , Fractional r, Ord r + ) => LinePV 2 r `IsIntersectableWith` OpenLineSegment point where + intersect :: LinePV 2 r -> OpenLineSegment point -> Intersection (LinePV 2 r) (OpenLineSegment point) intersect = LinePV 2 r @@ -365,10 +365,10 @@ intersectImpl {-# INLINE intersect #-} -instance ( Point_ point 2 r - , Fractional r, Ord r - ) => LineEQ r `IsIntersectableWith` OpenLineSegment point where - intersect :: LineEQ r +instance ( Point_ point 2 r + , Fractional r, Ord r + ) => LineEQ r `IsIntersectableWith` OpenLineSegment point where + intersect :: LineEQ r -> OpenLineSegment point -> Intersection (LineEQ r) (OpenLineSegment point) intersect = LineEQ r @@ -394,19 +394,19 @@ -- -- the type is is sufficiently general that for various line or closed line segment types -- we can appeal to it. -intersectImpl :: ( HyperPlane_ line 2 r - , Point_ point 2 r - , Fractional r, Ord r - , LineSegment_ lineSegment point - , HasSupportingLine lineSegment - , HasOnSegment lineSegment 2 - , line `IsIntersectableWith` LinePV 2 r - , line `HasIntersectionWith` lineSegment - , Intersection line (LinePV 2 r) ~ Maybe (LineLineIntersection line) - ) => line -> lineSegment - -> Maybe (LineLineSegmentIntersection lineSegment) -line -l intersectImpl :: forall line r point lineSegment. +intersectImpl :: ( HyperPlane_ line 2 r + , Point_ point 2 r + , Fractional r, Ord r + , LineSegment_ lineSegment point + , HasSupportingLine lineSegment + , HasOnSegment lineSegment 2 + , line `IsIntersectableWith` LinePV 2 r + , line `HasIntersectionWith` lineSegment + , Intersection line (LinePV 2 r) ~ Maybe (LineLineIntersection line) + ) => line -> lineSegment + -> Maybe (LineLineSegmentIntersection lineSegment) +line +l intersectImpl :: forall line r point lineSegment. (HyperPlane_ line 2 r, Point_ point 2 r, Fractional r, Ord r, LineSegment_ lineSegment point, HasSupportingLine lineSegment, HasOnSegment lineSegment 2, IsIntersectableWith line (LinePV 2 r), @@ -415,25 +415,25 @@ ~ Maybe (LineLineIntersection line)) => line -> lineSegment -> Maybe (LineLineSegmentIntersection lineSegment) -`intersectImpl` lineSegment -s = line -l line -> LinePV 2 r -> Intersection line (LinePV 2 r) +`intersectImpl` lineSegment +s = line +l line -> LinePV 2 r -> Intersection line (LinePV 2 r) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` lineSegment -> LinePV (Dimension lineSegment) (NumType lineSegment) forall t. HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine lineSegment -s Maybe (LineLineIntersectionG r line) +s Maybe (LineLineIntersectionG r line) -> (LineLineIntersectionG r line -> Maybe (LineLineSegmentIntersection lineSegment)) -> Maybe (LineLineSegmentIntersection lineSegment) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Line_x_Line_Point Point 2 r -p | Point 2 r -p Point 2 r -> lineSegment -> Bool + Line_x_Line_Point Point 2 r +p | Point 2 r +p Point 2 r -> lineSegment -> Bool forall lineSegment (d :: Nat) r point. (HasOnSegment lineSegment d, Ord r, Point_ point d r, r ~ NumType lineSegment, d ~ Dimension lineSegment) => @@ -443,7 +443,7 @@ 2 ~ Dimension lineSegment) => point -> lineSegment -> Bool `onSegment` lineSegment -s -> LineLineSegmentIntersection lineSegment +s -> LineLineSegmentIntersection lineSegment -> Maybe (LineLineSegmentIntersection lineSegment) forall a. a -> Maybe a Just (LineLineSegmentIntersection lineSegment @@ -458,7 +458,7 @@ -> LineLineSegmentIntersection lineSegment Line_x_LineSegment_Point Point 2 r Point 2 (NumType lineSegment) -p +p | Bool otherwise -> Maybe (LineLineSegmentIntersection lineSegment) forall a. Maybe a @@ -476,7 +476,7 @@ forall lineSegment. lineSegment -> LineLineSegmentIntersection lineSegment Line_x_LineSegment_LineSegment lineSegment -s +s {-# INLINE intersectImpl #-} @@ -484,68 +484,68 @@ -- * LineSegment x LineSegment -- | LineSegment x LineSegment intersection -data LineSegmentLineSegmentIntersection lineSegment = - LineSegment_x_LineSegment_Point (Point 2 (NumType lineSegment)) - | LineSegment_x_LineSegment_LineSegment lineSegment +data LineSegmentLineSegmentIntersection lineSegment = + LineSegment_x_LineSegment_Point (Point 2 (NumType lineSegment)) + | LineSegment_x_LineSegment_LineSegment lineSegment -deriving instance (Show (Point 2 (NumType lineSegment)), Show lineSegment - ) => Show (LineSegmentLineSegmentIntersection lineSegment) -deriving instance (Eq (Point 2 (NumType lineSegment)), Eq lineSegment - ) => Eq (LineSegmentLineSegmentIntersection lineSegment) +deriving instance (Show (Point 2 (NumType lineSegment)), Show lineSegment + ) => Show (LineSegmentLineSegmentIntersection lineSegment) +deriving instance (Eq (Point 2 (NumType lineSegment)), Eq lineSegment + ) => Eq (LineSegmentLineSegmentIntersection lineSegment) -type instance Intersection (LineSegment (EndPoint t) point) - (LineSegment (EndPoint t) point) = - Maybe (LineSegmentLineSegmentIntersection (LineSegment (EndPoint t) point)) +type instance Intersection (LineSegment (EndPoint t) point) + (LineSegment (EndPoint t) point) = + Maybe (LineSegmentLineSegmentIntersection (LineSegment (EndPoint t) point)) -type instance Intersection (LineSegment AnEndPoint point) - (LineSegment AnEndPoint point) = - Maybe (LineSegmentLineSegmentIntersection (LineSegment AnEndPoint point)) +type instance Intersection (LineSegment AnEndPoint point) + (LineSegment AnEndPoint point) = + Maybe (LineSegmentLineSegmentIntersection (LineSegment AnEndPoint point)) -- | fmap' for lineSegmentIntersections -fmap' :: (NumType lineSegment ~ NumType lineSegment') - => (lineSegment -> lineSegment') - -> LineSegmentLineSegmentIntersection lineSegment - -> LineSegmentLineSegmentIntersection lineSegment' +fmap' :: (NumType lineSegment ~ NumType lineSegment') + => (lineSegment -> lineSegment') + -> LineSegmentLineSegmentIntersection lineSegment + -> LineSegmentLineSegmentIntersection lineSegment' fmap' :: forall lineSegment lineSegment'. (NumType lineSegment ~ NumType lineSegment') => (lineSegment -> lineSegment') -> LineSegmentLineSegmentIntersection lineSegment -> LineSegmentLineSegmentIntersection lineSegment' -fmap' lineSegment -> lineSegment' -f = \case - LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) -p -> Point 2 (NumType lineSegment') +fmap' lineSegment -> lineSegment' +f = \case + LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) +p -> Point 2 (NumType lineSegment') -> LineSegmentLineSegmentIntersection lineSegment' forall lineSegment. Point 2 (NumType lineSegment) -> LineSegmentLineSegmentIntersection lineSegment LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) Point 2 (NumType lineSegment') -p - LineSegment_x_LineSegment_LineSegment lineSegment -s -> lineSegment' -> LineSegmentLineSegmentIntersection lineSegment' +p + LineSegment_x_LineSegment_LineSegment lineSegment +s -> lineSegment' -> LineSegmentLineSegmentIntersection lineSegment' forall lineSegment. lineSegment -> LineSegmentLineSegmentIntersection lineSegment LineSegment_x_LineSegment_LineSegment (lineSegment -> lineSegment' -f lineSegment -s) +f lineSegment +s) ---------------------------------------- -- * HasIntersectionWith -- | Test if the spans (i.e. the projections onto the x-axis and on the yaxis) of the -- segments intersect -spansIntersect :: forall endPoint endPoint' point point' r. - ( Point_ point 2 r, Point_ point' 2 r - , Ord r, Num r, Functor endPoint, Functor endPoint' - , IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - , IxValue (endPoint' point') ~ point' - , EndPoint_ (endPoint' point') - , HasIntersectionWith (Interval endPoint r) (Interval endPoint' r) +spansIntersect :: forall endPoint endPoint' point point' r. + ( Point_ point 2 r, Point_ point' 2 r + , Ord r, Num r, Functor endPoint, Functor endPoint' + , IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + , IxValue (endPoint' point') ~ point' + , EndPoint_ (endPoint' point') + , HasIntersectionWith (Interval endPoint r) (Interval endPoint' r) ) - => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool + => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect :: forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. (Point_ point 2 r, Point_ point' 2 r, Ord r, Num r, Functor endPoint, Functor endPoint', @@ -554,10 +554,10 @@ HasIntersectionWith (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool -spansIntersect LineSegment endPoint point -s LineSegment endPoint' point' -s' = (forall aPoint. Point_ aPoint 2 r => Getter aPoint r) -> Bool -f (r -> f r) -> aPoint -> f aPoint +spansIntersect LineSegment endPoint point +s LineSegment endPoint' point' +s' = (forall aPoint. Point_ aPoint 2 r => Getter aPoint r) -> Bool +f (r -> f r) -> aPoint -> f aPoint forall (d :: Nat) point r. (1 <= d, Point_ point d r) => IndexedLens' Int point r @@ -565,7 +565,7 @@ IndexedLens' Int aPoint r xCoord Bool -> Bool -> Bool && (forall aPoint. Point_ aPoint 2 r => Getter aPoint r) -> Bool -f (r -> f r) -> aPoint -> f aPoint +f (r -> f r) -> aPoint -> f aPoint forall (d :: Nat) point r. (2 <= d, Point_ point d r) => IndexedLens' Int point r @@ -573,10 +573,10 @@ IndexedLens' Int aPoint r yCoord where - f :: (forall aPoint. Point_ aPoint 2 r => Getter aPoint r) -> Bool - f :: (forall aPoint. Point_ aPoint 2 r => Getter aPoint r) -> Bool -f forall aPoint. Point_ aPoint 2 r => Getter aPoint r -coord'' = Getter point r + f :: (forall aPoint. Point_ aPoint 2 r => Getter aPoint r) -> Bool + f :: (forall aPoint. Point_ aPoint 2 r => Getter aPoint r) -> Bool +f forall aPoint. Point_ aPoint 2 r => Getter aPoint r +coord'' = Getter point r -> LineSegment endPoint point -> Interval AnEndPoint r forall point (d :: Nat) r (endPoint :: * -> *). (Point_ point d r, Ord r, IxValue (endPoint point) ~ point, @@ -586,8 +586,8 @@ spanIn (r -> f r) -> point -> f point forall aPoint. Point_ aPoint 2 r => Getter aPoint r Getter point r -coord'' LineSegment endPoint point -s Interval AnEndPoint r -> Interval AnEndPoint r -> Bool +coord'' LineSegment endPoint point +s Interval AnEndPoint r -> Interval AnEndPoint r -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Getter point' r -> LineSegment endPoint' point' -> Interval AnEndPoint r @@ -599,20 +599,20 @@ spanIn (r -> f r) -> point' -> f point' forall aPoint. Point_ aPoint 2 r => Getter aPoint r Getter point' r -coord'' LineSegment endPoint' point' -s' +coord'' LineSegment endPoint' point' +s' -instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r - , Functor endPoint - , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) - , IxValue (endPoint point') ~ point', EndPoint_ (endPoint point') - , IxValue (endPoint r) ~ r, EndPoint_ (endPoint r) - , HasIntersectionWith (Interval endPoint r) (Interval endPoint r) +instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r + , Functor endPoint + , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) + , IxValue (endPoint point') ~ point', EndPoint_ (endPoint point') + , IxValue (endPoint r) ~ r, EndPoint_ (endPoint r) + , HasIntersectionWith (Interval endPoint r) (Interval endPoint r) ) => - LineSegment endPoint point `HasIntersectionWith` LineSegment endPoint point' where - LineSegment endPoint point -s `intersects `LineSegment endPoint point' -s' = LineSegment endPoint point + LineSegment endPoint point `HasIntersectionWith` LineSegment endPoint point' where + LineSegment endPoint point +s `intersects `LineSegment endPoint point' +s' = LineSegment endPoint point -> LinePV (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) @@ -620,10 +620,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment endPoint point -s LinePV 2 r -> LineSegment endPoint point' -> Bool +s LinePV 2 r -> LineSegment endPoint point' -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` LineSegment endPoint point' -s' Bool -> Bool -> Bool +s' Bool -> Bool -> Bool && LineSegment endPoint point' -> LinePV (Dimension (LineSegment endPoint point')) @@ -632,10 +632,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment endPoint point' -s' LinePV 2 r -> LineSegment endPoint point -> Bool +s' LinePV 2 r -> LineSegment endPoint point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` LineSegment endPoint point -s +s Bool -> Bool -> Bool && LineSegment endPoint point -> LineSegment endPoint point' -> Bool forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. @@ -647,16 +647,16 @@ (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect LineSegment endPoint point -s LineSegment endPoint point' -s' +s LineSegment endPoint point' +s' {-# INLINE intersects #-} -instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r +instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r ) => - LineSegment AnEndPoint point `HasIntersectionWith` ClosedLineSegment point' where - LineSegment AnEndPoint point -s `intersects `ClosedLineSegment point' -s' = LineSegment AnEndPoint point + LineSegment AnEndPoint point `HasIntersectionWith` ClosedLineSegment point' where + LineSegment AnEndPoint point +s `intersects `ClosedLineSegment point' +s' = LineSegment AnEndPoint point -> LinePV (Dimension (LineSegment AnEndPoint point)) (NumType (LineSegment AnEndPoint point)) @@ -664,10 +664,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment AnEndPoint point -s LinePV 2 r -> ClosedLineSegment point' -> Bool +s LinePV 2 r -> ClosedLineSegment point' -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment point' -s' Bool -> Bool -> Bool +s' Bool -> Bool -> Bool && ClosedLineSegment point' -> LinePV (Dimension (ClosedLineSegment point')) @@ -676,10 +676,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine ClosedLineSegment point' -s' LinePV 2 r -> LineSegment AnEndPoint point -> Bool +s' LinePV 2 r -> LineSegment AnEndPoint point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` LineSegment AnEndPoint point -s +s Bool -> Bool -> Bool && LineSegment AnEndPoint point -> ClosedLineSegment point' -> Bool forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. @@ -691,16 +691,16 @@ (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect LineSegment AnEndPoint point -s ClosedLineSegment point' -s' +s ClosedLineSegment point' +s' {-# INLINE intersects #-} -instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r +instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r ) => - LineSegment AnEndPoint point `HasIntersectionWith` OpenLineSegment point' where - LineSegment AnEndPoint point -s `intersects `OpenLineSegment point' -s' = LineSegment AnEndPoint point + LineSegment AnEndPoint point `HasIntersectionWith` OpenLineSegment point' where + LineSegment AnEndPoint point +s `intersects `OpenLineSegment point' +s' = LineSegment AnEndPoint point -> LinePV (Dimension (LineSegment AnEndPoint point)) (NumType (LineSegment AnEndPoint point)) @@ -708,10 +708,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment AnEndPoint point -s LinePV 2 r -> OpenLineSegment point' -> Bool +s LinePV 2 r -> OpenLineSegment point' -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` OpenLineSegment point' -s' Bool -> Bool -> Bool +s' Bool -> Bool -> Bool && OpenLineSegment point' -> LinePV (Dimension (OpenLineSegment point')) @@ -720,10 +720,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine OpenLineSegment point' -s' LinePV 2 r -> LineSegment AnEndPoint point -> Bool +s' LinePV 2 r -> LineSegment AnEndPoint point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` LineSegment AnEndPoint point -s +s Bool -> Bool -> Bool && LineSegment AnEndPoint point -> OpenLineSegment point' -> Bool forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. @@ -735,16 +735,16 @@ (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect LineSegment AnEndPoint point -s OpenLineSegment point' -s' +s OpenLineSegment point' +s' {-# INLINE intersects #-} -instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r +instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r ) => - ClosedLineSegment point `HasIntersectionWith` LineSegment AnEndPoint point' where - ClosedLineSegment point -s `intersects `LineSegment AnEndPoint point' -s' = ClosedLineSegment point + ClosedLineSegment point `HasIntersectionWith` LineSegment AnEndPoint point' where + ClosedLineSegment point +s `intersects `LineSegment AnEndPoint point' +s' = ClosedLineSegment point -> LinePV (Dimension (ClosedLineSegment point)) (NumType (ClosedLineSegment point)) @@ -752,10 +752,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine ClosedLineSegment point -s LinePV 2 r -> LineSegment AnEndPoint point' -> Bool +s LinePV 2 r -> LineSegment AnEndPoint point' -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` LineSegment AnEndPoint point' -s' Bool -> Bool -> Bool +s' Bool -> Bool -> Bool && LineSegment AnEndPoint point' -> LinePV (Dimension (LineSegment AnEndPoint point')) @@ -764,10 +764,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment AnEndPoint point' -s' LinePV 2 r -> ClosedLineSegment point -> Bool +s' LinePV 2 r -> ClosedLineSegment point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment point -s +s Bool -> Bool -> Bool && ClosedLineSegment point -> LineSegment AnEndPoint point' -> Bool forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. @@ -779,16 +779,16 @@ (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect ClosedLineSegment point -s LineSegment AnEndPoint point' -s' +s LineSegment AnEndPoint point' +s' {-# INLINE intersects #-} -instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r +instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r ) => - ClosedLineSegment point `HasIntersectionWith` OpenLineSegment point' where - ClosedLineSegment point -s `intersects `OpenLineSegment point' -s' = ClosedLineSegment point + ClosedLineSegment point `HasIntersectionWith` OpenLineSegment point' where + ClosedLineSegment point +s `intersects `OpenLineSegment point' +s' = ClosedLineSegment point -> LinePV (Dimension (ClosedLineSegment point)) (NumType (ClosedLineSegment point)) @@ -796,10 +796,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine ClosedLineSegment point -s LinePV 2 r -> OpenLineSegment point' -> Bool +s LinePV 2 r -> OpenLineSegment point' -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` OpenLineSegment point' -s' Bool -> Bool -> Bool +s' Bool -> Bool -> Bool && OpenLineSegment point' -> LinePV (Dimension (OpenLineSegment point')) @@ -808,10 +808,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine OpenLineSegment point' -s' LinePV 2 r -> ClosedLineSegment point -> Bool +s' LinePV 2 r -> ClosedLineSegment point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment point -s +s Bool -> Bool -> Bool && ClosedLineSegment point -> OpenLineSegment point' -> Bool forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. @@ -823,16 +823,16 @@ (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect ClosedLineSegment point -s OpenLineSegment point' -s' +s OpenLineSegment point' +s' {-# INLINE intersects #-} -instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r +instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r ) => - OpenLineSegment point `HasIntersectionWith` LineSegment AnEndPoint point' where - OpenLineSegment point -s `intersects `LineSegment AnEndPoint point' -s' = OpenLineSegment point + OpenLineSegment point `HasIntersectionWith` LineSegment AnEndPoint point' where + OpenLineSegment point +s `intersects `LineSegment AnEndPoint point' +s' = OpenLineSegment point -> LinePV (Dimension (OpenLineSegment point)) (NumType (OpenLineSegment point)) @@ -840,10 +840,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine OpenLineSegment point -s LinePV 2 r -> LineSegment AnEndPoint point' -> Bool +s LinePV 2 r -> LineSegment AnEndPoint point' -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` LineSegment AnEndPoint point' -s' Bool -> Bool -> Bool +s' Bool -> Bool -> Bool && LineSegment AnEndPoint point' -> LinePV (Dimension (LineSegment AnEndPoint point')) @@ -852,10 +852,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment AnEndPoint point' -s' LinePV 2 r -> OpenLineSegment point -> Bool +s' LinePV 2 r -> OpenLineSegment point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` OpenLineSegment point -s +s Bool -> Bool -> Bool && OpenLineSegment point -> LineSegment AnEndPoint point' -> Bool forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. @@ -867,16 +867,16 @@ (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect OpenLineSegment point -s LineSegment AnEndPoint point' -s' +s LineSegment AnEndPoint point' +s' {-# INLINE intersects #-} -instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r +instance ( Point_ point 2 r, Point_ point' 2 r, Num r, Ord r ) => - OpenLineSegment point `HasIntersectionWith` ClosedLineSegment point' where - OpenLineSegment point -s `intersects `ClosedLineSegment point' -s' = OpenLineSegment point + OpenLineSegment point `HasIntersectionWith` ClosedLineSegment point' where + OpenLineSegment point +s `intersects `ClosedLineSegment point' +s' = OpenLineSegment point -> LinePV (Dimension (OpenLineSegment point)) (NumType (OpenLineSegment point)) @@ -884,10 +884,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine OpenLineSegment point -s LinePV 2 r -> ClosedLineSegment point' -> Bool +s LinePV 2 r -> ClosedLineSegment point' -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment point' -s' Bool -> Bool -> Bool +s' Bool -> Bool -> Bool && ClosedLineSegment point' -> LinePV (Dimension (ClosedLineSegment point')) @@ -896,10 +896,10 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine ClosedLineSegment point' -s' LinePV 2 r -> OpenLineSegment point -> Bool +s' LinePV 2 r -> OpenLineSegment point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` OpenLineSegment point -s +s Bool -> Bool -> Bool && OpenLineSegment point -> ClosedLineSegment point' -> Bool forall (endPoint :: * -> *) (endPoint' :: * -> *) point point' r. @@ -911,8 +911,8 @@ (Interval endPoint r) (Interval endPoint' r)) => LineSegment endPoint point -> LineSegment endPoint' point' -> Bool spansIntersect OpenLineSegment point -s ClosedLineSegment point' -s' +s ClosedLineSegment point' +s' {-# INLINE intersects #-} ---------------------------------------- @@ -930,32 +930,32 @@ -- todo = error "LineSegment_x_LineSegment_LineSegment, not yet implemented" -- {-# INLINE intersect #-} -instance ( Point_ point 2 r, Num r, Ord r - , Functor endPoint - , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) - , IxValue (endPoint r) ~ r, EndPoint_ (endPoint r) - , HasIntersectionWith (Interval endPoint r) (Interval endPoint r) - , IxValue (endPoint point) ~ point - , IxValue (endPoint (r :+ endPoint point)) ~ (r :+ endPoint point) - , EndPoint_ (endPoint point) - , IsEndPoint (endPoint point) (endPoint (r :+ endPoint point)) - , IsIntersectableWith (LinePV 2 r) (LineSegment endPoint point) - , Intersection (LinePV 2 r) (LineSegment endPoint point) - ~ Maybe (LineLineSegmentIntersection (LineSegment endPoint point)) - , HasOnSegment (LineSegment endPoint point) 2 - , IsIntersectableWith (Interval endPoint (r :+ endPoint point)) - (Interval endPoint (r :+ endPoint point)) - , Intersection (LineSegment endPoint point) (LineSegment endPoint point) - ~ Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point)) - , EndPoint_ (endPoint (r :+ endPoint point)) - ) => LineSegment endPoint point `IsIntersectableWith` LineSegment endPoint point where - LineSegment endPoint point -s intersect :: LineSegment endPoint point +instance ( Point_ point 2 r, Num r, Ord r + , Functor endPoint + , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) + , IxValue (endPoint r) ~ r, EndPoint_ (endPoint r) + , HasIntersectionWith (Interval endPoint r) (Interval endPoint r) + , IxValue (endPoint point) ~ point + , IxValue (endPoint (r :+ endPoint point)) ~ (r :+ endPoint point) + , EndPoint_ (endPoint point) + , IsEndPoint (endPoint point) (endPoint (r :+ endPoint point)) + , IsIntersectableWith (LinePV 2 r) (LineSegment endPoint point) + , Intersection (LinePV 2 r) (LineSegment endPoint point) + ~ Maybe (LineLineSegmentIntersection (LineSegment endPoint point)) + , HasOnSegment (LineSegment endPoint point) 2 + , IsIntersectableWith (Interval endPoint (r :+ endPoint point)) + (Interval endPoint (r :+ endPoint point)) + , Intersection (LineSegment endPoint point) (LineSegment endPoint point) + ~ Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point)) + , EndPoint_ (endPoint (r :+ endPoint point)) + ) => LineSegment endPoint point `IsIntersectableWith` LineSegment endPoint point where + LineSegment endPoint point +s intersect :: LineSegment endPoint point -> LineSegment endPoint point -> Intersection (LineSegment endPoint point) (LineSegment endPoint point) -`intersect` LineSegment endPoint point -s' = LineSegment endPoint point +`intersect` LineSegment endPoint point +s' = LineSegment endPoint point -> LinePV (Dimension (LineSegment endPoint point)) (NumType (LineSegment endPoint point)) @@ -963,12 +963,12 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment endPoint point -s LinePV 2 r +s LinePV 2 r -> LineSegment endPoint point -> Intersection (LinePV 2 r) (LineSegment endPoint point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` LineSegment endPoint point -s' Maybe (LineLineSegmentIntersection (LineSegment endPoint point)) +s' Maybe (LineLineSegmentIntersection (LineSegment endPoint point)) -> (LineLineSegmentIntersection (LineSegment endPoint point) -> Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point))) @@ -977,11 +977,11 @@ forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Line_x_LineSegment_Point Point 2 (NumType (LineSegment endPoint point)) -p + Line_x_LineSegment_Point Point 2 (NumType (LineSegment endPoint point)) +p | Point 2 r Point 2 (NumType (LineSegment endPoint point)) -p Point 2 r -> LineSegment endPoint point -> Bool +p Point 2 r -> LineSegment endPoint point -> Bool forall lineSegment (d :: Nat) r point. (HasOnSegment lineSegment d, Ord r, Point_ point d r, r ~ NumType lineSegment, d ~ Dimension lineSegment) => @@ -991,7 +991,7 @@ 2 ~ Dimension (LineSegment endPoint point)) => point -> LineSegment endPoint point -> Bool `onSegment` LineSegment endPoint point -s -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) +s -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) -> Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point)) forall a. a -> Maybe a @@ -1008,7 +1008,7 @@ Point 2 (NumType lineSegment) -> LineSegmentLineSegmentIntersection lineSegment LineSegment_x_LineSegment_Point Point 2 (NumType (LineSegment endPoint point)) -p +p | Bool otherwise -> Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point)) @@ -1025,7 +1025,7 @@ LineSegment endPoint point -> Interval endPoint (r :+ endPoint point) spanIn' LineSegment endPoint point -s Interval endPoint (r :+ endPoint point) +s Interval endPoint (r :+ endPoint point) -> Interval endPoint (r :+ endPoint point) -> Intersection (Interval endPoint (r :+ endPoint point)) @@ -1041,7 +1041,7 @@ LineSegment endPoint point -> Interval endPoint (r :+ endPoint point) spanIn' LineSegment endPoint point -s' Maybe +s' Maybe (Interval_x_IntervalIntersection (r :+ endPoint point) (Interval endPoint (r :+ endPoint point))) -> (Interval_x_IntervalIntersection @@ -1051,8 +1051,8 @@ (LineSegmentLineSegmentIntersection (LineSegment endPoint point)) forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b <&> \case - Interval_x_Interval_Point r :+ endPoint point -xy -> Point 2 (NumType (LineSegment endPoint point)) + Interval_x_Interval_Point r :+ endPoint point +xy -> Point 2 (NumType (LineSegment endPoint point)) -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) forall lineSegment. Point 2 (NumType lineSegment) @@ -1064,7 +1064,7 @@ forall a b. (a -> b) -> a -> b $ r :+ endPoint point -xy(r :+ endPoint point) +xy(r :+ endPoint point) -> Getting (Point 2 r) (r :+ endPoint point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a @@ -1109,31 +1109,31 @@ Lens' point (Point d r) Lens' (IxValue (endPoint point)) (Point 2 r) asPoint - Interval_x_Interval_Contained Interval endPoint (r :+ endPoint point) -i -> Interval endPoint (r :+ endPoint point) + Interval_x_Interval_Contained Interval endPoint (r :+ endPoint point) +i -> Interval endPoint (r :+ endPoint point) -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) forall {s} {core} {endPoint :: * -> *} {point} {core}. (HasStart s (core :+ endPoint point), HasEnd s (core :+ endPoint point)) => s -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) -mkIntersect Interval endPoint (r :+ endPoint point) -i - Interval_x_Interval_Partial Interval endPoint (r :+ endPoint point) -i -> Interval endPoint (r :+ endPoint point) +mkIntersect Interval endPoint (r :+ endPoint point) +i + Interval_x_Interval_Partial Interval endPoint (r :+ endPoint point) +i -> Interval endPoint (r :+ endPoint point) -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) forall {s} {core} {endPoint :: * -> *} {point} {core}. (HasStart s (core :+ endPoint point), HasEnd s (core :+ endPoint point)) => s -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) -mkIntersect Interval endPoint (r :+ endPoint point) -i +mkIntersect Interval endPoint (r :+ endPoint point) +i where - mkIntersect :: s + mkIntersect :: s -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) -mkIntersect s -i = +mkIntersect s +i = LineSegment endPoint point -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) forall lineSegment. @@ -1147,7 +1147,7 @@ forall (endPoint :: * -> *) point. endPoint point -> endPoint point -> LineSegment endPoint point LineSegment (s -is -> Getting (endPoint point) s (endPoint point) -> endPoint point +is -> Getting (endPoint point) s (endPoint point) -> endPoint point forall s a. s -> Getting a s a -> a ^.((core :+ endPoint point) -> Const (endPoint point) (core :+ endPoint point)) @@ -1169,7 +1169,7 @@ Functor f => (extra -> f extra') -> (core :+ extra) -> f (core :+ extra') extra) (s -is -> Getting (endPoint point) s (endPoint point) -> endPoint point +is -> Getting (endPoint point) s (endPoint point) -> endPoint point forall s a. s -> Getting a s a -> a ^.((core :+ endPoint point) -> Const (endPoint point) (core :+ endPoint point)) @@ -1195,12 +1195,12 @@ -- | Given a line segment, compute the span of the line segment. In principle we compute -- the span in terms of the x-coordinate. Except wehn the segment is vertical, then we return -- the span in the y-cooridnate instead. -spanIn' :: ( Point_ point 2 r, Ord r - , IxValue (endPoint point) ~ point - , IxValue (endPoint (r :+ endPoint point)) ~ (r :+ endPoint point) - , EndPoint_ (endPoint point) - , IsEndPoint (endPoint point) (endPoint (r :+ endPoint point)) - ) => LineSegment endPoint point -> Interval endPoint (r :+ endPoint point) +spanIn' :: ( Point_ point 2 r, Ord r + , IxValue (endPoint point) ~ point + , IxValue (endPoint (r :+ endPoint point)) ~ (r :+ endPoint point) + , EndPoint_ (endPoint point) + , IsEndPoint (endPoint point) (endPoint (r :+ endPoint point)) + ) => LineSegment endPoint point -> Interval endPoint (r :+ endPoint point) spanIn' :: forall point r (endPoint :: * -> *). (Point_ point 2 r, Ord r, IxValue (endPoint point) ~ point, IxValue (endPoint (r :+ endPoint point)) ~ (r :+ endPoint point), @@ -1208,11 +1208,11 @@ IsEndPoint (endPoint point) (endPoint (r :+ endPoint point))) => LineSegment endPoint point -> Interval endPoint (r :+ endPoint point) -spanIn' seg :: LineSegment endPoint point -seg@(LineSegment endPoint point -s endPoint point -t) = case (LineSegment endPoint point -segLineSegment endPoint point +spanIn' seg :: LineSegment endPoint point +seg@(LineSegment endPoint point +s endPoint point +t) = case (LineSegment endPoint point +segLineSegment endPoint point -> Getting r (LineSegment endPoint point) r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) @@ -1234,7 +1234,7 @@ xCoord) r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting r (LineSegment endPoint point) r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) @@ -1272,8 +1272,8 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -xLabel endPoint point -s) (endPoint point -> endPoint (r :+ endPoint point) +xLabel endPoint point +s) (endPoint point -> endPoint (r :+ endPoint point) forall {b} {extra}. (IxValue b ~ (NumType (IxValue extra) :+ extra), Assert @@ -1285,11 +1285,11 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -xLabel endPoint point -t) +xLabel endPoint point +t) Ordering EQ | LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting r (LineSegment endPoint point) r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) @@ -1311,7 +1311,7 @@ yCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting r (LineSegment endPoint point) r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) @@ -1347,8 +1347,8 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -yLabel endPoint point -s) (endPoint point -> endPoint (r :+ endPoint point) +yLabel endPoint point +s) (endPoint point -> endPoint (r :+ endPoint point) forall {b} {extra}. (IxValue b ~ (NumType (IxValue extra) :+ extra), Assert @@ -1360,8 +1360,8 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -yLabel endPoint point -t) +yLabel endPoint point +t) | Bool otherwise -> endPoint (r :+ endPoint point) -> endPoint (r :+ endPoint point) @@ -1380,8 +1380,8 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -yLabel endPoint point -t) (endPoint point -> endPoint (r :+ endPoint point) +yLabel endPoint point +t) (endPoint point -> endPoint (r :+ endPoint point) forall {b} {extra}. (IxValue b ~ (NumType (IxValue extra) :+ extra), Assert @@ -1393,8 +1393,8 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -yLabel endPoint point -s) +yLabel endPoint point +s) Ordering GT -> endPoint (r :+ endPoint point) -> endPoint (r :+ endPoint point) @@ -1413,8 +1413,8 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -xLabel endPoint point -t) (endPoint point -> endPoint (r :+ endPoint point) +xLabel endPoint point +t) (endPoint point -> endPoint (r :+ endPoint point) forall {b} {extra}. (IxValue b ~ (NumType (IxValue extra) :+ extra), Assert @@ -1426,13 +1426,13 @@ (Dimension (IxValue extra)) (NumType (IxValue extra))) => extra -> b -xLabel endPoint point -s) +xLabel endPoint point +s) where - xLabel :: extra -> b -xLabel extra -p = extra -pextra -> (extra -> b) -> b + xLabel :: extra -> b +xLabel extra +p = extra +pextra -> (extra -> b) -> b forall a b. a -> (a -> b) -> b &(IxValue extra -> Identity (NumType (IxValue extra) :+ extra)) -> extra -> Identity b @@ -1447,9 +1447,9 @@ -> extra -> b forall s t a b. ASetter s t a b -> (a -> b) -> s -> t -%~ \IxValue extra -pt -> IxValue extra -ptIxValue extra +%~ \IxValue extra +pt -> IxValue extra +ptIxValue extra -> Getting (NumType (IxValue extra)) (IxValue extra) (NumType (IxValue extra)) -> NumType (IxValue extra) @@ -1464,11 +1464,11 @@ -> extra -> NumType (IxValue extra) :+ extra forall core extra. core -> extra -> core :+ extra :+ extra -p - yLabel :: extra -> b -yLabel extra -p = extra -pextra -> (extra -> b) -> b +p + yLabel :: extra -> b +yLabel extra +p = extra +pextra -> (extra -> b) -> b forall a b. a -> (a -> b) -> b &(IxValue extra -> Identity (NumType (IxValue extra) :+ extra)) -> extra -> Identity b @@ -1483,9 +1483,9 @@ -> extra -> b forall s t a b. ASetter s t a b -> (a -> b) -> s -> t -%~ \IxValue extra -pt -> IxValue extra -ptIxValue extra +%~ \IxValue extra +pt -> IxValue extra +ptIxValue extra -> Getting (NumType (IxValue extra)) (IxValue extra) (NumType (IxValue extra)) -> NumType (IxValue extra) @@ -1500,7 +1500,7 @@ -> extra -> NumType (IxValue extra) :+ extra forall core extra. core -> extra -> core :+ extra :+ extra -p +p -- data XY = X | Y deriving (Show,Eq) @@ -1531,9 +1531,9 @@ -------------------------------------------------------------------------------- -type instance Intersection (LineSegment endPoint point :+ extra) - (LineSegment endPoint point :+ extra) = - Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point :+ extra)) +type instance Intersection (LineSegment endPoint point :+ extra) + (LineSegment endPoint point :+ extra) = + Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point :+ extra)) -- FIXME: hmm, this type is kind of nonsense, since the intersecting segment may be from -- different segments @@ -1542,20 +1542,20 @@ -- (LineSegment endPoint point :+ extra') where -- (s :+ _) `intersects` (s' :+ _) = s `intersects` s' -instance ( LineSegment endPoint point `IsIntersectableWith` LineSegment endPoint point - , Intersection (LineSegment endPoint point) (LineSegment endPoint point) - ~ Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point)) - ) => (LineSegment endPoint point :+ extra) `IsIntersectableWith` - (LineSegment endPoint point :+ extra) where - (LineSegment endPoint point -s :+ extra -_) intersect :: (LineSegment endPoint point :+ extra) +instance ( LineSegment endPoint point `IsIntersectableWith` LineSegment endPoint point + , Intersection (LineSegment endPoint point) (LineSegment endPoint point) + ~ Maybe (LineSegmentLineSegmentIntersection (LineSegment endPoint point)) + ) => (LineSegment endPoint point :+ extra) `IsIntersectableWith` + (LineSegment endPoint point :+ extra) where + (LineSegment endPoint point +s :+ extra +_) intersect :: (LineSegment endPoint point :+ extra) -> (LineSegment endPoint point :+ extra) -> Intersection (LineSegment endPoint point :+ extra) (LineSegment endPoint point :+ extra) -`intersect` (LineSegment endPoint point -s' :+ extra +`intersect` (LineSegment endPoint point +s' :+ extra _) = (LineSegment endPoint point -> LineSegment endPoint point :+ extra) -> LineSegmentLineSegmentIntersection (LineSegment endPoint point) -> LineSegmentLineSegmentIntersection @@ -1570,7 +1570,7 @@ forall core extra. core -> extra -> core :+ extra :+ extra forall {a}. a -undef') (LineSegmentLineSegmentIntersection (LineSegment endPoint point) +undef') (LineSegmentLineSegmentIntersection (LineSegment endPoint point) -> LineSegmentLineSegmentIntersection (LineSegment endPoint point :+ extra)) -> Maybe @@ -1580,16 +1580,16 @@ (LineSegment endPoint point :+ extra)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> LineSegment endPoint point -s LineSegment endPoint point +s LineSegment endPoint point -> LineSegment endPoint point -> Intersection (LineSegment endPoint point) (LineSegment endPoint point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` LineSegment endPoint point -s' +s' where - undef' :: a -undef' = String -> a + undef' :: a +undef' = String -> a forall a. HasCallStack => String -> a error String "intersect semgnets: not possible" @@ -1599,22 +1599,22 @@ -------------------------------------------------------------------------------- -- * Intersection with HalfLines -instance ( Ord r, Num r, Point_ point 2 r - , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) - ) => HasIntersectionWith (HalfLine point) (LineSegment endPoint point) where - HalfLine point -hl intersects :: HalfLine point -> LineSegment endPoint point -> Bool -`intersects` LineSegment endPoint point -seg = HalfLine point +instance ( Ord r, Num r, Point_ point 2 r + , IxValue (endPoint point) ~ point, EndPoint_ (endPoint point) + ) => HasIntersectionWith (HalfLine point) (LineSegment endPoint point) where + HalfLine point +hl intersects :: HalfLine point -> LineSegment endPoint point -> Bool +`intersects` LineSegment endPoint point +seg = HalfLine point -> LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) forall t. HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine HalfLine point -hl LinePV 2 r -> LineSegment endPoint point -> Bool +hl LinePV 2 r -> LineSegment endPoint point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` LineSegment endPoint point -seg Bool -> Bool -> Bool +seg Bool -> Bool -> Bool && LineSegment endPoint point -> LinePV (Dimension (LineSegment endPoint point)) @@ -1623,21 +1623,21 @@ HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine LineSegment endPoint point -seg LinePV 2 r -> HalfLine point -> Bool +seg LinePV 2 r -> HalfLine point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` HalfLine point -hl +hl {-# INLINE intersects #-} -type instance Intersection (HalfLine point) (LineSegment endPoint point) - = Maybe (HalfLineLineSegmentIntersection (Point 2 (NumType point)) - (LineSegment endPoint point)) +type instance Intersection (HalfLine point) (LineSegment endPoint point) + = Maybe (HalfLineLineSegmentIntersection (Point 2 (NumType point)) + (LineSegment endPoint point)) -- | Data type representing the intersection of a HalfLine and a LineSegment -data HalfLineLineSegmentIntersection point segment = - HalfLine_x_LineSegment_Point point - | HalfLine_x_LineSegment_LineSegment segment - deriving (Int -> HalfLineLineSegmentIntersection point segment -> ShowS +data HalfLineLineSegmentIntersection point segment = + HalfLine_x_LineSegment_Point point + | HalfLine_x_LineSegment_LineSegment segment + deriving (Int -> HalfLineLineSegmentIntersection point segment -> ShowS [HalfLineLineSegmentIntersection point segment] -> ShowS HalfLineLineSegmentIntersection point segment -> String (Int -> HalfLineLineSegmentIntersection point segment -> ShowS) @@ -1667,7 +1667,7 @@ (Show point, Show segment) => [HalfLineLineSegmentIntersection point segment] -> ShowS showList :: [HalfLineLineSegmentIntersection point segment] -> ShowS -Show,HalfLineLineSegmentIntersection point segment +Show,HalfLineLineSegmentIntersection point segment -> HalfLineLineSegmentIntersection point segment -> Bool (HalfLineLineSegmentIntersection point segment -> HalfLineLineSegmentIntersection point segment -> Bool) @@ -1691,7 +1691,7 @@ -> HalfLineLineSegmentIntersection point segment -> Bool /= :: HalfLineLineSegmentIntersection point segment -> HalfLineLineSegmentIntersection point segment -> Bool -Eq,ReadPrec [HalfLineLineSegmentIntersection point segment] +Eq,ReadPrec [HalfLineLineSegmentIntersection point segment] ReadPrec (HalfLineLineSegmentIntersection point segment) Int -> ReadS (HalfLineLineSegmentIntersection point segment) ReadS [HalfLineLineSegmentIntersection point segment] @@ -1731,7 +1731,7 @@ (Read point, Read segment) => ReadPrec [HalfLineLineSegmentIntersection point segment] readListPrec :: ReadPrec [HalfLineLineSegmentIntersection point segment] -Read,Eq (HalfLineLineSegmentIntersection point segment) +Read,Eq (HalfLineLineSegmentIntersection point segment) Eq (HalfLineLineSegmentIntersection point segment) => (HalfLineLineSegmentIntersection point segment -> HalfLineLineSegmentIntersection point segment -> Ordering) @@ -1829,7 +1829,7 @@ min :: HalfLineLineSegmentIntersection point segment -> HalfLineLineSegmentIntersection point segment -> HalfLineLineSegmentIntersection point segment -Ord,(forall x. +Ord,(forall x. HalfLineLineSegmentIntersection point segment -> Rep (HalfLineLineSegmentIntersection point segment) x) -> (forall x. @@ -1862,7 +1862,7 @@ to :: forall x. Rep (HalfLineLineSegmentIntersection point segment) x -> HalfLineLineSegmentIntersection point segment -Generic,(forall a b. +Generic,(forall a b. (a -> b) -> HalfLineLineSegmentIntersection point a -> HalfLineLineSegmentIntersection point b) @@ -1908,27 +1908,27 @@ -> HalfLineLineSegmentIntersection point a Functor) -instance ( Ord r, Fractional r, Point_ point 2 r - , IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) - , IsIntersectableWith (LinePV 2 r) (LineSegment endPoint point) - , Intersection (LinePV 2 r) (LineSegment endPoint point) - ~ Maybe (LineLineSegmentIntersection lineSegment') - , NumType lineSegment' ~ r - ) => IsIntersectableWith (HalfLine point) (LineSegment endPoint point) where - HalfLine point -hl intersect :: HalfLine point +instance ( Ord r, Fractional r, Point_ point 2 r + , IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) + , IsIntersectableWith (LinePV 2 r) (LineSegment endPoint point) + , Intersection (LinePV 2 r) (LineSegment endPoint point) + ~ Maybe (LineLineSegmentIntersection lineSegment') + , NumType lineSegment' ~ r + ) => IsIntersectableWith (HalfLine point) (LineSegment endPoint point) where + HalfLine point +hl intersect :: HalfLine point -> LineSegment endPoint point -> Intersection (HalfLine point) (LineSegment endPoint point) -`intersect` LineSegment endPoint point -seg = LinePV 2 r +`intersect` LineSegment endPoint point +seg = LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m LinePV 2 r +m LinePV 2 r -> LineSegment endPoint point -> Intersection (LinePV 2 r) (LineSegment endPoint point) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` LineSegment endPoint point -seg Maybe (LineLineSegmentIntersection lineSegment') +seg Maybe (LineLineSegmentIntersection lineSegment') -> (LineLineSegmentIntersection lineSegment' -> Maybe (HalfLineLineSegmentIntersection @@ -1939,11 +1939,11 @@ forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Line_x_LineSegment_Point Point 2 (NumType lineSegment') -q + Line_x_LineSegment_Point Point 2 (NumType lineSegment') +q | Point 2 r Point 2 (NumType lineSegment') -q Point 2 r -> LinePV 2 r -> SideTest +q Point 2 r -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest @@ -1951,7 +1951,7 @@ forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m SideTest -> SideTest -> Bool +m SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool == SideTest LeftSide -> HalfLineLineSegmentIntersection @@ -1978,7 +1978,7 @@ point -> HalfLineLineSegmentIntersection point segment HalfLine_x_LineSegment_Point Point 2 r Point 2 (NumType lineSegment') -q +q | Bool otherwise -> Maybe (HalfLineLineSegmentIntersection @@ -1993,8 +1993,8 @@ LinePV 2 r -> LineSegment endPoint point -> CompareInterval compareColinearInterval LinePV 2 r LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m LineSegment endPoint point -seg of +m LineSegment endPoint point +seg of CompareInterval Before -> HalfLineLineSegmentIntersection (Point 2 r) (LineSegment endPoint point) @@ -2019,7 +2019,7 @@ forall point segment. segment -> HalfLineLineSegmentIntersection point segment HalfLine_x_LineSegment_LineSegment LineSegment endPoint point -seg +seg CompareInterval OnStart -> HalfLineLineSegmentIntersection (Point 2 r) (LineSegment endPoint point) @@ -2044,7 +2044,7 @@ forall point segment. segment -> HalfLineLineSegmentIntersection point segment HalfLine_x_LineSegment_LineSegment LineSegment endPoint point -seg +seg CompareInterval Interior -> HalfLineLineSegmentIntersection (Point 2 r) (LineSegment endPoint point) @@ -2076,7 +2076,7 @@ (Point 2 r) (LineSegment endPoint point) forall a b. (a -> b) -> a -> b $ LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> (LineSegment endPoint point -> LineSegment endPoint point) -> LineSegment endPoint point forall a b. a -> (a -> b) -> b @@ -2093,7 +2093,7 @@ -> LineSegment endPoint point forall s t a b. ASetter s t a b -> b -> s -> t .~ (HalfLine point -hlHalfLine point -> Getting point (HalfLine point) point -> point +hlHalfLine point -> Getting point (HalfLine point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (HalfLine point) point forall seg p. HasStart seg p => Lens' seg p @@ -2102,8 +2102,8 @@ CompareInterval OnEnd | endPoint point -> Bool -isClosed (LineSegment endPoint point -segLineSegment endPoint point +isClosed (LineSegment endPoint point +segLineSegment endPoint point -> Getting (endPoint point) (LineSegment endPoint point) (endPoint point) -> endPoint point @@ -2135,7 +2135,7 @@ forall point segment. point -> HalfLineLineSegmentIntersection point segment HalfLine_x_LineSegment_Point (LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting (Point 2 r) (LineSegment endPoint point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a @@ -2171,16 +2171,16 @@ forall a. Maybe a Nothing -- no intersection where - m :: LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) -m = HalfLine point + m :: LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) +m = HalfLine point -> LinePV (Dimension (HalfLine point)) (NumType (HalfLine point)) forall t. HasSupportingLine t => t -> LinePV (Dimension t) (NumType t) supportingLine HalfLine point -hl - isClosed :: endPoint point -> Bool -isClosed = (EndPointType -> EndPointType -> Bool +hl + isClosed :: endPoint point -> Bool +isClosed = (EndPointType -> EndPointType -> Bool forall a. Eq a => a -> a -> Bool == EndPointType Closed) (EndPointType -> Bool) @@ -2193,28 +2193,28 @@ -- | Given a line l, and a line segment seg that lies on l. Returns where the anchorPoint -- of the line is with respect to the line segment (which we can interpret as some -- interval along l). -compareColinearInterval :: ( Ord r, Num r - , Point_ point 2 r - , IxValue (endPoint point) ~ point - , EndPoint_ (endPoint point) +compareColinearInterval :: ( Ord r, Num r + , Point_ point 2 r + , IxValue (endPoint point) ~ point + , EndPoint_ (endPoint point) ) - => LinePV 2 r -> LineSegment endPoint point + => LinePV 2 r -> LineSegment endPoint point -> CompareInterval compareColinearInterval :: forall r point (endPoint :: * -> *). (Ord r, Num r, Point_ point 2 r, IxValue (endPoint point) ~ point, EndPoint_ (endPoint point)) => LinePV 2 r -> LineSegment endPoint point -> CompareInterval -compareColinearInterval l :: LinePV 2 r -l@(LinePV Point 2 r -p Vector 2 r -_) LineSegment endPoint point -seg = case Point 2 r -p Point 2 r -> LinePV 2 r -> SideTest +compareColinearInterval l :: LinePV 2 r +l@(LinePV Point 2 r +p Vector 2 r +_) LineSegment endPoint point +seg = case Point 2 r +p Point 2 r -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -mStart of +mStart of SideTest RightSide -> CompareInterval Before @@ -2223,12 +2223,12 @@ OnStart SideTest LeftSide -> case Point 2 r -p Point 2 r -> LinePV 2 r -> SideTest +p Point 2 r -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -mEnd of +mEnd of SideTest RightSide -> CompareInterval Interior @@ -2239,14 +2239,14 @@ LeftSide -> CompareInterval After where - m :: LinePV 2 r -m = LinePV 2 r -> LinePV 2 r + m :: LinePV 2 r +m = LinePV 2 r -> LinePV 2 r forall r. Num r => LinePV 2 r -> LinePV 2 r perpendicularTo LinePV 2 r -l - mStart :: LinePV 2 r -mStart = LinePV 2 r -mLinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r +l + mStart :: LinePV 2 r +mStart = LinePV 2 r +mLinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r forall a b. a -> (a -> b) -> b &(Point 2 r -> Identity (Point 2 r)) -> LinePV 2 r -> Identity (LinePV 2 r) @@ -2258,7 +2258,7 @@ -> Point 2 r -> LinePV 2 r -> LinePV 2 r forall s t a b. ASetter s t a b -> b -> s -> t .~ LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting (Point 2 r) (LineSegment endPoint point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a @@ -2281,9 +2281,9 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint - mEnd :: LinePV 2 r -mEnd = LinePV 2 r -mLinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r + mEnd :: LinePV 2 r +mEnd = LinePV 2 r +mLinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r forall a b. a -> (a -> b) -> b &(Point 2 r -> Identity (Point 2 r)) -> LinePV 2 r -> Identity (LinePV 2 r) @@ -2295,7 +2295,7 @@ -> Point 2 r -> LinePV 2 r -> LinePV 2 r forall s t a b. ASetter s t a b -> b -> s -> t .~ LineSegment endPoint point -segLineSegment endPoint point +segLineSegment endPoint point -> Getting (Point 2 r) (LineSegment endPoint point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a @@ -2320,23 +2320,23 @@ asPoint -- the left side is the side in which the vector v points. -type instance NumType (HalfLineLineSegmentIntersection point edge) = NumType point -type instance Dimension (HalfLineLineSegmentIntersection point edge) = Dimension point +type instance NumType (HalfLineLineSegmentIntersection point edge) = NumType point +type instance Dimension (HalfLineLineSegmentIntersection point edge) = Dimension point -instance ( HasSquaredEuclideanDistance point - , HasSquaredEuclideanDistance segment - , NumType point ~ NumType segment, Dimension point ~ Dimension segment - ) => HasSquaredEuclideanDistance (HalfLineLineSegmentIntersection point segment) where - pointClosestToWithDistance :: forall r (d :: Nat) point. +instance ( HasSquaredEuclideanDistance point + , HasSquaredEuclideanDistance segment + , NumType point ~ NumType segment, Dimension point ~ Dimension segment + ) => HasSquaredEuclideanDistance (HalfLineLineSegmentIntersection point segment) where + pointClosestToWithDistance :: forall r (d :: Nat) point. (r ~ NumType (HalfLineLineSegmentIntersection point segment), d ~ Dimension (HalfLineLineSegmentIntersection point segment), Num r, Point_ point d r) => point -> HalfLineLineSegmentIntersection point segment -> (Point d r, r) -pointClosestToWithDistance point -q = \case - HalfLine_x_LineSegment_Point point -p -> point -> point -> (Point d r, r) +pointClosestToWithDistance point +q = \case + HalfLine_x_LineSegment_Point point +p -> point -> point -> (Point d r, r) forall g r (d :: Nat) point. (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) => @@ -2346,10 +2346,10 @@ Point_ point d r) => point -> point -> (Point d r, r) pointClosestToWithDistance point -q point -p - HalfLine_x_LineSegment_LineSegment segment -seg -> point -> segment -> (Point d r, r) +q point +p + HalfLine_x_LineSegment_LineSegment segment +seg -> point -> segment -> (Point d r, r) forall g r (d :: Nat) point. (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) => @@ -2359,6 +2359,6 @@ Point_ point d r) => point -> segment -> (Point d r, r) pointClosestToWithDistance point -q segment -seg +q segment +seg \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Matrix.ByRows.html b/haddocks/hgeometry/kernel/src/HGeometry.Matrix.ByRows.html index d637a2f3a..3f3489feb 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Matrix.ByRows.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Matrix.ByRows.html @@ -27,20 +27,20 @@ -- * Matrices -- | A matrix of n rows, each of m columns, storing values of type r. -newtype Matrix n m r = Matrix (Vector n (Vector m r)) +newtype Matrix n m r = Matrix (Vector n (Vector m r)) -- transpose :: Matrix n m r -> Matrix m n r -- transpose = undefined -type instance NumType (Matrix n m r) = r -type instance Index (Matrix n m r) = (Int,Int) -type instance IxValue (Matrix n m r) = r +type instance NumType (Matrix n m r) = r +type instance Index (Matrix n m r) = (Int,Int) +type instance IxValue (Matrix n m r) = r -_MatrixVector :: Iso (Matrix n m r) (Matrix n m s) - (Vector n (Vector m r)) (Vector n (Vector m s)) +_MatrixVector :: Iso (Matrix n m r) (Matrix n m s) + (Vector n (Vector m r)) (Vector n (Vector m s)) _MatrixVector :: forall (n :: Nat) (m :: Nat) r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Vector n (Vector m r)) (f (Vector n (Vector m s))) @@ -53,37 +53,37 @@ (Vector n (Vector m r)) (Vector n (Vector m s)) forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b -iso (\(Matrix Vector n (Vector m r) -v) -> Vector n (Vector m r) -v) Vector n (Vector m s) -> Matrix n m s +iso (\(Matrix Vector n (Vector m r) +v) -> Vector n (Vector m r) +v) Vector n (Vector m s) -> Matrix n m s forall (n :: Nat) (m :: Nat) r. Vector n (Vector m r) -> Matrix n m r Matrix -deriving stock instance ( Show r - , Has_ Vector_ m r - , Has_ Vector_ n (Vector m r) - ) => Show (Matrix n m r) -deriving newtype instance ( Eq (Vector n (Vector m r))) => Eq (Matrix n m r) -deriving newtype instance ( Ord (Vector n (Vector m r))) => Ord (Matrix n m r) +deriving stock instance ( Show r + , Has_ Vector_ m r + , Has_ Vector_ n (Vector m r) + ) => Show (Matrix n m r) +deriving newtype instance ( Eq (Vector n (Vector m r))) => Eq (Matrix n m r) +deriving newtype instance ( Ord (Vector n (Vector m r))) => Ord (Matrix n m r) -- | shorthand for square matrixecs -type OptMatrix_ d r = ( Has_ Additive_ d r - , Has_ Vector_ d (Vector d r) - , Ixed (Vector d r) - , Ixed (Vector d (Vector d r)) +type OptMatrix_ d r = ( Has_ Additive_ d r + , Has_ Vector_ d (Vector d r) + , Ixed (Vector d r) + , Ixed (Vector d (Vector d r)) ) -instance ( Has_ Vector_ n (Vector m r) - , Has_ Vector_ m r - , Ixed (Vector n (Vector m r)) - , Ixed (Vector m r) - ) => Ixed (Matrix n m r) where - ix :: Index (Matrix n m r) +instance ( Has_ Vector_ n (Vector m r) + , Has_ Vector_ m r + , Ixed (Vector n (Vector m r)) + , Ixed (Vector m r) + ) => Ixed (Matrix n m r) where + ix :: Index (Matrix n m r) -> Traversal' (Matrix n m r) (IxValue (Matrix n m r)) -ix (Int -i,Int -j) = (Vector n (Vector m r) -> f (Vector n (Vector m r))) +ix (Int +i,Int +j) = (Vector n (Vector m r) -> f (Vector n (Vector m r))) -> Matrix n m r -> f (Matrix n m r) forall (n :: Nat) (m :: Nat) r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -103,7 +103,7 @@ forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix Int Index (Vector n (Vector m r)) -i((IxValue (Vector n (Vector m r)) +i((IxValue (Vector n (Vector m r)) -> f (IxValue (Vector n (Vector m r)))) -> Vector n (Vector m r) -> f (Vector n (Vector m r))) -> ((r -> f r) @@ -120,23 +120,23 @@ forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix Int Index (IxValue (Vector n (Vector m r))) -j +j -instance ( Has_ Vector_ n (Vector m r) - , Has_ Vector_ m r - , Has_ Vector_ n (Vector m s) - , Has_ Vector_ m s - , HasComponents (Vector m r) (Vector m s) - , HasComponents (Vector n (Vector m r)) (Vector n (Vector m s)) - ) => HasElements (Matrix n m r) (Matrix n m s) where - elements :: IndexedTraversal1 +instance ( Has_ Vector_ n (Vector m r) + , Has_ Vector_ m r + , Has_ Vector_ n (Vector m s) + , Has_ Vector_ m s + , HasComponents (Vector m r) (Vector m s) + , HasComponents (Vector n (Vector m r)) (Vector n (Vector m s)) + ) => HasElements (Matrix n m r) (Matrix n m s) where + elements :: IndexedTraversal1 (Int, Int) (Matrix n m r) (Matrix n m s) (NumType (Matrix n m r)) (NumType (Matrix n m s)) -elements = (Vector n (Vector m r) -> f (Vector n (Vector m s))) +elements = (Vector n (Vector m r) -> f (Vector n (Vector m s))) -> Matrix n m r -> f (Matrix n m s) forall (n :: Nat) (m :: Nat) r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -201,16 +201,16 @@ components -instance ( Has_ Vector_ n (Vector m r) - , Has_ Additive_ m r - , Ixed (Vector n (Vector m r)) - , Ixed (Vector m r) - ) => Matrix_ (Matrix n m r) n m r where +instance ( Has_ Vector_ n (Vector m r) + , Has_ Additive_ m r + , Ixed (Vector n (Vector m r)) + , Ixed (Vector m r) + ) => Matrix_ (Matrix n m r) n m r where - matrixFromRows :: forall rowVector. + matrixFromRows :: forall rowVector. Vector_ rowVector n (Vector m r) => rowVector -> Matrix n m r -matrixFromRows = Vector n (Vector m r) -> Matrix n m r +matrixFromRows = Vector n (Vector m r) -> Matrix n m r forall (n :: Nat) (m :: Nat) r. Vector n (Vector m r) -> Matrix n m r Matrix (Vector n (Vector m r) -> Matrix n m r) @@ -229,9 +229,9 @@ rowVector rowVector (Vector n (Vector m r)) (Vector n (Vector m r)) _Vector - generateMatrix :: ((Int, Int) -> r) -> Matrix n m r -generateMatrix (Int, Int) -> r -f = Vector n (Vector m r) -> Matrix n m r + generateMatrix :: ((Int, Int) -> r) -> Matrix n m r +generateMatrix (Int, Int) -> r +f = Vector n (Vector m r) -> Matrix n m r forall (n :: Nat) (m :: Nat) r. Vector n (Vector m r) -> Matrix n m r Matrix (Vector n (Vector m r) -> Matrix n m r) @@ -242,22 +242,22 @@ Vector_ vector d r => (Int -> r) -> vector generate Int -> Vector m r -mkRow +mkRow where - mkRow :: Int -> Vector m r -mkRow Int -i = (Int -> r) -> Vector m r + mkRow :: Int -> Vector m r +mkRow Int +i = (Int -> r) -> Vector m r forall vector (d :: Nat) r. Vector_ vector d r => (Int -> r) -> vector -generate (\Int -j -> (Int, Int) -> r -f (Int -i,Int -j)) +generate (\Int +j -> (Int, Int) -> r +f (Int +i,Int +j)) - rows :: Lens' (Matrix n m r) (Vector n (Vector m r)) -rows = (Vector n (Vector m r) -> f (Vector n (Vector m r))) + rows :: Lens' (Matrix n m r) (Vector n (Vector m r)) +rows = (Vector n (Vector m r) -> f (Vector n (Vector m r))) -> Matrix n m r -> f (Matrix n m r) forall (n :: Nat) (m :: Nat) r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Class.html index 5ff1aee67..6ec14bb3e 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Class.html @@ -42,21 +42,21 @@ -- | Types that have an 'elements' field lens. -class HasElements matrix matrix' where +class HasElements matrix matrix' where -- | IndexedTraversal over the elements of the matrix, each index is -- a (row,column) index pair. - elements :: IndexedTraversal1 (Int,Int) matrix matrix' (NumType matrix) (NumType matrix') + elements :: IndexedTraversal1 (Int,Int) matrix matrix' (NumType matrix) (NumType matrix') -- | A matrix of n rows, each of m columns, storing values of type r. type Matrix_ :: Type -> Nat -> Nat -> Type -> Constraint -class ( r ~ NumType matrix - , Ixed matrix - , IxValue matrix ~ r - , Index matrix ~ (Int,Int) -- ^ row, col - , HasElements matrix matrix - ) => Matrix_ matrix n m r | matrix -> n - , matrix -> m - , matrix -> r where +class ( r ~ NumType matrix + , Ixed matrix + , IxValue matrix ~ r + , Index matrix ~ (Int,Int) -- ^ row, col + , HasElements matrix matrix + ) => Matrix_ matrix n m r | matrix -> n + , matrix -> m + , matrix -> r where {-# MINIMAL generateMatrix, matrixFromRows, rows #-} -- | Produces the Identity Matrix. @@ -65,25 +65,25 @@ -- Vector3 1 0 0 -- Vector3 0 1 0 -- Vector3 0 0 1 - identityMatrix :: Num r => matrix - identityMatrix = ((Int, Int) -> r) -> matrix + identityMatrix :: Num r => matrix + identityMatrix = ((Int, Int) -> r) -> matrix forall matrix (n :: Nat) (m :: Nat) r. Matrix_ matrix n m r => ((Int, Int) -> r) -> matrix generateMatrix (((Int, Int) -> r) -> matrix) -> ((Int, Int) -> r) -> matrix forall a b. (a -> b) -> a -> b -$ \(Int -i,Int -j) -> if Int -i Int -> Int -> Bool +$ \(Int +i,Int +j) -> if Int +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -j then r +j then r 1 else r 0 -- | Given a function that specifies the values, generate the matrix - generateMatrix :: ((Int,Int) -> r) -> matrix + generateMatrix :: ((Int,Int) -> r) -> matrix -- | Given a list of the elements in the matrix, in row by row -- order, constructs the matrix. @@ -93,22 +93,22 @@ -- Just (Matrix (Vector2 (Vector3 1 2 3) (Vector3 4 5 6))) -- >>> matrixFromList @(Matrix 2 3 Int) [1,2,3,4,5,6,7] -- Nothing - matrixFromList :: ( KnownNat n, KnownNat m - , Has_ Vector_ m r - , Has_ Vector_ n (Vector m r) - ) => [r] -> Maybe matrix - matrixFromList [r] -xs = do [Vector m r] -rs <- Integer -> [r] -> Maybe [Vector m r] -go Integer -n [r] -xs - Vector n (Vector m r) -rs' <- forall vector (d :: Nat) r. + matrixFromList :: ( KnownNat n, KnownNat m + , Has_ Vector_ m r + , Has_ Vector_ n (Vector m r) + ) => [r] -> Maybe matrix + matrixFromList [r] +xs = do [Vector m r] +rs <- Integer -> [r] -> Maybe [Vector m r] +go Integer +n [r] +xs + Vector n (Vector m r) +rs' <- forall vector (d :: Nat) r. Vector_ vector d r => [r] -> Maybe vector -vectorFromList @(Vector n (Vector m r)) [Vector m r] -rs +vectorFromList @(Vector n (Vector m r)) [Vector m r] +rs matrix -> Maybe matrix forall a. a -> Maybe a forall (f :: * -> *) a. Applicative f => a -> f a @@ -122,10 +122,10 @@ (Matrix_ matrix n m r, Vector_ rowVector n (Vector m r)) => rowVector -> matrix matrixFromRows Vector n (Vector m r) -rs' +rs' where - m :: Int -m = Nat -> Int + m :: Int +m = Nat -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral (Nat -> Int) -> Nat -> Int forall a b. (a -> b) -> a -> b @@ -135,9 +135,9 @@ forall a b. (a -> b) -> a -> b $ forall (t :: Nat). Proxy t forall {k} (t :: k). Proxy t -Proxy @m - n :: Integer -n = Nat -> Integer +Proxy @m + n :: Integer +n = Nat -> Integer forall a b. (Integral a, Num b) => a -> b fromIntegral (Nat -> Integer) -> Nat -> Integer forall a b. (a -> b) -> a -> b @@ -147,49 +147,49 @@ forall a b. (a -> b) -> a -> b $ forall (t :: Nat). Proxy t forall {k} (t :: k). Proxy t -Proxy @n +Proxy @n - go :: Integer -> [r] -> Maybe [Vector m r] -go Integer + go :: Integer -> [r] -> Maybe [Vector m r] +go Integer 0 [] = [Vector m r] -> Maybe [Vector m r] forall a. a -> Maybe a Just [] - go Integer + go Integer 0 [r] _ = Maybe [Vector m r] forall a. Maybe a Nothing - go Integer -n' [r] -ys = let ([r] -r,[r] -rest) = Int -> [r] -> ([r], [r]) + go Integer +n' [r] +ys = let ([r] +r,[r] +rest) = Int -> [r] -> ([r], [r]) forall a. Int -> [a] -> ([a], [a]) List.splitAt Int -m [r] -ys - in do Vector m r -r' <- forall vector (d :: Nat) r. +m [r] +ys + in do Vector m r +r' <- forall vector (d :: Nat) r. Vector_ vector d r => [r] -> Maybe vector -vectorFromList @(Vector m r) [r] -r - [Vector m r] -rest' <- Integer -> [r] -> Maybe [Vector m r] -go (Integer -n'Integer -> Integer -> Integer +vectorFromList @(Vector m r) [r] +r + [Vector m r] +rest' <- Integer -> [r] -> Maybe [Vector m r] +go (Integer +n'Integer -> Integer -> Integer forall a. Num a => a -> a -> a -Integer 1) [r] -rest +rest [Vector m r] -> Maybe [Vector m r] forall a. a -> Maybe a forall (f :: * -> *) a. Applicative f => a -> f a pure (Vector m r -r'Vector m r -> [Vector m r] -> [Vector m r] +r'Vector m r -> [Vector m r] -> [Vector m r] forall a. a -> [a] -> [a] :[Vector m r] -rest') +rest') -- | Given a list of the elements in the matrix, in row by row -- order, constructs the matrix. @@ -197,9 +197,9 @@ -- -- >>> matrixFromRows @(Matrix 2 3 Int) (Vector2 (Vector3 1 2 3) (Vector3 4 5 6)) -- Matrix (Vector2 (Vector3 1 2 3) (Vector3 4 5 6)) - matrixFromRows :: ( Vector_ rowVector n (Vector m r) + matrixFromRows :: ( Vector_ rowVector n (Vector m r) -- , OptVector_ m r - ) => rowVector -> matrix + ) => rowVector -> matrix -- | Matrix multiplication -- @@ -209,47 +209,47 @@ -- >>> printMatrix $ (m1 !*! m2 :: Matrix 2 4 Int) -- Vector4 14 140 1400 14000 -- Vector4 32 320 3200 32000 - (!*!) :: ( Matrix_ matrix' m m' r - , Matrix_ matrix'' n m' r - , Num r + (!*!) :: ( Matrix_ matrix' m m' r + , Matrix_ matrix'' n m' r + , Num r -- , OptVector_ m r, KnownNat m -- , OptVector_ n r, KnownNat n - , Has_ Additive_ m r -- (Vector m r) - ) => matrix -> matrix' -> matrix'' - matrix -ma !*! matrix' -mb = ((Int, Int) -> IxValue (Vector m r)) -> matrix'' + , Has_ Additive_ m r -- (Vector m r) + ) => matrix -> matrix' -> matrix'' + matrix +ma !*! matrix' +mb = ((Int, Int) -> IxValue (Vector m r)) -> matrix'' forall matrix (n :: Nat) (m :: Nat) r. Matrix_ matrix n m r => ((Int, Int) -> r) -> matrix generateMatrix (((Int, Int) -> IxValue (Vector m r)) -> matrix'') -> ((Int, Int) -> IxValue (Vector m r)) -> matrix'' forall a b. (a -> b) -> a -> b -$ \(Int -i,Int -j) -> Int -> matrix -> Vector m (NumType matrix) +$ \(Int +i,Int +j) -> Int -> matrix -> Vector m (NumType matrix) forall {a} {n :: Nat} {m :: Nat}. (Matrix_ a n m (NumType a), Vector_ (Vector m (NumType a)) m (NumType a)) => Int -> a -> Vector m (NumType a) -row' Int -i matrix -ma Vector m r -> Vector m r -> IxValue (Vector m r) +row' Int +i matrix +ma Vector m r -> Vector m r -> IxValue (Vector m r) forall {s}. (Additive_ s (Dimension s) (IxValue s), Num (IxValue s)) => s -> s -> IxValue s -`dot'` Int -> matrix' -> Vector m (NumType matrix') +`dot'` Int -> matrix' -> Vector m (NumType matrix') forall {a} {n :: Nat} {m :: Nat}. (Matrix_ a n m (NumType a), Vector_ (Vector n (NumType a)) n (NumType a)) => Int -> a -> Vector n (NumType a) -column' Int -j matrix' -mb +column' Int +j matrix' +mb where - row' :: Int -> a -> Vector m (NumType a) -row' Int -i = Vector m (NumType a) + row' :: Int -> a -> Vector m (NumType a) +row' Int +i = Vector m (NumType a) -> Maybe (Vector m (NumType a)) -> Vector m (NumType a) forall a. a -> Maybe a -> a fromMaybe ([Char] -> Vector m (NumType a) @@ -263,10 +263,10 @@ (Matrix_ matrix n m r, Has_ Vector_ m r) => Int -> matrix -> Maybe (Vector m r) row Int -i - column' :: Int -> a -> Vector n (NumType a) -column' Int -j = Vector n (NumType a) +i + column' :: Int -> a -> Vector n (NumType a) +column' Int +j = Vector n (NumType a) -> Maybe (Vector n (NumType a)) -> Vector n (NumType a) forall a. a -> Maybe a -> a fromMaybe ([Char] -> Vector n (NumType a) @@ -280,12 +280,12 @@ (Matrix_ matrix n m r, Has_ Vector_ n r) => Int -> matrix -> Maybe (Vector n r) column Int -j +j - dot' :: s -> s -> IxValue s -dot' s -u s -v = Getting (Endo (Endo (IxValue s))) s (IxValue s) -> s -> IxValue s + dot' :: s -> s -> IxValue s +dot' s +u s +v = Getting (Endo (Endo (IxValue s))) s (IxValue s) -> s -> IxValue s forall a s. Num a => Getting (Endo (Endo a)) s a -> s -> a sumOf Getting (Endo (Endo (IxValue s))) s (IxValue s) forall vector vector'. @@ -302,8 +302,8 @@ liftI2 IxValue s -> IxValue s -> IxValue s forall a. Num a => a -> a -> a (*) s -u s -v +u s +v {-# INLINE (!*!) #-} -- | Multiply a matrix and a vector. @@ -311,17 +311,17 @@ -- >>> let m = matrixFromRows @(Matrix 2 3 Int) (Vector2 (Vector3 1 2 3) (Vector3 4 5 6)) -- >>> m !* Vector3 2 3 1 -- Vector2 11 29 - (!*) :: ( Has_ Vector_ n (Vector m r) - , HasComponents (Vector n (Vector m r)) (Vector n r) + (!*) :: ( Has_ Vector_ n (Vector m r) + , HasComponents (Vector n (Vector m r)) (Vector n r) -- , Additive_ -- , OptVector_ n r, OptVector_ m r - , Has_ Additive_ m r - , Num r - ) => matrix -> Vector m r -> Vector n r - matrix -m !* Vector m r -v = Vector n (Vector m r) -rows'Vector n (Vector m r) + , Has_ Additive_ m r + , Num r + ) => matrix -> Vector m r -> Vector n r + matrix +m !* Vector m r +v = Vector n (Vector m r) +rows'Vector n (Vector m r) -> (Vector n (Vector m r) -> Vector n r) -> Vector n r forall a b. a -> (a -> b) -> b &(IxValue (Vector n (Vector m r)) @@ -344,12 +344,12 @@ -> (Vector m r -> r) -> Vector n (Vector m r) -> Vector n r forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Vector m r -> r -dotWithV +dotWithV where - rows' :: Vector n (Vector m r) - rows' :: Vector n (Vector m r) -rows' = matrix -mmatrix + rows' :: Vector n (Vector m r) + rows' :: Vector n (Vector m r) +rows' = matrix +mmatrix -> Getting (Vector n (Vector m r)) matrix (Vector n (Vector m r)) -> Vector n (Vector m r) forall s a. s -> Getting a s a -> a @@ -359,10 +359,10 @@ Lens' matrix (Vector n (Vector m r)) Lens' matrix (Vector n (Vector m r)) rows - dotWithV :: Vector m r -> r - dotWithV :: Vector m r -> r -dotWithV Vector m r -u = Getting (Endo (Endo r)) (Vector m r) r -> Vector m r -> r + dotWithV :: Vector m r -> r + dotWithV :: Vector m r -> r +dotWithV Vector m r +u = Getting (Endo (Endo r)) (Vector m r) r -> Vector m r -> r forall a s. Num a => Getting (Endo (Endo a)) s a -> s -> a sumOf Getting (Endo (Endo r)) (Vector m r) r (IxValue (Vector m r) @@ -387,8 +387,8 @@ liftI2 r -> r -> r forall a. Num a => a -> a -> a (*) Vector m r -u (Vector m r -vVector m r +u (Vector m r +vVector m r -> Getting (Vector m r) (Vector m r) (Vector m r) -> Vector m r forall s a. s -> Getting a s a -> a ^.Getting (Vector m r) (Vector m r) (Vector m r) @@ -400,11 +400,11 @@ {-# INLINE (!*) #-} -- | Multiply a scalar and a matrix - (*!!) :: Num r => r -> matrix -> matrix - r -s *!! matrix -m = matrix -mmatrix -> (matrix -> matrix) -> matrix + (*!!) :: Num r => r -> matrix -> matrix + r +s *!! matrix +m = matrix +mmatrix -> (matrix -> matrix) -> matrix forall a b. a -> (a -> b) -> b &(r -> Identity r) -> matrix -> Identity matrix (NumType matrix -> Identity (NumType matrix)) @@ -419,15 +419,15 @@ -> r -> matrix -> matrix forall a s t. Num a => ASetter s t a a -> a -> s -> t *~ r -s +s {-# INLINE (*!!) #-} -- | Multiply a matrix and a scalar - (!!*) :: Num r => matrix -> r -> matrix - matrix -m !!* r -s = matrix -mmatrix -> (matrix -> matrix) -> matrix + (!!*) :: Num r => matrix -> r -> matrix + matrix +m !!* r +s = matrix +mmatrix -> (matrix -> matrix) -> matrix forall a b. a -> (a -> b) -> b &(r -> Identity r) -> matrix -> Identity matrix (NumType matrix -> Identity (NumType matrix)) @@ -442,11 +442,11 @@ -> r -> matrix -> matrix forall a s t. Num a => ASetter s t a a -> a -> s -> t *~ r -s +s {-# INLINE (!!*) #-} -- | Lens to access all rows - rows :: Lens' matrix (Vector n (Vector m r)) + rows :: Lens' matrix (Vector n (Vector m r)) -- rows :: IndexedTraversal' Int matrix (Vector m r) -- -- | Traversal over all columns @@ -456,10 +456,10 @@ -- | Access the i^th row in the matrix. -- - row :: Has_ Vector_ m r => Int -> matrix -> Maybe (Vector m r) - row Int -i matrix -m = (Int -> Maybe r) -> Maybe (Vector m r) + row :: Has_ Vector_ m r => Int -> matrix -> Maybe (Vector m r) + row Int +i matrix +m = (Int -> Maybe r) -> Maybe (Vector m r) forall vector (d :: Nat) r (f :: * -> *). (Vector_ vector d r, Applicative f) => (Int -> f r) -> f vector @@ -469,15 +469,15 @@ generateA ((Int -> Maybe r) -> Maybe (Vector m r)) -> (Int -> Maybe r) -> Maybe (Vector m r) forall a b. (a -> b) -> a -> b -$ \Int -j -> matrix -m matrix -> Getting (First r) matrix r -> Maybe r +$ \Int +j -> matrix +m matrix -> Getting (First r) matrix r -> Maybe r forall s a. s -> Getting (First a) s a -> Maybe a ^? Index matrix -> Traversal' matrix (IxValue matrix) forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix (Int -i,Int -j) +i,Int +j) {-# INLINE row #-} -- row' :: (OptVector_ m r, KnownNat m) => Int -> Traversal' matrix (Vector m r) @@ -487,10 +487,10 @@ -- generate $ \j -> m ^?! ix (i,j) -- | Access the j^th column in the matrix. - column :: Has_ Vector_ n r => Int -> matrix -> Maybe (Vector n r) - column Int -j matrix -m = (Int -> Maybe r) -> Maybe (Vector n r) + column :: Has_ Vector_ n r => Int -> matrix -> Maybe (Vector n r) + column Int +j matrix +m = (Int -> Maybe r) -> Maybe (Vector n r) forall vector (d :: Nat) r (f :: * -> *). (Vector_ vector d r, Applicative f) => (Int -> f r) -> f vector @@ -500,15 +500,15 @@ generateA ((Int -> Maybe r) -> Maybe (Vector n r)) -> (Int -> Maybe r) -> Maybe (Vector n r) forall a b. (a -> b) -> a -> b -$ \Int -i -> matrix -m matrix -> Getting (First r) matrix r -> Maybe r +$ \Int +i -> matrix +m matrix -> Getting (First r) matrix r -> Maybe r forall s a. s -> Getting (First a) s a -> Maybe a ^? Index matrix -> Traversal' matrix (IxValue matrix) forall m. Ixed m => Index m -> Traversal' m (IxValue m) ix (Int -i,Int -j) +i,Int +j) {-# INLINE column #-} @@ -525,14 +525,14 @@ -- * Determinants -- | Dimensions for which we can compute the determinant of a matrix -class HasDeterminant d where - det :: (Num r, Matrix_ matrix d d r) => matrix -> r +class HasDeterminant d where + det :: (Num r, Matrix_ matrix d d r) => matrix -> r instance HasDeterminant 1 where - det :: forall r matrix. (Num r, Matrix_ matrix 1 1 r) => matrix -> r -det matrix -m = matrix -mmatrix -> Getting (Endo r) matrix r -> r + det :: forall r matrix. (Num r, Matrix_ matrix 1 1 r) => matrix -> r +det matrix +m = matrix +mmatrix -> Getting (Endo r) matrix r -> r forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!Index matrix -> Traversal' matrix (IxValue matrix) forall m. Ixed m => Index m -> Traversal' m (IxValue m) @@ -542,10 +542,10 @@ {-# INLINE det #-} instance HasDeterminant 2 where - det :: forall r matrix. (Num r, Matrix_ matrix 2 2 r) => matrix -> r -det matrix -m = case matrix -mmatrix -> Getting (Endo [r]) matrix r -> [r] + det :: forall r matrix. (Num r, Matrix_ matrix 2 2 r) => matrix -> r +det matrix +m = case matrix +mmatrix -> Getting (Endo [r]) matrix r -> [r] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [r]) matrix r (NumType matrix -> Const (Endo [r]) (NumType matrix)) @@ -557,18 +557,18 @@ IndexedTraversal1 (Int, Int) matrix matrix (NumType matrix) (NumType matrix) elements of - [ r -a, r -b, - r -c, r -d] -> r -> r -> r -> r -> r + [ r +a, r +b, + r +c, r +d] -> r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -a r -b r -c r -d -- a*d - b*c +a r +b r +c r +d -- a*d - b*c [r] _ -> [Char] -> r forall a. HasCallStack => [Char] -> a @@ -577,29 +577,29 @@ {-# INLINE det #-} -- | determinant of a 2x2 matrix [[a,b], [c,d]] -det22 :: Num r => r -> r -> r -> r -> r +det22 :: Num r => r -> r -> r -> r -> r det22 :: forall r. Num r => r -> r -> r -> r -> r -det22 r -a r -b r -c r -d = r -ar -> r -> r +det22 r +a r +b r +c r +d = r +ar -> r -> r forall a. Num a => a -> a -> a *r -d r -> r -> r +d r -> r -> r forall a. Num a => a -> a -> a - r -br -> r -> r +br -> r -> r forall a. Num a => a -> a -> a *r -c +c instance HasDeterminant 3 where - det :: forall r matrix. (Num r, Matrix_ matrix 3 3 r) => matrix -> r -det matrix -m = case matrix -mmatrix -> Getting (Endo [r]) matrix r -> [r] + det :: forall r matrix. (Num r, Matrix_ matrix 3 3 r) => matrix -> r +det matrix +m = case matrix +mmatrix -> Getting (Endo [r]) matrix r -> [r] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [r]) matrix r (NumType matrix -> Const (Endo [r]) (NumType matrix)) @@ -611,70 +611,70 @@ IndexedTraversal1 (Int, Int) matrix matrix (NumType matrix) (NumType matrix) elements of - [ r -a, r -b, r -c, - r -d, r -e, r -f, - r -g, r -h, r -i] -> r -ar -> r -> r + [ r +a, r +b, r +c, + r +d, r +e, r +f, + r +g, r +h, r +i] -> r +ar -> r -> r forall a. Num a => a -> a -> a *r -er -> r -> r +er -> r -> r forall a. Num a => a -> a -> a *r -i r -> r -> r +i r -> r -> r forall a. Num a => a -> a -> a + r -br -> r -> r +br -> r -> r forall a. Num a => a -> a -> a *r -fr -> r -> r +fr -> r -> r forall a. Num a => a -> a -> a *r -g r -> r -> r +g r -> r -> r forall a. Num a => a -> a -> a + r -cr -> r -> r +cr -> r -> r forall a. Num a => a -> a -> a *r -dr -> r -> r +dr -> r -> r forall a. Num a => a -> a -> a *r -h r -> r -> r +h r -> r -> r forall a. Num a => a -> a -> a - r -cr -> r -> r +cr -> r -> r forall a. Num a => a -> a -> a *r -er -> r -> r +er -> r -> r forall a. Num a => a -> a -> a *r -g r -> r -> r +g r -> r -> r forall a. Num a => a -> a -> a - r -br -> r -> r +br -> r -> r forall a. Num a => a -> a -> a *r -dr -> r -> r +dr -> r -> r forall a. Num a => a -> a -> a *r -i r -> r -> r +i r -> r -> r forall a. Num a => a -> a -> a - r -ar -> r -> r +ar -> r -> r forall a. Num a => a -> a -> a *r -fr -> r -> r +fr -> r -> r forall a. Num a => a -> a -> a *r -h +h [r] _ -> [Char] -> r forall a. HasCallStack => [Char] -> a @@ -683,10 +683,10 @@ {-# INLINE det #-} instance HasDeterminant 4 where - det :: forall r matrix. (Num r, Matrix_ matrix 4 4 r) => matrix -> r -det matrix -m = case matrix -mmatrix -> Getting (Endo [r]) matrix r -> [r] + det :: forall r matrix. (Num r, Matrix_ matrix 4 4 r) => matrix -> r +det matrix +m = case matrix +mmatrix -> Getting (Endo [r]) matrix r -> [r] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [r]) matrix r (NumType matrix -> Const (Endo [r]) (NumType matrix)) @@ -698,205 +698,205 @@ IndexedTraversal1 (Int, Int) matrix matrix (NumType matrix) (NumType matrix) elements of - [ r -i00, r -i01, r -i02, r -i03, - r -i10, r -i11, r -i12, r -i13, - r -i20, r -i21, r -i22, r -i23, - r -i30, r -i31, r -i32, r -i33 ] -> let s0 :: r -s0 = r -i00 r -> r -> r + [ r +i00, r +i01, r +i02, r +i03, + r +i10, r +i11, r +i12, r +i13, + r +i20, r +i21, r +i22, r +i23, + r +i30, r +i31, r +i32, r +i33 ] -> let s0 :: r +s0 = r +i00 r -> r -> r forall a. Num a => a -> a -> a * r -i11 r -> r -> r +i11 r -> r -> r forall a. Num a => a -> a -> a - r -i10 r -> r -> r +i10 r -> r -> r forall a. Num a => a -> a -> a * r -i01 - s1 :: r -s1 = r -i00 r -> r -> r +i01 + s1 :: r +s1 = r +i00 r -> r -> r forall a. Num a => a -> a -> a * r -i12 r -> r -> r +i12 r -> r -> r forall a. Num a => a -> a -> a - r -i10 r -> r -> r +i10 r -> r -> r forall a. Num a => a -> a -> a * r -i02 - s2 :: r -s2 = r -i00 r -> r -> r +i02 + s2 :: r +s2 = r +i00 r -> r -> r forall a. Num a => a -> a -> a * r -i13 r -> r -> r +i13 r -> r -> r forall a. Num a => a -> a -> a - r -i10 r -> r -> r +i10 r -> r -> r forall a. Num a => a -> a -> a * r -i03 - s3 :: r -s3 = r -i01 r -> r -> r +i03 + s3 :: r +s3 = r +i01 r -> r -> r forall a. Num a => a -> a -> a * r -i12 r -> r -> r +i12 r -> r -> r forall a. Num a => a -> a -> a - r -i11 r -> r -> r +i11 r -> r -> r forall a. Num a => a -> a -> a * r -i02 - s4 :: r -s4 = r -i01 r -> r -> r +i02 + s4 :: r +s4 = r +i01 r -> r -> r forall a. Num a => a -> a -> a * r -i13 r -> r -> r +i13 r -> r -> r forall a. Num a => a -> a -> a - r -i11 r -> r -> r +i11 r -> r -> r forall a. Num a => a -> a -> a * r -i03 - s5 :: r -s5 = r -i02 r -> r -> r +i03 + s5 :: r +s5 = r +i02 r -> r -> r forall a. Num a => a -> a -> a * r -i13 r -> r -> r +i13 r -> r -> r forall a. Num a => a -> a -> a - r -i12 r -> r -> r +i12 r -> r -> r forall a. Num a => a -> a -> a * r -i03 +i03 - c5 :: r -c5 = r -i22 r -> r -> r + c5 :: r +c5 = r +i22 r -> r -> r forall a. Num a => a -> a -> a * r -i33 r -> r -> r +i33 r -> r -> r forall a. Num a => a -> a -> a - r -i32 r -> r -> r +i32 r -> r -> r forall a. Num a => a -> a -> a * r -i23 - c4 :: r -c4 = r -i21 r -> r -> r +i23 + c4 :: r +c4 = r +i21 r -> r -> r forall a. Num a => a -> a -> a * r -i33 r -> r -> r +i33 r -> r -> r forall a. Num a => a -> a -> a - r -i31 r -> r -> r +i31 r -> r -> r forall a. Num a => a -> a -> a * r -i23 - c3 :: r -c3 = r -i21 r -> r -> r +i23 + c3 :: r +c3 = r +i21 r -> r -> r forall a. Num a => a -> a -> a * r -i32 r -> r -> r +i32 r -> r -> r forall a. Num a => a -> a -> a - r -i31 r -> r -> r +i31 r -> r -> r forall a. Num a => a -> a -> a * r -i22 - c2 :: r -c2 = r -i20 r -> r -> r +i22 + c2 :: r +c2 = r +i20 r -> r -> r forall a. Num a => a -> a -> a * r -i33 r -> r -> r +i33 r -> r -> r forall a. Num a => a -> a -> a - r -i30 r -> r -> r +i30 r -> r -> r forall a. Num a => a -> a -> a * r -i23 - c1 :: r -c1 = r -i20 r -> r -> r +i23 + c1 :: r +c1 = r +i20 r -> r -> r forall a. Num a => a -> a -> a * r -i32 r -> r -> r +i32 r -> r -> r forall a. Num a => a -> a -> a - r -i30 r -> r -> r +i30 r -> r -> r forall a. Num a => a -> a -> a * r -i22 - c0 :: r -c0 = r -i20 r -> r -> r +i22 + c0 :: r +c0 = r +i20 r -> r -> r forall a. Num a => a -> a -> a * r -i31 r -> r -> r +i31 r -> r -> r forall a. Num a => a -> a -> a - r -i30 r -> r -> r +i30 r -> r -> r forall a. Num a => a -> a -> a * r -i21 +i21 in r -s0 r -> r -> r +s0 r -> r -> r forall a. Num a => a -> a -> a * r -c5 r -> r -> r +c5 r -> r -> r forall a. Num a => a -> a -> a - r -s1 r -> r -> r +s1 r -> r -> r forall a. Num a => a -> a -> a * r -c4 r -> r -> r +c4 r -> r -> r forall a. Num a => a -> a -> a + r -s2 r -> r -> r +s2 r -> r -> r forall a. Num a => a -> a -> a * r -c3 r -> r -> r +c3 r -> r -> r forall a. Num a => a -> a -> a + r -s3 r -> r -> r +s3 r -> r -> r forall a. Num a => a -> a -> a * r -c2 r -> r -> r +c2 r -> r -> r forall a. Num a => a -> a -> a - r -s4 r -> r -> r +s4 r -> r -> r forall a. Num a => a -> a -> a * r -c1 r -> r -> r +c1 r -> r -> r forall a. Num a => a -> a -> a + r -s5 r -> r -> r +s5 r -> r -> r forall a. Num a => a -> a -> a * r -c0 +c0 -- adapted from the implementation in the Linear package. [r] _ -> [Char] -> r @@ -912,22 +912,22 @@ -- | Class of matrices that are invertible. -class Invertible n where +class Invertible n where -- | given an invertable square \(n \times n\) matrix A, computes -- the \(n \times n\) matrix B such that A !*! B = identityMatrix -- - inverseMatrix :: ( Fractional r - , Matrix_ matrix n n r - , Has_ Vector_ n r - ) => matrix -> matrix + inverseMatrix :: ( Fractional r + , Matrix_ matrix n n r + , Has_ Vector_ n r + ) => matrix -> matrix instance Invertible 1 where - inverseMatrix :: forall r matrix. + inverseMatrix :: forall r matrix. (Fractional r, Matrix_ matrix 1 1 r, Has_ Vector_ 1 r) => matrix -> matrix -inverseMatrix matrix -m = matrix -mmatrix -> (matrix -> matrix) -> matrix +inverseMatrix matrix +m = matrix +mmatrix -> (matrix -> matrix) -> matrix forall a b. a -> (a -> b) -> b &(r -> Identity r) -> matrix -> Identity matrix (NumType matrix -> Identity (NumType matrix)) @@ -941,12 +941,12 @@ elements ((r -> Identity r) -> matrix -> Identity matrix) -> (r -> r) -> matrix -> matrix forall s t a b. ASetter s t a b -> (a -> b) -> s -> t -%~ (\r -x -> (r +%~ (\r +x -> (r 1r -> r -> r forall a. Fractional a => a -> a -> a /r -x)) +x)) -- slightly weird way of writing this, since there is only one element, but whatever {-# INLINE inverseMatrix #-} @@ -954,12 +954,12 @@ -- >>> printMatrix $ inverseMatrix $ matrixFromList' @(Matrix 2 2 Double) [1,2, 3,4] -- (Vector2 (-2.0) 1.0) -- (Vector2 1.5 (-0.5)) - inverseMatrix :: forall r matrix. + inverseMatrix :: forall r matrix. (Fractional r, Matrix_ matrix 2 2 r, Has_ Vector_ 2 r) => matrix -> matrix -inverseMatrix matrix -m = case matrix -mmatrix -> Getting (Endo [r]) matrix r -> [r] +inverseMatrix matrix +m = case matrix +mmatrix -> Getting (Endo [r]) matrix r -> [r] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [r]) matrix r (NumType matrix -> Const (Endo [r]) (NumType matrix)) @@ -971,13 +971,13 @@ IndexedTraversal1 (Int, Int) matrix matrix (NumType matrix) (NumType matrix) elements of - [r -a,r -b, - r -c,r -d] -> let s :: r -s = r + [r +a,r +b, + r +c,r +d] -> let s :: r +s = r 1 r -> r -> r forall a. Fractional a => a -> a -> a / matrix -> r @@ -986,9 +986,9 @@ matrix -> r forall r matrix. (Num r, Matrix_ matrix 2 2 r) => matrix -> r det matrix -m +m in r -s r -> matrix -> matrix +s r -> matrix -> matrix forall matrix (n :: Nat) (m :: Nat) r. (Matrix_ matrix n m r, Num r) => r -> matrix -> matrix @@ -1008,17 +1008,17 @@ (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r -d (r -> r +d (r -> r forall a. Num a => a -> a negate r -b)) +b)) (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (r -> r forall a. Num a => a -> a negate r -c) r -a)) +c) r +a)) [r] _ -> [Char] -> matrix forall a. HasCallStack => [Char] -> a @@ -1032,12 +1032,12 @@ -- (Vector3 0.0 0.5 (-1.0)) -- (Vector3 (-0.5) (-0.75) 3.5) -- (Vector3 0.5 0.25 (-1.5)) - inverseMatrix :: forall r matrix. + inverseMatrix :: forall r matrix. (Fractional r, Matrix_ matrix 3 3 r, Has_ Vector_ 3 r) => matrix -> matrix -inverseMatrix matrix -m = case matrix -mmatrix -> Getting (Endo [r]) matrix r -> [r] +inverseMatrix matrix +m = case matrix +mmatrix -> Getting (Endo [r]) matrix r -> [r] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [r]) matrix r (NumType matrix -> Const (Endo [r]) (NumType matrix)) @@ -1049,19 +1049,19 @@ IndexedTraversal1 (Int, Int) matrix matrix (NumType matrix) (NumType matrix) elements of - [ r -a, r -b, r -c, - r -d, r -e, r -f, - r -g, r -h, r -i] -> let lambda :: r -lambda = r + [ r +a, r +b, r +c, + r +d, r +e, r +f, + r +g, r +h, r +i] -> let lambda :: r +lambda = r 1 r -> r -> r forall a. Fractional a => a -> a -> a / matrix -> r @@ -1070,81 +1070,81 @@ matrix -> r forall r matrix. (Num r, Matrix_ matrix 3 3 r) => matrix -> r det matrix -m - aa :: r -aa = r -> r -> r -> r -> r +m + aa :: r +aa = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -e r -f r -h r -i - bb :: r -bb = r -> r -> r -> r -> r +e r +f r +h r +i + bb :: r +bb = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -c r -b r -i r -h - cc :: r -cc = r -> r -> r -> r -> r +c r +b r +i r +h + cc :: r +cc = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -b r -c r -e r -f - dd :: r -dd = r -> r -> r -> r -> r +b r +c r +e r +f + dd :: r +dd = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -f r -d r -i r -g - ee :: r -ee = r -> r -> r -> r -> r +f r +d r +i r +g + ee :: r +ee = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -a r -c r -g r -i - ff :: r -ff = r -> r -> r -> r -> r +a r +c r +g r +i + ff :: r +ff = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -c r -a r -f r -d - gg :: r -gg = r -> r -> r -> r -> r +c r +a r +f r +d + gg :: r +gg = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -d r -e r -g r -h - hh :: r -hh = r -> r -> r -> r -> r +d r +e r +g r +h + hh :: r +hh = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -b r -a r -h r -g - ii :: r -ii = r -> r -> r -> r -> r +b r +a r +h r +g + ii :: r +ii = r -> r -> r -> r -> r forall r. Num r => r -> r -> r -> r -> r det22 r -a r -b r -d r -e +a r +b r +d r +e in r -lambda r -> matrix -> matrix +lambda r -> matrix -> matrix forall matrix (n :: Nat) (m :: Nat) r. (Matrix_ matrix n m r, Num r) => r -> matrix -> matrix @@ -1164,21 +1164,21 @@ (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -aa r -bb r -cc) +aa r +bb r +cc) (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -dd r -ee r -ff) +dd r +ee r +ff) (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -gg r -hh r -ii)) +gg r +hh r +ii)) [r] _ -> [Char] -> matrix forall a. HasCallStack => [Char] -> a diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Internal.html b/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Internal.html index 210e02a91..918452d2b 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Internal.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Matrix.Internal.html @@ -7,24 +7,24 @@ -- | Creates a row with zeroes everywhere, except at position i, where the -- value is the supplied value. -mkRow :: forall d r. (Num r, Has_ Vector_ d r) => Int -> r -> Vector d r +mkRow :: forall d r. (Num r, Has_ Vector_ d r) => Int -> r -> Vector d r mkRow :: forall (d :: Nat) r. (Num r, Has_ Vector_ d r) => Int -> r -> Vector d r -mkRow Int -i r -x = (Int -> r) -> Vector d r +mkRow Int +i r +x = (Int -> r) -> Vector d r forall vector (d :: Nat) r. Vector_ vector d r => (Int -> r) -> vector generate ((Int -> r) -> Vector d r) -> (Int -> r) -> Vector d r forall a b. (a -> b) -> a -> b -$ \Int -j -> if Int -i Int -> Int -> Bool +$ \Int +j -> if Int +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -j then r -x else r +j then r +x else r 0 \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Transformation.Internal.html b/haddocks/hgeometry/kernel/src/HGeometry.Transformation.Internal.html index a87915356..d73f27344 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Transformation.Internal.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Transformation.Internal.html @@ -29,14 +29,14 @@ -- * Transformations -- | A type representing a Transformation for d dimensional objects -newtype Transformation d r = Transformation { forall (d :: Natural) r. +newtype Transformation d r = Transformation { forall (d :: Natural) r. Transformation d r -> Matrix (d + 1) (d + 1) r -_transformationMatrix :: Matrix (d + 1) (d + 1) r } +_transformationMatrix :: Matrix (d + 1) (d + 1) r } -- | Transformations and Matrices are isomorphic. -transformationMatrix :: Iso (Transformation d r) (Transformation d s) - (Matrix (d + 1) (d + 1) r) (Matrix (d + 1) (d + 1) s) +transformationMatrix :: Iso (Transformation d r) (Transformation d s) + (Matrix (d + 1) (d + 1) r) (Matrix (d + 1) (d + 1) s) transformationMatrix :: forall (d :: Natural) r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Matrix (d + 1) (d + 1) r) (f (Matrix (d + 1) (d + 1) s)) @@ -57,31 +57,31 @@ Matrix (d + 1) (d + 1) r -> Transformation d r Transformation -deriving stock instance (Show (Matrix (d+1) (d+1) r)) => Show (Transformation d r) -deriving newtype instance (Eq (Matrix (d+1) (d+1) r)) => Eq (Transformation d r) -deriving newtype instance (Ord (Matrix (d+1) (d+1) r)) => Ord (Transformation d r) +deriving stock instance (Show (Matrix (d+1) (d+1) r)) => Show (Transformation d r) +deriving newtype instance (Eq (Matrix (d+1) (d+1) r)) => Eq (Transformation d r) +deriving newtype instance (Ord (Matrix (d+1) (d+1) r)) => Ord (Transformation d r) -type instance NumType (Transformation d r) = r +type instance NumType (Transformation d r) = r -- | Compose transformations (right to left) -(|.|) :: (Num r, OptMatrix_ (d+1) r) - => Transformation d r -> Transformation d r - -> Transformation d r -(Transformation Matrix (d + 1) (d + 1) r -f) |.| :: forall r (d :: Natural). +(|.|) :: (Num r, OptMatrix_ (d+1) r) + => Transformation d r -> Transformation d r + -> Transformation d r +(Transformation Matrix (d + 1) (d + 1) r +f) |.| :: forall r (d :: Natural). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r -|.| (Transformation Matrix (d + 1) (d + 1) r -g) = Matrix (d + 1) (d + 1) r -> Transformation d r +|.| (Transformation Matrix (d + 1) (d + 1) r +g) = Matrix (d + 1) (d + 1) r -> Transformation d r forall (d :: Natural) r. Matrix (d + 1) (d + 1) r -> Transformation d r Transformation (Matrix (d + 1) (d + 1) r -> Transformation d r) -> Matrix (d + 1) (d + 1) r -> Transformation d r forall a b. (a -> b) -> a -> b $ Matrix (d + 1) (d + 1) r -f Matrix (d + 1) (d + 1) r +f Matrix (d + 1) (d + 1) r -> Matrix (d + 1) (d + 1) r -> Matrix (d + 1) (d + 1) r forall matrix (n :: Natural) (m :: Natural) r matrix' (m' :: Natural) matrix''. @@ -93,11 +93,11 @@ Num r, Additive_ (Vector (d + 1) r) (d + 1) r) => Matrix (d + 1) (d + 1) r -> matrix' -> matrix'' !*! Matrix (d + 1) (d + 1) r -g +g {-# INLINE (|.|) #-} -- | Identity transformation; i.e. the transformation which does not change anything. -identity :: (Num r, OptMatrix_ (d+1) r) => Transformation d r +identity :: (Num r, OptMatrix_ (d+1) r) => Transformation d r identity :: forall r (d :: Natural). (Num r, OptMatrix_ (d + 1) r) => Transformation d r @@ -111,16 +111,16 @@ identityMatrix -instance (Num r, OptMatrix_ (d+1) r) => Semigroup (Transformation d r) where - <> :: Transformation d r -> Transformation d r -> Transformation d r +instance (Num r, OptMatrix_ (d+1) r) => Semigroup (Transformation d r) where + <> :: Transformation d r -> Transformation d r -> Transformation d r (<>) = Transformation d r -> Transformation d r -> Transformation d r forall r (d :: Natural). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r (|.|) {-# INLINE (<>) #-} -instance (Num r, OptMatrix_ (d+1) r) => Monoid (Transformation d r) where - mempty :: Transformation d r +instance (Num r, OptMatrix_ (d+1) r) => Monoid (Transformation d r) where + mempty :: Transformation d r mempty = Transformation d r forall r (d :: Natural). (Num r, OptMatrix_ (d + 1) r) => @@ -133,8 +133,8 @@ -- -- >>> inverseOf $ translation (Vector2 (10.0) (5.0)) -- Transformation {_transformationMatrix = Matrix (Vector3 (Vector3 1.0 0.0 (-10.0)) (Vector3 0.0 1.0 (-5.0)) (Vector3 0.0 0.0 1.0))} -inverseOf :: (Fractional r, OptMatrix_ (d+1) r, Invertible (d + 1)) - => Transformation d r -> Transformation d r +inverseOf :: (Fractional r, OptMatrix_ (d+1) r, Invertible (d + 1)) + => Transformation d r -> Transformation d r inverseOf :: forall r (d :: Natural). (Fractional r, OptMatrix_ (d + 1) r, Invertible (d + 1)) => Transformation d r -> Transformation d r @@ -171,37 +171,37 @@ -- | Some constraints that we will pretty much need to transform a d -- dimensional object whose numtype is r -type TransformationConstraints d r = - ( KnownNat d - , Has_ Vector_ d r - , OptMatrix_ (d+1) r - , HasComponents (Vector (d+1) r) - (Vector (d+1) (Vector (d+1) r)) - , Has_ Additive_ (d+1) r +type TransformationConstraints d r = + ( KnownNat d + , Has_ Vector_ d r + , OptMatrix_ (d+1) r + , HasComponents (Vector (d+1) r) + (Vector (d+1) (Vector (d+1) r)) + , Has_ Additive_ (d+1) r ) -- | Bunch of constraints we need for the default implementation of transformBy -type DefaultTransformByConstraints g d r = - ( d ~ Dimension g, r ~ NumType g +type DefaultTransformByConstraints g d r = + ( d ~ Dimension g, r ~ NumType g -- , forall point. HasPoints g g point point -- , Point_ point d r - , OptMatrix_ (d+1) r - , Fractional r - , Has_ Additive_ d r - , HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r) + , OptMatrix_ (d+1) r + , Fractional r + , Has_ Additive_ d r + , HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r) ) -- | A class representing types that can be transformed using a transformation -class IsTransformable g where - transformBy :: Transformation (Dimension g) (NumType g) -> g -> g - default transformBy :: forall d r point. - ( DefaultTransformByConstraints g d r - , Point_ point d r - , HasPoints g g point point +class IsTransformable g where + transformBy :: Transformation (Dimension g) (NumType g) -> g -> g + default transformBy :: forall d r point. + ( DefaultTransformByConstraints g d r + , Point_ point d r + , HasPoints g g point point ) - => Transformation (Dimension g) (NumType g) -> g -> g - transformBy Transformation (Dimension g) (NumType g) -t = ASetter g g (Point d r) (Point d r) + => Transformation (Dimension g) (NumType g) -> g -> g + transformBy Transformation (Dimension g) (NumType g) +t = ASetter g g (Point d r) (Point d r) -> (Point d r -> Point d r) -> g -> g forall s t a b. ASetter s t a b -> (a -> b) -> s -> t over ((point -> Identity point) -> g -> Identity g @@ -230,16 +230,16 @@ Transformation (Dimension g) (NumType g) -> g -> g transformBy Transformation (Dimension g) (NumType g) Transformation (Dimension (Point d r)) (NumType (Point d r)) -t) +t) {-# INLINE transformBy #-} -instance (Fractional r, Has_ Vector_ d r, OptMatrix_ (d+1) r - , HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r) - ) => IsTransformable (Point d r) where - transformBy :: Transformation (Dimension (Point d r)) (NumType (Point d r)) +instance (Fractional r, Has_ Vector_ d r, OptMatrix_ (d+1) r + , HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r) + ) => IsTransformable (Point d r) where + transformBy :: Transformation (Dimension (Point d r)) (NumType (Point d r)) -> Point d r -> Point d r -transformBy Transformation (Dimension (Point d r)) (NumType (Point d r)) -t = Vector d r -> Point d r +transformBy Transformation (Dimension (Point d r)) (NumType (Point d r)) +t = Vector d r -> Point d r forall v. v -> PointF v Point (Vector d r -> Point d r) -> (Point d r -> Vector d r) -> Point d r -> Point d r @@ -251,7 +251,7 @@ Transformation (Dimension g) (NumType g) -> g -> g transformBy Transformation (Dimension (Point d r)) (NumType (Point d r)) Transformation (Dimension (Vector d r)) (NumType (Vector d r)) -t (Vector d r -> Vector d r) +t (Vector d r -> Vector d r) -> (Point d r -> Vector d r) -> Point d r -> Vector d r forall b c a. (b -> c) -> (a -> b) -> a -> c . Point d r -> Vector d r @@ -259,28 +259,28 @@ toVec {-# INLINE transformBy #-} -instance ( Fractional r - , Has_ Vector_ d r - , OptMatrix_ (d+1) r - , HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r) +instance ( Fractional r + , Has_ Vector_ d r + , OptMatrix_ (d+1) r + , HasComponents (Vector (1 + d) (Vector (1 + d) r)) (Vector (1 + d) r) -- , d < d+1 - ) => IsTransformable (Vector d r) where - transformBy :: Transformation (Dimension (Vector d r)) (NumType (Vector d r)) + ) => IsTransformable (Vector d r) where + transformBy :: Transformation (Dimension (Vector d r)) (NumType (Vector d r)) -> Vector d r -> Vector d r -transformBy (Transformation Matrix +transformBy (Transformation Matrix (Dimension (Vector d r) + 1) (Dimension (Vector d r) + 1) (NumType (Vector d r)) -m) Vector d r -v = Vector (d + 1) r -> Vector d r -f (Vector (d + 1) r -> Vector d r) -> Vector (d + 1) r -> Vector d r +m) Vector d r +v = Vector (d + 1) r -> Vector d r +f (Vector (d + 1) r -> Vector d r) -> Vector (d + 1) r -> Vector d r forall a b. (a -> b) -> a -> b $ Matrix (d + 1) (d + 1) r Matrix (Dimension (Vector d r) + 1) (Dimension (Vector d r) + 1) (NumType (Vector d r)) -m Matrix (d + 1) (d + 1) r -> Vector (d + 1) r -> Vector (d + 1) r +m Matrix (d + 1) (d + 1) r -> Vector (d + 1) r -> Vector (d + 1) r forall matrix (n :: Natural) (m :: Natural) r. (Matrix_ matrix n m r, Has_ Vector_ n (Vector m r), HasComponents (Vector n (Vector m r)) (Vector n r), @@ -291,38 +291,38 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' snoc Vector d r -v r -1 :: Vector (d+1) r) +v r +1 :: Vector (d+1) r) where - f :: Vector (d+1) r -> Vector d r - f :: Vector (d + 1) r -> Vector d r -f Vector (d + 1) r -u = let (Vector d r -u',r -x) = Vector (d + 1) r -> (Vector d r, r) + f :: Vector (d+1) r -> Vector d r + f :: Vector (d + 1) r -> Vector d r +f Vector (d + 1) r +u = let (Vector d r +u',r +x) = Vector (d + 1) r -> (Vector d r, r) forall vector' vector (d :: Natural) r. (Vector_ vector (d + 1) r, Vector_ vector' d r, d <= ((d + 1) - 1), d <= Dimension vector) => vector -> (vector', r) unsnoc Vector (d + 1) r -u +u in Vector d r -u' Vector d r -> r -> Vector d r +u' Vector d r -> r -> Vector d r forall vector (d :: Natural) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector ^/ r -x +x {-# INLINE transformBy #-} -instance IsTransformable core => IsTransformable (core :+ extra) where +instance IsTransformable core => IsTransformable (core :+ extra) where -- ^ transforms only the core. - transformBy :: Transformation + transformBy :: Transformation (Dimension (core :+ extra)) (NumType (core :+ extra)) -> (core :+ extra) -> core :+ extra -transformBy Transformation +transformBy Transformation (Dimension (core :+ extra)) (NumType (core :+ extra)) -t = ASetter (core :+ extra) (core :+ extra) core core +t = ASetter (core :+ extra) (core :+ extra) core core -> (core -> core) -> (core :+ extra) -> core :+ extra forall s t a b. ASetter s t a b -> (a -> b) -> s -> t over ASetter (core :+ extra) (core :+ extra) core core @@ -336,7 +336,7 @@ transformBy Transformation (Dimension core) (NumType core) Transformation (Dimension (core :+ extra)) (NumType (core :+ extra)) -t) +t) -------------------------------------------------------------------------------- -- * Common transformations @@ -345,16 +345,16 @@ -- -- >>> transformBy (translation $ Vector2 1 2) $ Point2 2 3 -- Point2 3.0 5.0 -translation :: forall d r vector. ( Num r - , Vector_ vector d r - , TransformationConstraints d r +translation :: forall d r vector. ( Num r + , Vector_ vector d r + , TransformationConstraints d r ) - => vector -> Transformation d r + => vector -> Transformation d r translation :: forall (d :: Natural) r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r -translation vector -v = Matrix (d + 1) (d + 1) r -> Transformation d r +translation vector +v = Matrix (d + 1) (d + 1) r -> Transformation d r forall (d :: Natural) r. Matrix (d + 1) (d + 1) r -> Transformation d r Transformation (Matrix (d + 1) (d + 1) r -> Transformation d r) @@ -413,8 +413,8 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' snoc vector -v r -1 :: Vector (d+1) r) +v r +1 :: Vector (d+1) r) {-# INLINE translation #-} -- class CFunctorWithIndex @@ -434,16 +434,16 @@ -- -- >>> transformBy (scaling $ Vector2 2 (-1)) $ Point2 2 3 -- Point2 4.0 (-3.0) -scaling :: forall d r vector. ( Num r - , Vector_ vector d r - , TransformationConstraints d r +scaling :: forall d r vector. ( Num r + , Vector_ vector d r + , TransformationConstraints d r ) - => vector -> Transformation d r + => vector -> Transformation d r scaling :: forall (d :: Natural) r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r -scaling vector -v = Matrix (d + 1) (d + 1) r -> Transformation d r +scaling vector +v = Matrix (d + 1) (d + 1) r -> Transformation d r forall (d :: Natural) r. Matrix (d + 1) (d + 1) r -> Transformation d r Transformation (Matrix (d + 1) (d + 1) r -> Transformation d r) @@ -503,8 +503,8 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' snoc vector -v r -1 :: Vector (d+1) r) +v r +1 :: Vector (d+1) r) {-# INLINE scaling #-} -- | Create scaling transformation from a scalar that is applied @@ -516,13 +516,13 @@ -- True -- >>> uniformScaling 5 == scaling (Vector3 5 5 5) -- True -uniformScaling :: forall d r. ( Num r, TransformationConstraints d r - ) => r -> Transformation d r +uniformScaling :: forall d r. ( Num r, TransformationConstraints d r + ) => r -> Transformation d r uniformScaling :: forall (d :: Natural) r. (Num r, TransformationConstraints d r) => r -> Transformation d r -uniformScaling r -x = Vector d r -> Transformation d r +uniformScaling r +x = Vector d r -> Transformation d r forall (d :: Natural) r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r @@ -532,10 +532,10 @@ $ forall vector (d :: Natural) r. Vector_ vector d r => (Int -> r) -> vector -generate @(Vector d r) (r -> Int -> r +generate @(Vector d r) (r -> Int -> r forall a b. a -> b -> a const r -x) +x) {-# INLINE uniformScaling #-} @@ -556,11 +556,11 @@ -- -- >>> translateBy (Vector2 1 2) $ Point2 2 3 -- Point2 3.0 5.0 -translateBy :: ( IsTransformable g - , Num (NumType g) - , Vector_ vector (Dimension g) (NumType g) - , TransformationConstraints (Dimension g) (NumType g) - ) => vector -> g -> g +translateBy :: ( IsTransformable g + , Num (NumType g) + , Vector_ vector (Dimension g) (NumType g) + , TransformationConstraints (Dimension g) (NumType g) + ) => vector -> g -> g translateBy :: forall g vector. (IsTransformable g, Num (NumType g), Vector_ vector (Dimension g) (NumType g), @@ -588,10 +588,10 @@ -- -- >>> scaleBy (Vector2 2 (-1)) $ Point2 2 3 -- Point2 4.0 (-3.0) -scaleBy :: ( IsTransformable g, Num (NumType g) - , Vector_ vector (Dimension g) (NumType g) - , TransformationConstraints (Dimension g) (NumType g) - ) => vector -> g -> g +scaleBy :: ( IsTransformable g, Num (NumType g) + , Vector_ vector (Dimension g) (NumType g) + , TransformationConstraints (Dimension g) (NumType g) + ) => vector -> g -> g scaleBy :: forall g vector. (IsTransformable g, Num (NumType g), Vector_ vector (Dimension g) (NumType g), @@ -620,9 +620,9 @@ -- -- >>> scaleUniformlyBy 5 $ Point2 2 3 -- Point2 10.0 15.0 -scaleUniformlyBy :: ( IsTransformable g, Num (NumType g) - , TransformationConstraints (Dimension g) (NumType g) - ) => NumType g -> g -> g +scaleUniformlyBy :: ( IsTransformable g, Num (NumType g) + , TransformationConstraints (Dimension g) (NumType g) + ) => NumType g -> g -> g scaleUniformlyBy :: forall g. (IsTransformable g, Num (NumType g), TransformationConstraints (Dimension g) (NumType g)) => @@ -646,23 +646,23 @@ -- | Row in a translation matrix -transRow :: forall n r . ( Num r - , Has_ Additive_ (n+1) r +transRow :: forall n r . ( Num r + , Has_ Additive_ (n+1) r ) - => Int -> r -> Vector (n + 1) r + => Int -> r -> Vector (n + 1) r transRow :: forall (n :: Natural) r. (Num r, Has_ Additive_ (n + 1) r) => Int -> r -> Vector (n + 1) r -transRow Int -i r -x = ASetter (Vector (n + 1) r) (Vector (n + 1) r) r r +transRow Int +i r +x = ASetter (Vector (n + 1) r) (Vector (n + 1) r) r r -> r -> Vector (n + 1) r -> Vector (n + 1) r forall s t a b. ASetter s t a b -> b -> s -> t set (forall (i :: Natural) vector r (d :: Natural). (i <= (d - 1), KnownNat i, Vector_ vector d r) => IndexedLens' Int vector r -component @n) r -x (Vector (n + 1) r -> Vector (n + 1) r) +component @n) r +x (Vector (n + 1) r -> Vector (n + 1) r) -> Vector (n + 1) r -> Vector (n + 1) r forall a b. (a -> b) -> a -> b $ Int -> r -> Vector (n + 1) r @@ -670,30 +670,30 @@ (Num r, Has_ Vector_ d r) => Int -> r -> Vector d r mkRow Int -i r +i r 1 -- | Creates a row with zeroes everywhere, except at position i, where the -- value is the supplied value. -mkRow :: forall d r. (Num r, Has_ Vector_ d r) => Int -> r -> Vector d r +mkRow :: forall d r. (Num r, Has_ Vector_ d r) => Int -> r -> Vector d r mkRow :: forall (d :: Natural) r. (Num r, Has_ Vector_ d r) => Int -> r -> Vector d r -mkRow Int -i r -x = (Int -> r) -> Vector d r +mkRow Int +i r +x = (Int -> r) -> Vector d r forall vector (d :: Natural) r. Vector_ vector d r => (Int -> r) -> vector generate ((Int -> r) -> Vector d r) -> (Int -> r) -> Vector d r forall a b. (a -> b) -> a -> b -$ \Int -j -> if Int -i Int -> Int -> Bool +$ \Int +j -> if Int +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -j then r -x else r +j then r +x else r 0 -------------------------------------------------------------------------------- @@ -703,13 +703,13 @@ -- construct the appropriate rotation that does this. -- -- -rotateTo :: ( Num r - ) => Vector 3 (Vector 3 r) -> Transformation 3 r +rotateTo :: ( Num r + ) => Vector 3 (Vector 3 r) -> Transformation 3 r rotateTo :: forall r. Num r => Vector 3 (Vector 3 r) -> Transformation 3 r -rotateTo (Vector3 Vector 3 r -u Vector 3 r -v Vector 3 r -w) = Matrix 4 4 r -> Transformation 3 r +rotateTo (Vector3 Vector 3 r +u Vector 3 r +v Vector 3 r +w) = Matrix 4 4 r -> Transformation 3 r Matrix (3 + 1) (3 + 1) r -> Transformation 3 r forall (d :: Natural) r. Matrix (d + 1) (d + 1) r -> Transformation d r @@ -732,21 +732,21 @@ (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' snoc Vector 3 r -u r +u r 0) (Vector 3 r -> r -> Vector 4 r forall vector' vector (d :: Natural) r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' snoc Vector 3 r -v r +v r 0) (Vector 3 r -> r -> Vector 4 r forall vector' vector (d :: Natural) r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' snoc Vector 3 r -w r +w r 0) (r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r @@ -762,11 +762,11 @@ -- | Skew transformation that keeps the y-coordinates fixed and shifts -- the x coordinates. -skewX :: ( Num r - ) => r -> Transformation 2 r +skewX :: ( Num r + ) => r -> Transformation 2 r skewX :: forall r. Num r => r -> Transformation 2 r -skewX r -lambda = Matrix 3 3 r -> Transformation 2 r +skewX r +lambda = Matrix 3 3 r -> Transformation 2 r Matrix (2 + 1) (2 + 1) r -> Transformation 2 r forall (d :: Natural) r. Matrix (d + 1) (d + 1) r -> Transformation d r @@ -787,7 +787,7 @@ forall r. r -> r -> r -> Vector 3 r Vector3 r 1 r -lambda r +lambda r 0) (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r @@ -805,10 +805,10 @@ -- | Create a matrix that corresponds to a rotation by 'a' radians counter-clockwise -- around the origin. -rotation :: (Floating r) => r -> Transformation 2 r +rotation :: (Floating r) => r -> Transformation 2 r rotation :: forall r. Floating r => r -> Transformation 2 r -rotation r -a = Matrix 3 3 r -> Transformation 2 r +rotation r +a = Matrix 3 3 r -> Transformation 2 r Matrix (2 + 1) (2 + 1) r -> Transformation 2 r forall (d :: Natural) r. Matrix (d + 1) (d + 1) r -> Transformation d r @@ -830,20 +830,20 @@ Vector3 (r -> r forall a. Floating a => a -> a cos r -a) (- r -> r +a) (- r -> r forall a. Floating a => a -> a sin r -a) r +a) r 0) (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (r -> r forall a. Floating a => a -> a sin r -a) ( r -> r +a) ( r -> r forall a. Floating a => a -> a cos r -a) r +a) r 0) (r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r @@ -855,14 +855,14 @@ -- | Create a matrix that corresponds to a reflection in a line through the origin -- which makes an angle of 'a' radians with the positive 'x'-asis, in counter-clockwise -- orientation. -reflection :: ( Floating r - ) => r -> Transformation 2 r +reflection :: ( Floating r + ) => r -> Transformation 2 r reflection :: forall r. Floating r => r -> Transformation 2 r -reflection r -a = r -> Transformation 2 r +reflection r +a = r -> Transformation 2 r forall r. Floating r => r -> Transformation 2 r rotation r -a Transformation 2 r -> Transformation 2 r -> Transformation 2 r +a Transformation 2 r -> Transformation 2 r -> Transformation 2 r forall r (d :: Natural). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r @@ -875,10 +875,10 @@ |.| r -> Transformation 2 r forall r. Floating r => r -> Transformation 2 r rotation (-r -a) +a) -- | Vertical reflection -reflectionV :: (Num r) => Transformation 2 r +reflectionV :: (Num r) => Transformation 2 r reflectionV :: forall r. Num r => Transformation 2 r reflectionV = Matrix 3 3 r -> Transformation 2 r Matrix (2 + 1) (2 + 1) r -> Transformation 2 r @@ -917,7 +917,7 @@ 1) -- | Horizontal reflection -reflectionH :: (Num r) => Transformation 2 r +reflectionH :: (Num r) => Transformation 2 r reflectionH :: forall r. Num r => Transformation 2 r reflectionH = Matrix 3 3 r -> Transformation 2 r Matrix (2 + 1) (2 + 1) r -> Transformation 2 r diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Transformation.html b/haddocks/hgeometry/kernel/src/HGeometry.Transformation.html index 8e4e70725..284427075 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Transformation.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Transformation.html @@ -41,23 +41,23 @@ -- | Given a rectangle r and a geometry g with its boundingbox, -- transform the g to fit r. -fitToBox :: forall rectangle g point r. - ( NumType g ~ r, Dimension g ~ 2 - , IsTransformable g - , IsBoxable g - , Rectangle_ rectangle point - , Point_ point 2 r - , Ord r, Fractional r +fitToBox :: forall rectangle g point r. + ( NumType g ~ r, Dimension g ~ 2 + , IsTransformable g + , IsBoxable g + , Rectangle_ rectangle point + , Point_ point 2 r + , Ord r, Fractional r -- , HasComponents (Vector 2 (ClosedInterval r)) (Vector 2 r) - ) => rectangle -> g -> g + ) => rectangle -> g -> g fitToBox :: forall rectangle g point r. (NumType g ~ r, Dimension g ~ 2, IsTransformable g, IsBoxable g, Rectangle_ rectangle point, Point_ point 2 r, Ord r, Fractional r) => rectangle -> g -> g -fitToBox rectangle -r g -g = Transformation (Dimension g) (NumType g) -> g -> g +fitToBox rectangle +r g +g = Transformation (Dimension g) (NumType g) -> g -> g forall g. IsTransformable g => Transformation (Dimension g) (NumType g) -> g -> g @@ -68,34 +68,34 @@ Fractional r) => rectangle -> g -> Transformation 2 r fitToBoxTransform rectangle -r g -g) g -g +r g +g) g +g {-# INLINE fitToBox #-} -- | Given a rectangle r and a geometry g with its boundingbox, -- compute a transformation can fit g to r. -fitToBoxTransform :: forall rectangle g point r. - ( NumType g ~ r, Dimension g ~ 2 - , IsTransformable g - , IsBoxable g - , Rectangle_ rectangle point - , Point_ point 2 r - , Ord r, Fractional r - ) => rectangle -> g -> Transformation 2 r +fitToBoxTransform :: forall rectangle g point r. + ( NumType g ~ r, Dimension g ~ 2 + , IsTransformable g + , IsBoxable g + , Rectangle_ rectangle point + , Point_ point 2 r + , Ord r, Fractional r + ) => rectangle -> g -> Transformation 2 r fitToBoxTransform :: forall rectangle g point r. (NumType g ~ r, Dimension g ~ 2, IsTransformable g, IsBoxable g, Rectangle_ rectangle point, Point_ point 2 r, Ord r, Fractional r) => rectangle -> g -> Transformation 2 r -fitToBoxTransform rectangle -r g -g = Vector (Dimension point) (NumType point) -> Transformation 2 r +fitToBoxTransform rectangle +r g +g = Vector (Dimension point) (NumType point) -> Transformation 2 r forall (d :: Nat) r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r translation Vector (Dimension point) (NumType point) -v2 Transformation 2 r -> Transformation 2 r -> Transformation 2 r +v2 Transformation 2 r -> Transformation 2 r -> Transformation 2 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r @@ -104,7 +104,7 @@ (Num r, TransformationConstraints d r) => r -> Transformation d r uniformScaling r -lam Transformation 2 r -> Transformation 2 r -> Transformation 2 r +lam Transformation 2 r -> Transformation 2 r -> Transformation 2 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r @@ -113,10 +113,10 @@ (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r translation Vector 2 r -v1 +v1 where - b :: Box (Point 2 r) -b = g -> Box (Point 2 r) + b :: Box (Point 2 r) +b = g -> Box (Point 2 r) forall (d :: Nat) r. (d ~ Dimension g, r ~ NumType g, Ord r) => g -> Box (Point d r) @@ -124,17 +124,17 @@ (IsBoxable g, d ~ Dimension g, r ~ NumType g, Ord r) => g -> Box (Point d r) boundingBox g -g - v1 :: Vector 2 r - v1 :: Vector 2 r -v1 = Vector 2 r -> Vector 2 r +g + v1 :: Vector 2 r + v1 :: Vector 2 r +v1 = Vector 2 r -> Vector 2 r forall r vector (d :: Nat). (Num r, Vector_ vector d r) => vector -> vector negated (Vector 2 r -> Vector 2 r) -> Vector 2 r -> Vector 2 r forall a b. (a -> b) -> a -> b $ Box (Point 2 r) -bBox (Point 2 r) +bBox (Point 2 r) -> Getting (Vector 2 r) (Box (Point 2 r)) (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a @@ -160,9 +160,9 @@ Lens point point' (Vector d r) (Vector d s) Lens (Point 2 r) (Point 2 r) (Vector 2 r) (Vector 2 r) vector - v2 :: Vector (Dimension point) (NumType point) -v2 = rectangle -rrectangle + v2 :: Vector (Dimension point) (NumType point) +v2 = rectangle +rrectangle -> Getting (Vector (Dimension point) (NumType point)) rectangle @@ -206,8 +206,8 @@ (Vector (Dimension point) (NumType point)) (Vector (Dimension point) (NumType point)) vector - lam :: r -lam = Getting (Min r) (Vector 2 r) r -> Vector 2 r -> r + lam :: r +lam = Getting (Min r) (Vector 2 r) r -> Vector 2 r -> r forall a s. Ord a => Getting (Min a) s a -> s -> a minimum1Of Getting (Min r) (Vector 2 r) r (IxValue (Vector 2 r) -> Const (Min r) (IxValue (Vector 2 r))) @@ -235,11 +235,11 @@ (Box_ box point, Point_ point d r, Num r, Functor (Vector d)) => box -> Vector d r Box.size rectangle -r) (Box (Point 2 r) -> Vector 2 r +r) (Box (Point 2 r) -> Vector 2 r forall box (d :: Nat) point r. (Box_ box point, Point_ point d r, Num r, Functor (Vector d)) => box -> Vector d r Box.size Box (Point 2 r) -b) +b) {-# INLINE fitToBoxTransform #-} \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Triangle.Class.html b/haddocks/hgeometry/kernel/src/HGeometry.Triangle.Class.html index 10f723352..247df48f8 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Triangle.Class.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Triangle.Class.html @@ -30,39 +30,39 @@ -- | Class representing triangles -class ( Point_ point (Dimension point) (NumType point) +class ( Point_ point (Dimension point) (NumType point) ) - => Triangle_ triangle point | triangle -> point where + => Triangle_ triangle point | triangle -> point where -- | Construct a triangle from its three vertices. - mkTriangle :: point -> point -> point -> triangle + mkTriangle :: point -> point -> point -> triangle -- | Lens to access the corners of the triangle. - corners :: Lens' triangle (Vector 3 point) + corners :: Lens' triangle (Vector 3 point) -- IndexedTraversal1' Int triangle point -- | Constructs a triangle -pattern Triangle_ :: Triangle_ triangle point => point -> point -> point -> triangle +pattern Triangle_ :: Triangle_ triangle point => point -> point -> point -> triangle pattern $mTriangle_ :: forall {r} {triangle} {point}. Triangle_ triangle point => triangle -> (point -> point -> point -> r) -> ((# #) -> r) -> r $bTriangle_ :: forall triangle point. Triangle_ triangle point => point -> point -> point -> triangle -Triangle_ u v w <- (view corners -> Vector3 u v w) +Triangle_ u v w <- (view corners -> Vector3 u v w) where - Triangle_ point -u point -v point -w = point -> point -> point -> triangle + Triangle_ point +u point +v point +w = point -> point -> point -> triangle forall triangle point. Triangle_ triangle point => point -> point -> point -> triangle mkTriangle point -u point -v point -w +u point +v point +w {-# COMPLETE Triangle_ #-} {-# INLINE Triangle_ #-} @@ -71,21 +71,21 @@ -- | Computes the double-signed area of a triangle -triangleSignedArea2X :: ( Num r - , Point_ point 2 r - , Triangle_ triangle point - ) => triangle -> r +triangleSignedArea2X :: ( Num r + , Point_ point 2 r + , Triangle_ triangle point + ) => triangle -> r triangleSignedArea2X :: forall r point triangle. (Num r, Point_ point 2 r, Triangle_ triangle point) => triangle -> r -triangleSignedArea2X (Triangle_ point -a point -b point -c) = [r] -> r +triangleSignedArea2X (Triangle_ point +a point +b point +c) = [r] -> r forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a sum [ point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -95,7 +95,7 @@ xCoord r -> r -> r forall a. Num a => a -> a -> a * point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -105,7 +105,7 @@ yCoord r -> r -> r forall a. Num a => a -> a -> a - point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -115,7 +115,7 @@ xCoord r -> r -> r forall a. Num a => a -> a -> a * point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -123,20 +123,20 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord - | (point -p,point -q) <- [(point, point)] -edges + | (point +p,point +q) <- [(point, point)] +edges ] where - edges :: [(point, point)] -edges = [(point -a,point -b),(point -b,point -c),(point -c,point -a)] + edges :: [(point, point)] +edges = [(point +a,point +b),(point +b,point +c),(point +c,point +a)] {-# INLINE triangleSignedArea2X #-} -- | Make sure that the triangles vertices are given in counter clockwise order @@ -144,41 +144,41 @@ -- >>> let t = Triangle origin (Point2 0 (-1)) (Point2 (-1) 0) :: Triangle (Point 2 Int) -- >>> toCounterClockwiseTriangle t -- Triangle (Point2 0 0) (Point2 (-1) 0) (Point2 0 (-1)) -toCounterClockwiseTriangle :: ( Num r, Eq r - , Point_ point 2 r - , Triangle_ triangle point - ) => triangle -> triangle +toCounterClockwiseTriangle :: ( Num r, Eq r + , Point_ point 2 r + , Triangle_ triangle point + ) => triangle -> triangle toCounterClockwiseTriangle :: forall r point triangle. (Num r, Eq r, Point_ point 2 r, Triangle_ triangle point) => triangle -> triangle -toCounterClockwiseTriangle t :: triangle -t@(Triangle_ point -a point -b point -c) +toCounterClockwiseTriangle t :: triangle +t@(Triangle_ point +a point +b point +c) | triangle -> Bool -isCounterClockwise triangle -t = triangle -t +isCounterClockwise triangle +t = triangle +t | Bool otherwise = point -> point -> point -> triangle forall triangle point. Triangle_ triangle point => point -> point -> point -> triangle mkTriangle point -a point -c point -b +a point +c point +b where - isCounterClockwise :: triangle -> Bool -isCounterClockwise = (\NumType point -x -> NumType point -x NumType point -> NumType point -> Bool + isCounterClockwise :: triangle -> Bool +isCounterClockwise = (\NumType point +x -> NumType point +x NumType point -> NumType point -> Bool forall a. Eq a => a -> a -> Bool == NumType point -> NumType point forall a. Num a => a -> a abs NumType point -x) (NumType point -> Bool) +x) (NumType point -> Bool) -> (triangle -> NumType point) -> triangle -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . triangle -> NumType point @@ -195,12 +195,12 @@ -- HalfSpace Positive (LinePV (Point2 0 0) (Vector2 (-1) 0)) -- HalfSpace Positive (LinePV (Point2 (-1) 0) (Vector2 1 (-1))) -- HalfSpace Positive (LinePV (Point2 0 (-1)) (Vector2 0 1)) -intersectingHalfPlanes :: ( Triangle_ triangle point - , Point_ point 2 r - , Num r, Ord r +intersectingHalfPlanes :: ( Triangle_ triangle point + , Point_ point 2 r + , Num r, Ord r ) - => triangle - -> Vector 3 (HalfSpaceF (LinePV 2 r)) + => triangle + -> Vector 3 (HalfSpaceF (LinePV 2 r)) intersectingHalfPlanes :: forall triangle point r. (Triangle_ triangle point, Point_ point 2 r, Num r, Ord r) => triangle -> Vector 3 (HalfSpaceF (LinePV 2 r)) @@ -208,10 +208,10 @@ forall r point triangle. (Num r, Eq r, Point_ point 2 r, Triangle_ triangle point) => triangle -> triangle -toCounterClockwiseTriangle -> Triangle_ point -u point -v point -w) = +toCounterClockwiseTriangle -> Triangle_ point +u point +v point +w) = HalfSpaceF (LinePV 2 r) -> HalfSpaceF (LinePV 2 r) -> HalfSpaceF (LinePV 2 r) @@ -222,28 +222,28 @@ (Dimension point ~ 2, Num (NumType point), Ord (NumType point), Point_ point 2 (NumType point)) => point -> point -> HalfSpaceF (LinePV 2 (NumType point)) -leftPlane point -u point -v) (point -> point -> HalfSpaceF (LinePV 2 (NumType point)) +leftPlane point +u point +v) (point -> point -> HalfSpaceF (LinePV 2 (NumType point)) forall {point}. (Dimension point ~ 2, Num (NumType point), Ord (NumType point), Point_ point 2 (NumType point)) => point -> point -> HalfSpaceF (LinePV 2 (NumType point)) -leftPlane point -v point -w) (point -> point -> HalfSpaceF (LinePV 2 (NumType point)) +leftPlane point +v point +w) (point -> point -> HalfSpaceF (LinePV 2 (NumType point)) forall {point}. (Dimension point ~ 2, Num (NumType point), Ord (NumType point), Point_ point 2 (NumType point)) => point -> point -> HalfSpaceF (LinePV 2 (NumType point)) -leftPlane point -w point -u) +leftPlane point +w point +u) where - leftPlane :: point -> point -> HalfSpaceF (LinePV 2 (NumType point)) -leftPlane point -p point -q = LinePV 2 (NumType point) -> HalfSpaceF (LinePV 2 (NumType point)) + leftPlane :: point -> point -> HalfSpaceF (LinePV 2 (NumType point)) +leftPlane point +p point +q = LinePV 2 (NumType point) -> HalfSpaceF (LinePV 2 (NumType point)) forall r. (Num r, Ord r) => LinePV 2 r -> HalfSpaceF (LinePV 2 r) leftHalfPlane (LinePV 2 (NumType point) -> HalfSpaceF (LinePV 2 (NumType point))) -> LinePV 2 (NumType point) @@ -253,7 +253,7 @@ -> Vector 2 (NumType point) -> LinePV 2 (NumType point) forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point -ppoint +ppoint -> Getting (Point 2 (NumType point)) point (Point 2 (NumType point)) -> Point 2 (NumType point) @@ -264,161 +264,161 @@ Lens' point (Point d r) Lens' point (Point 2 (NumType point)) asPoint) (point -q point -> point -> Vector 2 (NumType point) +q point -> point -> Vector 2 (NumType point) forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -p) +p) -- | Given a point q and a triangle, q inside the triangle, get the baricentric -- cordinates of q -toBarricentric :: ( Fractional r - , Point_ point 2 r - , Triangle_ triangle point +toBarricentric :: ( Fractional r + , Point_ point 2 r + , Triangle_ triangle point ) - => point -> triangle - -> Vector 3 r + => point -> triangle + -> Vector 3 r toBarricentric :: forall r point triangle. (Fractional r, Point_ point 2 r, Triangle_ triangle point) => point -> triangle -> Vector 3 r -toBarricentric (Point2_ r -qx r -qy) (Triangle_ point -a point -b point -c) = r -> r -> r -> Vector 3 r +toBarricentric (Point2_ r +qx r +qy) (Triangle_ point +a point +b point +c) = r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -alpha r -beta r -gamma +alpha r +beta r +gamma where - Point2_ r -ax r -ay = point -a - Point2_ r -bx r -by = point -b - Point2_ r -cx r -cy = point -c + Point2_ r +ax r +ay = point +a + Point2_ r +bx r +by = point +b + Point2_ r +cx r +cy = point +c - dett :: r -dett = (r -by r -> r -> r + dett :: r +dett = (r +by r -> r -> r forall a. Num a => a -> a -> a - r -cy)r -> r -> r +cy)r -> r -> r forall a. Num a => a -> a -> a *(r -ax r -> r -> r +ax r -> r -> r forall a. Num a => a -> a -> a - r -cx) r -> r -> r +cx) r -> r -> r forall a. Num a => a -> a -> a + (r -cx r -> r -> r +cx r -> r -> r forall a. Num a => a -> a -> a - r -bx)r -> r -> r +bx)r -> r -> r forall a. Num a => a -> a -> a *(r -ay r -> r -> r +ay r -> r -> r forall a. Num a => a -> a -> a - r -cy) +cy) - alpha :: r -alpha = ((r -by r -> r -> r + alpha :: r +alpha = ((r +by r -> r -> r forall a. Num a => a -> a -> a - r -cy)r -> r -> r +cy)r -> r -> r forall a. Num a => a -> a -> a *(r -qx r -> r -> r +qx r -> r -> r forall a. Num a => a -> a -> a - r -cx) r -> r -> r +cx) r -> r -> r forall a. Num a => a -> a -> a + (r -cx r -> r -> r +cx r -> r -> r forall a. Num a => a -> a -> a - r -bx)r -> r -> r +bx)r -> r -> r forall a. Num a => a -> a -> a *(r -qy r -> r -> r +qy r -> r -> r forall a. Num a => a -> a -> a - r -cy)) r -> r -> r +cy)) r -> r -> r forall a. Fractional a => a -> a -> a / r -dett - beta :: r -beta = ((r -cy r -> r -> r +dett + beta :: r +beta = ((r +cy r -> r -> r forall a. Num a => a -> a -> a - r -ay)r -> r -> r +ay)r -> r -> r forall a. Num a => a -> a -> a *(r -qx r -> r -> r +qx r -> r -> r forall a. Num a => a -> a -> a - r -cx) r -> r -> r +cx) r -> r -> r forall a. Num a => a -> a -> a + (r -ax r -> r -> r +ax r -> r -> r forall a. Num a => a -> a -> a - r -cx)r -> r -> r +cx)r -> r -> r forall a. Num a => a -> a -> a *(r -qy r -> r -> r +qy r -> r -> r forall a. Num a => a -> a -> a - r -cy)) r -> r -> r +cy)) r -> r -> r forall a. Fractional a => a -> a -> a / r -dett - gamma :: r -gamma = r +dett + gamma :: r +gamma = r 1 r -> r -> r forall a. Num a => a -> a -> a - r -alpha r -> r -> r +alpha r -> r -> r forall a. Num a => a -> a -> a - r -beta +beta -- see https://en.wikipedia.org/wiki/Barycentric_coordinate_system#Conversion_between_barycentric_and_Cartesian_coordinates -- | Given a vector of barricentric coordinates and a triangle, get the -- corresponding point in the same coordinate sytsem as the vertices of the -- triangle. -fromBarricentric :: ( Triangle_ triangle point - , Point_ point d r - , Num r +fromBarricentric :: ( Triangle_ triangle point + , Point_ point d r + , Num r ) - => Vector 3 r - -> triangle - -> Point d r + => Vector 3 r + -> triangle + -> Point d r fromBarricentric :: forall triangle point (d :: Nat) r. (Triangle_ triangle point, Point_ point d r, Num r) => Vector 3 r -> triangle -> Point d r -fromBarricentric (Vector3 r -a r -b r -c) (Triangle_ point -p point -q point -r) = let f :: point -> Vector (Dimension point) (NumType point) -f = Getting +fromBarricentric (Vector3 r +a r +b r +c) (Triangle_ point +p point +q point +r) = let f :: point -> Vector (Dimension point) (NumType point) +f = Getting (Vector (Dimension point) (NumType point)) point (Vector (Dimension point) (NumType point)) @@ -448,36 +448,36 @@ -> Vector d r -> PointF (Vector d r) forall a b. (a -> b) -> a -> b $ r -a r -> Vector d r -> Vector d r +a r -> Vector d r -> Vector d r forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ point -> Vector d r point -> Vector (Dimension point) (NumType point) -f point -p Vector d r -> Vector d r -> Vector d r +f point +p Vector d r -> Vector d r -> Vector d r forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector ^+^ r -b r -> Vector d r -> Vector d r +b r -> Vector d r -> Vector d r forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ point -> Vector d r point -> Vector (Dimension point) (NumType point) -f point -q Vector d r -> Vector d r -> Vector d r +f point +q Vector d r -> Vector d r -> Vector d r forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector ^+^ r -c r -> Vector d r -> Vector d r +c r -> Vector d r -> Vector d r forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ point -> Vector d r point -> Vector (Dimension point) (NumType point) -f point -r +f point +r \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Triangle.html b/haddocks/hgeometry/kernel/src/HGeometry.Triangle.html index c12ebcc04..6cb394247 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Triangle.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Triangle.html @@ -30,8 +30,8 @@ -------------------------------------------------------------------------------- -- | Triangles in d-dimensional space -newtype Triangle point = MkTriangle (Vector 3 point) - deriving ((forall x. Triangle point -> Rep (Triangle point) x) +newtype Triangle point = MkTriangle (Vector 3 point) + deriving ((forall x. Triangle point -> Rep (Triangle point) x) -> (forall x. Rep (Triangle point) x -> Triangle point) -> Generic (Triangle point) forall x. Rep (Triangle point) x -> Triangle point @@ -45,7 +45,7 @@ $cto :: forall point x. Rep (Triangle point) x -> Triangle point to :: forall x. Rep (Triangle point) x -> Triangle point Generic) - deriving newtype ((forall a b. (a -> b) -> Triangle a -> Triangle b) + deriving newtype ((forall a b. (a -> b) -> Triangle a -> Triangle b) -> (forall a b. a -> Triangle b -> Triangle a) -> Functor Triangle forall a b. a -> Triangle b -> Triangle a forall a b. (a -> b) -> Triangle a -> Triangle b @@ -56,7 +56,7 @@ fmap :: forall a b. (a -> b) -> Triangle a -> Triangle b $c<$ :: forall a b. a -> Triangle b -> Triangle a <$ :: forall a b. a -> Triangle b -> Triangle a -Functor,(forall m. Monoid m => Triangle m -> m) +Functor,(forall m. Monoid m => Triangle m -> m) -> (forall m a. Monoid m => (a -> m) -> Triangle a -> m) -> (forall m a. Monoid m => (a -> m) -> Triangle a -> m) -> (forall a b. (a -> b -> b) -> b -> Triangle a -> b) @@ -141,21 +141,21 @@ Foldable) -- | Construct a triangle from its three points -pattern Triangle :: point -> point -> point -> Triangle point +pattern Triangle :: point -> point -> point -> Triangle point pattern $mTriangle :: forall {r} {point}. Triangle point -> (point -> point -> point -> r) -> ((# #) -> r) -> r $bTriangle :: forall point. point -> point -> point -> Triangle point -Triangle a b c = MkTriangle (Vector3 a b c) +Triangle a b c = MkTriangle (Vector3 a b c) {-# COMPLETE Triangle #-} -instance Traversable Triangle where - traverse :: forall (f :: * -> *) a b. +instance Traversable Triangle where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Triangle a -> f (Triangle b) -traverse a -> f b -f (MkTriangle Vector 3 a -v) = Vector 3 b -> Triangle b +traverse a -> f b +f (MkTriangle Vector 3 a +v) = Vector 3 b -> Triangle b forall point. Vector 3 point -> Triangle point MkTriangle (Vector 3 b -> Triangle b) -> f (Vector 3 b) -> f (Triangle b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -167,29 +167,29 @@ Applicative f => (a -> f b) -> Vector 3 a -> f (Vector 3 b) traverse a -> f b -f Vector 3 a -v +f Vector 3 a +v -instance Foldable1 Triangle where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> Triangle a -> m -foldMap1 a -> m -f (MkTriangle Vector 3 a -v) = (a -> m) -> Vector 3 a -> m +instance Foldable1 Triangle where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> Triangle a -> m +foldMap1 a -> m +f (MkTriangle Vector 3 a +v) = (a -> m) -> Vector 3 a -> m forall m a. Semigroup m => (a -> m) -> Vector 3 a -> m forall (t :: * -> *) m a. (Foldable1 t, Semigroup m) => (a -> m) -> t a -> m foldMap1 a -> m -f Vector 3 a -v +f Vector 3 a +v -instance Traversable1 Triangle where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 Triangle where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Triangle a -> f (Triangle b) -traverse1 a -> f b -f (MkTriangle Vector 3 a -v) = Vector 3 b -> Triangle b +traverse1 a -> f b +f (MkTriangle Vector 3 a +v) = Vector 3 b -> Triangle b forall point. Vector 3 point -> Triangle point MkTriangle (Vector 3 b -> Triangle b) -> f (Vector 3 b) -> f (Triangle b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -201,18 +201,18 @@ Apply f => (a -> f b) -> Vector 3 a -> f (Vector 3 b) traverse1 a -> f b -f Vector 3 a -v +f Vector 3 a +v -deriving instance Eq (Vector 3 point) => Eq (Triangle point) -deriving instance Ord (Vector 3 point) => Ord (Triangle point) +deriving instance Eq (Vector 3 point) => Eq (Triangle point) +deriving instance Ord (Vector 3 point) => Ord (Triangle point) -type instance Dimension (Triangle point) = Dimension point -type instance NumType (Triangle point) = NumType point +type instance Dimension (Triangle point) = Dimension point +type instance NumType (Triangle point) = NumType point -- | Iso between a triangle and a vector of three points -_TriangleVector :: Iso (Triangle point) (Triangle point') (Vector 3 point) (Vector 3 point') +_TriangleVector :: Iso (Triangle point) (Triangle point') (Vector 3 point) (Vector 3 point') _TriangleVector :: forall point point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Vector 3 point) (f (Vector 3 point')) @@ -225,20 +225,20 @@ (Vector 3 point) (Vector 3 point') forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b -iso (\(MkTriangle Vector 3 point -v) -> Vector 3 point -v) Vector 3 point' -> Triangle point' +iso (\(MkTriangle Vector 3 point +v) -> Vector 3 point +v) Vector 3 point' -> Triangle point' forall point. Vector 3 point -> Triangle point MkTriangle -instance ( Point_ point (Dimension point) (NumType point) - ) => Triangle_ (Triangle point) point where - mkTriangle :: point -> point -> point -> Triangle point -mkTriangle = point -> point -> point -> Triangle point +instance ( Point_ point (Dimension point) (NumType point) + ) => Triangle_ (Triangle point) point where + mkTriangle :: point -> point -> point -> Triangle point +mkTriangle = point -> point -> point -> Triangle point forall point. point -> point -> point -> Triangle point Triangle - corners :: Lens' (Triangle point) (Vector 3 point) -corners = (Vector 3 point -> f (Vector 3 point)) + corners :: Lens' (Triangle point) (Vector 3 point) +corners = (Vector 3 point -> f (Vector 3 point)) -> Triangle point -> f (Triangle point) forall point point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -246,16 +246,16 @@ -> p (Triangle point) (f (Triangle point')) _TriangleVector -instance HasVertices' (Triangle point) where - type Vertex (Triangle point) = point - type VertexIx (Triangle point) = Int - vertexAt :: VertexIx (Triangle point) +instance HasVertices' (Triangle point) where + type Vertex (Triangle point) = point + type VertexIx (Triangle point) = Int + vertexAt :: VertexIx (Triangle point) -> IndexedTraversal' (VertexIx (Triangle point)) (Triangle point) (Vertex (Triangle point)) -vertexAt VertexIx (Triangle point) -i = (Vector 3 point -> f (Vector 3 point)) +vertexAt VertexIx (Triangle point) +i = (Vector 3 point -> f (Vector 3 point)) -> Triangle point -> f (Triangle point) forall point point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -278,16 +278,16 @@ Index m -> IndexedTraversal' (Index m) m (IxValue m) iix VertexIx (Triangle point) Index (Vector 3 point) -i +i -instance HasVertices (Triangle point) (Triangle point') where - vertices :: IndexedTraversal1 +instance HasVertices (Triangle point) (Triangle point') where + vertices :: IndexedTraversal1 (VertexIx (Triangle point)) (Triangle point) (Triangle point') (Vertex (Triangle point)) (Vertex (Triangle point')) -vertices = AnIndexedTraversal1 +vertices = AnIndexedTraversal1 Int (Triangle point) (Triangle point') point point' -> IndexedTraversal1 Int (Triangle point) (Triangle point') point point' @@ -332,13 +332,13 @@ (IxValue (Vector 3 point')) components) -instance HasPoints (Triangle point) (Triangle point') point point' where - allPoints :: forall (d :: Nat) r r'. +instance HasPoints (Triangle point) (Triangle point') point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (Triangle point) ~ r, NumType (Triangle point') ~ r', Dimension (Triangle point) ~ d, Dimension (Triangle point') ~ d) => Traversal1 (Triangle point) (Triangle point') point point' -allPoints = (Vector 3 point -> f (Vector 3 point')) +allPoints = (Vector 3 point -> f (Vector 3 point')) -> Triangle point -> f (Triangle point') forall point point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -366,19 +366,19 @@ (IxValue (Vector 3 point')) components -instance ( DefaultTransformByConstraints (Triangle point) d r - , Point_ point d r - ) => IsTransformable (Triangle point) +instance ( DefaultTransformByConstraints (Triangle point) d r + , Point_ point d r + ) => IsTransformable (Triangle point) -instance (Show point) => Show (Triangle point) where - showsPrec :: Int -> Triangle point -> ShowS -showsPrec Int -k (Triangle point -a point -b point -c ) = Bool -> ShowS -> ShowS +instance (Show point) => Show (Triangle point) where + showsPrec :: Int -> Triangle point -> ShowS +showsPrec Int +k (Triangle point +a point +b point +c ) = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int appPrec) (ShowS -> ShowS) -> ShowS -> ShowS @@ -396,7 +396,7 @@ forall a. Num a => a -> a -> a +Int 1) point -a +a ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -411,7 +411,7 @@ forall a. Num a => a -> a -> a +Int 1) point -b +b ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS @@ -426,16 +426,16 @@ forall a. Num a => a -> a -> a +Int 1) point -c +c appPrec :: Int appPrec :: Int appPrec = Int 10 -instance (Read point) => Read (Triangle point) where - readPrec :: ReadPrec (Triangle point) -readPrec = ReadPrec (Triangle point) -> ReadPrec (Triangle point) +instance (Read point) => Read (Triangle point) where + readPrec :: ReadPrec (Triangle point) +readPrec = ReadPrec (Triangle point) -> ReadPrec (Triangle point) forall a. ReadPrec a -> ReadPrec a parens (Int -> ReadPrec (Triangle point) -> ReadPrec (Triangle point) forall a. Int -> ReadPrec a -> ReadPrec a @@ -447,20 +447,20 @@ Ident String "Triangle" <- ReadPrec Lexeme lexP - point -b <- ReadPrec point -> ReadPrec point + point +b <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a readPrec - point -a <- ReadPrec point -> ReadPrec point + point +a <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a readPrec - point -c <- ReadPrec point -> ReadPrec point + point +c <- ReadPrec point -> ReadPrec point forall a. ReadPrec a -> ReadPrec a step ReadPrec point forall a. Read a => ReadPrec a @@ -471,21 +471,21 @@ return (point -> point -> point -> Triangle point forall point. point -> point -> point -> Triangle point Triangle point -a point -b point -c)) +a point +b point +c)) -instance ( Point_ point d r - , Ord (Vector d r) - ) => IsBoxable (Triangle point) +instance ( Point_ point d r + , Ord (Vector d r) + ) => IsBoxable (Triangle point) -instance ( Point_ point 2 r - , Num r, Ord r - ) => HasIntersectionWith (Point 2 r) (Triangle point) where - Point 2 r -q intersects :: Point 2 r -> Triangle point -> Bool -`intersects` Triangle point -t = Getting +instance ( Point_ point 2 r + , Num r, Ord r + ) => HasIntersectionWith (Point 2 r) (Triangle point) where + Point 2 r +q intersects :: Point 2 r -> Triangle point -> Bool +`intersects` Triangle point +t = Getting All (Vector 3 (HalfSpaceF (LinePV 2 r))) (HalfSpaceF (LinePV 2 r)) -> (HalfSpaceF (LinePV 2 r) -> Bool) -> Vector 3 (HalfSpaceF (LinePV 2 r)) @@ -508,7 +508,7 @@ (IxValue (Vector 3 (HalfSpaceF (LinePV 2 r)))) (IxValue (Vector 3 (HalfSpaceF (LinePV 2 r)))) components (Point 2 r -q `intersects`) (Vector 3 (HalfSpaceF (LinePV 2 r)) -> Bool) +q `intersects`) (Vector 3 (HalfSpaceF (LinePV 2 r)) -> Bool) -> Vector 3 (HalfSpaceF (LinePV 2 r)) -> Bool forall a b. (a -> b) -> a -> b $ Triangle point -> Vector 3 (HalfSpaceF (LinePV 2 r)) @@ -516,5 +516,5 @@ (Triangle_ triangle point, Point_ point 2 r, Num r, Ord r) => triangle -> Vector 3 (HalfSpaceF (LinePV 2 r)) intersectingHalfPlanes Triangle point -t +t \ No newline at end of file diff --git a/haddocks/hgeometry/kernel/src/HGeometry.Viewport.html b/haddocks/hgeometry/kernel/src/HGeometry.Viewport.html index c8ef8aecb..b3e32a990 100644 --- a/haddocks/hgeometry/kernel/src/HGeometry.Viewport.html +++ b/haddocks/hgeometry/kernel/src/HGeometry.Viewport.html @@ -35,17 +35,17 @@ -- | Represents a viewport ; i.e. a rectangle through which we view -- the world. -data Viewport r = Viewport { forall r. Viewport r -> Rectangle (Point 2 r) -_viewPort :: Rectangle (Point 2 r) +data Viewport r = Viewport { forall r. Viewport r -> Rectangle (Point 2 r) +_viewPort :: Rectangle (Point 2 r) -- ^ in host world , forall r. Viewport r -> Transformation 2 r -_worldToHost :: Transformation 2 r +_worldToHost :: Transformation 2 r -- ^ Transformation that turns world -- coordinates into host coordinates. -- _hostToWorld :: Transformation 2 r } - deriving stock (Viewport r -> Viewport r -> Bool + deriving stock (Viewport r -> Viewport r -> Bool (Viewport r -> Viewport r -> Bool) -> (Viewport r -> Viewport r -> Bool) -> Eq (Viewport r) forall r. Eq r => Viewport r -> Viewport r -> Bool @@ -54,7 +54,7 @@ == :: Viewport r -> Viewport r -> Bool $c/= :: forall r. Eq r => Viewport r -> Viewport r -> Bool /= :: Viewport r -> Viewport r -> Bool -Eq, Int -> Viewport r -> ShowS +Eq, Int -> Viewport r -> ShowS [Viewport r] -> ShowS Viewport r -> String (Int -> Viewport r -> ShowS) @@ -75,7 +75,7 @@ Show) -- | Lens to access the viewport rectangle -viewPort :: Lens' (Viewport r) (Rectangle (Point 2 r)) +viewPort :: Lens' (Viewport r) (Rectangle (Point 2 r)) viewPort :: forall r (f :: * -> *). Functor f => (Rectangle (Point 2 r) -> f (Rectangle (Point 2 r))) @@ -91,16 +91,16 @@ lens Viewport r -> Rectangle (Point 2 r) forall r. Viewport r -> Rectangle (Point 2 r) _viewPort (\(Viewport Rectangle (Point 2 r) -_ Transformation 2 r -t) Rectangle (Point 2 r) -vp -> Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r +_ Transformation 2 r +t) Rectangle (Point 2 r) +vp -> Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r forall r. Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r Viewport Rectangle (Point 2 r) -vp Transformation 2 r -t) +vp Transformation 2 r +t) -- | The transformation -worldToHost :: Lens' (Viewport r) (Transformation 2 r) +worldToHost :: Lens' (Viewport r) (Transformation 2 r) worldToHost :: forall r (f :: * -> *). Functor f => (Transformation 2 r -> f (Transformation 2 r)) @@ -112,30 +112,30 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Viewport r -> Transformation 2 r forall r. Viewport r -> Transformation 2 r -_worldToHost (\(Viewport Rectangle (Point 2 r) -t Transformation 2 r +_worldToHost (\(Viewport Rectangle (Point 2 r) +t Transformation 2 r _) -> Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r forall r. Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r Viewport Rectangle (Point 2 r) -t) +t) -- | Creates a viewport from the given rectangle and the -- transformation. The transformation is applied with respect to the -- center of the viewport. -mkViewport :: ( Rectangle_ rectangle point, Point_ point 2 r, Fractional r - ) => rectangle -> Transformation 2 r -> Viewport r +mkViewport :: ( Rectangle_ rectangle point, Point_ point 2 r, Fractional r + ) => rectangle -> Transformation 2 r -> Viewport r mkViewport :: forall rectangle point r. (Rectangle_ rectangle point, Point_ point 2 r, Fractional r) => rectangle -> Transformation 2 r -> Viewport r -mkViewport rectangle -r Transformation 2 r -t = rectangle -> Viewport r +mkViewport rectangle +r Transformation 2 r +t = rectangle -> Viewport r forall r rectangle point. (Fractional r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Viewport r centeredOrigin rectangle -r Viewport r -> (Viewport r -> Viewport r) -> Viewport r +r Viewport r -> (Viewport r -> Viewport r) -> Viewport r forall a b. a -> (a -> b) -> b & (Transformation 2 r -> Identity (Transformation 2 r)) -> Viewport r -> Identity (Viewport r) @@ -154,14 +154,14 @@ (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r |.| Transformation 2 r -t) +t) -- | Host to world transformation, i.e. given a point in the host -- coordinate system, we can compute the point in world coordinates -- using this transformation. -hostToWorld :: (Fractional r) - => Getter (Viewport r) (Transformation 2 r) +hostToWorld :: (Fractional r) + => Getter (Viewport r) (Transformation 2 r) hostToWorld :: forall r. Fractional r => Getter (Viewport r) (Transformation 2 r) hostToWorld = (Transformation 2 r -> f (Transformation 2 r)) -> Viewport r -> f (Viewport r) @@ -194,20 +194,20 @@ -- | Convert some geometry in host coordinates to world coordinates in -- the viewport -toWorldIn :: ( IsTransformable g - , NumType g ~ r, Dimension g ~ 2, Fractional r) - => Viewport r -> g -> g +toWorldIn :: ( IsTransformable g + , NumType g ~ r, Dimension g ~ 2, Fractional r) + => Viewport r -> g -> g toWorldIn :: forall g r. (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Fractional r) => Viewport r -> g -> g -toWorldIn Viewport r -vp = Transformation (Dimension g) (NumType g) -> g -> g +toWorldIn Viewport r +vp = Transformation (Dimension g) (NumType g) -> g -> g forall g. IsTransformable g => Transformation (Dimension g) (NumType g) -> g -> g transformBy (Viewport r -vpViewport r +vpViewport r -> Getting (Transformation 2 r) (Viewport r) (Transformation 2 r) -> Transformation 2 r forall s a. s -> Getting a s a -> a @@ -218,18 +218,18 @@ -- | Convert some geometry in world coordinates to host coordinates -- according to the viewport -toHostFrom :: (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Num r) - => Viewport r -> g -> g +toHostFrom :: (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Num r) + => Viewport r -> g -> g toHostFrom :: forall g r. (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Num r) => Viewport r -> g -> g -toHostFrom Viewport r -vp = Transformation (Dimension g) (NumType g) -> g -> g +toHostFrom Viewport r +vp = Transformation (Dimension g) (NumType g) -> g -> g forall g. IsTransformable g => Transformation (Dimension g) (NumType g) -> g -> g transformBy (Viewport r -vpViewport r +vpViewport r -> Getting (Transformation 2 r) (Viewport r) (Transformation 2 r) -> Transformation 2 r forall s a. s -> Getting a s a -> a @@ -245,13 +245,13 @@ -- | Given a vector with widht w and height h, crates a viewport with -- focussing on [0,w] x [0,h] -fromSize :: ( Num r, Vector_ vector 2 r - ) => vector -> Viewport r +fromSize :: ( Num r, Vector_ vector 2 r + ) => vector -> Viewport r fromSize :: forall r vector. (Num r, Vector_ vector 2 r) => vector -> Viewport r -fromSize vector -v = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r +fromSize vector +v = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r forall r. Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r Viewport (Point 2 r -> Point 2 r -> Rectangle (Point 2 r) forall point. point -> point -> Box point @@ -264,7 +264,7 @@ Point (Vector 2 r -> Point 2 r) -> Vector 2 r -> Point 2 r forall a b. (a -> b) -> a -> b $ vector -vvector -> Getting (Vector 2 r) vector (Vector 2 r) -> Vector 2 r +vvector -> Getting (Vector 2 r) vector (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 r) vector (Vector 2 r) forall vector vector' (d :: Nat) r s. @@ -279,14 +279,14 @@ -- | Flips the y-coordinate so that the origin is in the bottom left. -- -flipY :: ( Num r, Vector_ vector 2 r) - => vector -- ^ the dimensions of the viewport - -> Viewport r +flipY :: ( Num r, Vector_ vector 2 r) + => vector -- ^ the dimensions of the viewport + -> Viewport r flipY :: forall r vector. (Num r, Vector_ vector 2 r) => vector -> Viewport r -flipY vector -v = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r +flipY vector +v = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r forall r. Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r Viewport (Point 2 r -> Point 2 r -> Rectangle (Point 2 r) forall point. point -> point -> Box point @@ -299,7 +299,7 @@ Point (Vector 2 r -> Point 2 r) -> Vector 2 r -> Point 2 r forall a b. (a -> b) -> a -> b $ vector -vvector -> Getting (Vector 2 r) vector (Vector 2 r) -> Vector 2 r +vvector -> Getting (Vector 2 r) vector (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 r) vector (Vector 2 r) forall vector vector' (d :: Nat) r s. @@ -312,7 +312,7 @@ flipY' (r -> Transformation 2 r) -> r -> Transformation 2 r forall a b. (a -> b) -> a -> b $ vector -vvector -> Getting r vector r -> r +vvector -> Getting r vector r -> r forall s a. s -> Getting a s a -> a ^.Getting r vector r forall vector (d :: Nat) r. @@ -324,11 +324,11 @@ -- | Transformation that flips the y-axis and shifts by h, essenitally -- moving the origin from the top-left facing downards to the -- bottom-left and upwards. -flipY' :: ( Num r - ) => r -> Transformation 2 r +flipY' :: ( Num r + ) => r -> Transformation 2 r flipY' :: forall r. Num r => r -> Transformation 2 r -flipY' r -h = Vector 2 r -> Transformation 2 r +flipY' r +h = Vector 2 r -> Transformation 2 r forall (d :: Nat) r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r @@ -336,7 +336,7 @@ forall r. r -> r -> Vector 2 r Vector2 r 0 r -h) Transformation 2 r -> Transformation 2 r -> Transformation 2 r +h) Transformation 2 r -> Transformation 2 r -> Transformation 2 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r @@ -354,18 +354,18 @@ -------------------------------------------------------------------------------- -- | Creates a viewport in which the origin is at the center of the viewport -centeredOrigin :: ( Fractional r - , Rectangle_ rectangle point - , Point_ point 2 r - ) => rectangle -> Viewport r +centeredOrigin :: ( Fractional r + , Rectangle_ rectangle point + , Point_ point 2 r + ) => rectangle -> Viewport r centeredOrigin :: forall r rectangle point. (Fractional r, Rectangle_ rectangle point, Point_ point 2 r) => rectangle -> Viewport r -centeredOrigin rectangle -rect' = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r +centeredOrigin rectangle +rect' = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r forall r. Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r Viewport Rectangle (Point 2 r) -rect +rect (Vector (Dimension point) (NumType point) -> Transformation 2 r forall (d :: Nat) r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => @@ -378,7 +378,7 @@ (Box_ box point, Point_ point d r, Fractional r) => box -> point centerPoint rectangle -rect')point +rect')point -> Getting (Vector (Dimension point) (NumType point)) point @@ -403,11 +403,11 @@ (Vector (Dimension point) (NumType point)) (Vector (Dimension point) (NumType point)) vector) - where rect :: Rectangle (Point 2 r) -rect = Point 2 r -> Point 2 r -> Rectangle (Point 2 r) + where rect :: Rectangle (Point 2 r) +rect = Point 2 r -> Point 2 r -> Rectangle (Point 2 r) forall point. point -> point -> Box point Box (rectangle -rect'rectangle -> Getting (Point 2 r) rectangle (Point 2 r) -> Point 2 r +rect'rectangle -> Getting (Point 2 r) rectangle (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) -> rectangle -> Const (Point 2 r) rectangle @@ -426,7 +426,7 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) (rectangle -rect'rectangle -> Getting (Point 2 r) rectangle (Point 2 r) -> Point 2 r +rect'rectangle -> Getting (Point 2 r) rectangle (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) -> rectangle -> Const (Point 2 r) rectangle @@ -449,14 +449,14 @@ -- | Creates a viewport in which the origin at the bottom left of the viewport -alignedOrigin :: ( Num r - ) => Rectangle (Point 2 r) -> Viewport r +alignedOrigin :: ( Num r + ) => Rectangle (Point 2 r) -> Viewport r alignedOrigin :: forall r. Num r => Rectangle (Point 2 r) -> Viewport r -alignedOrigin Rectangle (Point 2 r) -rect' = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r +alignedOrigin Rectangle (Point 2 r) +rect' = Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r forall r. Rectangle (Point 2 r) -> Transformation 2 r -> Viewport r Viewport Rectangle (Point 2 r) -rect' (Vector 2 r -> Transformation 2 r +rect' (Vector 2 r -> Transformation 2 r forall (d :: Nat) r vector. (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r @@ -464,7 +464,7 @@ -> Vector 2 r -> Transformation 2 r forall a b. (a -> b) -> a -> b $ Point 2 r -bottomLeft Point 2 r -> Point 2 r -> Vector 2 r +bottomLeft Point 2 r -> Point 2 r -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r @@ -474,9 +474,9 @@ point origin) where - bottomLeft :: Point 2 r -bottomLeft = Rectangle (Point 2 r) -rect'Rectangle (Point 2 r) + bottomLeft :: Point 2 r +bottomLeft = Rectangle (Point 2 r) +rect'Rectangle (Point 2 r) -> Getting (Point 2 r) (Rectangle (Point 2 r)) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a @@ -488,20 +488,20 @@ -- | make the transformation with respect to the center of the viewport -wrtCenter :: ( Fractional r - ) => Viewport r -> Transformation 2 r -> Transformation 2 r +wrtCenter :: ( Fractional r + ) => Viewport r -> Transformation 2 r -> Transformation 2 r wrtCenter :: forall r. Fractional r => Viewport r -> Transformation 2 r -> Transformation 2 r -wrtCenter Viewport r -vp Transformation 2 r -trans' = let v :: Vector 2 r -v = Rectangle (PointF (Vector 2 r)) -> PointF (Vector 2 r) +wrtCenter Viewport r +vp Transformation 2 r +trans' = let v :: Vector 2 r +v = Rectangle (PointF (Vector 2 r)) -> PointF (Vector 2 r) forall box point (d :: Nat) r. (Box_ box point, Point_ point d r, Fractional r) => box -> point centerPoint (Viewport r -vpViewport r +vpViewport r -> Getting (Rectangle (PointF (Vector 2 r))) (Viewport r) @@ -530,12 +530,12 @@ (Num r, Vector_ vector d r, TransformationConstraints d r) => vector -> Transformation d r translation Vector 2 r -v Transformation 2 r -> Transformation 2 r -> Transformation 2 r +v Transformation 2 r -> Transformation 2 r -> Transformation 2 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r |.| Transformation 2 r -trans' Transformation 2 r -> Transformation 2 r -> Transformation 2 r +trans' Transformation 2 r -> Transformation 2 r -> Transformation 2 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r @@ -549,27 +549,27 @@ (Num r, Vector_ vector d r) => r -> vector -> vector *^ Vector 2 r -v) +v) -------------------------------------------------------------------------------- -- | Data type representing possibilities for zooming in and out in a -- viewport. -data ZoomConfig r = ZoomConfig { forall r. ZoomConfig r -> ClosedInterval r -_range :: ClosedInterval r +data ZoomConfig r = ZoomConfig { forall r. ZoomConfig r -> ClosedInterval r +_range :: ClosedInterval r , forall r. ZoomConfig r -> r -_currentLevel :: r +_currentLevel :: r } -deriving stock instance (Eq (ClosedInterval r), Eq r) => Eq (ZoomConfig r) -deriving stock instance (Show (ClosedInterval r), Show r) => Show (ZoomConfig r) +deriving stock instance (Eq (ClosedInterval r), Eq r) => Eq (ZoomConfig r) +deriving stock instance (Show (ClosedInterval r), Show r) => Show (ZoomConfig r) -instance Functor ZoomConfig where - fmap :: forall a b. (a -> b) -> ZoomConfig a -> ZoomConfig b -fmap a -> b -f (ZoomConfig ClosedInterval a -r a -l) = ClosedInterval b -> b -> ZoomConfig b +instance Functor ZoomConfig where + fmap :: forall a b. (a -> b) -> ZoomConfig a -> ZoomConfig b +fmap a -> b +f (ZoomConfig ClosedInterval a +r a +l) = ClosedInterval b -> b -> ZoomConfig b forall r. ClosedInterval r -> r -> ZoomConfig r ZoomConfig ((a -> b) -> ClosedInterval a -> ClosedInterval b forall a b. @@ -577,16 +577,16 @@ -> Interval (EndPoint 'Closed) a -> Interval (EndPoint 'Closed) b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f ClosedInterval a -r) (a -> b -f a -l) -instance Foldable ZoomConfig where - foldMap :: forall m a. Monoid m => (a -> m) -> ZoomConfig a -> m -foldMap a -> m -f (ZoomConfig ClosedInterval a -r a -l) = (a -> m) -> ClosedInterval a -> m +f ClosedInterval a +r) (a -> b +f a +l) +instance Foldable ZoomConfig where + foldMap :: forall m a. Monoid m => (a -> m) -> ZoomConfig a -> m +foldMap a -> m +f (ZoomConfig ClosedInterval a +r a +l) = (a -> m) -> ClosedInterval a -> m forall m a. Monoid m => (a -> m) -> Interval (EndPoint 'Closed) a -> m @@ -594,20 +594,20 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f ClosedInterval a -r m -> m -> m +f ClosedInterval a +r m -> m -> m forall a. Semigroup a => a -> a -> a <> a -> m -f a -l -instance Traversable ZoomConfig where - traverse :: forall (f :: * -> *) a b. +f a +l +instance Traversable ZoomConfig where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> ZoomConfig a -> f (ZoomConfig b) -traverse a -> f b -f (ZoomConfig ClosedInterval a -r a -l) = ClosedInterval b -> b -> ZoomConfig b +traverse a -> f b +f (ZoomConfig ClosedInterval a +r a +l) = ClosedInterval b -> b -> ZoomConfig b forall r. ClosedInterval r -> r -> ZoomConfig r ZoomConfig (ClosedInterval b -> b -> ZoomConfig b) -> f (ClosedInterval b) -> f (b -> ZoomConfig b) @@ -622,18 +622,18 @@ -> Interval (EndPoint 'Closed) a -> f (Interval (EndPoint 'Closed) b) traverse a -> f b -f ClosedInterval a -r f (b -> ZoomConfig b) -> f b -> f (ZoomConfig b) +f ClosedInterval a +r f (b -> ZoomConfig b) -> f b -> f (ZoomConfig b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> a -> f b -f a -l +f a +l -- | Lens to access the zoom-range -range :: Lens' (ZoomConfig r) (ClosedInterval r) +range :: Lens' (ZoomConfig r) (ClosedInterval r) range :: forall r (f :: * -> *). Functor f => (ClosedInterval r -> f (ClosedInterval r)) @@ -646,16 +646,16 @@ lens ZoomConfig r -> ClosedInterval r forall r. ZoomConfig r -> ClosedInterval r _range (\(ZoomConfig ClosedInterval r -_ r -l) ClosedInterval r -r' -> ClosedInterval r -> r -> ZoomConfig r +_ r +l) ClosedInterval r +r' -> ClosedInterval r -> r -> ZoomConfig r forall r. ClosedInterval r -> r -> ZoomConfig r ZoomConfig ClosedInterval r -r' r -l) +r' r +l) -- | Clamps the value to the right range on set -currentLevel :: Ord r => Lens' (ZoomConfig r) r +currentLevel :: Ord r => Lens' (ZoomConfig r) r currentLevel :: forall r. Ord r => Lens' (ZoomConfig r) r currentLevel = (ZoomConfig r -> r) -> (ZoomConfig r -> r -> ZoomConfig r) @@ -663,19 +663,19 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens ZoomConfig r -> r forall r. ZoomConfig r -> r -_currentLevel (\(ZoomConfig ClosedInterval r -r r -_) r -l' -> ClosedInterval r -> r -> ZoomConfig r +_currentLevel (\(ZoomConfig ClosedInterval r +r r +_) r +l' -> ClosedInterval r -> r -> ZoomConfig r forall r. ClosedInterval r -> r -> ZoomConfig r ZoomConfig ClosedInterval r -r (ClosedInterval r -> r -> r +r (ClosedInterval r -> r -> r forall interval r. (ClosedInterval_ interval r, Ord r) => interval -> r -> r clampTo ClosedInterval r -r r -l')) +r r +l')) -- instance Fractional r => Default (ZoomConfig r) where -- def = ZoomConfig (ClosedRange 0.1 4) 1 diff --git a/haddocks/hgeometry/miso/src/HGeometry.Miso.Event.Extra.html b/haddocks/hgeometry/miso/src/HGeometry.Miso.Event.Extra.html index 193ae3302..7046e817a 100644 --- a/haddocks/hgeometry/miso/src/HGeometry.Miso.Event.Extra.html +++ b/haddocks/hgeometry/miso/src/HGeometry.Miso.Event.Extra.html @@ -33,7 +33,7 @@ -------------------------------------------------------------------------------- -- | Scroll-wheel direction -data WheelDirection = Up | Down deriving (Int -> WheelDirection -> ShowS +data WheelDirection = Up | Down deriving (Int -> WheelDirection -> ShowS [WheelDirection] -> ShowS WheelDirection -> String (Int -> WheelDirection -> ShowS) @@ -48,7 +48,7 @@ show :: WheelDirection -> String $cshowList :: [WheelDirection] -> ShowS showList :: [WheelDirection] -> ShowS -Show,WheelDirection -> WheelDirection -> Bool +Show,WheelDirection -> WheelDirection -> Bool (WheelDirection -> WheelDirection -> Bool) -> (WheelDirection -> WheelDirection -> Bool) -> Eq WheelDirection forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -62,7 +62,7 @@ data Button = LeftButton | MiddleButton | RightButton - deriving (Int -> Button -> ShowS + deriving (Int -> Button -> ShowS [Button] -> ShowS Button -> String (Int -> Button -> ShowS) @@ -75,7 +75,7 @@ show :: Button -> String $cshowList :: [Button] -> ShowS showList :: [Button] -> ShowS -Show,Button -> Button -> Bool +Show,Button -> Button -> Bool (Button -> Button -> Bool) -> (Button -> Button -> Bool) -> Eq Button forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -86,7 +86,7 @@ Eq) -- | on wheel events -onWheel :: (WheelDirection -> action) -> Attribute action +onWheel :: (WheelDirection -> action) -> Attribute action onWheel :: forall action. (WheelDirection -> action) -> Attribute action onWheel = MisoString -> Decoder WheelDirection @@ -99,16 +99,16 @@ -> DecodeTarget -> Decoder WheelDirection forall a. (Value -> Parser a) -> DecodeTarget -> Decoder a Decoder Value -> Parser WheelDirection -dec DecodeTarget -dt) +dec DecodeTarget +dt) where - dt :: DecodeTarget -dt = [MisoString] -> DecodeTarget + dt :: DecodeTarget +dt = [MisoString] -> DecodeTarget DecodeTarget [MisoString] forall a. Monoid a => a mempty - dec :: Value -> Parser WheelDirection -dec = String + dec :: Value -> Parser WheelDirection +dec = String -> (Object -> Parser WheelDirection) -> Value -> Parser WheelDirection @@ -120,21 +120,21 @@ -> Value -> Parser WheelDirection forall a b. (a -> b) -> a -> b -$ \Object -o -> (Double -> WheelDirection -f (Double -> WheelDirection) +$ \Object +o -> (Double -> WheelDirection +f (Double -> WheelDirection) -> Parser Double -> Parser WheelDirection forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (Object -o Object -> Key -> Parser Double +o Object -> Key -> Parser Double forall a. FromJSON a => Object -> Key -> Parser a .: Key "deltaY")) - f :: Double -> WheelDirection - f :: Double -> WheelDirection -f Double -x = if Double -x Double -> Double -> Bool + f :: Double -> WheelDirection + f :: Double -> WheelDirection +f Double +x = if Double +x Double -> Double -> Bool forall a. Ord a => a -> a -> Bool < Double 0 then WheelDirection @@ -142,7 +142,7 @@ Down -- | get the mouse button that was clicked -onClickWithButton :: (Button -> action) -> Attribute action +onClickWithButton :: (Button -> action) -> Attribute action onClickWithButton :: forall action. (Button -> action) -> Attribute action onClickWithButton = MisoString -> Decoder Button -> (Button -> action) -> Attribute action @@ -152,43 +152,43 @@ "click" ((Value -> Parser Button) -> DecodeTarget -> Decoder Button forall a. (Value -> Parser a) -> DecodeTarget -> Decoder a Decoder Value -> Parser Button -dec DecodeTarget -dt) +dec DecodeTarget +dt) where - dt :: DecodeTarget -dt = [MisoString] -> DecodeTarget + dt :: DecodeTarget +dt = [MisoString] -> DecodeTarget DecodeTarget [MisoString] forall a. Monoid a => a mempty - dec :: Value -> Parser Button - dec :: Value -> Parser Button -dec = String -> (Object -> Parser Button) -> Value -> Parser Button + dec :: Value -> Parser Button + dec :: Value -> Parser Button +dec = String -> (Object -> Parser Button) -> Value -> Parser Button forall a. String -> (Object -> Parser a) -> Value -> Parser a withObject String "event" ((Object -> Parser Button) -> Value -> Parser Button) -> (Object -> Parser Button) -> Value -> Parser Button forall a b. (a -> b) -> a -> b -$ \Object -o -> case Key -> Object -> Maybe Value +$ \Object +o -> case Key -> Object -> Maybe Value forall v. Key -> KeyMap v -> Maybe v Aeson.lookup Key "button" Object -o of +o of Maybe Value Nothing -> String -> Parser Button forall a. String -> Parser a forall (m :: * -> *) a. MonadFail m => String -> m a fail String "button not found?" - Just Value -v -> ((Scientific -> Parser Button) -> Value -> Parser Button) + Just Value +v -> ((Scientific -> Parser Button) -> Value -> Parser Button) -> Value -> (Scientific -> Parser Button) -> Parser Button forall a b c. (a -> b -> c) -> b -> a -> c flip (String -> (Scientific -> Parser Button) -> Value -> Parser Button forall a. String -> (Scientific -> Parser a) -> Value -> Parser a withScientific String "Button") Value -v ((Scientific -> Parser Button) -> Parser Button) +v ((Scientific -> Parser Button) -> Parser Button) -> (Scientific -> Parser Button) -> Parser Button forall a b. (a -> b) -> a -> b $ \case @@ -218,7 +218,7 @@ "unknown button" -- | Get right clicks -onRightClick :: action -> Attribute action +onRightClick :: action -> Attribute action onRightClick :: forall action. action -> Attribute action onRightClick = action -> Attribute action forall action. action -> Attribute action @@ -226,24 +226,24 @@ -- | prevent onContextMenu events -onContextMenu :: action -> Attribute action +onContextMenu :: action -> Attribute action onContextMenu :: forall action. action -> Attribute action -onContextMenu action -act = Options +onContextMenu action +act = Options -> MisoString -> Decoder () -> (() -> action) -> Attribute action forall r action. Options -> MisoString -> Decoder r -> (r -> action) -> Attribute action onWithOptions Options -disabled MisoString +disabled MisoString "contextmenu" Decoder () emptyDecoder (action -> () -> action forall a b. a -> b -> a const action -act) +act) where - disabled :: Options -disabled = Options + disabled :: Options +disabled = Options Event.defaultOptions { preventDefault = True , stopPropagation = False } @@ -297,10 +297,10 @@ -- onTouchEnd = on "touchend" touchDecoder -onTouchEnd :: action -> Attribute action +onTouchEnd :: action -> Attribute action onTouchEnd :: forall action. action -> Attribute action -onTouchEnd action -act = MisoString -> Decoder () -> (() -> action) -> Attribute action +onTouchEnd action +act = MisoString -> Decoder () -> (() -> action) -> Attribute action forall r action. MisoString -> Decoder r -> (r -> action) -> Attribute action on MisoString @@ -308,12 +308,12 @@ emptyDecoder (action -> () -> action forall a b. a -> b -> a const action -act) +act) -onTouchStart :: action -> Attribute action +onTouchStart :: action -> Attribute action onTouchStart :: forall action. action -> Attribute action -onTouchStart action -act = MisoString -> Decoder () -> (() -> action) -> Attribute action +onTouchStart action +act = MisoString -> Decoder () -> (() -> action) -> Attribute action forall r action. MisoString -> Decoder r -> (r -> action) -> Attribute action on MisoString @@ -321,12 +321,12 @@ emptyDecoder (action -> () -> action forall a b. a -> b -> a const action -act) +act) -onTouchMove :: action -> Attribute action +onTouchMove :: action -> Attribute action onTouchMove :: forall action. action -> Attribute action -onTouchMove action -act = MisoString -> Decoder () -> (() -> action) -> Attribute action +onTouchMove action +act = MisoString -> Decoder () -> (() -> action) -> Attribute action forall r action. MisoString -> Decoder r -> (r -> action) -> Attribute action on MisoString @@ -334,5 +334,5 @@ emptyDecoder (action -> () -> action forall a b. a -> b -> a const action -act) +act) \ No newline at end of file diff --git a/haddocks/hgeometry/miso/src/HGeometry.Miso.FFI.Extra.html b/haddocks/hgeometry/miso/src/HGeometry.Miso.FFI.Extra.html index 0f0ed2959..81247d334 100644 --- a/haddocks/hgeometry/miso/src/HGeometry.Miso.FFI.Extra.html +++ b/haddocks/hgeometry/miso/src/HGeometry.Miso.FFI.Extra.html @@ -18,9 +18,9 @@ -- | call the "getBoundingClientRect" function of an object getBoundingClientRect :: JSVal -> JSM JSVal getBoundingClientRect :: JSVal -> JSM JSVal -getBoundingClientRect JSVal -e = JSVal -e JSVal -> Getting (JSM JSVal) JSVal (JSM JSVal) -> JSM JSVal +getBoundingClientRect JSVal +e = JSVal +e JSVal -> Getting (JSM JSVal) JSVal (JSM JSVal) -> JSM JSVal forall s a. s -> Getting a s a -> a ^. String -> JSF forall name. ToJSString name => name -> JSF diff --git a/haddocks/hgeometry/miso/src/HGeometry.Miso.Subscription.MouseExtra.html b/haddocks/hgeometry/miso/src/HGeometry.Miso.Subscription.MouseExtra.html index 8be2951ce..fa36d2a49 100644 --- a/haddocks/hgeometry/miso/src/HGeometry.Miso.Subscription.MouseExtra.html +++ b/haddocks/hgeometry/miso/src/HGeometry.Miso.Subscription.MouseExtra.html @@ -39,7 +39,7 @@ -------------------------------------------------------------------------------- -- | onMouseMove event, the position is relative to the target of the event -onMouseMoveAt :: (Point 2 Int -> action) -> Attribute action +onMouseMoveAt :: (Point 2 Int -> action) -> Attribute action onMouseMoveAt :: forall action. (Point 2 Int -> action) -> Attribute action onMouseMoveAt = MisoString -> Decoder (Point 2 Int) @@ -52,7 +52,7 @@ mousePositionDecoder -- | onMouseEnter event, the position is relative to the target of the event -onMouseEnterAt :: (Point 2 Int -> action) -> Attribute action +onMouseEnterAt :: (Point 2 Int -> action) -> Attribute action onMouseEnterAt :: forall action. (Point 2 Int -> action) -> Attribute action onMouseEnterAt = MisoString -> Decoder (Point 2 Int) @@ -65,7 +65,7 @@ mousePositionDecoder -- | onMouseEnter event, the position is relative to the target of the event -onMouseClickAt :: (Point 2 Int -> action) -> Attribute action +onMouseClickAt :: (Point 2 Int -> action) -> Attribute action onMouseClickAt :: forall action. (Point 2 Int -> action) -> Attribute action onMouseClickAt = MisoString -> Decoder (Point 2 Int) @@ -85,16 +85,16 @@ -> DecodeTarget -> Decoder (Point 2 Int) forall a. (Value -> Parser a) -> DecodeTarget -> Decoder a Decoder Value -> Parser (Point 2 Int) -dec DecodeTarget -dt +dec DecodeTarget +dt where - dt :: DecodeTarget -dt = [MisoString] -> DecodeTarget + dt :: DecodeTarget +dt = [MisoString] -> DecodeTarget DecodeTarget [MisoString] forall a. Monoid a => a mempty - dec :: Value -> Parser (Point 2 Int) -dec = String + dec :: Value -> Parser (Point 2 Int) +dec = String -> (Object -> Parser (Point 2 Int)) -> Value -> Parser (Point 2 Int) @@ -105,21 +105,21 @@ -> Value -> Parser (Point 2 Int) forall a b. (a -> b) -> a -> b -$ \Object -o -> Int -> Int -> Point 2 Int +$ \Object +o -> Int -> Int -> Point 2 Int forall r. r -> r -> Point 2 r Point2 (Int -> Int -> Point 2 Int) -> Parser Int -> Parser (Int -> Point 2 Int) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Object -o Object -> Key -> Parser Int +o Object -> Key -> Parser Int forall a. FromJSON a => Object -> Key -> Parser a .: Key "offsetX" Parser (Int -> Point 2 Int) -> Parser Int -> Parser (Point 2 Int) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Object -o Object -> Key -> Parser Int +o Object -> Key -> Parser Int forall a. FromJSON a => Object -> Key -> Parser a .: Key "offsetY" @@ -127,7 +127,7 @@ -------------------------------------------------------------------------------- -- | On start of a touch event, -onTouchStartAt :: (Point 2 Int -> action) -> Attribute action +onTouchStartAt :: (Point 2 Int -> action) -> Attribute action onTouchStartAt :: forall action. (Point 2 Int -> action) -> Attribute action onTouchStartAt = MisoString -> Decoder (Point 2 Int) @@ -143,7 +143,7 @@ touchDecoder -- | On touchMove event -onTouchMoveAt :: (Point 2 Int -> action) -> Attribute action +onTouchMoveAt :: (Point 2 Int -> action) -> Attribute action onTouchMoveAt :: forall action. (Point 2 Int -> action) -> Attribute action onTouchMoveAt = MisoString -> Decoder (Point 2 Int) @@ -159,10 +159,10 @@ touchDecoder -- | onTouchEnd event -onTouchEnd :: action -> Attribute action +onTouchEnd :: action -> Attribute action onTouchEnd :: forall action. action -> Attribute action -onTouchEnd action -act = MisoString -> Decoder () -> (() -> action) -> Attribute action +onTouchEnd action +act = MisoString -> Decoder () -> (() -> action) -> Attribute action forall r action. MisoString -> Decoder r -> (r -> action) -> Attribute action on MisoString @@ -170,7 +170,7 @@ emptyDecoder (action -> () -> action forall a b. a -> b -> a const action -act) +act) touchDecoder :: Decoder (Point 2 Int) @@ -179,30 +179,30 @@ -> DecodeTarget -> Decoder (Point 2 Int) forall a. (Value -> Parser a) -> DecodeTarget -> Decoder a Decoder Value -> Parser (Point 2 Int) -dec DecodeTarget -dt +dec DecodeTarget +dt where - dt :: DecodeTarget -dt = [MisoString] -> DecodeTarget + dt :: DecodeTarget +dt = [MisoString] -> DecodeTarget DecodeTarget [MisoString "targetTouches"] - dec :: Value -> Parser (Point 2 Int) - dec :: Value -> Parser (Point 2 Int) -dec = String + dec :: Value -> Parser (Point 2 Int) + dec :: Value -> Parser (Point 2 Int) +dec = String -> (Array -> Parser (Point 2 Int)) -> Value -> Parser (Point 2 Int) forall a. String -> (Array -> Parser a) -> Value -> Parser a withArray String "targetTouches" ((Array -> Parser (Point 2 Int)) -> Value -> Parser (Point 2 Int)) -> (Array -> Parser (Point 2 Int)) -> Value -> Parser (Point 2 Int) forall a b. (a -> b) -> a -> b -$ \Array -arr -> case Array -> [Value] +$ \Array +arr -> case Array -> [Value] forall a. Vector a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList Array -arr of - (Value -tv:[Value] +arr of + (Value +tv:[Value] _) -> ((Object -> Parser (Point 2 Int)) -> Value -> Parser (Point 2 Int)) -> Value -> (Object -> Parser (Point 2 Int)) @@ -215,25 +215,25 @@ forall a. String -> (Object -> Parser a) -> Value -> Parser a withObject String "touch") Value -tv ((Object -> Parser (Point 2 Int)) -> Parser (Point 2 Int)) +tv ((Object -> Parser (Point 2 Int)) -> Parser (Point 2 Int)) -> (Object -> Parser (Point 2 Int)) -> Parser (Point 2 Int) forall a b. (a -> b) -> a -> b -$ \Object -t -> +$ \Object +t -> Int -> Int -> Point 2 Int forall r. r -> r -> Point 2 r Point2 (Int -> Int -> Point 2 Int) -> Parser Int -> Parser (Int -> Point 2 Int) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Object -t Object -> Key -> Parser Int +t Object -> Key -> Parser Int forall a. FromJSON a => Object -> Key -> Parser a .: Key "clientX" Parser (Int -> Point 2 Int) -> Parser Int -> Parser (Point 2 Int) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Object -t Object -> Key -> Parser Int +t Object -> Key -> Parser Int forall a. FromJSON a => Object -> Key -> Parser a .: Key "clientY" @@ -279,52 +279,52 @@ -- | A version of onWithOptions that also decodes the left, top, and clientLeft and clientTop -- values of the target element. -onRelativeTo :: MisoString -> Decoder (Point 2 Int) -> (Point 2 Int -> action) - -> Attribute action +onRelativeTo :: MisoString -> Decoder (Point 2 Int) -> (Point 2 Int -> action) + -> Attribute action onRelativeTo :: forall action. MisoString -> Decoder (Point 2 Int) -> (Point 2 Int -> action) -> Attribute action -onRelativeTo MisoString -eventName Decoder{DecodeTarget +onRelativeTo MisoString +eventName Decoder{DecodeTarget Value -> Parser (Point 2 Int) decoder :: Value -> Parser (Point 2 Int) decodeAt :: DecodeTarget decoder :: forall a. Decoder a -> Value -> Parser a decodeAt :: forall a. Decoder a -> DecodeTarget -..} Point 2 Int -> action -toAction = +..} Point 2 Int -> action +toAction = (Sink action -> Object -> JSM ()) -> Attribute action forall action. (Sink action -> Object -> JSM ()) -> Attribute action E ((Sink action -> Object -> JSM ()) -> Attribute action) -> (Sink action -> Object -> JSM ()) -> Attribute action forall a b. (a -> b) -> a -> b -$ \Sink action -sink Object -n -> do - JSVal -eventObj <- JSString -> Object -> JSM JSVal +$ \Sink action +sink Object +n -> do + JSVal +eventObj <- JSString -> Object -> JSM JSVal getProp JSString "events" Object -n - eventHandlerObject :: Object -eventHandlerObject@(Object JSVal -eo) <- JSM Object +n + eventHandlerObject :: Object +eventHandlerObject@(Object JSVal +eo) <- JSM Object create - JSVal -jsOptions <- Options -> JSM JSVal + JSVal +jsOptions <- Options -> JSM JSVal forall a. ToJSVal a => a -> JSM JSVal toJSVal Options -options - JSVal -decodeAtVal <- DecodeTarget -> JSM JSVal +options + JSVal +decodeAtVal <- DecodeTarget -> JSM JSVal forall a. ToJSVal a => a -> JSM JSVal toJSVal DecodeTarget -decodeAt - JSVal -cb <- Function -> JSM JSVal +decodeAt + JSVal +cb <- Function -> JSM JSVal callbackToJSVal (Function -> JSM JSVal) -> ((JSVal -> JSM ()) -> JSM Function) -> (JSVal -> JSM ()) @@ -335,10 +335,10 @@ <=< (JSVal -> JSM ()) -> JSM Function asyncCallback1 ((JSVal -> JSM ()) -> JSM JSVal) -> (JSVal -> JSM ()) -> JSM JSVal forall a b. (a -> b) -> a -> b -$ \JSVal -event -> do - Just JSVal -target <- JSVal -> JSM (Maybe JSVal) +$ \JSVal +event -> do + Just JSVal +target <- JSVal -> JSM (Maybe JSVal) forall a. FromJSVal a => JSVal -> JSM (Maybe a) fromJSVal (JSVal -> JSM (Maybe JSVal)) -> JSM JSVal -> JSM (Maybe JSVal) forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b @@ -346,34 +346,34 @@ unsafeGetProp JSString "target" (JSVal -> Object Object JSVal -event) - Object -rect <- JSVal -> Object +event) + Object +rect <- JSVal -> Object Object (JSVal -> Object) -> JSM JSVal -> JSM Object forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> JSVal -> JSM JSVal getBoundingClientRect JSVal -target - Just Int -l <- JSVal -> JSM (Maybe Int) +target + Just Int +l <- JSVal -> JSM (Maybe Int) forall a. FromJSVal a => JSVal -> JSM (Maybe a) fromJSVal (JSVal -> JSM (Maybe Int)) -> JSM JSVal -> JSM (Maybe Int) forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< JSString -> Object -> JSM JSVal unsafeGetProp JSString "left" Object -rect - Just Int -t <- JSVal -> JSM (Maybe Int) +rect + Just Int +t <- JSVal -> JSM (Maybe Int) forall a. FromJSVal a => JSVal -> JSM (Maybe a) fromJSVal (JSVal -> JSM (Maybe Int)) -> JSM JSVal -> JSM (Maybe Int) forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< JSString -> Object -> JSM JSVal unsafeGetProp JSString "top" Object -rect - Just Int -cl <- JSVal -> JSM (Maybe Int) +rect + Just Int +cl <- JSVal -> JSM (Maybe Int) forall a. FromJSVal a => JSVal -> JSM (Maybe a) fromJSVal (JSVal -> JSM (Maybe Int)) -> JSM JSVal -> JSM (Maybe Int) forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b @@ -381,9 +381,9 @@ unsafeGetProp JSString "clientLeft" (JSVal -> Object Object JSVal -target) - Just Int -ct <- JSVal -> JSM (Maybe Int) +target) + Just Int +ct <- JSVal -> JSM (Maybe Int) forall a. FromJSVal a => JSVal -> JSM (Maybe a) fromJSVal (JSVal -> JSM (Maybe Int)) -> JSM JSVal -> JSM (Maybe Int) forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b @@ -391,24 +391,24 @@ unsafeGetProp JSString "clientTop" (JSVal -> Object Object JSVal -target) - Just Value -v <- JSVal -> JSM (Maybe Value) +target) + Just Value +v <- JSVal -> JSM (Maybe Value) forall a. FromJSVal a => JSVal -> JSM (Maybe a) fromJSVal (JSVal -> JSM (Maybe Value)) -> JSM JSVal -> JSM (Maybe Value) forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< JSVal -> JSVal -> JSM JSVal objectToJSON JSVal -decodeAtVal JSVal -event +decodeAtVal JSVal +event case (Value -> Parser (Point 2 Int)) -> Value -> Either String (Point 2 Int) forall a b. (a -> Parser b) -> a -> Either String b parseEither Value -> Parser (Point 2 Int) -decoder Value -v of - Left String -s -> String -> JSM () +decoder Value +v of + Left String +s -> String -> JSM () forall a. HasCallStack => String -> a error (String -> JSM ()) -> String -> JSM () forall a b. (a -> b) -> a -> b @@ -417,31 +417,31 @@ forall a. Semigroup a => a -> a -> a <> MisoString -> String unpack MisoString -eventName String -> String -> String +eventName String -> String -> String forall a. Semigroup a => a -> a -> a <> String ": " String -> String -> String forall a. Semigroup a => a -> a -> a <> String -s - Right Point 2 Int -p -> do let p' :: Point 2 Int -p' = Point 2 Int -p Point 2 Int -> Vector 2 Int -> Point 2 Int +s + Right Point 2 Int +p -> do let p' :: Point 2 Int +p' = Point 2 Int +p Point 2 Int -> Vector 2 Int -> Point 2 Int forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .-^ Int -> Int -> Vector 2 Int forall r. r -> r -> Vector 2 r Vector2 (Int -lInt -> Int -> Int +lInt -> Int -> Int forall a. Num a => a -> a -> a +Int -cl) (Int -tInt -> Int -> Int +cl) (Int +tInt -> Int -> Int forall a. Num a => a -> a -> a +Int -ct) +ct) IO () -> JSM () forall a. IO a -> JSM a forall (m :: * -> *) a. MonadIO m => IO a -> m a @@ -454,51 +454,51 @@ $ MisoString -> String forall a. Show a => a -> String show MisoString -eventName String -> String -> String +eventName String -> String -> String forall a. Semigroup a => a -> a -> a <> (Int, Int, Int, Int, Point 2 Int, Point 2 Int) -> String forall a. Show a => a -> String show (Int -l,Int -t,Int -cl,Int -ct,Point 2 Int -p, Point 2 Int -p') +l,Int +t,Int +cl,Int +ct,Point 2 Int +p, Point 2 Int +p') IO () -> JSM () forall a. IO a -> JSM a forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> JSM ()) -> IO () -> JSM () forall a b. (a -> b) -> a -> b $ Sink action -sink (Point 2 Int -> action -toAction Point 2 Int -p') +sink (Point 2 Int -> action +toAction Point 2 Int +p') MisoString -> JSVal -> Object -> JSM () forall v. ToJSVal v => MisoString -> v -> Object -> JSM () set MisoString "runEvent" JSVal -cb Object -eventHandlerObject +cb Object +eventHandlerObject JSVal -> JSM () registerCallback JSVal -cb +cb MisoString -> JSVal -> Object -> JSM () forall v. ToJSVal v => MisoString -> v -> Object -> JSM () set MisoString "options" JSVal -jsOptions Object -eventHandlerObject +jsOptions Object +eventHandlerObject MisoString -> JSVal -> Object -> JSM () forall v. ToJSVal v => MisoString -> v -> Object -> JSM () set MisoString -eventName JSVal -eo (JSVal -> Object +eventName JSVal +eo (JSVal -> Object Object JSVal -eventObj) +eventObj) where - options :: Options -options = Options + options :: Options +options = Options defaultOptions { preventDefault = True , stopPropagation = False } diff --git a/haddocks/hgeometry/point-quickcheck/src/HGeometry.Point.Instances.html b/haddocks/hgeometry/point-quickcheck/src/HGeometry.Point.Instances.html index 0b34ee0d9..9369641f2 100644 --- a/haddocks/hgeometry/point-quickcheck/src/HGeometry.Point.Instances.html +++ b/haddocks/hgeometry/point-quickcheck/src/HGeometry.Point.Instances.html @@ -17,23 +17,23 @@ import Test.QuickCheck -------------------------------------------------------------------------------- -instance Arbitrary v => Arbitrary (PointF v) where - arbitrary :: Gen (PointF v) -arbitrary = v -> PointF v +instance Arbitrary v => Arbitrary (PointF v) where + arbitrary :: Gen (PointF v) +arbitrary = v -> PointF v forall v. v -> PointF v Point (v -> PointF v) -> Gen v -> Gen (PointF v) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Gen v forall a. Arbitrary a => Gen a arbitrary - shrink :: PointF v -> [PointF v] -shrink (Point v -v) = v -> PointF v + shrink :: PointF v -> [PointF v] +shrink (Point v +v) = v -> PointF v forall v. v -> PointF v Point (v -> PointF v) -> [v] -> [PointF v] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> v -> [v] forall a. Arbitrary a => a -> [a] shrink v -v +v \ No newline at end of file diff --git a/haddocks/hgeometry/point/HGeometry-Point-Class.html b/haddocks/hgeometry/point/HGeometry-Point-Class.html index 7ccbcb63f..2335e2420 100644 --- a/haddocks/hgeometry/point/HGeometry-Point-Class.html +++ b/haddocks/hgeometry/point/HGeometry-Point-Class.html @@ -25,7 +25,7 @@
[2]

Instances

Instances details
(Additive_ vector d r, Additive_ (Vector d r) d r) => Point_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coord' :: Int -> IndexedTraversal' Int (PointF vector) r Source #

Point_ point d r => Point_ (point :+ extra) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

coord' :: Int -> IndexedTraversal' Int (point :+ extra) r Source #

(d ~ Dimension (v r), r ~ IxValue (v r), Vector_ (v r) d r, Additive_ (Vector d r) d r) => Point_ (Point v r) d r Source # 
Instance details

Defined in HGeometry.Point.Class

pattern Point1_ :: Point_ point 1 r => r -> point Source #

A pattern synonym for 1 dimensional points.

pattern Point2_ :: Point_ point 2 r => r -> r -> point Source #

A pattern synonym for 2 dimensional points.

pattern Point3_ :: Point_ point 3 r => r -> r -> r -> point Source #

A pattern synonym for 3 dimensional points.

pattern Point4_ :: Point_ point 4 r => r -> r -> r -> r -> point Source #

A bidirectional pattern synonym for 4 dimensional points.

class Point_ point d r => ConstructablePoint_ point d r where Source #

Type class for constructable points

Methods

fromVector :: Vector d r -> point Source #

Construct a point from a vector

>>> fromVector (Vector4 1 2 3 4) :: Point 4 Int
 Point4 1 2 3 4
-

Instances

Instances details
(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(ConstructablePoint_ point d r, Default extra) => ConstructablePoint_ (point :+ extra) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> point :+ extra Source #

(d ~ Dimension (v r), r ~ IxValue (v r), Vector_ (v r) d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (Point v r) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> Point v r Source #

origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point Source #

Point representing the origin in d dimensions

>>> origin :: Point 4 Int
+

Instances

Instances details
(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(ConstructablePoint_ point d r, Default extra) => ConstructablePoint_ (point :+ extra) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> point :+ extra Source #

(d ~ Dimension (v r), r ~ IxValue (v r), Vector_ (v r) d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (Point v r) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> Point v r Source #

origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point Source #

Point representing the origin in d dimensions

>>> origin :: Point 4 Int
 Point4 0 0 0 0
 

pointFromList :: (ConstructablePoint_ point d r, Vector_ (Vector d r) d r) => [r] -> Maybe point Source #

Constructs a point from a list of coordinates. The length of the list has to match the dimension exactly.

>>> pointFromList [1,2,3] :: Maybe (Point 3 Int)
diff --git a/haddocks/hgeometry/point/HGeometry-Point-PointF.html b/haddocks/hgeometry/point/HGeometry-Point-PointF.html
index 04951bb64..3c7636fa6 100644
--- a/haddocks/hgeometry/point/HGeometry-Point-PointF.html
+++ b/haddocks/hgeometry/point/HGeometry-Point-PointF.html
@@ -1 +1 @@
-HGeometry.Point.PointF
hgeometry:point
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Point.PointF

Description

Implements a point by wrapping some Vector type

Synopsis

Documentation

newtype PointF v Source #

A Point wraps a vector

Constructors

Point 

Fields

Instances

Instances details
Unbox v => Vector Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Unbox v => MVector MVector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

FromYAML v => FromYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToYAML v => ToYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toYAML :: PointF v -> Node () Source #

FromJSON v => FromJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToJSON v => ToJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Bounded v => Bounded (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

minBound :: PointF v #

maxBound :: PointF v #

Enum v => Enum (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

succ :: PointF v -> PointF v #

pred :: PointF v -> PointF v #

toEnum :: Int -> PointF v #

fromEnum :: PointF v -> Int #

enumFrom :: PointF v -> [PointF v] #

enumFromThen :: PointF v -> PointF v -> [PointF v] #

enumFromTo :: PointF v -> PointF v -> [PointF v] #

enumFromThenTo :: PointF v -> PointF v -> PointF v -> [PointF v] #

Generic (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Associated Types

type Rep (PointF v) :: Type -> Type #

Methods

from :: PointF v -> Rep (PointF v) x #

to :: Rep (PointF v) x -> PointF v #

(Additive_ vector d r, Additive_ (Vector d r) d r, Read r) => Read (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

readsPrec :: Int -> ReadS (PointF vector) #

readList :: ReadS [PointF vector] #

readPrec :: ReadPrec (PointF vector) #

readListPrec :: ReadPrec [PointF vector] #

(Additive_ vector d r, Additive_ (Vector d r) d r, Show r) => Show (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

showsPrec :: Int -> PointF vector -> ShowS #

show :: PointF vector -> String #

showList :: [PointF vector] -> ShowS #

NFData v => NFData (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

rnf :: PointF v -> () #

Eq v => Eq (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(==) :: PointF v -> PointF v -> Bool #

(/=) :: PointF v -> PointF v -> Bool #

Ord v => Ord (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

compare :: PointF v -> PointF v -> Ordering #

(<) :: PointF v -> PointF v -> Bool #

(<=) :: PointF v -> PointF v -> Bool #

(>) :: PointF v -> PointF v -> Bool #

(>=) :: PointF v -> PointF v -> Bool #

max :: PointF v -> PointF v -> PointF v #

min :: PointF v -> PointF v -> PointF v #

(Vector_ v d r, Metric_ (Vector d r) d r) => HasSquaredEuclideanDistance (PointF v) Source # 
Instance details

Defined in HGeometry.Point.EuclideanDistance

Methods

squaredEuclideanDistTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> r Source #

pointClosestTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> Point d r Source #

pointClosestToWithDistance :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> (Point d r, r) Source #

Random v => Random (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

randomR :: RandomGen g => (PointF v, PointF v) -> g -> (PointF v, g) Source #

random :: RandomGen g => g -> (PointF v, g) Source #

randomRs :: RandomGen g => (PointF v, PointF v) -> g -> [PointF v] Source #

randoms :: RandomGen g => g -> [PointF v] Source #

Uniform v => Uniform (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformM :: StatefulGen g m => g -> m (PointF v) Source #

UniformRange v => UniformRange (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformRM :: StatefulGen g m => (PointF v, PointF v) -> g -> m (PointF v) Source #

Unbox v => Unbox (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

IsoUnbox (PointF v) v Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toURepr :: PointF v -> v Source #

fromURepr :: v -> PointF v Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Affine_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(.-.) :: PointF vector -> PointF vector -> Vector d r Source #

(.+^) :: PointF vector -> Vector d r -> PointF vector Source #

(.-^) :: PointF vector -> Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Point_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coord' :: Int -> IndexedTraversal' Int (PointF vector) r Source #

(Has_ Vector_ d r, Has_ Vector_ d s, Vector_ vector d r, Vector_ vector' d s, AsVector_ vector vector' d r s, HasComponents (Vector d r) (Vector d s), HasComponents vector vector') => HasCoordinates (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coordinates :: IndexedTraversal1 Int (PointF vector) (PointF vector') (NumType (PointF vector)) (NumType (PointF vector')) Source #

(Vector_ vector d r, Vector_ vector' d s, Has_ Vector_ d r, Has_ Vector_ d s, AsVector_ vector vector' d r s, HasComponents vector vector') => HasVector (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

vector :: forall (d :: Nat) r s. (Dimension (PointF vector) ~ d, NumType (PointF vector) ~ r, Dimension (PointF vector') ~ d, NumType (PointF vector') ~ s) => Lens (PointF vector) (PointF vector') (Vector d r) (Vector d s) Source #

HasPoints (PointF v) (PointF v') (PointF v) (PointF v') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ (PointF v) d r, Point_ (PointF v') d r', NumType (PointF v) ~ r, NumType (PointF v') ~ r', Dimension (PointF v) ~ d, Dimension (PointF v') ~ d) => Traversal1 (PointF v) (PointF v') (PointF v) (PointF v') Source #

newtype MVector s (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype MVector s (PointF v) = MV_PointF (MVector s v)
type Rep (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Rep (PointF v) = D1 ('MetaData "PointF" "HGeometry.Point.PointF" "hgeometry-1.0.0.0-inplace-point" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "toVec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 v)))
type Dimension (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Dimension (PointF v) = Dimension v
type NumType (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type NumType (PointF v) = IxValue v
type IxValue (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type IxValue (PointF v) = IxValue v
newtype Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype Vector (PointF v) = V_PointF (Vector v)
\ No newline at end of file +HGeometry.Point.PointF
hgeometry:point
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Point.PointF

Description

Implements a point by wrapping some Vector type

Synopsis

Documentation

newtype PointF v Source #

A Point wraps a vector

Constructors

Point 

Fields

Instances

Instances details
Unbox v => Vector Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Unbox v => MVector MVector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

FromYAML v => FromYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToYAML v => ToYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toYAML :: PointF v -> Node () Source #

FromJSON v => FromJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToJSON v => ToJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Bounded v => Bounded (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

minBound :: PointF v #

maxBound :: PointF v #

Enum v => Enum (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

succ :: PointF v -> PointF v #

pred :: PointF v -> PointF v #

toEnum :: Int -> PointF v #

fromEnum :: PointF v -> Int #

enumFrom :: PointF v -> [PointF v] #

enumFromThen :: PointF v -> PointF v -> [PointF v] #

enumFromTo :: PointF v -> PointF v -> [PointF v] #

enumFromThenTo :: PointF v -> PointF v -> PointF v -> [PointF v] #

Generic (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Associated Types

type Rep (PointF v) :: Type -> Type #

Methods

from :: PointF v -> Rep (PointF v) x #

to :: Rep (PointF v) x -> PointF v #

(Additive_ vector d r, Additive_ (Vector d r) d r, Read r) => Read (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

readsPrec :: Int -> ReadS (PointF vector) #

readList :: ReadS [PointF vector] #

readPrec :: ReadPrec (PointF vector) #

readListPrec :: ReadPrec [PointF vector] #

(Additive_ vector d r, Additive_ (Vector d r) d r, Show r) => Show (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

showsPrec :: Int -> PointF vector -> ShowS #

show :: PointF vector -> String #

showList :: [PointF vector] -> ShowS #

NFData v => NFData (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

rnf :: PointF v -> () #

Eq v => Eq (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(==) :: PointF v -> PointF v -> Bool #

(/=) :: PointF v -> PointF v -> Bool #

Ord v => Ord (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

compare :: PointF v -> PointF v -> Ordering #

(<) :: PointF v -> PointF v -> Bool #

(<=) :: PointF v -> PointF v -> Bool #

(>) :: PointF v -> PointF v -> Bool #

(>=) :: PointF v -> PointF v -> Bool #

max :: PointF v -> PointF v -> PointF v #

min :: PointF v -> PointF v -> PointF v #

(Vector_ v d r, Metric_ (Vector d r) d r) => HasSquaredEuclideanDistance (PointF v) Source # 
Instance details

Defined in HGeometry.Point.EuclideanDistance

Methods

squaredEuclideanDistTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> r Source #

pointClosestTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> Point d r Source #

pointClosestToWithDistance :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> (Point d r, r) Source #

Random v => Random (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

randomR :: RandomGen g => (PointF v, PointF v) -> g -> (PointF v, g) Source #

random :: RandomGen g => g -> (PointF v, g) Source #

randomRs :: RandomGen g => (PointF v, PointF v) -> g -> [PointF v] Source #

randoms :: RandomGen g => g -> [PointF v] Source #

Uniform v => Uniform (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformM :: StatefulGen g m => g -> m (PointF v) Source #

UniformRange v => UniformRange (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformRM :: StatefulGen g m => (PointF v, PointF v) -> g -> m (PointF v) Source #

Unbox v => Unbox (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

IsoUnbox (PointF v) v Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toURepr :: PointF v -> v Source #

fromURepr :: v -> PointF v Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Affine_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(.-.) :: PointF vector -> PointF vector -> Vector d r Source #

(.+^) :: PointF vector -> Vector d r -> PointF vector Source #

(.-^) :: PointF vector -> Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Point_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coord' :: Int -> IndexedTraversal' Int (PointF vector) r Source #

(Has_ Vector_ d r, Has_ Vector_ d s, Vector_ vector d r, Vector_ vector' d s, AsVector_ vector vector' d r s, HasComponents (Vector d r) (Vector d s), HasComponents vector vector') => HasCoordinates (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coordinates :: IndexedTraversal1 Int (PointF vector) (PointF vector') (NumType (PointF vector)) (NumType (PointF vector')) Source #

(Vector_ vector d r, Vector_ vector' d s, Has_ Vector_ d r, Has_ Vector_ d s, AsVector_ vector vector' d r s, HasComponents vector vector') => HasVector (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

vector :: forall (d :: Nat) r s. (Dimension (PointF vector) ~ d, NumType (PointF vector) ~ r, Dimension (PointF vector') ~ d, NumType (PointF vector') ~ s) => Lens (PointF vector) (PointF vector') (Vector d r) (Vector d s) Source #

HasPoints (PointF v) (PointF v') (PointF v) (PointF v') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ (PointF v) d r, Point_ (PointF v') d r', NumType (PointF v) ~ r, NumType (PointF v') ~ r', Dimension (PointF v) ~ d, Dimension (PointF v') ~ d) => Traversal1 (PointF v) (PointF v') (PointF v) (PointF v') Source #

newtype MVector s (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype MVector s (PointF v) = MV_PointF (MVector s v)
type Rep (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Rep (PointF v) = D1 ('MetaData "PointF" "HGeometry.Point.PointF" "hgeometry-1.0.0.0-inplace-point" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "toVec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 v)))
type Dimension (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Dimension (PointF v) = Dimension v
type NumType (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type NumType (PointF v) = IxValue v
type IxValue (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type IxValue (PointF v) = IxValue v
newtype Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype Vector (PointF v) = V_PointF (Vector v)
\ No newline at end of file diff --git a/haddocks/hgeometry/point/HGeometry-Point.html b/haddocks/hgeometry/point/HGeometry-Point.html index cc249409f..b493877c3 100644 --- a/haddocks/hgeometry/point/HGeometry-Point.html +++ b/haddocks/hgeometry/point/HGeometry-Point.html @@ -1,9 +1,9 @@ -HGeometry.Point
hgeometry:point
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Point

Description

\(d\)-dimensional points.

Synopsis

Documentation

type Point d r = PointF (Vector d r) Source #

d-dimensional points

newtype PointF v Source #

A Point wraps a vector

Constructors

Point 

Fields

Bundled Patterns

pattern Point1 :: r -> Point 1 r

A bidirectional pattern synonym for 1 dimensional points.

pattern Point2 :: r -> r -> Point 2 r

A bidirectional pattern synonym for 2 dimensional points.

pattern Point3 :: r -> r -> r -> Point 3 r

A bidirectional pattern synonym for 3 dimensional points.

pattern Point4 :: r -> r -> r -> r -> Point 4 r

A bidirectional pattern synonym for 4 dimensional points.

Instances

Instances details
Unbox v => Vector Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Unbox v => MVector MVector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

FromYAML v => FromYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToYAML v => ToYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toYAML :: PointF v -> Node () Source #

FromJSON v => FromJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToJSON v => ToJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Bounded v => Bounded (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

minBound :: PointF v #

maxBound :: PointF v #

Enum v => Enum (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

succ :: PointF v -> PointF v #

pred :: PointF v -> PointF v #

toEnum :: Int -> PointF v #

fromEnum :: PointF v -> Int #

enumFrom :: PointF v -> [PointF v] #

enumFromThen :: PointF v -> PointF v -> [PointF v] #

enumFromTo :: PointF v -> PointF v -> [PointF v] #

enumFromThenTo :: PointF v -> PointF v -> PointF v -> [PointF v] #

Generic (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Associated Types

type Rep (PointF v) :: Type -> Type #

Methods

from :: PointF v -> Rep (PointF v) x #

to :: Rep (PointF v) x -> PointF v #

(Additive_ vector d r, Additive_ (Vector d r) d r, Read r) => Read (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

readsPrec :: Int -> ReadS (PointF vector) #

readList :: ReadS [PointF vector] #

readPrec :: ReadPrec (PointF vector) #

readListPrec :: ReadPrec [PointF vector] #

(Additive_ vector d r, Additive_ (Vector d r) d r, Show r) => Show (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

showsPrec :: Int -> PointF vector -> ShowS #

show :: PointF vector -> String #

showList :: [PointF vector] -> ShowS #

NFData v => NFData (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

rnf :: PointF v -> () #

Eq v => Eq (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(==) :: PointF v -> PointF v -> Bool #

(/=) :: PointF v -> PointF v -> Bool #

Ord v => Ord (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

compare :: PointF v -> PointF v -> Ordering #

(<) :: PointF v -> PointF v -> Bool #

(<=) :: PointF v -> PointF v -> Bool #

(>) :: PointF v -> PointF v -> Bool #

(>=) :: PointF v -> PointF v -> Bool #

max :: PointF v -> PointF v -> PointF v #

min :: PointF v -> PointF v -> PointF v #

(Vector_ v d r, Metric_ (Vector d r) d r) => HasSquaredEuclideanDistance (PointF v) Source # 
Instance details

Defined in HGeometry.Point.EuclideanDistance

Methods

squaredEuclideanDistTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> r Source #

pointClosestTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> Point d r Source #

pointClosestToWithDistance :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> (Point d r, r) Source #

Random v => Random (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

randomR :: RandomGen g => (PointF v, PointF v) -> g -> (PointF v, g) Source #

random :: RandomGen g => g -> (PointF v, g) Source #

randomRs :: RandomGen g => (PointF v, PointF v) -> g -> [PointF v] Source #

randoms :: RandomGen g => g -> [PointF v] Source #

Uniform v => Uniform (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformM :: StatefulGen g m => g -> m (PointF v) Source #

UniformRange v => UniformRange (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformRM :: StatefulGen g m => (PointF v, PointF v) -> g -> m (PointF v) Source #

Unbox v => Unbox (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

IsoUnbox (PointF v) v Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toURepr :: PointF v -> v Source #

fromURepr :: v -> PointF v Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Affine_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(.-.) :: PointF vector -> PointF vector -> Vector d r Source #

(.+^) :: PointF vector -> Vector d r -> PointF vector Source #

(.-^) :: PointF vector -> Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Point_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coord' :: Int -> IndexedTraversal' Int (PointF vector) r Source #

(Has_ Vector_ d r, Has_ Vector_ d s, Vector_ vector d r, Vector_ vector' d s, AsVector_ vector vector' d r s, HasComponents (Vector d r) (Vector d s), HasComponents vector vector') => HasCoordinates (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coordinates :: IndexedTraversal1 Int (PointF vector) (PointF vector') (NumType (PointF vector)) (NumType (PointF vector')) Source #

(Vector_ vector d r, Vector_ vector' d s, Has_ Vector_ d r, Has_ Vector_ d s, AsVector_ vector vector' d r s, HasComponents vector vector') => HasVector (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

vector :: forall (d :: Nat) r s. (Dimension (PointF vector) ~ d, NumType (PointF vector) ~ r, Dimension (PointF vector') ~ d, NumType (PointF vector') ~ s) => Lens (PointF vector) (PointF vector') (Vector d r) (Vector d s) Source #

HasPoints (PointF v) (PointF v') (PointF v) (PointF v') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ (PointF v) d r, Point_ (PointF v') d r', NumType (PointF v) ~ r, NumType (PointF v') ~ r', Dimension (PointF v) ~ d, Dimension (PointF v') ~ d) => Traversal1 (PointF v) (PointF v') (PointF v) (PointF v') Source #

newtype MVector s (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype MVector s (PointF v) = MV_PointF (MVector s v)
type Rep (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Rep (PointF v) = D1 ('MetaData "PointF" "HGeometry.Point.PointF" "hgeometry-1.0.0.0-inplace-point" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "toVec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 v)))
type Dimension (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Dimension (PointF v) = Dimension v
type NumType (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type NumType (PointF v) = IxValue v
type IxValue (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type IxValue (PointF v) = IxValue v
newtype Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype Vector (PointF v) = V_PointF (Vector v)

class (Affine_ point d r, HasVector point point) => Point_ point d r where Source #

A class representing points in d-dimensional space.

Minimal complete definition

Nothing

Methods

coord' :: Int -> IndexedTraversal' Int point r Source #

Get the coordinate in a given dimension. This operation is unsafe in the +HGeometry.Point

hgeometry:point
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Point

Description

\(d\)-dimensional points.

Synopsis

Documentation

type Point d r = PointF (Vector d r) Source #

d-dimensional points

newtype PointF v Source #

A Point wraps a vector

Constructors

Point 

Fields

Bundled Patterns

pattern Point1 :: r -> Point 1 r

A bidirectional pattern synonym for 1 dimensional points.

pattern Point2 :: r -> r -> Point 2 r

A bidirectional pattern synonym for 2 dimensional points.

pattern Point3 :: r -> r -> r -> Point 3 r

A bidirectional pattern synonym for 3 dimensional points.

pattern Point4 :: r -> r -> r -> r -> Point 4 r

A bidirectional pattern synonym for 4 dimensional points.

Instances

Instances details
Unbox v => Vector Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Unbox v => MVector MVector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

FromYAML v => FromYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToYAML v => ToYAML (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toYAML :: PointF v -> Node () Source #

FromJSON v => FromJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

ToJSON v => ToJSON (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Bounded v => Bounded (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

minBound :: PointF v #

maxBound :: PointF v #

Enum v => Enum (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

succ :: PointF v -> PointF v #

pred :: PointF v -> PointF v #

toEnum :: Int -> PointF v #

fromEnum :: PointF v -> Int #

enumFrom :: PointF v -> [PointF v] #

enumFromThen :: PointF v -> PointF v -> [PointF v] #

enumFromTo :: PointF v -> PointF v -> [PointF v] #

enumFromThenTo :: PointF v -> PointF v -> PointF v -> [PointF v] #

Generic (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Associated Types

type Rep (PointF v) :: Type -> Type #

Methods

from :: PointF v -> Rep (PointF v) x #

to :: Rep (PointF v) x -> PointF v #

(Additive_ vector d r, Additive_ (Vector d r) d r, Read r) => Read (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

readsPrec :: Int -> ReadS (PointF vector) #

readList :: ReadS [PointF vector] #

readPrec :: ReadPrec (PointF vector) #

readListPrec :: ReadPrec [PointF vector] #

(Additive_ vector d r, Additive_ (Vector d r) d r, Show r) => Show (PointF vector) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

showsPrec :: Int -> PointF vector -> ShowS #

show :: PointF vector -> String #

showList :: [PointF vector] -> ShowS #

NFData v => NFData (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

rnf :: PointF v -> () #

Eq v => Eq (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(==) :: PointF v -> PointF v -> Bool #

(/=) :: PointF v -> PointF v -> Bool #

Ord v => Ord (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

compare :: PointF v -> PointF v -> Ordering #

(<) :: PointF v -> PointF v -> Bool #

(<=) :: PointF v -> PointF v -> Bool #

(>) :: PointF v -> PointF v -> Bool #

(>=) :: PointF v -> PointF v -> Bool #

max :: PointF v -> PointF v -> PointF v #

min :: PointF v -> PointF v -> PointF v #

(Vector_ v d r, Metric_ (Vector d r) d r) => HasSquaredEuclideanDistance (PointF v) Source # 
Instance details

Defined in HGeometry.Point.EuclideanDistance

Methods

squaredEuclideanDistTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> r Source #

pointClosestTo :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> Point d r Source #

pointClosestToWithDistance :: forall r (d :: Nat) point. (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r, Point_ point d r) => point -> PointF v -> (Point d r, r) Source #

Random v => Random (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

randomR :: RandomGen g => (PointF v, PointF v) -> g -> (PointF v, g) Source #

random :: RandomGen g => g -> (PointF v, g) Source #

randomRs :: RandomGen g => (PointF v, PointF v) -> g -> [PointF v] Source #

randoms :: RandomGen g => g -> [PointF v] Source #

Uniform v => Uniform (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformM :: StatefulGen g m => g -> m (PointF v) Source #

UniformRange v => UniformRange (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

uniformRM :: StatefulGen g m => (PointF v, PointF v) -> g -> m (PointF v) Source #

Unbox v => Unbox (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

IsoUnbox (PointF v) v Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

toURepr :: PointF v -> v Source #

fromURepr :: v -> PointF v Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Affine_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

(.-.) :: PointF vector -> PointF vector -> Vector d r Source #

(.+^) :: PointF vector -> Vector d r -> PointF vector Source #

(.-^) :: PointF vector -> Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(Additive_ vector d r, Additive_ (Vector d r) d r) => Point_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coord' :: Int -> IndexedTraversal' Int (PointF vector) r Source #

(Has_ Vector_ d r, Has_ Vector_ d s, Vector_ vector d r, Vector_ vector' d s, AsVector_ vector vector' d r s, HasComponents (Vector d r) (Vector d s), HasComponents vector vector') => HasCoordinates (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coordinates :: IndexedTraversal1 Int (PointF vector) (PointF vector') (NumType (PointF vector)) (NumType (PointF vector')) Source #

(Vector_ vector d r, Vector_ vector' d s, Has_ Vector_ d r, Has_ Vector_ d s, AsVector_ vector vector' d r s, HasComponents vector vector') => HasVector (PointF vector) (PointF vector') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

vector :: forall (d :: Nat) r s. (Dimension (PointF vector) ~ d, NumType (PointF vector) ~ r, Dimension (PointF vector') ~ d, NumType (PointF vector') ~ s) => Lens (PointF vector) (PointF vector') (Vector d r) (Vector d s) Source #

HasPoints (PointF v) (PointF v') (PointF v) (PointF v') Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

allPoints :: forall (d :: Nat) r r'. (Point_ (PointF v) d r, Point_ (PointF v') d r', NumType (PointF v) ~ r, NumType (PointF v') ~ r', Dimension (PointF v) ~ d, Dimension (PointF v') ~ d) => Traversal1 (PointF v) (PointF v') (PointF v) (PointF v') Source #

newtype MVector s (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype MVector s (PointF v) = MV_PointF (MVector s v)
type Rep (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Rep (PointF v) = D1 ('MetaData "PointF" "HGeometry.Point.PointF" "hgeometry-1.0.0.0-inplace-point" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "toVec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 v)))
type Dimension (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type Dimension (PointF v) = Dimension v
type NumType (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type NumType (PointF v) = IxValue v
type IxValue (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

type IxValue (PointF v) = IxValue v
newtype Vector (PointF v) Source # 
Instance details

Defined in HGeometry.Point.PointF

newtype Vector (PointF v) = V_PointF (Vector v)

class (Affine_ point d r, HasVector point point) => Point_ point d r where Source #

A class representing points in d-dimensional space.

Minimal complete definition

Nothing

Methods

coord' :: Int -> IndexedTraversal' Int point r Source #

Get the coordinate in a given dimension. This operation is unsafe in the sense that no bounds are checked. Consider using coord instead.

>>> myPoint ^.. coord' 2
 [2]
 

Instances

Instances details
(Additive_ vector d r, Additive_ (Vector d r) d r) => Point_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

coord' :: Int -> IndexedTraversal' Int (PointF vector) r Source #

Point_ point d r => Point_ (point :+ extra) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

coord' :: Int -> IndexedTraversal' Int (point :+ extra) r Source #

(d ~ Dimension (v r), r ~ IxValue (v r), Vector_ (v r) d r, Additive_ (Vector d r) d r) => Point_ (Point v r) d r Source # 
Instance details

Defined in HGeometry.Point.Class

pattern Point1_ :: Point_ point 1 r => r -> point Source #

A pattern synonym for 1 dimensional points.

pattern Point2_ :: Point_ point 2 r => r -> r -> point Source #

A pattern synonym for 2 dimensional points.

pattern Point3_ :: Point_ point 3 r => r -> r -> r -> point Source #

A pattern synonym for 3 dimensional points.

pattern Point4_ :: Point_ point 4 r => r -> r -> r -> r -> point Source #

A bidirectional pattern synonym for 4 dimensional points.

class Point_ point d r => ConstructablePoint_ point d r where Source #

Type class for constructable points

Methods

fromVector :: Vector d r -> point Source #

Construct a point from a vector

>>> fromVector (Vector4 1 2 3 4) :: Point 4 Int
 Point4 1 2 3 4
-

Instances

Instances details
(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(ConstructablePoint_ point d r, Default extra) => ConstructablePoint_ (point :+ extra) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> point :+ extra Source #

(d ~ Dimension (v r), r ~ IxValue (v r), Vector_ (v r) d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (Point v r) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> Point v r Source #

class HasVector point point' where Source #

Type class for types, usually points, that have a Lens to interpret the +

Instances

Instances details
(Additive_ vector d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (PointF vector) d r Source # 
Instance details

Defined in HGeometry.Point.PointF

Methods

fromVector :: Vector d r -> PointF vector Source #

(ConstructablePoint_ point d r, Default extra) => ConstructablePoint_ (point :+ extra) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> point :+ extra Source #

(d ~ Dimension (v r), r ~ IxValue (v r), Vector_ (v r) d r, Additive_ (Vector d r) d r) => ConstructablePoint_ (Point v r) d r Source # 
Instance details

Defined in HGeometry.Point.Class

Methods

fromVector :: Vector d r -> Point v r Source #

class HasVector point point' where Source #

Type class for types, usually points, that have a Lens to interpret the point as a vector.

Methods

vector :: (Dimension point ~ d, NumType point ~ r, Dimension point' ~ d, NumType point' ~ s) => Lens point point' (Vector d r) (Vector d s) Source #

Lens to access the vector corresponding to this point.

>>> myPoint ^. vector
 Vector3 1 2 3
 >>> ( myPoint & vector .~ Vector3 3 2 1  ) :: Point 3 Int
diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.Class.html b/haddocks/hgeometry/point/src/HGeometry.Point.Class.html
index 1d126e22e..84491cc5a 100644
--- a/haddocks/hgeometry/point/src/HGeometry.Point.Class.html
+++ b/haddocks/hgeometry/point/src/HGeometry.Point.Class.html
@@ -53,7 +53,7 @@
 
 -- | Type class for types, usually points, that have a Lens to interpret the
 -- point as a vector.
-class HasVector point point' where
+class HasVector point point' where
   -- | Lens to access the vector corresponding to this point.
   --
   -- >>> myPoint ^. vector
@@ -62,20 +62,20 @@
   -- Point3 3 2 1
   -- >>> (myPoint & coordinates %~ show ) :: Point 3 String
   -- Point3 "1" "2" "3"
-  vector :: ( Dimension point ~ d
-            , NumType point ~ r
-            , Dimension point' ~  d
-            , NumType point' ~ s
+  vector :: ( Dimension point ~ d
+            , NumType point ~ r
+            , Dimension point' ~  d
+            , NumType point' ~ s
             )
-         => Lens point point' (Vector d r) (Vector d s)
+         => Lens point point' (Vector d r) (Vector d s)
 
-type instance Dimension (Linear.Point v r) = Dimension (v r)
-type instance NumType (Linear.Point v r)   = r
+type instance Dimension (Linear.Point v r) = Dimension (v r)
+type instance NumType (Linear.Point v r)   = r
 
-instance ( Vector_ (v r) d r
-         , Vector_ (v s) d s
-         ) => HasVector (Linear.Point v r) (Linear.Point v s) where
-  vector :: forall (d :: Nat) r s.
+instance ( Vector_ (v r) d r
+         , Vector_ (v s) d s
+         ) => HasVector (Linear.Point v r) (Linear.Point v s) where
+  vector :: forall (d :: Nat) r s.
 (Dimension (Point v r) ~ d, NumType (Point v r) ~ r,
  Dimension (Point v s) ~ d, NumType (Point v s) ~ s) =>
 Lens (Point v r) (Point v s) (Vector d r) (Vector d s)
@@ -83,9 +83,9 @@
 -> (Point v r -> Vector d s -> Point v s)
 -> Lens (Point v r) (Point v s) (Vector d r) (Vector d s)
 forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens (\(Linear.P v r
-v) -> v r
-vv r -> Getting (Vector d r) (v r) (Vector d r) -> Vector d r
+lens (\(Linear.P v r
+v) -> v r
+vv r -> Getting (Vector d r) (v r) (Vector d r) -> Vector d r
 forall s a. s -> Getting a s a -> a
 ^.(Vector d r -> Const (Vector d r) (Vector d r))
 -> v r -> Const (Vector d r) (v r)
@@ -96,13 +96,13 @@
 Iso (v r) (v r) (Vector d r) (Vector d r)
 _Vector)
                 (\Point v r
-_ Vector d s
-v -> v s -> Point v s
+_ Vector d s
+v -> v s -> Point v s
 forall (f :: * -> *) a. f a -> Point f a
 Linear.P (v s -> Point v s) -> v s -> Point v s
 forall a b. (a -> b) -> a -> b
 $ Vector d s
-vVector d s -> Getting (v s) (Vector d s) (v s) -> v s
+vVector d s -> Getting (v s) (Vector d s) (v s) -> v s
 forall s a. s -> Getting a s a -> a
 ^.AnIso (v s) (v s) (Vector d s) (Vector d s)
 -> Iso (Vector d s) (Vector d s) (v s) (v s)
@@ -117,14 +117,14 @@
 
 -- | Class for point types that have a type changing traversal over
 -- all coordinates.
-class ( Has_ Vector_ (Dimension point) (NumType point)
-      , Has_ Vector_ (Dimension point') (NumType point')
-      , HasComponents (Vector (Dimension point') (NumType point))
-                      (Vector (Dimension point') (NumType point'))
-      , Dimension point ~ Dimension point'
-      , HasVector point point'
+class ( Has_ Vector_ (Dimension point) (NumType point)
+      , Has_ Vector_ (Dimension point') (NumType point')
+      , HasComponents (Vector (Dimension point') (NumType point))
+                      (Vector (Dimension point') (NumType point'))
+      , Dimension point ~ Dimension point'
+      , HasVector point point'
       )
-      => HasCoordinates point point' where
+      => HasCoordinates point point' where
   -- | Traversal over *all* coordinates of the points. Coordinates are 1-indexed.
   --
   -- >>> imapMOf_ coordinates (\i x -> print (i,x)) (Point2 10 20 :: Point 2 Int)
@@ -136,8 +136,8 @@
   -- Point2 () ()
   -- >>> over coordinates (+1) $ Point2 10 20 :: Point 2 Int
   -- Point2 11 21
-  coordinates :: IndexedTraversal1 Int point point' (NumType point) (NumType point')
-  coordinates = (Vector (Dimension point') (NumType point)
+  coordinates :: IndexedTraversal1 Int point point' (NumType point) (NumType point')
+  coordinates = (Vector (Dimension point') (NumType point)
  -> f (Vector (Dimension point') (NumType point')))
 -> point -> f point'
 forall (d :: Nat) r s.
@@ -202,21 +202,21 @@
 
 -- | Affine space; essentially the same as Linear.Affine, but for
 -- points of kind Type rather than (Type -> Type).
-class ( Additive_ (Vector d r) d r
-      , HasCoordinates point point
-      , d ~ Dimension point
-      , r ~ NumType point
-      ) => Affine_ point d r | point -> d
-                             , point -> r where
+class ( Additive_ (Vector d r) d r
+      , HasCoordinates point point
+      , d ~ Dimension point
+      , r ~ NumType point
+      ) => Affine_ point d r | point -> d
+                             , point -> r where
   {-# MINIMAL #-}
 
   -- | p .-. q represents the vector from q to p
-  (.-.) :: Num r => point -> point -> Vector d r
-  default (.-.) :: (HasVector point point, Num r) => point -> point -> Vector d r
-  point
-p .-. point
-q = (point
-ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
+  (.-.) :: Num r => point -> point -> Vector d r
+  default (.-.) :: (HasVector point point, Num r) => point -> point -> Vector d r
+  point
+p .-. point
+q = (point
+ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector d r) point (Vector d r)
 forall (d :: Nat) r s.
@@ -233,7 +233,7 @@
 (Num r, Additive_ vector d r) =>
 vector -> vector -> vector
 ^-^ (point
-qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
+qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector d r) point (Vector d r)
 forall (d :: Nat) r s.
@@ -252,12 +252,12 @@
   --
   -- >>> myPoint .+^ Vector3 100 200 300
   -- Point3 101 202 303
-  (.+^) :: Num r => point -> Vector d r -> point
-  default (.+^) :: (HasVector point point, Num r) => point -> Vector d r -> point
-  point
-p .+^ Vector d r
-v = point
-ppoint -> (point -> point) -> point
+  (.+^) :: Num r => point -> Vector d r -> point
+  default (.+^) :: (HasVector point point, Num r) => point -> Vector d r -> point
+  point
+p .+^ Vector d r
+v = point
+ppoint -> (point -> point) -> point
 forall a b. a -> (a -> b) -> b
 &(Vector d r -> Identity (Vector d r)) -> point -> Identity point
 forall (d :: Nat) r s.
@@ -277,18 +277,18 @@
 (Num r, Additive_ vector d r) =>
 vector -> vector -> vector
 ^+^ Vector d r
-v)
+v)
   {-# INLINE (.+^) #-}
 
   -- | subtract a vector from a point
   --
   -- >>> myPoint .-^ Vector3 100 200 300
   -- Point3 (-99) (-198) (-297)
-  (.-^) :: Num r => point -> Vector d r -> point
-  point
-p .-^ Vector d r
-v = point
-p point -> Vector d r -> point
+  (.-^) :: Num r => point -> Vector d r -> point
+  point
+p .-^ Vector d r
+v = point
+p point -> Vector d r -> point
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> Vector d r -> point
@@ -297,32 +297,32 @@
 (Num r, Vector_ vector d r) =>
 vector -> vector
 negated Vector d r
-v
+v
   {-# INLINE (.-^) #-}
 
-instance ( d ~ Dimension (v r)
-         , r ~ IxValue (v r)
-         , s ~ IxValue (v s)
-         , d ~ Dimension (v s)
-         , Vector_ (v r) d r
-         , Vector_ (v s) d s
-         , Has_ Vector_ d r
-         , Has_ Vector_ d s
-         , HasComponents (Vector d r) (Vector d s)
-         ) => HasCoordinates (Linear.Point v r) (Linear.Point v s)
+instance ( d ~ Dimension (v r)
+         , r ~ IxValue (v r)
+         , s ~ IxValue (v s)
+         , d ~ Dimension (v s)
+         , Vector_ (v r) d r
+         , Vector_ (v s) d s
+         , Has_ Vector_ d r
+         , Has_ Vector_ d s
+         , HasComponents (Vector d r) (Vector d s)
+         ) => HasCoordinates (Linear.Point v r) (Linear.Point v s)
 
-instance ( d ~ Dimension (v r)
-         , r ~ IxValue (v r)
-         , Vector_ (v r) d r
-         , Additive_ (Vector d r) d r
-         ) => Affine_ (Linear.Point v r) d r where
+instance ( d ~ Dimension (v r)
+         , r ~ IxValue (v r)
+         , Vector_ (v r) d r
+         , Additive_ (Vector d r) d r
+         ) => Affine_ (Linear.Point v r) d r where
 
 --------------------------------------------------------------------------------
 
 -- | A class representing points in d-dimensional space.
-class ( Affine_ point d r
-      , HasVector point point
-      ) => Point_ point d r where
+class ( Affine_ point d r
+      , HasVector point point
+      ) => Point_ point d r where
   {-# MINIMAL #-}
 
   -- | Get the coordinate in a given dimension. This operation is unsafe in the
@@ -330,9 +330,9 @@
   --
   -- >>> myPoint ^.. coord' 2
   -- [2]
-  coord'   :: Int -> IndexedTraversal' Int point r
-  coord' Int
-i = (Vector d r -> f (Vector d r)) -> point -> f point
+  coord'   :: Int -> IndexedTraversal' Int point r
+  coord' Int
+i = (Vector d r -> f (Vector d r)) -> point -> f point
 forall (d :: Nat) r s.
 (Dimension point ~ d, NumType point ~ r, Dimension point ~ d,
  NumType point ~ s) =>
@@ -349,16 +349,16 @@
 -> f point
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . p r (f r) -> Vector d r -> f (Vector d r)
-elem'
+elem'
     where
       -- elem' :: IndexedTraversal' Int (VectorFor point) r
-      elem' :: p r (f r) -> Vector d r -> f (Vector d r)
-elem' = Int -> IndexedTraversal' Int (Vector d r) r
+      elem' :: p r (f r) -> Vector d r -> f (Vector d r)
+elem' = Int -> IndexedTraversal' Int (Vector d r) r
 forall vector (d :: Nat) r.
 Vector_ vector d r =>
 Int -> IndexedTraversal' Int vector r
 component' (Int
-i Int -> Int -> Int
+i Int -> Int -> Int
 forall a. Num a => a -> a -> a
 - Int
 1)
@@ -367,14 +367,14 @@
 
 
 -- | Type class for constructable points
-class Point_ point d r => ConstructablePoint_ point d r where
+class Point_ point d r => ConstructablePoint_ point d r where
   {-# MINIMAL fromVector #-}
 
   -- | Construct a point from a vector
   --
   -- >>> fromVector (Vector4 1 2 3 4) :: Point 4 Int
   -- Point4 1 2 3 4
-  fromVector :: Vector d r -> point
+  fromVector :: Vector d r -> point
 
 
 -- | Get the coordinate in a given dimension
@@ -385,8 +385,8 @@
 -- Point3 10 2 3
 -- >>> myPoint & coord @3 %~ (+1)
 -- Point3 1 2 4
-coord :: forall i point d r. (1 <= i, i <= d, KnownNat i, Point_ point d r)
-      => IndexedLens' Int point r
+coord :: forall i point d r. (1 <= i, i <= d, KnownNat i, Point_ point d r)
+      => IndexedLens' Int point r
 coord :: forall (i :: Nat) point (d :: Nat) r.
 (1 <= i, i <= d, KnownNat i, Point_ point d r) =>
 IndexedLens' Int point r
@@ -411,22 +411,22 @@
 forall a b. (a -> b) -> a -> b
 $ forall (t :: Nat). Proxy t
 forall {k} (t :: k). Proxy t
-Proxy @i)
+Proxy @i)
 {-# INLINE coord #-}
 
 
-instance ( d ~ Dimension (v r)
-         , r ~ IxValue (v r)
-         , Vector_ (v r) d r
-         , Additive_ (Vector d r) d r
-         ) => Point_ (Linear.Point v r) d r
+instance ( d ~ Dimension (v r)
+         , r ~ IxValue (v r)
+         , Vector_ (v r) d r
+         , Additive_ (Vector d r) d r
+         ) => Point_ (Linear.Point v r) d r
 
-instance ( d ~ Dimension (v r)
-         , r ~ IxValue (v r)
-         , Vector_ (v r) d r
-         , Additive_ (Vector d r) d r
-         ) => ConstructablePoint_ (Linear.Point v r) d r where
-  fromVector :: Vector d r -> Point v r
+instance ( d ~ Dimension (v r)
+         , r ~ IxValue (v r)
+         , Vector_ (v r) d r
+         , Additive_ (Vector d r) d r
+         ) => ConstructablePoint_ (Linear.Point v r) d r where
+  fromVector :: Vector d r -> Point v r
 fromVector = v r -> Point v r
 forall (f :: * -> *) a. f a -> Point f a
 Linear.P (v r -> Point v r)
@@ -446,7 +446,7 @@
 --
 -- >>> origin :: Point 4 Int
 -- Point4 0 0 0 0
-origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point
+origin :: forall point d r. (Num r, ConstructablePoint_ point d r) => point
 origin :: forall point (d :: Nat) r.
 (Num r, ConstructablePoint_ point d r) =>
 point
@@ -460,23 +460,23 @@
 {-# INLINE origin #-}
 
 -- | A pattern synonym for 1 dimensional points.
-pattern Point1_   :: Point_ point 1 r => r -> point
+pattern Point1_   :: Point_ point 1 r => r -> point
 pattern $mPoint1_ :: forall {r} {point} {r}.
 Point_ point 1 r =>
 point -> (r -> r) -> ((# #) -> r) -> r
-Point1_ x <- (view xCoord -> x)
+Point1_ x <- (view xCoord -> x)
 --   where
 --     Point1_ x = fromVector $ Vector1 x
 -- {-# INLINE Point1_ #-}
 {-# COMPLETE Point1_ #-}
 
 -- | A pattern synonym for 2 dimensional points.
-pattern Point2_     :: ( Point_ point 2 r
-                       ) => r -> r -> point
+pattern Point2_     :: ( Point_ point 2 r
+                       ) => r -> r -> point
 pattern $mPoint2_ :: forall {r} {point} {r}.
 Point_ point 2 r =>
 point -> (r -> r -> r) -> ((# #) -> r) -> r
-Point2_ x y <- (view vector -> Vector2 x y)
+Point2_ x y <- (view vector -> Vector2 x y)
 --  where
 --    Point2_ x y = fromVector $ Vector2 x y
 -- {-# INLINE Point2_ #-}
@@ -484,24 +484,24 @@
 
 
 -- | A pattern synonym for 3 dimensional points.
-pattern Point3_       :: ( Point_ point 3 r
-                         ) => r -> r -> r -> point
+pattern Point3_       :: ( Point_ point 3 r
+                         ) => r -> r -> r -> point
 pattern $mPoint3_ :: forall {r} {point} {r}.
 Point_ point 3 r =>
 point -> (r -> r -> r -> r) -> ((# #) -> r) -> r
-Point3_ x y z <- (view vector -> Vector3 x y z)
+Point3_ x y z <- (view vector -> Vector3 x y z)
 --   where
 --     Point3_ x y z = fromVector $ Vector3 x y z
 -- {-# INLINE Point3_ #-}
 {-# COMPLETE Point3_ #-}
 
 -- | A bidirectional pattern synonym for 4 dimensional points.
-pattern Point4_         :: ( Point_ point 4 r
-                           ) => r -> r -> r -> r -> point
+pattern Point4_         :: ( Point_ point 4 r
+                           ) => r -> r -> r -> r -> point
 pattern $mPoint4_ :: forall {r} {point} {r}.
 Point_ point 4 r =>
 point -> (r -> r -> r -> r -> r) -> ((# #) -> r) -> r
-Point4_ x y z w <- (view vector -> Vector4 x y z w)
+Point4_ x y z w <- (view vector -> Vector4 x y z w)
 --   where
 --     Point4_ x y z w = fromVector $ Vector4 x y z w
 -- {-# INLINE Point4_ #-}
@@ -517,9 +517,9 @@
 -- Nothing
 -- >>> pointFromList [1,2,3,4] :: Maybe (Point 3 Int)
 -- Nothing
-pointFromList :: ( ConstructablePoint_ point d r
-                 , Vector_ (Vector d r) d r
-                 ) => [r] -> Maybe point
+pointFromList :: ( ConstructablePoint_ point d r
+                 , Vector_ (Vector d r) d r
+                 ) => [r] -> Maybe point
 pointFromList :: forall point (d :: Nat) r.
 (ConstructablePoint_ point d r, Vector_ (Vector d r) d r) =>
 [r] -> Maybe point
@@ -548,7 +548,7 @@
 -- 1
 -- >>> Point2 1 (2 :: Int) & xCoord .~ 10
 -- Point2 10 2
-xCoord :: (1 <= d, Point_ point d r) => IndexedLens' Int point r
+xCoord :: (1 <= d, Point_ point d r) => IndexedLens' Int point r
 xCoord :: forall (d :: Nat) point r.
 (1 <= d, Point_ point d r) =>
 IndexedLens' Int point r
@@ -564,7 +564,7 @@
 -- 2
 -- >>> myPoint & yCoord %~ (+1)
 -- Point3 1 3 3
-yCoord :: (2 <= d, Point_ point d r) => IndexedLens' Int point r
+yCoord :: (2 <= d, Point_ point d r) => IndexedLens' Int point r
 yCoord :: forall (d :: Nat) point r.
 (2 <= d, Point_ point d r) =>
 IndexedLens' Int point r
@@ -580,7 +580,7 @@
 -- 3
 -- >>> myPoint & zCoord %~ (+1)
 -- Point3 1 2 4
-zCoord :: (3 <= d, Point_ point d r) => IndexedLens' Int point r
+zCoord :: (3 <= d, Point_ point d r) => IndexedLens' Int point r
 zCoord :: forall (d :: Nat) point r.
 (3 <= d, Point_ point d r) =>
 IndexedLens' Int point r
@@ -596,7 +596,7 @@
 -- 4
 -- >>> (Point4 1 2 3 4 :: Point 4 Int) & wCoord %~ (+1)
 -- Point4 1 2 3 5
-wCoord :: (4 <= d, Point_ point d r) => IndexedLens' Int point r
+wCoord :: (4 <= d, Point_ point d r) => IndexedLens' Int point r
 wCoord :: forall (d :: Nat) point r.
 (4 <= d, Point_ point d r) =>
 IndexedLens' Int point r
@@ -614,20 +614,20 @@
 -- 4
 -- >>> (Point4 1 2 3 4 :: Point 4 Int) & dCoord %~ (+1)
 -- Point4 1 2 3 5
-dCoord :: forall point d r. (1 <= d, Point_ point d r) => IndexedLens' Int point r
+dCoord :: forall point d r. (1 <= d, Point_ point d r) => IndexedLens' Int point r
 dCoord :: forall point (d :: Nat) r.
 (1 <= d, Point_ point d r) =>
 IndexedLens' Int point r
 dCoord = forall (i :: Nat) point (d :: Nat) r.
 (1 <= i, i <= d, KnownNat i, Point_ point d r) =>
 IndexedLens' Int point r
-coord @d
+coord @d
 
 --------------------------------------------------------------------------------
 
 -- | Data types that store points
-class HasPoints s t point point' | s -> point
-                                 , t -> point' where
+class HasPoints s t point point' | s -> point
+                                 , t -> point' where
   -- | Traversal over all points in the structure
   --
   -- >>> let xs = NonEmpty.fromList [Point2 10 10, Point2 20 (30 :: Int)]
@@ -635,15 +635,15 @@
   -- [Point2 10 10,Point2 20 30]
   -- >>> over allPoints (.+^ Vector2 10 10) xs :: NonEmpty.NonEmpty (Point 2 Int)
   -- Point2 20 20 :| [Point2 30 40]
-  allPoints :: ( Point_ point  d r
-               , Point_ point' d r'
-               , NumType s ~ r
-               , NumType t ~ r'
-               , Dimension s ~ d, Dimension t ~ d
-               ) => Traversal1 s t point point'
+  allPoints :: ( Point_ point  d r
+               , Point_ point' d r'
+               , NumType s ~ r
+               , NumType t ~ r'
+               , Dimension s ~ d, Dimension t ~ d
+               ) => Traversal1 s t point point'
 
-instance HasPoints (NonEmpty.NonEmpty point) (NonEmpty.NonEmpty point') point point' where
-  allPoints :: forall (d :: Nat) r r'.
+instance HasPoints (NonEmpty.NonEmpty point) (NonEmpty.NonEmpty point') point point' where
+  allPoints :: forall (d :: Nat) r r'.
 (Point_ point d r, Point_ point' d r',
  NumType (NonEmpty point) ~ r, NumType (NonEmpty point') ~ r',
  Dimension (NonEmpty point) ~ d, Dimension (NonEmpty point') ~ d) =>
@@ -658,11 +658,11 @@
 traverse1
 
 -- | Shorthand for 'HasPoints s s point point'
-type HasPoints' s point = HasPoints s s point point
+type HasPoints' s point = HasPoints s s point point
 
-instance HasPoints (Linear.Point v r) (Linear.Point v' r')
-                   (Linear.Point v r) (Linear.Point v' r') where
-  allPoints :: forall (d :: Nat) r r'.
+instance HasPoints (Linear.Point v r) (Linear.Point v' r')
+                   (Linear.Point v r) (Linear.Point v' r') where
+  allPoints :: forall (d :: Nat) r r'.
 (Point_ (Point v r) d r, Point_ (Point v' r') d r',
  NumType (Point v r) ~ r, NumType (Point v' r') ~ r',
  Dimension (Point v r) ~ d, Dimension (Point v' r') ~ d) =>
@@ -674,8 +674,8 @@
 
 --------------------------------------------------------------------------------
 
-instance HasVector point point' => HasVector (point :+ extra) (point' :+ extra) where
-  vector :: forall (d :: Nat) r s.
+instance HasVector point point' => HasVector (point :+ extra) (point' :+ extra) where
+  vector :: forall (d :: Nat) r s.
 (Dimension (point :+ extra) ~ d, NumType (point :+ extra) ~ r,
  Dimension (point' :+ extra) ~ d, NumType (point' :+ extra) ~ s) =>
 Lens (point :+ extra) (point' :+ extra) (Vector d r) (Vector d s)
@@ -702,8 +702,8 @@
 vector
   {-# INLINE vector #-}
 
-instance HasCoordinates point point' => HasCoordinates (point :+ extra) (point' :+ extra) where
-  coordinates :: IndexedTraversal1
+instance HasCoordinates point point' => HasCoordinates (point :+ extra) (point' :+ extra) where
+  coordinates :: IndexedTraversal1
   Int
   (point :+ extra)
   (point' :+ extra)
@@ -727,8 +727,8 @@
 coordinates
   {-# INLINE coordinates #-}
 
-instance Affine_ point d r => Affine_ (point :+ extra) d r where
-  .-. :: Num r => (point :+ extra) -> (point :+ extra) -> Vector d r
+instance Affine_ point d r => Affine_ (point :+ extra) d r where
+  .-. :: Num r => (point :+ extra) -> (point :+ extra) -> Vector d r
 (.-.)   = point -> point -> Vector d r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
@@ -747,11 +747,11 @@
 (core -> f core') -> (core :+ extra) -> f (core' :+ extra)
 core
   {-# INLINE (.-.) #-}
-  point :+ extra
-p .+^ :: Num r => (point :+ extra) -> Vector d r -> point :+ extra
-.+^ Vector d r
-v = point :+ extra
-p(point :+ extra)
+  point :+ extra
+p .+^ :: Num r => (point :+ extra) -> Vector d r -> point :+ extra
+.+^ Vector d r
+v = point :+ extra
+p(point :+ extra)
 -> ((point :+ extra) -> point :+ extra) -> point :+ extra
 forall a b. a -> (a -> b) -> b
 &(point -> Identity point)
@@ -768,24 +768,24 @@
 (Affine_ point d r, Num r) =>
 point -> Vector d r -> point
 .+^ Vector d r
-v)
+v)
   {-# INLINE (.+^) #-}
 
-instance (Point_ point d r) => Point_ (point :+ extra) d r where
-  {-# SPECIALIZE instance Point_ point d r => Point_ (point :+ ()) d r #-}
+instance (Point_ point d r) => Point_ (point :+ extra) d r where
+  {-# SPECIALIZE instance Point_ point d r => Point_ (point :+ ()) d r #-}
 
-instance (ConstructablePoint_ point d r, Default extra)
-          => ConstructablePoint_ (point :+ extra) d r where
-  {-# SPECIALIZE instance ConstructablePoint_ point d r
-                          => ConstructablePoint_ (point :+ ()) d r #-}
-  fromVector :: Vector d r -> point :+ extra
-fromVector Vector d r
-v = Vector d r -> point
+instance (ConstructablePoint_ point d r, Default extra)
+          => ConstructablePoint_ (point :+ extra) d r where
+  {-# SPECIALIZE instance ConstructablePoint_ point d r
+                          => ConstructablePoint_ (point :+ ()) d r #-}
+  fromVector :: Vector d r -> point :+ extra
+fromVector Vector d r
+v = Vector d r -> point
 forall point (d :: Nat) r.
 ConstructablePoint_ point d r =>
 Vector d r -> point
 fromVector Vector d r
-v point -> extra -> point :+ extra
+v point -> extra -> point :+ extra
 forall core extra. core -> extra -> core :+ extra
 :+ extra
 forall a. Default a => a
diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.EuclideanDistance.html b/haddocks/hgeometry/point/src/HGeometry.Point.EuclideanDistance.html
index 2ffd4303d..f4c886494 100644
--- a/haddocks/hgeometry/point/src/HGeometry.Point.EuclideanDistance.html
+++ b/haddocks/hgeometry/point/src/HGeometry.Point.EuclideanDistance.html
@@ -29,22 +29,22 @@
 -- * Distances
 
 -- | Squared Euclidean distance between two points
-squaredEuclideanDist     :: (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r)
-                         => point -> point' -> r
+squaredEuclideanDist     :: (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r)
+                         => point -> point' -> r
 squaredEuclideanDist :: forall r point (d :: Nat) point'.
 (Num r, Point_ point d r, Point_ point' d r,
  Metric_ (Vector d r) d r) =>
 point -> point' -> r
-squaredEuclideanDist point
-p point'
-q = Vector d r -> r
+squaredEuclideanDist point
+p point'
+q = Vector d r -> r
 forall vector (d :: Nat) r.
 (Metric_ vector d r, Num r) =>
 vector -> r
 quadrance (Vector d r -> r) -> Vector d r -> r
 forall a b. (a -> b) -> a -> b
 $ (point
-ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
+ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector d r) point (Vector d r)
 forall (d :: Nat) r s.
@@ -61,7 +61,7 @@
 (Num r, Additive_ vector d r) =>
 vector -> vector -> vector
 ^-^ (point'
-qpoint' -> Getting (Vector d r) point' (Vector d r) -> Vector d r
+qpoint' -> Getting (Vector d r) point' (Vector d r) -> Vector d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector d r) point' (Vector d r)
 forall (d :: Nat) r s.
@@ -77,14 +77,14 @@
 {-# INLINE squaredEuclideanDist #-}
 
 -- | Euclidean distance between two points
-euclideanDist     :: (Radical.Radical r, Point_ point d r, Metric_ (Vector d r) d r)
-                  => point -> point -> r
+euclideanDist     :: (Radical.Radical r, Point_ point d r, Metric_ (Vector d r) d r)
+                  => point -> point -> r
 euclideanDist :: forall r point (d :: Nat).
 (Radical r, Point_ point d r, Metric_ (Vector d r) d r) =>
 point -> point -> r
-euclideanDist point
-p point
-q = r -> r
+euclideanDist point
+p point
+q = r -> r
 forall r. Radical r => r -> r
 Radical.sqrt (r -> r) -> r -> r
 forall a b. (a -> b) -> a -> b
@@ -94,21 +94,21 @@
  Metric_ (Vector d r) d r) =>
 point -> point' -> r
 squaredEuclideanDist point
-p point
-q
+p point
+q
 {-# INLINE euclideanDist #-}
 
 -- | Compare two points by their distance to the first argument
-cmpByDistanceTo   :: ( Ord r, Num r, Point_ point d r, Point_ center d r
-                     , Metric_ (Vector d r) d r
+cmpByDistanceTo   :: ( Ord r, Num r, Point_ point d r, Point_ center d r
+                     , Metric_ (Vector d r) d r
                      )
-                  => center -> point -> point -> Ordering
+                  => center -> point -> point -> Ordering
 cmpByDistanceTo :: forall r point (d :: Nat) center.
 (Ord r, Num r, Point_ point d r, Point_ center d r,
  Metric_ (Vector d r) d r) =>
 center -> point -> point -> Ordering
-cmpByDistanceTo center
-c = (point -> r) -> point -> point -> Ordering
+cmpByDistanceTo center
+c = (point -> r) -> point -> point -> Ordering
 forall a b. Ord a => (b -> a) -> b -> b -> Ordering
 comparing (center -> point -> r
 forall r point (d :: Nat) point'.
@@ -116,24 +116,24 @@
  Metric_ (Vector d r) d r) =>
 point -> point' -> r
 squaredEuclideanDist center
-c)
+c)
 {-# INLINE cmpByDistanceTo #-}
 
 --------------------------------------------------------------------------------
 
 -- | Types for which we can compute the squared Euclidean distance.
-class Metric_ (Vector (Dimension g) (NumType g)) (Dimension g) (NumType g)
-      => HasSquaredEuclideanDistance g where
+class Metric_ (Vector (Dimension g) (NumType g)) (Dimension g) (NumType g)
+      => HasSquaredEuclideanDistance g where
   {-# MINIMAL pointClosestToWithDistance | pointClosestTo #-}
   -- | Given a point q and a geometry g, the squared Euclidean distance between q and g.
-  squaredEuclideanDistTo   :: ( r ~ NumType g
-                              , d ~ Dimension g
-                              , Num r
-                              , Point_ point d r
+  squaredEuclideanDistTo   :: ( r ~ NumType g
+                              , d ~ Dimension g
+                              , Num r
+                              , Point_ point d r
                               )
-                           => point -> g -> r
-  squaredEuclideanDistTo point
-q = (Point d r, r) -> r
+                           => point -> g -> r
+  squaredEuclideanDistTo point
+q = (Point d r, r) -> r
 forall a b. (a, b) -> b
 snd ((Point d r, r) -> r) -> (g -> (Point d r, r)) -> g -> r
 forall b c a. (b -> c) -> (a -> b) -> a -> c
@@ -146,19 +146,19 @@
 (r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) =>
 point -> g -> (Point d r, r)
 pointClosestToWithDistance point
-q
+q
   {-# INLINE squaredEuclideanDistTo #-}
 
   -- | Given q and g, computes the point p in g closest to q according
   -- to the Squared Euclidean distance.
-  pointClosestTo   :: ( r ~ NumType g
-                      , d ~ Dimension g
-                      , Num r
-                      , Point_ point d r
+  pointClosestTo   :: ( r ~ NumType g
+                      , d ~ Dimension g
+                      , Num r
+                      , Point_ point d r
                       )
-                   => point -> g -> Point d r
-  pointClosestTo point
-q = (Point d r, r) -> Point d r
+                   => point -> g -> Point d r
+  pointClosestTo point
+q = (Point d r, r) -> Point d r
 forall a b. (a, b) -> a
 fst ((Point d r, r) -> Point d r)
 -> (g -> (Point d r, r)) -> g -> Point d r
@@ -172,29 +172,29 @@
 (r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) =>
 point -> g -> (Point d r, r)
 pointClosestToWithDistance point
-q
+q
   {-# INLINE pointClosestTo #-}
 
   -- | Given q and g, computes the point p in g closest to q according
   -- to the Squared Euclidean distance. Returns both the point and the
   -- distance realized by this point.
-  pointClosestToWithDistance     :: ( r ~ NumType g
-                                    , d ~ Dimension g
-                                    , Num r
-                                    , Point_ point d r
+  pointClosestToWithDistance     :: ( r ~ NumType g
+                                    , d ~ Dimension g
+                                    , Num r
+                                    , Point_ point d r
                                     )
-                                 => point -> g
-                                 -> (Point d r, r)
-  pointClosestToWithDistance point
-q g
-g = let q' :: PointF (Vector d r)
-q' = Vector d r -> PointF (Vector d r)
+                                 => point -> g
+                                 -> (Point d r, r)
+  pointClosestToWithDistance point
+q g
+g = let q' :: PointF (Vector d r)
+q' = Vector d r -> PointF (Vector d r)
 forall v. v -> PointF v
 Point (Vector d r -> PointF (Vector d r))
 -> Vector d r -> PointF (Vector d r)
 forall a b. (a -> b) -> a -> b
 $ point
-qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
+qpoint -> Getting (Vector d r) point (Vector d r) -> Vector d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector d r) point (Vector d r)
 forall (d :: Nat) r s.
@@ -207,8 +207,8 @@
 Lens point point' (Vector d r) (Vector d s)
 Lens point point (Vector d r) (Vector d r)
 vector
-                                       p :: PointF (Vector d r)
-p  = PointF (Vector d r) -> g -> PointF (Vector d r)
+                                       p :: PointF (Vector d r)
+p  = PointF (Vector d r) -> g -> PointF (Vector d r)
 forall g r (d :: Nat) point.
 (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g,
  Num r, Point_ point d r) =>
@@ -217,35 +217,35 @@
 (r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) =>
 point -> g -> Point d r
 pointClosestTo PointF (Vector d r)
-q' g
-g
+q' g
+g
                                    in (PointF (Vector d r)
-p, PointF (Vector d r) -> PointF (Vector d r) -> r
+p, PointF (Vector d r) -> PointF (Vector d r) -> r
 forall r point (d :: Nat) point'.
 (Num r, Point_ point d r, Point_ point' d r,
  Metric_ (Vector d r) d r) =>
 point -> point' -> r
 squaredEuclideanDist PointF (Vector d r)
-p PointF (Vector d r)
-q')
+p PointF (Vector d r)
+q')
   {-# INLINE pointClosestToWithDistance #-}
 
-instance ( Vector_ v            d r
-         , Metric_ (Vector d r) d r
-         ) => HasSquaredEuclideanDistance (PointF v) where
-  pointClosestTo :: forall r (d :: Nat) point.
+instance ( Vector_ v            d r
+         , Metric_ (Vector d r) d r
+         ) => HasSquaredEuclideanDistance (PointF v) where
+  pointClosestTo :: forall r (d :: Nat) point.
 (r ~ NumType (PointF v), d ~ Dimension (PointF v), Num r,
  Point_ point d r) =>
 point -> PointF v -> Point d r
 pointClosestTo point
-_ PointF v
-p = Vector d r -> PointF (Vector d r)
+_ PointF v
+p = Vector d r -> PointF (Vector d r)
 forall v. v -> PointF v
 Point (Vector d r -> PointF (Vector d r))
 -> Vector d r -> PointF (Vector d r)
 forall a b. (a -> b) -> a -> b
 $ PointF v
-pPointF v
+pPointF v
 -> Getting (Vector d r) (PointF v) (Vector d r) -> Vector d r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector d r) (PointF v) (Vector d r)
@@ -262,13 +262,13 @@
   {-# INLINE pointClosestTo #-}
 
 
-instance HasSquaredEuclideanDistance p => HasSquaredEuclideanDistance (p :+ extra) where
-  pointClosestTo :: forall r (d :: Nat) point.
+instance HasSquaredEuclideanDistance p => HasSquaredEuclideanDistance (p :+ extra) where
+  pointClosestTo :: forall r (d :: Nat) point.
 (r ~ NumType (p :+ extra), d ~ Dimension (p :+ extra), Num r,
  Point_ point d r) =>
 point -> (p :+ extra) -> Point d r
-pointClosestTo point
-q = point -> p -> Point d r
+pointClosestTo point
+q = point -> p -> Point d r
 forall g r (d :: Nat) point.
 (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g,
  Num r, Point_ point d r) =>
@@ -277,7 +277,7 @@
 (r ~ NumType p, d ~ Dimension p, Num r, Point_ point d r) =>
 point -> p -> Point d r
 pointClosestTo point
-q (p -> Point d r)
+q (p -> Point d r)
 -> ((p :+ extra) -> p) -> (p :+ extra) -> Point d r
 forall b c a. (b -> c) -> (a -> b) -> a -> c
 . Getting p (p :+ extra) p -> (p :+ extra) -> p
diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.Degenerate.html b/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.Degenerate.html
index ad41a3de5..5bf772c19 100644
--- a/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.Degenerate.html
+++ b/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.Degenerate.html
@@ -38,7 +38,7 @@
 
 -- | Data type for expressing the orientation of three points, with
 -- the option of allowing Colinearities.
-newtype CCW = CCWWrap Ordering deriving CCW -> CCW -> Bool
+newtype CCW = CCWWrap Ordering deriving CCW -> CCW -> Bool
 (CCW -> CCW -> Bool) -> (CCW -> CCW -> Bool) -> Eq CCW
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
 $c== :: CCW -> CCW -> Bool
@@ -66,9 +66,9 @@
 CoLinear = CCWWrap EQ
 {-# COMPLETE CCW, CW, CoLinear #-}
 
-instance Show CCW where
-  show :: CCW -> String
-show = \case
+instance Show CCW where
+  show :: CCW -> String
+show = \case
     CCW
 CCW      -> String
 "CCW"
@@ -89,34 +89,34 @@
 -- >>> ccw (Point2 0 0.3) (Point2 1 0.6) (Point2 2 (0.9::Rational))
 -- CoLinear
 --
-ccw       :: (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r)
-          => point -> point' -> point'' -> CCW
+ccw       :: (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r)
+          => point -> point' -> point'' -> CCW
 ccw :: forall point r point' point''.
 (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r,
  Ord r) =>
 point -> point' -> point'' -> CCW
-ccw point
-p point'
-q point''
-r = Ordering -> CCW
+ccw point
+p point'
+q point''
+r = Ordering -> CCW
 CCWWrap (Ordering -> CCW) -> Ordering -> CCW
 forall a b. (a -> b) -> a -> b
 $ (r
-uxr -> r -> r
+uxr -> r -> r
 forall a. Num a => a -> a -> a
 *r
-vy) r -> r -> Ordering
+vy) r -> r -> Ordering
 forall a. Ord a => a -> a -> Ordering
 `compare` (r
-uyr -> r -> r
+uyr -> r -> r
 forall a. Num a => a -> a -> a
 *r
-vx)
+vx)
      where
-       Vector2 r
-ux r
-uy = (point'
-qpoint' -> Getting (Vector 2 r) point' (Vector 2 r) -> Vector 2 r
+       Vector2 r
+ux r
+uy = (point'
+qpoint' -> Getting (Vector 2 r) point' (Vector 2 r) -> Vector 2 r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector 2 r) point' (Vector 2 r)
 forall (d :: Nat) r s.
@@ -133,11 +133,11 @@
 (Num r, Additive_ vector d r) =>
 vector -> vector -> vector
 ^-^ Vector 2 r
-pv
-       Vector2 r
-vx r
-vy = (point''
-rpoint'' -> Getting (Vector 2 r) point'' (Vector 2 r) -> Vector 2 r
+pv
+       Vector2 r
+vx r
+vy = (point''
+rpoint'' -> Getting (Vector 2 r) point'' (Vector 2 r) -> Vector 2 r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector 2 r) point'' (Vector 2 r)
 forall (d :: Nat) r s.
@@ -154,10 +154,10 @@
 (Num r, Additive_ vector d r) =>
 vector -> vector -> vector
 ^-^ Vector 2 r
-pv
-       pv :: Vector 2 r
-pv = point
-ppoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r
+pv
+       pv :: Vector 2 r
+pv = point
+ppoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r
 forall s a. s -> Getting a s a -> a
 ^.Getting (Vector 2 r) point (Vector 2 r)
 forall (d :: Nat) r s.
@@ -175,43 +175,43 @@
 -- | Given three points p q and r determine if the line from p to r via q is straight/colinear.
 --
 -- This is identical to `ccw p q r == CoLinear` but doesn't have the `Ord` constraint.
-isCoLinear       :: (Point_ point 2 r, Num r, Eq r) => point -> point -> point -> Bool
+isCoLinear       :: (Point_ point 2 r, Num r, Eq r) => point -> point -> point -> Bool
 isCoLinear :: forall point r.
 (Point_ point 2 r, Num r, Eq r) =>
 point -> point -> point -> Bool
-isCoLinear point
-p point
-q point
-r = (r
-ux r -> r -> r
+isCoLinear point
+p point
+q point
+r = (r
+ux r -> r -> r
 forall a. Num a => a -> a -> a
 * r
-vy) r -> r -> Bool
+vy) r -> r -> Bool
 forall a. Eq a => a -> a -> Bool
 == (r
-uy r -> r -> r
+uy r -> r -> r
 forall a. Num a => a -> a -> a
 * r
-vx)
+vx)
      where
-       Vector2 r
-ux r
-uy = point
-q point -> point -> Vector 2 r
+       Vector2 r
+ux r
+uy = point
+q point -> point -> Vector 2 r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> point -> Vector d r
 .-. point
-p
-       Vector2 r
-vx r
-vy = point
-r point -> point -> Vector 2 r
+p
+       Vector2 r
+vx r
+vy = point
+r point -> point -> Vector 2 r
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> point -> Vector d r
 .-. point
-p
+p
 {-# INLINE isCoLinear #-}
 
 -- -- Given three points p q and r determine the orientation when going from p to r via q.
@@ -223,20 +223,20 @@
 -- p, the closest one to p is reported first.
 --
 -- \( O(n log n) \)
-sortAround   :: (Point_ center 2 r, Point_ point 2 r, Num r, Ord r)
-             => center -> [point] -> [point]
+sortAround   :: (Point_ center 2 r, Point_ point 2 r, Num r, Ord r)
+             => center -> [point] -> [point]
 sortAround :: forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Num r, Ord r) =>
 center -> [point] -> [point]
-sortAround center
-c = (point -> point -> Ordering) -> [point] -> [point]
+sortAround center
+c = (point -> point -> Ordering) -> [point] -> [point]
 forall a. (a -> a -> Ordering) -> [a] -> [a]
 L.sortBy (center -> point -> point -> Ordering
 forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 center -> point -> point -> Ordering
 ccwCmpAround center
-c (point -> point -> Ordering)
+c (point -> point -> Ordering)
 -> (point -> point -> Ordering) -> point -> point -> Ordering
 forall a. Semigroup a => a -> a -> a
 <> center -> point -> point -> Ordering
@@ -245,7 +245,7 @@
  Metric_ (Vector d r) d r) =>
 center -> point -> point -> Ordering
 cmpByDistanceTo center
-c)
+c)
 {-# INLINE sortAround #-}
 
 -- | Given a zero vector z, a center c, and two points p and q,
@@ -253,45 +253,45 @@
 -- direction.
 --
 -- pre: the points p,q /= c
-ccwCmpAroundWith                              :: ( Point_ center 2 r
-                                                 , Point_ point 2 r
-                                                 , Ord r, Num r
+ccwCmpAroundWith                              :: ( Point_ center 2 r
+                                                 , Point_ point 2 r
+                                                 , Ord r, Num r
                                                  )
-                                              => Vector 2 r
-                                              -> center
-                                              -> point -> point
+                                              => Vector 2 r
+                                              -> center
+                                              -> point -> point
                                               -> Ordering
 ccwCmpAroundWith :: forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 Vector 2 r -> center -> point -> point -> Ordering
-ccwCmpAroundWith z :: Vector 2 r
-z@(Vector2 r
-zx r
-zy) center
-c point
-q point
-r =
+ccwCmpAroundWith z :: Vector 2 r
+z@(Vector2 r
+zx r
+zy) center
+c point
+q point
+r =
     case (center -> center -> point -> CCW
 forall point r point' point''.
 (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r,
  Ord r) =>
 point -> point' -> point'' -> CCW
 ccw center
-c center
-a point
-q, center -> center -> point -> CCW
+c center
+a point
+q, center -> center -> point -> CCW
 forall point r point' point''.
 (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r,
  Ord r) =>
 point -> point' -> point'' -> CCW
 ccw center
-c center
-a point
-r) of
+c center
+a point
+r) of
       (CCW
 CCW,CCW
 CCW)      -> Ordering
-cmp
+cmp
       (CCW
 CCW,CCW
 CW)       -> Ordering
@@ -299,8 +299,8 @@
       (CCW
 CCW,CCW
 CoLinear) | point -> Bool
-onZero point
-r  -> Ordering
+onZero point
+r  -> Ordering
 GT
                      | Bool
 otherwise -> Ordering
@@ -313,7 +313,7 @@
       (CCW
 CW, CCW
 CW)       -> Ordering
-cmp
+cmp
       (CCW
 CW, CCW
 CoLinear) -> Ordering
@@ -322,8 +322,8 @@
       (CCW
 CoLinear, CCW
 CCW) | point -> Bool
-onZero point
-q  -> Ordering
+onZero point
+q  -> Ordering
 LT
                       | Bool
 otherwise -> Ordering
@@ -336,10 +336,10 @@
       (CCW
 CoLinear,CCW
 CoLinear) -> case (point -> Bool
-onZero point
-q, point -> Bool
-onZero point
-r) of
+onZero point
+q, point -> Bool
+onZero point
+r) of
                                (Bool
 True, Bool
 True)   -> Ordering
@@ -357,39 +357,39 @@
 True)  -> Ordering
 GT
   where
-    a :: center
-a = center
-c center -> Vector 2 r -> center
+    a :: center
+a = center
+c center -> Vector 2 r -> center
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> Vector d r -> point
 .+^ Vector 2 r
-z
-    b :: center
-b = center
-c center -> Vector 2 r -> center
+z
+    b :: center
+b = center
+c center -> Vector 2 r -> center
 forall point (d :: Nat) r.
 (Affine_ point d r, Num r) =>
 point -> Vector d r -> point
 .+^ r -> r -> Vector 2 r
 forall r. r -> r -> Vector 2 r
 Vector2 (-r
-zy) r
-zx
+zy) r
+zx
     -- b is on a perpendicular vector to z
 
     -- test if the point lies on the ray defined by z, starting in c
-    onZero :: point -> Bool
-onZero point
-d = case center -> center -> point -> CCW
+    onZero :: point -> Bool
+onZero point
+d = case center -> center -> point -> CCW
 forall point r point' point''.
 (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r,
  Ord r) =>
 point -> point' -> point'' -> CCW
 ccw center
-c center
-b point
-d of
+c center
+b point
+d of
                  CCW
 CCW      -> Bool
 False
@@ -400,16 +400,16 @@
 CoLinear -> Bool
 True -- this shouldh appen only when you ask for c itself
 
-    cmp :: Ordering
-cmp = case center -> point -> point -> CCW
+    cmp :: Ordering
+cmp = case center -> point -> point -> CCW
 forall point r point' point''.
 (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r,
  Ord r) =>
 point -> point' -> point'' -> CCW
 ccw center
-c point
-q point
-r of
+c point
+q point
+r of
             CCW
 CCW      -> Ordering
 LT
@@ -426,33 +426,33 @@
 -- direction.
 --
 -- pre: the points p,q /= c
-cwCmpAroundWith     :: ( Point_ center 2 r, Point_ point 2 r
-                       , Ord r, Num r
+cwCmpAroundWith     :: ( Point_ center 2 r, Point_ point 2 r
+                       , Ord r, Num r
                        )
-                    => Vector 2 r
-                    -> center
-                    -> point -> point
+                    => Vector 2 r
+                    -> center
+                    -> point -> point
                     -> Ordering
 cwCmpAroundWith :: forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 Vector 2 r -> center -> point -> point -> Ordering
-cwCmpAroundWith Vector 2 r
-z center
-c = (point -> point -> Ordering) -> point -> point -> Ordering
+cwCmpAroundWith Vector 2 r
+z center
+c = (point -> point -> Ordering) -> point -> point -> Ordering
 forall a b c. (a -> b -> c) -> b -> a -> c
 flip (Vector 2 r -> center -> point -> point -> Ordering
 forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 Vector 2 r -> center -> point -> point -> Ordering
 ccwCmpAroundWith Vector 2 r
-z center
-c)
+z center
+c)
 {-# INLINE cwCmpAroundWith #-}
 
 -- | Counter clockwise ordering of the points around c. Points are ordered with
 -- respect to the positive x-axis.
-ccwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r)
-             => center -> point -> point -> Ordering
+ccwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r)
+             => center -> point -> point -> Ordering
 ccwCmpAround :: forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 center -> point -> point -> Ordering
@@ -469,8 +469,8 @@
 
 -- | Clockwise ordering of the points around c. Points are ordered with
 -- respect to the positive x-axis.
-cwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r)
-            => center -> point -> point -> Ordering
+cwCmpAround :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r)
+            => center -> point -> point -> Ordering
 cwCmpAround :: forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 center -> point -> point -> Ordering
@@ -489,21 +489,21 @@
 -- Given a center c, a new point p, and a list of points ps, sorted in
 -- counter clockwise order around c. Insert p into the cyclic order. The focus
 -- of the returned cyclic list is the new point p.
-insertIntoCyclicOrder   :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r)
-                        => center -> point
-                        -> C.CList point -> C.CList point
+insertIntoCyclicOrder   :: (Point_ center 2 r, Point_ point 2 r, Ord r, Num r)
+                        => center -> point
+                        -> C.CList point -> C.CList point
 insertIntoCyclicOrder :: forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 center -> point -> CList point -> CList point
-insertIntoCyclicOrder center
-c = (point -> point -> Ordering) -> point -> CList point -> CList point
+insertIntoCyclicOrder center
+c = (point -> point -> Ordering) -> point -> CList point -> CList point
 forall a. (a -> a -> Ordering) -> a -> CList a -> CList a
 CU.insertOrdBy (center -> point -> point -> Ordering
 forall center r point.
 (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
 center -> point -> point -> Ordering
 ccwCmpAround center
-c (point -> point -> Ordering)
+c (point -> point -> Ordering)
 -> (point -> point -> Ordering) -> point -> point -> Ordering
 forall a. Semigroup a => a -> a -> a
 <> center -> point -> point -> Ordering
@@ -512,6 +512,6 @@
  Metric_ (Vector d r) d r) =>
 center -> point -> point -> Ordering
 cmpByDistanceTo center
-c)
+c)
 {-# INLINE insertIntoCyclicOrder #-}
 
\ No newline at end of file diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.html b/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.html index 493f3168d..8e752151c 100644 --- a/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.html +++ b/haddocks/hgeometry/point/src/HGeometry.Point.Orientation.html @@ -31,26 +31,26 @@ -- | Comparison that compares which point is 'larger' in the direction given by -- the vector u. -cmpInDirection :: (Num r, Ord r, Point_ point 2 r) - => Vector 2 r -> point -> point -> Ordering +cmpInDirection :: (Num r, Ord r, Point_ point 2 r) + => Vector 2 r -> point -> point -> Ordering cmpInDirection :: forall r point. (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering -cmpInDirection Vector 2 r -u point -p point -q = Vector 2 r -u Vector 2 r -> Vector 2 r -> r +cmpInDirection Vector 2 r +u point +p point +q = Vector 2 r +u Vector 2 r -> Vector 2 r -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> vector -> r `dot` (point -p point -> point -> Vector 2 r +p point -> point -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -q) r -> r -> Ordering +q) r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r 0 diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.PointF.html b/haddocks/hgeometry/point/src/HGeometry.Point.PointF.html index 4634753d9..5ed7cd0f8 100644 --- a/haddocks/hgeometry/point/src/HGeometry.Point.PointF.html +++ b/haddocks/hgeometry/point/src/HGeometry.Point.PointF.html @@ -36,9 +36,9 @@ -------------------------------------------------------------------------------- -- | A Point wraps a vector -newtype PointF v = Point { forall v. PointF v -> v -toVec :: v } - deriving stock ((forall x. PointF v -> Rep (PointF v) x) +newtype PointF v = Point { forall v. PointF v -> v +toVec :: v } + deriving stock ((forall x. PointF v -> Rep (PointF v) x) -> (forall x. Rep (PointF v) x -> PointF v) -> Generic (PointF v) forall x. Rep (PointF v) x -> PointF v forall x. PointF v -> Rep (PointF v) x @@ -51,7 +51,7 @@ $cto :: forall v x. Rep (PointF v) x -> PointF v to :: forall x. Rep (PointF v) x -> PointF v Generic) - deriving newtype ( PointF v -> PointF v -> Bool + deriving newtype ( PointF v -> PointF v -> Bool (PointF v -> PointF v -> Bool) -> (PointF v -> PointF v -> Bool) -> Eq (PointF v) forall v. Eq v => PointF v -> PointF v -> Bool @@ -60,7 +60,7 @@ == :: PointF v -> PointF v -> Bool $c/= :: forall v. Eq v => PointF v -> PointF v -> Bool /= :: PointF v -> PointF v -> Bool -Eq, Eq (PointF v) +Eq, Eq (PointF v) Eq (PointF v) => (PointF v -> PointF v -> Ordering) -> (PointF v -> PointF v -> Bool) @@ -101,7 +101,7 @@ max :: PointF v -> PointF v -> PointF v $cmin :: forall v. Ord v => PointF v -> PointF v -> PointF v min :: PointF v -> PointF v -> PointF v -Ord, (forall g. +Ord, (forall g. RandomGen g => (PointF v, PointF v) -> g -> (PointF v, g)) -> (forall g. RandomGen g => g -> (PointF v, g)) @@ -140,13 +140,13 @@ randomRs :: forall g. RandomGen g => (PointF v, PointF v) -> g -> [PointF v] $crandoms :: forall v g. (Random v, RandomGen g) => g -> [PointF v] randoms :: forall g. RandomGen g => g -> [PointF v] -Random, PointF v -> () +Random, PointF v -> () (PointF v -> ()) -> NFData (PointF v) forall v. NFData v => PointF v -> () forall a. (a -> ()) -> NFData a $crnf :: forall v. NFData v => PointF v -> () rnf :: PointF v -> () -NFData, PointF v +NFData, PointF v PointF v -> PointF v -> Bounded (PointF v) forall a. a -> a -> Bounded a forall v. Bounded v => PointF v @@ -154,7 +154,7 @@ minBound :: PointF v $cmaxBound :: forall v. Bounded v => PointF v maxBound :: PointF v -Bounded, Int -> PointF v +Bounded, Int -> PointF v PointF v -> Int PointF v -> [PointF v] PointF v -> PointF v @@ -201,20 +201,20 @@ enumFromTo :: PointF v -> PointF v -> [PointF v] $cenumFromThenTo :: forall v. Enum v => PointF v -> PointF v -> PointF v -> [PointF v] enumFromThenTo :: PointF v -> PointF v -> PointF v -> [PointF v] -Enum, Node Pos -> Parser (PointF v) +Enum, Node Pos -> Parser (PointF v) (Node Pos -> Parser (PointF v)) -> FromYAML (PointF v) forall v. FromYAML v => Node Pos -> Parser (PointF v) forall a. (Node Pos -> Parser a) -> FromYAML a $cparseYAML :: forall v. FromYAML v => Node Pos -> Parser (PointF v) parseYAML :: Node Pos -> Parser (PointF v) -FromYAML, PointF v -> Node () +FromYAML, PointF v -> Node () (PointF v -> Node ()) -> ToYAML (PointF v) forall v. ToYAML v => PointF v -> Node () forall a. (a -> Node ()) -> ToYAML a $ctoYAML :: forall v. ToYAML v => PointF v -> Node () toYAML :: PointF v -> Node () ToYAML - , [PointF v] -> Value + , [PointF v] -> Value [PointF v] -> Encoding PointF v -> Bool PointF v -> Value @@ -247,7 +247,7 @@ toEncodingList :: [PointF v] -> Encoding $comitField :: forall v. ToJSON v => PointF v -> Bool omitField :: PointF v -> Bool -ToJSON, Maybe (PointF v) +ToJSON, Maybe (PointF v) Value -> Parser [PointF v] Value -> Parser (PointF v) (Value -> Parser (PointF v)) @@ -270,9 +270,9 @@ ) -- don't derive functor, or so here. since that will be confusing. -type instance Dimension (PointF v) = Dimension v -type instance NumType (PointF v) = IxValue v -type instance IxValue (PointF v) = IxValue v +type instance Dimension (PointF v) = Dimension v +type instance NumType (PointF v) = IxValue v +type instance IxValue (PointF v) = IxValue v -- deriving newtype instance Functor v => Functor (PointF v) -- deriving newtype instance Foldable v => Foldable (PointF v) @@ -280,7 +280,7 @@ -- Functor, Foldable, Traversable -_PointF :: Iso (PointF v) (PointF v') v v' +_PointF :: Iso (PointF v) (PointF v') v v' _PointF :: forall v v' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p v (f v') -> p (PointF v) (f (PointF v')) @@ -294,24 +294,24 @@ Point {-# INLINE _PointF #-} -instance ( Additive_ vector d r - , Additive_ (Vector d r) d r - , Show r - ) => Show (PointF vector) where - showsPrec :: Int -> PointF vector -> ShowS -showsPrec Int -k PointF vector -p = Bool -> ShowS -> ShowS +instance ( Additive_ vector d r + , Additive_ (Vector d r) d r + , Show r + ) => Show (PointF vector) where + showsPrec :: Int -> PointF vector -> ShowS +showsPrec Int +k PointF vector +p = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ShowS -> ShowS) -> ShowS -> ShowS +app_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ String -> ShowS showString String -constr ShowS -> ShowS -> ShowS +constr ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS showChar Char @@ -319,13 +319,13 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . [ShowS] -> ShowS -unwordsS ((r -> ShowS) -> [r] -> [ShowS] +unwordsS ((r -> ShowS) -> [r] -> [ShowS] forall a b. (a -> b) -> [a] -> [b] map (Int -> r -> ShowS forall a. Show a => Int -> a -> ShowS showsPrec Int 11) (PointF vector -pPointF vector -> Getting (Endo [r]) (PointF vector) r -> [r] +pPointF vector -> Getting (Endo [r]) (PointF vector) r -> [r] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [r]) (PointF vector) r (NumType (PointF vector) @@ -342,11 +342,11 @@ (NumType (PointF vector)) coordinates)) where - app_prec :: Int -app_prec = Int + app_prec :: Int +app_prec = Int 10 - constr :: String -constr = String + constr :: String +constr = String "Point" String -> ShowS forall a. Semigroup a => a -> a -> a <> Integer -> String @@ -356,11 +356,11 @@ fromIntegral (forall (n :: Nat) (proxy :: Nat -> *). KnownNat n => proxy n -> Integer -natVal @d Proxy d +natVal @d Proxy d forall {k} (t :: k). Proxy t Proxy)) - unwordsS :: [ShowS] -> ShowS -unwordsS = (ShowS -> ShowS -> ShowS) -> ShowS -> [ShowS] -> ShowS + unwordsS :: [ShowS] -> ShowS +unwordsS = (ShowS -> ShowS -> ShowS) -> ShowS -> [ShowS] -> ShowS forall a b. (a -> b -> b) -> b -> [a] -> b forall (t :: * -> *) a b. Foldable t => @@ -377,12 +377,12 @@ showChar Char ' ') -instance ( Additive_ vector d r - , Additive_ (Vector d r) d r - , Read r - ) => Read (PointF vector) where - readPrec :: ReadPrec (PointF vector) -readPrec = ReadPrec (PointF vector) -> ReadPrec (PointF vector) +instance ( Additive_ vector d r + , Additive_ (Vector d r) d r + , Read r + ) => Read (PointF vector) where + readPrec :: ReadPrec (PointF vector) +readPrec = ReadPrec (PointF vector) -> ReadPrec (PointF vector) forall a. ReadPrec a -> ReadPrec a readData (ReadPrec (PointF vector) -> ReadPrec (PointF vector)) -> ReadPrec (PointF vector) -> ReadPrec (PointF vector) @@ -394,64 +394,64 @@ readUnaryWith (Int -> ReadPrec r -> ReadPrec [r] forall (m :: * -> *) a. Applicative m => Int -> m a -> m [a] replicateM Int -d ReadPrec r +d ReadPrec r forall a. Read a => ReadPrec a readPrec) String -constr (([r] -> PointF vector) -> ReadPrec (PointF vector)) +constr (([r] -> PointF vector) -> ReadPrec (PointF vector)) -> ([r] -> PointF vector) -> ReadPrec (PointF vector) forall a b. (a -> b) -> a -> b -$ \[r] -rs -> +$ \[r] +rs -> case [r] -> Maybe (PointF vector) forall point (d :: Nat) r. (ConstructablePoint_ point d r, Vector_ (Vector d r) d r) => [r] -> Maybe point pointFromList [r] -rs of - Just PointF vector -p -> PointF vector -p +rs of + Just PointF vector +p -> PointF vector +p Maybe (PointF vector) _ -> String -> PointF vector forall a. HasCallStack => String -> a error String "internal error in HGeometry.Point read instance." where - d :: Int -d = Integer -> Int + d :: Int +d = Integer -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral (forall (n :: Nat) (proxy :: Nat -> *). KnownNat n => proxy n -> Integer -natVal @d Proxy d +natVal @d Proxy d forall {k} (t :: k). Proxy t Proxy) - constr :: String -constr = String + constr :: String +constr = String "Point" String -> ShowS forall a. Semigroup a => a -> a -> a <> Int -> String forall a. Show a => a -> String show Int -d - readListPrec :: ReadPrec [PointF vector] -readListPrec = ReadPrec [PointF vector] +d + readListPrec :: ReadPrec [PointF vector] +readListPrec = ReadPrec [PointF vector] forall a. Read a => ReadPrec [a] readListPrecDefault -instance ( Vector_ vector d r - , Vector_ vector' d s - , Has_ Vector_ d r - , Has_ Vector_ d s - , AsVector_ vector vector' d r s - , HasComponents vector vector' - ) => HasVector (PointF vector) (PointF vector') where +instance ( Vector_ vector d r + , Vector_ vector' d s + , Has_ Vector_ d r + , Has_ Vector_ d s + , AsVector_ vector vector' d r s + , HasComponents vector vector' + ) => HasVector (PointF vector) (PointF vector') where - vector :: forall (d :: Nat) r s. + vector :: forall (d :: Nat) r s. (Dimension (PointF vector) ~ d, NumType (PointF vector) ~ r, Dimension (PointF vector') ~ d, NumType (PointF vector') ~ s) => Lens (PointF vector) (PointF vector') (Vector d r) (Vector d s) -vector = (vector -> f vector') -> PointF vector -> f (PointF vector') +vector = (vector -> f vector') -> PointF vector -> f (PointF vector') forall v v' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p v (f v') -> p (PointF v) (f (PointF v')) @@ -470,28 +470,28 @@ _Vector {-# INLINE vector #-} -instance ( Has_ Vector_ d r - , Has_ Vector_ d s - , Vector_ vector d r - , Vector_ vector' d s - , AsVector_ vector vector' d r s - , HasComponents (Vector d r) (Vector d s) - , HasComponents vector vector' - ) => HasCoordinates (PointF vector) (PointF vector') +instance ( Has_ Vector_ d r + , Has_ Vector_ d s + , Vector_ vector d r + , Vector_ vector' d s + , AsVector_ vector vector' d r s + , HasComponents (Vector d r) (Vector d s) + , HasComponents vector vector' + ) => HasCoordinates (PointF vector) (PointF vector') -instance ( Additive_ vector d r - , Additive_ (Vector d r) d r - ) => Affine_ (PointF vector) d r where +instance ( Additive_ vector d r + , Additive_ (Vector d r) d r + ) => Affine_ (PointF vector) d r where -instance ( Additive_ vector d r - , Additive_ (Vector d r) d r - ) => Point_ (PointF vector) d r where +instance ( Additive_ vector d r + , Additive_ (Vector d r) d r + ) => Point_ (PointF vector) d r where -instance ( Additive_ vector d r - , Additive_ (Vector d r) d r - ) => ConstructablePoint_ (PointF vector) d r where - fromVector :: Vector d r -> PointF vector -fromVector = vector -> PointF vector +instance ( Additive_ vector d r + , Additive_ (Vector d r) d r + ) => ConstructablePoint_ (PointF vector) d r where + fromVector :: Vector d r -> PointF vector +fromVector = vector -> PointF vector forall v. v -> PointF v Point (vector -> PointF vector) -> (Vector d r -> vector) -> Vector d r -> PointF vector @@ -506,20 +506,20 @@ _Vector {-# INLINE fromVector #-} -instance HasPoints (PointF v) (PointF v') (PointF v) (PointF v') where - allPoints :: forall (d :: Nat) r r'. +instance HasPoints (PointF v) (PointF v') (PointF v) (PointF v') where + allPoints :: forall (d :: Nat) r r'. (Point_ (PointF v) d r, Point_ (PointF v') d r', NumType (PointF v) ~ r, NumType (PointF v') ~ r', Dimension (PointF v) ~ d, Dimension (PointF v') ~ d) => Traversal1 (PointF v) (PointF v') (PointF v) (PointF v') -allPoints = (PointF v -> f (PointF v')) -> PointF v -> f (PointF v') +allPoints = (PointF v -> f (PointF v')) -> PointF v -> f (PointF v') forall a. a -> a id -instance Uniform v => Uniform (PointF v) where - uniformM :: forall g (m :: * -> *). StatefulGen g m => g -> m (PointF v) -uniformM g -gen = v -> PointF v +instance Uniform v => Uniform (PointF v) where + uniformM :: forall g (m :: * -> *). StatefulGen g m => g -> m (PointF v) +uniformM g +gen = v -> PointF v forall v. v -> PointF v Point (v -> PointF v) -> m v -> m (PointF v) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -527,16 +527,16 @@ forall a g (m :: * -> *). (Uniform a, StatefulGen g m) => g -> m a forall g (m :: * -> *). StatefulGen g m => g -> m v uniformM g -gen +gen -instance (UniformRange v) => UniformRange (PointF v) where - uniformRM :: forall g (m :: * -> *). +instance (UniformRange v) => UniformRange (PointF v) where + uniformRM :: forall g (m :: * -> *). StatefulGen g m => (PointF v, PointF v) -> g -> m (PointF v) -uniformRM (Point v -lows, Point v -highs) g -gen = v -> PointF v +uniformRM (Point v +lows, Point v +highs) g +gen = v -> PointF v forall v. v -> PointF v Point (v -> PointF v) -> m v -> m (PointF v) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -546,26 +546,26 @@ (a, a) -> g -> m a forall g (m :: * -> *). StatefulGen g m => (v, v) -> g -> m v uniformRM (v -lows,v -highs) g -gen +lows,v +highs) g +gen -newtype instance U.MVector s (PointF v) = MV_PointF (U.MVector s v) -newtype instance U.Vector (PointF v) = V_PointF (U.Vector v) +newtype instance U.MVector s (PointF v) = MV_PointF (U.MVector s v) +newtype instance U.Vector (PointF v) = V_PointF (U.Vector v) -instance U.IsoUnbox (PointF v) v where - toURepr :: PointF v -> v -toURepr (Point v -v) = v -v - fromURepr :: v -> PointF v -fromURepr = v -> PointF v +instance U.IsoUnbox (PointF v) v where + toURepr :: PointF v -> v +toURepr (Point v +v) = v +v + fromURepr :: v -> PointF v +fromURepr = v -> PointF v forall v. v -> PointF v Point {-# INLINE toURepr #-} {-# INLINE fromURepr #-} -deriving via ((PointF v) `U.As` v) instance U.Unbox v => GM.MVector U.MVector (PointF v) -deriving via ((PointF v) `U.As` v) instance U.Unbox v => G.Vector U.Vector (PointF v) -instance U.Unbox v => U.Unbox (PointF v) +deriving via ((PointF v) `U.As` v) instance U.Unbox v => GM.MVector U.MVector (PointF v) +deriving via ((PointF v) `U.As` v) instance U.Unbox v => G.Vector U.Vector (PointF v) +instance U.Unbox v => U.Unbox (PointF v) \ No newline at end of file diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.Quadrants.html b/haddocks/hgeometry/point/src/HGeometry.Point.Quadrants.html index afcc34ce5..295f51ec3 100644 --- a/haddocks/hgeometry/point/src/HGeometry.Point.Quadrants.html +++ b/haddocks/hgeometry/point/src/HGeometry.Point.Quadrants.html @@ -1,4 +1,4 @@ -
--------------------------------------------------------------------------------
+
--------------------------------------------------------------------------------
 -- |
 -- Module      :  HGeometry.Point.Quadrants
 -- Copyright   :  (C) Frank Staals
@@ -15,7 +15,7 @@
 
 -- | Quadrants of two dimensional points. in CCW order
 data Quadrant = TopRight | TopLeft | BottomLeft | BottomRight
-              deriving (Int -> Quadrant -> ShowS
+              deriving (Int -> Quadrant -> ShowS
 [Quadrant] -> ShowS
 Quadrant -> String
 (Int -> Quadrant -> ShowS)
@@ -28,7 +28,7 @@
 show :: Quadrant -> String
 $cshowList :: [Quadrant] -> ShowS
 showList :: [Quadrant] -> ShowS
-Show,ReadPrec [Quadrant]
+Show,ReadPrec [Quadrant]
 ReadPrec Quadrant
 Int -> ReadS Quadrant
 ReadS [Quadrant]
@@ -48,7 +48,7 @@
 readPrec :: ReadPrec Quadrant
 $creadListPrec :: ReadPrec [Quadrant]
 readListPrec :: ReadPrec [Quadrant]
-Read,Quadrant -> Quadrant -> Bool
+Read,Quadrant -> Quadrant -> Bool
 (Quadrant -> Quadrant -> Bool)
 -> (Quadrant -> Quadrant -> Bool) -> Eq Quadrant
 forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
@@ -56,7 +56,7 @@
 == :: Quadrant -> Quadrant -> Bool
 $c/= :: Quadrant -> Quadrant -> Bool
 /= :: Quadrant -> Quadrant -> Bool
-Eq,Eq Quadrant
+Eq,Eq Quadrant
 Eq Quadrant =>
 (Quadrant -> Quadrant -> Ordering)
 -> (Quadrant -> Quadrant -> Bool)
@@ -93,7 +93,7 @@
 max :: Quadrant -> Quadrant -> Quadrant
 $cmin :: Quadrant -> Quadrant -> Quadrant
 min :: Quadrant -> Quadrant -> Quadrant
-Ord,Int -> Quadrant
+Ord,Int -> Quadrant
 Quadrant -> Int
 Quadrant -> [Quadrant]
 Quadrant -> Quadrant
@@ -134,7 +134,7 @@
 enumFromTo :: Quadrant -> Quadrant -> [Quadrant]
 $cenumFromThenTo :: Quadrant -> Quadrant -> Quadrant -> [Quadrant]
 enumFromThenTo :: Quadrant -> Quadrant -> Quadrant -> [Quadrant]
-Enum,Quadrant
+Enum,Quadrant
 Quadrant -> Quadrant -> Bounded Quadrant
 forall a. a -> a -> Bounded a
 $cminBound :: Quadrant
@@ -146,15 +146,15 @@
 -- | Quadrants around point c; quadrants are closed on their "previous"
 -- boundary (i..e the boundary with the previous quadrant in the CCW order),
 -- open on next boundary. The origin itself is assigned the topRight quadrant
-quadrantWith     :: (Ord r, Point_ point 2 r)
-                 => point -> point -> Quadrant
+quadrantWith     :: (Ord r, Point_ point 2 r)
+                 => point -> point -> Quadrant
 quadrantWith :: forall r point.
 (Ord r, Point_ point 2 r) =>
 point -> point -> Quadrant
-quadrantWith point
-c point
-p = case ( (point
-cpoint -> Getting r point r -> r
+quadrantWith point
+c point
+p = case ( (point
+cpoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
 forall (d :: Natural) point r.
@@ -164,7 +164,7 @@
 xCoord) r -> r -> Ordering
 forall a. Ord a => a -> a -> Ordering
 `compare` (point
-ppoint -> Getting r point r -> r
+ppoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
 forall (d :: Natural) point r.
@@ -173,7 +173,7 @@
 IndexedLens' Int point r
 xCoord)
                         , (point
-cpoint -> Getting r point r -> r
+cpoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
 forall (d :: Natural) point r.
@@ -183,7 +183,7 @@
 yCoord) r -> r -> Ordering
 forall a. Ord a => a -> a -> Ordering
 `compare` (point
-ppoint -> Getting r point r -> r
+ppoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
 forall (d :: Natural) point r.
@@ -229,7 +229,7 @@
 BottomRight
 
 -- | Quadrants with respect to the origin
-quadrant :: (Ord r, Num r, ConstructablePoint_ point 2 r) => point -> Quadrant
+quadrant :: (Ord r, Num r, ConstructablePoint_ point 2 r) => point -> Quadrant
 quadrant :: forall r point.
 (Ord r, Num r, ConstructablePoint_ point 2 r) =>
 point -> Quadrant
@@ -248,72 +248,72 @@
 -- reported in the order topLeft, topRight, bottomLeft, bottomRight. The points
 -- are in the same order as they were in the original input lists.
 -- Points with the same x-or y coordinate as p, are "rounded" to above.
-partitionIntoQuadrants       :: (Ord r, Point_ point 2 r)
-                             => point
-                             -> [point]
-                             -> ( [point], [point]
-                                , [point], [point]
+partitionIntoQuadrants       :: (Ord r, Point_ point 2 r)
+                             => point
+                             -> [point]
+                             -> ( [point], [point]
+                                , [point], [point]
                                 )
 partitionIntoQuadrants :: forall r point.
 (Ord r, Point_ point 2 r) =>
 point -> [point] -> ([point], [point], [point], [point])
-partitionIntoQuadrants point
-c [point]
-pts = ([point]
-topL, [point]
-topR, [point]
-bottomL, [point]
-bottomR)
+partitionIntoQuadrants point
+c [point]
+pts = ([point]
+topL, [point]
+topR, [point]
+bottomL, [point]
+bottomR)
   where
-    ([point]
-below',[point]
-above')   = (point -> Bool) -> [point] -> ([point], [point])
+    ([point]
+below',[point]
+above')   = (point -> Bool) -> [point] -> ([point], [point])
 forall a. (a -> Bool) -> [a] -> ([a], [a])
 L.partition (Getting r point r -> point -> Bool
-on Getting r point r
+on Getting r point r
 forall (d :: Natural) point r.
 (2 <= d, Point_ point d r) =>
 IndexedLens' Int point r
 IndexedLens' Int point r
 yCoord) [point]
-pts
-    ([point]
-bottomL,[point]
-bottomR) = (point -> Bool) -> [point] -> ([point], [point])
+pts
+    ([point]
+bottomL,[point]
+bottomR) = (point -> Bool) -> [point] -> ([point], [point])
 forall a. (a -> Bool) -> [a] -> ([a], [a])
 L.partition (Getting r point r -> point -> Bool
-on Getting r point r
+on Getting r point r
 forall (d :: Natural) point r.
 (1 <= d, Point_ point d r) =>
 IndexedLens' Int point r
 IndexedLens' Int point r
 xCoord) [point]
-below'
-    ([point]
-topL,[point]
-topR)       = (point -> Bool) -> [point] -> ([point], [point])
+below'
+    ([point]
+topL,[point]
+topR)       = (point -> Bool) -> [point] -> ([point], [point])
 forall a. (a -> Bool) -> [a] -> ([a], [a])
 L.partition (Getting r point r -> point -> Bool
-on Getting r point r
+on Getting r point r
 forall (d :: Natural) point r.
 (1 <= d, Point_ point d r) =>
 IndexedLens' Int point r
 IndexedLens' Int point r
 xCoord) [point]
-above'
+above'
 
-    on :: Getting r point r -> point -> Bool
-on Getting r point r
-l point
-q       = point
-qpoint -> Getting r point r -> r
+    on :: Getting r point r -> point -> Bool
+on Getting r point r
+l point
+q       = point
+qpoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
-l r -> r -> Bool
+l r -> r -> Bool
 forall a. Ord a => a -> a -> Bool
 < point
-cpoint -> Getting r point r -> r
+cpoint -> Getting r point r -> r
 forall s a. s -> Getting a s a -> a
 ^.Getting r point r
-l
+l
 
\ No newline at end of file diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.Type.html b/haddocks/hgeometry/point/src/HGeometry.Point.Type.html index 8fdae4d09..27b8a1ed9 100644 --- a/haddocks/hgeometry/point/src/HGeometry.Point.Type.html +++ b/haddocks/hgeometry/point/src/HGeometry.Point.Type.html @@ -7,5 +7,5 @@
import HGeometry.Vector -- | Defines our point type -type Point d r = PointF (Vector d r) +type Point d r = PointF (Vector d r)
\ No newline at end of file diff --git a/haddocks/hgeometry/point/src/HGeometry.Point.html b/haddocks/hgeometry/point/src/HGeometry.Point.html index 424713602..064ed739f 100644 --- a/haddocks/hgeometry/point/src/HGeometry.Point.html +++ b/haddocks/hgeometry/point/src/HGeometry.Point.html @@ -77,11 +77,11 @@
-------------------------------------------------------------------------------- -- | d-dimensional points -type Point d r = PointF (Vector d r) +type Point d r = PointF (Vector d r) -- | Convert a generic point into a Point d r, dropping any additional -- information we may now about it. -asPoint :: forall point d r. Point_ point d r => Lens' point (Point d r) +asPoint :: forall point d r. Point_ point d r => Lens' point (Point d r) asPoint :: forall point (d :: Nat) r. Point_ point d r => Lens' point (Point d r) @@ -106,52 +106,52 @@ forall {p :: * -> * -> *} {f :: * -> *}. (Profunctor p, Functor f) => p (Point d r) (f (Point d r)) -> p (Vector d r) (f (Vector d r)) -coerced :: Iso' (Vector d r) (Point d r)) +coerced :: Iso' (Vector d r) (Point d r)) {-# INLINE asPoint #-} -------------------------------------------------------------------------------- -- * Convenience functions to construct 1, 2 and 3 dimensional points -- | A bidirectional pattern synonym for 1 dimensional points. -pattern Point1 :: r -> Point 1 r +pattern Point1 :: r -> Point 1 r pattern $mPoint1 :: forall {r} {r}. Point 1 r -> (r -> r) -> ((# #) -> r) -> r $bPoint1 :: forall r. r -> Point 1 r -Point1 x = Point (Vector1 x) +Point1
x = Point (Vector1 x) {-# COMPLETE Point1 #-} -- | A bidirectional pattern synonym for 2 dimensional points. -pattern Point2 :: r -> r -> Point 2 r +pattern Point2 :: r -> r -> Point 2 r pattern $mPoint2 :: forall {r} {r}. Point 2 r -> (r -> r -> r) -> ((# #) -> r) -> r $bPoint2 :: forall r. r -> r -> Point 2 r -Point2 x y = Point (Vector2 x y) +Point2
x y = Point (Vector2 x y) {-# COMPLETE Point2 #-} -- | A bidirectional pattern synonym for 3 dimensional points. -pattern Point3 :: r -> r -> r -> Point 3 r +pattern Point3 :: r -> r -> r -> Point 3 r pattern $mPoint3 :: forall {r} {r}. Point 3 r -> (r -> r -> r -> r) -> ((# #) -> r) -> r $bPoint3 :: forall r. r -> r -> r -> Point 3 r -Point3 x y z = (Point (Vector3 x y z)) +Point3
x y z = (Point (Vector3 x y z)) {-# COMPLETE Point3 #-} -- | A bidirectional pattern synonym for 4 dimensional points. -pattern Point4 :: r -> r -> r -> r -> Point 4 r +pattern Point4 :: r -> r -> r -> r -> Point 4 r pattern $mPoint4 :: forall {r} {r}. Point 4 r -> (r -> r -> r -> r -> r) -> ((# #) -> r) -> r $bPoint4 :: forall r. r -> r -> r -> r -> Point 4 r -Point4 x y z w = (Point (Vector4 x y z w)) +Point4
x y z w = (Point (Vector4 x y z w)) {-# COMPLETE Point4 #-} -------------------------------------------------------------------------------- -- | Project a point into a lower dimension. -projectPoint :: forall i point d r. - (Point_ point d r, i <= d, Has_ Vector_ i r) => point -> Point i r +projectPoint :: forall i point d r. + (Point_ point d r, i <= d, Has_ Vector_ i r) => point -> Point i r projectPoint :: forall (i :: Nat) point (d :: Nat) r. (Point_ point d r, i <= d, Has_ Vector_ i r) => point -> Point i r -projectPoint point -p = Vector i r -> PointF (Vector i r) +projectPoint
point +p = Vector i r -> PointF (Vector i r) forall v. v -> PointF v Point (Vector i r -> PointF (Vector i r)) -> (Vector d r -> Vector i r) -> Vector d r -> PointF (Vector i r) @@ -164,7 +164,7 @@ -> Vector d r -> PointF (Vector i r) forall a b. (a -> b) -> a -> b $ point -ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r +ppoint -> Getting (Vector d r) point (Vector d r) -> Vector d r forall s a. s -> Getting a s a -> a ^.(Point d r -> Const (Vector d r) (Point d r)) -> point -> Const (Vector d r) point diff --git a/haddocks/hgeometry/quickcheck/src/HGeometry.Polygon.Instances.html b/haddocks/hgeometry/quickcheck/src/HGeometry.Polygon.Instances.html index aa6323d82..bc4f1693f 100644 --- a/haddocks/hgeometry/quickcheck/src/HGeometry.Polygon.Instances.html +++ b/haddocks/hgeometry/quickcheck/src/HGeometry.Polygon.Instances.html @@ -55,43 +55,43 @@ -- self-intersecting polygons {-# NOINLINE allSimplePolygonsWith #-} -allSimplePolygonsWith :: forall r. - (Ord r, Fractional r) => (Double -> r) -> [SimplePolygon (Point 2 r)] +allSimplePolygonsWith :: forall r. + (Ord r, Fractional r) => (Double -> r) -> [SimplePolygon (Point 2 r)] allSimplePolygonsWith :: forall r. (Ord r, Fractional r) => (Double -> r) -> [SimplePolygon (Point 2 r)] -allSimplePolygonsWith Double -> r -f = IO [SimplePolygon (Point 2 r)] -> [SimplePolygon (Point 2 r)] +allSimplePolygonsWith Double -> r +f = IO [SimplePolygon (Point 2 r)] -> [SimplePolygon (Point 2 r)] forall a. IO a -> a unsafePerformIO (IO [SimplePolygon (Point 2 r)] -> [SimplePolygon (Point 2 r)]) -> IO [SimplePolygon (Point 2 r)] -> [SimplePolygon (Point 2 r)] forall a b. (a -> b) -> a -> b $ do - FilePath -fp <- FilePath -> IO FilePath + FilePath +fp <- FilePath -> IO FilePath getDataFileName FilePath "polygons.simple.json" FilePath -> IO (Either FilePath [SimplePolygon (Point 2 Double)]) forall a. FromJSON a => FilePath -> IO (Either FilePath a) eitherDecodeFileStrict FilePath -fp IO (Either FilePath [SimplePolygon (Point 2 Double)]) +fp IO (Either FilePath [SimplePolygon (Point 2 Double)]) -> (Either FilePath [SimplePolygon (Point 2 Double)] -> IO [SimplePolygon (Point 2 r)]) -> IO [SimplePolygon (Point 2 r)] forall a b. IO a -> (a -> IO b) -> IO b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Left FilePath -msg -> FilePath -> IO [SimplePolygon (Point 2 r)] + Left FilePath +msg -> FilePath -> IO [SimplePolygon (Point 2 r)] forall a. HasCallStack => FilePath -> a error FilePath -msg - Right [SimplePolygon (Point 2 Double)] -pgs -> [SimplePolygon (Point 2 r)] -> IO [SimplePolygon (Point 2 r)] +msg + Right [SimplePolygon (Point 2 Double)] +pgs -> [SimplePolygon (Point 2 r)] -> IO [SimplePolygon (Point 2 r)] forall a. a -> IO a forall (f :: * -> *) a. Applicative f => a -> f a pure [ SimplePolygon (Point 2 Double) -pgSimplePolygon (Point 2 Double) +pgSimplePolygon (Point 2 Double) -> (SimplePolygon (Point 2 Double) -> SimplePolygon (Point 2 r)) -> SimplePolygon (Point 2 r) forall a b. a -> (a -> b) -> b @@ -125,9 +125,9 @@ -> SimplePolygon (Point 2 Double) -> SimplePolygon (Point 2 r) forall s t a b. ASetter s t a b -> (a -> b) -> s -> t -%~ \Point 2 Double -p -> Point 2 Double -pPoint 2 Double -> (Point 2 Double -> Point 2 r) -> Point 2 r +%~ \Point 2 Double +p -> Point 2 Double +pPoint 2 Double -> (Point 2 Double -> Point 2 r) -> Point 2 r forall a b. a -> (a -> b) -> b &(Double -> Identity r) -> Point 2 Double -> Identity (Point 2 r) (NumType (Point 2 Double) -> Identity (NumType (Point 2 r))) @@ -145,10 +145,10 @@ -> (Double -> r) -> Point 2 Double -> Point 2 r forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Double -> r -f - | (SimplePolygon (Point 2 Double) -pg :: SimplePolygon (Point 2 Double)) <- [SimplePolygon (Point 2 Double)] -pgs +f + | (SimplePolygon (Point 2 Double) +pg :: SimplePolygon (Point 2 Double)) <- [SimplePolygon (Point 2 Double)] +pgs ] -- tojson = encodeFile "out.json" $ allSimplePolygons @@ -178,13 +178,13 @@ -} -- | Shifts the polygon to the left by n. -rotateLeft :: SimplePolygon_ simplePolygon point r => Int -> simplePolygon -> simplePolygon +rotateLeft :: SimplePolygon_ simplePolygon point r => Int -> simplePolygon -> simplePolygon rotateLeft :: forall simplePolygon point r. SimplePolygon_ simplePolygon point r => Int -> simplePolygon -> simplePolygon -rotateLeft Int -n simplePolygon -pg = [point] -> simplePolygon +rotateLeft Int +n simplePolygon +pg = [point] -> simplePolygon forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -192,7 +192,7 @@ uncheckedFromCCWPoints ([point] -> simplePolygon) -> [point] -> simplePolygon forall a b. (a -> b) -> a -> b $ simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [point]) simplePolygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..VertexIx simplePolygon @@ -203,29 +203,29 @@ VertexIx polygon -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) ccwOuterBoundaryFrom (Int -n Int -> Int -> Int +n Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` simplePolygon -> Int forall graph. HasVertices' graph => graph -> Int numVertices simplePolygon -pg) +pg
) instance Arbitrary (SimplePolygon (Point 2 Rational)) where - arbitrary :: Gen (SimplePolygon (Point 2 Rational)) -arbitrary = do - SimplePolygon (Point 2 Rational) -p <- [SimplePolygon (Point 2 Rational)] + arbitrary :: Gen (SimplePolygon (Point 2 Rational)) +arbitrary = do + SimplePolygon (Point 2 Rational) +p <- [SimplePolygon (Point 2 Rational)] -> Gen (SimplePolygon (Point 2 Rational)) forall a. HasCallStack => [a] -> Gen a elements [SimplePolygon (Point 2 Rational)] allSimplePolygons' - Int -n <- (Int, Int) -> Gen Int + Int +n <- (Int, Int) -> Gen Int chooseInt (Int 0, SimplePolygon (Point 2 Rational) -> Int forall graph. HasVertices' graph => graph -> Int numVertices SimplePolygon (Point 2 Rational) -pInt -> Int -> Int +pInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) @@ -245,48 +245,48 @@ SimplePolygon_ simplePolygon point r => Int -> simplePolygon -> simplePolygon rotateLeft Int -n SimplePolygon (Point 2 Rational) -p - shrink :: SimplePolygon (Point 2 Rational) +n SimplePolygon (Point 2 Rational) +p + shrink :: SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] -shrink SimplePolygon (Point 2 Rational) -p +shrink SimplePolygon (Point 2 Rational) +p | SimplePolygon (Point 2 Rational) -> Bool forall {graph}. HasVertices' graph => graph -> Bool isTriangle SimplePolygon (Point 2 Rational) -p = SimplePolygon (Point 2 Rational) +p = SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] simplifyP SimplePolygon (Point 2 Rational) -p +p
| Bool otherwise = SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] cutEars SimplePolygon (Point 2 Rational) -p [SimplePolygon (Point 2 Rational)] +p [SimplePolygon (Point 2 Rational)] -> [SimplePolygon (Point 2 Rational)] -> [SimplePolygon (Point 2 Rational)] forall a. [a] -> [a] -> [a] ++ SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] simplifyP SimplePolygon (Point 2 Rational) -p +p
-instance Arbitrary (SimplePolygon (Point 2 Double)) where - arbitrary :: Gen (SimplePolygon (Point 2 Double)) +instance Arbitrary (SimplePolygon (Point 2 Double)) where + arbitrary :: Gen (SimplePolygon (Point 2 Double)) arbitrary = do - SimplePolygon (Point 2 Double) -p <- [SimplePolygon (Point 2 Double)] + SimplePolygon (Point 2 Double) +p <- [SimplePolygon (Point 2 Double)] -> Gen (SimplePolygon (Point 2 Double)) forall a. HasCallStack => [a] -> Gen a elements [SimplePolygon (Point 2 Double)] allSimplePolygons - Int -n <- (Int, Int) -> Gen Int + Int +n <- (Int, Int) -> Gen Int chooseInt (Int 0, SimplePolygon (Point 2 Double) -> Int forall graph. HasVertices' graph => graph -> Int numVertices SimplePolygon (Point 2 Double) -pInt -> Int -> Int +pInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) @@ -305,15 +305,15 @@ SimplePolygon_ simplePolygon point r => Int -> simplePolygon -> simplePolygon rotateLeft Int -n SimplePolygon (Point 2 Double) -p +n SimplePolygon (Point 2 Double) +p -- shrink p -- | isTriangle p = simplifyP p -- | otherwise = cutEars p ++ simplifyP p -instance Arbitrary (SimplePolygon (Point 2 (RealNumber (p::Nat)))) where - arbitrary :: Gen (SimplePolygon (Point 2 (RealNumber p))) +instance Arbitrary (SimplePolygon (Point 2 (RealNumber (p::Nat)))) where + arbitrary :: Gen (SimplePolygon (Point 2 (RealNumber p))) arbitrary = ASetter (SimplePolygon (Point 2 Rational)) (SimplePolygon (Point 2 (RealNumber p))) @@ -376,7 +376,7 @@ <$> (Gen (SimplePolygon (Point 2 Rational)) forall a. Arbitrary a => Gen a arbitrary :: Gen (SimplePolygon (Point 2 Rational))) - shrink :: SimplePolygon (Point 2 (RealNumber p)) + shrink :: SimplePolygon (Point 2 (RealNumber p)) -> [SimplePolygon (Point 2 (RealNumber p))] shrink = (SimplePolygon (Point 2 Rational) -> SimplePolygon (Point 2 (RealNumber p))) @@ -456,12 +456,12 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . SimplePolygon (Point 2 (RealNumber p)) -> SimplePolygon (Point 2 Rational) -trunc +trunc where - trunc :: SimplePolygon (Point 2 (RealNumber (p::Nat))) -> SimplePolygon (Point 2 Rational) - trunc :: SimplePolygon (Point 2 (RealNumber p)) + trunc :: SimplePolygon (Point 2 (RealNumber (p::Nat))) -> SimplePolygon (Point 2 Rational) + trunc :: SimplePolygon (Point 2 (RealNumber p)) -> SimplePolygon (Point 2 Rational) -trunc = ASetter +trunc = ASetter (SimplePolygon (Point 2 (RealNumber p))) (SimplePolygon (Point 2 Rational)) (RealNumber p) @@ -527,15 +527,15 @@ simplifyP :: SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] simplifyP :: SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] -simplifyP SimplePolygon (Point 2 Rational) -pg +simplifyP SimplePolygon (Point 2 Rational) +pg -- Scale up polygon such that each coordinate is a whole number. | Rational -lcmP Rational -> Rational -> Bool +lcmP Rational -> Rational -> Bool forall a. Eq a => a -> a -> Bool /= Rational 1 = [ SimplePolygon (Point 2 Rational) -pgSimplePolygon (Point 2 Rational) +pgSimplePolygon (Point 2 Rational) -> (SimplePolygon (Point 2 Rational) -> SimplePolygon (Point 2 Rational)) -> SimplePolygon (Point 2 Rational) @@ -566,17 +566,17 @@ forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Rational -> Point 2 Rational -> Point 2 Rational forall {r}. Num r => r -> Point 2 r -> Point 2 r -multP Rational -lcmP ] +multP Rational +lcmP ] -- unsafeFromCircularVector $ CV.map (over core (multP lcmP)) vs] -- Scale down polygon maintaining each coordinate as a whole number | Rational -gcdP Rational -> Rational -> Bool +gcdP Rational -> Rational -> Bool forall a. Eq a => a -> a -> Bool /= Rational 1 = [ SimplePolygon (Point 2 Rational) -pgSimplePolygon (Point 2 Rational) +pgSimplePolygon (Point 2 Rational) -> (SimplePolygon (Point 2 Rational) -> SimplePolygon (Point 2 Rational)) -> SimplePolygon (Point 2 Rational) @@ -607,20 +607,20 @@ forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Rational -> Point 2 Rational -> Point 2 Rational forall {r}. Fractional r => r -> Point 2 r -> Point 2 r -divP Rational -gcdP ] +divP Rational +gcdP ] | Rational -minX Rational -> Rational -> Bool +minX Rational -> Rational -> Bool forall a. Eq a => a -> a -> Bool /= Rational 0 Bool -> Bool -> Bool || Rational -minY Rational -> Rational -> Bool +minY Rational -> Rational -> Bool forall a. Eq a => a -> a -> Bool /= Rational 0 = [ SimplePolygon (Point 2 Rational) -pgSimplePolygon (Point 2 Rational) +pgSimplePolygon (Point 2 Rational) -> (SimplePolygon (Point 2 Rational) -> SimplePolygon (Point 2 Rational)) -> SimplePolygon (Point 2 Rational) @@ -650,13 +650,13 @@ -> SimplePolygon (Point 2 Rational) forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Point 2 Rational -> Point 2 Rational -align ] +align ] -- = [unsafeFromCircularVector $ CV.map (over core align) vs] | Bool otherwise = - let pg' :: SimplePolygon (Point 2 Rational) -pg' = SimplePolygon (Point 2 Rational) -pgSimplePolygon (Point 2 Rational) + let pg' :: SimplePolygon (Point 2 Rational) +pg' = SimplePolygon (Point 2 Rational) +pgSimplePolygon (Point 2 Rational) -> (SimplePolygon (Point 2 Rational) -> SimplePolygon (Point 2 Rational)) -> SimplePolygon (Point 2 Rational) @@ -687,17 +687,17 @@ forall s t a b. ASetter s t a b -> (a -> b) -> s -> t %~ Point 2 Rational -> Point 2 Rational forall {a}. Integral a => Point 2 (Ratio a) -> Point 2 (Ratio a) -_div2 +_div2 -- unsafeFromCircularVector $ CV.map (over core _div2) vs in [ SimplePolygon (Point 2 Rational) -pg' | [Point 2 Rational] -> Bool +pg' | [Point 2 Rational] -> Bool forall (f :: * -> *) point r. (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) => f point -> Bool hasNoSelfIntersections ([Point 2 Rational] -> Bool) -> [Point 2 Rational] -> Bool forall a b. (a -> b) -> a -> b $ SimplePolygon (Point 2 Rational) -pg'SimplePolygon (Point 2 Rational) +pg'SimplePolygon (Point 2 Rational) -> Getting (Endo [Point 2 Rational]) (SimplePolygon (Point 2 Rational)) @@ -728,8 +728,8 @@ vertices ] -- otherwise = [] where - minX :: Rational -minX = Getting + minX :: Rational +minX = Getting (First Rational) (SimplePolygon (Point 2 Rational)) Rational -> SimplePolygon (Point 2 Rational) -> Rational forall a s. Getting (First a) s a -> s -> a @@ -769,9 +769,9 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 Rational) Rational xCoord) SimplePolygon (Point 2 Rational) -pg - minY :: Rational -minY = Getting +pg + minY :: Rational +minY = Getting (First Rational) (SimplePolygon (Point 2 Rational)) Rational -> SimplePolygon (Point 2 Rational) -> Rational forall a s. Getting (First a) s a -> s -> a @@ -811,7 +811,7 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 Rational) Rational yCoord) SimplePolygon (Point 2 Rational) -pg +pg -- F.minimumBy (comparing (view (core.xCoord))) vs ^. core.xCoord -- minY = F.minimumBy (comparing (view (core.yCoord))) vs ^. core.yCoord @@ -819,69 +819,69 @@ -- vs = p ^. outerBoundaryVector - lcmP :: Rational -lcmP = SimplePolygon (Point 2 Rational) -> Rational + lcmP :: Rational +lcmP = SimplePolygon (Point 2 Rational) -> Rational lcmPoint SimplePolygon (Point 2 Rational) -pg - gcdP :: Rational -gcdP = SimplePolygon (Point 2 Rational) -> Rational +pg + gcdP :: Rational +gcdP = SimplePolygon (Point 2 Rational) -> Rational gcdPoint SimplePolygon (Point 2 Rational) -pg - align :: Point 2 Rational -> Point 2 Rational - align :: Point 2 Rational -> Point 2 Rational -align Point 2 Rational -v = Vector 2 Rational -> Point 2 Rational +pg + align :: Point 2 Rational -> Point 2 Rational + align :: Point 2 Rational -> Point 2 Rational +align Point 2 Rational +v = Vector 2 Rational -> Point 2 Rational forall v. v -> PointF v Point (Point 2 Rational -v Point 2 Rational -> Point 2 Rational -> Vector 2 Rational +v Point 2 Rational -> Point 2 Rational -> Vector 2 Rational forall point (d :: Natural) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Rational -> Rational -> Point 2 Rational forall r. r -> r -> Point 2 r Point2 Rational -minX Rational -minY) +minX Rational +minY) - multP :: r -> Point 2 r -> Point 2 r -multP r -v (Point2 r -c r -d) = r -> r -> Point 2 r + multP :: r -> Point 2 r -> Point 2 r +multP r +v (Point2 r +c r +d) = r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (r -cr -> r -> r +cr -> r -> r forall a. Num a => a -> a -> a *r -v) (r -dr -> r -> r +v) (r +dr -> r -> r forall a. Num a => a -> a -> a *r -v) - divP :: r -> Point 2 r -> Point 2 r -divP r -v (Point2 r -c r -d) = r -> r -> Point 2 r +v) + divP :: r -> Point 2 r -> Point 2 r +divP r +v (Point2 r +c r +d) = r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (r -cr -> r -> r +cr -> r -> r forall a. Fractional a => a -> a -> a /r -v) (r -dr -> r -> r +v) (r +dr -> r -> r forall a. Fractional a => a -> a -> a /r -v) - _div2 :: Point 2 (Ratio a) -> Point 2 (Ratio a) -_div2 (Point2 Ratio a -a Ratio a -b) = Ratio a -> Ratio a -> Point 2 (Ratio a) +v) + _div2 :: Point 2 (Ratio a) -> Point 2 (Ratio a) +_div2 (Point2 Ratio a +a Ratio a +b) = Ratio a -> Ratio a -> Point 2 (Ratio a) forall r. r -> r -> Point 2 r Point2 (Ratio a -> a forall a. Ratio a -> a numerator Ratio a -a a -> a -> a +a a -> a -> a forall a. Integral a => a -> a -> a `div` a 2 a -> a -> Ratio a @@ -890,7 +890,7 @@ 1) (Ratio a -> a forall a. Ratio a -> a numerator Ratio a -b a -> a -> a +b a -> a -> a forall a. Integral a => a -> a -> a `div` a 2 a -> a -> Ratio a @@ -901,15 +901,15 @@ lcmPoint :: SimplePolygon (Point 2 Rational) -> Rational lcmPoint :: SimplePolygon (Point 2 Rational) -> Rational -lcmPoint SimplePolygon (Point 2 Rational) -p = Integer -> Rational +lcmPoint SimplePolygon (Point 2 Rational) +p = Integer -> Rational forall a b. (Real a, Fractional b) => a -> b realToFrac Integer -t +t where - vs :: [Point 2 Rational] -vs = SimplePolygon (Point 2 Rational) -pSimplePolygon (Point 2 Rational) + vs :: [Point 2 Rational] +vs = SimplePolygon (Point 2 Rational) +pSimplePolygon (Point 2 Rational) -> Getting (Endo [Point 2 Rational]) (SimplePolygon (Point 2 Rational)) @@ -937,39 +937,39 @@ (Vertex (SimplePolygon (Point 2 Rational))) (Vertex (SimplePolygon (Point 2 Rational))) outerBoundary - lst :: [Integer] -lst = (Point 2 Rational -> [Integer]) -> [Point 2 Rational] -> [Integer] + lst :: [Integer] +lst = (Point 2 Rational -> [Integer]) -> [Point 2 Rational] -> [Integer] forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b] -concatMap (\(Point2 Rational -x Rational -y) -> [Rational -> Integer +concatMap (\(Point2 Rational +x Rational +y) -> [Rational -> Integer forall a. Ratio a -> a denominator Rational -x, Rational -> Integer +x, Rational -> Integer forall a. Ratio a -> a denominator Rational -y]) [Point 2 Rational] -vs - t :: Integer -t = (Integer -> Integer -> Integer) -> [Integer] -> Integer +y]) [Point 2 Rational] +vs + t :: Integer +t = (Integer -> Integer -> Integer) -> [Integer] -> Integer forall a. (a -> a -> a) -> [a] -> a forall (t :: * -> *) a. Foldable t => (a -> a -> a) -> t a -> a foldl1 Integer -> Integer -> Integer forall a. Integral a => a -> a -> a lcm [Integer] -lst +lst gcdPoint :: SimplePolygon (Point 2 Rational) -> Rational gcdPoint :: SimplePolygon (Point 2 Rational) -> Rational -gcdPoint SimplePolygon (Point 2 Rational) -p = Integer -> Rational +gcdPoint SimplePolygon (Point 2 Rational) +p = Integer -> Rational forall a b. (Real a, Fractional b) => a -> b realToFrac Integer -t +t where - vs :: [Point 2 Rational] -vs = SimplePolygon (Point 2 Rational) -pSimplePolygon (Point 2 Rational) + vs :: [Point 2 Rational] +vs = SimplePolygon (Point 2 Rational) +pSimplePolygon (Point 2 Rational) -> Getting (Endo [Point 2 Rational]) (SimplePolygon (Point 2 Rational)) @@ -997,35 +997,35 @@ (Vertex (SimplePolygon (Point 2 Rational))) (Vertex (SimplePolygon (Point 2 Rational))) outerBoundary - lst :: [Integer] -lst = (Point 2 Rational -> [Integer]) -> [Point 2 Rational] -> [Integer] + lst :: [Integer] +lst = (Point 2 Rational -> [Integer]) -> [Point 2 Rational] -> [Integer] forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b] -concatMap (\(Point2 Rational -x Rational -y) -> [Rational -> Integer +concatMap (\(Point2 Rational +x Rational +y) -> [Rational -> Integer forall a. Ratio a -> a denominator Rational -x, Rational -> Integer +x, Rational -> Integer forall a. Ratio a -> a denominator Rational -y]) [Point 2 Rational] -vs - t :: Integer -t = (Integer -> Integer -> Integer) -> [Integer] -> Integer +y]) [Point 2 Rational] +vs + t :: Integer +t = (Integer -> Integer -> Integer) -> [Integer] -> Integer forall a. (a -> a -> a) -> [a] -> a forall (t :: * -> *) a. Foldable t => (a -> a -> a) -> t a -> a foldl1 Integer -> Integer -> Integer forall a. Integral a => a -> a -> a gcd [Integer] -lst +lst -- remove vertex i, thereby dropping a vertex cutEarAt :: SimplePolygon (Point 2 Rational) -> Int -> SimplePolygon (Point 2 Rational) cutEarAt :: SimplePolygon (Point 2 Rational) -> Int -> SimplePolygon (Point 2 Rational) -cutEarAt SimplePolygon (Point 2 Rational) -pg Int -i = [Point 2 Rational] -> SimplePolygon (Point 2 Rational) +cutEarAt SimplePolygon (Point 2 Rational) +pg Int +i = [Point 2 Rational] -> SimplePolygon (Point 2 Rational) forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -1033,10 +1033,10 @@ Foldable f => f (Point 2 Rational) -> SimplePolygon (Point 2 Rational) uncheckedFromCCWPoints [Point 2 Rational] -vs +vs where - vs :: [Point 2 Rational] -vs = IndexedGetting + vs :: [Point 2 Rational] +vs = IndexedGetting Int (Endo [Point 2 Rational]) (SimplePolygon (Point 2 Rational)) @@ -1071,54 +1071,54 @@ (SimplePolygon (Point 2 Rational)) (Vertex (SimplePolygon (Point 2 Rational))) (Vertex (SimplePolygon (Point 2 Rational))) -outerBoundary (\Int -j Point 2 Rational -v [Point 2 Rational] -vs' -> if Int -i Int -> Int -> Bool +outerBoundary (\Int +j Point 2 Rational +v [Point 2 Rational] +vs' -> if Int +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -j then [Point 2 Rational] -vs' else Point 2 Rational -vPoint 2 Rational -> [Point 2 Rational] -> [Point 2 Rational] +j then [Point 2 Rational] +vs' else Point 2 Rational +vPoint 2 Rational -> [Point 2 Rational] -> [Point 2 Rational] forall a. a -> [a] -> [a] :[Point 2 Rational] -vs') [] SimplePolygon (Point 2 Rational) -pg +vs') [] SimplePolygon (Point 2 Rational) +pg cutEars :: SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] cutEars :: SimplePolygon (Point 2 Rational) -> [SimplePolygon (Point 2 Rational)] -cutEars SimplePolygon (Point 2 Rational) -pg | SimplePolygon (Point 2 Rational) -> Bool +cutEars
SimplePolygon (Point 2 Rational) +pg | SimplePolygon (Point 2 Rational) -> Bool forall {graph}. HasVertices' graph => graph -> Bool isTriangle SimplePolygon (Point 2 Rational) -pg = [] +pg
= [] | Bool otherwise = [ SimplePolygon (Point 2 Rational) -> Int -> SimplePolygon (Point 2 Rational) cutEarAt SimplePolygon (Point 2 Rational) -pg Int -i | Int -i <- [Int +pg Int +i | Int +i <- [Int 0 .. (Int -n Int -> Int -> Int +n Int -> Int -> Int forall a. Num a => a -> a -> a -Int 1)], Int -> Bool -isEar Int -i ] +isEar Int +i ] where - n :: Int -n = SimplePolygon (Point 2 Rational) -> Int + n :: Int +n = SimplePolygon (Point 2 Rational) -> Int forall graph. HasVertices' graph => graph -> Int numVertices SimplePolygon (Point 2 Rational) -pg - isEar :: Int -> Bool -isEar Int -i = let prev :: Point 2 Rational -prev = SimplePolygon (Point 2 Rational) -pgSimplePolygon (Point 2 Rational) +pg + isEar :: Int -> Bool +isEar Int +i = let prev :: Point 2 Rational +prev = SimplePolygon (Point 2 Rational) +pgSimplePolygon (Point 2 Rational) -> Getting (Point 2 Rational) (SimplePolygon (Point 2 Rational)) @@ -1135,16 +1135,16 @@ VertexIx polygon -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt ((Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n) - cur :: Point 2 Rational -cur = SimplePolygon (Point 2 Rational) -pgSimplePolygon (Point 2 Rational) +n) + cur :: Point 2 Rational +cur = SimplePolygon (Point 2 Rational) +pgSimplePolygon (Point 2 Rational) -> Getting (Point 2 Rational) (SimplePolygon (Point 2 Rational)) @@ -1162,10 +1162,10 @@ -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt Int VertexIx (SimplePolygon (Point 2 Rational)) -i - nxt :: Point 2 Rational -nxt = SimplePolygon (Point 2 Rational) -pgSimplePolygon (Point 2 Rational) +i + nxt :: Point 2 Rational +nxt = SimplePolygon (Point 2 Rational) +pgSimplePolygon (Point 2 Rational) -> Getting (Point 2 Rational) (SimplePolygon (Point 2 Rational)) @@ -1182,32 +1182,32 @@ VertexIx polygon -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt ((Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n) - triangle :: Triangle (Point 2 Rational) -triangle = Point 2 Rational +n) + triangle :: Triangle (Point 2 Rational) +triangle = Point 2 Rational -> Point 2 Rational -> Point 2 Rational -> Triangle (Point 2 Rational) forall point. point -> point -> point -> Triangle point Triangle Point 2 Rational -prev Point 2 Rational -cur Point 2 Rational -nxt +prev Point 2 Rational +cur Point 2 Rational +nxt in Point 2 Rational -> Point 2 Rational -> Point 2 Rational -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw Point 2 Rational -prev Point 2 Rational -cur Point 2 Rational -nxt CCW -> CCW -> Bool +prev Point 2 Rational +cur Point 2 Rational +nxt CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CCW -- left turn. @@ -1233,61 +1233,61 @@ (Vertex (SimplePolygon (Point 2 Rational))) (Vertex (SimplePolygon (Point 2 Rational))) outerBoundary - (\Point 2 Rational -pt -> Point 2 Rational -pt Point 2 Rational -> [Point 2 Rational] -> Bool + (\Point 2 Rational +pt -> Point 2 Rational +pt Point 2 Rational -> [Point 2 Rational] -> Bool forall a. Eq a => a -> [a] -> Bool forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool `elem` [Point 2 Rational -prev,Point 2 Rational -cur,Point 2 Rational -nxt] Bool -> Bool -> Bool +prev,Point 2 Rational +cur,Point 2 Rational +nxt] Bool -> Bool -> Bool || Bool -> Bool not (Point 2 Rational -pt Point 2 Rational -> Triangle (Point 2 Rational) -> Bool +pt Point 2 Rational -> Triangle (Point 2 Rational) -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Triangle (Point 2 Rational) -triangle)) SimplePolygon (Point 2 Rational) -pg +triangle)) SimplePolygon (Point 2 Rational) +pg isTriangle :: graph -> Bool -isTriangle graph -pg = graph -> Int +isTriangle graph +pg = graph -> Int forall graph. HasVertices' graph => graph -> Int numVertices graph -pg Int -> Int -> Bool +pg Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int 3 -instance (Uniform r, Ord r, Num r) => Arbitrary (MonotonePolygon (Point 2 r)) where - arbitrary :: Gen (MonotonePolygon (Point 2 r)) +instance (Uniform r, Ord r, Num r) => Arbitrary (MonotonePolygon (Point 2 r)) where + arbitrary :: Gen (MonotonePolygon (Point 2 r)) arbitrary = do - Int -n <- Int -> Int -> Int + Int +n <- Int -> Int -> Int forall a. Ord a => a -> a -> a max Int 3 (Int -> Int) -> Gen Int -> Gen Int forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Gen Int getSize - StdGen -g <- Int -> StdGen + StdGen +g <- Int -> StdGen mkStdGen (Int -> StdGen) -> Gen Int -> Gen StdGen forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Gen Int forall a. Arbitrary a => Gen a arbitrary - let (Vector 2 r -v, StdGen -g') = State StdGen (Vector 2 r) -> StdGen -> (Vector 2 r, StdGen) + let (Vector 2 r +v, StdGen +g') = State StdGen (Vector 2 r) -> StdGen -> (Vector 2 r, StdGen) forall s a. State s a -> s -> (a, s) runState State StdGen (Vector 2 r) forall g (m :: * -> *) r. (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) => m (Vector 2 r) randomNonZeroVector StdGen -g +g MonotonePolygon (Point 2 r) -> Gen (MonotonePolygon (Point 2 r)) forall a. a -> Gen a forall (f :: * -> *) a. Applicative f => a -> f a @@ -1302,7 +1302,7 @@ (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r)) randomMonotoneDirected Int -n Vector 2 r -v) StdGen -g' +n Vector 2 r +v) StdGen +g' \ No newline at end of file diff --git a/haddocks/hgeometry/quickcheck/src/Paths_hgeometry.html b/haddocks/hgeometry/quickcheck/src/Paths_hgeometry.html index a3dc3be09..62cf6d6e5 100644 --- a/haddocks/hgeometry/quickcheck/src/Paths_hgeometry.html +++ b/haddocks/hgeometry/quickcheck/src/Paths_hgeometry.html @@ -22,7 +22,7 @@ #if defined(VERSION_base) #if MIN_VERSION_base(4,0,0) -catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a +catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a #else catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a #endif @@ -46,18 +46,18 @@ getDataFileName :: FilePath -> IO FilePath getDataFileName :: String -> IO String -getDataFileName String -name = do - String -dir <- IO String +getDataFileName String +name = do + String +dir <- IO String getDataDir String -> IO String forall a. a -> IO a forall (m :: * -> *) a. Monad m => a -> m a return (String -dir String -> String -> String +dir String -> String -> String `joinFileName` String -name) +name) getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath @@ -156,38 +156,38 @@ joinFileName :: String -> String -> FilePath joinFileName :: String -> String -> String joinFileName String -"" String -fname = String -fname +"" String +fname = String +fname joinFileName String -"." String -fname = String -fname -joinFileName String -dir String +"." String +fname = String +fname +joinFileName String +dir String "" = String -dir -joinFileName String -dir String -fname +dir +joinFileName String +dir String +fname | Char -> Bool isPathSeparator (String -> Char forall a. HasCallStack => [a] -> a List.last String -dir) = String -dir String -> String -> String +dir) = String +dir String -> String -> String forall a. [a] -> [a] -> [a] ++ String -fname +fname | Bool otherwise = String -dir String -> String -> String +dir String -> String -> String forall a. [a] -> [a] -> [a] ++ Char pathSeparator Char -> String -> String forall a. a -> [a] -> [a] : String -fname +fname pathSeparator :: Char pathSeparator :: Char @@ -196,9 +196,9 @@ isPathSeparator :: Char -> Bool isPathSeparator :: Char -> Bool -isPathSeparator Char -c = Char -c Char -> Char -> Bool +isPathSeparator Char +c = Char +c Char -> Char -> Bool forall a. Eq a => a -> a -> Bool == Char '/' diff --git a/haddocks/hgeometry/src/HGeometry.BezierSpline.html b/haddocks/hgeometry/src/HGeometry.BezierSpline.html index c37a34315..d2d1d98be 100644 --- a/haddocks/hgeometry/src/HGeometry.BezierSpline.html +++ b/haddocks/hgeometry/src/HGeometry.BezierSpline.html @@ -40,8 +40,8 @@ -- | A Bezier spline. type BezierSplineF :: (Type -> Type) -> Type -> Type -newtype BezierSplineF f point = BezierSpline (f point) - deriving stock ((forall x. BezierSplineF f point -> Rep (BezierSplineF f point) x) +newtype BezierSplineF f point = BezierSpline (f point) + deriving stock ((forall x. BezierSplineF f point -> Rep (BezierSplineF f point) x) -> (forall x. Rep (BezierSplineF f point) x -> BezierSplineF f point) -> Generic (BezierSplineF f point) @@ -59,7 +59,7 @@ $cto :: forall (f :: * -> *) point x. Rep (BezierSplineF f point) x -> BezierSplineF f point to :: forall x. Rep (BezierSplineF f point) x -> BezierSplineF f point -Generic,Int -> BezierSplineF f point -> ShowS +Generic,Int -> BezierSplineF f point -> ShowS [BezierSplineF f point] -> ShowS BezierSplineF f point -> String (Int -> BezierSplineF f point -> ShowS) @@ -90,7 +90,7 @@ [BezierSplineF f point] -> ShowS showList :: [BezierSplineF f point] -> ShowS Show) - deriving newtype (BezierSplineF f point -> () + deriving newtype (BezierSplineF f point -> () (BezierSplineF f point -> ()) -> NFData (BezierSplineF f point) forall a. (a -> ()) -> NFData a forall (f :: * -> *) point. @@ -100,7 +100,7 @@ NFData (f point) => BezierSplineF f point -> () rnf :: BezierSplineF f point -> () -NFData,(forall a b. (a -> b) -> BezierSplineF f a -> BezierSplineF f b) +NFData,(forall a b. (a -> b) -> BezierSplineF f a -> BezierSplineF f b) -> (forall a b. a -> BezierSplineF f b -> BezierSplineF f a) -> Functor (BezierSplineF f) forall a b. a -> BezierSplineF f b -> BezierSplineF f a @@ -122,7 +122,7 @@ Functor f => a -> BezierSplineF f b -> BezierSplineF f a <$ :: forall a b. a -> BezierSplineF f b -> BezierSplineF f a -Functor,(forall m. Monoid m => BezierSplineF f m -> m) +Functor,(forall m. Monoid m => BezierSplineF f m -> m) -> (forall m a. Monoid m => (a -> m) -> BezierSplineF f a -> m) -> (forall m a. Monoid m => (a -> m) -> BezierSplineF f a -> m) -> (forall a b. (a -> b -> b) -> b -> BezierSplineF f a -> b) @@ -259,7 +259,7 @@ (Foldable f, Num a) => BezierSplineF f a -> a product :: forall a. Num a => BezierSplineF f a -> a -Foldable,Foldable (BezierSplineF f) +Foldable,Foldable (BezierSplineF f) Foldable (BezierSplineF f) => (forall m. Semigroup m => BezierSplineF f m -> m) -> (forall m a. Semigroup m => (a -> m) -> BezierSplineF f a -> m) @@ -364,7 +364,7 @@ Foldable1 f => (a -> b) -> (a -> b -> b) -> BezierSplineF f a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> BezierSplineF f a -> b -Foldable1,BezierSplineF f point -> BezierSplineF f point -> Bool +Foldable1,BezierSplineF f point -> BezierSplineF f point -> Bool (BezierSplineF f point -> BezierSplineF f point -> Bool) -> (BezierSplineF f point -> BezierSplineF f point -> Bool) -> Eq (BezierSplineF f point) @@ -380,7 +380,7 @@ Eq (f point) => BezierSplineF f point -> BezierSplineF f point -> Bool /= :: BezierSplineF f point -> BezierSplineF f point -> Bool -Eq,Eq (BezierSplineF f point) +Eq,Eq (BezierSplineF f point) Eq (BezierSplineF f point) => (BezierSplineF f point -> BezierSplineF f point -> Ordering) -> (BezierSplineF f point -> BezierSplineF f point -> Bool) @@ -451,7 +451,7 @@ -> BezierSplineF f point -> BezierSplineF f point min :: BezierSplineF f point -> BezierSplineF f point -> BezierSplineF f point -Ord,(forall a. Eq a => Eq (BezierSplineF f a)) => +Ord,(forall a. Eq a => Eq (BezierSplineF f a)) => (forall a b. (a -> b -> Bool) -> BezierSplineF f a -> BezierSplineF f b -> Bool) -> Eq1 (BezierSplineF f) @@ -470,7 +470,7 @@ (a -> b -> Bool) -> BezierSplineF f a -> BezierSplineF f b -> Bool liftEq :: forall a b. (a -> b -> Bool) -> BezierSplineF f a -> BezierSplineF f b -> Bool -Eq1,Eq1 (BezierSplineF f) +Eq1,Eq1 (BezierSplineF f) (Eq1 (BezierSplineF f), forall a. Ord a => Ord (BezierSplineF f a)) => (forall a b. @@ -508,31 +508,31 @@ -- | Cubic Bezier splines type CubicBezier = BezierSplineF (Vector 4) -type instance Dimension (BezierSplineF f point) = 2 -type instance NumType (BezierSplineF f point) = NumType point +type instance Dimension (BezierSplineF f point) = 2 +type instance NumType (BezierSplineF f point) = NumType point -- | Construct a QuadatricBezier -pattern Bezier2 :: point -> point -> point -> QuadraticBezier point +pattern Bezier2 :: point -> point -> point -> QuadraticBezier point pattern $bBezier2 :: forall point. point -> point -> point -> QuadraticBezier point $mBezier2 :: forall {r} {point}. QuadraticBezier point -> (point -> point -> point -> r) -> ((# #) -> r) -> r -Bezier2 p q r = BezierSpline (Vector3 p q r) +Bezier2 p q r = BezierSpline (Vector3 p q r) {-# COMPLETE Bezier2 #-} -- | Construct a cubic bezier -pattern Bezier3 :: point -> point -> point -> point -> CubicBezier point +pattern Bezier3 :: point -> point -> point -> point -> CubicBezier point pattern $bBezier3 :: forall point. point -> point -> point -> point -> CubicBezier point $mBezier3 :: forall {r} {point}. CubicBezier point -> (point -> point -> point -> point -> r) -> ((# #) -> r) -> r -Bezier3 p q r s = BezierSpline (Vector4 p q r s) +Bezier3 p q r s = BezierSpline (Vector4 p q r s) {-# COMPLETE Bezier3 #-} -- | Access the container -_BezierSplineF :: Iso (BezierSplineF f point) (BezierSplineF f' point') - (f point) (f' point' ) +_BezierSplineF :: Iso (BezierSplineF f point) (BezierSplineF f' point') + (f point) (f' point' ) _BezierSplineF :: forall (f :: * -> *) point (f' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -546,19 +546,19 @@ (f point) (f' point') forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b -iso (\(BezierSpline f point -vs) -> f point -vs) f' point' -> BezierSplineF f' point' +iso (\(BezierSpline f point +vs) -> f point +vs) f' point' -> BezierSplineF f' point' forall (f :: * -> *) point. f point -> BezierSplineF f point BezierSpline -instance Traversable f => Traversable (BezierSplineF f) where - traverse :: forall (f :: * -> *) a b. +instance Traversable f => Traversable (BezierSplineF f) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> BezierSplineF f a -> f (BezierSplineF f b) -traverse a -> f b -f (BezierSpline f a -vs) = f b -> BezierSplineF f b +traverse a -> f b +f (BezierSpline f a +vs) = f b -> BezierSplineF f b forall (f :: * -> *) point. f point -> BezierSplineF f point BezierSpline (f b -> BezierSplineF f b) -> f (f b) -> f (BezierSplineF f b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -570,15 +570,15 @@ Applicative f => (a -> f b) -> f a -> f (f b) traverse a -> f b -f f a -vs -instance Traversable1 f => Traversable1 (BezierSplineF f) where - traverse1 :: forall (f :: * -> *) a b. +f f a +vs +instance Traversable1 f => Traversable1 (BezierSplineF f) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> BezierSplineF f a -> f (BezierSplineF f b) -traverse1 a -> f b -f (BezierSpline f a -vs) = f b -> BezierSplineF f b +traverse1 a -> f b +f (BezierSpline f a +vs) = f b -> BezierSplineF f b forall (f :: * -> *) point. f point -> BezierSplineF f point BezierSpline (f b -> BezierSplineF f b) -> f (f b) -> f (BezierSplineF f b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -588,21 +588,21 @@ (a -> f b) -> t a -> f (t b) forall (f :: * -> *) a b. Apply f => (a -> f b) -> f a -> f (f b) traverse1 a -> f b -f f a -vs +f f a +vs -instance ( Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - ) => HasVertices (BezierSplineF f point) (BezierSplineF f point') where - vertices :: IndexedTraversal1 +instance ( Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + ) => HasVertices (BezierSplineF f point) (BezierSplineF f point') where + vertices :: IndexedTraversal1 (VertexIx (BezierSplineF f point)) (BezierSplineF f point) (BezierSplineF f point') (Vertex (BezierSplineF f point)) (Vertex (BezierSplineF f point')) -vertices = (f point -> f (f point')) +vertices = (f point -> f (f point')) -> BezierSplineF f point -> f (BezierSplineF f point') forall (f :: * -> *) point (f' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). @@ -623,12 +623,12 @@ IndexedTraversal1 Int (f point) (f point') point point' traversed1 -instance ( Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - ) => HasPoints (BezierSplineF f point) (BezierSplineF f point') point point' where - allPoints :: forall (d :: Nat) r r'. +instance ( Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + ) => HasPoints (BezierSplineF f point) (BezierSplineF f point') point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (BezierSplineF f point) ~ r, NumType (BezierSplineF f point') ~ r', @@ -636,7 +636,7 @@ Dimension (BezierSplineF f point') ~ d) => Traversal1 (BezierSplineF f point) (BezierSplineF f point') point point' -allPoints = (f point -> f (f point')) +allPoints = (f point -> f (f point')) -> BezierSplineF f point -> f (BezierSplineF f point') forall (f :: * -> *) point (f' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). @@ -657,35 +657,35 @@ IndexedTraversal1 Int (f point) (f point') point point' traversed1 -instance ( Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - , DefaultTransformByConstraints (BezierSplineF f point) 2 r - , Point_ point 2 r - ) => IsTransformable (BezierSplineF f point) +instance ( Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + , DefaultTransformByConstraints (BezierSplineF f point) 2 r + , Point_ point 2 r + ) => IsTransformable (BezierSplineF f point) -instance ( Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - , Point_ point 2 r - ) => IsBoxable (BezierSplineF f point) +instance ( Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + , Point_ point 2 r + ) => IsBoxable (BezierSplineF f point) -instance ( Traversable1 f - , Ixed (f point) - , IxValue (f point) ~ point - , Index (f point) ~ Int - ) => HasVertices' (BezierSplineF f point) where - type Vertex (BezierSplineF f point) = point - type VertexIx (BezierSplineF f point) = Int - vertexAt :: VertexIx (BezierSplineF f point) +instance ( Traversable1 f + , Ixed (f point) + , IxValue (f point) ~ point + , Index (f point) ~ Int + ) => HasVertices' (BezierSplineF f point) where + type Vertex (BezierSplineF f point) = point + type VertexIx (BezierSplineF f point) = Int + vertexAt :: VertexIx (BezierSplineF f point) -> IndexedTraversal' (VertexIx (BezierSplineF f point)) (BezierSplineF f point) (Vertex (BezierSplineF f point)) -vertexAt VertexIx (BezierSplineF f point) -i = (f point -> f (f point)) +vertexAt VertexIx (BezierSplineF f point) +i = (f point -> f (f point)) -> BezierSplineF f point -> f (BezierSplineF f point) forall (f :: * -> *) point (f' :: * -> *) point' (p :: * -> * -> *) (f :: * -> *). @@ -707,5 +707,5 @@ Index m -> IndexedTraversal' (Index m) m (IxValue m) iix VertexIx (BezierSplineF f point) Index (f point) -i +i \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.ClosestPair.DivideAndConquer.html b/haddocks/hgeometry/src/HGeometry.ClosestPair.DivideAndConquer.html index d20df5c05..87cd9f614 100644 --- a/haddocks/hgeometry/src/HGeometry.ClosestPair.DivideAndConquer.html +++ b/haddocks/hgeometry/src/HGeometry.ClosestPair.DivideAndConquer.html @@ -42,14 +42,14 @@ -- pre: input contains at least two points -- -- running time: \(O(n \log n)\) -closestPair :: ( Ord r, Num r, Point_ point 2 r, Foldable1 f) - => f point -> Vector 2 point +closestPair :: ( Ord r, Num r, Point_ point 2 r, Foldable1 f) + => f point -> Vector 2 point closestPair :: forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> Vector 2 point closestPair = CCP point -> Vector 2 point forall {r}. CCP r -> Vector 2 r -f +f (CCP point -> Vector 2 point) -> (f point -> CCP point) -> f point -> Vector 2 point forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -59,7 +59,7 @@ (a -> s) -> f a -> s divideAndConquer1 point -> CCP point forall {point}. point -> CCP point -mkCCP +mkCCP (NonEmptyVector point -> CCP point) -> (f point -> NonEmptyVector point) -> f point -> CCP point forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -82,27 +82,27 @@ Lens' point (Point 2 r) asPoint) where - mkCCP :: point -> CCP point -mkCCP point -p = NonEmpty point -> CP point -> CCP point + mkCCP :: point -> CCP point +mkCCP point +p = NonEmpty point -> CP point -> CCP point forall point. NonEmpty point -> CP point -> CCP point CCP (point -p point -> [point] -> NonEmpty point +p point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :| []) CP point forall a. Top a Top - f :: CCP r -> Vector 2 r -f = \case + f :: CCP r -> Vector 2 r +f = \case CCP NonEmpty r -_ (ValT (SP (Two r -p r -q) NumType r +_ (ValT (SP (Two r +p r +q) NumType r _)) -> r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r -p r -q +p r +q CCP NonEmpty r _ CP r Top -> [Char] -> Vector 2 r @@ -112,29 +112,29 @@ -- | the closest pair and its (squared) distance -type CP point = Top (SP (Two point) (NumType point)) +type CP point = Top (SP (Two point) (NumType point)) -- | Type used in the closest pair computation. The fields represent the points -- ordered on increasing y-order and the closest pair (if we know it) -data CCP point = CCP (NonEmpty point) !(CP point) +data CCP point = CCP (NonEmpty point) !(CP point) -- deriving (Show,Eq) -instance (Num r, Ord r, Point_ point 2 r) => Semigroup (CCP point) where - (CCP NonEmpty point -ptsl CP point -cpl) <> :: CCP point -> CCP point -> CCP point -<> (CCP NonEmpty point -ptsr CP point -cpr) = NonEmpty point -> CP point -> CCP point +instance (Num r, Ord r, Point_ point 2 r) => Semigroup (CCP point) where + (CCP NonEmpty point +ptsl CP point +cpl) <> :: CCP point -> CCP point -> CCP point +<> (CCP NonEmpty point +ptsr CP point +cpr) = NonEmpty point -> CP point -> CCP point forall point. NonEmpty point -> CP point -> CCP point CCP ((point -> point -> Ordering) -> NonEmpty point -> NonEmpty point -> NonEmpty point forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a -> NonEmpty a mergeSortedBy point -> point -> Ordering -cmp NonEmpty point -ptsl NonEmpty point -ptsr) +cmp NonEmpty point +ptsl NonEmpty point +ptsr) (CP point -> NonEmpty point -> NonEmpty point -> CP point forall point r. (Ord r, Num r, Point_ point 2 r) => @@ -149,18 +149,18 @@ forall point. CP point -> Top (NumType point) getDist Top (SP (Two point) r) CP point -cpl Top (SP (Two point) r) +cpl Top (SP (Two point) r) CP point -cpr) NonEmpty point -ptsl NonEmpty point -ptsr) +cpr) NonEmpty point +ptsl NonEmpty point +ptsr) where -- compare on y first then on x - cmp :: point -> point -> Ordering - cmp :: point -> point -> Ordering -cmp point -p point -q = (point -> r) -> point -> point -> Ordering + cmp :: point -> point -> Ordering + cmp :: point -> point -> Ordering +cmp point +p point +q = (point -> r) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (point -> Getting r point r -> r forall s a. s -> Getting a s a -> a @@ -170,8 +170,8 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) point -p point -q Ordering -> Ordering -> Ordering +p point +q Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> (point -> r) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering @@ -183,112 +183,112 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) point -p point -q +p point +q -- | Function that does the actual merging work -mergePairs :: forall point r. (Ord r, Num r, Point_ point 2 r) - => CP point -- ^ current closest pair and its dist - -> NonEmpty point -- ^ pts on the left - -> NonEmpty point -- ^ pts on the right - -> CP point +mergePairs :: forall point r. (Ord r, Num r, Point_ point 2 r) + => CP point -- ^ current closest pair and its dist + -> NonEmpty point -- ^ pts on the left + -> NonEmpty point -- ^ pts on the right + -> CP point mergePairs :: forall point r. (Ord r, Num r, Point_ point 2 r) => CP point -> NonEmpty point -> NonEmpty point -> CP point -mergePairs CP point -cp' NonEmpty point -ls' NonEmpty point -rs' = CP point -> [point] -> [point] -> CP point -go CP point -cp' (NonEmpty point -> [point] +mergePairs CP point +cp' NonEmpty point +ls' NonEmpty point +rs' = CP point -> [point] -> [point] -> CP point +go CP point +cp' (NonEmpty point -> [point] forall a. NonEmpty a -> [a] NonEmpty.toList NonEmpty point -ls') (NonEmpty point -> [point] +ls') (NonEmpty point -> [point] forall a. NonEmpty a -> [a] NonEmpty.toList NonEmpty point -rs') +rs') where -- scan through the points on the right in increasing order. - go :: CP point -> [point] -> [point] - -> CP point - go :: CP point -> [point] -> [point] -> CP point -go CP point -cp [point] + go :: CP point -> [point] -> [point] + -> CP point + go :: CP point -> [point] -> [point] -> CP point +go CP point +cp [point] _ [] = CP point -cp - go CP point -cp [point] -ls (point -r:[point] -rs) = let ls'' :: [point] -ls'' = Top r -> [point] -> point -> [point] +cp + go CP point +cp [point] +ls (point +r:[point] +rs) = let ls'' :: [point] +ls'' = Top r -> [point] -> point -> [point] forall r point. (Ord r, Num r, Point_ point 2 r) => Top r -> [point] -> point -> [point] trim (CP point -> Top (NumType point) forall point. CP point -> Top (NumType point) getDist CP point -cp) [point] -ls point -r - cp'' :: CP point -cp'' = CP point -> point -> [point] -> CP point +cp) [point] +ls point +r + cp'' :: CP point +cp'' = CP point -> point -> [point] -> CP point forall r point. (Ord r, Num r, Point_ point 2 r) => CP point -> point -> [point] -> CP point run CP point -cp point -r [point] -ls'' -- try to find a new closer pair with r. +cp point +r [point] +ls'' -- try to find a new closer pair with r. in CP point -> [point] -> [point] -> CP point -go CP point -cp'' [point] -ls'' [point] -rs -- and then process the remaining points +go CP point +cp'' [point] +ls'' [point] +rs -- and then process the remaining points -- | ditch the points on the left that are too low anyway -trim :: (Ord r, Num r, Point_ point 2 r) - => Top r -> [point] -> point - -> [point] +trim :: (Ord r, Num r, Point_ point 2 r) + => Top r -> [point] -> point + -> [point] trim :: forall r point. (Ord r, Num r, Point_ point 2 r) => Top r -> [point] -> point -> [point] -trim (ValT r -d) [point] -ls point -r = (point -> Bool) -> [point] -> [point] +trim (ValT r +d) [point] +ls point +r = (point -> Bool) -> [point] -> [point] forall a. (a -> Bool) -> [a] -> [a] -List.dropWhile (\point -l -> point -> point -> r +List.dropWhile (\point +l -> point -> point -> r forall r point. (Ord r, Num r, Point_ point 2 r) => point -> point -> r sqVertDist point -l point -r r -> r -> Bool +l point +r r -> r -> Bool forall a. Ord a => a -> a -> Bool > r -d) [point] -ls +d) [point] +ls trim Top r -_ [point] -ls point +_ [point] +ls point _ = [point] -ls +ls -- | the squared vertical distance (in case r lies above l) or 0 otherwise -sqVertDist :: (Ord r, Num r, Point_ point 2 r) => point -> point -> r +sqVertDist :: (Ord r, Num r, Point_ point 2 r) => point -> point -> r sqVertDist :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> point -> r -sqVertDist point -l point -r = let d :: r -d = r +sqVertDist point +l point +r = let d :: r +d = r 0 r -> r -> r forall a. Ord a => a -> a -> a `max` (point -rpoint -> Getting r point r -> r +rpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -298,7 +298,7 @@ yCoord r -> r -> r forall a. Num a => a -> a -> a - point -lpoint -> Getting r point r -> r +lpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -306,23 +306,23 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) in r -dr -> r -> r +dr -> r -> r forall a. Num a => a -> a -> a *r -d +d -- | try and find a new closest pair with r. If we get to points that are too -- far above r we stop (since none of those points will be closer to r anyway) -run :: (Ord r, Num r, Point_ point 2 r) - => CP point -> point -> [point] - -> CP point +run :: (Ord r, Num r, Point_ point 2 r) + => CP point -> point -> [point] + -> CP point run :: forall r point. (Ord r, Num r, Point_ point 2 r) => CP point -> point -> [point] -> CP point -run CP point -cp'' point -r [point] -ls = +run CP point +cp'' point +r [point] +ls = Top (SP (Two point) r) -> [point] -> (Top (SP (Two point) r) -> point -> Bool) @@ -331,29 +331,29 @@ forall s a. s -> [a] -> (s -> a -> Bool) -> (s -> a -> s) -> s runWhile Top (SP (Two point) r) CP point -cp'' [point] -ls - (\Top (SP (Two point) r) -cp point -l -> NumType point -> Top (NumType point) +cp'' [point] +ls + (\Top (SP (Two point) r) +cp point +l -> NumType point -> Top (NumType point) forall a. a -> Top a ValT (point -> point -> NumType point forall r point. (Ord r, Num r, Point_ point 2 r) => point -> point -> r sqVertDist point -r point -l) Top (NumType point) -> Top (NumType point) -> Bool +r point +l) Top (NumType point) -> Top (NumType point) -> Bool forall a. Ord a => a -> a -> Bool < CP point -> Top (NumType point) forall point. CP point -> Top (NumType point) getDist Top (SP (Two point) r) CP point -cp) -- r and l inverted +cp) -- r and l inverted -- by design - (\Top (SP (Two point) r) -cp point -l -> (Top (SP (Two point) r) -> Top r) + (\Top (SP (Two point) r) +cp point +l -> (Top (SP (Two point) r) -> Top r) -> Top (SP (Two point) r) -> Top (SP (Two point) r) -> Top (SP (Two point) r) @@ -362,7 +362,7 @@ CP point -> Top (NumType point) forall point. CP point -> Top (NumType point) getDist Top (SP (Two point) r) -cp (SP (Two point) r -> Top (SP (Two point) r) +cp (SP (Two point) r -> Top (SP (Two point) r) forall a. a -> Top a ValT (SP (Two point) r -> Top (SP (Two point) r)) -> SP (Two point) r -> Top (SP (Two point) r) @@ -372,69 +372,69 @@ SP (point -> point -> Two point forall a. a -> a -> Two a Two point -l point -r) (point -> point -> r +l point +r) (point -> point -> r forall r point (d :: Nat) point'. (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r squaredEuclideanDist point -l point -r))) +l point +r))) -- | Given some function that decides when to keep things while maintaining some state. -runWhile :: s -> [a] -> (s -> a -> Bool) -> (s -> a -> s) -> s +runWhile :: s -> [a] -> (s -> a -> Bool) -> (s -> a -> s) -> s runWhile :: forall s a. s -> [a] -> (s -> a -> Bool) -> (s -> a -> s) -> s -runWhile s -s' [a] -ys s -> a -> Bool -p s -> a -> s -f = s -> [a] -> s -go s -s' [a] -ys +runWhile s +s' [a] +ys s -> a -> Bool +p s -> a -> s +f = s -> [a] -> s +go s +s' [a] +ys where - go :: s -> [a] -> s -go s -s [] = s -s - go s -s (a -x:[a] -xs) | s -> a -> Bool -p s -s a -x = s -> [a] -> s -go (s -> a -> s -f s -s a -x) [a] -xs -- continue with new state + go :: s -> [a] -> s +go s +s [] = s +s + go s +s (a +x:[a] +xs) | s -> a -> Bool +p s +s a +x = s -> [a] -> s +go (s -> a -> s +f s +s a +x) [a] +xs -- continue with new state | Bool otherwise = s -s -- stop, return the current state +s -- stop, return the current state -- | returns the minimum element according to some function. -minBy :: Ord b => (a -> b) -> a -> a -> a +minBy :: Ord b => (a -> b) -> a -> a -> a minBy :: forall b a. Ord b => (a -> b) -> a -> a -> a -minBy a -> b -f a -a a -b | a -> b -f a -a b -> b -> Bool +minBy a -> b +f a +a a +b | a -> b +f a +a b -> b -> Bool forall a. Ord a => a -> a -> Bool < a -> b -f a -b = a -a +f a +b = a +a | Bool otherwise = a -b +b -- | Get the distance of a (candidate) closest pair -getDist :: CP point -> Top (NumType point) +getDist :: CP point -> Top (NumType point) getDist :: forall point. CP point -> Top (NumType point) getDist = (SP (Two point) (NumType point) -> NumType point) -> Top (SP (Two point) (NumType point)) -> Top (NumType point) diff --git a/haddocks/hgeometry/src/HGeometry.ClosestPair.Naive.html b/haddocks/hgeometry/src/HGeometry.ClosestPair.Naive.html index d45b419bf..71f4bf800 100644 --- a/haddocks/hgeometry/src/HGeometry.ClosestPair.Naive.html +++ b/haddocks/hgeometry/src/HGeometry.ClosestPair.Naive.html @@ -34,8 +34,8 @@ -- pre: there are at least two! points in the input -- -- running time: \(O(dn^2)\) time. -closestPair :: ( Ord r, Num r, Point_ point d r, Foldable1 f, Has_ Metric_ d r) - => f point -> Vector 2 point +closestPair :: ( Ord r, Num r, Point_ point d r, Foldable1 f, Has_ Metric_ d r) + => f point -> Vector 2 point closestPair :: forall r point (d :: Nat) (f :: * -> *). (Ord r, Num r, Point_ point d r, Foldable1 f, Has_ Metric_ d r) => f point -> Vector 2 point @@ -67,7 +67,7 @@ squaredEuclideanDist -- | A distance function between geometries of type 'g' -type DistanceFunction g = g -> g -> NumType g +type DistanceFunction g = g -> g -> NumType g -- | Naive algorithm to compute the closest pair of points (and the -- distance realized by those points) given a distance function. Note @@ -75,16 +75,16 @@ -- -- running time: \(O(T(d)n^2)\), where \(T(d)\) is the time required -- to evaluate the distance between two points in \(\mathbb{R}^d\). -closestPairWith :: (Ord r, Point_ point d r, Foldable1 f) - => DistanceFunction point - -> f point -> SP (Vector 2 point) r +closestPairWith :: (Ord r, Point_ point d r, Foldable1 f) + => DistanceFunction point + -> f point -> SP (Vector 2 point) r closestPairWith :: forall r point (d :: Nat) (f :: * -> *). (Ord r, Point_ point d r, Foldable1 f) => DistanceFunction point -> f point -> SP (Vector 2 point) r -closestPairWith DistanceFunction point -d = Arg r (Vector 2 point) -> SP (Vector 2 point) r +closestPairWith DistanceFunction point +d = Arg r (Vector 2 point) -> SP (Vector 2 point) r forall {b} {a}. Arg b a -> SP a b -getVal (Arg r (Vector 2 point) -> SP (Vector 2 point) r) +getVal (Arg r (Vector 2 point) -> SP (Vector 2 point) r) -> (f point -> Arg r (Vector 2 point)) -> f point -> SP (Vector 2 point) r @@ -110,7 +110,7 @@ forall a b. (a -> b) -> NonEmpty a -> NonEmpty b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap Two point -> Min (Arg r (Vector 2 point)) -mkPair (NonEmpty (Two point) -> NonEmpty (Min (Arg r (Vector 2 point)))) +mkPair (NonEmpty (Two point) -> NonEmpty (Min (Arg r (Vector 2 point)))) -> (f point -> NonEmpty (Two point)) -> f point -> NonEmpty (Min (Arg r (Vector 2 point))) @@ -119,33 +119,33 @@ forall (f :: * -> *) a. Foldable1 f => f a -> NonEmpty (Two a) pairs where - getVal :: Arg b a -> SP a b -getVal (Arg b -dist a -x) = a -> b -> SP a b + getVal :: Arg b a -> SP a b +getVal (Arg b +dist a +x) = a -> b -> SP a b forall a b. a -> b -> SP a b SP a -x b -dist - mkPair :: Two point -> Min (Arg r (Vector 2 point)) -mkPair (Two point -p point -q) = Arg r (Vector 2 point) -> Min (Arg r (Vector 2 point)) +x b +dist + mkPair :: Two point -> Min (Arg r (Vector 2 point)) +mkPair (Two point +p point +q) = Arg r (Vector 2 point) -> Min (Arg r (Vector 2 point)) forall a. a -> Min a Min (r -> Vector 2 point -> Arg r (Vector 2 point) forall a b. a -> b -> Arg a b Arg (DistanceFunction point -d point -p point -q) (point -> point -> Vector 2 point +d point +p point +q) (point -> point -> Vector 2 point forall r. r -> r -> Vector 2 r Vector2 point -p point -q)) +p point +q)) -- | Produce all lists from a vec of elements. Since the Vec contains at least two -- elements, the resulting list is non-empty -pairs :: Foldable1 f => f a -> NonEmpty.NonEmpty (Two a) +pairs :: Foldable1 f => f a -> NonEmpty.NonEmpty (Two a) pairs :: forall (f :: * -> *) a. Foldable1 f => f a -> NonEmpty (Two a) pairs = [Two a] -> NonEmpty (Two a) forall a. HasCallStack => [a] -> NonEmpty a diff --git a/haddocks/hgeometry/src/HGeometry.ConvexHull.DivideAndConquer.html b/haddocks/hgeometry/src/HGeometry.ConvexHull.DivideAndConquer.html index 35bcf0357..6d4935ae1 100644 --- a/haddocks/hgeometry/src/HGeometry.ConvexHull.DivideAndConquer.html +++ b/haddocks/hgeometry/src/HGeometry.ConvexHull.DivideAndConquer.html @@ -29,14 +29,14 @@ -------------------------------------------------------------------------------- -- | \(O(n \log n)\) time ConvexHull using divide and conquer. -convexHull :: (Ord r, Num r, Point_ point 2 r) - => NonEmpty point -> ConvexPolygon point +convexHull :: (Ord r, Num r, Point_ point 2 r) + => NonEmpty point -> ConvexPolygon point -- convexHull (p :| []) = ConvexPolygon . unsafeFromPoints $ [p] convexHull :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point -convexHull NonEmpty point -pts = (NonEmpty point, NonEmpty point) -> ConvexPolygon point +convexHull NonEmpty point +pts = (NonEmpty point, NonEmpty point) -> ConvexPolygon point (NonEmpty (Vertex (ConvexPolygon point)), NonEmpty (Vertex (ConvexPolygon point))) -> ConvexPolygon point @@ -48,7 +48,7 @@ (NumType (Vertex simplePolygon))) => (NonEmpty (Vertex simplePolygon), NonEmpty (Vertex simplePolygon)) -> simplePolygon -combine ((NonEmpty point, NonEmpty point) -> ConvexPolygon point) +combine ((NonEmpty point, NonEmpty point) -> ConvexPolygon point) -> (NonEmpty point -> (NonEmpty point, NonEmpty point)) -> NonEmpty point -> ConvexPolygon point @@ -84,17 +84,17 @@ -> NonEmpty point -> ConvexPolygon point forall a b. (a -> b) -> a -> b $ NonEmpty point -pts +pts where - combine :: (NonEmpty (Vertex simplePolygon), NonEmpty (Vertex simplePolygon)) + combine :: (NonEmpty (Vertex simplePolygon), NonEmpty (Vertex simplePolygon)) -> simplePolygon -combine (NonEmpty (Vertex simplePolygon) -> NonEmpty (Vertex simplePolygon) +combine (NonEmpty (Vertex simplePolygon) -> NonEmpty (Vertex simplePolygon) forall a. NonEmpty a -> NonEmpty a NonEmpty.reverse -> Vertex simplePolygon -_:|[Vertex simplePolygon] -uh, Vertex simplePolygon -_:|[Vertex simplePolygon] -lh) = [Vertex simplePolygon] -> simplePolygon +_:|[Vertex simplePolygon] +uh, Vertex simplePolygon +_:|[Vertex simplePolygon] +lh) = [Vertex simplePolygon] -> simplePolygon forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -105,11 +105,11 @@ -> [Vertex simplePolygon] -> simplePolygon forall a b. (a -> b) -> a -> b $ [Vertex simplePolygon] -lh [Vertex simplePolygon] +lh [Vertex simplePolygon] -> [Vertex simplePolygon] -> [Vertex simplePolygon] forall a. Semigroup a => a -> a -> a <> [Vertex simplePolygon] -uh +uh @@ -118,8 +118,8 @@ -- | \(O(n \log n)\) time LowerHull using divide and conquer. The resulting Hull is -- given from left to right, i.e. in counter clockwise order. -lowerHull :: (Ord r, Num r, Point_ point 2 r) - => NonEmpty point -> NonEmpty point +lowerHull :: (Ord r, Num r, Point_ point 2 r) + => NonEmpty point -> NonEmpty point lowerHull :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -140,7 +140,7 @@ point -> point -> Ordering incXdecY -lowerHull' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +lowerHull' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point lowerHull' :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -162,8 +162,8 @@ forall a. a -> [a] -> NonEmpty a :|[])) -newtype LH point = LH { forall point. LH point -> NonEmpty point -unLH :: NonEmpty point } deriving (LH point -> LH point -> Bool +newtype LH point = LH { forall point. LH point -> NonEmpty point +unLH :: NonEmpty point } deriving (LH point -> LH point -> Bool (LH point -> LH point -> Bool) -> (LH point -> LH point -> Bool) -> Eq (LH point) forall point. Eq point => LH point -> LH point -> Bool @@ -172,7 +172,7 @@ == :: LH point -> LH point -> Bool $c/= :: forall point. Eq point => LH point -> LH point -> Bool /= :: LH point -> LH point -> Bool -Eq,Int -> LH point -> ShowS +Eq,Int -> LH point -> ShowS [LH point] -> ShowS LH point -> String (Int -> LH point -> ShowS) @@ -190,11 +190,11 @@ showList :: [LH point] -> ShowS Show) -instance (Point_ point 2 r, Num r, Ord r) => Semigroup (LH point) where - (LH NonEmpty point -lh) <> :: LH point -> LH point -> LH point -<> (LH NonEmpty point -rh) = NonEmpty point -> LH point +instance (Point_ point 2 r, Num r, Ord r) => Semigroup (LH point) where + (LH NonEmpty point +lh) <> :: LH point -> LH point -> LH point +<> (LH NonEmpty point +rh) = NonEmpty point -> LH point forall point. NonEmpty point -> LH point LH (NonEmpty point -> LH point) -> NonEmpty point -> LH point forall a b. (a -> b) -> a -> b @@ -208,15 +208,15 @@ (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point]) lowerTangent' NonEmpty point -lh NonEmpty point -rh +lh NonEmpty point +rh ---------------------------------------- -- * Computing an upper hull -- | \(O(n \log n)\) time UpperHull using divide and conquer. The resulting Hull is -- given from left to right, i.e. in clockwise order. -upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHull :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -237,7 +237,7 @@ point -> point -> Ordering incXdecY -upperHull' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +upperHull' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHull' :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -259,14 +259,14 @@ forall a. a -> [a] -> NonEmpty a :|[])) -newtype UH point = UH { forall point. UH point -> NonEmpty point -unUH :: NonEmpty point } +newtype UH point = UH { forall point. UH point -> NonEmpty point +unUH :: NonEmpty point } -instance ( Point_ point 2 r, Num r, Ord r) => Semigroup (UH point) where - (UH NonEmpty point -lh) <> :: UH point -> UH point -> UH point -<> (UH NonEmpty point -rh) = NonEmpty point -> UH point +instance ( Point_ point 2 r, Num r, Ord r) => Semigroup (UH point) where + (UH NonEmpty point +lh) <> :: UH point -> UH point -> UH point +<> (UH NonEmpty point +rh) = NonEmpty point -> UH point forall point. NonEmpty point -> UH point UH (NonEmpty point -> UH point) -> NonEmpty point -> UH point forall a b. (a -> b) -> a -> b @@ -280,30 +280,30 @@ (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point]) upperTangent' NonEmpty point -lh NonEmpty point -rh +lh NonEmpty point +rh ---------------------------------------- -- | The function that does the actual merging part -hull :: (NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point])) - -> NonEmpty point -> NonEmpty point -> NonEmpty point +hull :: (NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point])) + -> NonEmpty point -> NonEmpty point -> NonEmpty point hull :: forall point. (NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point])) -> NonEmpty point -> NonEmpty point -> NonEmpty point -hull NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) -tangent NonEmpty point -lh NonEmpty point -rh = let Vector2 (point -l :+ [point] -lh') (point -r :+ [point] -rh') = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) -tangent (NonEmpty point -> NonEmpty point +hull NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) +tangent NonEmpty point +lh NonEmpty point +rh = let Vector2 (point +l :+ [point] +lh') (point +r :+ [point] +rh') = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) +tangent (NonEmpty point -> NonEmpty point forall a. NonEmpty a -> NonEmpty a NonEmpty.reverse NonEmpty point -lh) NonEmpty point -rh +lh) NonEmpty point +rh in [point] -> NonEmpty point forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList ([point] -> NonEmpty point) -> [point] -> NonEmpty point @@ -311,34 +311,34 @@ $ [point] -> [point] forall a. [a] -> [a] reverse [point] -lh' [point] -> [point] -> [point] +lh' [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point -l,point -r] [point] -> [point] -> [point] +l,point +r] [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point] -rh' +rh' -------------------------------------------------------------------------------- -incXdecY :: (Ord r, Point_ point 2 r) => point -> point -> Ordering +incXdecY :: (Ord r, Point_ point 2 r) => point -> point -> Ordering incXdecY :: forall r point. (Ord r, Point_ point 2 r) => point -> point -> Ordering -incXdecY (Point2_ r -px r -py) (Point2_ r -qx r -qy) = r -> r -> Ordering +incXdecY (Point2_ r +px r +py) (Point2_ r +qx r +qy) = r -> r -> Ordering forall a. Ord a => a -> a -> Ordering compare r -px r -qx Ordering -> Ordering -> Ordering +px r +qx Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> r -> r -> Ordering forall a. Ord a => a -> a -> Ordering compare r -qy r -py +qy r +py \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.ConvexHull.GrahamScan.html b/haddocks/hgeometry/src/HGeometry.ConvexHull.GrahamScan.html index aa516bc26..b07feb891 100644 --- a/haddocks/hgeometry/src/HGeometry.ConvexHull.GrahamScan.html +++ b/haddocks/hgeometry/src/HGeometry.ConvexHull.GrahamScan.html @@ -29,14 +29,14 @@ -- | \(O(n \log n)\) time ConvexHull using Graham-Scan. -- -- pre: input contains at least three points -convexHull :: (Ord r, Num r, Point_ point 2 r) - => NonEmpty point -> ConvexPolygon point +convexHull :: (Ord r, Num r, Point_ point 2 r) + => NonEmpty point -> ConvexPolygon point convexHull :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point -convexHull NonEmpty point -ps = let ps' :: [point] -ps' = Vector point -> [point] +convexHull NonEmpty point +ps = let ps' :: [point] +ps' = Vector point -> [point] forall a. Vector a -> [a] Vector.toList (Vector point -> [point]) -> (NonEmpty point -> Vector point) -> NonEmpty point -> [point] @@ -52,9 +52,9 @@ incXdecY (NonEmpty point -> [point]) -> NonEmpty point -> [point] forall a b. (a -> b) -> a -> b $ NonEmpty point -ps - uh :: [point] -uh = NonEmpty point -> [point] +ps + uh :: [point] +uh = NonEmpty point -> [point] forall a. NonEmpty a -> [a] NonEmpty.tail (NonEmpty point -> [point]) -> ([point] -> NonEmpty point) -> [point] -> [point] @@ -66,9 +66,9 @@ hull' ([point] -> [point]) -> [point] -> [point] forall a b. (a -> b) -> a -> b $ [point] -ps' - lh :: [point] -lh = NonEmpty point -> [point] +ps' + lh :: [point] +lh = NonEmpty point -> [point] forall a. NonEmpty a -> [a] NonEmpty.tail (NonEmpty point -> [point]) -> ([point] -> NonEmpty point) -> [point] -> [point] @@ -82,7 +82,7 @@ $ [point] -> [point] forall a. [a] -> [a] reverse [point] -ps' +ps' in [point] -> ConvexPolygon point forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => @@ -91,10 +91,10 @@ uncheckedFromCCWPoints ([point] -> ConvexPolygon point) -> [point] -> ConvexPolygon point forall a b. (a -> b) -> a -> b $ [point] -lh [point] -> [point] -> [point] +lh [point] -> [point] -> [point] forall a. [a] -> [a] -> [a] ++ [point] -uh +uh -- | Computes the upper hull. The upper hull is given from left to right. -- @@ -106,7 +106,7 @@ -- vertical. Use 'upperHull'' if such an edge should not be reported. -- -- running time: \(O(n\log n)\) -upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +upperHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHull :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -130,8 +130,8 @@ -- -- The upper hull is given from left to right -- -upperHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f - ) => f point -> NonEmpty point +upperHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f + ) => f point -> NonEmpty point upperHull' :: forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point @@ -166,21 +166,21 @@ -- -- Tests if the first two points are on a vertical line, if so removes -- the first point. -dropVertical :: (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +dropVertical :: (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point dropVertical :: forall r point. (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point dropVertical = \case - h :: NonEmpty point -h@(point + h :: NonEmpty point +h@(point _ :| []) -> NonEmpty point -h - h :: NonEmpty point -h@(point -p :| (point -q : [point] -rest)) | point -ppoint -> Getting r point r -> r +h + h :: NonEmpty point +h@(point +p :| (point +q : [point] +rest)) | point +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -190,7 +190,7 @@ xCoord r -> r -> Bool forall a. Eq a => a -> a -> Bool == point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -198,13 +198,13 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord -> point -q point -> [point] -> NonEmpty point +q point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :| [point] -rest +rest | Bool otherwise -> NonEmpty point -h +h --{-# INLINABLE dropVertical #-} -- | Computes the upper hull. The upper hull is given from left to right. @@ -217,7 +217,7 @@ -- vertical. Use 'lowerHull'' if such an edge should not be reported. -- -- running time: \(O(n\log n)\) -lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +lowerHull :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point lowerHull :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -233,7 +233,7 @@ -- | Computes the lower hull, making sure there are no vertical -- segments. (Note that the only such segment could be the first -- segment). -lowerHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point +lowerHull' :: (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point lowerHull' :: forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point @@ -261,20 +261,20 @@ -- | Helper function so that that can compute both the upper or the lower hull, depending -- on the function f -hull :: (Ord r, Num r, Point_ point 2 r) - => ([point] -> [point]) - -> NonEmpty point -> NonEmpty point +hull :: (Ord r, Num r, Point_ point 2 r) + => ([point] -> [point]) + -> NonEmpty point -> NonEmpty point hull :: forall r point. (Ord r, Num r, Point_ point 2 r) => ([point] -> [point]) -> NonEmpty point -> NonEmpty point hull [point] -> [point] -_ h :: NonEmpty point -h@(point +_ h :: NonEmpty point +h@(point _ :| []) = NonEmpty point -h -hull [point] -> [point] -f NonEmpty point -pts = [point] -> NonEmpty point +h +hull [point] -> [point] +f NonEmpty point +pts = [point] -> NonEmpty point forall r point. (Ord r, Num r, Point_ point 2 r) => [point] -> NonEmpty point @@ -282,7 +282,7 @@ -> (NonEmpty point -> [point]) -> NonEmpty point -> NonEmpty point forall b c a. (b -> c) -> (a -> b) -> a -> c . [point] -> [point] -f +f ([point] -> [point]) -> (NonEmpty point -> [point]) -> NonEmpty point -> [point] forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -303,28 +303,28 @@ -> NonEmpty point -> NonEmpty point forall a b. (a -> b) -> a -> b $ NonEmpty point -pts +pts --{-# INLINABLE hull #-} -incXdecY :: (Ord r, Point_ point 2 r) => point -> point -> Ordering +incXdecY :: (Ord r, Point_ point 2 r) => point -> point -> Ordering incXdecY :: forall r point. (Ord r, Point_ point 2 r) => point -> point -> Ordering -incXdecY (Point2_ r -px r -py) (Point2_ r -qx r -qy) = r -> r -> Ordering +incXdecY (Point2_ r +px r +py) (Point2_ r +qx r +qy) = r -> r -> Ordering forall a. Ord a => a -> a -> Ordering compare r -px r -qx Ordering -> Ordering -> Ordering +px r +qx Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> r -> r -> Ordering forall a. Ord a => a -> a -> Ordering compare r -qy r -py +qy r +py -- note that we flipped the order of qy and py -- | Given a sequence of points that is sorted on increasing @@ -340,17 +340,17 @@ -- returned *from right to left* !!! -- -- running time: \(O(n)\). -upperHullFromSorted :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +upperHullFromSorted :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHullFromSorted :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHullFromSorted = \case - h :: NonEmpty point -h@(point + h :: NonEmpty point +h@(point _ :| []) -> NonEmpty point -h - NonEmpty point -pts -> [point] -> NonEmpty point +h + NonEmpty point +pts -> [point] -> NonEmpty point forall r point. (Ord r, Num r, Point_ point 2 r) => [point] -> NonEmpty point @@ -359,7 +359,7 @@ $ NonEmpty point -> [point] forall a. NonEmpty a -> [a] NonEmpty.toList NonEmpty point -pts +pts --{-# INLINABLE upperHullFromSorted #-} @@ -367,7 +367,7 @@ -- -- -- running time: \(O(n)\). -upperHullFromSorted' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +upperHullFromSorted' :: (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHullFromSorted' :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -389,14 +389,14 @@ -- | Precondition: The list of input points is sorted -hull' :: (Ord r, Num r, Point_ point 2 r) => [point] -> NonEmpty point +hull' :: (Ord r, Num r, Point_ point 2 r) => [point] -> NonEmpty point hull' :: forall r point. (Ord r, Num r, Point_ point 2 r) => [point] -> NonEmpty point -hull' (point -a:point -b:[point] -ps) = [point] -> NonEmpty point +hull' (point +a:point +b:[point] +ps) = [point] -> NonEmpty point forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList ([point] -> NonEmpty point) -> [point] -> NonEmpty point forall a b. (a -> b) -> a -> b @@ -405,63 +405,63 @@ (Dimension a ~ 2, Ord (NumType a), Num (NumType a), Point_ a 2 (NumType a)) => [a] -> [a] -> [a] -hull'' [point -b,point -a] [point] -ps +hull'' [point +b,point +a] [point] +ps where - hull'' :: [a] -> [a] -> [a] -hull'' [a] -h [] = [a] -h - hull'' [a] -h (a -p:[a] -ps') = [a] -> [a] -> [a] -hull'' ([a] -> [a] + hull'' :: [a] -> [a] -> [a] +hull'' [a] +h [] = [a] +h + hull'' [a] +h (a +p:[a] +ps') = [a] -> [a] -> [a] +hull'' ([a] -> [a] forall {a}. (Dimension a ~ 2, Ord (NumType a), Num (NumType a), Point_ a 2 (NumType a)) => [a] -> [a] -cleanMiddle (a -pa -> [a] -> [a] +cleanMiddle (a +pa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -h)) [a] -ps' +h)) [a] +ps' - cleanMiddle :: [a] -> [a] -cleanMiddle h :: [a] -h@[a + cleanMiddle :: [a] -> [a] +cleanMiddle h :: [a] +h@[a _,a _] = [a] -h - cleanMiddle h :: [a] -h@(a -z:a -y:a -x:[a] -rest) +h + cleanMiddle h :: [a] +h@(a +z:a +y:a +x:[a] +rest) | a -> a -> a -> Bool forall r point. (Ord r, Num r, Point_ point 2 r) => point -> point -> point -> Bool rightTurn a -x a -y a -z = [a] -h +x a +y a +z = [a] +h | Bool otherwise = [a] -> [a] -cleanMiddle (a -za -> [a] -> [a] +cleanMiddle (a +za -> [a] -> [a] forall a. a -> [a] -> [a] :a -xa -> [a] -> [a] +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -rest) - cleanMiddle [a] +rest) + cleanMiddle [a] _ = [Char] -> [a] forall a. HasCallStack => [Char] -> a error [Char] @@ -475,22 +475,22 @@ \two elements." --{-# INLINABLE hull' #-} -rightTurn :: (Ord r, Num r, Point_ point 2 r) => point -> point -> point -> Bool +rightTurn :: (Ord r, Num r, Point_ point 2 r) => point -> point -> point -> Bool rightTurn :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> point -> point -> Bool -rightTurn point -a point -b point -c = point -> point -> point -> CCW +rightTurn point +a point +b point +c = point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -a point -b point -c CCW -> CCW -> Bool +a point +b point +c CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CW diff --git a/haddocks/hgeometry/src/HGeometry.ConvexHull.JarvisMarch.html b/haddocks/hgeometry/src/HGeometry.ConvexHull.JarvisMarch.html index eb028e444..03890d5bc 100644 --- a/haddocks/hgeometry/src/HGeometry.ConvexHull.JarvisMarch.html +++ b/haddocks/hgeometry/src/HGeometry.ConvexHull.JarvisMarch.html @@ -32,13 +32,13 @@ -- -- running time: \(O(nh)\), where \(n\) is the number of input points -- and \(h\) is the complexity of the hull. -convexHull :: (Ord r, Num r, Point_ point 2 r) - => NonEmpty point -> ConvexPolygon point +convexHull :: (Ord r, Num r, Point_ point 2 r) + => NonEmpty point -> ConvexPolygon point convexHull :: forall r point. (Ord r, Num r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point -convexHull NonEmpty point -pts = NonEmpty (Vertex (ConvexPolygon point)) +convexHull NonEmpty point +pts = NonEmpty (Vertex (ConvexPolygon point)) -> NonEmpty (Vertex (ConvexPolygon point)) -> ConvexPolygon point forall {simplePolygon}. (Dimension (Vertex simplePolygon) ~ 2, @@ -48,27 +48,27 @@ (NumType (Vertex simplePolygon))) => NonEmpty (Vertex simplePolygon) -> NonEmpty (Vertex simplePolygon) -> simplePolygon -combine (NonEmpty point -> NonEmpty point +combine (NonEmpty point -> NonEmpty point forall r point. (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHull NonEmpty point -pts) (NonEmpty point -> NonEmpty point +pts) (NonEmpty point -> NonEmpty point forall r point. (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point lowerHull NonEmpty point -pts) +pts) where - combine :: NonEmpty (Vertex simplePolygon) + combine :: NonEmpty (Vertex simplePolygon) -> NonEmpty (Vertex simplePolygon) -> simplePolygon -combine (NonEmpty (Vertex simplePolygon) -> NonEmpty (Vertex simplePolygon) +combine (NonEmpty (Vertex simplePolygon) -> NonEmpty (Vertex simplePolygon) forall a. NonEmpty a -> NonEmpty a NonEmpty.reverse -> Vertex simplePolygon -_:|[Vertex simplePolygon] -uh) (Vertex simplePolygon -_:|[Vertex simplePolygon] -lh) = [Vertex simplePolygon] -> simplePolygon +_:|[Vertex simplePolygon] +uh) (Vertex simplePolygon +_:|[Vertex simplePolygon] +lh) = [Vertex simplePolygon] -> simplePolygon forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -79,11 +79,11 @@ -> [Vertex simplePolygon] -> simplePolygon forall a b. (a -> b) -> a -> b $ [Vertex simplePolygon] -lh [Vertex simplePolygon] +lh [Vertex simplePolygon] -> [Vertex simplePolygon] -> [Vertex simplePolygon] forall a. Semigroup a => a -> a -> a <> [Vertex simplePolygon] -uh +uh -- where -- SP p@(c :+ _) pts = minViewBy incXdecY ps -- takeWhile' pf (x :| xs) = x : takeWhile pf xs @@ -91,12 +91,12 @@ -- | Computes the upper hull. The points are reported in left-to-right order. -- -- running time: \(O(nh)\), where \(h\) is the complexity of the upper hull. -upperHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +upperHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHull :: forall r point. (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point -upperHull NonEmpty point -pts = (point -> point -> Ordering) +upperHull NonEmpty point +pts = (point -> point -> Ordering) -> (point -> NonEmpty point -> point) -> point -> [point] @@ -105,45 +105,45 @@ (a -> a -> Ordering) -> (a -> NonEmpty a -> a) -> a -> [a] -> NonEmpty a repeatedly point -> point -> Ordering -cmp point -> NonEmpty point -> point +cmp point -> NonEmpty point -> point forall r point. (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point steepestCwFrom point -s [point] -rest +s [point] +rest where - (point -s:|[point] -_ :+ [point] -rest) = (point -> point -> Ordering) + (point +s:|[point] +_ :+ [point] +rest) = (point -> point -> Ordering) -> NonEmpty point -> NonEmpty point :+ [point] forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] extractMinimaBy point -> point -> Ordering -cmp NonEmpty point -pts - cmp :: point -> point -> Ordering -cmp = (point -> (NumType point, Down (NumType point))) +cmp NonEmpty point +pts + cmp :: point -> point -> Ordering +cmp = (point -> (NumType point, Down (NumType point))) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering -comparing (\(Point2_ NumType point -x NumType point -y) -> (NumType point -x, NumType point -> Down (NumType point) +comparing (\(Point2_ NumType point +x NumType point +y) -> (NumType point +x, NumType point -> Down (NumType point) forall a. a -> Down a Down NumType point -y)) +y)) -- start from the topmost point that has minimum x-coord -- also use cmp as the comparator, so that we also select the last -- vertical segment. -- | Upepr hull from left to right, without any vertical segments. -upperHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +upperHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point upperHull' :: forall r point. (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point -upperHull' NonEmpty point -pts = NonEmpty point -> NonEmpty point +upperHull' NonEmpty point +pts = NonEmpty point -> NonEmpty point forall r point. (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -159,37 +159,37 @@ (a -> a -> Ordering) -> (a -> NonEmpty a -> a) -> a -> [a] -> NonEmpty a repeatedly point -> point -> Ordering -cmp point -> NonEmpty point -> point +cmp point -> NonEmpty point -> point forall r point. (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point steepestCwFrom point -s [point] -rest +s [point] +rest where - (point -s:|[point] -_ :+ [point] -rest) = (point -> point -> Ordering) + (point +s:|[point] +_ :+ [point] +rest) = (point -> point -> Ordering) -> NonEmpty point -> NonEmpty point :+ [point] forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] extractMinimaBy point -> point -> Ordering -cmp0 NonEmpty point -pts - cmp0 :: point -> point -> Ordering -cmp0 = (point -> (NumType point, Down (NumType point))) +cmp0 NonEmpty point +pts + cmp0 :: point -> point -> Ordering +cmp0 = (point -> (NumType point, Down (NumType point))) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering -comparing (\(Point2_ NumType point -x NumType point -y) -> (NumType point -x, NumType point -> Down (NumType point) +comparing (\(Point2_ NumType point +x NumType point +y) -> (NumType point +x, NumType point -> Down (NumType point) forall a. a -> Down a Down NumType point -y)) +y)) -- start from the topmost point that has minimum x-coord - cmp :: point -> point -> Ordering -cmp = (point -> Point (Dimension point) (NumType point)) + cmp :: point -> point -> Ordering +cmp = (point -> Point (Dimension point) (NumType point)) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (Getting @@ -215,12 +215,12 @@ -- segments at the start. -- -- running time: \(O(nh)\), where \(h\) is the complexity of the hull. -lowerHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +lowerHull :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point lowerHull :: forall r point. (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point -lowerHull NonEmpty point -pts = NonEmpty point -> NonEmpty point +lowerHull NonEmpty point +pts = NonEmpty point -> NonEmpty point forall r point. (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -236,37 +236,37 @@ (a -> a -> Ordering) -> (a -> NonEmpty a -> a) -> a -> [a] -> NonEmpty a repeatedly point -> point -> Ordering -cmp point -> NonEmpty point -> point +cmp point -> NonEmpty point -> point forall r point. (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point steepestCcwFrom point -s [point] -rest +s [point] +rest where - (point -s:|[point] -_ :+ [point] -rest) = (point -> point -> Ordering) + (point +s:|[point] +_ :+ [point] +rest) = (point -> point -> Ordering) -> NonEmpty point -> NonEmpty point :+ [point] forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] extractMinimaBy point -> point -> Ordering -cmp0 NonEmpty point -pts - cmp0 :: point -> point -> Ordering -cmp0 = (point -> (NumType point, Down (NumType point))) +cmp0 NonEmpty point +pts + cmp0 :: point -> point -> Ordering +cmp0 = (point -> (NumType point, Down (NumType point))) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering -comparing (\(Point2_ NumType point -x NumType point -y) -> (NumType point -x, NumType point -> Down (NumType point) +comparing (\(Point2_ NumType point +x NumType point +y) -> (NumType point +x, NumType point -> Down (NumType point) forall a. a -> Down a Down NumType point -y)) +y)) -- start from the topmost point that has minimum x-coord - cmp :: point -> point -> Ordering -cmp = (point -> Point (Dimension point) (NumType point)) + cmp :: point -> point -> Ordering +cmp = (point -> Point (Dimension point) (NumType point)) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (Getting @@ -291,12 +291,12 @@ -- -- -- running time: \(O(nh)\), where \(h\) is the complexity of the hull. -lowerHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +lowerHull' :: (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point lowerHull' :: forall r point. (Num r, Ord r, Point_ point 2 r) => NonEmpty point -> NonEmpty point -lowerHull' NonEmpty point -pts = NonEmpty point -> NonEmpty point +lowerHull' NonEmpty point +pts = NonEmpty point -> NonEmpty point forall r point. (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -312,25 +312,25 @@ (a -> a -> Ordering) -> (a -> NonEmpty a -> a) -> a -> [a] -> NonEmpty a repeatedly point -> point -> Ordering -cmp point -> NonEmpty point -> point +cmp point -> NonEmpty point -> point forall r point. (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point steepestCcwFrom point -s [point] -rest +s [point] +rest where - (point -s:|[point] -_ :+ [point] -rest) = (point -> point -> Ordering) + (point +s:|[point] +_ :+ [point] +rest) = (point -> point -> Ordering) -> NonEmpty point -> NonEmpty point :+ [point] forall a. (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a :+ [a] extractMinimaBy point -> point -> Ordering -cmp NonEmpty point -pts - cmp :: point -> point -> Ordering -cmp = (point -> Point (Dimension point) (NumType point)) +cmp NonEmpty point +pts + cmp :: point -> point -> Ordering +cmp = (point -> Point (Dimension point) (NumType point)) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (Getting @@ -352,13 +352,13 @@ -- | Find the next point in counter clockwise order, i.e. the point -- with minimum slope w.r.t. the given point. -steepestCcwFrom :: (Ord r, Num r, Point_ point 2 r) - => point -> NonEmpty point -> point +steepestCcwFrom :: (Ord r, Num r, Point_ point 2 r) + => point -> NonEmpty point -> point steepestCcwFrom :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point -steepestCcwFrom point -p = (point -> point -> Ordering) -> NonEmpty point -> point +steepestCcwFrom point +p = (point -> point -> Ordering) -> NonEmpty point -> point forall (t :: * -> *) a. Foldable t => (a -> a -> Ordering) -> t a -> a @@ -371,17 +371,17 @@ Vector2 r 0 (-r 1)) point -p) +p) -- | Find the next point in clockwise order, i.e. the point -- with maximum slope w.r.t. the given point. -steepestCwFrom :: (Ord r, Num r, Point_ point 2 r) - => point -> NonEmpty point -> point +steepestCwFrom :: (Ord r, Num r, Point_ point 2 r) + => point -> NonEmpty point -> point steepestCwFrom :: forall r point. (Ord r, Num r, Point_ point 2 r) => point -> NonEmpty point -> point -steepestCwFrom point -p = (point -> point -> Ordering) -> NonEmpty point -> point +steepestCwFrom point +p = (point -> point -> Ordering) -> NonEmpty point -> point forall (t :: * -> *) a. Foldable t => (a -> a -> Ordering) -> t a -> a @@ -394,55 +394,55 @@ Vector2 r 0 r 1) point -p) +p) -repeatedly :: (a -> a -> Ordering) -> (a -> NonEmpty a -> a) -> a -> [a] -> NonEmpty a +repeatedly :: (a -> a -> Ordering) -> (a -> NonEmpty a -> a) -> a -> [a] -> NonEmpty a repeatedly :: forall a. (a -> a -> Ordering) -> (a -> NonEmpty a -> a) -> a -> [a] -> NonEmpty a -repeatedly a -> a -> Ordering -cmp a -> NonEmpty a -> a -f = a -> [a] -> NonEmpty a -go +repeatedly a -> a -> Ordering +cmp a -> NonEmpty a -> a +f = a -> [a] -> NonEmpty a +go where - go :: a -> [a] -> NonEmpty a -go a -m [a] -xs' = case [a] -> Maybe (NonEmpty a) + go :: a -> [a] -> NonEmpty a +go a +m [a] +xs' = case [a] -> Maybe (NonEmpty a) forall a. [a] -> Maybe (NonEmpty a) NonEmpty.nonEmpty [a] -xs' of +xs' of Maybe (NonEmpty a) Nothing -> a -m a -> [a] -> NonEmpty a +m a -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :| [] - Just NonEmpty a -xs -> let p :: a -p = a -> NonEmpty a -> a -f a -m NonEmpty a -xs + Just NonEmpty a +xs -> let p :: a +p = a -> NonEmpty a -> a +f a +m NonEmpty a +xs in a -m a -> NonEmpty a -> NonEmpty a +m a -> NonEmpty a -> NonEmpty a forall a. a -> NonEmpty a -> NonEmpty a <| a -> [a] -> NonEmpty a -go a -p ((a -> Bool) -> NonEmpty a -> [a] +go a +p ((a -> Bool) -> NonEmpty a -> [a] forall a. (a -> Bool) -> NonEmpty a -> [a] -NonEmpty.filter (\a -x -> a -p a -> a -> Ordering -`cmp` a -x Ordering -> Ordering -> Bool +NonEmpty.filter (\a +x -> a +p a -> a -> Ordering +`cmp` a +x Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering LT) NonEmpty a -xs) +xs) -- | Removes the topmost vertical points, if they exist -pruneVertical :: (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point +pruneVertical :: (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point pruneVertical :: forall r point. (Eq r, Point_ point 2 r) => NonEmpty point -> NonEmpty point @@ -480,26 +480,26 @@ a -> Either (NonEmpty a) (NonEmpty a) -> Either (NonEmpty a) (NonEmpty a) -f (\point -q -> NonEmpty point -> Either (NonEmpty point) (NonEmpty point) +f (\point +q -> NonEmpty point -> Either (NonEmpty point) (NonEmpty point) forall a b. a -> Either a b Left (NonEmpty point -> Either (NonEmpty point) (NonEmpty point)) -> NonEmpty point -> Either (NonEmpty point) (NonEmpty point) forall a b. (a -> b) -> a -> b $ point -qpoint -> [point] -> NonEmpty point +qpoint -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :|[]) where - f :: a + f :: a -> Either (NonEmpty a) (NonEmpty a) -> Either (NonEmpty a) (NonEmpty a) -f a -p = \case - Left (a -q:|[a] -qs) | a -pa -> Getting (NumType a) a (NumType a) -> NumType a +f a +p = \case + Left (a +q:|[a] +qs) | a +pa -> Getting (NumType a) a (NumType a) -> NumType a forall s a. s -> Getting a s a -> a ^.Getting (NumType a) a (NumType a) forall (d :: Nat) point r. @@ -509,7 +509,7 @@ xCoord NumType a -> NumType a -> Bool forall a. Eq a => a -> a -> Bool == a -qa -> Getting (NumType a) a (NumType a) -> NumType a +qa -> Getting (NumType a) a (NumType a) -> NumType a forall s a. s -> Getting a s a -> a ^.Getting (NumType a) a (NumType a) forall (d :: Nat) point r. @@ -519,61 +519,61 @@ xCoord -> NonEmpty a -> Either (NonEmpty a) (NonEmpty a) forall a b. a -> Either a b Left (a -p a -> [a] -> NonEmpty a +p a -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :| [a] -qs) +qs) | Bool otherwise -> NonEmpty a -> Either (NonEmpty a) (NonEmpty a) forall a b. b -> Either a b Right (a -p a -> [a] -> NonEmpty a +p a -> [a] -> NonEmpty a forall a. a -> [a] -> NonEmpty a :| a -qa -> [a] -> [a] +qa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -qs) - Right NonEmpty a -pts -> NonEmpty a -> Either (NonEmpty a) (NonEmpty a) +qs) + Right NonEmpty a +pts -> NonEmpty a -> Either (NonEmpty a) (NonEmpty a) forall a b. b -> Either a b Right (a -p a -> NonEmpty a -> NonEmpty a +p a -> NonEmpty a -> NonEmpty a forall a. a -> NonEmpty a -> NonEmpty a <| NonEmpty a -pts) +pts) -- | Foldr, but start by applying some function on the rightmost -- element to get the starting value. -foldr1With :: Foldable1 f => (a -> b -> b) -> (a -> b) -> f a -> b +foldr1With :: Foldable1 f => (a -> b -> b) -> (a -> b) -> f a -> b foldr1With :: forall (f :: * -> *) a b. Foldable1 f => (a -> b -> b) -> (a -> b) -> f a -> b -foldr1With a -> b -> b -f a -> b -b = NonEmpty a -> b -go (NonEmpty a -> b) -> (f a -> NonEmpty a) -> f a -> b +foldr1With a -> b -> b +f a -> b +b = NonEmpty a -> b +go (NonEmpty a -> b) -> (f a -> NonEmpty a) -> f a -> b forall b c a. (b -> c) -> (a -> b) -> a -> c . f a -> NonEmpty a forall a. f a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty where - go :: NonEmpty a -> b -go (a -x :| [a] -xs) = case [a] -> Maybe (NonEmpty a) + go :: NonEmpty a -> b +go (a +x :| [a] +xs) = case [a] -> Maybe (NonEmpty a) forall a. [a] -> Maybe (NonEmpty a) NonEmpty.nonEmpty [a] -xs of +xs of Maybe (NonEmpty a) Nothing -> a -> b -b a -x - Just NonEmpty a -xs' -> a -x a -> b -> b -`f` NonEmpty a -> b -go NonEmpty a -xs' +b a +x + Just NonEmpty a +xs' -> a +x a -> b -> b +`f` NonEmpty a -> b +go NonEmpty a +xs' \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.ConvexHull.Melkman.html b/haddocks/hgeometry/src/HGeometry.ConvexHull.Melkman.html index a6a3f911f..2d948476c 100644 --- a/haddocks/hgeometry/src/HGeometry.ConvexHull.Melkman.html +++ b/haddocks/hgeometry/src/HGeometry.ConvexHull.Melkman.html @@ -28,15 +28,15 @@ -------------------------------------------------------------------------------- -type M s v a = StateT (Mut.MVector s v, Int) (ST s) a +type M s v a = StateT (Mut.MVector s v, Int) (ST s) a -runM :: Int -> M s v () -> ST s (Mut.MVector s v) +runM :: Int -> M s v () -> ST s (Mut.MVector s v) runM :: forall s v. Int -> M s v () -> ST s (MVector s v) -runM Int -s M s v () -action = do - MVector s v -v <- Int -> ST s (MVector (PrimState (ST s)) v) +runM Int +s M s v () +action = do + MVector s v +v <- Int -> ST s (MVector (PrimState (ST s)) v) forall (m :: * -> *) a. PrimMonad m => Int -> m (MVector (PrimState m) a) @@ -44,17 +44,17 @@ 2Int -> Int -> Int forall a. Num a => a -> a -> a *Int -s) - (MVector s v -v', Int -f) <- M s v () -> (MVector s v, Int) -> ST s (MVector s v, Int) +s) + (MVector s v +v', Int +f) <- M s v () -> (MVector s v, Int) -> ST s (MVector s v, Int) forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s execStateT M s v () -action (Int -> MVector s v -> MVector s v +action (Int -> MVector s v -> MVector s v forall s a. Int -> MVector s a -> MVector s a Mut.drop Int -s MVector s v -v, Int +s MVector s v +v, Int 0) MVector s v -> ST s (MVector s v) forall a. a -> ST s a @@ -69,10 +69,10 @@ $ Int -> MVector s v -> MVector s v forall s a. Int -> MVector s a -> MVector s a Mut.take Int -f MVector s v -v' +f MVector s v +v' -dequeRemove :: M s a () +dequeRemove :: M s a () dequeRemove :: forall s a. M s a () dequeRemove = do ((MVector s a, Int) -> (MVector s a, Int)) -> M s a () @@ -80,58 +80,58 @@ modify (((MVector s a, Int) -> (MVector s a, Int)) -> M s a ()) -> ((MVector s a, Int) -> (MVector s a, Int)) -> M s a () forall a b. (a -> b) -> a -> b -$ \(Mut.MVector Int -offset Int -len MutableArray s a -arr, Int -f) -> (Int -> Int -> MutableArray s a -> MVector s a +$ \(Mut.MVector Int +offset Int +len MutableArray s a +arr, Int +f) -> (Int -> Int -> MutableArray s a -> MVector s a forall s a. Int -> Int -> MutableArray s a -> MVector s a Mut.MVector (Int -offsetInt -> Int -> Int +offsetInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) (Int -lenInt -> Int -> Int +lenInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) MutableArray s a -arr, Int -fInt -> Int -> Int +arr, Int +fInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) -dequeInsert :: a -> M s a () +dequeInsert :: a -> M s a () dequeInsert :: forall a s. a -> M s a () -dequeInsert a -a = do +dequeInsert a +a = do ((MVector s a, Int) -> (MVector s a, Int)) -> M s a () forall s (m :: * -> *). MonadState s m => (s -> s) -> m () modify (((MVector s a, Int) -> (MVector s a, Int)) -> M s a ()) -> ((MVector s a, Int) -> (MVector s a, Int)) -> M s a () forall a b. (a -> b) -> a -> b -$ \(Mut.MVector Int -offset Int -len MutableArray s a -arr, Int -f) -> (Int -> Int -> MutableArray s a -> MVector s a +$ \(Mut.MVector Int +offset Int +len MutableArray s a +arr, Int +f) -> (Int -> Int -> MutableArray s a -> MVector s a forall s a. Int -> Int -> MutableArray s a -> MVector s a Mut.MVector (Int -offsetInt -> Int -> Int +offsetInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) (Int -lenInt -> Int -> Int +lenInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) MutableArray s a -arr, Int -fInt -> Int -> Int +arr, Int +fInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) - (MVector s a -v,Int + (MVector s a +v,Int _) <- StateT (MVector s a, Int) (ST s) (MVector s a, Int) forall s (m :: * -> *). MonadState s m => m s get @@ -142,17 +142,17 @@ MVector (PrimState m) a -> Int -> a -> m () Mut.write MVector s a MVector (PrimState (StateT (MVector s a, Int) (ST s))) a -v Int +v Int 0 a -a +a -dequePush :: a -> M s a () +dequePush :: a -> M s a () dequePush :: forall a s. a -> M s a () -dequePush a -a = do - (MVector s a -v, Int -f) <- StateT (MVector s a, Int) (ST s) (MVector s a, Int) +dequePush a +a = do + (MVector s a +v, Int +f) <- StateT (MVector s a, Int) (ST s) (MVector s a, Int) forall s (m :: * -> *). MonadState s m => m s get MVector (PrimState (StateT (MVector s a, Int) (ST s))) a @@ -162,19 +162,19 @@ MVector (PrimState m) a -> Int -> a -> m () Mut.write MVector s a MVector (PrimState (StateT (MVector s a, Int) (ST s))) a -v Int -f a -a +v Int +f a +a (MVector s a, Int) -> M s a () forall s (m :: * -> *). MonadState s m => s -> m () put (MVector s a -v,Int -fInt -> Int -> Int +v,Int +fInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) -dequePop :: M s a () +dequePop :: M s a () dequePop :: forall s a. M s a () dequePop = do ((MVector s a, Int) -> (MVector s a, Int)) -> M s a () @@ -182,21 +182,21 @@ modify (((MVector s a, Int) -> (MVector s a, Int)) -> M s a ()) -> ((MVector s a, Int) -> (MVector s a, Int)) -> M s a () forall a b. (a -> b) -> a -> b -$ \(MVector s a -v,Int -f) -> (MVector s a -v,Int -fInt -> Int -> Int +$ \(MVector s a +v,Int +f) -> (MVector s a +v,Int +fInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) -dequeBottom :: Int -> M s a a +dequeBottom :: Int -> M s a a dequeBottom :: forall s a. Int -> M s a a -dequeBottom Int -idx = do - (MVector s a -v,Int +dequeBottom Int +idx = do + (MVector s a +v,Int _) <- StateT (MVector s a, Int) (ST s) (MVector s a, Int) forall s (m :: * -> *). MonadState s m => m s get @@ -207,16 +207,16 @@ MVector (PrimState m) a -> Int -> m a Mut.read MVector s a MVector (PrimState (StateT (MVector s a, Int) (ST s))) a -v Int -idx +v Int +idx -dequeTop :: Int -> M s a a +dequeTop :: Int -> M s a a dequeTop :: forall s a. Int -> M s a a -dequeTop Int -idx = do - (MVector s a -v,Int -f) <- StateT (MVector s a, Int) (ST s) (MVector s a, Int) +dequeTop Int +idx = do + (MVector s a +v,Int +f) <- StateT (MVector s a, Int) (ST s) (MVector s a, Int) forall s (m :: * -> *). MonadState s m => m s get MVector (PrimState (StateT (MVector s a, Int) (ST s))) a @@ -226,11 +226,11 @@ MVector (PrimState m) a -> Int -> m a Mut.read MVector s a MVector (PrimState (StateT (MVector s a, Int) (ST s))) a -v (Int -fInt -> Int -> Int +v (Int +fInt -> Int -> Int forall a. Num a => a -> a -> a -Int -idxInt -> Int -> Int +idxInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) @@ -240,13 +240,13 @@ -- | \( O(n) \) Convex hull of a simple polygon. -- -- For algorithmic details see: <https://en.wikipedia.org/wiki/Convex_hull_of_a_simple_polygon> -convexHull :: forall polygon point r. (Polygon_ polygon point r, Ord r, Num r) - => polygon -> ConvexPolygon point +convexHull :: forall polygon point r. (Polygon_ polygon point r, Ord r, Num r) + => polygon -> ConvexPolygon point convexHull :: forall polygon point r. (Polygon_ polygon point r, Ord r, Num r) => polygon -> ConvexPolygon point -convexHull polygon -pg = Vector point -> ConvexPolygon point +convexHull polygon +pg = Vector point -> ConvexPolygon point forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -265,48 +265,48 @@ forall a. Vector a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Vector point -vs) (M s point () -> ST s (MVector s point)) +vs) (M s point () -> ST s (MVector s point)) -> M s point () -> ST s (MVector s point) forall a b. (a -> b) -> a -> b $ Int -> M s point () forall s. Int -> M s point () -findStartingPoint Int +findStartingPoint Int 2 where -- Find the first spot where 0,n-1,n is not colinear. - findStartingPoint :: Int -> M s point () - findStartingPoint :: forall s. Int -> M s point () -findStartingPoint Int -nth = do - let vPrev :: point -vPrev = Vector point -vs Vector point -> Int -> point + findStartingPoint :: Int -> M s point () + findStartingPoint :: forall s. Int -> M s point () +findStartingPoint Int +nth = do + let vPrev :: point +vPrev = Vector point +vs Vector point -> Int -> point forall a. Vector a -> Int -> a V.! (Int -nthInt -> Int -> Int +nthInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) - vNth :: point -vNth = Vector point -vs Vector point -> Int -> point + vNth :: point +vNth = Vector point +vs Vector point -> Int -> point forall a. Vector a -> Int -> a V.! Int -nth +nth case point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -v1 point -vPrev point -vNth of +v1 point +vPrev point +vNth of CCW CoLinear -> Int -> M s point () forall s. Int -> M s point () -findStartingPoint (Int -nthInt -> Int -> Int +findStartingPoint (Int +nthInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) @@ -315,7 +315,7 @@ point -> M s point () forall a s. a -> M s a () dequePush point -v1 M s point () -> M s point () -> M s point () +v1 M s point () -> M s point () -> M s point () forall a b. StateT (MVector s point, Int) (ST s) a -> StateT (MVector s point, Int) (ST s) b @@ -324,14 +324,14 @@ >> point -> M s point () forall a s. a -> M s a () dequePush point -vPrev +vPrev point -> M s point () forall a s. a -> M s a () dequePush point -vNth; point -> M s point () +vNth; point -> M s point () forall a s. a -> M s a () dequeInsert point -vNth +vNth (point -> M s point ()) -> Vector point -> M s point () forall (m :: * -> *) a b. Monad m => (a -> m b) -> Vector a -> m () V.mapM_ point -> M s point () @@ -339,20 +339,20 @@ (Dimension t ~ 2, Point_ t 2 (NumType t), Num (NumType t), Ord (NumType t)) => t -> StateT (MVector s t, Int) (ST s) () -build (Int -> Vector point -> Vector point +build (Int -> Vector point -> Vector point forall a. Int -> Vector a -> Vector a V.drop (Int -nthInt -> Int -> Int +nthInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Vector point -vs) +vs) CCW CW -> do point -> M s point () forall a s. a -> M s a () dequePush point -vPrev M s point () -> M s point () -> M s point () +vPrev M s point () -> M s point () -> M s point () forall a b. StateT (MVector s point, Int) (ST s) a -> StateT (MVector s point, Int) (ST s) b @@ -361,14 +361,14 @@ >> point -> M s point () forall a s. a -> M s a () dequePush point -v1 +v1 point -> M s point () forall a s. a -> M s a () dequePush point -vNth; point -> M s point () +vNth; point -> M s point () forall a s. a -> M s a () dequeInsert point -vNth +vNth (point -> M s point ()) -> Vector point -> M s point () forall (m :: * -> *) a b. Monad m => (a -> m b) -> Vector a -> m () V.mapM_ point -> M s point () @@ -376,28 +376,28 @@ (Dimension t ~ 2, Point_ t 2 (NumType t), Num (NumType t), Ord (NumType t)) => t -> StateT (MVector s t, Int) (ST s) () -build (Int -> Vector point -> Vector point +build (Int -> Vector point -> Vector point forall a. Int -> Vector a -> Vector a V.drop (Int -nthInt -> Int -> Int +nthInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Vector point -vs) +vs) - v1 :: point -v1 = Vector point -vs Vector point -> Int -> point + v1 :: point +v1 = Vector point +vs Vector point -> Int -> point forall a. Vector a -> Int -> a V.! Int 0 - vs :: Vector point -vs = [point] -> Vector point + vs :: Vector point +vs = [point] -> Vector point forall a. [a] -> Vector a V.fromList ([point] -> Vector point) -> [point] -> Vector point forall a b. (a -> b) -> a -> b $ polygon -pgpolygon -> Getting (Endo [point]) polygon point -> [point] +pgpolygon -> Getting (Endo [point]) polygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) polygon point (Vertex polygon -> Const (Endo [point]) (Vertex polygon)) @@ -410,11 +410,11 @@ - build :: t -> StateT (MVector s t, Int) (ST s) () -build t -v = do - CCW -botTurn <- t -> t -> t -> CCW + build :: t -> StateT (MVector s t, Int) (ST s) () +build t +v = do + CCW +botTurn <- t -> t -> t -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => @@ -427,7 +427,7 @@ forall a. a -> StateT (MVector s t, Int) (ST s) a forall (f :: * -> *) a. Applicative f => a -> f a pure t -v StateT (MVector s t, Int) (ST s) (t -> t -> CCW) +v StateT (MVector s t, Int) (ST s) (t -> t -> CCW) -> StateT (MVector s t, Int) (ST s) t -> StateT (MVector s t, Int) (ST s) (t -> CCW) forall a b. @@ -450,8 +450,8 @@ forall s a. Int -> M s a a dequeBottom Int 1 - CCW -topTurn <- t -> t -> t -> CCW + CCW +topTurn <- t -> t -> t -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => @@ -486,18 +486,18 @@ forall a. a -> StateT (MVector s t, Int) (ST s) a forall (f :: * -> *) a. Applicative f => a -> f a pure t -v +v Bool -> StateT (MVector s t, Int) (ST s) () -> StateT (MVector s t, Int) (ST s) () forall (f :: * -> *). Applicative f => Bool -> f () -> f () when (CCW -botTurn CCW -> CCW -> Bool +botTurn CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CW Bool -> Bool -> Bool || CCW -topTurn CCW -> CCW -> Bool +topTurn CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CW) (StateT (MVector s t, Int) (ST s) () @@ -512,27 +512,27 @@ Point_ a 2 (NumType a), Point_ t 2 (NumType a), Num (NumType a), Ord (NumType a)) => t -> StateT (MVector s a, Int) (ST s) () -backtrackTop t -v; t -> StateT (MVector s t, Int) (ST s) () +backtrackTop t +v; t -> StateT (MVector s t, Int) (ST s) () forall a s. a -> M s a () dequePush t -v +v t -> StateT (MVector s t, Int) (ST s) () forall {t} {a} {s}. (Dimension t ~ 2, Dimension a ~ 2, NumType a ~ NumType t, Point_ t 2 (NumType t), Point_ a 2 (NumType t), Num (NumType t), Ord (NumType t)) => t -> StateT (MVector s a, Int) (ST s) () -backtrackBot t -v; t -> StateT (MVector s t, Int) (ST s) () +backtrackBot t +v; t -> StateT (MVector s t, Int) (ST s) () forall a s. a -> M s a () dequeInsert t -v - backtrackTop :: t -> StateT (MVector s a, Int) (ST s) () -backtrackTop t -v = do - CCW -turn <- a -> a -> t -> CCW +v + backtrackTop :: t -> StateT (MVector s a, Int) (ST s) () +backtrackTop t +v = do + CCW +turn <- a -> a -> t -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => @@ -567,13 +567,13 @@ forall a. a -> StateT (MVector s a, Int) (ST s) a forall (f :: * -> *) a. Applicative f => a -> f a pure t -v +v Bool -> StateT (MVector s a, Int) (ST s) () -> StateT (MVector s a, Int) (ST s) () forall (f :: * -> *). Applicative f => Bool -> f () -> f () unless (CCW -turn CCW -> CCW -> Bool +turn CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CCW) (StateT (MVector s a, Int) (ST s) () @@ -586,13 +586,13 @@ forall s a. M s a () dequePop t -> StateT (MVector s a, Int) (ST s) () -backtrackTop t -v - backtrackBot :: t -> StateT (MVector s a, Int) (ST s) () -backtrackBot t -v = do - CCW -turn <- t -> a -> a -> CCW +backtrackTop t +v + backtrackBot :: t -> StateT (MVector s a, Int) (ST s) () +backtrackBot t +v = do + CCW +turn <- t -> a -> a -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => @@ -605,7 +605,7 @@ forall a. a -> StateT (MVector s a, Int) (ST s) a forall (f :: * -> *) a. Applicative f => a -> f a pure t -v StateT (MVector s a, Int) (ST s) (a -> a -> CCW) +v StateT (MVector s a, Int) (ST s) (a -> a -> CCW) -> StateT (MVector s a, Int) (ST s) a -> StateT (MVector s a, Int) (ST s) (a -> CCW) forall a b. @@ -633,7 +633,7 @@ -> StateT (MVector s a, Int) (ST s) () forall (f :: * -> *). Applicative f => Bool -> f () -> f () unless (CCW -turn CCW -> CCW -> Bool +turn CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CCW) (StateT (MVector s a, Int) (ST s) () @@ -646,6 +646,6 @@ forall s a. M s a () dequeRemove t -> StateT (MVector s a, Int) (ST s) () -backtrackBot t -v +backtrackBot t +v \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.ConvexHull.QuickHull.html b/haddocks/hgeometry/src/HGeometry.ConvexHull.QuickHull.html index d2dafb44f..440d5225d 100644 --- a/haddocks/hgeometry/src/HGeometry.ConvexHull.QuickHull.html +++ b/haddocks/hgeometry/src/HGeometry.ConvexHull.QuickHull.html @@ -28,13 +28,13 @@ -- pre: input contains at least three points -- -- running time: \(O(n^2)\) -convexHull :: (Ord r, Fractional r, Show r, Point_ point 2 r) - => NonEmpty point -> ConvexPolygon point +convexHull :: (Ord r, Fractional r, Show r, Point_ point 2 r) + => NonEmpty point -> ConvexPolygon point convexHull :: forall r point. (Ord r, Fractional r, Show r, Point_ point 2 r) => NonEmpty point -> ConvexPolygon point -convexHull NonEmpty point -ps = [point] -> ConvexPolygon point +convexHull NonEmpty point +ps = [point] -> ConvexPolygon point forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -43,19 +43,19 @@ ([point] -> ConvexPolygon point) -> [point] -> ConvexPolygon point forall a b. (a -> b) -> a -> b $ [point -l] [point] -> [point] -> [point] +l] [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> point -> point -> [point] -> [point] forall point r. (Fractional r, Ord r, Point_ point 2 r) => point -> point -> [point] -> [point] hull point -l point -r [point] -below' [point] -> [point] -> [point] +l point +r [point] +below' [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point -r] [point] -> [point] -> [point] +r] [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point] -> [point] forall a. [a] -> [a] @@ -64,40 +64,40 @@ (Fractional r, Ord r, Point_ point 2 r) => point -> point -> [point] -> [point] hull point -l point -r [point] -above) +l point +r [point] +above) where - Extremes point -l point -r [point] -mids = NonEmpty point -> Extremes point + Extremes point +l point +r [point] +mids = NonEmpty point -> Extremes point forall r point. (Ord r, Point_ point 2 r) => NonEmpty point -> Extremes point findExtremes NonEmpty point -ps - m :: LinePV 2 r -m = point -> point -> LinePV 2 r +ps + m :: LinePV 2 r +m = point -> point -> LinePV 2 r forall line point (d :: Nat) r. (Line_ line d r, Point_ point d r, Num r) => point -> point -> line lineThrough point -l point -r - ([point] -above,[point] -below') = (point -> Bool) -> [point] -> ([point], [point]) +l point +r + ([point] +above,[point] +below') = (point -> Bool) -> [point] -> ([point], [point]) forall a. (a -> Bool) -> [a] -> ([a], [a]) List.partition (point -> LinePV 2 r -> Bool forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> Bool `liesAbove` LinePV 2 r -m) [point] -mids +m) [point] +mids -data Extremes p = Extremes !p !p [p] deriving (Int -> Extremes p -> ShowS +data Extremes p = Extremes !p !p [p] deriving (Int -> Extremes p -> ShowS [Extremes p] -> ShowS Extremes p -> String (Int -> Extremes p -> ShowS) @@ -118,15 +118,15 @@ Show) -- | Finds the leftmost and rightmost point in the list -findExtremes :: (Ord r, Point_ point 2 r) - => NonEmpty point - -> Extremes point +findExtremes :: (Ord r, Point_ point 2 r) + => NonEmpty point + -> Extremes point findExtremes :: forall r point. (Ord r, Point_ point 2 r) => NonEmpty point -> Extremes point -findExtremes (point -p :| [point] -pts ) = (point -> Extremes point -> Extremes point) +findExtremes (point +p :| [point] +pts ) = (point -> Extremes point -> Extremes point) -> Extremes point -> [point] -> Extremes point forall a b. (a -> b -> b) -> b -> [a] -> b forall (t :: * -> *) a b. @@ -136,99 +136,99 @@ forall {s}. (Dimension s ~ 2, Ord (NumType s), Point_ s 2 (NumType s)) => s -> Extremes s -> Extremes s -f (point -> point -> [point] -> Extremes point +f (point -> point -> [point] -> Extremes point forall p. p -> p -> [p] -> Extremes p Extremes point -p point -p []) [point] -pts +p point +p []) [point] +pts where - f :: s -> Extremes s -> Extremes s -f s -q (Extremes s -l s -r [s] -ms) = case (s -> s -> Ordering + f :: s -> Extremes s -> Extremes s +f s +q (Extremes s +l s +r [s] +ms) = case (s -> s -> Ordering forall r point. (Ord r, Point_ point 2 r) => point -> point -> Ordering incXdecY s -q s -l, s -> s -> Ordering +q s +l, s -> s -> Ordering forall r point. (Ord r, Point_ point 2 r) => point -> point -> Ordering incXdecY s -q s -r) of +q s +r) of (Ordering LT,Ordering _) -> s -> s -> [s] -> Extremes s forall p. p -> p -> [p] -> Extremes p Extremes s -q s -r (s -> s -> [s] -> [s] +q s +r (s -> s -> [s] -> [s] forall {s} {a}. (Dimension s ~ Dimension a, NumType s ~ NumType a, Eq (Vector (Dimension a) (NumType a)), Point_ a (Dimension a) (NumType a), Point_ s (Dimension a) (NumType a)) => s -> a -> [a] -> [a] -addIfNot s -r s -l [s] -ms) +addIfNot s +r s +l [s] +ms) (Ordering EQ,Ordering _) -> s -> s -> [s] -> Extremes s forall p. p -> p -> [p] -> Extremes p Extremes s -l s -r [s] -ms -- ditch q; it is the same as l +l s +r [s] +ms -- ditch q; it is the same as l (Ordering GT,Ordering GT) -> s -> s -> [s] -> Extremes s forall p. p -> p -> [p] -> Extremes p Extremes s -l s -q (s -> s -> [s] -> [s] +l s +q (s -> s -> [s] -> [s] forall {s} {a}. (Dimension s ~ Dimension a, NumType s ~ NumType a, Eq (Vector (Dimension a) (NumType a)), Point_ a (Dimension a) (NumType a), Point_ s (Dimension a) (NumType a)) => s -> a -> [a] -> [a] -addIfNot s -l s -r [s] -ms) +addIfNot s +l s +r [s] +ms) (Ordering GT,Ordering EQ) -> s -> s -> [s] -> Extremes s forall p. p -> p -> [p] -> Extremes p Extremes s -l s -r [s] -ms -- ditch q; it is the same as r +l s +r [s] +ms -- ditch q; it is the same as r (Ordering GT,Ordering LT) -> s -> s -> [s] -> Extremes s forall p. p -> p -> [p] -> Extremes p Extremes s -l s -r (s -qs -> [s] -> [s] +l s +r (s +qs -> [s] -> [s] forall a. a -> [a] -> [a] :[s] -ms) +ms) - addIfNot :: s -> a -> [a] -> [a] -addIfNot s -y a -x [a] -xs | (a -xa + addIfNot :: s -> a -> [a] -> [a] +addIfNot s +y a +x [a] +xs | (a +xa -> Getting (Point (Dimension s) (NumType s)) a @@ -247,7 +247,7 @@ -> Point (Dimension s) (NumType s) -> Bool forall a. Eq a => a -> a -> Bool /= (s -ys +ys -> Getting (Point (Dimension s) (NumType s)) s @@ -263,13 +263,13 @@ Lens' point (Point d r) Lens' s (Point (Dimension s) (NumType s)) asPoint) = a -xa -> [a] -> [a] +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -xs +xs | Bool otherwise = [a] -xs +xs -- findExtremesBy :: (a -> a -> Ordering) -- -> NonEmpty a @@ -280,85 +280,85 @@ -- in STR l r [p | p <- F.toList pts, p /=. l, p /=. r] -incXdecY :: (Ord r, Point_ point 2 r) => point -> point -> Ordering +incXdecY :: (Ord r, Point_ point 2 r) => point -> point -> Ordering incXdecY :: forall r point. (Ord r, Point_ point 2 r) => point -> point -> Ordering -incXdecY (Point2_ r -px r -py) (Point2_ r -qx r -qy) = +incXdecY (Point2_ r +px r +py) (Point2_ r +qx r +qy) = r -> r -> Ordering forall a. Ord a => a -> a -> Ordering compare r -px r -qx Ordering -> Ordering -> Ordering +px r +qx Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> r -> r -> Ordering forall a. Ord a => a -> a -> Ordering compare r -qy r -py +qy r +py -- | include neigher left or right -- -hull :: forall point r. (Fractional r, Ord r, Point_ point 2 r) - => point -> point -> [point ] -> [point] +hull :: forall point r. (Fractional r, Ord r, Point_ point 2 r) + => point -> point -> [point ] -> [point] hull :: forall point r. (Fractional r, Ord r, Point_ point 2 r) => point -> point -> [point] -> [point] hull point _ point _ [] = [] -hull point -l point -r [point] -pts = point -> point -> [point] -> [point] +hull point +l point +r [point] +pts = point -> point -> [point] -> [point] forall point r. (Fractional r, Ord r, Point_ point 2 r) => point -> point -> [point] -> [point] hull point -l point -mid [point] -ls [point] -> [point] -> [point] +l point +mid [point] +ls [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point -mid] [point] -> [point] -> [point] +mid] [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> point -> point -> [point] -> [point] forall point r. (Fractional r, Ord r, Point_ point 2 r) => point -> point -> [point] -> [point] hull point -mid point -r [point] -rs +mid point +r [point] +rs where - m :: LinePV 2 r - m :: LinePV 2 r -m = point -> point -> LinePV 2 r + m :: LinePV 2 r + m :: LinePV 2 r +m = point -> point -> LinePV 2 r forall line point (d :: Nat) r. (Line_ line d r, Point_ point d r, Num r) => point -> point -> line lineThrough point -l point -r - mid :: point -mid = (point -> point -> Ordering) -> [point] -> point +l point +r + mid :: point +mid = (point -> point -> Ordering) -> [point] -> point forall (t :: * -> *) a. Foldable t => (a -> a -> Ordering) -> t a -> a F.maximumBy ((point -> r) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing point -> r -dist) [point] -pts +dist) [point] +pts - dist :: point -> r -dist point -p = point -p point -> LinePV 2 r -> r + dist :: point -> r +dist point +p = point +p point -> LinePV 2 r -> r forall g r (d :: Nat) point. (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) => @@ -368,58 +368,58 @@ Point_ point d r) => point -> LinePV 2 r -> r `squaredEuclideanDistTo` LinePV 2 r -m - t :: Triangle point -t = point -> point -> point -> Triangle point +m + t :: Triangle point +t = point -> point -> point -> Triangle point forall point. point -> point -> point -> Triangle point Triangle point -l point -mid point -r +l point +mid point +r -- line through l and mid, which splits the remaining points in a left half and a right half. - splitL :: LinePV 2 r -splitL = point -> point -> LinePV 2 r + splitL :: LinePV 2 r +splitL = point -> point -> LinePV 2 r forall line point (d :: Nat) r. (Line_ line d r, Point_ point d r, Num r) => point -> point -> line lineThrough point -l point -mid - rightSide :: SideTest -rightSide = point -r point -> LinePV 2 r -> SideTest +l point +mid + rightSide :: SideTest +rightSide = point +r point -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -splitL -- define the side containing r the right side +splitL -- define the side containing r the right side - ([point] -ls,[point] -rs) = (point -> Bool) -> [point] -> ([point], [point]) + ([point] +ls,[point] +rs) = (point -> Bool) -> [point] -> ([point], [point]) forall a. (a -> Bool) -> [a] -> ([a], [a]) -List.partition (\point -p -> point -p point -> LinePV 2 r -> SideTest +List.partition (\point +p -> point +p point -> LinePV 2 r -> SideTest forall r point. (Ord r, Num r, Point_ point 2 r) => point -> LinePV 2 r -> SideTest `onSide` LinePV 2 r -splitL SideTest -> SideTest -> Bool +splitL SideTest -> SideTest -> Bool forall a. Eq a => a -> a -> Bool /= SideTest -rightSide) +rightSide) ([point] -> ([point], [point])) -> ([point] -> [point]) -> [point] -> ([point], [point]) forall b c a. (b -> c) -> (a -> b) -> a -> c . (point -> Bool) -> [point] -> [point] forall a. (a -> Bool) -> [a] -> [a] -filter (\point -p -> Bool -> Bool +filter (\point +p -> Bool -> Bool not (Bool -> Bool) -> Bool -> Bool forall a b. (a -> b) -> a -> b $ (point -ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -429,8 +429,8 @@ asPoint) Point 2 r -> Triangle point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Triangle point -t) ([point] -> ([point], [point])) -> [point] -> ([point], [point]) +t) ([point] -> ([point], [point])) -> [point] -> ([point], [point]) forall a b. (a -> b) -> a -> b $ [point] -pts +pts \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.ConvexHull.R3.Naive.Dual.html b/haddocks/hgeometry/src/HGeometry.ConvexHull.R3.Naive.Dual.html deleted file mode 100644 index c0201f880..000000000 --- a/haddocks/hgeometry/src/HGeometry.ConvexHull.R3.Naive.Dual.html +++ /dev/null @@ -1,249 +0,0 @@ -
module HGeometry.ConvexHull.R3.Naive.Dual
-  ( UpperHull
-  , upperHull
-
-
-  , Facet
-  , facets
-  ) where
-
-import Control.Lens
-import Data.Foldable (toList)
-import Data.Foldable1
-import Data.List (find)
-import Data.List.NonEmpty (NonEmpty(..))
-import Data.Maybe (isNothing)
-import HGeometry.Combinatorial.Util
-import HGeometry.Duality
-import HGeometry.Ext
-import HGeometry.HalfSpace
-import HGeometry.HyperPlane
-import HGeometry.HyperPlane.NonVertical
-import HGeometry.Intersection (intersects)
-import HGeometry.Plane.LowerEnvelope
-import HGeometry.Plane.LowerEnvelope.Naive
-import HGeometry.Point
-import HGeometry.Properties
-import HGeometry.Triangle
-import HGeometry.Vector
-
---------------------------------------------------------------------------------
-
-
-
-type UpperHull point = LowerEnvelope (NonVerticalHyperPlane 3 (NumType point) :+ point)
-
-
--- | Computes the upper hull of a set of points in R^3
---
--- O(n^4)
-upperHull :: ( Point_ point 3 r
-             , Ord r, Fractional r
-             , Foldable1 f, Functor f
-
-             , Show point, Show r, Ord point
-             ) => f point -> UpperHull point
-upperHull :: forall point r (f :: * -> *).
-(Point_ point 3 r, Ord r, Fractional r, Foldable1 f, Functor f,
- Show point, Show r, Ord point) =>
-f point -> UpperHull point
-upperHull = f (NonVerticalHyperPlane 3 r :+ point)
--> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point)
-forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
- Ord plane, Show plane, Show r) =>
-f plane -> LowerEnvelope plane
-lowerEnvelope (f (NonVerticalHyperPlane 3 r :+ point)
- -> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point))
--> (f point -> f (NonVerticalHyperPlane 3 r :+ point))
--> f point
--> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point)
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (point -> NonVerticalHyperPlane 3 r :+ point)
--> f point -> f (NonVerticalHyperPlane 3 r :+ point)
-forall a b. (a -> b) -> f a -> f b
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-fmap (\point
-p -> point -> NonVerticalHyperPlane 3 r
-forall point (d :: Natural) r.
-(Point_ point d r, Num r, 1 <= d) =>
-point -> NonVerticalHyperPlane d r
-dualHyperPlane point
-p NonVerticalHyperPlane 3 r
--> point -> NonVerticalHyperPlane 3 r :+ point
-forall core extra. core -> extra -> core :+ extra
-:+ point
-p)
-
-
-type Facet point = [point]
-
--- | Outputs the facet sof the upper hull.
-facets :: UpperHull point -> [Facet point]
-facets :: forall point. UpperHull point -> [Facet point]
-facets = \case
-    ParallelStrips Set
-  (ParallelPlane (NonVerticalHyperPlane 3 (NumType point) :+ point))
-_      -> [Char] -> [Facet point]
-forall a. HasCallStack => [Char] -> a
-error [Char]
-"facets: parallel strips; no bounded facets"
-    ConnectedEnvelope LowerEnvelope' (NonVerticalHyperPlane 3 (NumType point) :+ point)
-env -> LowerEnvelope' (NonVerticalHyperPlane 3 (NumType point) :+ point)
-envLowerEnvelope' (NonVerticalHyperPlane 3 (NumType point) :+ point)
--> Getting
-     (Endo [Facet point])
-     (LowerEnvelope' (NonVerticalHyperPlane 3 (NumType point) :+ point))
-     (Facet point)
--> [Facet point]
-forall s a. s -> Getting (Endo [a]) s a -> [a]
-^..(Seq
-   (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point))
- -> Const
-      (Endo [Facet point])
-      (Seq
-         (BoundedVertex
-            (NonVerticalHyperPlane 3 (NumType point) :+ point))))
--> LowerEnvelope'
-     (NonVerticalHyperPlane 3 (NumType point) :+ point)
--> Const
-     (Endo [Facet point])
-     (LowerEnvelope' (NonVerticalHyperPlane 3 (NumType point) :+ point))
-forall plane (f :: * -> *).
-Functor f =>
-(Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane)))
--> LowerEnvelope' plane -> f (LowerEnvelope' plane)
-boundedVertices((Seq
-    (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point))
-  -> Const
-       (Endo [Facet point])
-       (Seq
-          (BoundedVertex
-             (NonVerticalHyperPlane 3 (NumType point) :+ point))))
- -> LowerEnvelope'
-      (NonVerticalHyperPlane 3 (NumType point) :+ point)
- -> Const
-      (Endo [Facet point])
-      (LowerEnvelope'
-         (NonVerticalHyperPlane 3 (NumType point) :+ point)))
--> ((Facet point -> Const (Endo [Facet point]) (Facet point))
-    -> Seq
-         (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point))
-    -> Const
-         (Endo [Facet point])
-         (Seq
-            (BoundedVertex
-               (NonVerticalHyperPlane 3 (NumType point) :+ point))))
--> Getting
-     (Endo [Facet point])
-     (LowerEnvelope' (NonVerticalHyperPlane 3 (NumType point) :+ point))
-     (Facet point)
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-.(BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)
- -> Const
-      (Endo [Facet point])
-      (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)))
--> Seq
-     (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point))
--> Const
-     (Endo [Facet point])
-     (Seq
-        (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)))
-forall (t :: * -> *) (f :: * -> *) a b.
-(Traversable t, Applicative f) =>
-(a -> f b) -> t a -> f (t b)
-forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> Seq a -> f (Seq b)
-traverse((BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)
-  -> Const
-       (Endo [Facet point])
-       (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)))
- -> Seq
-      (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point))
- -> Const
-      (Endo [Facet point])
-      (Seq
-         (BoundedVertex
-            (NonVerticalHyperPlane 3 (NumType point) :+ point))))
--> ((Facet point -> Const (Endo [Facet point]) (Facet point))
-    -> BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)
-    -> Const
-         (Endo [Facet point])
-         (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)))
--> (Facet point -> Const (Endo [Facet point]) (Facet point))
--> Seq
-     (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point))
--> Const
-     (Endo [Facet point])
-     (Seq
-        (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)))
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-.(BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)
- -> Facet point)
--> (Facet point -> Const (Endo [Facet point]) (Facet point))
--> BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)
--> Const
-     (Endo [Facet point])
-     (BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point))
-forall (p :: * -> * -> *) (f :: * -> *) s a.
-(Profunctor p, Contravariant f) =>
-(s -> a) -> Optic' p f s a
-to BoundedVertex (NonVerticalHyperPlane 3 (NumType point) :+ point)
--> Facet point
-forall (f :: * -> *) plane point.
-BoundedVertexF f (plane :+ point) -> Facet point
-toFacet
-  where
-    toFacet   :: BoundedVertexF f (plane :+ point) -> Facet point
-    toFacet :: forall (f :: * -> *) plane point.
-BoundedVertexF f (plane :+ point) -> Facet point
-toFacet BoundedVertexF f (plane :+ point)
-v = ((plane :+ point) -> Getting point (plane :+ point) point -> point
-forall s a. s -> Getting a s a -> a
-^.Getting point (plane :+ point) point
-forall core extra extra' (f :: * -> *).
-Functor f =>
-(extra -> f extra') -> (core :+ extra) -> f (core :+ extra')
-extra) ((plane :+ point) -> point) -> [plane :+ point] -> [point]
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-<$> BoundedVertexF f (plane :+ point)
-vBoundedVertexF f (plane :+ point)
--> Getting
-     [plane :+ point]
-     (BoundedVertexF f (plane :+ point))
-     [plane :+ point]
--> [plane :+ point]
-forall s a. s -> Getting a s a -> a
-^.(Set (plane :+ point)
- -> Const [plane :+ point] (Set (plane :+ point)))
--> BoundedVertexF f (plane :+ point)
--> Const [plane :+ point] (BoundedVertexF f (plane :+ point))
-forall (f1 :: * -> *) plane (f2 :: * -> *).
-Functor f2 =>
-(Set plane -> f2 (Set plane))
--> BoundedVertexF f1 plane -> f2 (BoundedVertexF f1 plane)
-definers((Set (plane :+ point)
-  -> Const [plane :+ point] (Set (plane :+ point)))
- -> BoundedVertexF f (plane :+ point)
- -> Const [plane :+ point] (BoundedVertexF f (plane :+ point)))
--> (([plane :+ point] -> Const [plane :+ point] [plane :+ point])
-    -> Set (plane :+ point)
-    -> Const [plane :+ point] (Set (plane :+ point)))
--> Getting
-     [plane :+ point]
-     (BoundedVertexF f (plane :+ point))
-     [plane :+ point]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-.(Set (plane :+ point) -> [plane :+ point])
--> ([plane :+ point] -> Const [plane :+ point] [plane :+ point])
--> Set (plane :+ point)
--> Const [plane :+ point] (Set (plane :+ point))
-forall (p :: * -> * -> *) (f :: * -> *) s a.
-(Profunctor p, Contravariant f) =>
-(s -> a) -> Optic' p f s a
-to Set (plane :+ point) -> [plane :+ point]
-forall a. Set a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-toList
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.ConvexHull.R3.Naive.html b/haddocks/hgeometry/src/HGeometry.ConvexHull.R3.Naive.html deleted file mode 100644 index e7fa8cc4c..000000000 --- a/haddocks/hgeometry/src/HGeometry.ConvexHull.R3.Naive.html +++ /dev/null @@ -1,277 +0,0 @@ -
--------------------------------------------------------------------------------
--- |
--- Module      :  HGeometry.ConvexHull.R3.Naive
--- Copyright   :  (C) Frank Staals
--- License     :  see the LICENSE file
--- Maintainer  :  Frank Staals
---------------------------------------------------------------------------------
-module HGeometry.ConvexHull.R3.Naive
-  ( ConvexHull
-  , lowerHull', lowerHullAll
-
-  , isValidTriangle, upperHalfSpaceOf
-  ) where
-
-import Control.Lens
-import Data.Foldable (toList)
-import Data.List (find)
-import Data.List.NonEmpty (NonEmpty(..))
-import Data.Maybe (isNothing)
-import HGeometry.Combinatorial.Util
-import HGeometry.HalfSpace
-import HGeometry.HyperPlane
-import HGeometry.Intersection (intersects)
-import HGeometry.Point
-import HGeometry.Triangle
-import HGeometry.Vector
-
---------------------------------------------------------------------------------
-
-type ConvexHull point = [Triangle point]
-
--- | Computes the lower hull without its vertical triangles.
---
--- pre: The points are in general position. In particular, no four
--- points should be coplanar.
---
--- running time: \(O(n^4)\)
-lowerHull' :: forall point r. (Ord r, Fractional r, Show r, Point_ point 3 r)
-           => NonEmpty point -> ConvexHull point
-lowerHull' :: forall point r.
-(Ord r, Fractional r, Show r, Point_ point 3 r) =>
-NonEmpty point -> ConvexHull point
-lowerHull' = (Triangle point -> Bool) -> [Triangle point] -> [Triangle point]
-forall a. (a -> Bool) -> [a] -> [a]
-filter (Bool -> Bool
-not (Bool -> Bool)
--> (Triangle point -> Bool) -> Triangle point -> Bool
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. Triangle point -> Bool
-isVertical) ([Triangle point] -> [Triangle point])
--> (NonEmpty point -> [Triangle point])
--> NonEmpty point
--> [Triangle point]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. NonEmpty point -> [Triangle point]
-forall r point.
-(Ord r, Fractional r, Show r, Point_ point 3 r) =>
-NonEmpty point -> ConvexHull point
-lowerHullAll
-  where
-    toPt2 :: point ->  Point 2 r
-    toPt2 :: point -> Point 2 r
-toPt2 = point -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint
-
-    isVertical :: Triangle point -> Bool
-isVertical (Triangle point
-p point
-q point
-r) = Point 2 r -> Point 2 r -> Point 2 r -> CCW
-forall point r point' point''.
-(Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r,
- Ord r) =>
-point -> point' -> point'' -> CCW
-ccw (point -> Point 2 r
-toPt2 point
-p) (point -> Point 2 r
-toPt2 point
-q) (point -> Point 2 r
-toPt2 point
-r) CCW -> CCW -> Bool
-forall a. Eq a => a -> a -> Bool
-== CCW
-CoLinear
-
--- | Generates a set of triangles to be used to construct a complete
--- convex hull. In particular, it may contain vertical triangles.
---
--- pre: The points are in general position. In particular, no four
--- points should be coplanar.
---
--- running time: \(O(n^4)\)
-lowerHullAll                 :: (Ord r, Fractional r, Show r, Point_ point 3 r)
-                             => NonEmpty point -> ConvexHull point
-lowerHullAll :: forall r point.
-(Ord r, Fractional r, Show r, Point_ point 3 r) =>
-NonEmpty point -> ConvexHull point
-lowerHullAll (NonEmpty point -> [point]
-forall a. NonEmpty a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-toList -> [point]
-pts) = let mkT :: Three point -> Triangle point
-mkT (Three point
-p point
-q point
-r) = point -> point -> point -> Triangle point
-forall point. point -> point -> point -> Triangle point
-Triangle point
-p point
-q point
-r in
-    [ Triangle point
-t | Triangle point
-t <- Three point -> Triangle point
-forall {point}. Three point -> Triangle point
-mkT (Three point -> Triangle point)
--> [Three point] -> [Triangle point]
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-<$> [point] -> [Three point]
-forall (f :: * -> *) a. Foldable f => f a -> [Three a]
-uniqueTriplets [point]
-pts, Maybe point -> Bool
-forall a. Maybe a -> Bool
-isNothing (Triangle point -> [point] -> Maybe point
-forall r point.
-(Num r, Ord r, Point_ point 3 r) =>
-Triangle point -> [point] -> Maybe point
-isValidTriangle Triangle point
-t [point]
-pts) ]
-
-
-
-_killOverlapping :: ( Ord r, Fractional r
-                    , Point_ point 3 r
-                    ) => [Triangle point] -> [Triangle point]
-_killOverlapping :: forall r point.
-(Ord r, Fractional r, Point_ point 3 r) =>
-[Triangle point] -> [Triangle point]
-_killOverlapping = (Triangle point -> [Triangle point] -> [Triangle point])
--> [Triangle point] -> [Triangle point] -> [Triangle point]
-forall a b. (a -> b -> b) -> b -> [a] -> b
-forall (t :: * -> *) a b.
-Foldable t =>
-(a -> b -> b) -> b -> t a -> b
-foldr Triangle point -> [Triangle point] -> [Triangle point]
-forall {point}.
-(Dimension point ~ 3, Fractional (NumType point),
- Ord (NumType point), Point_ point 3 (NumType point)) =>
-Triangle point -> [Triangle point] -> [Triangle point]
-keepIfNotOverlaps []
-  where
-    keepIfNotOverlaps :: Triangle point -> [Triangle point] -> [Triangle point]
-keepIfNotOverlaps Triangle point
-t [Triangle point]
-ts | (Triangle point -> Bool) -> [Triangle point] -> Bool
-forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
-any (Triangle point
-t `overlaps`) [Triangle point]
-ts = [Triangle point]
-ts
-                           | Bool
-otherwise             = Triangle point
-tTriangle point -> [Triangle point] -> [Triangle point]
-forall a. a -> [a] -> [a]
-:[Triangle point]
-ts
-
-overlaps :: (Fractional r, Ord r, Point_ point 3 r) => Triangle point -> Triangle point -> Bool
-Triangle point
-t1 overlaps :: forall r point.
-(Fractional r, Ord r, Point_ point 3 r) =>
-Triangle point -> Triangle point -> Bool
-`overlaps` Triangle point
-t2 = Triangle point -> HalfSpace 3 r
-forall r point.
-(Ord r, Num r, Point_ point 3 r) =>
-Triangle point -> HalfSpace 3 r
-upperHalfSpaceOf Triangle point
-t1 HalfSpace 3 r -> HalfSpace 3 r -> Bool
-forall a. Eq a => a -> a -> Bool
-== Triangle point -> HalfSpace 3 r
-forall r point.
-(Ord r, Num r, Point_ point 3 r) =>
-Triangle point -> HalfSpace 3 r
-upperHalfSpaceOf Triangle point
-t2 Bool -> Bool -> Bool
-&& Bool
-False
-
-
--- | Tests if this is a valid triangle for the lower envelope. That
--- is, if all point lie above the plane through these points. Returns
--- a Maybe; if the result is a Nothing the triangle is valid, if not
--- it returns a counter example.
---
--- >>> let t = (Triangle origin (Point3 1 0 0) (Point3 0 1 0))
--- >>> isValidTriangle t [Point3 5 5 0]
--- Nothing
--- >>> let t = (Triangle origin (Point3 1 0 0) (Point3 0 1 0))
--- >>> isValidTriangle t [Point3 5 5 (-10)]
--- Just (Point3 5 5 (-10))
-isValidTriangle   :: (Num r, Ord r, Point_ point 3 r)
-                  => Triangle point -> [point] -> Maybe point
-isValidTriangle :: forall r point.
-(Num r, Ord r, Point_ point 3 r) =>
-Triangle point -> [point] -> Maybe point
-isValidTriangle Triangle point
-t = (point -> Bool) -> [point] -> Maybe point
-forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Maybe a
-find (\point
-q -> Bool -> Bool
-not (Bool -> Bool) -> Bool -> Bool
-forall a b. (a -> b) -> a -> b
-$ (point
-qpoint -> Getting (Point 3 r) point (Point 3 r) -> Point 3 r
-forall s a. s -> Getting a s a -> a
-^.Getting (Point 3 r) point (Point 3 r)
-forall point (d :: Nat) r.
-Point_ point d r =>
-Lens' point (Point d r)
-Lens' point (Point 3 r)
-asPoint) Point 3 r -> HalfSpace 3 r -> Bool
-forall g h. HasIntersectionWith g h => g -> h -> Bool
-`intersects` HalfSpace 3 r
-h)
-  where
-    h :: HalfSpace 3 r
-h = Triangle point -> HalfSpace 3 r
-forall r point.
-(Ord r, Num r, Point_ point 3 r) =>
-Triangle point -> HalfSpace 3 r
-upperHalfSpaceOf Triangle point
-t
-
-
--- | Computes the halfspace above the triangle.
---
--- >>> upperHalfSpaceOf (Triangle origin (Point3 10 0 0) (Point3 0 10 0))
--- HalfSpace Positive (HyperPlane [0,0,0,-100])
-upperHalfSpaceOf                  :: (Ord r, Num r, Point_ point 3 r)
-                                  => Triangle point -> HalfSpace 3 r
-upperHalfSpaceOf :: forall r point.
-(Ord r, Num r, Point_ point 3 r) =>
-Triangle point -> HalfSpace 3 r
-upperHalfSpaceOf (Triangle point
-p point
-q point
-r) = Sign -> HyperPlane 3 r -> HalfSpaceF (HyperPlane 3 r)
-forall boundingHyperPlane.
-Sign -> boundingHyperPlane -> HalfSpaceF boundingHyperPlane
-HalfSpace Sign
-Positive HyperPlane 3 r
-h
-  where
-    h :: HyperPlane 3 r
-h = Vector 3 point -> HyperPlane 3 r
-forall hyperPlane point (d :: Nat) r.
-(HyperPlaneFromPoints hyperPlane, Point_ point d r,
- HyperPlane_ hyperPlane d r, Num r) =>
-Vector d point -> hyperPlane
-forall point (d :: Nat) r.
-(Point_ point d r, HyperPlane_ (HyperPlane 3 r) d r, Num r) =>
-Vector d point -> HyperPlane 3 r
-hyperPlaneThrough (Vector 3 point -> HyperPlane 3 r)
--> Vector 3 point -> HyperPlane 3 r
-forall a b. (a -> b) -> a -> b
-$ point -> point -> point -> Vector 3 point
-forall r. r -> r -> r -> Vector 3 r
-Vector3 point
-p point
-q point
-r
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Graphics.Camera.html b/haddocks/hgeometry/src/HGeometry.Graphics.Camera.html index 60422e6f1..5bd591966 100644 --- a/haddocks/hgeometry/src/HGeometry.Graphics.Camera.html +++ b/haddocks/hgeometry/src/HGeometry.Graphics.Camera.html @@ -40,23 +40,23 @@ -- * the far distance (everything further away than this is clipped), and -- * the screen dimensions. -- -data Camera r = Camera { forall r. Camera r -> Point 3 r -_cameraPosition :: !(Point 3 r) +data Camera r = Camera { forall r. Camera r -> Point 3 r +_cameraPosition :: !(Point 3 r) , forall r. Camera r -> Vector 3 r -_rawCameraNormal :: !(Vector 3 r) +_rawCameraNormal :: !(Vector 3 r) -- ^ unit vector from camera into center of the screen , forall r. Camera r -> Vector 3 r -_rawViewUp :: !(Vector 3 r) +_rawViewUp :: !(Vector 3 r) -- ^ viewUp; assumed to be unit vector , forall r. Camera r -> r -_viewPlaneDepth :: !r +_viewPlaneDepth :: !r , forall r. Camera r -> r -_nearDist :: !r +_nearDist :: !r , forall r. Camera r -> r -_farDist :: !r +_farDist :: !r , forall r. Camera r -> Vector 2 r -_screenDimensions :: !(Vector 2 r) - } deriving (Int -> Camera r -> ShowS +_screenDimensions :: !(Vector 2 r) + } deriving (Int -> Camera r -> ShowS [Camera r] -> ShowS Camera r -> String (Int -> Camera r -> ShowS) @@ -72,7 +72,7 @@ show :: Camera r -> String $cshowList :: forall r. Show r => [Camera r] -> ShowS showList :: [Camera r] -> ShowS -Show,Camera r -> Camera r -> Bool +Show,Camera r -> Camera r -> Bool (Camera r -> Camera r -> Bool) -> (Camera r -> Camera r -> Bool) -> Eq (Camera r) forall r. Eq r => Camera r -> Camera r -> Bool @@ -81,7 +81,7 @@ == :: Camera r -> Camera r -> Bool $c/= :: forall r. Eq r => Camera r -> Camera r -> Bool /= :: Camera r -> Camera r -> Bool -Eq,Eq (Camera r) +Eq,Eq (Camera r) Eq (Camera r) => (Camera r -> Camera r -> Ordering) -> (Camera r -> Camera r -> Bool) @@ -131,7 +131,7 @@ -- makeLenses ''Camera -- | Camera position. -cameraPosition :: Lens' (Camera r) (Point 3 r) +cameraPosition :: Lens' (Camera r) (Point 3 r) cameraPosition :: forall r (f :: * -> *). Functor f => (Point 3 r -> f (Point 3 r)) -> Camera r -> f (Camera r) @@ -141,13 +141,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> Point 3 r forall r. Camera r -> Point 3 r -_cameraPosition (\Camera r -cam Point 3 r -p -> Camera r -cam{_cameraPosition=p}) +_cameraPosition (\Camera r +cam Point 3 r +p -> Camera r +cam{_cameraPosition=p}) -- | Raw camera normal, i.e. a unit vector into the center of the screen. -rawCameraNormal :: Lens' (Camera r) (Vector 3 r) +rawCameraNormal :: Lens' (Camera r) (Vector 3 r) rawCameraNormal :: forall r (f :: * -> *). Functor f => (Vector 3 r -> f (Vector 3 r)) -> Camera r -> f (Camera r) @@ -157,13 +157,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> Vector 3 r forall r. Camera r -> Vector 3 r -_rawCameraNormal (\Camera r -cam Vector 3 r -r -> Camera r -cam{_rawCameraNormal=r}) +_rawCameraNormal (\Camera r +cam Vector 3 r +r -> Camera r +cam{_rawCameraNormal=r}) -- | Raw view up vector indicating which side points "upwards" in the scene. -rawViewUp :: Lens' (Camera r) (Vector 3 r) +rawViewUp :: Lens' (Camera r) (Vector 3 r) rawViewUp :: forall r (f :: * -> *). Functor f => (Vector 3 r -> f (Vector 3 r)) -> Camera r -> f (Camera r) @@ -173,13 +173,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> Vector 3 r forall r. Camera r -> Vector 3 r -_rawViewUp (\Camera r -cam Vector 3 r -r -> Camera r -cam{_rawViewUp=r}) +_rawViewUp (\Camera r +cam Vector 3 r +r -> Camera r +cam{_rawViewUp=r}) -- | Viewplane depth (i.e. the distance from the camera position to the plane on which we project). -viewPlaneDepth :: Lens' (Camera r) r +viewPlaneDepth :: Lens' (Camera r) r viewPlaneDepth :: forall r (f :: * -> *). Functor f => (r -> f r) -> Camera r -> f (Camera r) @@ -188,13 +188,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> r forall r. Camera r -> r -_viewPlaneDepth (\Camera r -cam r -v -> Camera r -cam{_viewPlaneDepth=v}) +_viewPlaneDepth (\Camera r +cam r +v -> Camera r +cam{_viewPlaneDepth=v}) -- | Near distance (everything closer than this is clipped). -nearDist :: Lens' (Camera r) r +nearDist :: Lens' (Camera r) r nearDist :: forall r (f :: * -> *). Functor f => (r -> f r) -> Camera r -> f (Camera r) @@ -203,13 +203,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> r forall r. Camera r -> r -_nearDist (\Camera r -cam r -n -> Camera r -cam{_nearDist=n}) +_nearDist (\Camera r +cam r +n -> Camera r +cam{_nearDist=n}) -- | Far distance (everything further away than this is clipped). -farDist :: Lens' (Camera r) r +farDist :: Lens' (Camera r) r farDist :: forall r (f :: * -> *). Functor f => (r -> f r) -> Camera r -> f (Camera r) @@ -218,13 +218,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> r forall r. Camera r -> r -_farDist (\Camera r -cam r -f -> Camera r -cam{_farDist=f}) +_farDist (\Camera r +cam r +f -> Camera r +cam{_farDist=f}) -- | Screen dimensions. -screenDimensions :: Lens' (Camera r) (Vector 2 r) +screenDimensions :: Lens' (Camera r) (Vector 2 r) screenDimensions :: forall r (f :: * -> *). Functor f => (Vector 2 r -> f (Vector 2 r)) -> Camera r -> f (Camera r) @@ -234,10 +234,10 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> Vector 2 r forall r. Camera r -> Vector 2 r -_screenDimensions (\Camera r -cam Vector 2 r -d -> Camera r -cam{_screenDimensions=d}) +_screenDimensions (\Camera r +cam Vector 2 r +d -> Camera r +cam{_screenDimensions=d}) -------------------------------------------------------------------------------- @@ -245,7 +245,7 @@ -- | Lens to get and set the Camera normal, makes sure that the vector remains -- normalized. -cameraNormal :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r) +cameraNormal :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r) cameraNormal :: forall r. (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r) @@ -255,15 +255,15 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> Vector 3 r forall r. Camera r -> Vector 3 r -_rawCameraNormal (\Camera r -c Vector 3 r -n -> Camera r -c { _rawCameraNormal = signorm n} ) +_rawCameraNormal (\Camera r +c Vector 3 r +n -> Camera r +c { _rawCameraNormal = signorm n} ) -- | Lens to get and set the viewUp vector. Makes sure the vector remains -- normalized. -viewUp :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r) +viewUp :: (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r) viewUp :: forall r. (Radical r, Fractional r) => Lens' (Camera r) (Vector 3 r) @@ -273,10 +273,10 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Camera r -> Vector 3 r forall r. Camera r -> Vector 3 r -_rawViewUp (\Camera r -c Vector 3 r -n -> Camera r -c { _rawViewUp = signorm n}) +_rawViewUp (\Camera r +c Vector 3 r +n -> Camera r +c { _rawViewUp = signorm n}) -------------------------------------------------------------------------------- @@ -284,13 +284,13 @@ -- | Full transformation that renders the figure -cameraTransform :: Fractional r => Camera r -> Transformation 3 r +cameraTransform :: Fractional r => Camera r -> Transformation 3 r cameraTransform :: forall r. Fractional r => Camera r -> Transformation 3 r -cameraTransform Camera r -c = Camera r -> Transformation 3 r +cameraTransform Camera r +c = Camera r -> Transformation 3 r forall r. Fractional r => Camera r -> Transformation 3 r toViewPort Camera r -c +c Transformation 3 r -> Transformation 3 r -> Transformation 3 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => @@ -298,7 +298,7 @@ |.| Camera r -> Transformation 3 r forall r. Fractional r => Camera r -> Transformation 3 r perspectiveProjection Camera r -c +c Transformation 3 r -> Transformation 3 r -> Transformation 3 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => @@ -306,16 +306,16 @@ |.| Camera r -> Transformation 3 r forall r. Fractional r => Camera r -> Transformation 3 r worldToView Camera r -c +c -- | Translates world coordinates into view coordinates -worldToView :: Fractional r => Camera r -> Transformation 3 r +worldToView :: Fractional r => Camera r -> Transformation 3 r worldToView :: forall r. Fractional r => Camera r -> Transformation 3 r -worldToView Camera r -c = Camera r -> Transformation 3 r +worldToView Camera r +c = Camera r -> Transformation 3 r forall r. Num r => Camera r -> Transformation 3 r rotateCoordSystem Camera r -c Transformation 3 r -> Transformation 3 r -> Transformation 3 r +c Transformation 3 r -> Transformation 3 r -> Transformation 3 r forall r (d :: Nat). (Num r, OptMatrix_ (d + 1) r) => Transformation d r -> Transformation d r -> Transformation d r @@ -329,7 +329,7 @@ (Num r, Vector_ vector d r) => r -> vector -> vector *^ Camera r -cCamera r +cCamera r -> Getting (Vector 3 r) (Camera r) (Vector 3 r) -> Vector 3 r forall s a. s -> Getting a s a -> a ^.(Point 3 r -> Const (Vector 3 r) (Point 3 r)) @@ -357,10 +357,10 @@ vector) -- | Transformation into viewport coordinates -toViewPort :: Fractional r => Camera r -> Transformation 3 r +toViewPort :: Fractional r => Camera r -> Transformation 3 r toViewPort :: forall r. Fractional r => Camera r -> Transformation 3 r -toViewPort Camera r -c = Matrix 4 4 r -> Transformation 3 r +toViewPort Camera r +c = Matrix 4 4 r -> Transformation 3 r Matrix (3 + 1) (3 + 1) r -> Transformation 3 r forall (d :: Nat) r. Matrix (d + 1) (d + 1) r -> Transformation d r Transformation (Matrix 4 4 r -> Transformation 3 r) @@ -381,7 +381,7 @@ Vector4 (r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 (r -wr -> r -> r +wr -> r -> r forall a. Fractional a => a -> a -> a /r 2) r @@ -392,7 +392,7 @@ forall r. r -> r -> r -> r -> Vector 4 r Vector4 r 0 (r -hr -> r -> r +hr -> r -> r forall a. Fractional a => a -> a -> a /r 2) r @@ -419,10 +419,10 @@ 0 r 1) where - Vector2 r -w r -h = Camera r -cCamera r + Vector2 r +w r +h = Camera r +cCamera r -> Getting (Vector 2 r) (Camera r) (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 r) (Camera r) (Vector 2 r) @@ -433,10 +433,10 @@ -- | constructs a perspective projection -perspectiveProjection :: Fractional r => Camera r -> Transformation 3 r +perspectiveProjection :: Fractional r => Camera r -> Transformation 3 r perspectiveProjection :: forall r. Fractional r => Camera r -> Transformation 3 r -perspectiveProjection Camera r -c = Matrix 4 4 r -> Transformation 3 r +perspectiveProjection Camera r +c = Matrix 4 4 r -> Transformation 3 r Matrix (3 + 1) (3 + 1) r -> Transformation 3 r forall (d :: Nat) r. Matrix (d + 1) (d + 1) r -> Transformation d r Transformation (Matrix 4 4 r -> Transformation 3 r) @@ -457,10 +457,10 @@ Vector4 (r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 (-r -nr -> r -> r +nr -> r -> r forall a. Fractional a => a -> a -> a /r -rx) r +rx) r 0 r 0 r 0) @@ -468,10 +468,10 @@ forall r. r -> r -> r -> r -> Vector 4 r Vector4 r 0 (-r -nr -> r -> r +nr -> r -> r forall a. Fractional a => a -> a -> a /r -ry) r +ry) r 0 r 0) (r -> r -> r -> r -> Vector 4 r @@ -479,29 +479,29 @@ Vector4 r 0 r 0 (-(r -nr -> r -> r +nr -> r -> r forall a. Num a => a -> a -> a +r -f)r -> r -> r +f)r -> r -> r forall a. Fractional a => a -> a -> a /(r -nr -> r -> r +nr -> r -> r forall a. Num a => a -> a -> a -r -f)) (-r +f)) (-r 2r -> r -> r forall a. Num a => a -> a -> a *r -nr -> r -> r +nr -> r -> r forall a. Num a => a -> a -> a *r -fr -> r -> r +fr -> r -> r forall a. Fractional a => a -> a -> a /(r -nr -> r -> r +nr -> r -> r forall a. Num a => a -> a -> a -r -f))) +f))) (r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 r @@ -510,33 +510,33 @@ 1 r 0) where - n :: r -n = Camera r -cCamera r -> Getting r (Camera r) r -> r + n :: r +n = Camera r +cCamera r -> Getting r (Camera r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Camera r) r forall r (f :: * -> *). Functor f => (r -> f r) -> Camera r -> f (Camera r) nearDist - f :: r -f = Camera r -cCamera r -> Getting r (Camera r) r -> r + f :: r +f = Camera r +cCamera r -> Getting r (Camera r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Camera r) r forall r (f :: * -> *). Functor f => (r -> f r) -> Camera r -> f (Camera r) farDist - Vector2 r -rx r -ry = (r -> r -> r + Vector2 r +rx r +ry = (r -> r -> r forall a. Fractional a => a -> a -> a /r 2) (r -> r) -> Vector 2 r -> Vector 2 r forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Camera r -cCamera r +cCamera r -> Getting (Vector 2 r) (Camera r) (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 r) (Camera r) (Vector 2 r) @@ -547,10 +547,10 @@ -- | Rotates coordinate system around the camera, such that we look in the negative z -- direction -rotateCoordSystem :: Num r => Camera r -> Transformation 3 r +rotateCoordSystem :: Num r => Camera r -> Transformation 3 r rotateCoordSystem :: forall r. Num r => Camera r -> Transformation 3 r -rotateCoordSystem Camera r -c = Vector 3 (Vector 3 r) -> Transformation 3 r +rotateCoordSystem Camera r +c = Vector 3 (Vector 3 r) -> Transformation 3 r forall r. Num r => Vector 3 (Vector 3 r) -> Transformation 3 r rotateTo (Vector 3 (Vector 3 r) -> Transformation 3 r) -> Vector 3 (Vector 3 r) -> Transformation 3 r @@ -558,13 +558,13 @@ $ Vector 3 r -> Vector 3 r -> Vector 3 r -> Vector 3 (Vector 3 r) forall r. r -> r -> r -> Vector 3 r Vector3 Vector 3 r -u Vector 3 r -v Vector 3 r -n +u Vector 3 r +v Vector 3 r +n where - u :: Vector 3 r -u = (Camera r -cCamera r + u :: Vector 3 r +u = (Camera r +cCamera r -> Getting (Vector 3 r) (Camera r) (Vector 3 r) -> Vector 3 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 3 r) (Camera r) (Vector 3 r) @@ -574,21 +574,21 @@ rawViewUp) Vector 3 r -> Vector 3 r -> Vector 3 r forall r. Num r => Vector 3 r -> Vector 3 r -> Vector 3 r `cross` Vector 3 r -n - v :: Vector 3 r -v = Vector 3 r -n Vector 3 r -> Vector 3 r -> Vector 3 r +n + v :: Vector 3 r +v = Vector 3 r +n Vector 3 r -> Vector 3 r -> Vector 3 r forall r. Num r => Vector 3 r -> Vector 3 r -> Vector 3 r `cross` Vector 3 r -u - n :: Vector 3 r -n = (-r +u + n :: Vector 3 r +n = (-r 1) r -> Vector 3 r -> Vector 3 r forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ Camera r -cCamera r +cCamera r -> Getting (Vector 3 r) (Camera r) (Vector 3 r) -> Vector 3 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 3 r) (Camera r) (Vector 3 r) @@ -603,7 +603,7 @@ -- transformBy' (Transformation m) (Vector3 x y z) = m `mult` (Vector4 x y z (-z)) -- | Flips the y and z axis. -flipAxes :: Num r => Transformation 3 r +flipAxes :: Num r => Transformation 3 r flipAxes :: forall r. Num r => Transformation 3 r flipAxes = Matrix 4 4 r -> Transformation 3 r Matrix (3 + 1) (3 + 1) r -> Transformation 3 r diff --git a/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.Chain.html b/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.Chain.html index f5d3d7e7f..2b2e70a09 100644 --- a/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.Chain.html +++ b/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.Chain.html @@ -25,13 +25,13 @@ -- | A polygonal chain bounding an unbounded convex region, in CCW order. -newtype Chain f halfPlane r = Chain (Alternating f (Point 2 r) halfPlane) +newtype Chain f halfPlane r = Chain (Alternating f (Point 2 r) halfPlane) -- | Iso to convert to just an Alternating -_ChainAlternating :: Iso (Chain f halfPlane r) - (Chain f' halfPlane' r') - (Alternating f (Point 2 r) halfPlane) - (Alternating f' (Point 2 r') halfPlane') +_ChainAlternating :: Iso (Chain f halfPlane r) + (Chain f' halfPlane' r') + (Alternating f (Point 2 r) halfPlane) + (Alternating f' (Point 2 r') halfPlane') _ChainAlternating :: forall (f :: * -> *) halfPlane r (f' :: * -> *) halfPlane' r' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -49,19 +49,19 @@ (Alternating f' (Point 2 r') halfPlane') coerced -deriving instance ( Show halfPlane, Show (f (Point 2 r, halfPlane)) - ) => Show (Chain f halfPlane r) +deriving instance ( Show halfPlane, Show (f (Point 2 r, halfPlane)) + ) => Show (Chain f halfPlane r) -deriving instance ( Eq halfPlane, Eq (f (Point 2 r, halfPlane)) - ) => Eq (Chain f halfPlane r) +deriving instance ( Eq halfPlane, Eq (f (Point 2 r, halfPlane)) + ) => Eq (Chain f halfPlane r) -deriving instance ( Ord halfPlane, Ord (f (Point 2 r, halfPlane)) - ) => Ord (Chain f halfPlane r) +deriving instance ( Ord halfPlane, Ord (f (Point 2 r, halfPlane)) + ) => Ord (Chain f halfPlane r) -instance Functor f => Functor (Chain f r) where - fmap :: forall a b. (a -> b) -> Chain f r a -> Chain f r b -fmap a -> b -f = (r -> r) -> (a -> b) -> Chain f r a -> Chain f r b +instance Functor f => Functor (Chain f r) where + fmap :: forall a b. (a -> b) -> Chain f r a -> Chain f r b +fmap a -> b +f = (r -> r) -> (a -> b) -> Chain f r a -> Chain f r b forall a b c d. (a -> b) -> (c -> d) -> Chain f a c -> Chain f b d forall (p :: * -> * -> *) a b c d. Bifunctor p => @@ -69,12 +69,12 @@ bimap r -> r forall a. a -> a id a -> b -f -instance Functor f => Bifunctor (Chain f) where - bimap :: forall a b c d. (a -> b) -> (c -> d) -> Chain f a c -> Chain f b d -bimap a -> b -f c -> d -g = (a -> b) -> (Point 2 c -> Point 2 d) -> Chain f a c -> Chain f b d +f +instance Functor f => Bifunctor (Chain f) where + bimap :: forall a b c d. (a -> b) -> (c -> d) -> Chain f a c -> Chain f b d +bimap a -> b +f c -> d +g = (a -> b) -> (Point 2 c -> Point 2 d) -> Chain f a c -> Chain f b d forall (f :: * -> *) halfPlane halfPlane' r s. Functor f => (halfPlane -> halfPlane') @@ -82,7 +82,7 @@ -> Chain f halfPlane r -> Chain f halfPlane' s bimap' a -> b -f (ASetter (Point 2 c) (Point 2 d) c d +f (ASetter (Point 2 c) (Point 2 d) c d -> (c -> d) -> Point 2 c -> Point 2 d forall s t a b. ASetter s t a b -> (a -> b) -> s -> t over ASetter (Point 2 c) (Point 2 d) c d @@ -98,23 +98,23 @@ (NumType (Point 2 c)) (NumType (Point 2 d)) coordinates c -> d -g) +g) -- | slightly more general version of bimap so we can easily flip the plane. -bimap' :: Functor f - => (halfPlane -> halfPlane') - -> (Point 2 r -> Point 2 s) - -> Chain f halfPlane r -> Chain f halfPlane' s +bimap' :: Functor f + => (halfPlane -> halfPlane') + -> (Point 2 r -> Point 2 s) + -> Chain f halfPlane r -> Chain f halfPlane' s bimap' :: forall (f :: * -> *) halfPlane halfPlane' r s. Functor f => (halfPlane -> halfPlane') -> (Point 2 r -> Point 2 s) -> Chain f halfPlane r -> Chain f halfPlane' s -bimap' halfPlane -> halfPlane' -f Point 2 r -> Point 2 s -g (Chain Alternating f (Point 2 r) halfPlane -alt) = Alternating f (Point 2 s) halfPlane' -> Chain f halfPlane' s +bimap' halfPlane -> halfPlane' +f Point 2 r -> Point 2 s +g (Chain Alternating f (Point 2 r) halfPlane +alt) = Alternating f (Point 2 s) halfPlane' -> Chain f halfPlane' s forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain (Alternating f (Point 2 s) halfPlane' -> Chain f halfPlane' s) @@ -130,34 +130,34 @@ Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d bimap Point 2 r -> Point 2 s -g halfPlane -> halfPlane' -f Alternating f (Point 2 r) halfPlane -alt +g halfPlane -> halfPlane' +f Alternating f (Point 2 r) halfPlane +alt -- | Evaluates the chain at the given x-coordinate. Returns the value (y-coordinate) y at -- the given x-coordinate x, and the halfplane containing the point (x,y) -evalChainAt :: (Num r, Ord r) - => r -> Chain Seq (LineEQ r :+ halfPlane) r -> (r :+ halfPlane) +evalChainAt :: (Num r, Ord r) + => r -> Chain Seq (LineEQ r :+ halfPlane) r -> (r :+ halfPlane) evalChainAt :: forall r halfPlane. (Num r, Ord r) => r -> Chain Seq (LineEQ r :+ halfPlane) r -> r :+ halfPlane -evalChainAt r -x Chain Seq (LineEQ r :+ halfPlane) r -chain = let chain' :: Chain Seq (LineEQ r :+ halfPlane) r -chain' = r +evalChainAt r +x Chain Seq (LineEQ r :+ halfPlane) r +chain = let chain' :: Chain Seq (LineEQ r :+ halfPlane) r +chain' = r -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r forall r halfPlane. Ord r => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r clipLeft r -x Chain Seq (LineEQ r :+ halfPlane) r -chain - (LineEQ r -l :+ halfPlane -h) = Chain Seq (LineEQ r :+ halfPlane) r -chain'Chain Seq (LineEQ r :+ halfPlane) r +x Chain Seq (LineEQ r :+ halfPlane) r +chain + (LineEQ r +l :+ halfPlane +h) = Chain Seq (LineEQ r :+ halfPlane) r +chain'Chain Seq (LineEQ r :+ halfPlane) r -> Getting (LineEQ r :+ halfPlane) (Chain Seq (LineEQ r :+ halfPlane) r) @@ -209,14 +209,14 @@ in r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' r -x LineEQ r -l r -> halfPlane -> r :+ halfPlane +x LineEQ r +l r -> halfPlane -> r :+ halfPlane forall core extra. core -> extra -> core :+ extra :+ halfPlane -h +h -- | Get the leftmost line in the chain -leftMost :: Chain Seq (line :+ halfPlane) r -> line +leftMost :: Chain Seq (line :+ halfPlane) r -> line leftMost :: forall line halfPlane r. Chain Seq (line :+ halfPlane) r -> line leftMost = Getting line (Chain Seq (line :+ halfPlane) r) line -> Chain Seq (line :+ halfPlane) r -> line @@ -267,13 +267,13 @@ -------------------------------------------------------------------------------- -- | Given a value x, Clip the chain to the interval \((-\infty,x]\) -clipRight :: Ord r - => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r +clipRight :: Ord r + => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r clipRight :: forall r halfPlane. Ord r => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r -clipRight r -maxX = ((Point 2 r, halfPlane) -> Bool) +clipRight r +maxX = ((Point 2 r, halfPlane) -> Bool) -> Chain Seq halfPlane r -> Chain Seq halfPlane r forall r halfPlane. ((Point 2 r, halfPlane) -> Bool) @@ -284,10 +284,10 @@ -> Chain Seq halfPlane r -> Chain Seq halfPlane r forall a b. (a -> b) -> a -> b -$ \(Point 2 r -v, halfPlane +$ \(Point 2 r +v, halfPlane _) -> Point 2 r -vPoint 2 r -> Getting r (Point 2 r) r -> r +vPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -297,16 +297,16 @@ xCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool >= r -maxX +maxX -- | Given a value x, Clip the chain to the interval \([x,\infty)\) -clipLeft :: Ord r - => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r +clipLeft :: Ord r + => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r clipLeft :: forall r halfPlane. Ord r => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r -clipLeft r -minX = ((Point 2 r, halfPlane) -> Bool) +clipLeft r +minX = ((Point 2 r, halfPlane) -> Bool) -> Chain Seq halfPlane r -> Chain Seq halfPlane r forall r halfPlane. ((Point 2 r, halfPlane) -> Bool) @@ -317,10 +317,10 @@ -> Chain Seq halfPlane r -> Chain Seq halfPlane r forall a b. (a -> b) -> a -> b -$ \(Point 2 r -v, halfPlane +$ \(Point 2 r +v, halfPlane _) -> Point 2 r -vPoint 2 r -> Getting r (Point 2 r) r -> r +vPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -330,16 +330,16 @@ xCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -minX +minX -- | Clip on the right by a line -_clipRightLine :: (Ord r, Num r) - => LineEQ r -> Chain Seq halfPlane r -> Chain Seq halfPlane r +_clipRightLine :: (Ord r, Num r) + => LineEQ r -> Chain Seq halfPlane r -> Chain Seq halfPlane r _clipRightLine :: forall r halfPlane. (Ord r, Num r) => LineEQ r -> Chain Seq halfPlane r -> Chain Seq halfPlane r -_clipRightLine LineEQ r -right = ((Point 2 r, halfPlane) -> Bool) +_clipRightLine LineEQ r +right = ((Point 2 r, halfPlane) -> Bool) -> Chain Seq halfPlane r -> Chain Seq halfPlane r forall r halfPlane. ((Point 2 r, halfPlane) -> Bool) @@ -347,16 +347,16 @@ clipRightWhen (LineEQ r -> (Point 2 r, halfPlane) -> Bool forall r a. (Ord r, Num r) => LineEQ r -> (Point 2 r, a) -> Bool _above LineEQ r -right) +right) -- | Clip the left by a line -_clipLeftLine :: (Ord r, Num r) - => LineEQ r -> Chain Seq halfPlane r -> Chain Seq halfPlane r +_clipLeftLine :: (Ord r, Num r) + => LineEQ r -> Chain Seq halfPlane r -> Chain Seq halfPlane r _clipLeftLine :: forall r halfPlane. (Ord r, Num r) => LineEQ r -> Chain Seq halfPlane r -> Chain Seq halfPlane r -_clipLeftLine LineEQ r -left = ((Point 2 r, halfPlane) -> Bool) +_clipLeftLine LineEQ r +left = ((Point 2 r, halfPlane) -> Bool) -> Chain Seq halfPlane r -> Chain Seq halfPlane r forall r halfPlane. ((Point 2 r, halfPlane) -> Bool) @@ -364,16 +364,16 @@ clipLeftWhen (LineEQ r -> (Point 2 r, halfPlane) -> Bool forall r a. (Ord r, Num r) => LineEQ r -> (Point 2 r, a) -> Bool _above LineEQ r -left) +left) -- | Test if the given (Point 2 r) lies above the line -_above :: (Ord r, Num r) => LineEQ r -> (Point 2 r,a) -> Bool +_above :: (Ord r, Num r) => LineEQ r -> (Point 2 r,a) -> Bool _above :: forall r a. (Ord r, Num r) => LineEQ r -> (Point 2 r, a) -> Bool -_above LineEQ r -line (Point 2 r -v,a +_above LineEQ r +line (Point 2 r +v,a _) = (Point 2 r -vPoint 2 r -> Getting r (Point 2 r) r -> r +vPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -385,7 +385,7 @@ >= r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' (Point 2 r -vPoint 2 r -> Getting r (Point 2 r) r -> r +vPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -393,16 +393,16 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r xCoord) LineEQ r -line +line -- | Clip the chain on the right -clipRightWhen :: ((Point 2 r, halfPlane) -> Bool) - -> Chain Seq halfPlane r -> Chain Seq halfPlane r +clipRightWhen :: ((Point 2 r, halfPlane) -> Bool) + -> Chain Seq halfPlane r -> Chain Seq halfPlane r clipRightWhen :: forall r halfPlane. ((Point 2 r, halfPlane) -> Bool) -> Chain Seq halfPlane r -> Chain Seq halfPlane r -clipRightWhen (Point 2 r, halfPlane) -> Bool -p = ASetter +clipRightWhen (Point 2 r, halfPlane) -> Bool +p = ASetter (Chain Seq halfPlane r) (Chain Seq halfPlane r) (Alternating Seq (Point 2 r) halfPlane) @@ -432,14 +432,14 @@ -> Chain Seq halfPlane r forall a b. (a -> b) -> a -> b $ - \(Alternating halfPlane -h0 Seq (Point 2 r, halfPlane) -hs) -> halfPlane + \(Alternating halfPlane +h0 Seq (Point 2 r, halfPlane) +hs) -> halfPlane -> Seq (Point 2 r, halfPlane) -> Alternating Seq (Point 2 r) halfPlane forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating halfPlane -h0 (Seq (Point 2 r, halfPlane) +h0 (Seq (Point 2 r, halfPlane) -> Alternating Seq (Point 2 r) halfPlane) -> Seq (Point 2 r, halfPlane) -> Alternating Seq (Point 2 r) halfPlane @@ -448,17 +448,17 @@ -> Seq (Point 2 r, halfPlane) -> Seq (Point 2 r, halfPlane) forall a. (a -> Bool) -> Seq a -> Seq a Seq.dropWhileR (Point 2 r, halfPlane) -> Bool -p Seq (Point 2 r, halfPlane) -hs +p Seq (Point 2 r, halfPlane) +hs -- | Clip the chain on the left -clipLeftWhen :: ((Point 2 r, halfPlane) -> Bool) - -> Chain Seq halfPlane r -> Chain Seq halfPlane r +clipLeftWhen :: ((Point 2 r, halfPlane) -> Bool) + -> Chain Seq halfPlane r -> Chain Seq halfPlane r clipLeftWhen :: forall r halfPlane. ((Point 2 r, halfPlane) -> Bool) -> Chain Seq halfPlane r -> Chain Seq halfPlane r -clipLeftWhen (Point 2 r, halfPlane) -> Bool -p = ASetter +clipLeftWhen (Point 2 r, halfPlane) -> Bool +p = ASetter (Chain Seq halfPlane r) (Chain Seq halfPlane r) (Alternating Seq (Point 2 r) halfPlane) @@ -488,31 +488,31 @@ -> Chain Seq halfPlane r forall a b. (a -> b) -> a -> b $ - \alt :: Alternating Seq (Point 2 r) halfPlane -alt@(Alternating halfPlane -_ Seq (Point 2 r, halfPlane) -hs) -> case ((Point 2 r, halfPlane) -> Bool) + \alt :: Alternating Seq (Point 2 r) halfPlane +alt@(Alternating halfPlane +_ Seq (Point 2 r, halfPlane) +hs) -> case ((Point 2 r, halfPlane) -> Bool) -> Seq (Point 2 r, halfPlane) -> (Seq (Point 2 r, halfPlane), Seq (Point 2 r, halfPlane)) forall a. (a -> Bool) -> Seq a -> (Seq a, Seq a) Seq.spanl (Point 2 r, halfPlane) -> Bool -p Seq (Point 2 r, halfPlane) -hs of +p Seq (Point 2 r, halfPlane) +hs of (Seq (Point 2 r, halfPlane) Empty, Seq (Point 2 r, halfPlane) _) -> Alternating Seq (Point 2 r) halfPlane -alt +alt (Seq (Point 2 r, halfPlane) _ :|> (Point 2 r -_,halfPlane -h0'), Seq (Point 2 r, halfPlane) -kept) -> halfPlane +_,halfPlane +h0'), Seq (Point 2 r, halfPlane) +kept) -> halfPlane -> Seq (Point 2 r, halfPlane) -> Alternating Seq (Point 2 r) halfPlane forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating halfPlane -h0' Seq (Point 2 r, halfPlane) -kept +h0' Seq (Point 2 r, halfPlane) +kept -------------------------------------------------------------------------------- \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.html b/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.html index 5a9f92bb6..bea69c175 100644 --- a/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.html +++ b/haddocks/hgeometry/src/HGeometry.HalfPlane.CommonIntersection.html @@ -38,19 +38,19 @@ -------------------------------------------------------------------------------- -- | Common intersection of a bunch of halfplanes -data CommonIntersection halfPlane r = +data CommonIntersection halfPlane r = EmptyIntersection - | SingletonPoint (Point 2 r) (Vector 3 halfPlane) + | SingletonPoint (Point 2 r) (Vector 3 halfPlane) -- ^ Common intersection is a singleton point, defined by the three given halfplanes - | InSubLine (VerticalOrLineEQ r) (Vector 2 halfPlane) (SubLine halfPlane r) + | InSubLine (VerticalOrLineEQ r) (Vector 2 halfPlane) (SubLine halfPlane r) -- ^ The two halfPlanes that define the line, and the other halfplanes furthe -- restricitng the line. - | Slab halfPlane halfPlane + | Slab halfPlane halfPlane -- ^ two parallel halfPlanes l and u that form a slab; - | BoundedRegion (ConvexPolygon (Point 2 r :+ halfPlane)) - | UnboundedRegion (Chain Seq halfPlane r) + | BoundedRegion (ConvexPolygon (Point 2 r :+ halfPlane)) + | UnboundedRegion (Chain Seq halfPlane r) -- ^ each vertex stores the interior halfplane of the CCW-edge it is incident to. - deriving (Int -> CommonIntersection halfPlane r -> ShowS + deriving (Int -> CommonIntersection halfPlane r -> ShowS [CommonIntersection halfPlane r] -> ShowS CommonIntersection halfPlane r -> String (Int -> CommonIntersection halfPlane r -> ShowS) @@ -80,7 +80,7 @@ (Show r, Show halfPlane) => [CommonIntersection halfPlane r] -> ShowS showList :: [CommonIntersection halfPlane r] -> ShowS -Show,CommonIntersection halfPlane r +Show,CommonIntersection halfPlane r -> CommonIntersection halfPlane r -> Bool (CommonIntersection halfPlane r -> CommonIntersection halfPlane r -> Bool) @@ -107,11 +107,11 @@ Eq) -- | Part of the line -data SubLine halfPlane r = EntireLine - | InHalfLine (HalfLine (Point 2 r)) halfPlane -- ^ the third halfPlane - | InSegment (ClosedLineSegment (Point 2 r)) halfPlane halfPlane +data SubLine halfPlane r = EntireLine + | InHalfLine (HalfLine (Point 2 r)) halfPlane -- ^ the third halfPlane + | InSegment (ClosedLineSegment (Point 2 r)) halfPlane halfPlane -- ^ the remaining two halfplanes - deriving (Int -> SubLine halfPlane r -> ShowS + deriving (Int -> SubLine halfPlane r -> ShowS [SubLine halfPlane r] -> ShowS SubLine halfPlane r -> String (Int -> SubLine halfPlane r -> ShowS) @@ -141,7 +141,7 @@ (Show r, Show halfPlane) => [SubLine halfPlane r] -> ShowS showList :: [SubLine halfPlane r] -> ShowS -Show,SubLine halfPlane r -> SubLine halfPlane r -> Bool +Show,SubLine halfPlane r -> SubLine halfPlane r -> Bool (SubLine halfPlane r -> SubLine halfPlane r -> Bool) -> (SubLine halfPlane r -> SubLine halfPlane r -> Bool) -> Eq (SubLine halfPlane r) @@ -164,20 +164,20 @@ -- | Computes the common intersection of a \(n\) halfplanes. -- -- running time: \(O(n\log n)\) -commonIntersection :: forall f halfPlane r. - ( Foldable1 f, Functor f - , HalfPlane_ halfPlane r - , Fractional r, Ord r +commonIntersection :: forall f halfPlane r. + ( Foldable1 f, Functor f + , HalfPlane_ halfPlane r + , Fractional r, Ord r - , Show halfPlane, Show r + , Show halfPlane, Show r ) - => f halfPlane -> CommonIntersection halfPlane r + => f halfPlane -> CommonIntersection halfPlane r commonIntersection :: forall (f :: * -> *) halfPlane r. (Foldable1 f, Functor f, HalfPlane_ halfPlane r, Fractional r, Ord r, Show halfPlane, Show r) => f halfPlane -> CommonIntersection halfPlane r -commonIntersection f halfPlane -hs0 = case (Verticals halfPlane r -> These2 (r :+ halfPlane)) +commonIntersection f halfPlane +hs0 = case (Verticals halfPlane r -> These2 (r :+ halfPlane)) -> (NonVerticals halfPlane r -> These2 (Chain Seq (LineEQ r :+ halfPlane) r)) -> These (Verticals halfPlane r) (NonVerticals halfPlane r) @@ -215,14 +215,14 @@ f halfPlane -> These (Verticals halfPlane r) (NonVerticals halfPlane r) partitionhalfPlanes f halfPlane -hs0 of +hs0 of -- we only have vertical halfpalnes planes - This These2 (r :+ halfPlane) -verticals -> case These2 (r :+ halfPlane) -verticals of + This These2 (r :+ halfPlane) +verticals -> case These2 (r :+ halfPlane) +verticals of Negatives (r -_ :+ halfPlane -l) -> Chain Seq halfPlane r -> CommonIntersection halfPlane r +_ :+ halfPlane +l) -> Chain Seq halfPlane r -> CommonIntersection halfPlane r forall halfPlane r. Chain Seq halfPlane r -> CommonIntersection halfPlane r UnboundedRegion (Chain Seq halfPlane r -> CommonIntersection halfPlane r) @@ -236,12 +236,12 @@ -> Alternating Seq (Point 2 r) halfPlane forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating halfPlane -l Seq (Point 2 r, halfPlane) +l Seq (Point 2 r, halfPlane) forall a. Monoid a => a mempty) Positives (r -_ :+ halfPlane -u) -> Chain Seq halfPlane r -> CommonIntersection halfPlane r +_ :+ halfPlane +u) -> Chain Seq halfPlane r -> CommonIntersection halfPlane r forall halfPlane r. Chain Seq halfPlane r -> CommonIntersection halfPlane r UnboundedRegion (Chain Seq halfPlane r -> CommonIntersection halfPlane r) @@ -255,18 +255,18 @@ -> Alternating Seq (Point 2 r) halfPlane forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating halfPlane -u Seq (Point 2 r, halfPlane) +u Seq (Point 2 r, halfPlane) forall a. Monoid a => a mempty) - BothSigns (r -x :+ halfPlane -l) (r -x' :+ halfPlane -u) -> case r -x r -> r -> Ordering + BothSigns (r +x :+ halfPlane +l) (r +x' :+ halfPlane +u) -> case r +x r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` r -x' of +x' of Ordering LT -> CommonIntersection halfPlane r forall halfPlane r. CommonIntersection halfPlane r @@ -284,11 +284,11 @@ InSubLine (r -> VerticalOrLineEQ r forall r. r -> VerticalOrLineEQ r VerticalLineThrough r -x) (halfPlane -> halfPlane -> Vector 2 halfPlane +x) (halfPlane -> halfPlane -> Vector 2 halfPlane forall r. r -> r -> Vector 2 r Vector2 halfPlane -l halfPlane -u) SubLine halfPlane r +l halfPlane +u) SubLine halfPlane r forall halfPlane r. SubLine halfPlane r EntireLine Ordering @@ -296,83 +296,83 @@ forall halfPlane r. halfPlane -> halfPlane -> CommonIntersection halfPlane r Slab halfPlane -l halfPlane -u +l halfPlane +u -- we only have non-vertical halfpalnes planes - That These2 (Chain Seq (LineEQ r :+ halfPlane) r) -nonVerticals -> These2 (Chain Seq (LineEQ r :+ halfPlane) r) + That These2 (Chain Seq (LineEQ r :+ halfPlane) r) +nonVerticals -> These2 (Chain Seq (LineEQ r :+ halfPlane) r) -> CommonIntersection halfPlane r -withNonVerticals These2 (Chain Seq (LineEQ r :+ halfPlane) r) -nonVerticals +withNonVerticals These2 (Chain Seq (LineEQ r :+ halfPlane) r) +nonVerticals -- we have both vertical, and non-vertical halfPlanes - These These2 (r :+ halfPlane) -verticals These2 (Chain Seq (LineEQ r :+ halfPlane) r) -nonVerticals -> case These2 (Chain Seq (LineEQ r :+ halfPlane) r) -nonVerticals of + These These2 (r :+ halfPlane) +verticals These2 (Chain Seq (LineEQ r :+ halfPlane) r) +nonVerticals -> case These2 (Chain Seq (LineEQ r :+ halfPlane) r) +nonVerticals of -- all non-vertical halfplanes are negative halfplanes though. So we can - Negatives Chain Seq (LineEQ r :+ halfPlane) r -upperBoundary -> Chain Seq (LineEQ r :+ halfPlane) r -upperBoundary Chain Seq (LineEQ r :+ halfPlane) r + Negatives Chain Seq (LineEQ r :+ halfPlane) r +upperBoundary -> Chain Seq (LineEQ r :+ halfPlane) r +upperBoundary Chain Seq (LineEQ r :+ halfPlane) r -> These2 (r :+ halfPlane) -> CommonIntersection halfPlane r forall r halfPlane. (Ord r, Num r, HalfPlane_ halfPlane r) => Chain Seq (LineEQ r :+ halfPlane) r -> These2 (r :+ halfPlane) -> CommonIntersection halfPlane r `clipAndPushBy` These2 (r :+ halfPlane) -verticals +verticals -- all non-vertical halfplanes are postiive halfplanes though - Positives Chain Seq (LineEQ r :+ halfPlane) r -lowerBoundary -> Chain Seq (LineEQ r :+ halfPlane) r -lowerBoundary Chain Seq (LineEQ r :+ halfPlane) r + Positives Chain Seq (LineEQ r :+ halfPlane) r +lowerBoundary -> Chain Seq (LineEQ r :+ halfPlane) r +lowerBoundary Chain Seq (LineEQ r :+ halfPlane) r -> These2 (r :+ halfPlane) -> CommonIntersection halfPlane r forall r halfPlane. (Ord r, Num r, HalfPlane_ halfPlane r) => Chain Seq (LineEQ r :+ halfPlane) r -> These2 (r :+ halfPlane) -> CommonIntersection halfPlane r `clipAndPushBy` These2 (r :+ halfPlane) -verticals +verticals -- We have both positive and negative non-vertical halfplanes. So compute their -- common intersection, and then clip the result to the vertical slab determined by -- the verticals - BothSigns Chain Seq (LineEQ r :+ halfPlane) r -_upperBoundary Chain Seq (LineEQ r :+ halfPlane) r -_lowerBoundary -> + BothSigns Chain Seq (LineEQ r :+ halfPlane) r +_upperBoundary Chain Seq (LineEQ r :+ halfPlane) r +_lowerBoundary -> CommonIntersection halfPlane r forall a. HasCallStack => a undefined -- TODO: somehow combine them, and clip -- withNonVerticals nonVerticals `clipBy` verticals where - withNonVerticals :: These2 (Chain Seq (LineEQ r :+ halfPlane) r) - -> CommonIntersection halfPlane r - withNonVerticals :: These2 (Chain Seq (LineEQ r :+ halfPlane) r) + withNonVerticals :: These2 (Chain Seq (LineEQ r :+ halfPlane) r) + -> CommonIntersection halfPlane r + withNonVerticals :: These2 (Chain Seq (LineEQ r :+ halfPlane) r) -> CommonIntersection halfPlane r -withNonVerticals These2 (Chain Seq (LineEQ r :+ halfPlane) r) -nonVerticals = case These2 (Chain Seq (LineEQ r :+ halfPlane) r) -nonVerticals of +withNonVerticals These2 (Chain Seq (LineEQ r :+ halfPlane) r) +nonVerticals = case These2 (Chain Seq (LineEQ r :+ halfPlane) r) +nonVerticals of -- we only have halfplanes with negative signs - Negatives Chain Seq (LineEQ r :+ halfPlane) r -upperBoundary -> Chain Seq (LineEQ r :+ halfPlane) r + Negatives Chain Seq (LineEQ r :+ halfPlane) r +upperBoundary -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r forall core halfPlane r. Chain Seq (core :+ halfPlane) r -> CommonIntersection halfPlane r unboundedRegion Chain Seq (LineEQ r :+ halfPlane) r -upperBoundary +upperBoundary -- we only have halfplanes with positives signs - Positives Chain Seq (LineEQ r :+ halfPlane) r -lowerBoundary -> Chain Seq (LineEQ r :+ halfPlane) r + Positives Chain Seq (LineEQ r :+ halfPlane) r +lowerBoundary -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r forall core halfPlane r. Chain Seq (core :+ halfPlane) r -> CommonIntersection halfPlane r unboundedRegion Chain Seq (LineEQ r :+ halfPlane) r -lowerBoundary +lowerBoundary -- we have both positive and negative halfplanes - BothSigns Chain Seq (LineEQ r :+ halfPlane) r -_upperBoundary Chain Seq (LineEQ r :+ halfPlane) r -_lowerBoundary -> CommonIntersection halfPlane r + BothSigns Chain Seq (LineEQ r :+ halfPlane) r +_upperBoundary Chain Seq (LineEQ r :+ halfPlane) r +_lowerBoundary -> CommonIntersection halfPlane r forall a. HasCallStack => a undefined -- TODO: somehow combine them. @@ -386,7 +386,7 @@ -- | Helper function to construct an unbounded region -unboundedRegion :: Chain Seq (core :+ halfPlane) r -> CommonIntersection halfPlane r +unboundedRegion :: Chain Seq (core :+ halfPlane) r -> CommonIntersection halfPlane r unboundedRegion :: forall core halfPlane r. Chain Seq (core :+ halfPlane) r -> CommonIntersection halfPlane r unboundedRegion = Chain Seq halfPlane r -> CommonIntersection halfPlane r @@ -414,18 +414,18 @@ -- | clip the chain by the given vertical halfplanes, and add the clipping halfPlanes to -- the chains. -clipAndPushBy :: (Ord r, Num r, HalfPlane_ halfPlane r) - => Chain Seq (LineEQ r :+ halfPlane) r - -> These2 (r :+ halfPlane) - -> CommonIntersection halfPlane r +clipAndPushBy :: (Ord r, Num r, HalfPlane_ halfPlane r) + => Chain Seq (LineEQ r :+ halfPlane) r + -> These2 (r :+ halfPlane) + -> CommonIntersection halfPlane r clipAndPushBy :: forall r halfPlane. (Ord r, Num r, HalfPlane_ halfPlane r) => Chain Seq (LineEQ r :+ halfPlane) r -> These2 (r :+ halfPlane) -> CommonIntersection halfPlane r -clipAndPushBy Chain Seq (LineEQ r :+ halfPlane) r -inters = \case - Negatives r :+ halfPlane -hl -> Chain Seq (LineEQ r :+ halfPlane) r +clipAndPushBy Chain Seq (LineEQ r :+ halfPlane) r +inters = \case + Negatives r :+ halfPlane +hl -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r forall core halfPlane r. Chain Seq (core :+ halfPlane) r -> CommonIntersection halfPlane r @@ -439,16 +439,16 @@ . (r :+ halfPlane) -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -clipRight' r :+ halfPlane -hl (Chain Seq (LineEQ r :+ halfPlane) r +clipRight' r :+ halfPlane +hl (Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r) -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r forall a b. (a -> b) -> a -> b $ Chain Seq (LineEQ r :+ halfPlane) r -inters - Positives r :+ halfPlane -hu -> Chain Seq (LineEQ r :+ halfPlane) r +inters + Positives r :+ halfPlane +hu -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r forall core halfPlane r. Chain Seq (core :+ halfPlane) r -> CommonIntersection halfPlane r @@ -462,18 +462,18 @@ . (r :+ halfPlane) -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -clipLeft' r :+ halfPlane -hu (Chain Seq (LineEQ r :+ halfPlane) r +clipLeft' r :+ halfPlane +hu (Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r) -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r forall a b. (a -> b) -> a -> b $ Chain Seq (LineEQ r :+ halfPlane) r -inters - BothSigns r :+ halfPlane -hl r :+ halfPlane -hu -> case (r :+ halfPlane -hl(r :+ halfPlane) -> Getting r (r :+ halfPlane) r -> r +inters + BothSigns r :+ halfPlane +hl r :+ halfPlane +hu -> case (r :+ halfPlane +hl(r :+ halfPlane) -> Getting r (r :+ halfPlane) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (r :+ halfPlane) r forall core extra core' (f :: * -> *). @@ -482,7 +482,7 @@ core) r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (r :+ halfPlane -hu(r :+ halfPlane) -> Getting r (r :+ halfPlane) r -> r +hu(r :+ halfPlane) -> Getting r (r :+ halfPlane) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (r :+ halfPlane) r forall core extra core' (f :: * -> *). @@ -494,20 +494,20 @@ forall halfPlane r. CommonIntersection halfPlane r EmptyIntersection Ordering -EQ -> let x :: r -x = r :+ halfPlane -hl(r :+ halfPlane) -> Getting r (r :+ halfPlane) r -> r +EQ -> let x :: r +x = r :+ halfPlane +hl(r :+ halfPlane) -> Getting r (r :+ halfPlane) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (r :+ halfPlane) r forall core extra core' (f :: * -> *). Functor f => (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core - verticals :: Vector 2 halfPlane -verticals = halfPlane -> halfPlane -> Vector 2 halfPlane + verticals :: Vector 2 halfPlane +verticals = halfPlane -> halfPlane -> Vector 2 halfPlane forall r. r -> r -> Vector 2 r Vector2 (r :+ halfPlane -hl(r :+ halfPlane) +hl(r :+ halfPlane) -> Getting halfPlane (r :+ halfPlane) halfPlane -> halfPlane forall s a. s -> Getting a s a -> a ^.Getting halfPlane (r :+ halfPlane) halfPlane @@ -515,7 +515,7 @@ Functor f => (extra -> f extra') -> (core :+ extra) -> f (core :+ extra') extra) (r :+ halfPlane -hu(r :+ halfPlane) +hu(r :+ halfPlane) -> Getting halfPlane (r :+ halfPlane) halfPlane -> halfPlane forall s a. s -> Getting a s a -> a ^.Getting halfPlane (r :+ halfPlane) halfPlane @@ -524,8 +524,8 @@ (extra -> f extra') -> (core :+ extra) -> f (core :+ extra') extra) -- the two vertical halfplanes defining x - theHalfLine :: HalfLine (Point 2 r) -theHalfLine = Point 2 r + theHalfLine :: HalfLine (Point 2 r) +theHalfLine = Point 2 r -> Vector (Dimension (Point 2 r)) (NumType (Point 2 r)) -> HalfLine (Point 2 r) forall point. @@ -533,25 +533,25 @@ HalfLine (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x r -y) (r -> r -> Vector 2 r +x r +y) (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r 0 r -vy) - (r -y :+ halfPlane -h) = r -> Chain Seq (LineEQ r :+ halfPlane) r -> r :+ halfPlane +vy) + (r +y :+ halfPlane +h) = r -> Chain Seq (LineEQ r :+ halfPlane) r -> r :+ halfPlane forall r halfPlane. (Num r, Ord r) => r -> Chain Seq (LineEQ r :+ halfPlane) r -> r :+ halfPlane evalChainAt r -x Chain Seq (LineEQ r :+ halfPlane) r -inters +x Chain Seq (LineEQ r :+ halfPlane) r +inters -- the non-vertical halfplane bounding the intersection - vy :: r -vy = case halfPlane -hhalfPlane -> Getting Sign halfPlane Sign -> Sign + vy :: r +vy = case halfPlane +hhalfPlane -> Getting Sign halfPlane Sign -> Sign forall s a. s -> Getting a s a -> a ^.Getting Sign halfPlane Sign forall halfSpace (d :: Nat) r. @@ -577,13 +577,13 @@ InSubLine (r -> VerticalOrLineEQ r forall r. r -> VerticalOrLineEQ r VerticalLineThrough r -x) Vector 2 halfPlane -verticals (HalfLine (Point 2 r) -> halfPlane -> SubLine halfPlane r +x) Vector 2 halfPlane +verticals (HalfLine (Point 2 r) -> halfPlane -> SubLine halfPlane r forall halfPlane r. HalfLine (Point 2 r) -> halfPlane -> SubLine halfPlane r InHalfLine HalfLine (Point 2 r) -theHalfLine halfPlane -h) +theHalfLine halfPlane +h) Ordering GT -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r @@ -599,8 +599,8 @@ . (r :+ halfPlane) -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -clipLeft' r :+ halfPlane -hl (Chain Seq (LineEQ r :+ halfPlane) r +clipLeft' r :+ halfPlane +hl (Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r) -> (Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r) @@ -610,43 +610,43 @@ . (r :+ halfPlane) -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -clipRight' r :+ halfPlane -hu (Chain Seq (LineEQ r :+ halfPlane) r +clipRight' r :+ halfPlane +hu (Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r) -> Chain Seq (LineEQ r :+ halfPlane) r -> CommonIntersection halfPlane r forall a b. (a -> b) -> a -> b $ Chain Seq (LineEQ r :+ halfPlane) r -inters +inters where - dummy :: LineEQ r -dummy = r -> r -> LineEQ r + dummy :: LineEQ r +dummy = r -> r -> LineEQ r forall r. r -> r -> LineEQ r LineEQ r 0 r 0 - clipLeft' :: (r :+ halfPlane) + clipLeft' :: (r :+ halfPlane) -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -clipLeft' (r -x' :+ halfPlane -u) Chain Seq (LineEQ r :+ halfPlane) r -inters' = let env :: Chain Seq (LineEQ r :+ halfPlane) r -env = r +clipLeft' (r +x' :+ halfPlane +u) Chain Seq (LineEQ r :+ halfPlane) r +inters' = let env :: Chain Seq (LineEQ r :+ halfPlane) r +env = r -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r forall r halfPlane. Ord r => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r clipLeft r -x' Chain Seq (LineEQ r :+ halfPlane) r -inters' - cons' :: (LineEQ r :+ halfPlane) +x' Chain Seq (LineEQ r :+ halfPlane) r +inters' + cons' :: (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -cons' = ((LineEQ r :+ halfPlane) -> (LineEQ r :+ halfPlane) -> Point 2 r) +cons' = ((LineEQ r :+ halfPlane) -> (LineEQ r :+ halfPlane) -> Point 2 r) -> (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) @@ -670,9 +670,9 @@ Num r => r -> (LineEQ r :+ extra) -> extra' -> Point 2 r intersectVertical r -x') +x') in Chain Seq (LineEQ r :+ halfPlane) r -envChain Seq (LineEQ r :+ halfPlane) r +envChain Seq (LineEQ r :+ halfPlane) r -> (Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r) -> Chain Seq (LineEQ r :+ halfPlane) r @@ -699,32 +699,32 @@ %~ (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -cons' (LineEQ r -dummy LineEQ r -> halfPlane -> LineEQ r :+ halfPlane +cons' (LineEQ r +dummy LineEQ r -> halfPlane -> LineEQ r :+ halfPlane forall core extra. core -> extra -> core :+ extra :+ halfPlane -u) +u) - clipRight' :: (r :+ halfPlane) + clipRight' :: (r :+ halfPlane) -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -clipRight' (r -x :+ halfPlane -l) Chain Seq (LineEQ r :+ halfPlane) r -inters' = let env :: Chain Seq (LineEQ r :+ halfPlane) r -env = r +clipRight' (r +x :+ halfPlane +l) Chain Seq (LineEQ r :+ halfPlane) r +inters' = let env :: Chain Seq (LineEQ r :+ halfPlane) r +env = r -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r forall r halfPlane. Ord r => r -> Chain Seq halfPlane r -> Chain Seq halfPlane r clipRight r -x Chain Seq (LineEQ r :+ halfPlane) r -inters' - snoc' :: (LineEQ r :+ halfPlane) +x Chain Seq (LineEQ r :+ halfPlane) r +inters' + snoc' :: (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -snoc' = (Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) +snoc' = (Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -> (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane)) -> (LineEQ r :+ halfPlane) @@ -744,9 +744,9 @@ Num r => r -> (LineEQ r :+ extra) -> extra' -> Point 2 r intersectVertical r -x)) +x)) in Chain Seq (LineEQ r :+ halfPlane) r -envChain Seq (LineEQ r :+ halfPlane) r +envChain Seq (LineEQ r :+ halfPlane) r -> (Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r) -> Chain Seq (LineEQ r :+ halfPlane) r @@ -773,36 +773,36 @@ %~ (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -> Alternating Seq (Point 2 r) (LineEQ r :+ halfPlane) -snoc' (LineEQ r -dummy LineEQ r -> halfPlane -> LineEQ r :+ halfPlane +snoc' (LineEQ r +dummy LineEQ r -> halfPlane -> LineEQ r :+ halfPlane forall core extra. core -> extra -> core :+ extra :+ halfPlane -l) +l) -data LeftIntersection halfPlane r = +data LeftIntersection halfPlane r = LowerAboveUpper - | Intersection (Point 2 r) (Chain Seq (LineEQ r :+ halfPlane) r) - (Chain Seq (LineEQ r :+ halfPlane) r) - | NoIntersection (Chain Seq (LineEQ r :+ halfPlane) r) - (Chain Seq (LineEQ r :+ halfPlane) r) + | Intersection (Point 2 r) (Chain Seq (LineEQ r :+ halfPlane) r) + (Chain Seq (LineEQ r :+ halfPlane) r) + | NoIntersection (Chain Seq (LineEQ r :+ halfPlane) r) + (Chain Seq (LineEQ r :+ halfPlane) r) -- | Given the lower chain and the upper chain, computes the first intersection as seen from the left; i.e. the first point where the remainder of the lower chain indeed lies below the remainder of the upper chain -leftIntersection :: (Ord r, Fractional r +leftIntersection :: (Ord r, Fractional r ) - => Chain Seq (LineEQ r :+ halfPlane) r - -> Chain Seq (LineEQ r :+ halfPlane) r - -> LeftIntersection halfPlane r + => Chain Seq (LineEQ r :+ halfPlane) r + -> Chain Seq (LineEQ r :+ halfPlane) r + -> LeftIntersection halfPlane r leftIntersection :: forall r halfPlane. (Ord r, Fractional r) => Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -> LeftIntersection halfPlane r -leftIntersection Chain Seq (LineEQ r :+ halfPlane) r -lower0 Chain Seq (LineEQ r :+ halfPlane) r -upper0 = case ((r, Chain Seq (LineEQ r :+ halfPlane) r, +leftIntersection Chain Seq (LineEQ r :+ halfPlane) r +lower0 Chain Seq (LineEQ r :+ halfPlane) r +upper0 = case ((r, Chain Seq (LineEQ r :+ halfPlane) r, Chain Seq (LineEQ r :+ halfPlane) r) -> Bool) -> [(r, Chain Seq (LineEQ r :+ halfPlane) r, @@ -818,7 +818,7 @@ (a, Chain Seq (LineEQ a :+ halfPlane) r, Chain Seq (LineEQ a :+ halfPlane) r) -> Bool -lowerAboveUpper ([(r, Chain Seq (LineEQ r :+ halfPlane) r, +lowerAboveUpper ([(r, Chain Seq (LineEQ r :+ halfPlane) r, Chain Seq (LineEQ r :+ halfPlane) r)] -> [(r, Chain Seq (LineEQ r :+ halfPlane) r, Chain Seq (LineEQ r :+ halfPlane) r)]) @@ -837,25 +837,25 @@ -> Chain Seq halfPlane r -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] zipLR Chain Seq (LineEQ r :+ halfPlane) r -lower0 Chain Seq (LineEQ r :+ halfPlane) r -upper0 of +lower0 Chain Seq (LineEQ r :+ halfPlane) r +upper0 of [] -> LeftIntersection halfPlane r forall halfPlane r. LeftIntersection halfPlane r LowerAboveUpper (r -_, Chain Seq (LineEQ r :+ halfPlane) r -lower, Chain Seq (LineEQ r :+ halfPlane) r -upper) : [(r, Chain Seq (LineEQ r :+ halfPlane) r, +_, Chain Seq (LineEQ r :+ halfPlane) r +lower, Chain Seq (LineEQ r :+ halfPlane) r +upper) : [(r, Chain Seq (LineEQ r :+ halfPlane) r, Chain Seq (LineEQ r :+ halfPlane) r)] _ -> case Chain Seq (LineEQ r :+ halfPlane) r -> LineEQ r forall line halfPlane r. Chain Seq (line :+ halfPlane) r -> line leftMost Chain Seq (LineEQ r :+ halfPlane) r -lower LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) +lower LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` Chain Seq (LineEQ r :+ halfPlane) r -> LineEQ r forall line halfPlane r. Chain Seq (line :+ halfPlane) r -> line leftMost Chain Seq (LineEQ r :+ halfPlane) r -upper of +upper of Maybe (LineLineIntersectionG r (LineEQ r)) Intersection (LineEQ r) (LineEQ r) Nothing -> Chain Seq (LineEQ r :+ halfPlane) r @@ -866,10 +866,10 @@ -> Chain Seq (LineEQ r :+ halfPlane) r -> LeftIntersection halfPlane r NoIntersection Chain Seq (LineEQ r :+ halfPlane) r -lower Chain Seq (LineEQ r :+ halfPlane) r -upper -- parallel - Just (Line_x_Line_Point Point 2 r -p) -> Point 2 r +lower Chain Seq (LineEQ r :+ halfPlane) r +upper -- parallel + Just (Line_x_Line_Point Point 2 r +p) -> Point 2 r -> Chain Seq (LineEQ r :+ halfPlane) r -> Chain Seq (LineEQ r :+ halfPlane) r -> LeftIntersection halfPlane r @@ -879,67 +879,67 @@ -> Chain Seq (LineEQ r :+ halfPlane) r -> LeftIntersection halfPlane r Intersection Point 2 r -p Chain Seq (LineEQ r :+ halfPlane) r -lower Chain Seq (LineEQ r :+ halfPlane) r -upper +p Chain Seq (LineEQ r :+ halfPlane) r +lower Chain Seq (LineEQ r :+ halfPlane) r +upper Just (Line_x_Line_Line LineEQ r _) -> LeftIntersection halfPlane r forall a. HasCallStack => a undefined -- TODO: think about this.... -- should be a degenerate slab, which is just a line (segment?) I guess where - lowerAboveUpper :: (a, Chain Seq (LineEQ a :+ halfPlane) r, + lowerAboveUpper :: (a, Chain Seq (LineEQ a :+ halfPlane) r, Chain Seq (LineEQ a :+ halfPlane) r) -> Bool -lowerAboveUpper (a -x, Chain Seq (LineEQ a :+ halfPlane) r -lower, Chain Seq (LineEQ a :+ halfPlane) r -upper) = a -> LineEQ a -> a +lowerAboveUpper (a +x, Chain Seq (LineEQ a :+ halfPlane) r +lower, Chain Seq (LineEQ a :+ halfPlane) r +upper) = a -> LineEQ a -> a forall r. Num r => r -> LineEQ r -> r evalAt' a -x (Chain Seq (LineEQ a :+ halfPlane) r -> LineEQ a +x (Chain Seq (LineEQ a :+ halfPlane) r -> LineEQ a forall line halfPlane r. Chain Seq (line :+ halfPlane) r -> line leftMost Chain Seq (LineEQ a :+ halfPlane) r -lower) a -> a -> Bool +lower) a -> a -> Bool forall a. Ord a => a -> a -> Bool > a -> LineEQ a -> a forall r. Num r => r -> LineEQ r -> r evalAt' a -x (Chain Seq (LineEQ a :+ halfPlane) r -> LineEQ a +x (Chain Seq (LineEQ a :+ halfPlane) r -> LineEQ a forall line halfPlane r. Chain Seq (line :+ halfPlane) r -> line leftMost Chain Seq (LineEQ a :+ halfPlane) r -upper) +upper) -- | simultaneously scan the chains, zipping up their remainders. i.e. returns a list of -- triples (x_i,lower_i,upper_i), so that on (x_{i-1},x_i] lower_i and upper_i are the -- remaining alternating chains. (x_{-1} = -\infty). -zipLR :: Ord r - => Chain Seq halfPlane r -> Chain Seq halfPlane r - -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r )] +zipLR :: Ord r + => Chain Seq halfPlane r -> Chain Seq halfPlane r + -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r )] zipLR :: forall r halfPlane. Ord r => Chain Seq halfPlane r -> Chain Seq halfPlane r -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] -zipLR Chain Seq halfPlane r -lower Chain Seq halfPlane r -upper = case Chain Seq halfPlane r +zipLR Chain Seq halfPlane r +lower Chain Seq halfPlane r +upper = case Chain Seq halfPlane r -> Chain Seq halfPlane r -> FirstVertex halfPlane r forall r halfPlane. Ord r => Chain Seq halfPlane r -> Chain Seq halfPlane r -> FirstVertex halfPlane r firstIntersection Chain Seq halfPlane r -lower Chain Seq halfPlane r -upper of +lower Chain Seq halfPlane r +upper of FirstVertex halfPlane r None -> [] - Upper Point 2 r -p Chain Seq halfPlane r -upper' -> (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r + Upper Point 2 r +p Chain Seq halfPlane r +upper' -> (Point 2 r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -947,8 +947,8 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r xCoord, Chain Seq halfPlane r -lower, Chain Seq halfPlane r -upper) (r, Chain Seq halfPlane r, Chain Seq halfPlane r) +lower, Chain Seq halfPlane r +upper) (r, Chain Seq halfPlane r, Chain Seq halfPlane r) -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] forall a. a -> [a] -> [a] @@ -961,12 +961,12 @@ -> Chain Seq halfPlane r -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] zipLR Chain Seq halfPlane r -lower Chain Seq halfPlane r -upper' - Lower Point 2 r -p Chain Seq halfPlane r -lower' -> (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +lower Chain Seq halfPlane r +upper' + Lower Point 2 r +p Chain Seq halfPlane r +lower' -> (Point 2 r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -974,8 +974,8 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r xCoord, Chain Seq halfPlane r -lower, Chain Seq halfPlane r -upper) (r, Chain Seq halfPlane r, Chain Seq halfPlane r) +lower, Chain Seq halfPlane r +upper) (r, Chain Seq halfPlane r, Chain Seq halfPlane r) -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] forall a. a -> [a] -> [a] @@ -988,14 +988,14 @@ -> Chain Seq halfPlane r -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] zipLR Chain Seq halfPlane r -lower' Chain Seq halfPlane r -upper - Simultaneous Point 2 r -p Point 2 r -_ Chain Seq halfPlane r -lower' Chain Seq halfPlane r -upper' -> (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +lower' Chain Seq halfPlane r +upper + Simultaneous Point 2 r +p Point 2 r +_ Chain Seq halfPlane r +lower' Chain Seq halfPlane r +upper' -> (Point 2 r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1003,8 +1003,8 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r xCoord, Chain Seq halfPlane r -lower, Chain Seq halfPlane r -upper) (r, Chain Seq halfPlane r, Chain Seq halfPlane r) +lower, Chain Seq halfPlane r +upper) (r, Chain Seq halfPlane r, Chain Seq halfPlane r) -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] forall a. a -> [a] -> [a] @@ -1017,18 +1017,18 @@ -> Chain Seq halfPlane r -> [(r, Chain Seq halfPlane r, Chain Seq halfPlane r)] zipLR Chain Seq halfPlane r -lower' Chain Seq halfPlane r -upper' +lower' Chain Seq halfPlane r +upper' -data FirstVertex halfPlane r = None - | Upper (Point 2 r) (Chain Seq halfPlane r) +data FirstVertex halfPlane r = None + | Upper (Point 2 r) (Chain Seq halfPlane r) -- ^ first vertex in the upper chain, and the rest of the upper chain - | Lower (Point 2 r) (Chain Seq halfPlane r) - | Simultaneous (Point 2 r) -- ^ point in the lower chian - (Point 2 r) -- ^ point in the upper chain - (Chain Seq halfPlane r) -- ^ remainder of the lower chain - (Chain Seq halfPlane r) -- ^ remainder of the upper chain - deriving (Int -> FirstVertex halfPlane r -> ShowS + | Lower (Point 2 r) (Chain Seq halfPlane r) + | Simultaneous (Point 2 r) -- ^ point in the lower chian + (Point 2 r) -- ^ point in the upper chain + (Chain Seq halfPlane r) -- ^ remainder of the lower chain + (Chain Seq halfPlane r) -- ^ remainder of the upper chain + deriving (Int -> FirstVertex halfPlane r -> ShowS [FirstVertex halfPlane r] -> ShowS FirstVertex halfPlane r -> String (Int -> FirstVertex halfPlane r -> ShowS) @@ -1058,7 +1058,7 @@ (Show r, Show halfPlane) => [FirstVertex halfPlane r] -> ShowS showList :: [FirstVertex halfPlane r] -> ShowS -Show,FirstVertex halfPlane r -> FirstVertex halfPlane r -> Bool +Show,FirstVertex halfPlane r -> FirstVertex halfPlane r -> Bool (FirstVertex halfPlane r -> FirstVertex halfPlane r -> Bool) -> (FirstVertex halfPlane r -> FirstVertex halfPlane r -> Bool) -> Eq (FirstVertex halfPlane r) @@ -1076,16 +1076,16 @@ /= :: FirstVertex halfPlane r -> FirstVertex halfPlane r -> Bool Eq) -firstIntersection :: Ord r - => Chain Seq halfPlane r -> Chain Seq halfPlane r - -> FirstVertex halfPlane r +firstIntersection :: Ord r + => Chain Seq halfPlane r -> Chain Seq halfPlane r + -> FirstVertex halfPlane r firstIntersection :: forall r halfPlane. Ord r => Chain Seq halfPlane r -> Chain Seq halfPlane r -> FirstVertex halfPlane r -firstIntersection (Chain Alternating Seq (Point 2 r) halfPlane -lower) (Chain Alternating Seq (Point 2 r) halfPlane -upper) = case Alternating Seq (Point 2 r) halfPlane +firstIntersection (Chain Alternating Seq (Point 2 r) halfPlane +lower) (Chain Alternating Seq (Point 2 r) halfPlane +upper) = case Alternating Seq (Point 2 r) halfPlane -> Either halfPlane ((halfPlane, Point 2 r), Alternating Seq (Point 2 r) halfPlane) @@ -1093,7 +1093,7 @@ Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a) unconsAlt Alternating Seq (Point 2 r) halfPlane -lower of +lower of Left halfPlane _ -> case Alternating Seq (Point 2 r) halfPlane -> Either @@ -1103,27 +1103,27 @@ Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a) unconsAlt Alternating Seq (Point 2 r) halfPlane -upper of +upper of Left halfPlane _ -> FirstVertex halfPlane r forall halfPlane r. FirstVertex halfPlane r None Right ((halfPlane -_,Point 2 r -q),Alternating Seq (Point 2 r) halfPlane -upper') -> Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r +_,Point 2 r +q),Alternating Seq (Point 2 r) halfPlane +upper') -> Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r forall halfPlane r. Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r Upper Point 2 r -q (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r +q (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating Seq (Point 2 r) halfPlane -upper') +upper') Right ((halfPlane -_,Point 2 r -p),Alternating Seq (Point 2 r) halfPlane -lower') -> case Alternating Seq (Point 2 r) halfPlane +_,Point 2 r +p),Alternating Seq (Point 2 r) halfPlane +lower') -> case Alternating Seq (Point 2 r) halfPlane -> Either halfPlane ((halfPlane, Point 2 r), Alternating Seq (Point 2 r) halfPlane) @@ -1131,22 +1131,22 @@ Cons (f (sep, a)) (f (sep, a)) (sep, a) (sep, a) => Alternating f sep a -> Either a ((a, sep), Alternating f sep a) unconsAlt Alternating Seq (Point 2 r) halfPlane -upper of +upper of Left halfPlane _ -> Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r forall halfPlane r. Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r Lower Point 2 r -p (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r +p (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating Seq (Point 2 r) halfPlane -lower') +lower') Right ((halfPlane -_,Point 2 r -q),Alternating Seq (Point 2 r) halfPlane -upper') -> case (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +_,Point 2 r +q),Alternating Seq (Point 2 r) halfPlane +upper') -> case (Point 2 r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1156,7 +1156,7 @@ xCoord) r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (Point 2 r -qPoint 2 r -> Getting r (Point 2 r) r -> r +qPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1169,11 +1169,11 @@ forall halfPlane r. Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r Lower Point 2 r -p (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r +p (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating Seq (Point 2 r) halfPlane -lower') +lower') Ordering EQ -> Point 2 r -> Point 2 r @@ -1187,60 +1187,60 @@ -> Chain Seq halfPlane r -> FirstVertex halfPlane r Simultaneous Point 2 r -p Point 2 r -q (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r +p Point 2 r +q (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating Seq (Point 2 r) halfPlane -lower') (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r +lower') (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating Seq (Point 2 r) halfPlane -upper') +upper') Ordering GT -> Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r forall halfPlane r. Point 2 r -> Chain Seq halfPlane r -> FirstVertex halfPlane r Upper Point 2 r -q (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r +q (Alternating Seq (Point 2 r) halfPlane -> Chain Seq halfPlane r forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating Seq (Point 2 r) halfPlane -upper') +upper') -- | A these where both values just have the same type. in particular, we will use This: -- for Negative signs halfplanes, and That for Positive signed half planes. -type These2 a = These a a +type These2 a = These a a -- Some pattern synonyms so that the rest is easier to read -pattern Negatives :: a -> These a b +pattern Negatives :: a -> These a b pattern $bNegatives :: forall a b. a -> These a b $mNegatives :: forall {r} {a} {b}. These a b -> (a -> r) -> ((# #) -> r) -> r -Negatives x = This x -pattern Positives :: b -> These a b +Negatives x = This x +pattern Positives :: b -> These a b pattern $bPositives :: forall b a. b -> These a b $mPositives :: forall {r} {b} {a}. These a b -> (b -> r) -> ((# #) -> r) -> r -Positives x = That x -pattern BothSigns :: a -> b -> These a b +Positives x = That x +pattern BothSigns :: a -> b -> These a b pattern $bBothSigns :: forall a b. a -> b -> These a b $mBothSigns :: forall {r} {a} {b}. These a b -> (a -> b -> r) -> ((# #) -> r) -> r -BothSigns x y = These x y +BothSigns x y = These x y {-# COMPLETE Negatives, Positives, BothSigns #-} -- | Vertical halfplanes -type Verticals halfPlane r = These2 (NonEmpty (r :+ halfPlane)) +type Verticals halfPlane r = These2 (NonEmpty (r :+ halfPlane)) -- | Non-vertical halfplanes -type NonVerticals halfPlane r = These2 (NonEmpty (LineEQ r :+ halfPlane)) +type NonVerticals halfPlane r = These2 (NonEmpty (LineEQ r :+ halfPlane)) -- | Classify the halfplanes by their bounding lines into Vertical/NonVertical, -- and then on their Sign -partitionhalfPlanes :: forall f halfPlane r. - ( Foldable1 f - , HalfPlane_ halfPlane r, Ord r, Fractional r - ) => f halfPlane - -> These (Verticals halfPlane r) (NonVerticals halfPlane r) +partitionhalfPlanes :: forall f halfPlane r. + ( Foldable1 f + , HalfPlane_ halfPlane r, Ord r, Fractional r + ) => f halfPlane + -> These (Verticals halfPlane r) (NonVerticals halfPlane r) partitionhalfPlanes :: forall (f :: * -> *) halfPlane r. (Foldable1 f, HalfPlane_ halfPlane r, Ord r, Fractional r) => f halfPlane @@ -1258,11 +1258,11 @@ forall core. NonEmpty (core :+ halfPlane) -> These2 (NonEmpty (core :+ halfPlane)) -partition' NonEmpty (LineEQ r :+ halfPlane) -> NonVerticals halfPlane r +partition' NonEmpty (LineEQ r :+ halfPlane) -> NonVerticals halfPlane r forall core. NonEmpty (core :+ halfPlane) -> These2 (NonEmpty (core :+ halfPlane)) -partition' +partition' (These (NonEmpty (r :+ halfPlane)) (NonEmpty (LineEQ r :+ halfPlane)) -> These (Verticals halfPlane r) (NonVerticals halfPlane r)) @@ -1308,11 +1308,11 @@ toNonEmpty where -- partition the halfplanes by their sign. - partition' :: NonEmpty (core :+ halfPlane) -> These2 (NonEmpty (core :+ halfPlane)) - partition' :: forall core. + partition' :: NonEmpty (core :+ halfPlane) -> These2 (NonEmpty (core :+ halfPlane)) + partition' :: forall core. NonEmpty (core :+ halfPlane) -> These2 (NonEmpty (core :+ halfPlane)) -partition' = NonEmpty (Either (core :+ halfPlane) (core :+ halfPlane)) +partition' = NonEmpty (Either (core :+ halfPlane) (core :+ halfPlane)) -> These (NonEmpty (core :+ halfPlane)) (NonEmpty (core :+ halfPlane)) forall a b. @@ -1337,12 +1337,12 @@ forall {extra} {core}. HalfSpace_ extra (Dimension extra) (NumType extra) => (core :+ extra) -> Either (core :+ extra) (core :+ extra) -classifyBySign +classifyBySign - classifyBySign :: (core :+ extra) -> Either (core :+ extra) (core :+ extra) -classifyBySign core :+ extra -h = case core :+ extra -h(core :+ extra) -> Getting Sign (core :+ extra) Sign -> Sign + classifyBySign :: (core :+ extra) -> Either (core :+ extra) (core :+ extra) +classifyBySign core :+ extra +h = case core :+ extra +h(core :+ extra) -> Getting Sign (core :+ extra) Sign -> Sign forall s a. s -> Getting a s a -> a ^.(extra -> Const Sign extra) -> (core :+ extra) -> Const Sign (core :+ extra) @@ -1364,16 +1364,16 @@ Negative -> (core :+ extra) -> Either (core :+ extra) (core :+ extra) forall a b. a -> Either a b Left core :+ extra -h +h Sign Positive -> (core :+ extra) -> Either (core :+ extra) (core :+ extra) forall a b. b -> Either a b Right core :+ extra -h +h -- | From all the vertical halfplanes with negative sign we compute the leftmost one, -- and from the positive halfplanes we compute the rightmost one. -extremes :: Ord r => Verticals halfPlane r -> These2 (r :+ halfPlane) +extremes :: Ord r => Verticals halfPlane r -> These2 (r :+ halfPlane) extremes :: forall r halfPlane. Ord r => Verticals halfPlane r -> These2 (r :+ halfPlane) @@ -1387,12 +1387,12 @@ (a -> b) -> (c -> d) -> p a c -> p b d bimap NonEmpty (r :+ halfPlane) -> r :+ halfPlane forall {extra}. NonEmpty (r :+ extra) -> r :+ extra -leftMostPlane NonEmpty (r :+ halfPlane) -> r :+ halfPlane +leftMostPlane NonEmpty (r :+ halfPlane) -> r :+ halfPlane forall {extra}. NonEmpty (r :+ extra) -> r :+ extra -rightMostPlane +rightMostPlane where - rightMostPlane :: NonEmpty (r :+ extra) -> r :+ extra -rightMostPlane = ((r :+ extra) -> (r :+ extra) -> Ordering) + rightMostPlane :: NonEmpty (r :+ extra) -> r :+ extra +rightMostPlane = ((r :+ extra) -> (r :+ extra) -> Ordering) -> NonEmpty (r :+ extra) -> r :+ extra forall (t :: * -> *) a. Foldable1 t => @@ -1406,8 +1406,8 @@ Functor f => (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core)) - leftMostPlane :: NonEmpty (r :+ extra) -> r :+ extra -leftMostPlane = ((r :+ extra) -> (r :+ extra) -> Ordering) + leftMostPlane :: NonEmpty (r :+ extra) -> r :+ extra +leftMostPlane = ((r :+ extra) -> (r :+ extra) -> Ordering) -> NonEmpty (r :+ extra) -> r :+ extra forall (t :: * -> *) a. Foldable1 t => @@ -1424,12 +1424,12 @@ -- | Computes the upper boundary of the halfplanes that have negative sign, and the upper -- boundary of the halfplanes that have negative sign -boundaries :: ( HalfPlane_ halfPlane r - , Ord r, Fractional r +boundaries :: ( HalfPlane_ halfPlane r + , Ord r, Fractional r - , Show r, Show halfPlane - ) => NonVerticals halfPlane r -> These2 (Chain Seq (LineEQ r :+ halfPlane) r) + , Show r, Show halfPlane + ) => NonVerticals halfPlane r -> These2 (Chain Seq (LineEQ r :+ halfPlane) r) boundaries :: forall halfPlane r. (HalfPlane_ halfPlane r, Ord r, Fractional r, Show r, Show halfPlane) => @@ -1462,7 +1462,7 @@ Foldable1 f, Functor f, IsIntersectableWith halfPlane halfPlane, HasFromFoldable f) => f halfPlane -> Chain f halfPlane (NumType halfPlane) -upperBoundary NonEmpty (LineEQ r :+ halfPlane) +upperBoundary NonEmpty (LineEQ r :+ halfPlane) -> Chain Seq (LineEQ r :+ halfPlane) r NonEmpty (LineEQ r :+ halfPlane) -> Chain @@ -1475,12 +1475,12 @@ Foldable1 f, IsIntersectableWith halfPlane halfPlane, HasFromFoldable f, Functor f, Functor f) => f halfPlane -> Chain f halfPlane (NumType halfPlane) -lowerBoundary +lowerBoundary where - upperBoundary :: f halfPlane -> Chain f halfPlane (NumType halfPlane) -upperBoundary f halfPlane -hs = let LowerEnvelope Alternating f (Point 2 (NumType halfPlane)) halfPlane -alt = f halfPlane + upperBoundary :: f halfPlane -> Chain f halfPlane (NumType halfPlane) +upperBoundary f halfPlane +hs = let LowerEnvelope Alternating f (Point 2 (NumType halfPlane)) halfPlane +alt = f halfPlane -> LowerEnvelopeF f (Point 2 (NumType halfPlane)) halfPlane forall (g :: * -> *) (f :: * -> *) line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, @@ -1489,16 +1489,16 @@ HasFromFoldable g) => f line -> LowerEnvelopeF g (Point 2 r) line lowerEnvelope f halfPlane -hs in Alternating f (Point 2 (NumType halfPlane)) halfPlane +hs in Alternating f (Point 2 (NumType halfPlane)) halfPlane -> Chain f halfPlane (NumType halfPlane) forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating f (Point 2 (NumType halfPlane)) halfPlane -alt - lowerBoundary :: f halfPlane -> Chain f halfPlane (NumType halfPlane) -lowerBoundary f halfPlane -hs = let LowerEnvelope Alternating f (Point 2 (NumType halfPlane)) halfPlane -alt = f halfPlane +alt + lowerBoundary :: f halfPlane -> Chain f halfPlane (NumType halfPlane) +lowerBoundary f halfPlane +hs = let LowerEnvelope Alternating f (Point 2 (NumType halfPlane)) halfPlane +alt = f halfPlane -> LowerEnvelopeF f (Point 2 (NumType halfPlane)) halfPlane forall (g :: * -> *) (f :: * -> *) line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, @@ -1507,12 +1507,12 @@ HasFromFoldable g, Functor g) => f line -> UpperEnvelopeF g (Point 2 r) line upperEnvelope f halfPlane -hs in Alternating f (Point 2 (NumType halfPlane)) halfPlane +hs in Alternating f (Point 2 (NumType halfPlane)) halfPlane -> Chain f halfPlane (NumType halfPlane) forall (f :: * -> *) halfPlane r. Alternating f (Point 2 r) halfPlane -> Chain f halfPlane r Chain Alternating f (Point 2 (NumType halfPlane)) halfPlane -alt +alt -------------------------------------------------------------------------------- @@ -1657,15 +1657,15 @@ -- envelope instead. -- -- \(O(n\log n)\) -upperEnvelope :: forall g f line r. - ( NonVerticalHyperPlane_ line 2 r - , Fractional r, Ord r - , Foldable1 f, Functor f - , IsIntersectableWith line line - , Intersection line line ~ Maybe (LineLineIntersection line) - , HasFromFoldable g, Functor g +upperEnvelope :: forall g f line r. + ( NonVerticalHyperPlane_ line 2 r + , Fractional r, Ord r + , Foldable1 f, Functor f + , IsIntersectableWith line line + , Intersection line line ~ Maybe (LineLineIntersection line) + , HasFromFoldable g, Functor g ) - => f line -> UpperEnvelopeF g (Point 2 r) line + => f line -> UpperEnvelopeF g (Point 2 r) line upperEnvelope :: forall (g :: * -> *) (f :: * -> *) line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, Functor f, IsIntersectableWith line line, @@ -1693,7 +1693,7 @@ yCoord r -> r forall a. Num a => a -> a negate) line -> line -flipY (LowerEnvelopeF g (Point 2 r) line +flipY (LowerEnvelopeF g (Point 2 r) line -> LowerEnvelopeF g (Point 2 r) line) -> (f line -> LowerEnvelopeF g (Point 2 r) line) -> f line @@ -1715,11 +1715,11 @@ forall a b. (a -> b) -> f a -> f b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap line -> line -flipY +flipY where - flipY :: line -> line - flipY :: line -> line -flipY = ASetter line line r r -> (r -> r) -> line -> line + flipY :: line -> line + flipY :: line -> line +flipY = ASetter line line r r -> (r -> r) -> line -> line forall s t a b. ASetter s t a b -> (a -> b) -> s -> t over ((Vector 2 r -> Identity (Vector 2 r)) -> line -> Identity line forall hyperPlane (d :: Nat) r. @@ -1745,35 +1745,35 @@ -- | Given an x-coordiante, a bounding line (and its hyperplane), evaluate the value of -- the line. -intersectVertical :: Num r => r -> LineEQ r :+ extra -> extra' -> Point 2 r +intersectVertical :: Num r => r -> LineEQ r :+ extra -> extra' -> Point 2 r intersectVertical :: forall r extra extra'. Num r => r -> (LineEQ r :+ extra) -> extra' -> Point 2 r -intersectVertical r -x (LineEQ r -l' :+ extra +intersectVertical r +x (LineEQ r +l' :+ extra _) extra' _ = r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x (r -> LineEQ r -> r +x (r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' r -x LineEQ r -l') +x LineEQ r +l') -- | Classify the halfplane as either having a vertical bounding line or a general -- non-vertical line. -classifyHalfPlane :: (HalfPlane_ halfPlane r, Fractional r, Eq r) - => halfPlane - -> Either (r :+ halfPlane) (LineEQ r :+ halfPlane) +classifyHalfPlane :: (HalfPlane_ halfPlane r, Fractional r, Eq r) + => halfPlane + -> Either (r :+ halfPlane) (LineEQ r :+ halfPlane) classifyHalfPlane :: forall halfPlane r. (HalfPlane_ halfPlane r, Fractional r, Eq r) => halfPlane -> Either (r :+ halfPlane) (LineEQ r :+ halfPlane) -classifyHalfPlane halfPlane -h = case halfPlane -hhalfPlane +classifyHalfPlane halfPlane +h = case halfPlane +hhalfPlane -> Getting (VerticalOrLineEQ r) halfPlane (VerticalOrLineEQ r) -> VerticalOrLineEQ r forall s a. s -> Getting a s a -> a @@ -1806,27 +1806,27 @@ (HyperPlane_ hyperPlane 2 r, Fractional r, Eq r) => hyperPlane -> VerticalOrLineEQ r asGeneralLine of - VerticalLineThrough r -x -> (r :+ halfPlane) -> Either (r :+ halfPlane) (LineEQ r :+ halfPlane) + VerticalLineThrough r +x -> (r :+ halfPlane) -> Either (r :+ halfPlane) (LineEQ r :+ halfPlane) forall a b. a -> Either a b Left (r -x r -> halfPlane -> r :+ halfPlane +x r -> halfPlane -> r :+ halfPlane forall core extra. core -> extra -> core :+ extra :+ halfPlane -h) - NonVertical LineEQ r -l -> (LineEQ r :+ halfPlane) +h) + NonVertical LineEQ r +l -> (LineEQ r :+ halfPlane) -> Either (r :+ halfPlane) (LineEQ r :+ halfPlane) forall a b. b -> Either a b Right (LineEQ r -l LineEQ r -> halfPlane -> LineEQ r :+ halfPlane +l LineEQ r -> halfPlane -> LineEQ r :+ halfPlane forall core extra. core -> extra -> core :+ extra :+ halfPlane -h) +h) -- | Convert to a general line. -asGeneralLine :: (HyperPlane_ hyperPlane 2 r, Fractional r, Eq r) - => hyperPlane -> VerticalOrLineEQ r +asGeneralLine :: (HyperPlane_ hyperPlane 2 r, Fractional r, Eq r) + => hyperPlane -> VerticalOrLineEQ r asGeneralLine :: forall hyperPlane r. (HyperPlane_ hyperPlane 2 r, Fractional r, Eq r) => hyperPlane -> VerticalOrLineEQ r diff --git a/haddocks/hgeometry/src/HGeometry.IntervalTree.html b/haddocks/hgeometry/src/HGeometry.IntervalTree.html index bee0db881..ed53a169a 100644 --- a/haddocks/hgeometry/src/HGeometry.IntervalTree.html +++ b/haddocks/hgeometry/src/HGeometry.IntervalTree.html @@ -27,13 +27,13 @@ -------------------------------------------------------------------------------- -- | Information stored in a node of the Interval Tree -data NodeData i r = NodeData { forall i r. NodeData i r -> r -_splitPoint :: !r +data NodeData i r = NodeData { forall i r. NodeData i r -> r +_splitPoint :: !r , forall i r. NodeData i r -> Map r [i] -_intervalsLeft :: !(Map.Map r [i]) +_intervalsLeft :: !(Map.Map r [i]) , forall i r. NodeData i r -> Map (Down r) [i] -_intervalsRight :: !(Map.Map (Down r) [i]) - } deriving stock (Int -> NodeData i r -> ShowS +_intervalsRight :: !(Map.Map (Down r) [i]) + } deriving stock (Int -> NodeData i r -> ShowS [NodeData i r] -> ShowS NodeData i r -> String (Int -> NodeData i r -> ShowS) @@ -51,7 +51,7 @@ show :: NodeData i r -> String $cshowList :: forall i r. (Show r, Show i) => [NodeData i r] -> ShowS showList :: [NodeData i r] -> ShowS -Show,NodeData i r -> NodeData i r -> Bool +Show,NodeData i r -> NodeData i r -> Bool (NodeData i r -> NodeData i r -> Bool) -> (NodeData i r -> NodeData i r -> Bool) -> Eq (NodeData i r) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -60,7 +60,7 @@ == :: NodeData i r -> NodeData i r -> Bool $c/= :: forall i r. (Eq r, Eq i) => NodeData i r -> NodeData i r -> Bool /= :: NodeData i r -> NodeData i r -> Bool -Eq,Eq (NodeData i r) +Eq,Eq (NodeData i r) Eq (NodeData i r) => (NodeData i r -> NodeData i r -> Ordering) -> (NodeData i r -> NodeData i r -> Bool) @@ -111,7 +111,7 @@ (Ord r, Ord i) => NodeData i r -> NodeData i r -> NodeData i r min :: NodeData i r -> NodeData i r -> NodeData i r -Ord,(forall x. NodeData i r -> Rep (NodeData i r) x) +Ord,(forall x. NodeData i r -> Rep (NodeData i r) x) -> (forall x. Rep (NodeData i r) x -> NodeData i r) -> Generic (NodeData i r) forall x. Rep (NodeData i r) x -> NodeData i r @@ -126,14 +126,14 @@ to :: forall x. Rep (NodeData i r) x -> NodeData i r Generic) -instance (NFData i, NFData r) => NFData (NodeData i r) +instance (NFData i, NFData r) => NFData (NodeData i r) -- | IntervalTree type, storing intervals of type interval -newtype IntervalTree interval r = +newtype IntervalTree interval r = IntervalTree { forall interval r. IntervalTree interval r -> BinaryTree (NodeData interval r) -_unIntervalTree :: BinaryTree (NodeData interval r) } - deriving stock (Int -> IntervalTree interval r -> ShowS +_unIntervalTree :: BinaryTree (NodeData interval r) } + deriving stock (Int -> IntervalTree interval r -> ShowS [IntervalTree interval r] -> ShowS IntervalTree interval r -> String (Int -> IntervalTree interval r -> ShowS) @@ -163,7 +163,7 @@ (Show r, Show interval) => [IntervalTree interval r] -> ShowS showList :: [IntervalTree interval r] -> ShowS -Show,IntervalTree interval r -> IntervalTree interval r -> Bool +Show,IntervalTree interval r -> IntervalTree interval r -> Bool (IntervalTree interval r -> IntervalTree interval r -> Bool) -> (IntervalTree interval r -> IntervalTree interval r -> Bool) -> Eq (IntervalTree interval r) @@ -179,7 +179,7 @@ (Eq r, Eq interval) => IntervalTree interval r -> IntervalTree interval r -> Bool /= :: IntervalTree interval r -> IntervalTree interval r -> Bool -Eq,(forall x. +Eq,(forall x. IntervalTree interval r -> Rep (IntervalTree interval r) x) -> (forall x. Rep (IntervalTree interval r) x -> IntervalTree interval r) @@ -204,12 +204,12 @@ Rep (IntervalTree interval r) x -> IntervalTree interval r Generic) -instance (NFData i, NFData r) => NFData (IntervalTree i r) +instance (NFData i, NFData r) => NFData (IntervalTree i r) -- | Given an ordered list of points, create an interval tree -- -- \(O(n)\) -createTree :: (Foldable f, Ord r) => f r -> IntervalTree interval r +createTree :: (Foldable f, Ord r) => f r -> IntervalTree interval r createTree :: forall (f :: * -> *) r interval. (Foldable f, Ord r) => f r -> IntervalTree interval r @@ -226,14 +226,14 @@ -> BinaryTree r -> BinaryTree (NodeData interval r) forall a b. (a -> b) -> BinaryTree a -> BinaryTree b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\r -m -> r +fmap (\r +m -> r -> Map r [interval] -> Map (Down r) [interval] -> NodeData interval r forall i r. r -> Map r [i] -> Map (Down r) [i] -> NodeData i r NodeData r -m Map r [interval] +m Map r [interval] forall a. Monoid a => a mempty Map (Down r) [interval] forall a. Monoid a => a @@ -248,13 +248,13 @@ -- | Build an interval tree -- -- \(O(n \log n)\) -fromIntervals :: (Foldable f, Ord r, ClosedInterval_ interval r) - => f interval -> IntervalTree interval r +fromIntervals :: (Foldable f, Ord r, ClosedInterval_ interval r) + => f interval -> IntervalTree interval r fromIntervals :: forall (f :: * -> *) r interval. (Foldable f, Ord r, ClosedInterval_ interval r) => f interval -> IntervalTree interval r -fromIntervals f interval -is = (interval -> IntervalTree interval r -> IntervalTree interval r) +fromIntervals f interval +is = (interval -> IntervalTree interval r -> IntervalTree interval r) -> IntervalTree interval r -> f interval -> IntervalTree interval r forall a b. (a -> b -> b) -> b -> f a -> b forall (t :: * -> *) a b. @@ -269,21 +269,21 @@ (Foldable f, Ord r) => f r -> IntervalTree interval r createTree Set r -pts) f interval -is +pts) f interval +is where - pts :: Set r -pts = (interval -> Set r -> Set r) -> Set r -> f interval -> Set r + pts :: Set r +pts = (interval -> Set r -> Set r) -> Set r -> f interval -> Set r forall a b. (a -> b -> b) -> b -> f a -> b forall (t :: * -> *) a b. Foldable t => (a -> b -> b) -> b -> t a -> b -foldr (\interval -i Set r -s -> r -> Set r -> Set r +foldr (\interval +i Set r +s -> r -> Set r -> Set r forall a. Ord a => a -> Set a -> Set a Set.insert (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p @@ -293,25 +293,25 @@ $ r -> Set r -> Set r forall a. Ord a => a -> Set a -> Set a Set.insert (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p Lens' interval r end) Set r -s) Set r +s) Set r forall a. Set a Set.empty f interval -is +is -- | Lists the intervals. We don't guarantee anything about the order -- -- running time: \(O(n)\). -listIntervals :: IntervalTree interval r -> [interval] +listIntervals :: IntervalTree interval r -> [interval] listIntervals :: forall interval r. IntervalTree interval r -> [interval] listIntervals = BinaryTree (NodeData interval r) -> [interval] forall {i} {r}. BinaryTree (NodeData i r) -> [i] -toList' (BinaryTree (NodeData interval r) -> [interval]) +toList' (BinaryTree (NodeData interval r) -> [interval]) -> (IntervalTree interval r -> BinaryTree (NodeData interval r)) -> IntervalTree interval r -> [interval] @@ -321,13 +321,13 @@ IntervalTree interval r -> BinaryTree (NodeData interval r) _unIntervalTree where - toList' :: BinaryTree (NodeData i r) -> [i] -toList' BinaryTree (NodeData i r) + toList' :: BinaryTree (NodeData i r) -> [i] +toList' BinaryTree (NodeData i r) Nil = [] - toList' (Internal BinaryTree (NodeData i r) -l NodeData i r -v BinaryTree (NodeData i r) -r) = + toList' (Internal BinaryTree (NodeData i r) +l NodeData i r +v BinaryTree (NodeData i r) +r) = [[i]] -> [i] forall (t :: * -> *) a. Foldable t => t [a] -> [a] concat [[[i]] -> [i] @@ -335,7 +335,7 @@ concat ([[i]] -> [i]) -> [[i]] -> [i] forall a b. (a -> b) -> a -> b $ NodeData i r -vNodeData i r -> Getting (Endo [[i]]) (NodeData i r) [i] -> [[i]] +vNodeData i r -> Getting (Endo [[i]]) (NodeData i r) [i] -> [[i]] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..(NodeData i r -> Map r [i]) -> (Map r [i] -> Const (Endo [[i]]) (Map r [i])) @@ -361,17 +361,17 @@ Applicative f => (a -> f b) -> Map r a -> f (Map r b) traverse, BinaryTree (NodeData i r) -> [i] -toList' BinaryTree (NodeData i r) -l, BinaryTree (NodeData i r) -> [i] -toList' BinaryTree (NodeData i r) -r] +toList' BinaryTree (NodeData i r) +l, BinaryTree (NodeData i r) -> [i] +toList' BinaryTree (NodeData i r) +r] -------------------------------------------------------------------------------- -- | Find all intervals that stab x -- -- \(O(\log n + k)\), where k is the output size -search :: Ord r => r -> IntervalTree interval r -> [interval] +search :: Ord r => r -> IntervalTree interval r -> [interval] search :: forall r interval. Ord r => r -> IntervalTree interval r -> [interval] @@ -384,36 +384,36 @@ -- | Find all intervals that stab x -- -- \(O(\log n + k)\), where k is the output size -stab :: Ord r => r -> IntervalTree interval r -> [interval] +stab :: Ord r => r -> IntervalTree interval r -> [interval] stab :: forall r interval. Ord r => r -> IntervalTree interval r -> [interval] -stab r -q (IntervalTree BinaryTree (NodeData interval r) -t) = BinaryTree (NodeData interval r) -> [interval] -stab' BinaryTree (NodeData interval r) -t +stab r +q (IntervalTree BinaryTree (NodeData interval r) +t) = BinaryTree (NodeData interval r) -> [interval] +stab' BinaryTree (NodeData interval r) +t where - stab' :: BinaryTree (NodeData interval r) -> [interval] -stab' BinaryTree (NodeData interval r) + stab' :: BinaryTree (NodeData interval r) -> [interval] +stab' BinaryTree (NodeData interval r) Nil = [] - stab' (Internal BinaryTree (NodeData interval r) -l (NodeData r -m Map r [interval] -ll Map (Down r) [interval] -rr) BinaryTree (NodeData interval r) -r) + stab' (Internal BinaryTree (NodeData interval r) +l (NodeData r +m Map r [interval] +ll Map (Down r) [interval] +rr) BinaryTree (NodeData interval r) +r) | r -q r -> r -> Bool +q r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -m = let is :: [interval] -is = (r -> Bool) -> [(r, [interval])] -> [interval] +m = let is :: [interval] +is = (r -> Bool) -> [(r, [interval])] -> [interval] forall {b} {b}. (b -> Bool) -> [(b, [b])] -> [b] -f (r -> r -> Bool +f (r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -q)([(r, [interval])] -> [interval]) +q)([(r, [interval])] -> [interval]) -> (Map r [interval] -> [(r, [interval])]) -> Map r [interval] -> [interval] @@ -423,23 +423,23 @@ Map.toAscList (Map r [interval] -> [interval]) -> Map r [interval] -> [interval] forall a b. (a -> b) -> a -> b $ Map r [interval] -ll +ll in [interval] -is [interval] -> [interval] -> [interval] +is [interval] -> [interval] -> [interval] forall a. Semigroup a => a -> a -> a <> BinaryTree (NodeData interval r) -> [interval] -stab' BinaryTree (NodeData interval r) -l +stab' BinaryTree (NodeData interval r) +l | Bool -otherwise = let is :: [interval] -is = (Down r -> Bool) -> [(Down r, [interval])] -> [interval] +otherwise = let is :: [interval] +is = (Down r -> Bool) -> [(Down r, [interval])] -> [interval] forall {b} {b}. (b -> Bool) -> [(b, [b])] -> [b] -f (Down r -> Down r -> Bool +f (Down r -> Down r -> Bool forall a. Ord a => a -> a -> Bool <= (r -> Down r forall a. a -> Down a Down r -q)) ([(Down r, [interval])] -> [interval]) +q)) ([(Down r, [interval])] -> [interval]) -> (Map (Down r) [interval] -> [(Down r, [interval])]) -> Map (Down r) [interval] -> [interval] @@ -450,16 +450,16 @@ -> Map (Down r) [interval] -> [interval] forall a b. (a -> b) -> a -> b $ Map (Down r) [interval] -rr +rr in [interval] -is [interval] -> [interval] -> [interval] +is [interval] -> [interval] -> [interval] forall a. Semigroup a => a -> a -> a <> BinaryTree (NodeData interval r) -> [interval] -stab' BinaryTree (NodeData interval r) -r - f :: (b -> Bool) -> [(b, [b])] -> [b] -f b -> Bool -p = ((b, [b]) -> [b]) -> [(b, [b])] -> [b] +stab' BinaryTree (NodeData interval r) +r + f :: (b -> Bool) -> [(b, [b])] -> [b] +f b -> Bool +p = ((b, [b]) -> [b]) -> [(b, [b])] -> [b] forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b] concatMap (b, [b]) -> [b] forall a b. (a, b) -> b @@ -469,7 +469,7 @@ . ((b, [b]) -> Bool) -> [(b, [b])] -> [(b, [b])] forall a. (a -> Bool) -> [a] -> [a] List.takeWhile (b -> Bool -p (b -> Bool) -> ((b, [b]) -> b) -> (b, [b]) -> Bool +p (b -> Bool) -> ((b, [b]) -> b) -> (b, [b]) -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . (b, [b]) -> b forall a b. (a, b) -> a @@ -482,14 +482,14 @@ -- pre: the interval intersects some midpoint in the tree -- -- \(O(\log n)\), where n is the number of endpoints the tree is built on -insert :: (Ord r, ClosedInterval_ interval r) - => interval -> IntervalTree interval r -> IntervalTree interval r +insert :: (Ord r, ClosedInterval_ interval r) + => interval -> IntervalTree interval r -> IntervalTree interval r insert :: forall r interval. (Ord r, ClosedInterval_ interval r) => interval -> IntervalTree interval r -> IntervalTree interval r -insert interval -i (IntervalTree BinaryTree (NodeData interval r) -t) = BinaryTree (NodeData interval r) -> IntervalTree interval r +insert interval +i (IntervalTree BinaryTree (NodeData interval r) +t) = BinaryTree (NodeData interval r) -> IntervalTree interval r forall interval r. BinaryTree (NodeData interval r) -> IntervalTree interval r IntervalTree (BinaryTree (NodeData interval r) -> IntervalTree interval r) @@ -497,40 +497,40 @@ forall a b. (a -> b) -> a -> b $ BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -insert' BinaryTree (NodeData interval r) -t +insert' BinaryTree (NodeData interval r) +t where - insert' :: BinaryTree (NodeData interval r) + insert' :: BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -insert' BinaryTree (NodeData interval r) +insert' BinaryTree (NodeData interval r) Nil = BinaryTree (NodeData interval r) forall a. BinaryTree a Nil - insert' (Internal BinaryTree (NodeData interval r) -l nd :: NodeData interval r -nd@(NodeData interval r -> r + insert' (Internal BinaryTree (NodeData interval r) +l nd :: NodeData interval r +nd@(NodeData interval r -> r forall i r. NodeData i r -> r -_splitPoint -> r -m) BinaryTree (NodeData interval r) -r) +_splitPoint -> r +m) BinaryTree (NodeData interval r) +r) | r -m r -> interval -> Bool +m r -> interval -> Bool forall interval r. (Ord r, Interval_ interval r) => r -> interval -> Bool `stabsInterval` interval -i = BinaryTree (NodeData interval r) +i = BinaryTree (NodeData interval r) -> NodeData interval r -> BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a Internal BinaryTree (NodeData interval r) -l (NodeData interval r -> NodeData interval r -insertInNode NodeData interval r -nd) BinaryTree (NodeData interval r) -r +l (NodeData interval r -> NodeData interval r +insertInNode NodeData interval r +nd) BinaryTree (NodeData interval r) +r | (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -538,17 +538,17 @@ end) r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -m = BinaryTree (NodeData interval r) +m = BinaryTree (NodeData interval r) -> NodeData interval r -> BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a Internal (BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -insert' BinaryTree (NodeData interval r) -l) NodeData interval r -nd BinaryTree (NodeData interval r) -r +insert' BinaryTree (NodeData interval r) +l) NodeData interval r +nd BinaryTree (NodeData interval r) +r | Bool otherwise = BinaryTree (NodeData interval r) -> NodeData interval r @@ -556,36 +556,36 @@ -> BinaryTree (NodeData interval r) forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a Internal BinaryTree (NodeData interval r) -l NodeData interval r -nd (BinaryTree (NodeData interval r) +l NodeData interval r +nd (BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -insert' BinaryTree (NodeData interval r) -r) +insert' BinaryTree (NodeData interval r) +r) - insertInNode :: NodeData interval r -> NodeData interval r -insertInNode (NodeData r -m Map r [interval] -l Map (Down r) [interval] -r) = r + insertInNode :: NodeData interval r -> NodeData interval r +insertInNode (NodeData r +m Map r [interval] +l Map (Down r) [interval] +r) = r -> Map r [interval] -> Map (Down r) [interval] -> NodeData interval r forall i r. r -> Map r [i] -> Map (Down r) [i] -> NodeData i r NodeData r -m (([interval] -> [interval] -> [interval]) +m (([interval] -> [interval] -> [interval]) -> r -> [interval] -> Map r [interval] -> Map r [interval] forall k a. Ord k => (a -> a -> a) -> k -> a -> Map k a -> Map k a Map.insertWith [interval] -> [interval] -> [interval] forall a. Semigroup a => a -> a -> a (<>) (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p Lens' interval r start) [interval -i] Map r [interval] -l) +i] Map r [interval] +l) (([interval] -> [interval] -> [interval]) -> Down r -> [interval] @@ -599,27 +599,27 @@ Down (r -> Down r) -> r -> Down r forall a b. (a -> b) -> a -> b $ interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p Lens' interval r end) [interval -i] Map (Down r) [interval] -r) +i] Map (Down r) [interval] +r) -- | Delete an interval from the Tree -- -- \(O(\log n)\) (under some general position assumption) -delete :: (Ord r, ClosedInterval_ interval r, Eq interval) - => interval -> IntervalTree interval r -> IntervalTree interval r +delete :: (Ord r, ClosedInterval_ interval r, Eq interval) + => interval -> IntervalTree interval r -> IntervalTree interval r delete :: forall r interval. (Ord r, ClosedInterval_ interval r, Eq interval) => interval -> IntervalTree interval r -> IntervalTree interval r -delete interval -i (IntervalTree BinaryTree (NodeData interval r) -t) = BinaryTree (NodeData interval r) -> IntervalTree interval r +delete interval +i (IntervalTree BinaryTree (NodeData interval r) +t) = BinaryTree (NodeData interval r) -> IntervalTree interval r forall interval r. BinaryTree (NodeData interval r) -> IntervalTree interval r IntervalTree (BinaryTree (NodeData interval r) -> IntervalTree interval r) @@ -627,40 +627,40 @@ forall a b. (a -> b) -> a -> b $ BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -delete' BinaryTree (NodeData interval r) -t +delete' BinaryTree (NodeData interval r) +t where - delete' :: BinaryTree (NodeData interval r) + delete' :: BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -delete' BinaryTree (NodeData interval r) +delete' BinaryTree (NodeData interval r) Nil = BinaryTree (NodeData interval r) forall a. BinaryTree a Nil - delete' (Internal BinaryTree (NodeData interval r) -l nd :: NodeData interval r -nd@(NodeData interval r -> r + delete' (Internal BinaryTree (NodeData interval r) +l nd :: NodeData interval r +nd@(NodeData interval r -> r forall i r. NodeData i r -> r -_splitPoint -> r -m) BinaryTree (NodeData interval r) -r) +_splitPoint -> r +m) BinaryTree (NodeData interval r) +r) | r -m r -> interval -> Bool +m r -> interval -> Bool forall interval r. (Ord r, Interval_ interval r) => r -> interval -> Bool `stabsInterval` interval -i = BinaryTree (NodeData interval r) +i = BinaryTree (NodeData interval r) -> NodeData interval r -> BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a Internal BinaryTree (NodeData interval r) -l (NodeData interval r -> NodeData interval r -deleteFromNode NodeData interval r -nd) BinaryTree (NodeData interval r) -r +l (NodeData interval r -> NodeData interval r +deleteFromNode NodeData interval r +nd) BinaryTree (NodeData interval r) +r | (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -668,17 +668,17 @@ end) r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -m = BinaryTree (NodeData interval r) +m = BinaryTree (NodeData interval r) -> NodeData interval r -> BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a Internal (BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -delete' BinaryTree (NodeData interval r) -l) NodeData interval r -nd BinaryTree (NodeData interval r) -r +delete' BinaryTree (NodeData interval r) +l) NodeData interval r +nd BinaryTree (NodeData interval r) +r | Bool otherwise = BinaryTree (NodeData interval r) -> NodeData interval r @@ -686,68 +686,68 @@ -> BinaryTree (NodeData interval r) forall a. BinaryTree a -> a -> BinaryTree a -> BinaryTree a Internal BinaryTree (NodeData interval r) -l NodeData interval r -nd (BinaryTree (NodeData interval r) +l NodeData interval r +nd (BinaryTree (NodeData interval r) -> BinaryTree (NodeData interval r) -delete' BinaryTree (NodeData interval r) -r) +delete' BinaryTree (NodeData interval r) +r) - deleteFromNode :: NodeData interval r -> NodeData interval r -deleteFromNode (NodeData r -m Map r [interval] -l Map (Down r) [interval] -r) = r + deleteFromNode :: NodeData interval r -> NodeData interval r +deleteFromNode (NodeData r +m Map r [interval] +l Map (Down r) [interval] +r) = r -> Map r [interval] -> Map (Down r) [interval] -> NodeData interval r forall i r. r -> Map r [i] -> Map (Down r) [i] -> NodeData i r NodeData r -m (([interval] -> Maybe [interval]) +m (([interval] -> Maybe [interval]) -> r -> Map r [interval] -> Map r [interval] forall k a. Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a Map.update [interval] -> Maybe [interval] -f (interval -iinterval -> Getting r interval r -> r +f (interval +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p Lens' interval r start) Map r [interval] -l) +l) (([interval] -> Maybe [interval]) -> Down r -> Map (Down r) [interval] -> Map (Down r) [interval] forall k a. Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a Map.update [interval] -> Maybe [interval] -f (r -> Down r +f (r -> Down r forall a. a -> Down a Down (r -> Down r) -> r -> Down r forall a b. (a -> b) -> a -> b $ interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p Lens' interval r end) Map (Down r) [interval] -r) +r) - f :: [interval] -> Maybe [interval] -f [interval] -is = let is' :: [interval] -is' = interval -> [interval] -> [interval] + f :: [interval] -> Maybe [interval] +f [interval] +is = let is' :: [interval] +is' = interval -> [interval] -> [interval] forall a. Eq a => a -> [a] -> [a] List.delete interval -i [interval] -is in if [interval] -> Bool +i [interval] +is in if [interval] -> Bool forall a. [a] -> Bool forall (t :: * -> *) a. Foldable t => t a -> Bool null [interval] -is' then Maybe [interval] +is' then Maybe [interval] forall a. Maybe a Nothing else [interval] -> Maybe [interval] forall a. a -> Maybe a Just [interval] -is' +is' -------------------------------------------------------------------------------- diff --git a/haddocks/hgeometry/src/HGeometry.Line.LowerEnvelope.html b/haddocks/hgeometry/src/HGeometry.Line.LowerEnvelope.html index 6fa40ab95..86fc47744 100644 --- a/haddocks/hgeometry/src/HGeometry.Line.LowerEnvelope.html +++ b/haddocks/hgeometry/src/HGeometry.Line.LowerEnvelope.html @@ -41,16 +41,253 @@ -------------------------------------------------------------------------------- -- | The lower envelope of a set of lines -newtype LowerEnvelopeF f vertex line = LowerEnvelope (Alternating f vertex line) - --- | A lower envelope, where the data structure is a vector. -type LowerEnvelope = LowerEnvelopeF Vector.Vector - --- | projection function that turns a lower envelope into an alternating "list" of lines --- and vertices. -_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') - (Alternating f vertex line) (Alternating f' vertex' line') -_Alternating :: forall (f :: * -> *) vertex line (f' :: * -> *) vertex' line' +newtype LowerEnvelopeF f vertex line = LowerEnvelope (Alternating f vertex line) + deriving newtype ((forall a b. + (a -> b) -> LowerEnvelopeF f vertex a -> LowerEnvelopeF f vertex b) +-> (forall a b. + a -> LowerEnvelopeF f vertex b -> LowerEnvelopeF f vertex a) +-> Functor (LowerEnvelopeF f vertex) +forall a b. +a -> LowerEnvelopeF f vertex b -> LowerEnvelopeF f vertex a +forall a b. +(a -> b) -> LowerEnvelopeF f vertex a -> LowerEnvelopeF f vertex b +forall (f :: * -> *). +(forall a b. (a -> b) -> f a -> f b) +-> (forall a b. a -> f b -> f a) -> Functor f +forall (f :: * -> *) vertex a b. +Functor f => +a -> LowerEnvelopeF f vertex b -> LowerEnvelopeF f vertex a +forall (f :: * -> *) vertex a b. +Functor f => +(a -> b) -> LowerEnvelopeF f vertex a -> LowerEnvelopeF f vertex b +$cfmap :: forall (f :: * -> *) vertex a b. +Functor f => +(a -> b) -> LowerEnvelopeF f vertex a -> LowerEnvelopeF f vertex b +fmap :: forall a b. +(a -> b) -> LowerEnvelopeF f vertex a -> LowerEnvelopeF f vertex b +$c<$ :: forall (f :: * -> *) vertex a b. +Functor f => +a -> LowerEnvelopeF f vertex b -> LowerEnvelopeF f vertex a +<$ :: forall a b. +a -> LowerEnvelopeF f vertex b -> LowerEnvelopeF f vertex a +Functor, (forall a. Functor (LowerEnvelopeF f a)) => +(forall a b c d. + (a -> b) + -> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d) +-> (forall a b c. + (a -> b) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b c) +-> (forall b c a. + (b -> c) -> LowerEnvelopeF f a b -> LowerEnvelopeF f a c) +-> Bifunctor (LowerEnvelopeF f) +forall a. Functor (LowerEnvelopeF f a) +forall a b c. +(a -> b) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b c +forall b c a. +(b -> c) -> LowerEnvelopeF f a b -> LowerEnvelopeF f a c +forall a b c d. +(a -> b) +-> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d +forall (f :: * -> *) a. Functor f => Functor (LowerEnvelopeF f a) +forall (f :: * -> *) a b c. +Functor f => +(a -> b) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b c +forall (f :: * -> *) b c a. +Functor f => +(b -> c) -> LowerEnvelopeF f a b -> LowerEnvelopeF f a c +forall (f :: * -> *) a b c d. +Functor f => +(a -> b) +-> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d +forall (p :: * -> * -> *). +(forall a. Functor (p a)) => +(forall a b c d. (a -> b) -> (c -> d) -> p a c -> p b d) +-> (forall a b c. (a -> b) -> p a c -> p b c) +-> (forall b c a. (b -> c) -> p a b -> p a c) +-> Bifunctor p +$cbimap :: forall (f :: * -> *) a b c d. +Functor f => +(a -> b) +-> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d +bimap :: forall a b c d. +(a -> b) +-> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d +$cfirst :: forall (f :: * -> *) a b c. +Functor f => +(a -> b) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b c +first :: forall a b c. +(a -> b) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b c +$csecond :: forall (f :: * -> *) b c a. +Functor f => +(b -> c) -> LowerEnvelopeF f a b -> LowerEnvelopeF f a c +second :: forall b c a. +(b -> c) -> LowerEnvelopeF f a b -> LowerEnvelopeF f a c +Bifunctor, (forall m. Monoid m => LowerEnvelopeF f vertex m -> m) +-> (forall m a. + Monoid m => + (a -> m) -> LowerEnvelopeF f vertex a -> m) +-> (forall m a. + Monoid m => + (a -> m) -> LowerEnvelopeF f vertex a -> m) +-> (forall a b. + (a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b) +-> (forall a b. + (a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b) +-> (forall b a. + (b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b) +-> (forall b a. + (b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b) +-> (forall a. (a -> a -> a) -> LowerEnvelopeF f vertex a -> a) +-> (forall a. (a -> a -> a) -> LowerEnvelopeF f vertex a -> a) +-> (forall a. LowerEnvelopeF f vertex a -> [a]) +-> (forall a. LowerEnvelopeF f vertex a -> Bool) +-> (forall a. LowerEnvelopeF f vertex a -> Int) +-> (forall a. Eq a => a -> LowerEnvelopeF f vertex a -> Bool) +-> (forall a. Ord a => LowerEnvelopeF f vertex a -> a) +-> (forall a. Ord a => LowerEnvelopeF f vertex a -> a) +-> (forall a. Num a => LowerEnvelopeF f vertex a -> a) +-> (forall a. Num a => LowerEnvelopeF f vertex a -> a) +-> Foldable (LowerEnvelopeF f vertex) +forall a. Eq a => a -> LowerEnvelopeF f vertex a -> Bool +forall a. Num a => LowerEnvelopeF f vertex a -> a +forall a. Ord a => LowerEnvelopeF f vertex a -> a +forall m. Monoid m => LowerEnvelopeF f vertex m -> m +forall a. LowerEnvelopeF f vertex a -> Bool +forall a. LowerEnvelopeF f vertex a -> Int +forall a. LowerEnvelopeF f vertex a -> [a] +forall a. (a -> a -> a) -> LowerEnvelopeF f vertex a -> a +forall m a. Monoid m => (a -> m) -> LowerEnvelopeF f vertex a -> m +forall b a. (b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b +forall a b. (a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b +forall (t :: * -> *). +(forall m. Monoid m => t m -> m) +-> (forall m a. Monoid m => (a -> m) -> t a -> m) +-> (forall m a. Monoid m => (a -> m) -> t a -> m) +-> (forall a b. (a -> b -> b) -> b -> t a -> b) +-> (forall a b. (a -> b -> b) -> b -> t a -> b) +-> (forall b a. (b -> a -> b) -> b -> t a -> b) +-> (forall b a. (b -> a -> b) -> b -> t a -> b) +-> (forall a. (a -> a -> a) -> t a -> a) +-> (forall a. (a -> a -> a) -> t a -> a) +-> (forall a. t a -> [a]) +-> (forall a. t a -> Bool) +-> (forall a. t a -> Int) +-> (forall a. Eq a => a -> t a -> Bool) +-> (forall a. Ord a => t a -> a) +-> (forall a. Ord a => t a -> a) +-> (forall a. Num a => t a -> a) +-> (forall a. Num a => t a -> a) +-> Foldable t +forall (f :: * -> *) vertex a. +(Foldable f, Eq a) => +a -> LowerEnvelopeF f vertex a -> Bool +forall (f :: * -> *) vertex a. +(Foldable f, Num a) => +LowerEnvelopeF f vertex a -> a +forall (f :: * -> *) vertex a. +(Foldable f, Ord a) => +LowerEnvelopeF f vertex a -> a +forall (f :: * -> *) vertex m. +(Foldable f, Monoid m) => +LowerEnvelopeF f vertex m -> m +forall (f :: * -> *) vertex a. +Foldable f => +LowerEnvelopeF f vertex a -> Bool +forall (f :: * -> *) vertex a. +Foldable f => +LowerEnvelopeF f vertex a -> Int +forall (f :: * -> *) vertex a. +Foldable f => +LowerEnvelopeF f vertex a -> [a] +forall (f :: * -> *) vertex a. +Foldable f => +(a -> a -> a) -> LowerEnvelopeF f vertex a -> a +forall (f :: * -> *) vertex m a. +(Foldable f, Monoid m) => +(a -> m) -> LowerEnvelopeF f vertex a -> m +forall (f :: * -> *) vertex b a. +Foldable f => +(b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b +forall (f :: * -> *) vertex a b. +Foldable f => +(a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b +$cfold :: forall (f :: * -> *) vertex m. +(Foldable f, Monoid m) => +LowerEnvelopeF f vertex m -> m +fold :: forall m. Monoid m => LowerEnvelopeF f vertex m -> m +$cfoldMap :: forall (f :: * -> *) vertex m a. +(Foldable f, Monoid m) => +(a -> m) -> LowerEnvelopeF f vertex a -> m +foldMap :: forall m a. Monoid m => (a -> m) -> LowerEnvelopeF f vertex a -> m +$cfoldMap' :: forall (f :: * -> *) vertex m a. +(Foldable f, Monoid m) => +(a -> m) -> LowerEnvelopeF f vertex a -> m +foldMap' :: forall m a. Monoid m => (a -> m) -> LowerEnvelopeF f vertex a -> m +$cfoldr :: forall (f :: * -> *) vertex a b. +Foldable f => +(a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b +foldr :: forall a b. (a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b +$cfoldr' :: forall (f :: * -> *) vertex a b. +Foldable f => +(a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b +foldr' :: forall a b. (a -> b -> b) -> b -> LowerEnvelopeF f vertex a -> b +$cfoldl :: forall (f :: * -> *) vertex b a. +Foldable f => +(b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b +foldl :: forall b a. (b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b +$cfoldl' :: forall (f :: * -> *) vertex b a. +Foldable f => +(b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b +foldl' :: forall b a. (b -> a -> b) -> b -> LowerEnvelopeF f vertex a -> b +$cfoldr1 :: forall (f :: * -> *) vertex a. +Foldable f => +(a -> a -> a) -> LowerEnvelopeF f vertex a -> a +foldr1 :: forall a. (a -> a -> a) -> LowerEnvelopeF f vertex a -> a +$cfoldl1 :: forall (f :: * -> *) vertex a. +Foldable f => +(a -> a -> a) -> LowerEnvelopeF f vertex a -> a +foldl1 :: forall a. (a -> a -> a) -> LowerEnvelopeF f vertex a -> a +$ctoList :: forall (f :: * -> *) vertex a. +Foldable f => +LowerEnvelopeF f vertex a -> [a] +toList :: forall a. LowerEnvelopeF f vertex a -> [a] +$cnull :: forall (f :: * -> *) vertex a. +Foldable f => +LowerEnvelopeF f vertex a -> Bool +null :: forall a. LowerEnvelopeF f vertex a -> Bool +$clength :: forall (f :: * -> *) vertex a. +Foldable f => +LowerEnvelopeF f vertex a -> Int +length :: forall a. LowerEnvelopeF f vertex a -> Int +$celem :: forall (f :: * -> *) vertex a. +(Foldable f, Eq a) => +a -> LowerEnvelopeF f vertex a -> Bool +elem :: forall a. Eq a => a -> LowerEnvelopeF f vertex a -> Bool +$cmaximum :: forall (f :: * -> *) vertex a. +(Foldable f, Ord a) => +LowerEnvelopeF f vertex a -> a +maximum :: forall a. Ord a => LowerEnvelopeF f vertex a -> a +$cminimum :: forall (f :: * -> *) vertex a. +(Foldable f, Ord a) => +LowerEnvelopeF f vertex a -> a +minimum :: forall a. Ord a => LowerEnvelopeF f vertex a -> a +$csum :: forall (f :: * -> *) vertex a. +(Foldable f, Num a) => +LowerEnvelopeF f vertex a -> a +sum :: forall a. Num a => LowerEnvelopeF f vertex a -> a +$cproduct :: forall (f :: * -> *) vertex a. +(Foldable f, Num a) => +LowerEnvelopeF f vertex a -> a +product :: forall a. Num a => LowerEnvelopeF f vertex a -> a +Foldable) + +-- | A lower envelope, where the data structure is a vector. +type LowerEnvelope = LowerEnvelopeF Vector.Vector + +-- | projection function that turns a lower envelope into an alternating "list" of lines +-- and vertices. +_Alternating :: Iso (LowerEnvelopeF f vertex line) (LowerEnvelopeF f' vertex' line') + (Alternating f vertex line) (Alternating f' vertex' line') +_Alternating :: forall (f :: * -> *) vertex line (f' :: * -> *) vertex' line' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (Alternating f vertex line) (f (Alternating f' vertex' line')) @@ -66,89 +303,50 @@ (Alternating f vertex line) (Alternating f' vertex' line') coerced - -deriving instance ( Show line, Show (f (vertex, line)) - ) => Show (LowerEnvelopeF f vertex line) - -deriving instance ( Eq line, Eq (f (vertex, line)) - ) => Eq (LowerEnvelopeF f vertex line) - -deriving instance ( Ord line, Ord (f (vertex, line)) - ) => Ord (LowerEnvelopeF f vertex line) - -instance Functor f => Functor (LowerEnvelopeF f r) where - fmap :: forall a b. -(a -> b) -> LowerEnvelopeF f r a -> LowerEnvelopeF f r b -fmap a -> b -f = (r -> r) --> (a -> b) -> LowerEnvelopeF f r a -> LowerEnvelopeF f r b -forall a b c d. -(a -> b) --> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d -forall (p :: * -> * -> *) a b c d. -Bifunctor p => -(a -> b) -> (c -> d) -> p a c -> p b d -bimap r -> r -forall a. a -> a -id a -> b -f + +deriving instance ( Show line, Show (f (vertex, line)) + ) => Show (LowerEnvelopeF f vertex line) + +deriving instance ( Eq line, Eq (f (vertex, line)) + ) => Eq (LowerEnvelopeF f vertex line) + +deriving instance ( Ord line, Ord (f (vertex, line)) + ) => Ord (LowerEnvelopeF f vertex line) + + -instance Functor f => Bifunctor (LowerEnvelopeF f) where - bimap :: forall a b c d. -(a -> b) --> (c -> d) -> LowerEnvelopeF f a c -> LowerEnvelopeF f b d -bimap a -> b -f c -> d -g (LowerEnvelope Alternating f a c -alt) = Alternating f b d -> LowerEnvelopeF f b d -forall (f :: * -> *) vertex line. -Alternating f vertex line -> LowerEnvelopeF f vertex line -LowerEnvelope (Alternating f b d -> LowerEnvelopeF f b d) --> Alternating f b d -> LowerEnvelopeF f b d -forall a b. (a -> b) -> a -> b -$ (a -> b) -> (c -> d) -> Alternating f a c -> Alternating f b d -forall a b c d. -(a -> b) -> (c -> d) -> Alternating f a c -> Alternating f b d -forall (p :: * -> * -> *) a b c d. -Bifunctor p => -(a -> b) -> (c -> d) -> p a c -> p b d -bimap a -> b -f c -> d -g Alternating f a c -alt - - --- -- | change the functor type of the Lower envelope --- mapF :: (f (vertex, line) -> g (vertex, line)) --- -> LowerEnvelopeF f vertex line -> LowerEnvelopeF g vertex line --- mapF f = _Alternating %~ Alternating.mapF f - --- (LowerEnvelope alt) = LowerEnvelope (Alternating.mapF f alt) - --------------------------------------------------------------------------------- - --- | Computes the lower envelope of a set of \(n\) lines. --- --- pre: the input is a set (so no duplicates) --- --- running time: \(O(n\log n)\) -lowerEnvelope :: forall g f line r. - ( NonVerticalHyperPlane_ line 2 r - , Fractional r, Ord r - , Foldable1 f, Functor f - , IsIntersectableWith line line - , Intersection line line ~ Maybe (LineLineIntersection line) - , HasFromFoldable g - ) - => f line -> LowerEnvelopeF g (Point 2 r) line -lowerEnvelope :: forall (g :: * -> *) (f :: * -> *) line r. + +-- -- | change the functor type of the Lower envelope +-- mapF :: (f (vertex, line) -> g (vertex, line)) +-- -> LowerEnvelopeF f vertex line -> LowerEnvelopeF g vertex line +-- mapF f = _Alternating %~ Alternating.mapF f + +-- (LowerEnvelope alt) = LowerEnvelope (Alternating.mapF f alt) + +-------------------------------------------------------------------------------- + +-- | Computes the lower envelope of a set of \(n\) lines. +-- +-- pre: the input is a set (so no duplicates) +-- +-- running time: \(O(n\log n)\) +lowerEnvelope :: forall g f line r. + ( NonVerticalHyperPlane_ line 2 r + , Fractional r, Ord r + , Foldable1 f, Functor f + , IsIntersectableWith line line + , Intersection line line ~ Maybe (LineLineIntersection line) + , HasFromFoldable g + ) + => f line -> LowerEnvelopeF g (Point 2 r) line +lowerEnvelope :: forall (g :: * -> *) (f :: * -> *) line r. (NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f, Functor f, IsIntersectableWith line line, Intersection line line ~ Maybe (LineLineIntersection line), HasFromFoldable g) => f line -> LowerEnvelopeF g (Point 2 r) line lowerEnvelope = NonEmpty line -> LowerEnvelopeF g (Point 2 r) line -construct (NonEmpty line -> LowerEnvelopeF g (Point 2 r) line) +construct (NonEmpty line -> LowerEnvelopeF g (Point 2 r) line) -> (f line -> NonEmpty line) -> f line -> LowerEnvelopeF g (Point 2 r) line @@ -172,7 +370,7 @@ . NonEmpty (Point 2 r :+ line) -> NonEmpty (Point 2 r :+ line) forall a. NonEmpty a -> NonEmpty a NonEmpty.reverse - (NonEmpty (Point 2 r :+ line) -> NonEmpty (Point 2 r :+ line)) + (NonEmpty (Point 2 r :+ line) -> NonEmpty (Point 2 r :+ line)) -> (f line -> NonEmpty (Point 2 r :+ line)) -> f line -> NonEmpty (Point 2 r :+ line) @@ -182,7 +380,7 @@ (Ord r, Num r, Point_ point 2 r, Foldable1 f) => f point -> NonEmpty point CH.upperHull' - (f (Point 2 r :+ line) -> NonEmpty (Point 2 r :+ line)) + (f (Point 2 r :+ line) -> NonEmpty (Point 2 r :+ line)) -> (f line -> f (Point 2 r :+ line)) -> f line -> NonEmpty (Point 2 r :+ line) @@ -190,26 +388,26 @@ . (line -> Point 2 r :+ line) -> f line -> f (Point 2 r :+ line) forall a b. (a -> b) -> f a -> f b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\line -l -> line -> Point 2 r +fmap (\line +l -> line -> Point 2 r forall hyperPlane (d :: Natural) r. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d) => hyperPlane -> Point d r dualPoint line -l Point 2 r -> line -> Point 2 r :+ line +l Point 2 r -> line -> Point 2 r :+ line forall core extra. core -> extra -> core :+ extra :+ line -l) - where - construct :: NonEmpty line -> LowerEnvelopeF g (Point 2 r) line -construct (line -l0 :| [line] -ls) = let vertices' :: [(Point 2 r, line)] -vertices' = line -> [line] -> [(Point 2 r, line)] -computeVertices line -l0 [line] -ls - in Alternating g (Point 2 r) line -> LowerEnvelopeF g (Point 2 r) line +l) + where + construct :: NonEmpty line -> LowerEnvelopeF g (Point 2 r) line +construct (line +l0 :| [line] +ls) = let vertices' :: [(Point 2 r, line)] +vertices' = line -> [line] -> [(Point 2 r, line)] +computeVertices line +l0 [line] +ls + in Alternating g (Point 2 r) line -> LowerEnvelopeF g (Point 2 r) line forall (f :: * -> *) vertex line. Alternating f vertex line -> LowerEnvelopeF f vertex line LowerEnvelope (Alternating g (Point 2 r) line @@ -220,19 +418,19 @@ $ line -> g (Point 2 r, line) -> Alternating g (Point 2 r) line forall (f :: * -> *) sep a. a -> f (sep, a) -> Alternating f sep a Alternating line -l0 (g (Point 2 r, line) -> Alternating g (Point 2 r) line) +l0 (g (Point 2 r, line) -> Alternating g (Point 2 r) line) -> g (Point 2 r, line) -> Alternating g (Point 2 r) line forall a b. (a -> b) -> a -> b $ [(Point 2 r, line)] -> g (Point 2 r, line) forall a. [a] -> g a forall (f :: * -> *) a. HasFromFoldable f => [a] -> f a fromList [(Point 2 r, line)] -vertices' - - computeVertices :: line -> [line] -> [(Point 2 r, line)] - computeVertices :: line -> [line] -> [(Point 2 r, line)] -computeVertices line -l0 = (line, [(Point 2 r, line)]) -> [(Point 2 r, line)] +vertices' + + computeVertices :: line -> [line] -> [(Point 2 r, line)] + computeVertices :: line -> [line] -> [(Point 2 r, line)] +computeVertices line +l0 = (line, [(Point 2 r, line)]) -> [(Point 2 r, line)] forall a b. (a, b) -> b snd ((line, [(Point 2 r, line)]) -> [(Point 2 r, line)]) -> ([line] -> (line, [(Point 2 r, line)])) @@ -244,97 +442,97 @@ forall (t :: * -> *) s a b. Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b) -List.mapAccumL (\line -l line -l' -> (line -l', (Maybe (LineLineIntersection line) -> Point 2 r -pt (Maybe (LineLineIntersection line) -> Point 2 r) +List.mapAccumL (\line +l line +l' -> (line +l', (Maybe (LineLineIntersection line) -> Point 2 r +pt (Maybe (LineLineIntersection line) -> Point 2 r) -> Maybe (LineLineIntersection line) -> Point 2 r forall a b. (a -> b) -> a -> b $ line -l line -> line -> Intersection line line +l line -> line -> Intersection line line forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` line -l', line -l'))) line -l0 - -- we scan through the lines from left to right: we maintain the previous line l, as - -- we encounter an new line l' we report a pair (p,l') where p is the intersection - -- point p of l and l'. Our last line l' becomes the new state. - pt :: Maybe (LineLineIntersection line) -> Point 2 r - pt :: Maybe (LineLineIntersection line) -> Point 2 r -pt = \case - Just (Line_x_Line_Point Point 2 (NumType line) -p) -> Point 2 r +l', line +l'))) line +l0 + -- we scan through the lines from left to right: we maintain the previous line l, as + -- we encounter an new line l' we report a pair (p,l') where p is the intersection + -- point p of l and l'. Our last line l' becomes the new state. + pt :: Maybe (LineLineIntersection line) -> Point 2 r + pt :: Maybe (LineLineIntersection line) -> Point 2 r +pt = \case + Just (Line_x_Line_Point Point 2 (NumType line) +p) -> Point 2 r Point 2 (NumType line) -p - Maybe (LineLineIntersection line) +p + Maybe (LineLineIntersection line) _ -> String -> Point 2 r forall a. HasCallStack => String -> a error String "lowerEnvelope: absurd: lines don't intersect" - --------------------------------------------------------------------------------- - --- | Commputes the line directly above the query point x -lineAt :: ( Ord r - , Point_ vertex d r - , 1 <= d - , BinarySearch (f (vertex, line)) - , Elem (f (vertex, line)) ~ (vertex, line) - ) => r -> LowerEnvelopeF f vertex line -> line -lineAt :: forall r vertex (d :: Natural) (f :: * -> *) line. + +-------------------------------------------------------------------------------- + +-- | Commputes the line directly above the query point x +lineAt :: ( Ord r + , Point_ vertex d r + , 1 <= d + , BinarySearch (f (vertex, line)) + , Elem (f (vertex, line)) ~ (vertex, line) + ) => r -> LowerEnvelopeF f vertex line -> line +lineAt :: forall r vertex (d :: Natural) (f :: * -> *) line. (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> line -lineAt r -x env :: LowerEnvelopeF f vertex line -env@(LowerEnvelope (Alternating line -l0 f (vertex, line) +lineAt r +x env :: LowerEnvelopeF f vertex line +env@(LowerEnvelope (Alternating line +l0 f (vertex, line) _)) = case r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line) forall r vertex (d :: Natural) (f :: * -> *) line. (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line) lookupLEVertex r -x LowerEnvelopeF f vertex line -env of - Maybe (vertex, line) +x LowerEnvelopeF f vertex line +env of + Maybe (vertex, line) Nothing -> line -l0 - Just (vertex -_, line -l) -> line -l - --- | returns the rightmost vertex v for which v_x < x. -lookupLEVertex :: ( Ord r - , Point_ vertex d r - , 1 <= d - , BinarySearch (f (vertex, line)) - , Elem (f (vertex, line)) ~ (vertex, line) - ) - => r -> LowerEnvelopeF f vertex line - -> Maybe (vertex, line) -lookupLEVertex :: forall r vertex (d :: Natural) (f :: * -> *) line. +l0 + Just (vertex +_, line +l) -> line +l + +-- | returns the rightmost vertex v for which v_x < x. +lookupLEVertex :: ( Ord r + , Point_ vertex d r + , 1 <= d + , BinarySearch (f (vertex, line)) + , Elem (f (vertex, line)) ~ (vertex, line) + ) + => r -> LowerEnvelopeF f vertex line + -> Maybe (vertex, line) +lookupLEVertex :: forall r vertex (d :: Natural) (f :: * -> *) line. (Ord r, Point_ vertex d r, 1 <= d, BinarySearch (f (vertex, line)), Elem (f (vertex, line)) ~ (vertex, line)) => r -> LowerEnvelopeF f vertex line -> Maybe (vertex, line) -lookupLEVertex r -x (LowerEnvelope (Alternating line -_ f (vertex, line) -ls)) = - (Elem (f (vertex, line)) -> Bool) +lookupLEVertex r +x (LowerEnvelope (Alternating line +_ f (vertex, line) +ls)) = + (Elem (f (vertex, line)) -> Bool) -> f (vertex, line) -> Maybe (Elem (f (vertex, line))) forall v. BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) binarySearchLastIn (Bool -> Bool not (Bool -> Bool) -> ((vertex, line) -> Bool) -> (vertex, line) -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c -. \(vertex -v,line +. \(vertex +v,line _) -> vertex -vvertex -> Getting r vertex r -> r +vvertex -> Getting r vertex r -> r forall s a. s -> Getting a s a -> a ^.Getting r vertex r forall (d :: Natural) point r. @@ -344,6 +542,6 @@ xCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -x) f (vertex, line) -ls - \ No newline at end of file +x) f (vertex, line) +ls + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.BentleyOttmann.html b/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.BentleyOttmann.html index bce5c07c0..9d7adae49 100644 --- a/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.BentleyOttmann.html +++ b/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.BentleyOttmann.html @@ -62,17 +62,17 @@ -- | Compute all intersections -- -- \(O((n+k)\log n)\), where \(k\) is the number of intersections. -intersections :: forall lineSegment point r f. - ( LineSegment_ lineSegment point - , Point_ point 2 r - , Eq lineSegment - , Ord r, Fractional r - , HasOnSegment lineSegment 2 - , IntersectConstraints lineSegment - , Foldable f, Functor f - , StartPointOf lineSegment ~ EndPointOf lineSegment +intersections :: forall lineSegment point r f. + ( LineSegment_ lineSegment point + , Point_ point 2 r + , Eq lineSegment + , Ord r, Fractional r + , HasOnSegment lineSegment 2 + , IntersectConstraints lineSegment + , Foldable f, Functor f + , StartPointOf lineSegment ~ EndPointOf lineSegment ) - => f lineSegment -> Intersections r lineSegment + => f lineSegment -> Intersections r lineSegment intersections :: forall lineSegment point r (f :: * -> *). (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, HasOnSegment lineSegment 2, @@ -131,24 +131,24 @@ -- pts = EQ.fromAscList . groupStarts . sort . foldMap (asEventPts . tagFlipped) $ segs -intersections' :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Eq lineSegment - , Ord r, Fractional r - , HasOnSegment lineSegment 2 - , IntersectConstraints lineSegment - , StartPointOf lineSegment ~ EndPointOf lineSegment - , Foldable f +intersections' :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Eq lineSegment + , Ord r, Fractional r + , HasOnSegment lineSegment 2 + , IntersectConstraints lineSegment + , StartPointOf lineSegment ~ EndPointOf lineSegment + , Foldable f ) - => f lineSegment -> Intersections r lineSegment + => f lineSegment -> Intersections r lineSegment intersections' :: forall lineSegment point r (f :: * -> *). (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, HasOnSegment lineSegment 2, IntersectConstraints lineSegment, StartPointOf lineSegment ~ EndPointOf lineSegment, Foldable f) => f lineSegment -> Intersections r lineSegment -intersections' f lineSegment -segs = [IntersectionPoint (Point 2 r) lineSegment] +intersections' f lineSegment +segs = [IntersectionPoint (Point 2 r) lineSegment] -> Intersections r lineSegment forall r lineSegment. (Ord r, Fractional r) => @@ -170,12 +170,12 @@ -> StatusStructure r lineSegment -> [IntersectionPoint (Point 2 r) lineSegment] sweep EventQueue r lineSegment -pts StatusStructure r lineSegment +pts StatusStructure r lineSegment forall a. Set a SS.empty where - pts :: EventQueue r lineSegment -pts = [Event r lineSegment] -> EventQueue r lineSegment + pts :: EventQueue r lineSegment +pts = [Event r lineSegment] -> EventQueue r lineSegment forall a. Eq a => [a] -> Set a EQ.fromAscList ([Event r lineSegment] -> EventQueue r lineSegment) -> (f lineSegment -> [Event r lineSegment]) @@ -214,23 +214,23 @@ -> f lineSegment -> EventQueue r lineSegment forall a b. (a -> b) -> a -> b $ f lineSegment -segs +segs -- | Computes all intersection points p s.t. p lies in the interior of at least -- one of the segments. -- -- \(O((n+k)\log n)\), where \(k\) is the number of intersections. -interiorIntersections :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Eq lineSegment - , Ord r, Fractional r - , IntersectConstraints lineSegment - , StartPointOf lineSegment ~ EndPointOf lineSegment - , HasOnSegment lineSegment 2 - , Foldable f, Functor f +interiorIntersections :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Eq lineSegment + , Ord r, Fractional r + , IntersectConstraints lineSegment + , StartPointOf lineSegment ~ EndPointOf lineSegment + , HasOnSegment lineSegment 2 + , Foldable f, Functor f ) - => f lineSegment -> Intersections r lineSegment + => f lineSegment -> Intersections r lineSegment interiorIntersections :: forall lineSegment point r (f :: * -> *). (LineSegment_ lineSegment point, Point_ point 2 r, Eq lineSegment, Ord r, Fractional r, IntersectConstraints lineSegment, @@ -261,17 +261,17 @@ -------------------------------------------------------------------------------- -- | Computes the event points for a given line segment -asEventPts :: (LineSegment_ lineSegment point, Point_ point 2 r) - => lineSegment -> [Event r lineSegment] +asEventPts :: (LineSegment_ lineSegment point, Point_ point 2 r) + => lineSegment -> [Event r lineSegment] asEventPts :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r) => lineSegment -> [Event r lineSegment] -asEventPts lineSegment -s = [ Point 2 r -> EventType lineSegment -> Event r lineSegment +asEventPts lineSegment +s = [ Point 2 r -> EventType lineSegment -> Event r lineSegment forall r lineSegment. Point 2 r -> EventType lineSegment -> Event r lineSegment Event (lineSegment -slineSegment +slineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -296,14 +296,14 @@ -> NonEmpty lineSegment -> EventType lineSegment forall a b. (a -> b) -> a -> b $ lineSegment -s lineSegment -> [lineSegment] -> NonEmpty lineSegment +s lineSegment -> [lineSegment] -> NonEmpty lineSegment forall a. a -> [a] -> NonEmpty a :| []) , Point 2 r -> EventType lineSegment -> Event r lineSegment forall r lineSegment. Point 2 r -> EventType lineSegment -> Event r lineSegment Event (lineSegment -slineSegment +slineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -325,12 +325,12 @@ asPoint) (lineSegment -> EventType lineSegment forall s. s -> EventType s End lineSegment -s) +s) ] -- | Group the segments with the intersection points -merge :: (Ord r, Fractional r) - => [IntersectionPoint (Point 2 r) lineSegment] -> Intersections r lineSegment +merge :: (Ord r, Fractional r) + => [IntersectionPoint (Point 2 r) lineSegment] -> Intersections r lineSegment merge :: forall r lineSegment. (Ord r, Fractional r) => [IntersectionPoint (Point 2 r) lineSegment] @@ -343,11 +343,11 @@ forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m -foldMap (\IntersectionPoint (Point 2 r) lineSegment -ip -> Point 2 r -> Associated lineSegment -> Intersections r lineSegment +foldMap (\IntersectionPoint (Point 2 r) lineSegment +ip -> Point 2 r -> Associated lineSegment -> Intersections r lineSegment forall k a. k -> a -> Map k a Map.singleton (IntersectionPoint (Point 2 r) lineSegment -ipIntersectionPoint (Point 2 r) lineSegment +ipIntersectionPoint (Point 2 r) lineSegment -> Getting (Point 2 r) (IntersectionPoint (Point 2 r) lineSegment) (Point 2 r) -> Point 2 r @@ -360,7 +360,7 @@ -> IntersectionPoint point1 lineSegment -> f (IntersectionPoint point2 lineSegment) intersectionPoint) (IntersectionPoint (Point 2 r) lineSegment -ipIntersectionPoint (Point 2 r) lineSegment +ipIntersectionPoint (Point 2 r) lineSegment -> Getting (Associated lineSegment) (IntersectionPoint (Point 2 r) lineSegment) @@ -378,7 +378,7 @@ -> f (IntersectionPoint point lineSegment2) associatedSegs)) -groupStarts :: Eq r => Vector.Vector (Event r lineSegment) -> [Event r lineSegment] +groupStarts :: Eq r => Vector.Vector (Event r lineSegment) -> [Event r lineSegment] groupStarts :: forall r lineSegment. Eq r => Vector (Event r lineSegment) -> [Event r lineSegment] @@ -397,22 +397,22 @@ -- | Group the startpoints such that segments with the same start point -- correspond to one event. -groupStarts' :: Eq r => [Event r lineSegment] -> [Event r lineSegment] +groupStarts' :: Eq r => [Event r lineSegment] -> [Event r lineSegment] groupStarts' :: forall r lineSegment. Eq r => [Event r lineSegment] -> [Event r lineSegment] groupStarts' [] = [] -groupStarts' (Event Point 2 r -p (Start NonEmpty lineSegment -s) : [Event r lineSegment] -es) = Point 2 r -> EventType lineSegment -> Event r lineSegment +groupStarts' (Event Point 2 r +p (Start NonEmpty lineSegment +s) : [Event r lineSegment] +es) = Point 2 r -> EventType lineSegment -> Event r lineSegment forall r lineSegment. Point 2 r -> EventType lineSegment -> Event r lineSegment Event Point 2 r -p (NonEmpty lineSegment -> EventType lineSegment +p (NonEmpty lineSegment -> EventType lineSegment forall s. NonEmpty s -> EventType s Start NonEmpty lineSegment -ss) Event r lineSegment +ss) Event r lineSegment -> [Event r lineSegment] -> [Event r lineSegment] forall a. a -> [a] -> [a] : [Event r lineSegment] -> [Event r lineSegment] @@ -420,29 +420,29 @@ Eq r => [Event r lineSegment] -> [Event r lineSegment] groupStarts' [Event r lineSegment] -rest +rest where - ([Event r lineSegment] -ss',[Event r lineSegment] -rest) = (Event r lineSegment -> Bool) + ([Event r lineSegment] +ss',[Event r lineSegment] +rest) = (Event r lineSegment -> Bool) -> [Event r lineSegment] -> ([Event r lineSegment], [Event r lineSegment]) forall a. (a -> Bool) -> [a] -> ([a], [a]) List.span Event r lineSegment -> Bool -sameStart [Event r lineSegment] -es +sameStart [Event r lineSegment] +es -- FIXME: this seems to keep the segments on decreasing y, increasing x. shouldn't we -- sort them cyclically around p instead? - ss :: NonEmpty lineSegment -ss = let (lineSegment -x:|[lineSegment] -xs) = NonEmpty lineSegment -s + ss :: NonEmpty lineSegment +ss = let (lineSegment +x:|[lineSegment] +xs) = NonEmpty lineSegment +s in lineSegment -x lineSegment -> [lineSegment] -> NonEmpty lineSegment +x lineSegment -> [lineSegment] -> NonEmpty lineSegment forall a. a -> [a] -> NonEmpty a :| ([lineSegment] -xs [lineSegment] -> [lineSegment] -> [lineSegment] +xs [lineSegment] -> [lineSegment] -> [lineSegment] forall a. [a] -> [a] -> [a] ++ (Event r lineSegment -> [lineSegment]) -> [Event r lineSegment] -> [lineSegment] @@ -450,23 +450,23 @@ concatMap Event r lineSegment -> [lineSegment] forall r lineSegment. Event r lineSegment -> [lineSegment] startSegs [Event r lineSegment] -ss') +ss') - sameStart :: Event r lineSegment -> Bool -sameStart (Event Point 2 r -q (Start NonEmpty lineSegment + sameStart :: Event r lineSegment -> Bool +sameStart (Event Point 2 r +q (Start NonEmpty lineSegment _)) = Point 2 r -p Point 2 r -> Point 2 r -> Bool +p Point 2 r -> Point 2 r -> Bool forall a. Eq a => a -> a -> Bool == Point 2 r -q - sameStart Event r lineSegment +q + sameStart Event r lineSegment _ = Bool False -groupStarts' (Event r lineSegment -e : [Event r lineSegment] -es) = Event r lineSegment -e Event r lineSegment +groupStarts' (Event r lineSegment +e : [Event r lineSegment] +es) = Event r lineSegment +e Event r lineSegment -> [Event r lineSegment] -> [Event r lineSegment] forall a. a -> [a] -> [a] : [Event r lineSegment] -> [Event r lineSegment] @@ -474,13 +474,13 @@ Eq r => [Event r lineSegment] -> [Event r lineSegment] groupStarts' [Event r lineSegment] -es +es -------------------------------------------------------------------------------- -- * Data type for Events -- | Type of segment -data EventType s = Start !(NonEmpty s)| Intersection | End !s deriving (Int -> EventType s -> ShowS +data EventType s = Start !(NonEmpty s)| Intersection | End !s deriving (Int -> EventType s -> ShowS [EventType s] -> ShowS EventType s -> String (Int -> EventType s -> ShowS) @@ -500,22 +500,22 @@ showList :: [EventType s] -> ShowS Show) -instance Eq (EventType s) where - EventType s -a == :: EventType s -> EventType s -> Bool -== EventType s -b = EventType s -a EventType s -> EventType s -> Ordering +instance Eq (EventType s) where + EventType s +a == :: EventType s -> EventType s -> Bool +== EventType s +b = EventType s +a EventType s -> EventType s -> Ordering forall a. Ord a => a -> a -> Ordering `compare` EventType s -b Ordering -> Ordering -> Bool +b Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering EQ -instance Ord (EventType s) where +instance Ord (EventType s) where (Start NonEmpty s -_) compare :: EventType s -> EventType s -> Ordering +_) compare :: EventType s -> EventType s -> Ordering `compare` (Start NonEmpty s _) = Ordering EQ @@ -545,11 +545,11 @@ GT -- | The actual event consists of a point and its type -data Event r lineSegment = Event { forall r lineSegment. Event r lineSegment -> Point 2 r -eventPoint :: !(Point 2 r) +data Event r lineSegment = Event { forall r lineSegment. Event r lineSegment -> Point 2 r +eventPoint :: !(Point 2 r) , forall r lineSegment. Event r lineSegment -> EventType lineSegment -eventType :: !(EventType lineSegment) - } deriving (Int -> Event r lineSegment -> ShowS +eventType :: !(EventType lineSegment) + } deriving (Int -> Event r lineSegment -> ShowS [Event r lineSegment] -> ShowS Event r lineSegment -> String (Int -> Event r lineSegment -> ShowS) @@ -579,7 +579,7 @@ (Show r, Show lineSegment) => [Event r lineSegment] -> ShowS showList :: [Event r lineSegment] -> ShowS -Show,Event r lineSegment -> Event r lineSegment -> Bool +Show,Event r lineSegment -> Event r lineSegment -> Bool (Event r lineSegment -> Event r lineSegment -> Bool) -> (Event r lineSegment -> Event r lineSegment -> Bool) -> Eq (Event r lineSegment) @@ -597,61 +597,61 @@ /= :: Event r lineSegment -> Event r lineSegment -> Bool Eq) -instance Ord r => Ord (Event r lineSegment) where +instance Ord r => Ord (Event r lineSegment) where -- decreasing on the y-coord, then increasing on x-coord, and increasing on event-type - (Event Point 2 r -p EventType lineSegment -s) compare :: Event r lineSegment -> Event r lineSegment -> Ordering -`compare` (Event Point 2 r -q EventType lineSegment -t) = case Point 2 r -> Point 2 r -> Ordering + (Event Point 2 r +p EventType lineSegment +s) compare :: Event r lineSegment -> Event r lineSegment -> Ordering +`compare` (Event Point 2 r +q EventType lineSegment +t) = case Point 2 r -> Point 2 r -> Ordering forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering ordPoints Point 2 r -p Point 2 r -q of +p Point 2 r +q of Ordering EQ -> EventType lineSegment -s EventType lineSegment -> EventType lineSegment -> Ordering +s EventType lineSegment -> EventType lineSegment -> Ordering forall a. Ord a => a -> a -> Ordering `compare` EventType lineSegment -t - Ordering -x -> Ordering -x +t + Ordering +x -> Ordering +x -- | Get the segments that start at the given event point -startSegs :: Event r lineSegment -> [lineSegment] +startSegs :: Event r lineSegment -> [lineSegment] startSegs :: forall r lineSegment. Event r lineSegment -> [lineSegment] -startSegs Event r lineSegment -e = case Event r lineSegment -> EventType lineSegment +startSegs Event r lineSegment +e = case Event r lineSegment -> EventType lineSegment forall r lineSegment. Event r lineSegment -> EventType lineSegment eventType Event r lineSegment -e of - Start NonEmpty lineSegment -ss -> NonEmpty lineSegment -> [lineSegment] +e of + Start NonEmpty lineSegment +ss -> NonEmpty lineSegment -> [lineSegment] forall a. NonEmpty a -> [a] NonEmpty.toList NonEmpty lineSegment -ss +ss EventType lineSegment _ -> [] -------------------------------------------------------------------------------- -- * The Main Sweep -type EventQueue r lineSegment = EQ.Set (Event r lineSegment) -type StatusStructure r lineSegment = SS.Set lineSegment +type EventQueue r lineSegment = EQ.Set (Event r lineSegment) +type StatusStructure r lineSegment = SS.Set lineSegment -- | Run the sweep handling all events -sweep :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Fractional r - , IntersectConstraints lineSegment - , HasOnSegment lineSegment 2 +sweep :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Fractional r + , IntersectConstraints lineSegment + , HasOnSegment lineSegment 2 ) - => EventQueue r lineSegment -> StatusStructure r lineSegment - -> [IntersectionPoint (Point 2 r) lineSegment] + => EventQueue r lineSegment -> StatusStructure r lineSegment + -> [IntersectionPoint (Point 2 r) lineSegment] sweep :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment, @@ -659,18 +659,18 @@ EventQueue r lineSegment -> StatusStructure r lineSegment -> [IntersectionPoint (Point 2 r) lineSegment] -sweep EventQueue r lineSegment -eq StatusStructure r lineSegment -ss = case EventQueue r lineSegment +sweep EventQueue r lineSegment +eq StatusStructure r lineSegment +ss = case EventQueue r lineSegment -> Maybe (Event r lineSegment, EventQueue r lineSegment) forall a. Set a -> Maybe (a, Set a) EQ.minView EventQueue r lineSegment -eq of +eq of Maybe (Event r lineSegment, EventQueue r lineSegment) Nothing -> [] - Just (Event r lineSegment -e,EventQueue r lineSegment -eq') -> Event r lineSegment + Just (Event r lineSegment +e,EventQueue r lineSegment +eq') -> Event r lineSegment -> EventQueue r lineSegment -> StatusStructure r lineSegment -> [IntersectionPoint (Point 2 r) lineSegment] @@ -683,11 +683,11 @@ -> StatusStructure r lineSegment -> [IntersectionPoint (Point 2 r) lineSegment] handle Event r lineSegment -e EventQueue r lineSegment -eq' StatusStructure r lineSegment -ss +e EventQueue r lineSegment +eq' StatusStructure r lineSegment +ss -isOpen :: EndPoint_ endPoint => endPoint -> Bool +isOpen :: EndPoint_ endPoint => endPoint -> Bool isOpen :: forall endPoint. EndPoint_ endPoint => endPoint -> Bool isOpen = (EndPointType -> EndPointType -> Bool forall a. Eq a => a -> a -> Bool @@ -699,7 +699,7 @@ forall endPoint. EndPoint_ endPoint => endPoint -> EndPointType endPointType -isClosed :: EndPoint_ endPoint => endPoint -> Bool +isClosed :: EndPoint_ endPoint => endPoint -> Bool isClosed :: forall endPoint. EndPoint_ endPoint => endPoint -> Bool isClosed = (EndPointType -> EndPointType -> Bool forall a. Eq a => a -> a -> Bool @@ -712,15 +712,15 @@ endPointType -- | Handle an event point -handle :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Fractional r - , IntersectConstraints lineSegment - , HasOnSegment lineSegment 2 +handle :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Fractional r + , IntersectConstraints lineSegment + , HasOnSegment lineSegment 2 ) - => Event r lineSegment - -> EventQueue r lineSegment -> StatusStructure r lineSegment - -> [IntersectionPoint (Point 2 r) lineSegment] + => Event r lineSegment + -> EventQueue r lineSegment -> StatusStructure r lineSegment + -> [IntersectionPoint (Point 2 r) lineSegment] handle :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment, @@ -729,14 +729,14 @@ -> EventQueue r lineSegment -> StatusStructure r lineSegment -> [IntersectionPoint (Point 2 r) lineSegment] -handle e :: Event r lineSegment -e@(Event r lineSegment -> Point 2 r +handle e :: Event r lineSegment +e@(Event r lineSegment -> Point 2 r forall r lineSegment. Event r lineSegment -> Point 2 r -eventPoint -> Point 2 r -p) EventQueue r lineSegment -eq StatusStructure r lineSegment -ss = [IntersectionPoint (Point 2 r) lineSegment] -toReport [IntersectionPoint (Point 2 r) lineSegment] +eventPoint -> Point 2 r +p) EventQueue r lineSegment +eq StatusStructure r lineSegment +ss = [IntersectionPoint (Point 2 r) lineSegment] +toReport [IntersectionPoint (Point 2 r) lineSegment] -> [IntersectionPoint (Point 2 r) lineSegment] -> [IntersectionPoint (Point 2 r) lineSegment] forall a. Semigroup a => a -> a -> a @@ -751,18 +751,18 @@ -> StatusStructure r lineSegment -> [IntersectionPoint (Point 2 r) lineSegment] sweep EventQueue r lineSegment -eq' StatusStructure r lineSegment -ss' +eq' StatusStructure r lineSegment +ss' where - starts :: [lineSegment] -starts = Event r lineSegment -> [lineSegment] + starts :: [lineSegment] +starts = Event r lineSegment -> [lineSegment] forall r lineSegment. Event r lineSegment -> [lineSegment] startSegs Event r lineSegment -e - (StatusStructure r lineSegment -before,[lineSegment] -contains',StatusStructure r lineSegment -after) = Point 2 r +e + (StatusStructure r lineSegment +before,[lineSegment] +contains',StatusStructure r lineSegment +after) = Point 2 r -> StatusStructure r lineSegment -> (StatusStructure r lineSegment, [lineSegment], StatusStructure r lineSegment) @@ -774,11 +774,11 @@ -> (StatusStructure r lineSegment, [lineSegment], StatusStructure r lineSegment) extractContains Point 2 r -p StatusStructure r lineSegment -ss - ([lineSegment] -ends,[lineSegment] -contains) = (lineSegment -> Bool) +p StatusStructure r lineSegment +ss + ([lineSegment] +ends,[lineSegment] +contains) = (lineSegment -> Bool) -> [lineSegment] -> ([lineSegment], [lineSegment]) forall a. (a -> Bool) -> [a] -> ([a], [a]) List.partition (Point 2 r -> lineSegment -> Bool @@ -786,38 +786,38 @@ (LineSegment_ lineSegment point, Point_ point 2 r, Eq r) => Point 2 r -> lineSegment -> Bool endsAt Point 2 r -p) [lineSegment] -contains' +p) [lineSegment] +contains' -- starting segments, exluding those that have an open starting point -- starts' = filter (isClosedStart p) starts - starts' :: [lineSegment] -starts' = Point 2 r -> [lineSegment] -> [lineSegment] + starts' :: [lineSegment] +starts' = Point 2 r -> [lineSegment] -> [lineSegment] forall lineSegment point r a. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Num r, HasIntersectionWith lineSegment lineSegment) => a -> [lineSegment] -> [lineSegment] shouldReport Point 2 r -p ([lineSegment] -> [lineSegment]) -> [lineSegment] -> [lineSegment] +p ([lineSegment] -> [lineSegment]) -> [lineSegment] -> [lineSegment] forall a b. (a -> b) -> a -> b $ StatusStructure r lineSegment -> [lineSegment] forall a. Set a -> [a] SS.toAscList StatusStructure r lineSegment -newSegs +newSegs -- If we just inserted open-ended segments that start here, then -- don't consider them to be "contained" segments. - pureContains :: [lineSegment] -pureContains = + pureContains :: [lineSegment] +pureContains = (lineSegment -> Bool) -> [lineSegment] -> [lineSegment] forall a. (a -> Bool) -> [a] -> [a] -filter (\lineSegment -seg -> Bool -> Bool +filter (\lineSegment +seg -> Bool -> Bool not (Bool -> Bool) -> Bool -> Bool forall a b. (a -> b) -> a -> b $ StartPointOf lineSegment -> Bool forall endPoint. EndPoint_ endPoint => endPoint -> Bool isOpen (lineSegment -seglineSegment +seglineSegment -> Getting (StartPointOf lineSegment) lineSegment (StartPointOf lineSegment) -> StartPointOf lineSegment @@ -828,10 +828,10 @@ Lens' lineSegment (StartPointOf lineSegment) startPoint) Bool -> Bool -> Bool && Point 2 r -p Point 2 r -> Point 2 r -> Bool +p Point 2 r -> Point 2 r -> Bool forall a. Eq a => a -> a -> Bool == lineSegment -seglineSegment +seglineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -851,11 +851,11 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) [lineSegment] -contains +contains -- any (closed) ending segments at this event point. - closedEnds :: [lineSegment] -closedEnds = (lineSegment -> Bool) -> [lineSegment] -> [lineSegment] + closedEnds :: [lineSegment] +closedEnds = (lineSegment -> Bool) -> [lineSegment] -> [lineSegment] forall a. (a -> Bool) -> [a] -> [a] filter (EndPointOf lineSegment -> Bool forall endPoint. EndPoint_ endPoint => endPoint -> Bool @@ -871,17 +871,17 @@ forall seg p. HasEndPoint seg p => Lens' seg p Lens' lineSegment (EndPointOf lineSegment) endPoint) [lineSegment] -ends +ends - toReport :: [IntersectionPoint (Point 2 r) lineSegment] -toReport = case [lineSegment] -starts' [lineSegment] -> [lineSegment] -> [lineSegment] + toReport :: [IntersectionPoint (Point 2 r) lineSegment] +toReport = case [lineSegment] +starts' [lineSegment] -> [lineSegment] -> [lineSegment] forall a. Semigroup a => a -> a -> a <> [lineSegment] -closedEnds [lineSegment] -> [lineSegment] -> [lineSegment] +closedEnds [lineSegment] -> [lineSegment] -> [lineSegment] forall a. Semigroup a => a -> a -> a <> [lineSegment] -pureContains of +pureContains of (lineSegment _:lineSegment _:[lineSegment] @@ -897,46 +897,46 @@ -> [lineSegment] -> IntersectionPoint point lineSegment mkIntersectionPoint Point 2 r -p ([lineSegment] -starts' [lineSegment] -> [lineSegment] -> [lineSegment] +p ([lineSegment] +starts' [lineSegment] -> [lineSegment] -> [lineSegment] forall a. Semigroup a => a -> a -> a <> [lineSegment] -closedEnds) [lineSegment] -pureContains ] +closedEnds) [lineSegment] +pureContains ] [lineSegment] _ -> [] -- new status structure - ss' :: StatusStructure r lineSegment -ss' = StatusStructure r lineSegment -before StatusStructure r lineSegment + ss' :: StatusStructure r lineSegment +ss' = StatusStructure r lineSegment +before StatusStructure r lineSegment -> StatusStructure r lineSegment -> StatusStructure r lineSegment forall a. Set a -> Set a -> Set a `SS.join` StatusStructure r lineSegment -newSegs StatusStructure r lineSegment +newSegs StatusStructure r lineSegment -> StatusStructure r lineSegment -> StatusStructure r lineSegment forall a. Set a -> Set a -> Set a `SS.join` StatusStructure r lineSegment -after - newSegs :: StatusStructure r lineSegment -newSegs = Point 2 r -> [lineSegment] -> StatusStructure r lineSegment +after + newSegs :: StatusStructure r lineSegment +newSegs = Point 2 r -> [lineSegment] -> StatusStructure r lineSegment forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r) => Point 2 r -> [lineSegment] -> StatusStructure r lineSegment toStatusStruct Point 2 r -p ([lineSegment] -> StatusStructure r lineSegment) +p ([lineSegment] -> StatusStructure r lineSegment) -> [lineSegment] -> StatusStructure r lineSegment forall a b. (a -> b) -> a -> b $ [lineSegment] -starts [lineSegment] -> [lineSegment] -> [lineSegment] +starts [lineSegment] -> [lineSegment] -> [lineSegment] forall a. [a] -> [a] -> [a] ++ [lineSegment] -contains +contains -- the new eeventqueue - eq' :: EventQueue r lineSegment -eq' = (Event r lineSegment + eq' :: EventQueue r lineSegment +eq' = (Event r lineSegment -> EventQueue r lineSegment -> EventQueue r lineSegment) -> EventQueue r lineSegment -> [Event r lineSegment] @@ -949,15 +949,15 @@ -> EventQueue r lineSegment -> EventQueue r lineSegment forall a. Ord a => a -> Set a -> Set a EQ.insert EventQueue r lineSegment -eq [Event r lineSegment] -es +eq [Event r lineSegment] +es -- the new events: - es :: [Event r lineSegment] -es | StatusStructure r lineSegment -> Bool + es :: [Event r lineSegment] +es | StatusStructure r lineSegment -> Bool forall a. Set a -> Bool forall (t :: * -> *) a. Foldable t => t a -> Bool F.null StatusStructure r lineSegment -newSegs = Maybe (Event r lineSegment) -> [Event r lineSegment] +newSegs = Maybe (Event r lineSegment) -> [Event r lineSegment] forall a. Maybe a -> [a] maybeToList (Maybe (Event r lineSegment) -> [Event r lineSegment]) -> Maybe (Event r lineSegment) -> [Event r lineSegment] @@ -969,7 +969,7 @@ forall {m :: * -> *} {t} {t} {b}. Monad m => (t -> t -> m b) -> m t -> m t -> m b -app (Point 2 r +app (Point 2 r -> lineSegment -> lineSegment -> Maybe (Event r lineSegment) forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, @@ -979,20 +979,20 @@ Point 2 r -> lineSegment -> lineSegment -> Maybe (Event r lineSegment) findNewEvent Point 2 r -p) Maybe lineSegment -sl Maybe lineSegment -sr +p) Maybe lineSegment +sl Maybe lineSegment +sr | Bool -otherwise = let s' :: Maybe lineSegment -s' = StatusStructure r lineSegment -> Maybe lineSegment +otherwise = let s' :: Maybe lineSegment +s' = StatusStructure r lineSegment -> Maybe lineSegment forall a. Set a -> Maybe a SS.lookupMin StatusStructure r lineSegment -newSegs - s'' :: Maybe lineSegment -s'' = StatusStructure r lineSegment -> Maybe lineSegment +newSegs + s'' :: Maybe lineSegment +s'' = StatusStructure r lineSegment -> Maybe lineSegment forall a. Set a -> Maybe a SS.lookupMax StatusStructure r lineSegment -newSegs +newSegs in [Maybe (Event r lineSegment)] -> [Event r lineSegment] forall a. [Maybe a] -> [a] catMaybes [ (lineSegment -> lineSegment -> Maybe (Event r lineSegment)) @@ -1002,7 +1002,7 @@ forall {m :: * -> *} {t} {t} {b}. Monad m => (t -> t -> m b) -> m t -> m t -> m b -app (Point 2 r +app (Point 2 r -> lineSegment -> lineSegment -> Maybe (Event r lineSegment) forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, @@ -1012,9 +1012,9 @@ Point 2 r -> lineSegment -> lineSegment -> Maybe (Event r lineSegment) findNewEvent Point 2 r -p) Maybe lineSegment -sl Maybe lineSegment -s' +p) Maybe lineSegment +sl Maybe lineSegment +s' , (lineSegment -> lineSegment -> Maybe (Event r lineSegment)) -> Maybe lineSegment -> Maybe lineSegment @@ -1022,7 +1022,7 @@ forall {m :: * -> *} {t} {t} {b}. Monad m => (t -> t -> m b) -> m t -> m t -> m b -app (Point 2 r +app (Point 2 r -> lineSegment -> lineSegment -> Maybe (Event r lineSegment) forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, @@ -1032,33 +1032,33 @@ Point 2 r -> lineSegment -> lineSegment -> Maybe (Event r lineSegment) findNewEvent Point 2 r -p) Maybe lineSegment -s'' Maybe lineSegment -sr +p) Maybe lineSegment +s'' Maybe lineSegment +sr ] - sl :: Maybe lineSegment -sl = StatusStructure r lineSegment -> Maybe lineSegment + sl :: Maybe lineSegment +sl = StatusStructure r lineSegment -> Maybe lineSegment forall a. Set a -> Maybe a SS.lookupMax StatusStructure r lineSegment -before - sr :: Maybe lineSegment -sr = StatusStructure r lineSegment -> Maybe lineSegment +before + sr :: Maybe lineSegment +sr = StatusStructure r lineSegment -> Maybe lineSegment forall a. Set a -> Maybe a SS.lookupMin StatusStructure r lineSegment -after +after - app :: (t -> t -> m b) -> m t -> m t -> m b -app t -> t -> m b -f m t -x m t -y = do { t -x' <- m t -x ; t -y' <- m t -y ; t -> t -> m b -f t -x' t -y'} + app :: (t -> t -> m b) -> m t -> m t -> m b +app t -> t -> m b +f m t +x m t +y = do { t +x' <- m t +x ; t +y' <- m t +y ; t -> t -> m b +f t +x' t +y'} -- | Given the starting point p, and the segments that either start in -- p, or continue in p, in left to right order along a line just @@ -1070,11 +1070,11 @@ -- - those that have an open endpoint at p and have an intersection -- with a segment eps below p. Those segments thus overlap wtih -- their predecessor or successor in the cyclic order. -shouldReport :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Num r - , HasIntersectionWith lineSegment lineSegment - ) => a -> [lineSegment] -> [lineSegment] +shouldReport :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Num r + , HasIntersectionWith lineSegment lineSegment + ) => a -> [lineSegment] -> [lineSegment] shouldReport :: forall lineSegment point r a. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Num r, HasIntersectionWith lineSegment lineSegment) => @@ -1104,13 +1104,13 @@ -- | split the status structure, extracting the segments that contain p. -- the result is (before,contains,after) -extractContains :: ( LineSegment_ lineSegment point - , HasOnSegment lineSegment 2 - , Point_ point 2 r - , Ord r, Fractional r +extractContains :: ( LineSegment_ lineSegment point + , HasOnSegment lineSegment 2 + , Point_ point 2 r + , Ord r, Fractional r ) - => Point 2 r -> StatusStructure r lineSegment - -> (StatusStructure r lineSegment, [lineSegment], StatusStructure r lineSegment) + => Point 2 r -> StatusStructure r lineSegment + -> (StatusStructure r lineSegment, [lineSegment], StatusStructure r lineSegment) extractContains :: forall lineSegment point r. (LineSegment_ lineSegment point, HasOnSegment lineSegment 2, Point_ point 2 r, Ord r, Fractional r) => @@ -1118,26 +1118,26 @@ -> StatusStructure r lineSegment -> (StatusStructure r lineSegment, [lineSegment], StatusStructure r lineSegment) -extractContains Point 2 r -p StatusStructure r lineSegment -ss = (StatusStructure r lineSegment -before, StatusStructure r lineSegment -> [lineSegment] +extractContains Point 2 r +p StatusStructure r lineSegment +ss = (StatusStructure r lineSegment +before, StatusStructure r lineSegment -> [lineSegment] forall a. Set a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList StatusStructure r lineSegment -mid1 [lineSegment] -> [lineSegment] -> [lineSegment] +mid1 [lineSegment] -> [lineSegment] -> [lineSegment] forall a. Semigroup a => a -> a -> a <> StatusStructure r lineSegment -> [lineSegment] forall a. Set a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList StatusStructure r lineSegment -mid2, StatusStructure r lineSegment -after) +mid2, StatusStructure r lineSegment +after) where - (StatusStructure r lineSegment -before, StatusStructure r lineSegment -mid1, StatusStructure r lineSegment -after') = (lineSegment -> r) + (StatusStructure r lineSegment +before, StatusStructure r lineSegment +mid1, StatusStructure r lineSegment +after') = (lineSegment -> r) -> r -> StatusStructure r lineSegment -> (StatusStructure r lineSegment, StatusStructure r lineSegment, @@ -1153,7 +1153,7 @@ xCoordAt (r -> lineSegment -> r) -> r -> lineSegment -> r forall a b. (a -> b) -> a -> b $ Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1161,7 +1161,7 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r yCoord) (Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1169,11 +1169,11 @@ IndexedLens' Int point r IndexedLens' Int (Point 2 r) r xCoord) StatusStructure r lineSegment -ss +ss -- Make sure to also select the horizontal segments containing p - (StatusStructure r lineSegment -mid2, StatusStructure r lineSegment -after) = (lineSegment -> Bool) + (StatusStructure r lineSegment +mid2, StatusStructure r lineSegment +after) = (lineSegment -> Bool) -> StatusStructure r lineSegment -> (StatusStructure r lineSegment, StatusStructure r lineSegment) forall a. (a -> Bool) -> Set a -> (Set a, Set a) @@ -1187,32 +1187,32 @@ 2 ~ Dimension lineSegment) => point -> lineSegment -> Bool onSegment Point 2 r -p) StatusStructure r lineSegment -after' +p) StatusStructure r lineSegment +after' -- | Given a point and the linesegements that contain it. Create a piece of -- status structure for it. -toStatusStruct :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Fractional r +toStatusStruct :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Fractional r ) - => Point 2 r -> [lineSegment] -> StatusStructure r lineSegment + => Point 2 r -> [lineSegment] -> StatusStructure r lineSegment toStatusStruct :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r) => Point 2 r -> [lineSegment] -> StatusStructure r lineSegment -toStatusStruct Point 2 r -p [lineSegment] -xs = Set lineSegment -ss Set lineSegment -> Set lineSegment -> Set lineSegment +toStatusStruct Point 2 r +p [lineSegment] +xs = Set lineSegment +ss Set lineSegment -> Set lineSegment -> Set lineSegment forall a. Set a -> Set a -> Set a `SS.join` Set lineSegment -hors +hors -- ss { SS.nav = ordAtNav $ p^.yCoord } `SS.join` hors where - ([lineSegment] -hors',[lineSegment] -rest) = (lineSegment -> Bool) + ([lineSegment] +hors',[lineSegment] +rest) = (lineSegment -> Bool) -> [lineSegment] -> ([lineSegment], [lineSegment]) forall a. (a -> Bool) -> [a] -> ([a], [a]) List.partition lineSegment -> Bool @@ -1228,10 +1228,10 @@ Point_ p (Dimension p) (NumType p), Point_ p (Dimension p) (NumType p)) => s -> Bool -isHorizontal [lineSegment] -xs - ss :: Set lineSegment -ss = (lineSegment -> lineSegment -> Ordering) +isHorizontal [lineSegment] +xs + ss :: Set lineSegment +ss = (lineSegment -> lineSegment -> Ordering) -> [lineSegment] -> Set lineSegment forall a. (a -> a -> Ordering) -> [a] -> Set a SS.fromListBy (r -> lineSegment -> lineSegment -> Ordering @@ -1242,11 +1242,11 @@ -> r -> lineSegment -> lineSegment -> Ordering forall a b. (a -> b) -> a -> b $ [lineSegment] -> r -maxY [lineSegment] -xs) [lineSegment] -rest - hors :: Set lineSegment -hors = (lineSegment -> lineSegment -> Ordering) +maxY [lineSegment] +xs) [lineSegment] +rest + hors :: Set lineSegment +hors = (lineSegment -> lineSegment -> Ordering) -> [lineSegment] -> Set lineSegment forall a. (a -> a -> Ordering) -> [a] -> Set a SS.fromListBy ((lineSegment -> r) -> lineSegment -> lineSegment -> Ordering @@ -1256,12 +1256,12 @@ (LineSegment_ lineSegment point, Point_ point 2 r, Ord r) => lineSegment -> r rightEndpoint) [lineSegment] -hors' +hors' - isHorizontal :: s -> Bool -isHorizontal s -s = s -ss -> Getting (NumType p) s (NumType p) -> NumType p + isHorizontal :: s -> Bool +isHorizontal s +s = s +ss -> Getting (NumType p) s (NumType p) -> NumType p forall s a. s -> Getting a s a -> a ^.(p -> Const (NumType p) p) -> s -> Const (NumType p) s forall seg p. HasStart seg p => Lens' seg p @@ -1280,7 +1280,7 @@ yCoord NumType p -> NumType p -> Bool forall a. Eq a => a -> a -> Bool == s -ss -> Getting (NumType p) s (NumType p) -> NumType p +ss -> Getting (NumType p) s (NumType p) -> NumType p forall s a. s -> Getting a s a -> a ^.(p -> Const (NumType p) p) -> s -> Const (NumType p) s forall seg p. HasEnd seg p => Lens' seg p @@ -1301,19 +1301,19 @@ -- ordAtY' q sa sb = ordAtY q sa sb -- find the y coord of the first interesting thing below the sweep at y - maxY :: [lineSegment] -> r -maxY [lineSegment] -segs = [r] -> r + maxY :: [lineSegment] -> r +maxY [lineSegment] +segs = [r] -> r forall a. Ord a => [a] -> a forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a maximum [ r -y - | lineSegment -s <- [lineSegment] -segs - , r -y <- [lineSegment -slineSegment -> Getting r lineSegment r -> r +y + | lineSegment +s <- [lineSegment] +segs + , r +y <- [lineSegment +slineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasStart seg p => Lens' seg p @@ -1328,7 +1328,7 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord, lineSegment -slineSegment -> Getting r lineSegment r -> r +slineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasEnd seg p => Lens' seg p @@ -1343,10 +1343,10 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord], r -y r -> r -> Bool +y r -> r -> Bool forall a. Ord a => a -> a -> Bool < Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1358,13 +1358,13 @@ -- fixme, why can't segs be empty -- | Get the right endpoint of a segment -rightEndpoint :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r) => lineSegment -> r +rightEndpoint :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r) => lineSegment -> r rightEndpoint :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r) => lineSegment -> r -rightEndpoint lineSegment -s = (lineSegment -slineSegment -> Getting r lineSegment r -> r +rightEndpoint lineSegment +s = (lineSegment +slineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasStart seg p => Lens' seg p @@ -1381,7 +1381,7 @@ xCoord) r -> r -> r forall a. Ord a => a -> a -> a `max` (lineSegment -slineSegment -> Getting r lineSegment r -> r +slineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point -> Const r point) -> lineSegment -> Const r lineSegment forall seg p. HasEnd seg p => Lens' seg p @@ -1398,17 +1398,17 @@ xCoord) -- | Test if a segment ends at p -endsAt :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Eq r - ) => Point 2 r -> lineSegment -> Bool +endsAt :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Eq r + ) => Point 2 r -> lineSegment -> Bool endsAt :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Eq r) => Point 2 r -> lineSegment -> Bool -endsAt Point 2 r -p lineSegment -seg = lineSegment -seglineSegment +endsAt Point 2 r +p lineSegment +seg = lineSegment +seglineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -1430,21 +1430,21 @@ asPoint Point 2 r -> Point 2 r -> Bool forall a. Eq a => a -> a -> Bool == Point 2 r -p +p -- all (\q -> ordPoints (q^.core) p /= GT) [a,b] -------------------------------------------------------------------------------- -- * Finding New events -- | Find all events -findNewEvent :: ( LineSegment_ lineSegment point - , Point_ point 2 r, Ord r, Fractional r - , IsIntersectableWith lineSegment lineSegment - , Intersection lineSegment lineSegment ~ - Maybe (LineSegmentLineSegmentIntersection lineSegment) +findNewEvent :: ( LineSegment_ lineSegment point + , Point_ point 2 r, Ord r, Fractional r + , IsIntersectableWith lineSegment lineSegment + , Intersection lineSegment lineSegment ~ + Maybe (LineSegmentLineSegmentIntersection lineSegment) ) - => Point 2 r -> lineSegment -> lineSegment - -> Maybe (Event r lineSegment) + => Point 2 r -> lineSegment -> lineSegment + -> Maybe (Event r lineSegment) findNewEvent :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IsIntersectableWith lineSegment lineSegment, @@ -1452,30 +1452,30 @@ ~ Maybe (LineSegmentLineSegmentIntersection lineSegment)) => Point 2 r -> lineSegment -> lineSegment -> Maybe (Event r lineSegment) -findNewEvent Point 2 r -p lineSegment -l lineSegment -r = lineSegment -l lineSegment -> lineSegment -> Intersection lineSegment lineSegment +findNewEvent Point 2 r +p lineSegment +l lineSegment +r = lineSegment +l lineSegment -> lineSegment -> Intersection lineSegment lineSegment forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` lineSegment -r Maybe (LineSegmentLineSegmentIntersection lineSegment) +r Maybe (LineSegmentLineSegmentIntersection lineSegment) -> (LineSegmentLineSegmentIntersection lineSegment -> Maybe (Event r lineSegment)) -> Maybe (Event r lineSegment) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) -q + LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) +q | Point 2 r -> Point 2 r -> Ordering forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering ordPoints Point 2 r Point 2 (NumType lineSegment) -q Point 2 r -p Ordering -> Ordering -> Bool +q Point 2 r +p Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering GT -> Event r lineSegment -> Maybe (Event r lineSegment) @@ -1485,7 +1485,7 @@ Point 2 r -> EventType lineSegment -> Event r lineSegment Event Point 2 r Point 2 (NumType lineSegment) -q EventType lineSegment +q EventType lineSegment forall s. EventType s Intersection) | Bool @@ -1511,14 +1511,14 @@ -- | Given a predicate p on elements, and a predicate q on -- (neighbouring) pairs of elements, filter the elements that satisfy -- p, or together with one of their neighbours satisfy q. -overlapsOr :: (a -> Bool) - -> (a -> a -> Bool) - -> [a] - -> [a] +overlapsOr :: (a -> Bool) + -> (a -> a -> Bool) + -> [a] + -> [a] overlapsOr :: forall a. (a -> Bool) -> (a -> a -> Bool) -> [a] -> [a] -overlapsOr a -> Bool -p a -> a -> Bool -q = ((a, Bool) -> a) -> [(a, Bool)] -> [a] +overlapsOr a -> Bool +p a -> a -> Bool +q = ((a, Bool) -> a) -> [(a, Bool)] -> [a] forall a b. (a -> b) -> [a] -> [b] map (a, Bool) -> a forall a b. (a, b) -> a @@ -1534,14 +1534,14 @@ . (((a, Bool), Bool) -> (a, Bool)) -> [((a, Bool), Bool)] -> [(a, Bool)] forall a b. (a -> b) -> [a] -> [b] -map (\((a -a,Bool -b),Bool -b') -> (a -a, Bool -b Bool -> Bool -> Bool +map (\((a +a,Bool +b),Bool +b') -> (a +a, Bool +b Bool -> Bool -> Bool || Bool -b')) +b')) ([((a, Bool), Bool)] -> [(a, Bool)]) -> ([a] -> [((a, Bool), Bool)]) -> [a] -> [(a, Bool)] forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -1549,7 +1549,7 @@ -> [(a, Bool)] -> [((a, Bool), Bool)] forall a. (a -> a -> Bool) -> [a] -> [(a, Bool)] overlapsWithNeighbour (a -> a -> Bool -q (a -> a -> Bool) +q (a -> a -> Bool) -> ((a, Bool) -> a) -> (a, Bool) -> (a, Bool) -> Bool forall b c a. (b -> b -> c) -> (a -> b) -> a -> a -> c `on` (a, Bool) -> a @@ -1560,65 +1560,65 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . (a -> (a, Bool)) -> [a] -> [(a, Bool)] forall a b. (a -> b) -> [a] -> [b] -map (\a -x -> (a -x, a -> Bool -p a -x)) +map (\a +x -> (a +x, a -> Bool +p a +x)) -- | Given a predicate, test and a list, annotate each element whether -- it, together with one of its neighbors satisifies the predicate. -overlapsWithNeighbour :: (a -> a -> Bool) -> [a] -> [(a,Bool)] +overlapsWithNeighbour :: (a -> a -> Bool) -> [a] -> [(a,Bool)] overlapsWithNeighbour :: forall a. (a -> a -> Bool) -> [a] -> [(a, Bool)] -overlapsWithNeighbour a -> a -> Bool -p = [a] -> [(a, Bool)] -go0 +overlapsWithNeighbour a -> a -> Bool +p = [a] -> [(a, Bool)] +go0 where - go0 :: [a] -> [(a, Bool)] -go0 = \case + go0 :: [a] -> [(a, Bool)] +go0 = \case [] -> [] - (a -x:[a] -xs) -> a -> Bool -> [a] -> [(a, Bool)] -go a -x Bool + (a +x:[a] +xs) -> a -> Bool -> [a] -> [(a, Bool)] +go a +x Bool False [a] -xs +xs - go :: a -> Bool -> [a] -> [(a, Bool)] -go a -x Bool -b = \case + go :: a -> Bool -> [a] -> [(a, Bool)] +go a +x Bool +b = \case [] -> [(a -x,Bool -b)] - (a -y:[a] -ys) -> let b' :: Bool -b' = a -> a -> Bool -p a -x a -y +x,Bool +b)] + (a +y:[a] +ys) -> let b' :: Bool +b' = a -> a -> Bool +p a +x a +y in (a -x,Bool -b Bool -> Bool -> Bool +x,Bool +b Bool -> Bool -> Bool || Bool -b') (a, Bool) -> [(a, Bool)] -> [(a, Bool)] +b') (a, Bool) -> [(a, Bool)] -> [(a, Bool)] forall a. a -> [a] -> [a] : a -> Bool -> [a] -> [(a, Bool)] -go a -y Bool -b' [a] -ys +go a +y Bool +b' [a] +ys -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- * Flipping and unflipping -data Flipped segment = NotFlipped segment - | Flipped segment - deriving (Int -> Flipped segment -> ShowS +data Flipped segment = NotFlipped segment + | Flipped segment + deriving (Int -> Flipped segment -> ShowS [Flipped segment] -> ShowS Flipped segment -> String (Int -> Flipped segment -> ShowS) @@ -1636,7 +1636,7 @@ show :: Flipped segment -> String $cshowList :: forall segment. Show segment => [Flipped segment] -> ShowS showList :: [Flipped segment] -> ShowS -Show,Flipped segment -> Flipped segment -> Bool +Show,Flipped segment -> Flipped segment -> Bool (Flipped segment -> Flipped segment -> Bool) -> (Flipped segment -> Flipped segment -> Bool) -> Eq (Flipped segment) @@ -1652,7 +1652,7 @@ Eq segment => Flipped segment -> Flipped segment -> Bool /= :: Flipped segment -> Flipped segment -> Bool -Eq,(forall a b. (a -> b) -> Flipped a -> Flipped b) +Eq,(forall a b. (a -> b) -> Flipped a -> Flipped b) -> (forall a b. a -> Flipped b -> Flipped a) -> Functor Flipped forall a b. a -> Flipped b -> Flipped a forall a b. (a -> b) -> Flipped a -> Flipped b @@ -1666,7 +1666,7 @@ Functor) -- | Access the underlying segment -rawSegment :: Lens' (Flipped segment) segment +rawSegment :: Lens' (Flipped segment) segment rawSegment :: forall segment (f :: * -> *). Functor f => (segment -> f segment) -> Flipped segment -> f (Flipped segment) @@ -1675,30 +1675,30 @@ -> Lens (Flipped segment) (Flipped segment) segment segment forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\case - NotFlipped segment -s -> segment -s - Flipped segment -s -> segment -s + NotFlipped segment +s -> segment +s + Flipped segment +s -> segment +s ) - (\Flipped segment -fs segment -seg -> segment -seg segment -> Flipped segment -> Flipped segment + (\Flipped segment +fs segment +seg -> segment +seg segment -> Flipped segment -> Flipped segment forall a b. a -> Flipped b -> Flipped a forall (f :: * -> *) a b. Functor f => a -> f b -> f a <$ Flipped segment -fs) +fs) -type instance NumType (Flipped segment) = NumType segment -type instance Dimension (Flipped segment) = Dimension segment +type instance NumType (Flipped segment) = NumType segment +type instance Dimension (Flipped segment) = Dimension segment -type instance Intersection (Flipped segment) (Flipped segment) = - Maybe (LineSegmentLineSegmentIntersection (Flipped segment)) +type instance Intersection (Flipped segment) (Flipped segment) = + Maybe (LineSegmentLineSegmentIntersection (Flipped segment)) -instance HasStart lineSegment point => HasStart (Flipped lineSegment) point where - start :: Lens' (Flipped lineSegment) point +instance HasStart lineSegment point => HasStart (Flipped lineSegment) point where + start :: Lens' (Flipped lineSegment) point start = (lineSegment -> f lineSegment) -> Flipped lineSegment -> f (Flipped lineSegment) forall segment (f :: * -> *). @@ -1715,9 +1715,9 @@ forall seg p. HasStart seg p => Lens' seg p Lens' lineSegment point start -instance ( HasStartPoint lineSegment endPoint - ) => HasStartPoint (Flipped lineSegment) endPoint where - startPoint :: Lens' (Flipped lineSegment) endPoint +instance ( HasStartPoint lineSegment endPoint + ) => HasStartPoint (Flipped lineSegment) endPoint where + startPoint :: Lens' (Flipped lineSegment) endPoint startPoint = (lineSegment -> f lineSegment) -> Flipped lineSegment -> f (Flipped lineSegment) forall segment (f :: * -> *). @@ -1735,8 +1735,8 @@ Lens' lineSegment endPoint startPoint -instance HasEnd lineSegment point => HasEnd (Flipped lineSegment) point where - end :: Lens' (Flipped lineSegment) point +instance HasEnd lineSegment point => HasEnd (Flipped lineSegment) point where + end :: Lens' (Flipped lineSegment) point end = (lineSegment -> f lineSegment) -> Flipped lineSegment -> f (Flipped lineSegment) forall segment (f :: * -> *). @@ -1753,9 +1753,9 @@ forall seg p. HasEnd seg p => Lens' seg p Lens' lineSegment point end -instance ( HasEndPoint lineSegment endPoint - ) => HasEndPoint (Flipped lineSegment) endPoint where - endPoint :: Lens' (Flipped lineSegment) endPoint +instance ( HasEndPoint lineSegment endPoint + ) => HasEndPoint (Flipped lineSegment) endPoint where + endPoint :: Lens' (Flipped lineSegment) endPoint endPoint = (lineSegment -> f lineSegment) -> Flipped lineSegment -> f (Flipped lineSegment) forall segment (f :: * -> *). @@ -1773,18 +1773,18 @@ Lens' lineSegment endPoint endPoint -type instance StartPointOf (Flipped lineSegment) = StartPointOf lineSegment -type instance EndPointOf (Flipped lineSegment) = EndPointOf lineSegment +type instance StartPointOf (Flipped lineSegment) = StartPointOf lineSegment +type instance EndPointOf (Flipped lineSegment) = EndPointOf lineSegment -instance IntervalLike_ lineSegment point => IntervalLike_ (Flipped lineSegment) point -instance LineSegment_ lineSegment point => LineSegment_ (Flipped lineSegment) point +instance IntervalLike_ lineSegment point => IntervalLike_ (Flipped lineSegment) point +instance LineSegment_ lineSegment point => LineSegment_ (Flipped lineSegment) point -instance ConstructableLineSegment_ lineSegment point - => ConstructableLineSegment_ (Flipped lineSegment) point where - uncheckedLineSegment :: point -> point -> Flipped lineSegment -uncheckedLineSegment point -s point -t = lineSegment -> Flipped lineSegment +instance ConstructableLineSegment_ lineSegment point + => ConstructableLineSegment_ (Flipped lineSegment) point where + uncheckedLineSegment :: point -> point -> Flipped lineSegment +uncheckedLineSegment point +s point +t = lineSegment -> Flipped lineSegment forall segment. segment -> Flipped segment NotFlipped (lineSegment -> Flipped lineSegment) -> lineSegment -> Flipped lineSegment @@ -1794,16 +1794,16 @@ ConstructableLineSegment_ lineSegment point => point -> point -> lineSegment uncheckedLineSegment point -s point -t +s point +t -instance segment `HasIntersectionWith` segment - => (Flipped segment) `HasIntersectionWith` (Flipped segment) where - Flipped segment -a intersects :: Flipped segment -> Flipped segment -> Bool -`intersects` Flipped segment -b = (Flipped segment -aFlipped segment +instance segment `HasIntersectionWith` segment + => (Flipped segment) `HasIntersectionWith` (Flipped segment) where + Flipped segment +a intersects :: Flipped segment -> Flipped segment -> Bool +`intersects` Flipped segment +b = (Flipped segment +aFlipped segment -> Getting segment (Flipped segment) segment -> segment forall s a. s -> Getting a s a -> a ^.Getting segment (Flipped segment) segment @@ -1813,7 +1813,7 @@ rawSegment) segment -> segment -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` (Flipped segment -bFlipped segment +bFlipped segment -> Getting segment (Flipped segment) segment -> segment forall s a. s -> Getting a s a -> a ^.Getting segment (Flipped segment) segment @@ -1822,14 +1822,14 @@ (segment -> f segment) -> Flipped segment -> f (Flipped segment) rawSegment) -instance HasOnSegment segment 2 => HasOnSegment (Flipped segment) 2 where - onSegment :: forall r point. +instance HasOnSegment segment 2 => HasOnSegment (Flipped segment) 2 where + onSegment :: forall r point. (Ord r, Point_ point 2 r, r ~ NumType (Flipped segment), 2 ~ Dimension (Flipped segment)) => point -> Flipped segment -> Bool -onSegment point -q Flipped segment -s = point -> segment -> Bool +onSegment point +q Flipped segment +s = point -> segment -> Bool forall lineSegment (d :: Nat) r point. (HasOnSegment lineSegment d, Ord r, Point_ point d r, r ~ NumType lineSegment, d ~ Dimension lineSegment) => @@ -1839,8 +1839,8 @@ 2 ~ Dimension segment) => point -> segment -> Bool onSegment point -q (Flipped segment -sFlipped segment +q (Flipped segment +sFlipped segment -> Getting segment (Flipped segment) segment -> segment forall s a. s -> Getting a s a -> a ^.Getting segment (Flipped segment) segment @@ -1849,18 +1849,18 @@ (segment -> f segment) -> Flipped segment -> f (Flipped segment) rawSegment) -instance (segment `IsIntersectableWith` segment - , Intersection segment segment ~ Maybe (LineSegmentLineSegmentIntersection segment) - ) => (Flipped segment) `IsIntersectableWith` (Flipped segment) where - Flipped segment -a intersect :: Flipped segment +instance (segment `IsIntersectableWith` segment + , Intersection segment segment ~ Maybe (LineSegmentLineSegmentIntersection segment) + ) => (Flipped segment) `IsIntersectableWith` (Flipped segment) where + Flipped segment +a intersect :: Flipped segment -> Flipped segment -> Intersection (Flipped segment) (Flipped segment) -`intersect` Flipped segment -b = segment -> segment -> Intersection segment segment +`intersect` Flipped segment +b = segment -> segment -> Intersection segment segment forall g h. IsIntersectableWith g h => g -> h -> Intersection g h intersect (Flipped segment -aFlipped segment +aFlipped segment -> Getting segment (Flipped segment) segment -> segment forall s a. s -> Getting a s a -> a ^.Getting segment (Flipped segment) segment @@ -1868,7 +1868,7 @@ Functor f => (segment -> f segment) -> Flipped segment -> f (Flipped segment) rawSegment) (Flipped segment -bFlipped segment +bFlipped segment -> Getting segment (Flipped segment) segment -> segment forall s a. s -> Getting a s a -> a ^.Getting segment (Flipped segment) segment @@ -1881,17 +1881,17 @@ -> Maybe (LineSegmentLineSegmentIntersection (Flipped segment)) forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b <&> \case - LineSegment_x_LineSegment_Point Point 2 (NumType segment) -p -> Point 2 (NumType (Flipped segment)) + LineSegment_x_LineSegment_Point Point 2 (NumType segment) +p -> Point 2 (NumType (Flipped segment)) -> LineSegmentLineSegmentIntersection (Flipped segment) forall lineSegment. Point 2 (NumType lineSegment) -> LineSegmentLineSegmentIntersection lineSegment LineSegment_x_LineSegment_Point Point 2 (NumType segment) Point 2 (NumType (Flipped segment)) -p - LineSegment_x_LineSegment_LineSegment segment -seg -> +p + LineSegment_x_LineSegment_LineSegment segment +seg -> Flipped segment -> LineSegmentLineSegmentIntersection (Flipped segment) forall lineSegment. @@ -1904,7 +1904,7 @@ $ segment -> Flipped segment forall segment. segment -> Flipped segment NotFlipped segment -seg +seg -- TODO: maybe we should actually unflip segments a and b rather than use rawSegment @@ -1919,17 +1919,17 @@ -- | Make sure the 'start' endpoint occurs before the end-endpoints in -- terms of the sweep order. -tagFlipped :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r - , StartPointOf lineSegment ~ EndPointOf lineSegment +tagFlipped :: (LineSegment_ lineSegment point, Point_ point 2 r, Ord r + , StartPointOf lineSegment ~ EndPointOf lineSegment ) - => lineSegment -> Flipped lineSegment + => lineSegment -> Flipped lineSegment tagFlipped :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, StartPointOf lineSegment ~ EndPointOf lineSegment) => lineSegment -> Flipped lineSegment -tagFlipped lineSegment -s = case (lineSegment -slineSegment -> Getting point lineSegment point -> point +tagFlipped lineSegment +s = case (lineSegment +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p @@ -1939,7 +1939,7 @@ (Point_ point 2 r, Ord r) => point -> point -> Ordering `ordPoints` (lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p @@ -1957,24 +1957,24 @@ StartPointOf lineSegment ~ EndPointOf lineSegment) => lineSegment -> lineSegment flipSeg lineSegment -s +s Ordering _ -> lineSegment -> Flipped lineSegment forall segment. segment -> Flipped segment NotFlipped lineSegment -s +s -- | Flips the segment -flipSeg :: ( LineSegment_ lineSegment point - , StartPointOf lineSegment ~ EndPointOf lineSegment - ) => lineSegment -> lineSegment +flipSeg :: ( LineSegment_ lineSegment point + , StartPointOf lineSegment ~ EndPointOf lineSegment + ) => lineSegment -> lineSegment flipSeg :: forall lineSegment point. (LineSegment_ lineSegment point, StartPointOf lineSegment ~ EndPointOf lineSegment) => lineSegment -> lineSegment -flipSeg lineSegment -seg = lineSegment -seglineSegment -> (lineSegment -> lineSegment) -> lineSegment +flipSeg lineSegment +seg = lineSegment +seglineSegment -> (lineSegment -> lineSegment) -> lineSegment forall a b. a -> (a -> b) -> b &(EndPointOf lineSegment -> Identity (EndPointOf lineSegment)) -> lineSegment -> Identity lineSegment @@ -1985,7 +1985,7 @@ -> EndPointOf lineSegment -> lineSegment -> lineSegment forall s t a b. ASetter s t a b -> b -> s -> t .~ (lineSegment -seglineSegment +seglineSegment -> Getting (EndPointOf lineSegment) lineSegment (EndPointOf lineSegment) -> EndPointOf lineSegment @@ -2006,7 +2006,7 @@ -> EndPointOf lineSegment -> lineSegment -> lineSegment forall s t a b. ASetter s t a b -> b -> s -> t .~ (lineSegment -seglineSegment +seglineSegment -> Getting (EndPointOf lineSegment) lineSegment (EndPointOf lineSegment) -> EndPointOf lineSegment @@ -2020,9 +2020,9 @@ -------------------------------------------------------------------------------- -- | test if the segment is flipped or not. -isFlipped :: forall f lineSegment. - Coercible (f (Flipped lineSegment)) (Flipped lineSegment) - => f (Flipped lineSegment) -> Bool +isFlipped :: forall f lineSegment. + Coercible (f (Flipped lineSegment)) (Flipped lineSegment) + => f (Flipped lineSegment) -> Bool isFlipped :: forall (f :: * -> *) lineSegment. Coercible (f (Flipped lineSegment)) (Flipped lineSegment) => f (Flipped lineSegment) -> Bool @@ -2039,24 +2039,24 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @_ @(Flipped lineSegment) +coerce @_ @(Flipped lineSegment) -- | Unflips the segments in an associated. -unflipSegs :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Fractional r, Ord r - , IntersectConstraints lineSegment - , StartPointOf lineSegment ~ EndPointOf lineSegment +unflipSegs :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Fractional r, Ord r + , IntersectConstraints lineSegment + , StartPointOf lineSegment ~ EndPointOf lineSegment ) - => Associated (Flipped lineSegment) - -> Associated lineSegment + => Associated (Flipped lineSegment) + -> Associated lineSegment unflipSegs :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Fractional r, Ord r, IntersectConstraints lineSegment, StartPointOf lineSegment ~ EndPointOf lineSegment) => Associated (Flipped lineSegment) -> Associated lineSegment -unflipSegs Associated (Flipped lineSegment) -assocs = Set (AroundStart lineSegment) +unflipSegs Associated (Flipped lineSegment) +assocs = Set (AroundStart lineSegment) -> Set (AroundEnd lineSegment) -> Set (AroundIntersection lineSegment) -> Associated lineSegment @@ -2070,8 +2070,8 @@ forall (f :: * -> *) lineSegment. Functor f => Set (f (Flipped lineSegment)) -> Set (f lineSegment) -dropFlipped Set (AroundStart (Flipped lineSegment)) -ss1 Set (AroundStart lineSegment) +dropFlipped Set (AroundStart (Flipped lineSegment)) +ss1 Set (AroundStart lineSegment) -> Set (AroundStart lineSegment) -> Set (AroundStart lineSegment) forall a. Semigroup a => a -> a -> a <> Set (AroundEnd (Flipped lineSegment)) @@ -2082,14 +2082,14 @@ StartPointOf lineSegment ~ EndPointOf lineSegment) => Set (f (Flipped lineSegment)) -> Set (g lineSegment) unflipSegs' Set (AroundEnd (Flipped lineSegment)) -es) +es) (Set (AroundEnd (Flipped lineSegment)) -> Set (AroundEnd lineSegment) forall (f :: * -> *) lineSegment. Functor f => Set (f (Flipped lineSegment)) -> Set (f lineSegment) -dropFlipped Set (AroundEnd (Flipped lineSegment)) -es1 Set (AroundEnd lineSegment) +dropFlipped Set (AroundEnd (Flipped lineSegment)) +es1 Set (AroundEnd lineSegment) -> Set (AroundEnd lineSegment) -> Set (AroundEnd lineSegment) forall a. Semigroup a => a -> a -> a <> Set (AroundStart (Flipped lineSegment)) @@ -2100,14 +2100,14 @@ StartPointOf lineSegment ~ EndPointOf lineSegment) => Set (f (Flipped lineSegment)) -> Set (g lineSegment) unflipSegs' Set (AroundStart (Flipped lineSegment)) -ss) +ss) (Set (AroundIntersection (Flipped lineSegment)) -> Set (AroundIntersection lineSegment) forall (f :: * -> *) lineSegment. Functor f => Set (f (Flipped lineSegment)) -> Set (f lineSegment) -dropFlipped Set (AroundIntersection (Flipped lineSegment)) -is1 Set (AroundIntersection lineSegment) +dropFlipped Set (AroundIntersection (Flipped lineSegment)) +is1 Set (AroundIntersection lineSegment) -> Set (AroundIntersection lineSegment) -> Set (AroundIntersection lineSegment) forall a. Semigroup a => a -> a -> a @@ -2119,11 +2119,11 @@ StartPointOf lineSegment ~ EndPointOf lineSegment) => Set (f (Flipped lineSegment)) -> Set (g lineSegment) unflipSegs' Set (AroundIntersection (Flipped lineSegment)) -is) +is) where - (Set (AroundStart (Flipped lineSegment)) -ss,Set (AroundStart (Flipped lineSegment)) -ss1) = (AroundStart (Flipped lineSegment) -> Bool) + (Set (AroundStart (Flipped lineSegment)) +ss,Set (AroundStart (Flipped lineSegment)) +ss1) = (AroundStart (Flipped lineSegment) -> Bool) -> Set (AroundStart (Flipped lineSegment)) -> (Set (AroundStart (Flipped lineSegment)), Set (AroundStart (Flipped lineSegment))) @@ -2140,7 +2140,7 @@ Set (AroundStart (Flipped lineSegment))) forall a b. (a -> b) -> a -> b $ Associated (Flipped lineSegment) -assocsAssociated (Flipped lineSegment) +assocsAssociated (Flipped lineSegment) -> Getting (Set (AroundStart (Flipped lineSegment))) (Associated (Flipped lineSegment)) @@ -2157,9 +2157,9 @@ -> f (Set (AroundStart lineSegment))) -> Associated lineSegment -> f (Associated lineSegment) startPointOf - (Set (AroundEnd (Flipped lineSegment)) -es,Set (AroundEnd (Flipped lineSegment)) -es1) = (AroundEnd (Flipped lineSegment) -> Bool) + (Set (AroundEnd (Flipped lineSegment)) +es,Set (AroundEnd (Flipped lineSegment)) +es1) = (AroundEnd (Flipped lineSegment) -> Bool) -> Set (AroundEnd (Flipped lineSegment)) -> (Set (AroundEnd (Flipped lineSegment)), Set (AroundEnd (Flipped lineSegment))) @@ -2176,7 +2176,7 @@ Set (AroundEnd (Flipped lineSegment))) forall a b. (a -> b) -> a -> b $ Associated (Flipped lineSegment) -assocsAssociated (Flipped lineSegment) +assocsAssociated (Flipped lineSegment) -> Getting (Set (AroundEnd (Flipped lineSegment))) (Associated (Flipped lineSegment)) @@ -2192,9 +2192,9 @@ (Set (AroundEnd lineSegment) -> f (Set (AroundEnd lineSegment))) -> Associated lineSegment -> f (Associated lineSegment) endPointOf - (Set (AroundIntersection (Flipped lineSegment)) -is,Set (AroundIntersection (Flipped lineSegment)) -is1) = (AroundIntersection (Flipped lineSegment) -> Bool) + (Set (AroundIntersection (Flipped lineSegment)) +is,Set (AroundIntersection (Flipped lineSegment)) +is1) = (AroundIntersection (Flipped lineSegment) -> Bool) -> Set (AroundIntersection (Flipped lineSegment)) -> (Set (AroundIntersection (Flipped lineSegment)), Set (AroundIntersection (Flipped lineSegment))) @@ -2211,7 +2211,7 @@ Set (AroundIntersection (Flipped lineSegment))) forall a b. (a -> b) -> a -> b $ Associated (Flipped lineSegment) -assocsAssociated (Flipped lineSegment) +assocsAssociated (Flipped lineSegment) -> Getting (Set (AroundIntersection (Flipped lineSegment))) (Associated (Flipped lineSegment)) @@ -2230,12 +2230,12 @@ interiorTo -- | For segments that are not acutally flipped, we can just drop the flipped bit - dropFlipped :: Functor f - => Set.Set (f (Flipped lineSegment)) -> Set.Set (f lineSegment) - dropFlipped :: forall (f :: * -> *) lineSegment. + dropFlipped :: Functor f + => Set.Set (f (Flipped lineSegment)) -> Set.Set (f lineSegment) + dropFlipped :: forall (f :: * -> *) lineSegment. Functor f => Set (f (Flipped lineSegment)) -> Set (f lineSegment) -dropFlipped = (f (Flipped lineSegment) -> f lineSegment) +dropFlipped = (f (Flipped lineSegment) -> f lineSegment) -> Set (f (Flipped lineSegment)) -> Set (f lineSegment) forall a b. (a -> b) -> Set a -> Set b Set.mapMonotonic ((Flipped lineSegment -> lineSegment) @@ -2260,11 +2260,11 @@ -- | For flipped segs we unflip them (and appropriately coerce the so that they remain in -- the same order. I.e. if they were sorted around the start point they are now sorted -- around the endpoint. -unflipSegs' :: ( Functor f, Coercible (f lineSegment) (g lineSegment) - , LineSegment_ lineSegment point - , StartPointOf lineSegment ~ EndPointOf lineSegment +unflipSegs' :: ( Functor f, Coercible (f lineSegment) (g lineSegment) + , LineSegment_ lineSegment point + , StartPointOf lineSegment ~ EndPointOf lineSegment ) - => Set.Set (f (Flipped lineSegment)) -> Set.Set (g lineSegment) + => Set.Set (f (Flipped lineSegment)) -> Set.Set (g lineSegment) unflipSegs' :: forall (f :: * -> *) lineSegment (g :: * -> *) point. (Functor f, Coercible (f lineSegment) (g lineSegment), LineSegment_ lineSegment point, diff --git a/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Naive.html b/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Naive.html index 38dd23f3a..afdf8679d 100644 --- a/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Naive.html +++ b/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Naive.html @@ -38,14 +38,14 @@ -- | Compute all intersections (naively) -- -- \(O(n^2)\) -intersections :: ( Ord r, Fractional r - , LineSegment_ lineSegment point - , Eq lineSegment - , Point_ point 2 r - , IntersectConstraints lineSegment - , Foldable f +intersections :: ( Ord r, Fractional r + , LineSegment_ lineSegment point + , Eq lineSegment + , Point_ point 2 r + , IntersectConstraints lineSegment + , Foldable f ) - => f lineSegment -> Intersections r lineSegment + => f lineSegment -> Intersections r lineSegment intersections :: forall r lineSegment point (f :: * -> *). (Ord r, Fractional r, LineSegment_ lineSegment point, Eq lineSegment, Point_ point 2 r, IntersectConstraints lineSegment, @@ -79,7 +79,7 @@ -> Map (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) (Associated lineSegment) -collect ([Two lineSegment] -> Intersections r lineSegment) +collect ([Two lineSegment] -> Intersections r lineSegment) -> (f lineSegment -> [Two lineSegment]) -> f lineSegment -> Intersections r lineSegment @@ -88,13 +88,13 @@ forall (f :: * -> *) a. Foldable f => f a -> [Two a] uniquePairs where - collect :: Two lineSegment + collect :: Two lineSegment -> Map (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) (Associated lineSegment) -collect (Two lineSegment -s lineSegment -s') = case lineSegment +collect (Two lineSegment +s lineSegment +s') = case lineSegment -> lineSegment -> Maybe (IntersectionPoint @@ -105,8 +105,8 @@ lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment) intersectionPointOf lineSegment -s lineSegment -s' of +s lineSegment +s' of Maybe (IntersectionPoint (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) lineSegment) @@ -115,9 +115,9 @@ (Associated lineSegment) forall a. Monoid a => a mempty - Just IntersectionPoint + Just IntersectionPoint (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) lineSegment -ip -> Point 2 (NumType (IxValue (EndPointOf lineSegment))) +ip -> Point 2 (NumType (IxValue (EndPointOf lineSegment))) -> Associated lineSegment -> Map (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) @@ -125,7 +125,7 @@ forall k a. k -> a -> Map k a Map.singleton (IntersectionPoint (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) lineSegment -ipIntersectionPoint +ipIntersectionPoint (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) lineSegment -> Getting (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) @@ -146,7 +146,7 @@ -> f (IntersectionPoint point2 lineSegment) intersectionPoint) (IntersectionPoint (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) lineSegment -ipIntersectionPoint +ipIntersectionPoint (Point 2 (NumType (IxValue (EndPointOf lineSegment)))) lineSegment -> Getting (Associated lineSegment) diff --git a/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Types.html b/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Types.html index ab56815c6..568a8931a 100644 --- a/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Types.html +++ b/haddocks/hgeometry/src/HGeometry.LineSegment.Intersection.Types.html @@ -58,7 +58,7 @@ -- | Assumes that two segments have the same start point -newtype AroundStart a = AroundStart a deriving (Int -> AroundStart a -> ShowS +newtype AroundStart a = AroundStart a deriving (Int -> AroundStart a -> ShowS [AroundStart a] -> ShowS AroundStart a -> String (Int -> AroundStart a -> ShowS) @@ -76,7 +76,7 @@ show :: AroundStart a -> String $cshowList :: forall a. Show a => [AroundStart a] -> ShowS showList :: [AroundStart a] -> ShowS -Show,ReadPrec [AroundStart a] +Show,ReadPrec [AroundStart a] ReadPrec (AroundStart a) Int -> ReadS (AroundStart a) ReadS [AroundStart a] @@ -100,13 +100,13 @@ readPrec :: ReadPrec (AroundStart a) $creadListPrec :: forall a. Read a => ReadPrec [AroundStart a] readListPrec :: ReadPrec [AroundStart a] -Read,AroundStart a -> () +Read,AroundStart a -> () (AroundStart a -> ()) -> NFData (AroundStart a) forall a. NFData a => AroundStart a -> () forall a. (a -> ()) -> NFData a $crnf :: forall a. NFData a => AroundStart a -> () rnf :: AroundStart a -> () -NFData,(forall a b. (a -> b) -> AroundStart a -> AroundStart b) +NFData,(forall a b. (a -> b) -> AroundStart a -> AroundStart b) -> (forall a b. a -> AroundStart b -> AroundStart a) -> Functor AroundStart forall a b. a -> AroundStart b -> AroundStart a @@ -120,16 +120,16 @@ <$ :: forall a b. a -> AroundStart b -> AroundStart a Functor) -makeWrapped ''AroundStart +makeWrapped ''AroundStart -instance ( Point_ point 2 r, Eq r - , HasEnd lineSegment point) => Eq (AroundStart lineSegment) where +instance ( Point_ point 2 r, Eq r + , HasEnd lineSegment point) => Eq (AroundStart lineSegment) where -- | equality on endpoint - (AroundStart lineSegment -s) == :: AroundStart lineSegment -> AroundStart lineSegment -> Bool -== (AroundStart lineSegment -s') = lineSegment -slineSegment + (AroundStart lineSegment +s) == :: AroundStart lineSegment -> AroundStart lineSegment -> Bool +== (AroundStart lineSegment +s') = lineSegment +slineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -151,7 +151,7 @@ asPoint Point 2 r -> Point 2 r -> Bool forall a. Eq a => a -> a -> Bool == lineSegment -s'lineSegment +s'lineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -172,32 +172,32 @@ Lens' point (Point 2 r) asPoint -instance ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Num r - ) => Ord (AroundStart lineSegment) where +instance ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Num r + ) => Ord (AroundStart lineSegment) where -- | ccw ordered around their suposed common startpoint - (AroundStart lineSegment -s) compare :: AroundStart lineSegment -> AroundStart lineSegment -> Ordering -`compare` (AroundStart lineSegment -s') = point -> point -> point -> Ordering + (AroundStart lineSegment +s) compare :: AroundStart lineSegment -> AroundStart lineSegment -> Ordering +`compare` (AroundStart lineSegment +s') = point -> point -> point -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering ccwCmpAround (lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p Lens' lineSegment point start) (lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p Lens' lineSegment point end) (lineSegment -s'lineSegment -> Getting point lineSegment point -> point +s'lineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p @@ -207,7 +207,7 @@ ---------------------------------------- -- | Assumes that two segments have the same end point -newtype AroundEnd a = AroundEnd a deriving (Int -> AroundEnd a -> ShowS +newtype AroundEnd a = AroundEnd a deriving (Int -> AroundEnd a -> ShowS [AroundEnd a] -> ShowS AroundEnd a -> String (Int -> AroundEnd a -> ShowS) @@ -225,7 +225,7 @@ show :: AroundEnd a -> String $cshowList :: forall a. Show a => [AroundEnd a] -> ShowS showList :: [AroundEnd a] -> ShowS -Show,ReadPrec [AroundEnd a] +Show,ReadPrec [AroundEnd a] ReadPrec (AroundEnd a) Int -> ReadS (AroundEnd a) ReadS [AroundEnd a] @@ -249,13 +249,13 @@ readPrec :: ReadPrec (AroundEnd a) $creadListPrec :: forall a. Read a => ReadPrec [AroundEnd a] readListPrec :: ReadPrec [AroundEnd a] -Read,AroundEnd a -> () +Read,AroundEnd a -> () (AroundEnd a -> ()) -> NFData (AroundEnd a) forall a. NFData a => AroundEnd a -> () forall a. (a -> ()) -> NFData a $crnf :: forall a. NFData a => AroundEnd a -> () rnf :: AroundEnd a -> () -NFData,(forall a b. (a -> b) -> AroundEnd a -> AroundEnd b) +NFData,(forall a b. (a -> b) -> AroundEnd a -> AroundEnd b) -> (forall a b. a -> AroundEnd b -> AroundEnd a) -> Functor AroundEnd forall a b. a -> AroundEnd b -> AroundEnd a @@ -269,15 +269,15 @@ <$ :: forall a b. a -> AroundEnd b -> AroundEnd a Functor) -makeWrapped ''AroundEnd +makeWrapped ''AroundEnd -instance (Point_ point 2 r, Eq r, HasStart lineSegment point) => Eq (AroundEnd lineSegment) where +instance (Point_ point 2 r, Eq r, HasStart lineSegment point) => Eq (AroundEnd lineSegment) where -- | equality on endpoint - (AroundEnd lineSegment -s) == :: AroundEnd lineSegment -> AroundEnd lineSegment -> Bool -== (AroundEnd lineSegment -s') = lineSegment -slineSegment + (AroundEnd lineSegment +s) == :: AroundEnd lineSegment -> AroundEnd lineSegment -> Bool +== (AroundEnd lineSegment +s') = lineSegment +slineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -299,7 +299,7 @@ asPoint Point 2 r -> Point 2 r -> Bool forall a. Eq a => a -> a -> Bool == lineSegment -s'lineSegment +s'lineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -320,33 +320,33 @@ Lens' point (Point 2 r) asPoint -instance ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Num r - , Eq lineSegment - ) => Ord (AroundEnd lineSegment) where +instance ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Num r + , Eq lineSegment + ) => Ord (AroundEnd lineSegment) where -- | ccw ordered around their suposed common end point - (AroundEnd lineSegment -s) compare :: AroundEnd lineSegment -> AroundEnd lineSegment -> Ordering -`compare` (AroundEnd lineSegment -s') = point -> point -> point -> Ordering + (AroundEnd lineSegment +s) compare :: AroundEnd lineSegment -> AroundEnd lineSegment -> Ordering +`compare` (AroundEnd lineSegment +s') = point -> point -> point -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering ccwCmpAround (lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p Lens' lineSegment point end) (lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p Lens' lineSegment point start) (lineSegment -s'lineSegment -> Getting point lineSegment point -> point +s'lineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p @@ -356,7 +356,7 @@ -------------------------------------------------------------------------------- -- | Assumes that two segments intersect in a single point. -newtype AroundIntersection a = AroundIntersection a deriving (AroundIntersection a -> AroundIntersection a -> Bool +newtype AroundIntersection a = AroundIntersection a deriving (AroundIntersection a -> AroundIntersection a -> Bool (AroundIntersection a -> AroundIntersection a -> Bool) -> (AroundIntersection a -> AroundIntersection a -> Bool) -> Eq (AroundIntersection a) @@ -372,7 +372,7 @@ Eq a => AroundIntersection a -> AroundIntersection a -> Bool /= :: AroundIntersection a -> AroundIntersection a -> Bool -Eq,Int -> AroundIntersection a -> ShowS +Eq,Int -> AroundIntersection a -> ShowS [AroundIntersection a] -> ShowS AroundIntersection a -> String (Int -> AroundIntersection a -> ShowS) @@ -390,7 +390,7 @@ show :: AroundIntersection a -> String $cshowList :: forall a. Show a => [AroundIntersection a] -> ShowS showList :: [AroundIntersection a] -> ShowS -Show,ReadPrec [AroundIntersection a] +Show,ReadPrec [AroundIntersection a] ReadPrec (AroundIntersection a) Int -> ReadS (AroundIntersection a) ReadS [AroundIntersection a] @@ -414,13 +414,13 @@ readPrec :: ReadPrec (AroundIntersection a) $creadListPrec :: forall a. Read a => ReadPrec [AroundIntersection a] readListPrec :: ReadPrec [AroundIntersection a] -Read,AroundIntersection a -> () +Read,AroundIntersection a -> () (AroundIntersection a -> ()) -> NFData (AroundIntersection a) forall a. NFData a => AroundIntersection a -> () forall a. (a -> ()) -> NFData a $crnf :: forall a. NFData a => AroundIntersection a -> () rnf :: AroundIntersection a -> () -NFData,(forall a b. +NFData,(forall a b. (a -> b) -> AroundIntersection a -> AroundIntersection b) -> (forall a b. a -> AroundIntersection b -> AroundIntersection a) -> Functor AroundIntersection @@ -438,26 +438,26 @@ <$ :: forall a b. a -> AroundIntersection b -> AroundIntersection a Functor) -makeWrapped ''AroundIntersection +makeWrapped ''AroundIntersection -instance ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Fractional r - , Eq lineSegment - , IsIntersectableWith lineSegment lineSegment - , Intersection lineSegment lineSegment ~ - Maybe (LineSegmentLineSegmentIntersection lineSegment) - ) => Ord (AroundIntersection lineSegment) where +instance ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Fractional r + , Eq lineSegment + , IsIntersectableWith lineSegment lineSegment + , Intersection lineSegment lineSegment ~ + Maybe (LineSegmentLineSegmentIntersection lineSegment) + ) => Ord (AroundIntersection lineSegment) where -- | ccw ordered around their common intersection point. - (AroundIntersection lineSegment -s) compare :: AroundIntersection lineSegment + (AroundIntersection lineSegment +s) compare :: AroundIntersection lineSegment -> AroundIntersection lineSegment -> Ordering -`compare` (AroundIntersection lineSegment -s') = case lineSegment -s lineSegment -> lineSegment -> Intersection lineSegment lineSegment +`compare` (AroundIntersection lineSegment +s') = case lineSegment +s lineSegment -> lineSegment -> Intersection lineSegment lineSegment forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` lineSegment -s' of +s' of Maybe (LineSegmentLineSegmentIntersection lineSegment) Intersection lineSegment lineSegment Nothing -> @@ -465,17 +465,17 @@ forall a. HasCallStack => String -> a error String "AroundIntersection: segments do not intersect!" - Just (LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) -p) -> Point 2 r -> lineSegment -> lineSegment -> Ordering + Just (LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) +p) -> Point 2 r -> lineSegment -> lineSegment -> Ordering forall lineSegment point r point'. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ point' 2 r, Ord r, Num r) => point' -> lineSegment -> lineSegment -> Ordering cmpAroundP Point 2 r Point 2 (NumType lineSegment) -p lineSegment -s lineSegment -s' +p lineSegment +s lineSegment +s' Just (LineSegment_x_LineSegment_LineSegment lineSegment _) -> lineSegment -> NumType point forall {point'} {point} {s}. @@ -489,8 +489,8 @@ (NumType point), HasStart s point, HasEnd s point') => s -> NumType point' -squaredLength lineSegment -s NumType point -> NumType point -> Ordering +squaredLength lineSegment +s NumType point -> NumType point -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (lineSegment -> NumType point forall {point'} {point} {s}. @@ -504,28 +504,28 @@ (NumType point), HasStart s point, HasEnd s point') => s -> NumType point' -squaredLength lineSegment -s') +squaredLength lineSegment +s') -- if s and s' just happen to be the same length but -- intersect in different behaviour from using (==). -- but that situation doese not satisfy the precondition -- of aroundIntersection anyway. where - squaredLength :: s -> NumType point' -squaredLength s -ss = point -> point' -> NumType point' + squaredLength :: s -> NumType point' +squaredLength s +ss = point -> point' -> NumType point' forall r point (d :: Nat) point'. (Num r, Point_ point d r, Point_ point' d r, Metric_ (Vector d r) d r) => point -> point' -> r squaredEuclideanDist (s -sss -> Getting point s point -> point +sss -> Getting point s point -> point forall s a. s -> Getting a s a -> a ^.Getting point s point forall seg p. HasStart seg p => Lens' seg p Lens' s point start) (s -sss -> Getting point' s point' -> point' +sss -> Getting point' s point' -> point' forall s a. s -> Getting a s a -> a ^.Getting point' s point' forall seg p. HasEnd seg p => Lens' seg p @@ -533,25 +533,25 @@ end) -- | compare around p -cmpAroundP :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Point_ point' 2 r - , Ord r, Num r +cmpAroundP :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Point_ point' 2 r + , Ord r, Num r ) - => point' -> lineSegment -> lineSegment -> Ordering + => point' -> lineSegment -> lineSegment -> Ordering cmpAroundP :: forall lineSegment point r point'. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ point' 2 r, Ord r, Num r) => point' -> lineSegment -> lineSegment -> Ordering -cmpAroundP point' -p lineSegment -s lineSegment -s' = Point 2 r -> Point 2 r -> Point 2 r -> Ordering +cmpAroundP point' +p lineSegment +s lineSegment +s' = Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering ccwCmpAround (point' -ppoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r +ppoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point' (Point 2 r) forall point (d :: Nat) r. @@ -559,7 +559,7 @@ Lens' point (Point d r) Lens' point' (Point 2 r) asPoint) (lineSegment -slineSegment +slineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -579,7 +579,7 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) (lineSegment -s'lineSegment +s'lineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -613,21 +613,21 @@ -- -- if somehow the segment is degenerate, and p is both the start and -- end it is reported only as the start point. -data Associated lineSegment = +data Associated lineSegment = Associated { forall lineSegment. Associated lineSegment -> Set (AroundStart lineSegment) -_startPointOf :: Set.Set (AroundStart lineSegment) +_startPointOf :: Set.Set (AroundStart lineSegment) -- ^ segments for which the intersection point is the -- start point (i.e. s^.start == p) , forall lineSegment. Associated lineSegment -> Set (AroundEnd lineSegment) -_endPointOf :: Set.Set (AroundEnd lineSegment) +_endPointOf :: Set.Set (AroundEnd lineSegment) -- ^ segments for which the intersection point is the end -- point (i.e. s^.end == p) , forall lineSegment. Associated lineSegment -> Set (AroundIntersection lineSegment) -_interiorTo :: Set.Set (AroundIntersection lineSegment) - } deriving stock (Int -> Associated lineSegment -> ShowS +_interiorTo :: Set.Set (AroundIntersection lineSegment) + } deriving stock (Int -> Associated lineSegment -> ShowS [Associated lineSegment] -> ShowS Associated lineSegment -> String (Int -> Associated lineSegment -> ShowS) @@ -657,7 +657,7 @@ Show lineSegment => [Associated lineSegment] -> ShowS showList :: [Associated lineSegment] -> ShowS -Show, (forall x. +Show, (forall x. Associated lineSegment -> Rep (Associated lineSegment) x) -> (forall x. Rep (Associated lineSegment) x -> Associated lineSegment) @@ -678,33 +678,33 @@ to :: forall x. Rep (Associated lineSegment) x -> Associated lineSegment Generic) -deriving stock instance ( Eq (AroundStart lineSegment) - , Eq (AroundIntersection lineSegment) - , Eq (AroundEnd lineSegment) - ) => Eq (Associated lineSegment) +deriving stock instance ( Eq (AroundStart lineSegment) + , Eq (AroundIntersection lineSegment) + , Eq (AroundEnd lineSegment) + ) => Eq (Associated lineSegment) -deriving stock instance ( Read lineSegment - , OrdArounds lineSegment - ) => Read (Associated lineSegment) +deriving stock instance ( Read lineSegment + , OrdArounds lineSegment + ) => Read (Associated lineSegment) -type OrdArounds lineSegment = ( Ord (AroundStart lineSegment) - , Ord (AroundIntersection lineSegment) - , Ord (AroundEnd lineSegment) +type OrdArounds lineSegment = ( Ord (AroundStart lineSegment) + , Ord (AroundIntersection lineSegment) + , Ord (AroundEnd lineSegment) ) -makeLenses ''Associated +makeLenses ''Associated -- | Fold over the segments associated with the intersection. -associatedSegments :: Fold (Associated lineSegment) lineSegment +associatedSegments :: Fold (Associated lineSegment) lineSegment associatedSegments :: forall lineSegment (f :: * -> *). (Contravariant f, Applicative f) => (lineSegment -> f lineSegment) -> Associated lineSegment -> f (Associated lineSegment) -associatedSegments lineSegment -> f lineSegment -f Associated lineSegment -a = ((Set (AroundStart lineSegment) +associatedSegments lineSegment -> f lineSegment +f Associated lineSegment +a = ((Set (AroundStart lineSegment) -> f (Set (AroundStart lineSegment))) -> Associated lineSegment -> f (Associated lineSegment) forall lineSegment (f :: * -> *). @@ -749,8 +749,8 @@ (Unwrapped (AroundStart lineSegment)) (Unwrapped (AroundStart lineSegment)) _Wrapped) lineSegment -> f lineSegment -f Associated lineSegment -a f (Associated lineSegment) +f Associated lineSegment +a f (Associated lineSegment) -> f (Associated lineSegment) -> f (Associated lineSegment) forall a b. f a -> f b -> f b forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b @@ -794,8 +794,8 @@ (Unwrapped (AroundEnd lineSegment)) (Unwrapped (AroundEnd lineSegment)) _Wrapped) lineSegment -> f lineSegment -f Associated lineSegment -a f (Associated lineSegment) +f Associated lineSegment +a f (Associated lineSegment) -> f (Associated lineSegment) -> f (Associated lineSegment) forall a b. f a -> f b -> f b forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b @@ -852,8 +852,8 @@ (Unwrapped (AroundIntersection lineSegment)) (Unwrapped (AroundIntersection lineSegment)) _Wrapped) lineSegment -> f lineSegment -f Associated lineSegment -a +f Associated lineSegment +a -- combine the folds -- instance Functor (Associated lineSegment) where @@ -868,7 +868,7 @@ -- | Reports whether this associated has any interior intersections -- -- \(O(1)\) -isInteriorIntersection :: Associated lineSegment -> Bool +isInteriorIntersection :: Associated lineSegment -> Bool isInteriorIntersection :: forall lineSegment. Associated lineSegment -> Bool isInteriorIntersection = Bool -> Bool not (Bool -> Bool) @@ -894,22 +894,22 @@ -- appropriate associated representing that. -- -- pre: p intersects the segment -mkAssociated :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Point_ point' 2 r - , Eq r - , OrdArounds lineSegment +mkAssociated :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Point_ point' 2 r + , Eq r + , OrdArounds lineSegment ) - => point' -> lineSegment -> Associated lineSegment + => point' -> lineSegment -> Associated lineSegment mkAssociated :: forall lineSegment point r point'. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ point' 2 r, Eq r, OrdArounds lineSegment) => point' -> lineSegment -> Associated lineSegment -mkAssociated point' -p lineSegment -s +mkAssociated point' +p lineSegment +s | point' -ppoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r +ppoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point' (Point 2 r) forall point (d :: Nat) r. @@ -919,7 +919,7 @@ asPoint Point 2 r -> Point 2 r -> Bool forall a. Eq a => a -> a -> Bool == lineSegment -slineSegment +slineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -964,9 +964,9 @@ Set.singleton (lineSegment -> AroundStart lineSegment forall a. a -> AroundStart a AroundStart lineSegment -s) +s) | point' -ppoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r +ppoint' -> Getting (Point 2 r) point' (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point' (Point 2 r) forall point (d :: Nat) r. @@ -976,7 +976,7 @@ asPoint Point 2 r -> Point 2 r -> Bool forall a. Eq a => a -> a -> Bool == lineSegment -slineSegment +slineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -1020,7 +1020,7 @@ Set.singleton (lineSegment -> AroundEnd lineSegment forall a. a -> AroundEnd a AroundEnd lineSegment -s) +s) | Bool otherwise = Associated lineSegment forall a. Monoid a => a @@ -1049,7 +1049,7 @@ Set.singleton (lineSegment -> AroundIntersection lineSegment forall a. a -> AroundIntersection a AroundIntersection lineSegment -s) +s) ---- | test if the given segment has p as its endpoint, an construct the @@ -1066,16 +1066,16 @@ --mkAssociated' p s = (mkAssociated p s)&interiorTo .~ mempty -instance OrdArounds lineSegment => Semigroup (Associated lineSegment) where - (Associated Set (AroundStart lineSegment) -ss Set (AroundEnd lineSegment) -es Set (AroundIntersection lineSegment) -is) <> :: Associated lineSegment +instance OrdArounds lineSegment => Semigroup (Associated lineSegment) where + (Associated Set (AroundStart lineSegment) +ss Set (AroundEnd lineSegment) +es Set (AroundIntersection lineSegment) +is) <> :: Associated lineSegment -> Associated lineSegment -> Associated lineSegment -<> (Associated Set (AroundStart lineSegment) -ss' Set (AroundEnd lineSegment) -es' Set (AroundIntersection lineSegment) -is') = +<> (Associated Set (AroundStart lineSegment) +ss' Set (AroundEnd lineSegment) +es' Set (AroundIntersection lineSegment) +is') = Set (AroundStart lineSegment) -> Set (AroundEnd lineSegment) -> Set (AroundIntersection lineSegment) @@ -1086,25 +1086,25 @@ -> Set (AroundIntersection lineSegment) -> Associated lineSegment Associated (Set (AroundStart lineSegment) -ss Set (AroundStart lineSegment) +ss Set (AroundStart lineSegment) -> Set (AroundStart lineSegment) -> Set (AroundStart lineSegment) forall a. Semigroup a => a -> a -> a <> Set (AroundStart lineSegment) -ss') (Set (AroundEnd lineSegment) -es Set (AroundEnd lineSegment) +ss') (Set (AroundEnd lineSegment) +es Set (AroundEnd lineSegment) -> Set (AroundEnd lineSegment) -> Set (AroundEnd lineSegment) forall a. Semigroup a => a -> a -> a <> Set (AroundEnd lineSegment) -es') (Set (AroundIntersection lineSegment) -is Set (AroundIntersection lineSegment) +es') (Set (AroundIntersection lineSegment) +is Set (AroundIntersection lineSegment) -> Set (AroundIntersection lineSegment) -> Set (AroundIntersection lineSegment) forall a. Semigroup a => a -> a -> a <> Set (AroundIntersection lineSegment) -is') +is') -instance OrdArounds lineSegment => Monoid (Associated lineSegment) where - mempty :: Associated lineSegment +instance OrdArounds lineSegment => Monoid (Associated lineSegment) where + mempty :: Associated lineSegment mempty = Set (AroundStart lineSegment) -> Set (AroundEnd lineSegment) -> Set (AroundIntersection lineSegment) @@ -1122,13 +1122,13 @@ forall a. Monoid a => a mempty -instance (NFData lineSegment) => NFData (Associated lineSegment) +instance (NFData lineSegment) => NFData (Associated lineSegment) -- | For each intersection point the segments intersecting there. -type Intersections r lineSegment = Map.Map (Point 2 r) (Associated lineSegment) +type Intersections r lineSegment = Map.Map (Point 2 r) (Associated lineSegment) -- | Get the set of all intersection points -intersectionPoints :: Intersections r lineSegment -> Set.Set (Point 2 r) +intersectionPoints :: Intersections r lineSegment -> Set.Set (Point 2 r) intersectionPoints :: forall r lineSegment. Intersections r lineSegment -> Set (Point 2 r) intersectionPoints = Map (Point 2 r) (Associated lineSegment) -> Set (Point 2 r) @@ -1137,14 +1137,14 @@ -- | An intersection point together with all segments intersecting at -- this point. -data IntersectionPoint point lineSegment = +data IntersectionPoint point lineSegment = IntersectionPoint { forall point lineSegment. IntersectionPoint point lineSegment -> point -_intersectionPoint :: !point +_intersectionPoint :: !point , forall point lineSegment. IntersectionPoint point lineSegment -> Associated lineSegment -_associatedSegs :: !(Associated lineSegment) - } deriving stock (Int -> IntersectionPoint point lineSegment -> ShowS +_associatedSegs :: !(Associated lineSegment) + } deriving stock (Int -> IntersectionPoint point lineSegment -> ShowS [IntersectionPoint point lineSegment] -> ShowS IntersectionPoint point lineSegment -> String (Int -> IntersectionPoint point lineSegment -> ShowS) @@ -1174,7 +1174,7 @@ (Show point, Show lineSegment) => [IntersectionPoint point lineSegment] -> ShowS showList :: [IntersectionPoint point lineSegment] -> ShowS -Show,(forall x. +Show,(forall x. IntersectionPoint point lineSegment -> Rep (IntersectionPoint point lineSegment) x) -> (forall x. @@ -1208,20 +1208,20 @@ Rep (IntersectionPoint point lineSegment) x -> IntersectionPoint point lineSegment Generic) -makeLenses ''IntersectionPoint +makeLenses ''IntersectionPoint -deriving stock instance ( Eq (AroundStart lineSegment) - , Eq (AroundIntersection lineSegment) - , Eq (AroundEnd lineSegment) - , Eq point - ) => Eq (IntersectionPoint point lineSegment) +deriving stock instance ( Eq (AroundStart lineSegment) + , Eq (AroundIntersection lineSegment) + , Eq (AroundEnd lineSegment) + , Eq point + ) => Eq (IntersectionPoint point lineSegment) -deriving stock instance ( Read lineSegment, Read point - , OrdArounds lineSegment - ) => Read (IntersectionPoint point lineSegment) +deriving stock instance ( Read lineSegment, Read point + , OrdArounds lineSegment + ) => Read (IntersectionPoint point lineSegment) -instance (NFData point, NFData lineSegment) => NFData (IntersectionPoint point lineSegment) +instance (NFData point, NFData lineSegment) => NFData (IntersectionPoint point lineSegment) -- sameOrder :: (Ord r, Num r, Eq p) => Point 2 r @@ -1235,15 +1235,15 @@ -- | Given a point p, and a bunch of segments that suposedly intersect -- at p, correctly categorize them. -mkIntersectionPoint :: ( LineSegment_ lineSegment endPoint - , Point_ endPoint 2 r - , Point_ point 2 r, Eq r - , OrdArounds lineSegment +mkIntersectionPoint :: ( LineSegment_ lineSegment endPoint + , Point_ endPoint 2 r + , Point_ point 2 r, Eq r + , OrdArounds lineSegment ) - => point - -> [lineSegment] -- ^ uncategorized - -> [lineSegment] -- ^ segments we know contain p, - -> IntersectionPoint point lineSegment + => point + -> [lineSegment] -- ^ uncategorized + -> [lineSegment] -- ^ segments we know contain p, + -> IntersectionPoint point lineSegment mkIntersectionPoint :: forall lineSegment endPoint r point. (LineSegment_ lineSegment endPoint, Point_ endPoint 2 r, Point_ point 2 r, Eq r, OrdArounds lineSegment) => @@ -1251,16 +1251,16 @@ -> [lineSegment] -> [lineSegment] -> IntersectionPoint point lineSegment -mkIntersectionPoint point -p [lineSegment] -as [lineSegment] -cs = point +mkIntersectionPoint point +p [lineSegment] +as [lineSegment] +cs = point -> Associated lineSegment -> IntersectionPoint point lineSegment forall point lineSegment. point -> Associated lineSegment -> IntersectionPoint point lineSegment IntersectionPoint point -p (Associated lineSegment -> IntersectionPoint point lineSegment) +p (Associated lineSegment -> IntersectionPoint point lineSegment) -> Associated lineSegment -> IntersectionPoint point lineSegment forall a b. (a -> b) -> a -> b $ (lineSegment -> Associated lineSegment) @@ -1275,14 +1275,14 @@ Point_ point' 2 r, Eq r, OrdArounds lineSegment) => point' -> lineSegment -> Associated lineSegment mkAssociated point -p) ([lineSegment] -> Associated lineSegment) +p) ([lineSegment] -> Associated lineSegment) -> [lineSegment] -> Associated lineSegment forall a b. (a -> b) -> a -> b $ [lineSegment] -as [lineSegment] -> [lineSegment] -> [lineSegment] +as [lineSegment] -> [lineSegment] -> [lineSegment] forall a. Semigroup a => a -> a -> a <> [lineSegment] -cs +cs -- IntersectionPoint p -- $ Associated mempty mempty (Set.fromAscList cs') @@ -1294,20 +1294,20 @@ -- | An ordering that is decreasing on y, increasing on x -ordPoints :: (Point_ point 2 r, Ord r) => point -> point -> Ordering +ordPoints :: (Point_ point 2 r, Ord r) => point -> point -> Ordering ordPoints :: forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering -ordPoints point -a point -b = let f :: s -> (Down (NumType s), NumType s) -f s -p = (NumType s -> Down (NumType s) +ordPoints point +a point +b = let f :: s -> (Down (NumType s), NumType s) +f s +p = (NumType s -> Down (NumType s) forall a. a -> Down a Down (NumType s -> Down (NumType s)) -> NumType s -> Down (NumType s) forall a b. (a -> b) -> a -> b $ s -ps -> Getting (NumType s) s (NumType s) -> NumType s +ps -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -1315,7 +1315,7 @@ IndexedLens' Int point r IndexedLens' Int s (NumType s) yCoord, s -ps -> Getting (NumType s) s (NumType s) -> NumType s +ps -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Nat) point r. @@ -1335,69 +1335,69 @@ (TypeError ...), Point_ s (Dimension s) (NumType s)) => s -> (Down (NumType s), NumType s) -f point -a point -b +f point +a point +b -- | Given two segments, compute an IntersectionPoint representing their intersection (if -- such an intersection exists). -intersectionPointOf :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Fractional r - , IntersectConstraints lineSegment +intersectionPointOf :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Fractional r + , IntersectConstraints lineSegment ) - => lineSegment -> lineSegment - -> Maybe (IntersectionPoint (Point 2 r) lineSegment) + => lineSegment -> lineSegment + -> Maybe (IntersectionPoint (Point 2 r) lineSegment) intersectionPointOf :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, IntersectConstraints lineSegment) => lineSegment -> lineSegment -> Maybe (IntersectionPoint (Point 2 r) lineSegment) -intersectionPointOf lineSegment -s lineSegment -s' = lineSegment -s lineSegment -> lineSegment -> Intersection lineSegment lineSegment +intersectionPointOf lineSegment +s lineSegment +s' = lineSegment +s lineSegment -> lineSegment -> Intersection lineSegment lineSegment forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` lineSegment -s' Maybe (LineSegmentLineSegmentIntersection lineSegment) +s' Maybe (LineSegmentLineSegmentIntersection lineSegment) -> (LineSegmentLineSegmentIntersection lineSegment -> IntersectionPoint (Point 2 r) lineSegment) -> Maybe (IntersectionPoint (Point 2 r) lineSegment) forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b <&> \case - LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) -p -> Point 2 r -> IntersectionPoint (Point 2 r) lineSegment -intersectionPoint' Point 2 r + LineSegment_x_LineSegment_Point Point 2 (NumType lineSegment) +p -> Point 2 r -> IntersectionPoint (Point 2 r) lineSegment +intersectionPoint' Point 2 r Point 2 (NumType lineSegment) -p - LineSegment_x_LineSegment_LineSegment lineSegment -seg -> Point 2 r -> IntersectionPoint (Point 2 r) lineSegment -intersectionPoint' (lineSegment -> Point (Dimension point) (NumType point) +p + LineSegment_x_LineSegment_LineSegment lineSegment +seg -> Point 2 r -> IntersectionPoint (Point 2 r) lineSegment +intersectionPoint' (lineSegment -> Point (Dimension point) (NumType point) forall {p} {p} {s}. (Dimension p ~ 2, Dimension p ~ 2, NumType p ~ NumType p, Ord (NumType p), HasStart s p, HasEnd s p, Point_ p 2 (NumType p), Point_ p 2 (NumType p)) => s -> Point (Dimension p) (NumType p) -topEndPoint lineSegment -seg) +topEndPoint lineSegment +seg) where - intersectionPoint' :: Point 2 r -> IntersectionPoint (Point 2 r) lineSegment -intersectionPoint' Point 2 r -p = Point 2 r + intersectionPoint' :: Point 2 r -> IntersectionPoint (Point 2 r) lineSegment +intersectionPoint' Point 2 r +p = Point 2 r -> Associated lineSegment -> IntersectionPoint (Point 2 r) lineSegment forall point lineSegment. point -> Associated lineSegment -> IntersectionPoint point lineSegment IntersectionPoint Point 2 r -p (Point 2 r -> lineSegment -> Associated lineSegment +p (Point 2 r -> lineSegment -> Associated lineSegment forall lineSegment point r point'. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ point' 2 r, Eq r, OrdArounds lineSegment) => point' -> lineSegment -> Associated lineSegment mkAssociated Point 2 r -p lineSegment -s Associated lineSegment +p lineSegment +s Associated lineSegment -> Associated lineSegment -> Associated lineSegment forall a. Semigroup a => a -> a -> a <> Point 2 r -> lineSegment -> Associated lineSegment @@ -1406,11 +1406,11 @@ Point_ point' 2 r, Eq r, OrdArounds lineSegment) => point' -> lineSegment -> Associated lineSegment mkAssociated Point 2 r -p lineSegment -s') - topEndPoint :: s -> Point (Dimension p) (NumType p) -topEndPoint s -seg = (Point (Dimension p) (NumType p) +p lineSegment +s') + topEndPoint :: s -> Point (Dimension p) (NumType p) +topEndPoint s +seg = (Point (Dimension p) (NumType p) -> Point (Dimension p) (NumType p) -> Ordering) -> [Point (Dimension p) (NumType p)] -> Point (Dimension p) (NumType p) @@ -1423,7 +1423,7 @@ (Point_ point 2 r, Ord r) => point -> point -> Ordering ordPoints [s -segs +segs -> Getting (Point (Dimension p) (NumType p)) s @@ -1456,7 +1456,7 @@ Lens' point (Point d r) Lens' p (Point (Dimension p) (NumType p)) asPoint, s -segs +segs -> Getting (Point (Dimension p) (NumType p)) s @@ -1491,9 +1491,9 @@ asPoint] -- | Shorthand for the more-or-less standard constraints that we need on LineSegments -type IntersectConstraints lineSegment = - ( OrdArounds lineSegment - , IsIntersectableWith lineSegment lineSegment - , Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment) +type IntersectConstraints lineSegment = + ( OrdArounds lineSegment + , IsIntersectableWith lineSegment lineSegment + , Intersection lineSegment lineSegment ~ Maybe (LineSegmentLineSegmentIntersection lineSegment) ) \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.AdjListForm.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.AdjListForm.html deleted file mode 100644 index e0b0d28cd..000000000 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.AdjListForm.html +++ /dev/null @@ -1,172 +0,0 @@ -
{-# LANGUAGE UndecidableInstances #-}
---------------------------------------------------------------------------------
--- |
--- Module      :  HGeometry.Plane.LowerEnvelope.AdjListForm
--- Copyright   :  (C) Frank Staals
--- License     :  see the LICENSE file
--- Maintainer  :  Frank Staals
---
--- A Representation of the Lower envelope of planes in Adjacency-list
--- form.
---
---------------------------------------------------------------------------------
-module HGeometry.Plane.LowerEnvelope.AdjListForm
-  ( LowerEnvelope(..)
-  , LowerEnvelope'(LowerEnvelope)
-  , ParallelPlane
-  , theUnboundedVertex, boundedVertices
-
-  , singleton
-  , fromVertexForm
-
-  , BoundedVertexF(Vertex)
-  , location, definers, location2
-
-  , UnboundedVertex(UnboundedVertex)
-  , unboundedVertexId
-  , HasUnboundedEdges(..)
-
-  , EdgeGeometry
-  , projectedEdgeGeometries, projectedEdgeGeometry
-  ) where
-
-
---------------------------------------------------------------------------------
-
-import           Control.Lens
-import qualified Data.Foldable as F
-import           Data.Foldable1
-import           Data.List.NonEmpty (NonEmpty(..))
-import qualified Data.Set as Set
-import           HGeometry.HyperPlane.NonVertical
-import           HGeometry.Plane.LowerEnvelope.Connected
-import qualified HGeometry.Plane.LowerEnvelope.VertexForm as VertexForm
-import           HGeometry.Properties
-import           HGeometry.Vector.NonEmpty.Util ()
-
---------------------------------------------------------------------------------
--- * Data type defining a lower envelope
-
--- | The lower enevelope of planes in R^3. (Or rather, its minimization diagram)
-data LowerEnvelope plane =
-    ParallelStrips    !(Set.Set (ParallelPlane plane))
-  | ConnectedEnvelope !(LowerEnvelope' plane)
-
-deriving instance (Show plane, Show (NumType plane)) => Show (LowerEnvelope plane)
-deriving instance (Eq plane, Eq (NumType plane))     => Eq   (LowerEnvelope plane)
-
-type instance NumType   (LowerEnvelope plane) = NumType plane
-type instance Dimension (LowerEnvelope plane) = 3
-
--- | Just a newtype around plane, to be used to model parallel strips in the Lower envelope.
-newtype ParallelPlane plane =
-  ParallelPlane plane deriving (Int -> ParallelPlane plane -> ShowS
-[ParallelPlane plane] -> ShowS
-ParallelPlane plane -> String
-(Int -> ParallelPlane plane -> ShowS)
--> (ParallelPlane plane -> String)
--> ([ParallelPlane plane] -> ShowS)
--> Show (ParallelPlane plane)
-forall plane. Show plane => Int -> ParallelPlane plane -> ShowS
-forall plane. Show plane => [ParallelPlane plane] -> ShowS
-forall plane. Show plane => ParallelPlane plane -> String
-forall a.
-(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
-$cshowsPrec :: forall plane. Show plane => Int -> ParallelPlane plane -> ShowS
-showsPrec :: Int -> ParallelPlane plane -> ShowS
-$cshow :: forall plane. Show plane => ParallelPlane plane -> String
-show :: ParallelPlane plane -> String
-$cshowList :: forall plane. Show plane => [ParallelPlane plane] -> ShowS
-showList :: [ParallelPlane plane] -> ShowS
-Show,ParallelPlane plane -> ParallelPlane plane -> Bool
-(ParallelPlane plane -> ParallelPlane plane -> Bool)
--> (ParallelPlane plane -> ParallelPlane plane -> Bool)
--> Eq (ParallelPlane plane)
-forall plane.
-Eq plane =>
-ParallelPlane plane -> ParallelPlane plane -> Bool
-forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
-$c== :: forall plane.
-Eq plane =>
-ParallelPlane plane -> ParallelPlane plane -> Bool
-== :: ParallelPlane plane -> ParallelPlane plane -> Bool
-$c/= :: forall plane.
-Eq plane =>
-ParallelPlane plane -> ParallelPlane plane -> Bool
-/= :: ParallelPlane plane -> ParallelPlane plane -> Bool
-Eq)
-
-instance Wrapped (ParallelPlane plane) where
-  type Unwrapped (ParallelPlane plane) = plane
-  _Wrapped' :: Iso' (ParallelPlane plane) (Unwrapped (ParallelPlane plane))
-_Wrapped' = p plane (f plane)
--> p (ParallelPlane plane) (f (ParallelPlane plane))
-p (Unwrapped (ParallelPlane plane))
-  (f (Unwrapped (ParallelPlane plane)))
--> p (ParallelPlane plane) (f (ParallelPlane plane))
-forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
-Iso (ParallelPlane plane) (ParallelPlane plane) plane plane
-coerced
-
--- instance Rewrapped (ParallelPlane plane) plane
-
---------------------------------------------------------------------------------
-
--- | Given a Lower envelope in vertex form, construct the AdjacencyList representation out
--- of it.
---
--- \(O(n\log n)\)
-fromVertexForm          :: forall f plane r. ( Plane_ plane r, Ord plane, Ord r, Fractional r
-                                             , Show plane, Show r
-                                             , Foldable1 f
-                                             )
-                        => f plane -> VertexForm.VertexForm plane -> LowerEnvelope plane
-fromVertexForm :: forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane,
- Show r, Foldable1 f) =>
-f plane -> VertexForm plane -> LowerEnvelope plane
-fromVertexForm f plane
-_hs VertexForm plane
-lEnv
-    | VertexForm plane -> Bool
-forall plane. VertexForm plane -> Bool
-VertexForm.hasVertices VertexForm plane
-lEnv = LowerEnvelope' plane -> LowerEnvelope plane
-forall plane. LowerEnvelope' plane -> LowerEnvelope plane
-ConnectedEnvelope (LowerEnvelope' plane -> LowerEnvelope plane)
--> LowerEnvelope' plane -> LowerEnvelope plane
-forall a b. (a -> b) -> a -> b
-$ VertexForm plane -> LowerEnvelope' plane
-forall plane r.
-(Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane,
- Show r) =>
-VertexForm plane -> LowerEnvelope' plane
-fromVertexForm' VertexForm plane
-lEnv
-    | Bool
-otherwise                   = Set (ParallelPlane plane) -> LowerEnvelope plane
-forall plane. Set (ParallelPlane plane) -> LowerEnvelope plane
-ParallelStrips (Set (ParallelPlane plane) -> LowerEnvelope plane)
--> Set (ParallelPlane plane) -> LowerEnvelope plane
-forall a b. (a -> b) -> a -> b
-$ [ParallelPlane plane] -> Set (ParallelPlane plane)
-forall a. [a] -> Set a
-Set.fromDistinctAscList (NonEmpty (ParallelPlane plane) -> [ParallelPlane plane]
-forall a. NonEmpty a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-F.toList NonEmpty (ParallelPlane plane)
-strips)
-  where
-    strips :: NonEmpty (ParallelPlane plane)
-    strips :: NonEmpty (ParallelPlane plane)
-strips = String -> NonEmpty (ParallelPlane plane)
-forall a. HasCallStack => String -> a
-error String
-"TODO"
-      -- coerce
-      --      $ divideAndConquer1With (mergeAndDiscardBy cmpPlanes) NonEmpty.singleton hs
-
--- withBisectors :: Plane_ plane r
---               => f plane -> Alternating.Alternating Set.Set plane (IntersectionLine r)
--- withBisectors = undefined
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.BruteForce.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.BruteForce.html index 2312d5d17..bca573f1a 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.BruteForce.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.BruteForce.html @@ -20,17 +20,18 @@
import HGeometry.HyperPlane.NonVertical import HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap import HGeometry.Plane.LowerEnvelope.Connected.Regions -import HGeometry.Point - --------------------------------------------------------------------------------- --- * The naive O(n^4) time algorithm. - --- | Computes the lower envelope in O(n^4) time. -bruteForceLowerEnvelope :: ( Plane_ plane r, Ord plane, Ord r, Fractional r - , Foldable set - -- , Show r, Show plane - ) => set plane -> MinimizationDiagram r plane -bruteForceLowerEnvelope :: forall plane r (set :: * -> *). +import HGeometry.Plane.LowerEnvelope.Connected.Type +import HGeometry.Point + +-------------------------------------------------------------------------------- +-- * The naive O(n^4) time algorithm. + +-- | Computes the lower envelope in O(n^4) time. +bruteForceLowerEnvelope :: ( Plane_ plane r, Ord plane, Ord r, Fractional r + , Foldable set + -- , Show r, Show plane + ) => set plane -> MinimizationDiagram r plane +bruteForceLowerEnvelope :: forall plane r (set :: * -> *). (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> MinimizationDiagram r plane bruteForceLowerEnvelope = VertexForm r plane -> MinimizationDiagram r plane @@ -47,17 +48,17 @@ (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane computeVertexForm - --- | Computes the vertices of the lower envelope --- --- O(n^4) time. -computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) - => set plane -> VertexForm r plane -computeVertexForm :: forall plane r (set :: * -> *). + +-- | Computes the vertices of the lower envelope +-- +-- O(n^4) time. +computeVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) + => set plane -> VertexForm r plane +computeVertexForm :: forall plane r (set :: * -> *). (Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) => set plane -> VertexForm r plane -computeVertexForm set plane -planes = (Point 3 r -> Definers plane -> Definers plane -> Definers plane) +computeVertexForm set plane +planes = (Point 3 r -> Definers plane -> Definers plane -> Definers plane) -> [Map (Point 3 r) (Definers plane)] -> Map (Point 3 r) (Definers plane) forall (f :: * -> *) k a. @@ -68,7 +69,7 @@ (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane mergeDefiners - ([Map (Point 3 r) (Definers plane)] + ([Map (Point 3 r) (Definers plane)] -> Map (Point 3 r) (Definers plane)) -> ([Three plane] -> [Map (Point 3 r) (Definers plane)]) -> [Three plane] @@ -82,55 +83,55 @@ (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) => f plane -> Three plane -> Map (Point 3 r) (Definers plane) asVertex set plane -planes) ([Three plane] -> Map (Point 3 r) (Definers plane)) +planes) ([Three plane] -> Map (Point 3 r) (Definers plane)) -> [Three plane] -> Map (Point 3 r) (Definers plane) forall a b. (a -> b) -> a -> b $ set plane -> [Three plane] forall (f :: * -> *) a. Foldable f => f a -> [Three a] uniqueTriplets set plane -planes - -asVertex :: (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) - => f plane -> Three plane -> Map (Point 3 r) (Definers plane) -asVertex :: forall plane r (f :: * -> *). +planes + +asVertex :: (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) + => f plane -> Three plane -> Map (Point 3 r) (Definers plane) +asVertex :: forall plane r (f :: * -> *). (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) => f plane -> Three plane -> Map (Point 3 r) (Definers plane) -asVertex f plane -planes Three plane -defs = case Three plane -> Maybe (Point 3 r, Definers plane) +asVertex f plane +planes Three plane +defs = case Three plane -> Maybe (Point 3 r, Definers plane) forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r, Definers plane) -definers Three plane -defs of - Just (Point 3 r -v,Definers plane -defs') | Point 3 r -v Point 3 r -> f plane -> Bool +definers Three plane +defs of + Just (Point 3 r +v,Definers plane +defs') | Point 3 r +v Point 3 r -> f plane -> Bool forall plane r (f :: * -> *). (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool `belowAll` f plane -planes -> Point 3 r -> Definers plane -> Map (Point 3 r) (Definers plane) +planes -> Point 3 r -> Definers plane -> Map (Point 3 r) (Definers plane) forall k a. k -> a -> Map k a Map.singleton Point 3 r -v Definers plane -defs' - Maybe (Point 3 r, Definers plane) +v Definers plane +defs' + Maybe (Point 3 r, Definers plane) _ -> Map (Point 3 r) (Definers plane) forall k a. Map k a Map.empty - --- | test if v lies below (or on) all the given planes -belowAll :: (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool -belowAll :: forall plane r (f :: * -> *). + +-- | test if v lies below (or on) all the given planes +belowAll :: (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool +belowAll :: forall plane r (f :: * -> *). (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool -belowAll Point 3 r -v = (plane -> Bool) -> f plane -> Bool +belowAll Point 3 r +v = (plane -> Bool) -> f plane -> Bool forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool -all (\plane -h -> Point 3 r -> plane -> Ordering +all (\plane +h -> Point 3 r -> plane -> Ordering forall point. (1 <= 3, Point_ point 3 r, Ord r, Num r) => point -> plane -> Ordering @@ -139,13 +140,13 @@ Ord r, Num r) => point -> hyperPlane -> Ordering verticalSideTest Point 3 r -v plane -h Ordering -> Ordering -> Bool +v plane +h Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool /= Ordering GT) -{-# INLINE belowAll #-} - +{-# INLINE belowAll #-} --------------------------------------------------------------------------------- - \ No newline at end of file + +-------------------------------------------------------------------------------- + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm.html deleted file mode 100644 index fea60688a..000000000 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm.html +++ /dev/null @@ -1,1513 +0,0 @@ -
{-# LANGUAGE UndecidableInstances #-}
---------------------------------------------------------------------------------
--- |
--- Module      :  HGeometry.Plane.LowerEnvelope.FromVertexForm
--- Copyright   :  (C) Frank Staals
--- License     :  see the LICENSE file
--- Maintainer  :  Frank Staals
---
--- A Representation of the Lower envelope of planes in Adjacency-list
--- form.
---
---------------------------------------------------------------------------------
-module HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm
-  ( fromVertexForm'
-  ) where
-
-import           Control.Lens
-import qualified Data.Foldable as F
-import           Data.Foldable1
-import           Data.Function (on)
-import qualified Data.List as List
-import           Data.List.NonEmpty (NonEmpty(..))
-import qualified Data.List.NonEmpty as NonEmpty
-import           Data.Ord (comparing)
-import qualified Data.Sequence as Seq
-import qualified Data.Set as Set
-import qualified Data.Vector as V
-import           Data.Vector.NonEmpty (NonEmptyVector)
-import qualified Data.Vector.NonEmpty as NonEmptyV
-import           HGeometry.Combinatorial.Util
-import           HGeometry.Ext
-import           HGeometry.Foldable.Sort
-import           HGeometry.Foldable.Util
-import           HGeometry.HyperPlane.NonVertical
-import           HGeometry.Line
-import           HGeometry.Plane.LowerEnvelope.Connected.Type
-import           HGeometry.Plane.LowerEnvelope.Type
-import qualified HGeometry.Plane.LowerEnvelope.VertexForm as VertexForm
-import           HGeometry.Point
-import           HGeometry.Properties
-import           HGeometry.Vector
-import qualified HGeometry.Vector as Vec
-import           HGeometry.Vector.NonEmpty.Util ()
-import           Witherable
-
-import           Debug.Trace
-
---------------------------------------------------------------------------------
-
--- | Given a Lower envelope in vertex form, construct the AdjacencyList representation out
--- of it.
---
--- pre: The set of vertices is non-empty
---
--- \(O(n\log n)\)
-fromVertexForm'      :: forall plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r
-                                       , Show plane, Show r
-                                       )
-                     => VertexForm.VertexForm plane -> LowerEnvelope' plane
-fromVertexForm' :: forall plane r.
-(Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane,
- Show r) =>
-VertexForm plane -> LowerEnvelope' plane
-fromVertexForm' VertexForm plane
-lEnv = UnboundedVertex plane
--> Seq (BoundedVertex plane) -> LowerEnvelope' plane
-forall plane.
-UnboundedVertex plane
--> Seq (BoundedVertex plane) -> LowerEnvelope' plane
-LowerEnvelope UnboundedVertex plane
-v0 Seq (BoundedVertex plane)
-boundedVs
-  where
-    v0 :: UnboundedVertex plane
-v0 = Seq (LEEdge plane) -> UnboundedVertex plane
-forall plane. Seq (LEEdge plane) -> UnboundedVertex plane
-UnboundedVertex Seq (LEEdge plane)
-unboundedEdges'
-
-    -- TODO: we may want to sort the edges cyclically around every vertex.
-
-    -- the bounded vertices.
-    boundedVs :: Seq (BoundedVertex plane)
-boundedVs = ((Int, BoundedVertex plane, [IntermediateVertex plane])
- -> NonEmptyVector (Int, LEEdge plane) -> BoundedVertex plane)
--> Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
--> Seq (NonEmptyVector (Int, LEEdge plane))
--> Seq (BoundedVertex plane)
-forall a b c. (a -> b -> c) -> Seq a -> Seq b -> Seq c
-Seq.zipWith ( \(Int
-_,BoundedVertex plane
-v,[IntermediateVertex plane]
-_) NonEmptyVector (Int, LEEdge plane)
-outs -> BoundedVertex plane
-vBoundedVertex plane
--> (BoundedVertex plane -> BoundedVertex plane)
--> BoundedVertex plane
-forall a b. a -> (a -> b) -> b
-&(Seq (LEEdge plane) -> Identity (Seq (LEEdge plane)))
--> BoundedVertex plane -> Identity (BoundedVertex plane)
-forall (f1 :: * -> *) plane (g :: * -> *) (f2 :: * -> *).
-Functor f2 =>
-(f1 (LEEdge plane) -> f2 (g (LEEdge plane)))
--> BoundedVertexF f1 plane -> f2 (BoundedVertexF g plane)
-incidentEdgesB ((Seq (LEEdge plane) -> Identity (Seq (LEEdge plane)))
- -> BoundedVertex plane -> Identity (BoundedVertex plane))
--> Seq (LEEdge plane) -> BoundedVertex plane -> BoundedVertex plane
-forall s t a b. ASetter s t a b -> b -> s -> t
-.~ NonEmptyVector (Int, LEEdge plane) -> Seq (LEEdge plane)
-forall {a} {b}. NonEmptyVector (a, b) -> Seq b
-toSeq NonEmptyVector (Int, LEEdge plane)
-outs
-                            ) Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
-boundedVs' Seq (NonEmptyVector (Int, LEEdge plane))
-boundedEsByOrigin
-
-    toSeq :: NonEmptyVector (a, b) -> Seq b
-toSeq = ((a, b) -> Seq b) -> NonEmptyVector (a, b) -> Seq b
-forall m a. Monoid m => (a -> m) -> NonEmptyVector a -> m
-forall (t :: * -> *) m a.
-(Foldable t, Monoid m) =>
-(a -> m) -> t a -> m
-foldMap (b -> Seq b
-forall a. a -> Seq a
-Seq.singleton (b -> Seq b) -> ((a, b) -> b) -> (a, b) -> Seq b
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (a, b) -> b
-forall a b. (a, b) -> b
-snd)
-
-    -- all edges leaving from bounded vertices, ordered by their VertexIds
-    boundedEsByOrigin :: Seq (NonEmptyVector (Int, LEEdge plane))
-boundedEsByOrigin = [NonEmptyVector (Int, LEEdge plane)]
--> Seq (NonEmptyVector (Int, LEEdge plane))
-forall a. [a] -> Seq a
-Seq.fromList ([NonEmptyVector (Int, LEEdge plane)]
- -> Seq (NonEmptyVector (Int, LEEdge plane)))
--> ([FaceEdges plane] -> [NonEmptyVector (Int, LEEdge plane)])
--> [FaceEdges plane]
--> Seq (NonEmptyVector (Int, LEEdge plane))
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. ((Int, LEEdge plane) -> Int)
--> [(Int, LEEdge plane)] -> [NonEmptyVector (Int, LEEdge plane)]
-forall (f :: * -> *) b a.
-(Foldable f, Ord b) =>
-(a -> b) -> f a -> [NonEmptyVector a]
-groupOnCheap (Int, LEEdge plane) -> Int
-forall a b. (a, b) -> a
-fst ([(Int, LEEdge plane)] -> [NonEmptyVector (Int, LEEdge plane)])
--> ([FaceEdges plane] -> [(Int, LEEdge plane)])
--> [FaceEdges plane]
--> [NonEmptyVector (Int, LEEdge plane)]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (FaceEdges plane -> [(Int, LEEdge plane)])
--> [FaceEdges plane] -> [(Int, LEEdge plane)]
-forall m a. Monoid m => (a -> m) -> [a] -> m
-forall (t :: * -> *) m a.
-(Foldable t, Monoid m) =>
-(a -> m) -> t a -> m
-foldMap FaceEdges plane -> [(Int, LEEdge plane)]
-forall a. NonEmpty a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-F.toList
-                      ([FaceEdges plane] -> Seq (NonEmptyVector (Int, LEEdge plane)))
--> [FaceEdges plane] -> Seq (NonEmptyVector (Int, LEEdge plane))
-forall a b. (a -> b) -> a -> b
-$ [FaceEdges plane]
-allEdges
-
-    -- computes all outgoing edges of all bounded vertices, they are grouped by face
-    allEdges :: [FaceEdges plane]
-    allEdges :: [FaceEdges plane]
-allEdges = ([FaceEdges plane] -> (String, [FaceEdges plane]))
--> [FaceEdges plane] -> [FaceEdges plane]
-forall b a. Show b => (a -> b) -> a -> a
-traceShowWith (String
-"allEdges",) ([FaceEdges plane] -> [FaceEdges plane])
--> ([IntermediateVertex plane] -> [FaceEdges plane])
--> [IntermediateVertex plane]
--> [FaceEdges plane]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-.
-      (NonEmptyVector (IntermediateVertex plane) -> FaceEdges plane)
--> [NonEmptyVector (IntermediateVertex plane)] -> [FaceEdges plane]
-forall a b. (a -> b) -> [a] -> [b]
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-fmap (NonEmptyVector (IntermediateVertex plane) -> FaceEdges plane
-forall plane r.
-(Plane_ plane r, Ord r, Fractional r, Ord plane, Show plane,
- Show r) =>
-NonEmptyVector (IntermediateVertex plane) -> FaceEdges plane
-faceToEdges (NonEmptyVector (IntermediateVertex plane) -> FaceEdges plane)
--> (NonEmptyVector (IntermediateVertex plane)
-    -> NonEmptyVector (IntermediateVertex plane))
--> NonEmptyVector (IntermediateVertex plane)
--> FaceEdges plane
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
-forall plane r.
-(Plane_ plane r, Ord r, Num r, Show plane, Show r) =>
-NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
-sortAlongBoundary)
-             ([NonEmptyVector (IntermediateVertex plane)] -> [FaceEdges plane])
--> ([IntermediateVertex plane]
-    -> [NonEmptyVector (IntermediateVertex plane)])
--> [IntermediateVertex plane]
--> [FaceEdges plane]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (IntermediateVertex plane -> plane)
--> [IntermediateVertex plane]
--> [NonEmptyVector (IntermediateVertex plane)]
-forall (f :: * -> *) b a.
-(Foldable f, Ord b) =>
-(a -> b) -> f a -> [NonEmptyVector a]
-groupOnCheap IntermediateVertex plane -> plane
-forall plane. IntermediateVertex plane -> plane
-definingPlane
-             ([IntermediateVertex plane] -> [FaceEdges plane])
--> [IntermediateVertex plane] -> [FaceEdges plane]
-forall a b. (a -> b) -> a -> b
-$ ((Int, BoundedVertex plane, [IntermediateVertex plane])
- -> [IntermediateVertex plane])
--> Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
--> [IntermediateVertex plane]
-forall m a. Monoid m => (a -> m) -> Seq a -> m
-forall (t :: * -> *) m a.
-(Foldable t, Monoid m) =>
-(a -> m) -> t a -> m
-foldMap ((Int, BoundedVertex plane, [IntermediateVertex plane])
--> Getting
-     [IntermediateVertex plane]
-     (Int, BoundedVertex plane, [IntermediateVertex plane])
-     [IntermediateVertex plane]
--> [IntermediateVertex plane]
-forall s a. s -> Getting a s a -> a
-^.Getting
-  [IntermediateVertex plane]
-  (Int, BoundedVertex plane, [IntermediateVertex plane])
-  [IntermediateVertex plane]
-forall s t a b. Field3 s t a b => Lens s t a b
-Lens
-  (Int, BoundedVertex plane, [IntermediateVertex plane])
-  (Int, BoundedVertex plane, [IntermediateVertex plane])
-  [IntermediateVertex plane]
-  [IntermediateVertex plane]
-_3) Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
-boundedVs'
-
-    -- | construct the unbounded edges, by simply filtering and flipping the
-    -- edges towards infinity.
-    unboundedEdges' :: Seq.Seq (LEEdge plane)
-    unboundedEdges' :: Seq (LEEdge plane)
-unboundedEdges' = ((Int, LEEdge plane) -> Maybe (LEEdge plane))
--> Seq (Int, LEEdge plane) -> Seq (LEEdge plane)
-forall a b. (a -> Maybe b) -> Seq a -> Seq b
-forall (f :: * -> *) a b.
-Filterable f =>
-(a -> Maybe b) -> f a -> f b
-mapMaybe (\(Int
-u, LEEdge plane
-e) -> if LEEdge plane
-eLEEdge plane -> Getting Int (LEEdge plane) Int -> Int
-forall s a. s -> Getting a s a -> a
-^.Getting Int (LEEdge plane) Int
-forall plane (f :: * -> *).
-(Contravariant f, Functor f) =>
-(Int -> f Int) -> LEEdge plane -> f (LEEdge plane)
-destination Int -> Int -> Bool
-forall a. Eq a => a -> a -> Bool
-== Int
-unboundedVertexId
-                                           then LEEdge plane -> Maybe (LEEdge plane)
-forall a. a -> Maybe a
-Just (Int -> LEEdge plane -> LEEdge plane
-forall plane. Int -> LEEdge plane -> LEEdge plane
-flipEdge Int
-u LEEdge plane
-e) else Maybe (LEEdge plane)
-forall a. Maybe a
-Nothing
-                               -- flip every unbounded edge
-                               )
-                    (Seq (Int, LEEdge plane) -> Seq (LEEdge plane))
--> Seq (Int, LEEdge plane) -> Seq (LEEdge plane)
-forall a b. (a -> b) -> a -> b
-$ (FaceEdges plane -> Seq (Int, LEEdge plane))
--> [FaceEdges plane] -> Seq (Int, LEEdge plane)
-forall m a. Monoid m => (a -> m) -> [a] -> m
-forall (t :: * -> *) m a.
-(Foldable t, Monoid m) =>
-(a -> m) -> t a -> m
-foldMap FaceEdges plane -> Seq (Int, LEEdge plane)
-forall (f :: * -> *) (g :: * -> *) a.
-(HasFromFoldable f, Foldable g) =>
-g a -> f a
-forall (g :: * -> *) a. Foldable g => g a -> Seq a
-fromFoldable [FaceEdges plane]
-allEdges
-
-
-    -- | A sequence of bounded vertices, ordered by vertexID, together with a bunch of
-    -- copies; one for each face it will appear on
-    --
-    -- TODO: i guess that in degenerate sitations it could be that there are copies that
-    -- wont actually proudce an edge (i.e. if there is some definer/plane containing the
-    -- vertex, that does not appear on the lower envelope).
-    --
-    boundedVs' :: Seq.Seq ( VertexID, BoundedVertex plane, [IntermediateVertex plane])
-    boundedVs' :: Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
-boundedVs' = IndexedGetting
-  Int
-  (Seq (Int, BoundedVertex plane, [IntermediateVertex plane]))
-  (VertexForm plane)
-  (Point 3 r, Definers plane)
--> (Int
-    -> (Point 3 r, Definers plane)
-    -> Seq (Int, BoundedVertex plane, [IntermediateVertex plane]))
--> VertexForm plane
--> Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
-forall i m s a. IndexedGetting i m s a -> (i -> a -> m) -> s -> m
-ifoldMapOf ((((Point 3 r, Definers plane)
-  -> Indexing
-       (Const
-          (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-       (Point 3 r, Definers plane))
- -> VertexForm plane
- -> Indexing
-      (Const
-         (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-      (VertexForm plane))
--> IndexedGetting
-     Int
-     (Seq (Int, BoundedVertex plane, [IntermediateVertex plane]))
-     (VertexForm plane)
-     (Point 3 r, Definers plane)
-forall (p :: * -> * -> *) a (f :: * -> *) b s t.
-Indexable Int p =>
-((a -> Indexing f b) -> s -> Indexing f t) -> p a (f b) -> s -> f t
-indexing (Indexed
-  (Point 3 r)
-  (Definers plane)
-  (Indexing
-     (Const
-        (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-     (Definers plane))
--> VertexForm plane
--> Indexing
-     (Const
-        (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-     (VertexForm plane)
-Indexed
-  (Point 3 r)
-  (Vertex (VertexForm plane))
-  (Indexing
-     (Const
-        (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-     (Vertex (VertexForm plane)))
--> VertexForm plane
--> Indexing
-     (Const
-        (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-     (VertexForm plane)
-forall plane (p :: * -> * -> *) (f :: * -> *).
-(Indexable (VertexIx (VertexForm plane)) p, Applicative f) =>
-p (Vertex (VertexForm plane)) (f (Vertex (VertexForm plane)))
--> VertexForm plane -> f (VertexForm plane)
-VertexForm.vertices'(Indexed
-   (Point 3 r)
-   (Definers plane)
-   (Indexing
-      (Const
-         (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-      (Definers plane))
- -> VertexForm plane
- -> Indexing
-      (Const
-         (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-      (VertexForm plane))
--> (((Point 3 r, Definers plane)
-     -> Indexing
-          (Const
-             (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-          (Point 3 r, Definers plane))
-    -> Indexed
-         (Point 3 r)
-         (Definers plane)
-         (Indexing
-            (Const
-               (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-            (Definers plane)))
--> ((Point 3 r, Definers plane)
-    -> Indexing
-         (Const
-            (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-         (Point 3 r, Definers plane))
--> VertexForm plane
--> Indexing
-     (Const
-        (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-     (VertexForm plane)
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-.((Point 3 r, Definers plane)
- -> Indexing
-      (Const
-         (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-      (Point 3 r, Definers plane))
--> Indexed
-     (Point 3 r)
-     (Definers plane)
-     (Indexing
-        (Const
-           (Seq (Int, BoundedVertex plane, [IntermediateVertex plane])))
-        (Definers plane))
-forall i (p :: * -> * -> *) (f :: * -> *) s j t.
-(Indexable i p, Functor f) =>
-p (i, s) (f (j, t)) -> Indexed i s (f t)
-withIndex)) Int
--> (Point 3 r, Definers plane)
--> Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
-Int
--> (Point 3 (NumType plane), Definers plane)
--> Seq (Int, BoundedVertex plane, [IntermediateVertex plane])
-forall {f :: * -> *} {plane}.
-Monoid (f (LEEdge plane)) =>
-Int
--> (Point 3 (NumType plane), Set plane)
--> Seq (Int, BoundedVertexF f plane, [IntermediateVertex plane])
-mkVtx VertexForm plane
-lEnv
-
-    mkVtx :: Int
--> (Point 3 (NumType plane), Set plane)
--> Seq (Int, BoundedVertexF f plane, [IntermediateVertex plane])
-mkVtx Int
-i (Point 3 (NumType plane)
-v,Set plane
-defs) = let j :: Int
-j = Int
-iInt -> Int -> Int
-forall a. Num a => a -> a -> a
-+Int
-1
-                       in (Int, BoundedVertexF f plane, [IntermediateVertex plane])
--> Seq (Int, BoundedVertexF f plane, [IntermediateVertex plane])
-forall a. a -> Seq a
-Seq.singleton ( Int
-j
-                                        , Point 3 (NumType plane)
--> Set plane -> f (LEEdge plane) -> BoundedVertexF f plane
-forall (f :: * -> *) plane.
-Point 3 (NumType plane)
--> Set plane -> f (LEEdge plane) -> BoundedVertexF f plane
-Vertex Point 3 (NumType plane)
-v Set plane
-defs f (LEEdge plane)
-forall a. Monoid a => a
-mempty
-                                        , [ plane
--> Int
--> Point 3 (NumType plane)
--> Set plane
--> IntermediateVertex plane
-forall plane.
-plane
--> Int
--> Point 3 (NumType plane)
--> Definers plane
--> IntermediateVertex plane
-Vtx plane
-h Int
-j Point 3 (NumType plane)
-v Set plane
-defs | plane
-h <- Set plane -> [plane]
-forall a. Set a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-F.toList Set plane
-defs ]
-                                        -- TODO: conceivably, we could delete the h from the
-                                        -- defs here already? instead of in the various delete h
-                                        -- cases
-                                        )
-
-{-
--- | Given a bunch of halflines that all share their starting point v,
--- sort them cyclically around the starting point v.
-sortCyclic :: (Foldable f, Plane_ plane r, Ord r, Fractional r)
-           => f (LEEdge plane) -> Seq.Seq (LEEdge plane)
-sortCyclic  = fromFoldable . sortBy @V.Vector cmpAround
-  where
-    cmpAround e1 e2 = ccwCmpAround origin (dir e1) (dir e2)
-    dir e = Point . negated $ edgeIntersectionLine e ^. direction
-    -- these direction vectors all point "inward", we negate them to make sure they are
-    -- pointing outward (towards +infty again).
--}
-
-
--- | For each bounded vertex (represented by their ID) the outgoing halfedge.
-type FaceEdges plane = NonEmpty (VertexID, LEEdge plane)
-
-
--- | Helper type for edgedefs
-data EdgeDefs plane = EdgeDefs { forall plane. EdgeDefs plane -> plane
-common :: plane
-                               , forall plane. EdgeDefs plane -> plane
-uNeigh :: plane
-                               , forall plane. EdgeDefs plane -> plane
-vNeigh :: plane
-                               } deriving (Int -> EdgeDefs plane -> ShowS
-[EdgeDefs plane] -> ShowS
-EdgeDefs plane -> String
-(Int -> EdgeDefs plane -> ShowS)
--> (EdgeDefs plane -> String)
--> ([EdgeDefs plane] -> ShowS)
--> Show (EdgeDefs plane)
-forall plane. Show plane => Int -> EdgeDefs plane -> ShowS
-forall plane. Show plane => [EdgeDefs plane] -> ShowS
-forall plane. Show plane => EdgeDefs plane -> String
-forall a.
-(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
-$cshowsPrec :: forall plane. Show plane => Int -> EdgeDefs plane -> ShowS
-showsPrec :: Int -> EdgeDefs plane -> ShowS
-$cshow :: forall plane. Show plane => EdgeDefs plane -> String
-show :: EdgeDefs plane -> String
-$cshowList :: forall plane. Show plane => [EdgeDefs plane] -> ShowS
-showList :: [EdgeDefs plane] -> ShowS
-Show,EdgeDefs plane -> EdgeDefs plane -> Bool
-(EdgeDefs plane -> EdgeDefs plane -> Bool)
--> (EdgeDefs plane -> EdgeDefs plane -> Bool)
--> Eq (EdgeDefs plane)
-forall plane. Eq plane => EdgeDefs plane -> EdgeDefs plane -> Bool
-forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
-$c== :: forall plane. Eq plane => EdgeDefs plane -> EdgeDefs plane -> Bool
-== :: EdgeDefs plane -> EdgeDefs plane -> Bool
-$c/= :: forall plane. Eq plane => EdgeDefs plane -> EdgeDefs plane -> Bool
-/= :: EdgeDefs plane -> EdgeDefs plane -> Bool
-Eq)
-
--- | Given a plane h, and vertices u (with its definers), and v (with its definers) that
--- define an edge of h, computes:
---
--- - plane h' that is on the other side of the edge from u to v,
--- - the plane hu incident only to u that is adjacent to h, and
--- - the plane hv incident only to v that is adjacent to h.
-extractEdgeDefs                   :: (Ord plane
-                                     , Show plane, Show r
-                                     )
-                                  => plane
-                                  -> Point 3 r -> VertexForm.Definers plane
-                                  -> Point 3 r -> VertexForm.Definers plane
-                                  -> Maybe (EdgeDefs plane)
-extractEdgeDefs :: forall plane r.
-(Ord plane, Show plane, Show r) =>
-plane
--> Point 3 r
--> Definers plane
--> Point 3 r
--> Definers plane
--> Maybe (EdgeDefs plane)
-extractEdgeDefs plane
-h Point 3 r
-u Definers plane
-uDefs Point 3 r
-v Definers plane
-vDefs
-  -- | traceShow ("extractEdgeDefs",h,u,uDefs,v,vDefs) False = undefined
-  -- | otherwise
-  = case ([plane] -> (String, [plane])) -> [plane] -> [plane]
-forall b a. Show b => (a -> b) -> a -> a
-traceShowWith (String
-"commons",) [plane]
-commons of
-    []   -> Maybe (EdgeDefs plane)
-forall a. Maybe a
-Nothing
-    [plane
-h'] -> EdgeDefs plane -> Maybe (EdgeDefs plane)
-forall a. a -> Maybe a
-Just (EdgeDefs plane -> Maybe (EdgeDefs plane))
--> EdgeDefs plane -> Maybe (EdgeDefs plane)
-forall a b. (a -> b) -> a -> b
-$ plane -> plane -> plane -> EdgeDefs plane
-forall plane. plane -> plane -> plane -> EdgeDefs plane
-EdgeDefs plane
-h' plane
-hu plane
-hv
-    [plane]
-_    -> String -> Maybe (EdgeDefs plane)
-forall a. HasCallStack => String -> a
-error String
-"extractEdgeDefs: unhandled degeneracy. u and v have >2 planes in common."
-  where
-    commons :: [plane]
-commons = Definers plane -> [plane]
-forall a. Set a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-F.toList (Definers plane -> [plane]) -> Definers plane -> [plane]
-forall a b. (a -> b) -> a -> b
-$ plane -> Definers plane -> Definers plane
-forall a. Ord a => a -> Set a -> Set a
-Set.delete plane
-h --- $ traceShowWith ("udefs intersect vDefs",)
-              (Definers plane
-uDefs Definers plane -> Definers plane -> Definers plane
-forall a. Ord a => Set a -> Set a -> Set a
-`Set.intersection` Definers plane
-vDefs)
-    uOnlies :: [plane]
-uOnlies = Definers plane -> [plane]
-forall a. Set a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-F.toList (Definers plane -> [plane]) -> Definers plane -> [plane]
-forall a b. (a -> b) -> a -> b
-$ Definers plane
-uDefs Definers plane -> Definers plane -> Definers plane
-forall a. Ord a => Set a -> Set a -> Set a
-Set.\\ Definers plane
-vDefs
-    vOnlies :: [plane]
-vOnlies = Definers plane -> [plane]
-forall a. Set a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-F.toList (Definers plane -> [plane]) -> Definers plane -> [plane]
-forall a b. (a -> b) -> a -> b
-$ Definers plane
-vDefs Definers plane -> Definers plane -> Definers plane
-forall a. Ord a => Set a -> Set a -> Set a
-Set.\\ Definers plane
-uDefs
-
-    hu :: plane
-hu = Point 3 r -> [plane] -> plane
-from' Point 3 r
-u [plane]
-uOnlies
-    hv :: plane
-hv = Point 3 r -> [plane] -> plane
-from' Point 3 r
-v [plane]
-vOnlies
-
-    from' :: Point 3 r -> [plane] -> plane
-from' Point 3 r
-x [plane]
-hss
-      |(String, Point 3 r, [plane]) -> Bool -> Bool
-forall a b. Show a => a -> b -> b
-traceShow (String
-"from'",Point 3 r
-x,[plane]
-hss) Bool
-False = plane
-forall a. HasCallStack => a
-undefined
-      | Bool
-otherwise
-      = case [plane]
-hss of
-      []   -> String -> plane
-forall a. HasCallStack => String -> a
-error String
-"extractEdgeDefs: absurd, too few definers"
-      [plane
-h'] -> plane
-h'
-      [plane]
-_hs  -> String -> plane
-forall a. HasCallStack => String -> a
-error (String -> plane) -> String -> plane
-forall a b. (a -> b) -> a -> b
-$ String
-"extractEdgeDefs: unhandled degeneracy. More than 3 planes at a vertex. "
-                     String -> ShowS
-forall a. Semigroup a => a -> a -> a
-<> (String, plane, Point 3 r, Point 3 r, [plane], [plane]) -> String
-forall a. Show a => a -> String
-show (String
-"extractEdgeDefs",plane
-h,Point 3 r
-u,Point 3 r
-v,[plane]
-uOnlies,[plane]
-vOnlies)
-             -- TODO we should either the neighbor of h in the order around the given
-             -- vertex here.
-
---------------------------------------------------------------------------------
-
--- | Intermediate representation of a vertex.
-data IntermediateVertex plane = Vtx { forall plane. IntermediateVertex plane -> plane
-definingPlane :: !plane
-                                    , forall plane. IntermediateVertex plane -> Int
-ivId          :: {-# UNPACK #-} !VertexID
-                                    , forall plane. IntermediateVertex plane -> Point 3 (NumType plane)
-ivLoc         :: !(Point 3 (NumType plane))
-                                    , forall plane. IntermediateVertex plane -> Definers plane
-_ivDefs       :: VertexForm.Definers plane
-                                    }
-
---------------------------------------------------------------------------------
-
--- | Sort the vertices of a (convex) face in counter clockwise order around its
--- boundary.
---
--- running time: \(O(n \log n)\)
-sortAlongBoundary      :: forall plane r. (Plane_ plane r, Ord r, Num r
-                                          , Show plane, Show r
-                                          )
-                       => NonEmptyVector (IntermediateVertex plane)
-                       -> NonEmptyVector (IntermediateVertex plane)
-sortAlongBoundary :: forall plane r.
-(Plane_ plane r, Ord r, Num r, Show plane, Show r) =>
-NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
-sortAlongBoundary NonEmptyVector (IntermediateVertex plane)
-face = case Maybe (IntermediateVertex plane)
-mv0 of
-    Maybe (IntermediateVertex plane)
-Nothing             -> NonEmptyVector (IntermediateVertex plane)
-face -- already sorted, since there is only one vertex
-    Just (Vtx plane
-_ Int
-_ Point 3 (NumType plane)
-v0 Definers plane
-_) -> Vector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
-forall a. Vector a -> NonEmptyVector a
-NonEmptyV.unsafeFromVector (Vector (IntermediateVertex plane)
- -> NonEmptyVector (IntermediateVertex plane))
--> Vector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
-forall a b. (a -> b) -> a -> b
-$ (IntermediateVertex plane -> IntermediateVertex plane -> Ordering)
--> NonEmptyVector (IntermediateVertex plane)
--> Vector (IntermediateVertex plane)
-forall (vector :: * -> *) (f :: * -> *) a.
-(Foldable f, Vector vector a) =>
-(a -> a -> Ordering) -> f a -> vector a
-sortBy (Vector 3 r
--> IntermediateVertex plane -> IntermediateVertex plane -> Ordering
-cmpAround (Vector 3 r
- -> IntermediateVertex plane
- -> IntermediateVertex plane
- -> Ordering)
--> Vector 3 r
--> IntermediateVertex plane
--> IntermediateVertex plane
--> Ordering
-forall a b. (a -> b) -> a -> b
-$ Point 3 r
-Point 3 (NumType plane)
-v1 Point 3 r -> Point 3 r -> Vector 3 r
-forall point (d :: Nat) r.
-(Affine_ point d r, Num r) =>
-point -> point -> Vector d r
-.-. Point 3 r
-Point 3 (NumType plane)
-v0) NonEmptyVector (IntermediateVertex plane)
-face
-    -- TODO: I guess that in degenerate situations, there now may be consecutive
-    -- points (vertices) at the same location. We should group those and get rid of them?
-  where
-    -- we find the leftmost vertex v1 of the face (pick the lexicographically smallest
-    -- when there are multiple), and then compute its predecessor v0 in the order along
-    -- the boundary of the face (i.e. we find the point v for which the line through v1
-    -- and v has maximum slope).
-
-    -- To get the list of vertices in CCW order along the face, we then sort the vertices
-    -- around v1
-    Vtx plane
-_ Int
-iv1 Point 3 (NumType plane)
-v1 Definers plane
-_ = (IntermediateVertex plane -> IntermediateVertex plane -> Ordering)
--> NonEmptyVector (IntermediateVertex plane)
--> IntermediateVertex plane
-forall (t :: * -> *) a.
-Foldable1 t =>
-(a -> a -> Ordering) -> t a -> a
-minimumBy ((IntermediateVertex plane -> Point 3 r)
--> IntermediateVertex plane -> IntermediateVertex plane -> Ordering
-forall a b. Ord a => (b -> a) -> b -> b -> Ordering
-comparing IntermediateVertex plane -> Point 3 r
-IntermediateVertex plane -> Point 3 (NumType plane)
-forall plane. IntermediateVertex plane -> Point 3 (NumType plane)
-ivLoc) NonEmptyVector (IntermediateVertex plane)
-face
-    v1' :: Point 2 r
-v1' = Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint Point 3 r
-Point 3 (NumType plane)
-v1
-    -- its predecessor v0, if it exists
-    mv0 :: Maybe (IntermediateVertex plane)
-    mv0 :: Maybe (IntermediateVertex plane)
-mv0 = (IntermediateVertex plane
- -> Maybe (IntermediateVertex plane)
- -> Maybe (IntermediateVertex plane))
--> Maybe (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
--> Maybe (IntermediateVertex plane)
-forall a b. (a -> b -> b) -> b -> NonEmptyVector a -> b
-forall (t :: * -> *) a b.
-Foldable t =>
-(a -> b -> b) -> b -> t a -> b
-foldr IntermediateVertex plane
--> Maybe (IntermediateVertex plane)
--> Maybe (IntermediateVertex plane)
-findPred Maybe (IntermediateVertex plane)
-forall a. Maybe a
-Nothing NonEmptyVector (IntermediateVertex plane)
-face
-    findPred :: IntermediateVertex plane
--> Maybe (IntermediateVertex plane)
--> Maybe (IntermediateVertex plane)
-findPred IntermediateVertex plane
-v Maybe (IntermediateVertex plane)
-acc
-      | IntermediateVertex plane -> Int
-forall plane. IntermediateVertex plane -> Int
-ivId IntermediateVertex plane
-v Int -> Int -> Bool
-forall a. Eq a => a -> a -> Bool
-== Int
-iv1 = Maybe (IntermediateVertex plane)
-acc -- skip v1 itself
-      | Bool
-otherwise = IntermediateVertex plane -> Maybe (IntermediateVertex plane)
-forall a. a -> Maybe a
-Just (IntermediateVertex plane -> Maybe (IntermediateVertex plane))
--> IntermediateVertex plane -> Maybe (IntermediateVertex plane)
-forall a b. (a -> b) -> a -> b
-$ case Maybe (IntermediateVertex plane)
-acc of
-                             Maybe (IntermediateVertex plane)
-Nothing -> IntermediateVertex plane
-v -- anything is better than nothing
-                             Just IntermediateVertex plane
-u  -> (IntermediateVertex plane -> IntermediateVertex plane -> Ordering)
--> IntermediateVertex plane
--> IntermediateVertex plane
--> IntermediateVertex plane
-forall t. (t -> t -> Ordering) -> t -> t -> t
-maxBy IntermediateVertex plane -> IntermediateVertex plane -> Ordering
-cmpSlope' IntermediateVertex plane
-u IntermediateVertex plane
-v
-
-    cmpSlope'     :: IntermediateVertex plane -> IntermediateVertex plane -> Ordering
-    cmpSlope' :: IntermediateVertex plane -> IntermediateVertex plane -> Ordering
-cmpSlope' IntermediateVertex plane
-u IntermediateVertex plane
-v = case Point 2 r -> Point 2 r -> Point 2 r -> CCW
-forall point r point' point''.
-(Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r,
- Ord r) =>
-point -> point' -> point'' -> CCW
-ccw Point 2 r
-v1' (Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint (Point 3 r -> Point 2 r) -> Point 3 r -> Point 2 r
-forall a b. (a -> b) -> a -> b
-$ IntermediateVertex plane -> Point 3 (NumType plane)
-forall plane. IntermediateVertex plane -> Point 3 (NumType plane)
-ivLoc IntermediateVertex plane
-u) (Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint (Point 3 r -> Point 2 r) -> Point 3 r -> Point 2 r
-forall a b. (a -> b) -> a -> b
-$ IntermediateVertex plane -> Point 3 (NumType plane)
-forall plane. IntermediateVertex plane -> Point 3 (NumType plane)
-ivLoc IntermediateVertex plane
-v) of
-                      CCW
-CCW      -> Ordering
-GT
-                      CCW
-CW       -> Ordering
-LT
-                      CCW
-CoLinear -> Ordering
-EQ
-
-    -- | sort the vertices around the direction wrt. (the downward projection of) w
-    cmpAround :: Vector 3 r -> IntermediateVertex plane -> IntermediateVertex plane -> Ordering
-    cmpAround :: Vector 3 r
--> IntermediateVertex plane -> IntermediateVertex plane -> Ordering
-cmpAround Vector 3 r
-w IntermediateVertex plane
-u IntermediateVertex plane
-v =
-        Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering
-forall center r point.
-(Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
-Vector 2 r -> center -> point -> point -> Ordering
-ccwCmpAroundWith (Vector 3 r -> Vector 2 r
-forall (i :: Nat) (d :: Nat) vector vector' r.
-(i <= d, Vector_ vector d r, Vector_ vector' i r) =>
-vector -> vector'
-Vec.prefix Vector 3 r
-w) Point 2 r
-v1' Point 2 r
-u' Point 2 r
-v' Ordering -> Ordering -> Ordering
-forall a. Semigroup a => a -> a -> a
-<> Point 2 r -> Point 2 r -> Point 2 r -> Ordering
-forall r point (d :: Nat) center.
-(Ord r, Num r, Point_ point d r, Point_ center d r,
- Metric_ (Vector d r) d r) =>
-center -> point -> point -> Ordering
-cmpByDistanceTo Point 2 r
-v1' Point 2 r
-u' Point 2 r
-v'
-      where
-        u' :: Point 2 r
-u' = Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint (Point 3 r -> Point 2 r) -> Point 3 r -> Point 2 r
-forall a b. (a -> b) -> a -> b
-$ IntermediateVertex plane -> Point 3 (NumType plane)
-forall plane. IntermediateVertex plane -> Point 3 (NumType plane)
-ivLoc IntermediateVertex plane
-u
-        v' :: Point 2 r
-v' = Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint (Point 3 r -> Point 2 r) -> Point 3 r -> Point 2 r
-forall a b. (a -> b) -> a -> b
-$ IntermediateVertex plane -> Point 3 (NumType plane)
-forall plane. IntermediateVertex plane -> Point 3 (NumType plane)
-ivLoc IntermediateVertex plane
-v
-
--- | given the vertices of the face in CCW order, compute all its edges of the face.
-faceToEdges       :: forall plane r. (Plane_ plane r, Ord r, Fractional r, Ord plane
-                                     , Show plane, Show r
-                                     )
-                   => NonEmptyVector (IntermediateVertex plane) -> FaceEdges plane
-faceToEdges :: forall plane r.
-(Plane_ plane r, Ord r, Fractional r, Ord plane, Show plane,
- Show r) =>
-NonEmptyVector (IntermediateVertex plane) -> FaceEdges plane
-faceToEdges NonEmptyVector (IntermediateVertex plane)
-faceV = case NonEmptyVector (IntermediateVertex plane)
--> NonEmpty (IntermediateVertex plane)
-forall a. NonEmptyVector a -> NonEmpty a
-forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a
-toNonEmpty NonEmptyVector (IntermediateVertex plane)
-faceV of
-                      IntermediateVertex plane
-u :| []  -> IntermediateVertex plane -> FaceEdges plane
-forall plane r.
-(Plane_ plane r, Ord r, Fractional r, Ord plane, Show plane,
- Show r) =>
-IntermediateVertex plane -> FaceEdges plane
-oneVertex IntermediateVertex plane
-u
-                      IntermediateVertex plane
-u :| [IntermediateVertex plane
-v] -> IntermediateVertex plane
--> IntermediateVertex plane -> FaceEdges plane
-forall plane r.
-(Plane_ plane r, Ord r, Fractional r, Ord plane, Show plane,
- Show r) =>
-IntermediateVertex plane
--> IntermediateVertex plane -> FaceEdges plane
-twoVertices IntermediateVertex plane
-u IntermediateVertex plane
-v
-                      NonEmpty (IntermediateVertex plane)
-_        -> NonEmptyVector (Int, LEEdge plane) -> FaceEdges plane
-forall a. NonEmptyVector a -> NonEmpty a
-forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a
-toNonEmpty (NonEmptyVector (Int, LEEdge plane) -> FaceEdges plane)
--> NonEmptyVector (Int, LEEdge plane) -> FaceEdges plane
-forall a b. (a -> b) -> a -> b
-$ NonEmptyVector (Int, LEEdge plane)
-manyVertices
-  where
-    manyVertices :: NonEmptyVector (Int, LEEdge plane)
-manyVertices = (IntermediateVertex plane
- -> IntermediateVertex plane
- -> IntermediateVertex plane
- -> (Int, LEEdge plane))
--> NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (Int, LEEdge plane)
-forall a b c d.
-(a -> b -> c -> d)
--> NonEmptyVector a
--> NonEmptyVector b
--> NonEmptyVector c
--> NonEmptyVector d
-NonEmptyV.zipWith3 IntermediateVertex plane
--> IntermediateVertex plane
--> IntermediateVertex plane
--> (Int, LEEdge plane)
-forall {plane}.
-(Ord plane, Show plane, Show (NumType plane)) =>
-IntermediateVertex plane
--> IntermediateVertex plane
--> IntermediateVertex plane
--> (Int, LEEdge plane)
-mkEdge (Int
--> NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
-forall v. Int -> NonEmptyVector v -> NonEmptyVector v
-shiftR (-Int
-1) NonEmptyVector (IntermediateVertex plane)
-faceV) NonEmptyVector (IntermediateVertex plane)
-faceV (Int
--> NonEmptyVector (IntermediateVertex plane)
--> NonEmptyVector (IntermediateVertex plane)
-forall v. Int -> NonEmptyVector v -> NonEmptyVector v
-shiftR Int
-1 NonEmptyVector (IntermediateVertex plane)
-faceV)
-
-    mkEdge :: IntermediateVertex plane
--> IntermediateVertex plane
--> IntermediateVertex plane
--> (Int, LEEdge plane)
-mkEdge (Vtx plane
-_ Int
-_ Point 3 (NumType plane)
-up Definers plane
-uDefs) (Vtx plane
-h Int
-vIdx Point 3 (NumType plane)
-vp Definers plane
-vDefs) (Vtx plane
-_ Int
-wIdx Point 3 (NumType plane)
-wp Definers plane
-wDefs) =
-      case plane
--> Point 3 (NumType plane)
--> Definers plane
--> Point 3 (NumType plane)
--> Definers plane
--> Maybe (EdgeDefs plane)
-forall plane r.
-(Ord plane, Show plane, Show r) =>
-plane
--> Point 3 r
--> Definers plane
--> Point 3 r
--> Definers plane
--> Maybe (EdgeDefs plane)
-extractEdgeDefs plane
-h Point 3 (NumType plane)
-vp Definers plane
-vDefs Point 3 (NumType plane)
-wp Definers plane
-wDefs of
-        Maybe (EdgeDefs plane)
-Nothing -> -- vw are separated by the unbounded vertex
-                    case plane
--> Point 3 (NumType plane)
--> Definers plane
--> Point 3 (NumType plane)
--> Definers plane
--> Maybe (EdgeDefs plane)
-forall plane r.
-(Ord plane, Show plane, Show r) =>
-plane
--> Point 3 r
--> Definers plane
--> Point 3 r
--> Definers plane
--> Maybe (EdgeDefs plane)
-extractEdgeDefs plane
-h Point 3 (NumType plane)
-up Definers plane
-uDefs Point 3 (NumType plane)
-vp Definers plane
-vDefs of
-                      Maybe (EdgeDefs plane)
-Nothing                    ->
-                        String -> (Int, LEEdge plane)
-forall a. HasCallStack => String -> a
-error String
-"mkEdge: absurd, u and v don't share a plane!?"
-                      Just (EdgeDefs plane
-_hUV plane
-_hu plane
-hv) -> (Int
-vIdx, Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-unboundedVertexId plane
-h plane
-hv)
-        Just (EdgeDefs plane
-hVW plane
-_ plane
-_) -> (Int
-vIdx, Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-wIdx plane
-h plane
-hVW)
-      -- the main idea is that every pair of subsequent bounded vertices necessarily has
-      -- exactly one defining plane, except for when two bounded vertices are separted by
-      -- the vertex at infinity.
-
-
--- | compute the face edges of the face of h, when v is the only vertex incident to h.
-oneVertex                  :: (Plane_ plane r, Ord r, Fractional r, Ord plane
-                              , Show plane, Show r
-                              )
-                           => IntermediateVertex plane -> FaceEdges plane
-oneVertex :: forall plane r.
-(Plane_ plane r, Ord r, Fractional r, Ord plane, Show plane,
- Show r) =>
-IntermediateVertex plane -> FaceEdges plane
-oneVertex (Vtx plane
-h Int
-i Point 3 (NumType plane)
-v Definers plane
-defs) = case [Either plane plane] -> [Either plane plane]
-forall a. Ord a => [a] -> [a]
-List.sort [Either plane plane]
-outgoingEdges of
-    [ Left plane
-_hPred, Right plane
-hSucc ] -> (Int, LEEdge plane) -> FaceEdges plane
-forall a. a -> NonEmpty a
-NonEmpty.singleton (Int
-i, Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-unboundedVertexId plane
-h plane
-hSucc)
-    [Either plane plane]
-_ -> String -> FaceEdges plane
-forall a. HasCallStack => String -> a
-error String
-"oneVertex. absurd. Other than a single Left, and Right"
-  where
-    otherPlanes :: Definers plane
-otherPlanes = plane -> Definers plane -> Definers plane
-forall a. Ord a => a -> Set a -> Set a
-Set.delete plane
-h Definers plane
-defs
-    -- | Tries to compute all outgoing edges involving h. Since every plane h appears
-    -- exactly once in the order around v, this should produce exactly two edges; one
-    -- left and one right.
-    outgoingEdges :: [Either plane plane]
-outgoingEdges = (plane -> [Either plane plane])
--> Definers plane -> [Either plane plane]
-forall m a. Monoid m => (a -> m) -> Set a -> m
-forall (t :: * -> *) m a.
-(Foldable t, Monoid m) =>
-(a -> m) -> t a -> m
-foldMap (\plane
-h' -> let rest :: NonEmpty plane
-rest = Definers plane -> NonEmpty plane
-forall {t :: * -> *} {a}. Foldable t => t a -> NonEmpty a
-toNonEmpty' (Definers plane -> NonEmpty plane)
--> Definers plane -> NonEmpty plane
-forall a b. (a -> b) -> a -> b
-$ plane -> Definers plane -> Definers plane
-forall a. Ord a => a -> Set a -> Set a
-Set.delete plane
-h' Definers plane
-otherPlanes
-                                    in case Point 3 r
--> Two plane
--> NonEmpty plane
--> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane)
-forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f) =>
-Point 3 r
--> Two plane
--> f plane
--> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane)
-outgoingUnboundedEdge Point 3 r
-Point 3 (NumType plane)
-v (plane -> plane -> Two plane
-forall a. a -> a -> Two a
-Two plane
-h plane
-h') NonEmpty plane
-rest of
-                                         Just HalfLine (Point 2 r) :+ EdgeDefiners plane
-e  -> [ EdgeDefiners plane -> Either plane plane
-tagOtherPlane (EdgeDefiners plane -> Either plane plane)
--> EdgeDefiners plane -> Either plane plane
-forall a b. (a -> b) -> a -> b
-$ HalfLine (Point 2 r) :+ EdgeDefiners plane
-e(HalfLine (Point 2 r) :+ EdgeDefiners plane)
--> Getting
-     (EdgeDefiners plane)
-     (HalfLine (Point 2 r) :+ EdgeDefiners plane)
-     (EdgeDefiners plane)
--> EdgeDefiners plane
-forall s a. s -> Getting a s a -> a
-^.Getting
-  (EdgeDefiners plane)
-  (HalfLine (Point 2 r) :+ EdgeDefiners plane)
-  (EdgeDefiners plane)
-forall core extra extra' (f :: * -> *).
-Functor f =>
-(extra -> f extra') -> (core :+ extra) -> f (core :+ extra')
-extra ]
-                                         Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane)
-Nothing -> []
-                            ) Definers plane
-otherPlanes
-    tagOtherPlane :: EdgeDefiners plane -> Either plane plane
-tagOtherPlane (EdgeDefiners plane
-hl plane
-hr) = if plane
-h plane -> plane -> Bool
-forall a. Eq a => a -> a -> Bool
-== plane
-hl then plane -> Either plane plane
-forall a b. b -> Either a b
-Right plane
-hr else plane -> Either plane plane
-forall a b. a -> Either a b
-Left plane
-hl
-    toNonEmpty' :: t a -> NonEmpty a
-toNonEmpty' t a
-s = case [a] -> Maybe (NonEmpty a)
-forall a. [a] -> Maybe (NonEmpty a)
-NonEmpty.nonEmpty ([a] -> Maybe (NonEmpty a)) -> [a] -> Maybe (NonEmpty a)
-forall a b. (a -> b) -> a -> b
-$ t a -> [a]
-forall a. t a -> [a]
-forall (t :: * -> *) a. Foldable t => t a -> [a]
-F.toList t a
-s of
-                      Just NonEmpty a
-xs -> NonEmpty a
-xs
-                      Maybe (NonEmpty a)
-_       -> String -> NonEmpty a
-forall a. HasCallStack => String -> a
-error String
-"oneVertex. Absurd, there should be at least 3 definers"
-
--- | Compute the edges of the face incident to h, when there are only two vertices
--- incident to that face.
---
--- more or less a special case of the manyVertices scenario, in which we don't know
--- the if edge should be oriented from u to v or from v to u.
-twoVertices  :: (Plane_ plane r, Ord r, Fractional r, Ord plane
-                , Show plane, Show r
-                )
-             => IntermediateVertex plane -> IntermediateVertex plane -> FaceEdges plane
-twoVertices :: forall plane r.
-(Plane_ plane r, Ord r, Fractional r, Ord plane, Show plane,
- Show r) =>
-IntermediateVertex plane
--> IntermediateVertex plane -> FaceEdges plane
-twoVertices (Vtx plane
-h Int
-ui Point 3 (NumType plane)
-up Definers plane
-uDefs) (Vtx plane
-_ Int
-vi Point 3 (NumType plane)
-vp Definers plane
-vDefs) =
-  case plane
--> Point 3 r
--> Definers plane
--> Point 3 r
--> Definers plane
--> Maybe (EdgeDefs plane)
-forall plane r.
-(Ord plane, Show plane, Show r) =>
-plane
--> Point 3 r
--> Definers plane
--> Point 3 r
--> Definers plane
--> Maybe (EdgeDefs plane)
-extractEdgeDefs plane
-h Point 3 r
-Point 3 (NumType plane)
-up Definers plane
-uDefs Point 3 r
-Point 3 (NumType plane)
-vp Definers plane
-vDefs Maybe (EdgeDefs plane)
--> (EdgeDefs plane -> Maybe (EdgeDefs plane, Bool))
--> Maybe (EdgeDefs plane, Bool)
-forall a b. Maybe a -> (a -> Maybe b) -> Maybe b
-forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
->>= EdgeDefs plane -> Maybe (EdgeDefs plane, Bool)
-withUVOrder of
-      Maybe (EdgeDefs plane, Bool)
-Nothing  -> String -> FaceEdges plane
-forall a. HasCallStack => String -> a
-error String
-"twoVertices. absurd, h and h' don't define an edge!?"
-      Just (EdgeDefs plane
-hr plane
-hu plane
-hv, Bool
-uBeforeV) -- -> traceShowWith ("twoVertices",u,v,uBeforeV,) $
-        | Bool
-uBeforeV  -> [(Int, LEEdge plane)] -> FaceEdges plane
-forall a. HasCallStack => [a] -> NonEmpty a
-NonEmpty.fromList [ (Int
-vi, Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-ui                plane
-h plane
-hr)
-                                         , (Int
-ui, Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-unboundedVertexId plane
-h plane
-hu)
-                                         ]
-                      -- the edge must be oriented from v to u so that h is on the left
-        | Bool
-otherwise -> [(Int, LEEdge plane)] -> FaceEdges plane
-forall a. HasCallStack => [a] -> NonEmpty a
-NonEmpty.fromList [ (Int
-ui, Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-vi                plane
-h plane
-hr)
-                                         , (Int
-vi, Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-unboundedVertexId plane
-h plane
-hv)
-                                         ]
-                       -- the edge must be oriented from u to v
-  where
-    -- determine if u lies before v in the order of u and v along the intersection line of
-    -- h and hr.
-    withUVOrder :: EdgeDefs plane -> Maybe (EdgeDefs plane, Bool)
-withUVOrder e :: EdgeDefs plane
-e@(EdgeDefs plane
-hr plane
-_ plane
-_) =
-      ( \LinePV 2 r
-l -> let m :: LinePV 2 r
-m = LinePV 2 r -> LinePV 2 r
-forall r. Num r => LinePV 2 r -> LinePV 2 r
-perpendicularTo LinePV 2 r
-l LinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r
-forall a b. a -> (a -> b) -> b
-&(Point 2 r -> Identity (Point 2 r))
--> LinePV 2 r -> Identity (LinePV 2 r)
-forall (d :: Nat) r (f :: * -> *).
-Functor f =>
-(Point d r -> f (Point d r)) -> LinePV d r -> f (LinePV d r)
-anchorPoint ((Point 2 r -> Identity (Point 2 r))
- -> LinePV 2 r -> Identity (LinePV 2 r))
--> Point 2 r -> LinePV 2 r -> LinePV 2 r
-forall s t a b. ASetter s t a b -> b -> s -> t
-.~ Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint Point 3 r
-Point 3 (NumType plane)
-up
-              in (EdgeDefs plane
-e, Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint Point 3 r
-Point 3 (NumType plane)
-vp Point 2 r -> LinePV 2 r -> SideTest
-forall r point.
-(Ord r, Num r, Point_ point 2 r) =>
-point -> LinePV 2 r -> SideTest
-`onSide` LinePV 2 r
-m SideTest -> SideTest -> Bool
-forall a. Eq a => a -> a -> Bool
-/= SideTest
-LeftSide)
-              -- if v lies on the left it lies further along commonLine. So u lies before
-              -- v if v does not lie in the left haflpalne
-      ) (LinePV 2 r -> (EdgeDefs plane, Bool))
--> Maybe (LinePV 2 r) -> Maybe (EdgeDefs plane, Bool)
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-<$> plane -> plane -> Maybe (LinePV 2 r)
-forall plane r.
-(Plane_ plane r, Ord r, Fractional r) =>
-plane -> plane -> Maybe (LinePV 2 r)
-intersectionLine' plane
-h plane
-hr
-
---------------------------------------------------------------------------------
--- * Convenience functions
-
--- | Group consecutive elements into non-empty groups.
---
---
--- running time: \(O(n\log n)\)
---
--- >>> groupOnCheap fst [ (1,"foo"), (2,"bar"), (2,"blaa"), (1,"boeez"), (1,"blap"), (4,"blax"), (4,"bleh"), (100,"floep")]
--- [[(1,"foo"),(1,"boeez"),(1,"blap")],[(2,"bar"),(2,"blaa")],[(4,"blax"),(4,"bleh")],[(100,"floep")]]
-groupOnCheap  :: (Foldable f, Ord b)
-              => (a -> b) -> f a -> [NonEmptyV.NonEmptyVector a]
-groupOnCheap :: forall (f :: * -> *) b a.
-(Foldable f, Ord b) =>
-(a -> b) -> f a -> [NonEmptyVector a]
-groupOnCheap a -> b
-f = (Vector a -> NonEmptyVector a) -> [Vector a] -> [NonEmptyVector a]
-forall a b. (a -> b) -> [a] -> [b]
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-fmap Vector a -> NonEmptyVector a
-forall a. Vector a -> NonEmptyVector a
-NonEmptyV.unsafeFromVector ([Vector a] -> [NonEmptyVector a])
--> (f a -> [Vector a]) -> f a -> [NonEmptyVector a]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (a -> a -> Bool) -> Vector a -> [Vector a]
-forall a. (a -> a -> Bool) -> Vector a -> [Vector a]
-V.groupBy (b -> b -> Bool
-forall a. Eq a => a -> a -> Bool
-(==) (b -> b -> Bool) -> (a -> b) -> a -> a -> Bool
-forall b c a. (b -> b -> c) -> (a -> b) -> a -> a -> c
-`on` a -> b
-f) (Vector a -> [Vector a]) -> (f a -> Vector a) -> f a -> [Vector a]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (a -> b) -> f a -> Vector a
-forall (vector :: * -> *) (f :: * -> *) a b.
-(Foldable f, Vector vector a, Ord b) =>
-(a -> b) -> f a -> vector a
-sortOnCheap a -> b
-f
-
--- | returns the maximum using the given comparison function
-maxBy         :: (t -> t -> Ordering) -> t -> t -> t
-maxBy :: forall t. (t -> t -> Ordering) -> t -> t -> t
-maxBy t -> t -> Ordering
-cmp t
-a t
-b = case t -> t -> Ordering
-cmp t
-a t
-b of
-                  Ordering
-LT -> t
-b
-                  Ordering
-_  -> t
-a
-
-
--- | shift the vector by d items to the right
-shiftR     :: Int -> NonEmptyVector v -> NonEmptyVector v
-shiftR :: forall v. Int -> NonEmptyVector v -> NonEmptyVector v
-shiftR Int
-d NonEmptyVector v
-v = let n :: Int
-n = NonEmptyVector v -> Int
-forall a. NonEmptyVector a -> Int
-forall (t :: * -> *) a. Foldable t => t a -> Int
-length NonEmptyVector v
-v
-             in Int -> (Int -> v) -> NonEmptyVector v
-forall a. Int -> (Int -> a) -> NonEmptyVector a
-NonEmptyV.generate1 Int
-n ((Int -> v) -> NonEmptyVector v) -> (Int -> v) -> NonEmptyVector v
-forall a b. (a -> b) -> a -> b
-$ \Int
-i -> NonEmptyVector v
-v NonEmptyVector v -> Int -> v
-forall a. NonEmptyVector a -> Int -> a
-NonEmptyV.! ((Int
-iInt -> Int -> Int
-forall a. Num a => a -> a -> a
-+Int
-nInt -> Int -> Int
-forall a. Num a => a -> a -> a
-+Int
-d) Int -> Int -> Int
-forall a. Integral a => a -> a -> a
-`mod` Int
-n)
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Graph.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Graph.html index 03e6b1f88..cccc08c08 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Graph.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Graph.html @@ -21,7 +21,7 @@
import HGeometry.HyperPlane.Class import HGeometry.HyperPlane.NonVertical import HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap -import HGeometry.Plane.LowerEnvelope.Connected.Regions +import HGeometry.Plane.LowerEnvelope.Connected.Type import HGeometry.Point import HGeometry.Vector @@ -29,12 +29,12 @@ -- | A Plane graph storing vertices of type v that are identified by keys of type k, and -- some ordered sequence of edges (which are ordered using e). -type PlaneGraph k v e = Map k (Map e k, v) +type PlaneGraph k v e = Map k (Map e k, v) -newtype E r = E (Vector 2 r) - deriving newtype (Int -> E r -> ShowS +newtype E r = E (Vector 2 r) + deriving newtype (Int -> E r -> ShowS [E r] -> ShowS E r -> String (Int -> E r -> ShowS) @@ -52,23 +52,23 @@ showList :: [E r] -> ShowS Show) -instance (Ord r, Num r) => Eq (E r) where - E r -a == :: E r -> E r -> Bool -== E r -b = E r -a E r -> E r -> Ordering +instance (Ord r, Num r) => Eq (E r) where + E r +a == :: E r -> E r -> Bool +== E r +b = E r +a E r -> E r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` E r -b Ordering -> Ordering -> Bool +b Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering EQ -instance (Ord r, Num r) => Ord (E r) where - (E Vector 2 r -v) compare :: E r -> E r -> Ordering -`compare` (E Vector 2 r -u) = Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering +instance (Ord r, Num r) => Ord (E r) where + (E Vector 2 r +v) compare :: E r -> E r -> Ordering +`compare` (E Vector 2 r +u) = Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering @@ -80,18 +80,18 @@ forall point (d :: Nat) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point 2 r) (Vector 2 r -> Point 2 r +origin :: Point 2 r) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -v) (Vector 2 r -> Point 2 r +v) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -u) +u) -- | Produce a triangulated plane graph on the bounded vertices. every vertex is -- represented by its point, it stores a list of its outgoing edges, and some data. -toPlaneGraph :: (Plane_ plane r, Num r, Ord r) - => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r) +toPlaneGraph :: (Plane_ plane r, Num r, Ord r) + => MinimizationDiagram r plane -> PlaneGraph (Point 2 r) (First r) (E r) toPlaneGraph :: forall plane r. (Plane_ plane r, Num r, Ord r) => MinimizationDiagram r plane @@ -111,27 +111,36 @@ (Plane_ plane r, Num r, Ord r) => plane -> Region r (Point 2 r) -> PlaneGraph (Point 2 r) (First r) (E r) -toTriangulatedGr +toTriangulatedGr (Map plane (Region r (Point 2 r)) + -> Map (Point 2 r) (Map (E r) (Point 2 r), First r)) +-> (MinimizationDiagram r plane + -> Map plane (Region r (Point 2 r))) +-> MinimizationDiagram r plane +-> Map (Point 2 r) (Map (E r) (Point 2 r), First r) +forall b c a. (b -> c) -> (a -> b) -> a -> c +. MinimizationDiagram r plane -> Map plane (Region r (Point 2 r)) +forall r plane. +MinimizationDiagram r plane -> Map plane (Region r (Point 2 r)) +asMap - -toTriangulatedGr :: (Plane_ plane r, Num r, Ord r) - => plane -> Region r (Point 2 r) - -> PlaneGraph (Point 2 r) (First r) (E r) -toTriangulatedGr :: forall plane r. +toTriangulatedGr :: (Plane_ plane r, Num r, Ord r) + => plane -> Region r (Point 2 r) + -> PlaneGraph (Point 2 r) (First r) (E r) +toTriangulatedGr :: forall plane r. (Plane_ plane r, Num r, Ord r) => plane -> Region r (Point 2 r) -> PlaneGraph (Point 2 r) (First r) (E r) -toTriangulatedGr plane -h = (Point 2 r +toTriangulatedGr plane +h = (Point 2 r -> Map (E r) (Point 2 r) -> (Map (E r) (Point 2 r), First r)) -> Map (Point 2 r) (Map (E r) (Point 2 r)) -> Map (Point 2 r) (Map (E r) (Point 2 r), First r) forall k a b. (k -> a -> b) -> Map k a -> Map k b -Map.mapWithKey (\Point 2 r -v Map (E r) (Point 2 r) -adjs -> (Map (E r) (Point 2 r) -adjs, r -> First r +Map.mapWithKey (\Point 2 r +v Map (E r) (Point 2 r) +adjs -> (Map (E r) (Point 2 r) +adjs, r -> First r forall a. a -> First a First (r -> First r) -> r -> First r forall a b. (a -> b) -> a -> b @@ -144,8 +153,8 @@ Point_ point (d - 1) r) => point -> hyperPlane -> r evalAt Point 2 r -v plane -h)) (Map (Point 2 r) (Map (E r) (Point 2 r)) +v plane +h)) (Map (Point 2 r) (Map (E r) (Point 2 r)) -> Map (Point 2 r) (Map (E r) (Point 2 r), First r)) -> (Region r (Point 2 r) -> Map (Point 2 r) (Map (E r) (Point 2 r))) @@ -153,13 +162,13 @@ -> Map (Point 2 r) (Map (E r) (Point 2 r), First r) forall b c a. (b -> c) -> (a -> b) -> a -> c . \case - Bounded CircularList (Point 2 r) -vertices -> case CircularList (Point 2 r) -vertices of - (Point 2 r -v0:Point 2 r -v1:CircularList (Point 2 r) -vs) -> Point 2 r + Bounded CircularList (Point 2 r) +vertices -> case CircularList (Point 2 r) +vertices of + (Point 2 r +v0:Point 2 r +v1:CircularList (Point 2 r) +vs) -> Point 2 r -> Point 2 r -> CircularList (Point 2 r) -> Map (Point 2 r) (Map (E (NumType (Point 2 r))) (Point 2 r)) @@ -167,31 +176,31 @@ (Dimension k ~ 2, Ord k, Ord (NumType k), Num (NumType k), Affine_ k 2 (NumType k)) => k -> k -> [k] -> Map k (Map (E (NumType k)) k) -triangulate Point 2 r -v0 Point 2 r -v1 CircularList (Point 2 r) -vs - CircularList (Point 2 r) +triangulate Point 2 r +v0 Point 2 r +v1 CircularList (Point 2 r) +vs + CircularList (Point 2 r) _ -> String -> Map (Point 2 r) (Map (E r) (Point 2 r)) forall a. HasCallStack => String -> a error String "triangulate: absurd, <2 vertices" - Unbounded Vector 2 r -_ NonEmpty (Point 2 r) -vertices Vector 2 r + Unbounded Vector 2 r +_ NonEmpty (Point 2 r) +vertices Vector 2 r _ -> case NonEmpty (Point 2 r) -vertices of - Point 2 r +vertices of + Point 2 r _ :| [] -> Map (Point 2 r) (Map (E r) (Point 2 r)) forall k a. Map k a Map.empty - Point 2 r -u :| [Point 2 r -v] -> [(Point 2 r, Map (E r) (Point 2 r))] + Point 2 r +u :| [Point 2 r +v] -> [(Point 2 r, Map (E r) (Point 2 r))] -> Map (Point 2 r) (Map (E r) (Point 2 r)) forall k a. Ord k => [(k, a)] -> Map k a Map.fromList [ (Point 2 r -u, ((E r -> Point 2 r -> Map (E r) (Point 2 r)) +u, ((E r -> Point 2 r -> Map (E r) (Point 2 r)) -> (E r, Point 2 r) -> Map (E r) (Point 2 r) forall a b c. (a -> b -> c) -> (a, b) -> c uncurry E r -> Point 2 r -> Map (E r) (Point 2 r) @@ -203,11 +212,11 @@ forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge Point 2 r -u Point 2 r -v)) - , (Point 2 r -v, ((E r -> Point 2 r -> Map (E r) (Point 2 r)) +edge Point 2 r +u Point 2 r +v)) + , (Point 2 r +v, ((E r -> Point 2 r -> Map (E r) (Point 2 r)) -> (E r, Point 2 r) -> Map (E r) (Point 2 r) forall a b c. (a -> b -> c) -> (a, b) -> c uncurry E r -> Point 2 r -> Map (E r) (Point 2 r) @@ -219,14 +228,14 @@ forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge Point 2 r -v Point 2 r -u)) - ] - Point 2 r -v0 :|(Point 2 r -v1:CircularList (Point 2 r) -vs) -> Point 2 r +edge Point 2 r +v Point 2 r +u)) + ] + Point 2 r +v0 :|(Point 2 r +v1:CircularList (Point 2 r) +vs) -> Point 2 r -> Point 2 r -> CircularList (Point 2 r) -> Map (Point 2 r) (Map (E (NumType (Point 2 r))) (Point 2 r)) @@ -234,16 +243,16 @@ (Dimension k ~ 2, Ord k, Ord (NumType k), Num (NumType k), Affine_ k 2 (NumType k)) => k -> k -> [k] -> Map k (Map (E (NumType k)) k) -triangulate Point 2 r -v0 Point 2 r -v1 CircularList (Point 2 r) -vs - where - triangulate :: k -> k -> [k] -> Map k (Map (E (NumType k)) k) -triangulate k -v0 k -v1 [k] -vs = (Map (E (NumType k)) k +triangulate Point 2 r +v0 Point 2 r +v1 CircularList (Point 2 r) +vs + where + triangulate :: k -> k -> [k] -> Map k (Map (E (NumType k)) k) +triangulate k +v0 k +v1 [k] +vs = (Map (E (NumType k)) k -> Map (E (NumType k)) k -> Map (E (NumType k)) k) -> [Map k (Map (E (NumType k)) k)] -> Map k (Map (E (NumType k)) k) forall (f :: * -> *) k a. @@ -263,83 +272,83 @@ (Dimension a ~ 2, Ord a, Ord (NumType a), Num (NumType a), Affine_ a 2 (NumType a)) => a -> a -> a -> Map a (Map (E (NumType a)) a) -triangle k -v0) (k -v1k -> [k] -> [k] +triangle k +v0) (k +v1k -> [k] -> [k] forall a. a -> [a] -> [a] :[k] -vs) [k] -vs - - triangle :: a -> a -> a -> Map a (Map (E (NumType a)) a) -triangle a -u a -v a -w = [(a, Map (E (NumType a)) a)] -> Map a (Map (E (NumType a)) a) +vs) [k] +vs + + triangle :: a -> a -> a -> Map a (Map (E (NumType a)) a) +triangle a +u a +v a +w = [(a, Map (E (NumType a)) a)] -> Map a (Map (E (NumType a)) a) forall k a. Ord k => [(k, a)] -> Map k a Map.fromList [ (a -u, [(E (NumType a), a)] -> Map (E (NumType a)) a +u, [(E (NumType a), a)] -> Map (E (NumType a)) a forall k a. Ord k => [(k, a)] -> Map k a Map.fromList [ a -> a -> (E (NumType a), a) forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge a -u a -v, a -> a -> (E (NumType a), a) +edge a +u a +v, a -> a -> (E (NumType a), a) forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge a -u a -w]) - , (a -v, [(E (NumType a), a)] -> Map (E (NumType a)) a +edge a +u a +w]) + , (a +v, [(E (NumType a), a)] -> Map (E (NumType a)) a forall k a. Ord k => [(k, a)] -> Map k a Map.fromList [ a -> a -> (E (NumType a), a) forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge a -v a -u, a -> a -> (E (NumType a), a) +edge a +v a +u, a -> a -> (E (NumType a), a) forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge a -v a -w]) - , (a -w, [(E (NumType a), a)] -> Map (E (NumType a)) a +edge a +v a +w]) + , (a +w, [(E (NumType a), a)] -> Map (E (NumType a)) a forall k a. Ord k => [(k, a)] -> Map k a Map.fromList [ a -> a -> (E (NumType a), a) forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge a -w a -u, a -> a -> (E (NumType a), a) +edge a +w a +u, a -> a -> (E (NumType a), a) forall {b}. (Dimension b ~ 2, Affine_ b 2 (NumType b), Num (NumType b)) => b -> b -> (E (NumType b), b) -edge a -w a -v]) - ] - edge :: b -> b -> (E (NumType b), b) -edge b -u b -v = ((Vector 2 (NumType b) -> E (NumType b) +edge a +w a +v]) + ] + edge :: b -> b -> (E (NumType b), b) +edge b +u b +v = ((Vector 2 (NumType b) -> E (NumType b) forall r. Vector 2 r -> E r E (Vector 2 (NumType b) -> E (NumType b)) -> Vector 2 (NumType b) -> E (NumType b) forall a b. (a -> b) -> a -> b $ b -v b -> b -> Vector 2 (NumType b) +v b -> b -> Vector 2 (NumType b) forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. b -u), b -v) - \ No newline at end of file +u), b +v) + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap.html index 0671e7345..b9a6fe1fb 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap.html @@ -12,12 +12,12 @@ -- * Operations on Maps -- | Merge a bunch of maps -unionsWithKey :: (Foldable f, Ord k) => (k -> a-> a ->a) -> f (Map k a) -> Map k a +unionsWithKey :: (Foldable f, Ord k) => (k -> a-> a ->a) -> f (Map k a) -> Map k a unionsWithKey :: forall (f :: * -> *) k a. (Foldable f, Ord k) => (k -> a -> a -> a) -> f (Map k a) -> Map k a -unionsWithKey k -> a -> a -> a -f = (Map k a -> Map k a -> Map k a) +unionsWithKey k -> a -> a -> a +f = (Map k a -> Map k a -> Map k a) -> Map k a -> f (Map k a) -> Map k a forall b a. (b -> a -> b) -> b -> f a -> b forall (t :: * -> *) b a. @@ -28,40 +28,40 @@ Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a Map.unionWithKey k -> a -> a -> a -f) Map k a +f) Map k a forall k a. Map k a Map.empty -- | Merge the maps. When they share a key, combine their values using a semigroup. -mapWithKeyMerge :: (Ord k', Semigroup v') - => (k -> v -> Map k' v') -> Map k v -> Map k' v' +mapWithKeyMerge :: (Ord k', Semigroup v') + => (k -> v -> Map k' v') -> Map k v -> Map k' v' mapWithKeyMerge :: forall k' v' k v. (Ord k', Semigroup v') => (k -> v -> Map k' v') -> Map k v -> Map k' v' -mapWithKeyMerge k -> v -> Map k' v' -f = MonoidalMap k' v' -> Map k' v' +mapWithKeyMerge k -> v -> Map k' v' +f = MonoidalMap k' v' -> Map k' v' forall k v. MonoidalMap k v -> Map k v getMap (MonoidalMap k' v' -> Map k' v') -> (Map k v -> MonoidalMap k' v') -> Map k v -> Map k' v' forall b c a. (b -> c) -> (a -> b) -> a -> c . (k -> v -> MonoidalMap k' v') -> Map k v -> MonoidalMap k' v' forall m k a. Monoid m => (k -> a -> m) -> Map k a -> m -Map.foldMapWithKey (\k -k v -v -> Map k' v' -> MonoidalMap k' v' +Map.foldMapWithKey (\k +k v +v -> Map k' v' -> MonoidalMap k' v' forall k v. Map k v -> MonoidalMap k v MonoidalMap (Map k' v' -> MonoidalMap k' v') -> Map k' v' -> MonoidalMap k' v' forall a b. (a -> b) -> a -> b $ k -> v -> Map k' v' -f k -k v -v) +f k +k v +v) -- | A Map in which we combine conflicting elements by using their semigroup operation -- rather than picking the left value (as is done in the default Data.Map) -newtype MonoidalMap k v = MonoidalMap { forall k v. MonoidalMap k v -> Map k v -getMap :: Map k v } - deriving (Int -> MonoidalMap k v -> ShowS +newtype MonoidalMap k v = MonoidalMap { forall k v. MonoidalMap k v -> Map k v +getMap :: Map k v } + deriving (Int -> MonoidalMap k v -> ShowS [MonoidalMap k v] -> ShowS MonoidalMap k v -> String (Int -> MonoidalMap k v -> ShowS) @@ -81,11 +81,11 @@ showList :: [MonoidalMap k v] -> ShowS Show) -instance (Ord k, Semigroup v) => Semigroup (MonoidalMap k v) where - (MonoidalMap Map k v -ma) <> :: MonoidalMap k v -> MonoidalMap k v -> MonoidalMap k v -<> (MonoidalMap Map k v -mb) = Map k v -> MonoidalMap k v +instance (Ord k, Semigroup v) => Semigroup (MonoidalMap k v) where + (MonoidalMap Map k v +ma) <> :: MonoidalMap k v -> MonoidalMap k v -> MonoidalMap k v +<> (MonoidalMap Map k v +mb) = Map k v -> MonoidalMap k v forall k v. Map k v -> MonoidalMap k v MonoidalMap (Map k v -> MonoidalMap k v) -> Map k v -> MonoidalMap k v forall a b. (a -> b) -> a -> b @@ -94,11 +94,11 @@ Map.unionWith v -> v -> v forall a. Semigroup a => a -> a -> a (<>) Map k v -ma Map k v -mb +ma Map k v +mb -instance (Ord k, Semigroup v) => Monoid (MonoidalMap k v) where - mempty :: MonoidalMap k v +instance (Ord k, Semigroup v) => Monoid (MonoidalMap k v) where + mempty :: MonoidalMap k v mempty = Map k v -> MonoidalMap k v forall k v. Map k v -> MonoidalMap k v MonoidalMap Map k v diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Primitives.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Primitives.html index 2013b19e9..99da37aa4 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Primitives.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Primitives.html @@ -28,23 +28,23 @@ -- * Geometric Primitives -- | Given two planes, computes the line in which they intersect. -intersectionLine :: (Plane_ plane r, Fractional r, Eq r) - => plane -> plane -> Maybe (VerticalOrLineEQ r) +intersectionLine :: (Plane_ plane r, Fractional r, Eq r) + => plane -> plane -> Maybe (VerticalOrLineEQ r) intersectionLine :: forall plane r. (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r) -intersectionLine (Plane_ r -a1 r -b1 r -c1) (Plane_ r -a2 r -b2 r -c2) +intersectionLine (Plane_ r +a1 r +b1 r +c1) (Plane_ r +a2 r +b2 r +c2) | r -b1 r -> r -> Bool +b1 r -> r -> Bool forall a. Eq a => a -> a -> Bool /= r -b2 = VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r) +b2 = VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r) forall a. a -> Maybe a Just (VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r)) -> VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r) @@ -56,26 +56,26 @@ $ r -> r -> LineEQ r forall r. r -> r -> LineEQ r LineEQ ((r -a2 r -> r -> r +a2 r -> r -> r forall a. Num a => a -> a -> a - r -a1) r -> r -> r +a1) r -> r -> r forall a. Fractional a => a -> a -> a / r -diffB) ((r -c2 r -> r -> r +diffB) ((r +c2 r -> r -> r forall a. Num a => a -> a -> a - r -c1) r -> r -> r +c1) r -> r -> r forall a. Fractional a => a -> a -> a / r -diffB) +diffB) -- the two planes intersect in some normal line | r -a1 r -> r -> Bool +a1 r -> r -> Bool forall a. Eq a => a -> a -> Bool /= r -a2 = VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r) +a2 = VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r) forall a. a -> Maybe a Just (VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r)) -> VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r) @@ -83,16 +83,16 @@ $ r -> VerticalOrLineEQ r forall r. r -> VerticalOrLineEQ r VerticalLineThrough ((r -c2 r -> r -> r +c2 r -> r -> r forall a. Num a => a -> a -> a -r -c1) r -> r -> r +c1) r -> r -> r forall a. Fractional a => a -> a -> a / (r -a1 r -> r -> r +a1 r -> r -> r forall a. Num a => a -> a -> a - r -a2)) +a2)) -- the planes intersect in a vertical line | Bool otherwise = Maybe (VerticalOrLineEQ r) @@ -100,12 +100,12 @@ Nothing -- the planes don't intersect at all where - diffB :: r -diffB = r -b1 r -> r -> r + diffB :: r +diffB = r +b1 r -> r -> r forall a. Num a => a -> a -> a - r -b2 +b2 -- -- | Computes the directed line in which the two planes h and h' intersect. The returned -- -- line will have h to its left and h' to its right. @@ -125,29 +125,29 @@ -- | Computes the direction vector v of the directed line l in which the two planes h and h' -- intersect, and so that h will be to the left of the directed line -intersectionVector :: ( Plane_ plane r, Ord r, Fractional r) - => plane -> plane -> Maybe (Vector 2 r) +intersectionVector :: ( Plane_ plane r, Ord r, Fractional r) + => plane -> plane -> Maybe (Vector 2 r) intersectionVector :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) -intersectionVector plane -h plane -h' = plane -> plane -> Maybe (VerticalOrLineEQ r) +intersectionVector plane +h plane +h' = plane -> plane -> Maybe (VerticalOrLineEQ r) forall plane r. (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r) intersectionLine plane -h plane -h' Maybe (VerticalOrLineEQ r) +h plane +h' Maybe (VerticalOrLineEQ r) -> (VerticalOrLineEQ r -> Vector 2 r) -> Maybe (Vector 2 r) forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b <&> \case - VerticalLineThrough r -x -> Point 2 r -> Vector 2 r -> Vector 2 r -orient (r -> r -> Point 2 r + VerticalLineThrough r +x -> Point 2 r -> Vector 2 r -> Vector 2 r +orient (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (r -xr -> r -> r +xr -> r -> r forall a. Num a => a -> a -> a -r 1) r @@ -156,27 +156,27 @@ Vector2 r 0 r 1) - NonVertical (LineEQ r -a r -b) -> Point 2 r -> Vector 2 r -> Vector 2 r -orient (r -> r -> Point 2 r + NonVertical (LineEQ r +a r +b) -> Point 2 r -> Vector 2 r -> Vector 2 r +orient (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r 0 (r -br -> r -> r +br -> r -> r forall a. Num a => a -> a -> a +r 1)) (r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r 1 r -a) +a) where - orient :: Point 2 r -> Vector 2 r -> Vector 2 r -orient Point 2 r -q Vector 2 r -v = let f :: plane -> r -f = Point 2 r -> plane -> r + orient :: Point 2 r -> Vector 2 r -> Vector 2 r +orient Point 2 r +q Vector 2 r +v = let f :: plane -> r +f = Point 2 r -> plane -> r forall point. (Num r, 1 <= 3, Point_ point (3 - 1) r) => point -> plane -> r @@ -185,135 +185,135 @@ Point_ point (d - 1) r) => point -> hyperPlane -> r evalAt Point 2 r -q in if plane -> r -f plane -h r -> r -> Bool +q in if plane -> r +f plane +h r -> r -> Bool forall a. Ord a => a -> a -> Bool <= plane -> r -f plane -h' then Vector 2 r -v else Vector 2 r -> Vector 2 r +f plane +h' then Vector 2 r +v else Vector 2 r -> Vector 2 r forall r vector (d :: Natural). (Num r, Vector_ vector d r) => vector -> vector negated Vector 2 r -v +v -- | Computes there the three planes intersect -intersectionPoint :: ( Plane_ plane r, Ord r, Fractional r) - => Three plane -> Maybe (Point 3 r) +intersectionPoint :: ( Plane_ plane r, Ord r, Fractional r) + => Three plane -> Maybe (Point 3 r) intersectionPoint :: forall plane r. (Plane_ plane r, Ord r, Fractional r) => Three plane -> Maybe (Point 3 r) -intersectionPoint (Three h1 :: plane -h1@(Plane_ r -a1 r -b1 r -c1) plane -h2 plane -h3) = - do VerticalOrLineEQ r -l12 <- plane -> plane -> Maybe (VerticalOrLineEQ r) +intersectionPoint (Three h1 :: plane +h1@(Plane_ r +a1 r +b1 r +c1) plane +h2 plane +h3) = + do VerticalOrLineEQ r +l12 <- plane -> plane -> Maybe (VerticalOrLineEQ r) forall plane r. (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r) intersectionLine plane -h1 plane -h2 - VerticalOrLineEQ r -l13 <- plane -> plane -> Maybe (VerticalOrLineEQ r) +h1 plane +h2 + VerticalOrLineEQ r +l13 <- plane -> plane -> Maybe (VerticalOrLineEQ r) forall plane r. (Plane_ plane r, Fractional r, Eq r) => plane -> plane -> Maybe (VerticalOrLineEQ r) intersectionLine plane -h1 plane -h3 +h1 plane +h3 case (VerticalOrLineEQ r -l12,VerticalOrLineEQ r -l13) of - (VerticalLineThrough r -_x12, VerticalLineThrough r -_x13) -> Maybe (Point 3 r) +l12,VerticalOrLineEQ r +l13) of + (VerticalLineThrough r +_x12, VerticalLineThrough r +_x13) -> Maybe (Point 3 r) forall a. Maybe a Nothing -- if the xes are the same they would be the same plane even - (VerticalLineThrough r -x, NonVertical LineEQ r -l) -> r -> LineEQ r -> Maybe (Point 3 r) -vertNonVertIntersect r -x LineEQ r -l - (NonVertical LineEQ r -l, VerticalLineThrough r -x) -> r -> LineEQ r -> Maybe (Point 3 r) -vertNonVertIntersect r -x LineEQ r -l - (NonVertical LineEQ r -l, NonVertical LineEQ r -m) -> LineEQ r -l LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) + (VerticalLineThrough r +x, NonVertical LineEQ r +l) -> r -> LineEQ r -> Maybe (Point 3 r) +vertNonVertIntersect r +x LineEQ r +l + (NonVertical LineEQ r +l, VerticalLineThrough r +x) -> r -> LineEQ r -> Maybe (Point 3 r) +vertNonVertIntersect r +x LineEQ r +l + (NonVertical LineEQ r +l, NonVertical LineEQ r +m) -> LineEQ r +l LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r) forall g h. IsIntersectableWith g h => g -> h -> Intersection g h `intersect` LineEQ r -m Maybe (LineLineIntersectionG r (LineEQ r)) +m Maybe (LineLineIntersectionG r (LineEQ r)) -> (LineLineIntersectionG r (LineEQ r) -> Maybe (Point 3 r)) -> Maybe (Point 3 r) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b >>= \case - Line_x_Line_Point (Point2 r -x r -y) -> Point 3 r -> Maybe (Point 3 r) + Line_x_Line_Point (Point2 r +x r +y) -> Point 3 r -> Maybe (Point 3 r) forall a. a -> Maybe a Just (Point 3 r -> Maybe (Point 3 r)) -> Point 3 r -> Maybe (Point 3 r) forall a b. (a -> b) -> a -> b $ r -> r -> r -> Point 3 r forall r. r -> r -> r -> Point 3 r Point3 r -x r -y (r -a1 r -> r -> r +x r +y (r +a1 r -> r -> r forall a. Num a => a -> a -> a * r -x r -> r -> r +x r -> r -> r forall a. Num a => a -> a -> a + r -b1r -> r -> r +b1r -> r -> r forall a. Num a => a -> a -> a * r -y r -> r -> r +y r -> r -> r forall a. Num a => a -> a -> a + r -c1) +c1) Line_x_Line_Line LineEQ r _ -> Maybe (Point 3 r) forall a. Maybe a Nothing where - vertNonVertIntersect :: r -> LineEQ r -> Maybe (Point 3 r) -vertNonVertIntersect r -x LineEQ r -l = let y :: r -y = r -> LineEQ r -> r + vertNonVertIntersect :: r -> LineEQ r -> Maybe (Point 3 r) +vertNonVertIntersect r +x LineEQ r +l = let y :: r +y = r -> LineEQ r -> r forall r. Num r => r -> LineEQ r -> r evalAt' r -x LineEQ r -l - z :: r -z = r -a1 r -> r -> r +x LineEQ r +l + z :: r +z = r +a1 r -> r -> r forall a. Num a => a -> a -> a * r -x r -> r -> r +x r -> r -> r forall a. Num a => a -> a -> a + r -b1r -> r -> r +b1r -> r -> r forall a. Num a => a -> a -> a * r -y r -> r -> r +y r -> r -> r forall a. Num a => a -> a -> a + r -c1 +c1 in Point 3 r -> Maybe (Point 3 r) forall a. a -> Maybe a Just (Point 3 r -> Maybe (Point 3 r)) -> Point 3 r -> Maybe (Point 3 r) @@ -321,7 +321,7 @@ $ r -> r -> r -> Point 3 r forall r. r -> r -> r -> Point 3 r Point3 r -x r -y r -z +x r +y r +z \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Regions.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Regions.html index c4935b49d..0e9b072a4 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Regions.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Regions.html @@ -10,957 +10,285 @@ -- -------------------------------------------------------------------------------- module HGeometry.Plane.LowerEnvelope.Connected.Regions - ( MinimizationDiagram - , Region(..) - , CircularList - , fromVertexForm - - , Definers - , fromCCWList - , definers - , mergeDefiners + ( fromVertexForm + + , Definers + , fromCCWList + , definers + , mergeDefiners + + , VertexForm + ) where - , VertexForm - ) where - -import qualified Data.Foldable as F -import qualified Data.List as List -import Data.List.NonEmpty (NonEmpty(..)) -import qualified Data.List.NonEmpty as NonEmpty -import Data.Map (Map) -import qualified Data.Map as Map -import Data.Maybe (fromMaybe, listToMaybe) -import Data.Set (Set) -import qualified Data.Set as Set -import HGeometry.Combinatorial.Util -import HGeometry.HyperPlane.Class -import HGeometry.HyperPlane.NonVertical -import HGeometry.Intersection -import HGeometry.Line +import qualified Data.Foldable as F +import qualified Data.List as List +import Data.List.NonEmpty (NonEmpty(..)) +import qualified Data.List.NonEmpty as NonEmpty +import Data.Map (Map) +import qualified Data.Map as Map +import Data.Maybe (fromMaybe, listToMaybe) +import Data.Set (Set) +import qualified Data.Set as Set +import HGeometry.Combinatorial.Util +import HGeometry.HyperPlane.Class +import HGeometry.HyperPlane.NonVertical +import HGeometry.Intersection +import HGeometry.Line +import HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap +import HGeometry.Plane.LowerEnvelope.Connected.Primitives +import HGeometry.Plane.LowerEnvelope.Connected.Type import HGeometry.Point import HGeometry.Properties import HGeometry.Vector -import HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap -import HGeometry.Plane.LowerEnvelope.Connected.Primitives - --------------------------------------------------------------------------------- --- * The Minimization Diagram, i.e. the type that we use to represent our --- lower envelope - --- | A minimization daigram just maps every plane on the lower envelope to the region --- above which it is minimal. Every plane has at most one such a region. -type MinimizationDiagram r plane = Map plane (Region r (Point 2 r)) - -type instance NumType (MinimizationDiagram r plane) = r -type instance Dimension (MinimizationDiagram r plane) = 2 --- TODO: this is a bit of hack; maybe use a newtype instead. We only need these instances --- to actually print the thing in ipe. - --- | A region in the minimization diagram. The boundary is given in CCW order; i.e. the --- region is to the left of the boundary. -data Region r point = Bounded (CircularList point) - | Unbounded (Vector 2 r) - -- ^ vector indicating the direction of the unbounded edge - -- incident to the first vertex. Note that this vector - -- thus points INTO vertex v. - (NonEmpty point) - -- ^ the vertices in CCW order, - (Vector 2 r) - -- ^ the vector indicating the direction of the unbounded - -- edge incident to the last vertex. The vector points - -- away from the vertex (i.e. towards +infty). - deriving stock (Int -> Region r point -> ShowS -[Region r point] -> ShowS -Region r point -> String -(Int -> Region r point -> ShowS) --> (Region r point -> String) --> ([Region r point] -> ShowS) --> Show (Region r point) -forall a. -(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a -forall r point. -(Show point, Show r) => -Int -> Region r point -> ShowS -forall r point. (Show point, Show r) => [Region r point] -> ShowS -forall r point. (Show point, Show r) => Region r point -> String -$cshowsPrec :: forall r point. -(Show point, Show r) => -Int -> Region r point -> ShowS -showsPrec :: Int -> Region r point -> ShowS -$cshow :: forall r point. (Show point, Show r) => Region r point -> String -show :: Region r point -> String -$cshowList :: forall r point. (Show point, Show r) => [Region r point] -> ShowS -showList :: [Region r point] -> ShowS -Show,Region r point -> Region r point -> Bool -(Region r point -> Region r point -> Bool) --> (Region r point -> Region r point -> Bool) --> Eq (Region r point) -forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a -forall r point. -(Eq point, Eq r) => -Region r point -> Region r point -> Bool -$c== :: forall r point. -(Eq point, Eq r) => -Region r point -> Region r point -> Bool -== :: Region r point -> Region r point -> Bool -$c/= :: forall r point. -(Eq point, Eq r) => -Region r point -> Region r point -> Bool -/= :: Region r point -> Region r point -> Bool -Eq,(forall a b. (a -> b) -> Region r a -> Region r b) --> (forall a b. a -> Region r b -> Region r a) --> Functor (Region r) -forall a b. a -> Region r b -> Region r a -forall a b. (a -> b) -> Region r a -> Region r b -forall r a b. a -> Region r b -> Region r a -forall r a b. (a -> b) -> Region r a -> Region r b -forall (f :: * -> *). -(forall a b. (a -> b) -> f a -> f b) --> (forall a b. a -> f b -> f a) -> Functor f -$cfmap :: forall r a b. (a -> b) -> Region r a -> Region r b -fmap :: forall a b. (a -> b) -> Region r a -> Region r b -$c<$ :: forall r a b. a -> Region r b -> Region r a -<$ :: forall a b. a -> Region r b -> Region r a -Functor,(forall m. Monoid m => Region r m -> m) --> (forall m a. Monoid m => (a -> m) -> Region r a -> m) --> (forall m a. Monoid m => (a -> m) -> Region r a -> m) --> (forall a b. (a -> b -> b) -> b -> Region r a -> b) --> (forall a b. (a -> b -> b) -> b -> Region r a -> b) --> (forall b a. (b -> a -> b) -> b -> Region r a -> b) --> (forall b a. (b -> a -> b) -> b -> Region r a -> b) --> (forall a. (a -> a -> a) -> Region r a -> a) --> (forall a. (a -> a -> a) -> Region r a -> a) --> (forall a. Region r a -> [a]) --> (forall a. Region r a -> Bool) --> (forall a. Region r a -> Int) --> (forall a. Eq a => a -> Region r a -> Bool) --> (forall a. Ord a => Region r a -> a) --> (forall a. Ord a => Region r a -> a) --> (forall a. Num a => Region r a -> a) --> (forall a. Num a => Region r a -> a) --> Foldable (Region r) -forall a. Eq a => a -> Region r a -> Bool -forall a. Num a => Region r a -> a -forall a. Ord a => Region r a -> a -forall m. Monoid m => Region r m -> m -forall a. Region r a -> Bool -forall a. Region r a -> Int -forall a. Region r a -> [a] -forall a. (a -> a -> a) -> Region r a -> a -forall r a. Eq a => a -> Region r a -> Bool -forall r a. Num a => Region r a -> a -forall r a. Ord a => Region r a -> a -forall m a. Monoid m => (a -> m) -> Region r a -> m -forall r m. Monoid m => Region r m -> m -forall r a. Region r a -> Bool -forall r a. Region r a -> Int -forall r a. Region r a -> [a] -forall b a. (b -> a -> b) -> b -> Region r a -> b -forall a b. (a -> b -> b) -> b -> Region r a -> b -forall r a. (a -> a -> a) -> Region r a -> a -forall r m a. Monoid m => (a -> m) -> Region r a -> m -forall r b a. (b -> a -> b) -> b -> Region r a -> b -forall r a b. (a -> b -> b) -> b -> Region r a -> b -forall (t :: * -> *). -(forall m. Monoid m => t m -> m) --> (forall m a. Monoid m => (a -> m) -> t a -> m) --> (forall m a. Monoid m => (a -> m) -> t a -> m) --> (forall a b. (a -> b -> b) -> b -> t a -> b) --> (forall a b. (a -> b -> b) -> b -> t a -> b) --> (forall b a. (b -> a -> b) -> b -> t a -> b) --> (forall b a. (b -> a -> b) -> b -> t a -> b) --> (forall a. (a -> a -> a) -> t a -> a) --> (forall a. (a -> a -> a) -> t a -> a) --> (forall a. t a -> [a]) --> (forall a. t a -> Bool) --> (forall a. t a -> Int) --> (forall a. Eq a => a -> t a -> Bool) --> (forall a. Ord a => t a -> a) --> (forall a. Ord a => t a -> a) --> (forall a. Num a => t a -> a) --> (forall a. Num a => t a -> a) --> Foldable t -$cfold :: forall r m. Monoid m => Region r m -> m -fold :: forall m. Monoid m => Region r m -> m -$cfoldMap :: forall r m a. Monoid m => (a -> m) -> Region r a -> m -foldMap :: forall m a. Monoid m => (a -> m) -> Region r a -> m -$cfoldMap' :: forall r m a. Monoid m => (a -> m) -> Region r a -> m -foldMap' :: forall m a. Monoid m => (a -> m) -> Region r a -> m -$cfoldr :: forall r a b. (a -> b -> b) -> b -> Region r a -> b -foldr :: forall a b. (a -> b -> b) -> b -> Region r a -> b -$cfoldr' :: forall r a b. (a -> b -> b) -> b -> Region r a -> b -foldr' :: forall a b. (a -> b -> b) -> b -> Region r a -> b -$cfoldl :: forall r b a. (b -> a -> b) -> b -> Region r a -> b -foldl :: forall b a. (b -> a -> b) -> b -> Region r a -> b -$cfoldl' :: forall r b a. (b -> a -> b) -> b -> Region r a -> b -foldl' :: forall b a. (b -> a -> b) -> b -> Region r a -> b -$cfoldr1 :: forall r a. (a -> a -> a) -> Region r a -> a -foldr1 :: forall a. (a -> a -> a) -> Region r a -> a -$cfoldl1 :: forall r a. (a -> a -> a) -> Region r a -> a -foldl1 :: forall a. (a -> a -> a) -> Region r a -> a -$ctoList :: forall r a. Region r a -> [a] -toList :: forall a. Region r a -> [a] -$cnull :: forall r a. Region r a -> Bool -null :: forall a. Region r a -> Bool -$clength :: forall r a. Region r a -> Int -length :: forall a. Region r a -> Int -$celem :: forall r a. Eq a => a -> Region r a -> Bool -elem :: forall a. Eq a => a -> Region r a -> Bool -$cmaximum :: forall r a. Ord a => Region r a -> a -maximum :: forall a. Ord a => Region r a -> a -$cminimum :: forall r a. Ord a => Region r a -> a -minimum :: forall a. Ord a => Region r a -> a -$csum :: forall r a. Num a => Region r a -> a -sum :: forall a. Num a => Region r a -> a -$cproduct :: forall r a. Num a => Region r a -> a -product :: forall a. Num a => Region r a -> a -Foldable,Functor (Region r) -Foldable (Region r) -(Functor (Region r), Foldable (Region r)) => -(forall (f :: * -> *) a b. - Applicative f => - (a -> f b) -> Region r a -> f (Region r b)) --> (forall (f :: * -> *) a. - Applicative f => - Region r (f a) -> f (Region r a)) --> (forall (m :: * -> *) a b. - Monad m => - (a -> m b) -> Region r a -> m (Region r b)) --> (forall (m :: * -> *) a. - Monad m => - Region r (m a) -> m (Region r a)) --> Traversable (Region r) -forall r. Functor (Region r) -forall r. Foldable (Region r) -forall r (m :: * -> *) a. -Monad m => -Region r (m a) -> m (Region r a) -forall r (f :: * -> *) a. -Applicative f => -Region r (f a) -> f (Region r a) -forall r (m :: * -> *) a b. -Monad m => -(a -> m b) -> Region r a -> m (Region r b) -forall r (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Region r a -> f (Region r b) -forall (t :: * -> *). -(Functor t, Foldable t) => -(forall (f :: * -> *) a b. - Applicative f => - (a -> f b) -> t a -> f (t b)) --> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a)) --> (forall (m :: * -> *) a b. - Monad m => - (a -> m b) -> t a -> m (t b)) --> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a)) --> Traversable t -forall (m :: * -> *) a. Monad m => Region r (m a) -> m (Region r a) -forall (f :: * -> *) a. -Applicative f => -Region r (f a) -> f (Region r a) -forall (m :: * -> *) a b. -Monad m => -(a -> m b) -> Region r a -> m (Region r b) -forall (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Region r a -> f (Region r b) -$ctraverse :: forall r (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Region r a -> f (Region r b) -traverse :: forall (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Region r a -> f (Region r b) -$csequenceA :: forall r (f :: * -> *) a. -Applicative f => -Region r (f a) -> f (Region r a) -sequenceA :: forall (f :: * -> *) a. -Applicative f => -Region r (f a) -> f (Region r a) -$cmapM :: forall r (m :: * -> *) a b. -Monad m => -(a -> m b) -> Region r a -> m (Region r b) -mapM :: forall (m :: * -> *) a b. -Monad m => -(a -> m b) -> Region r a -> m (Region r b) -$csequence :: forall r (m :: * -> *) a. -Monad m => -Region r (m a) -> m (Region r a) -sequence :: forall (m :: * -> *) a. Monad m => Region r (m a) -> m (Region r a) -Traversable) - -type instance NumType (Region r point) = r -type instance Dimension (Region r point) = Dimension point - --- | bounded regions are really circular lists, but we just represent them as lists for --- now. -type CircularList a = [a] - - --------------------------------------------------------------------------------- --- * The planes defining a vertex - --- | The vertices of a lower envelope is just a Map with every vertex its definers, --- i.e. the planes that define the vertex in CCW order around it. -type VertexForm r plane = Map (Point 3 r) (Definers plane) - ----------------------------------------- --- * The planes defining a vertex - --- | in CCW order, starting with the plane that is minimal at the vertical up direction --- from their common vertex. -newtype Definers plane = Definers [plane] - deriving stock (Int -> Definers plane -> ShowS -[Definers plane] -> ShowS -Definers plane -> String -(Int -> Definers plane -> ShowS) --> (Definers plane -> String) --> ([Definers plane] -> ShowS) --> Show (Definers plane) -forall plane. Show plane => Int -> Definers plane -> ShowS -forall plane. Show plane => [Definers plane] -> ShowS -forall plane. Show plane => Definers plane -> String -forall a. -(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a -$cshowsPrec :: forall plane. Show plane => Int -> Definers plane -> ShowS -showsPrec :: Int -> Definers plane -> ShowS -$cshow :: forall plane. Show plane => Definers plane -> String -show :: Definers plane -> String -$cshowList :: forall plane. Show plane => [Definers plane] -> ShowS -showList :: [Definers plane] -> ShowS -Show,Definers plane -> Definers plane -> Bool -(Definers plane -> Definers plane -> Bool) --> (Definers plane -> Definers plane -> Bool) --> Eq (Definers plane) -forall plane. Eq plane => Definers plane -> Definers plane -> Bool -forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a -$c== :: forall plane. Eq plane => Definers plane -> Definers plane -> Bool -== :: Definers plane -> Definers plane -> Bool -$c/= :: forall plane. Eq plane => Definers plane -> Definers plane -> Bool -/= :: Definers plane -> Definers plane -> Bool -Eq,Eq (Definers plane) -Eq (Definers plane) => -(Definers plane -> Definers plane -> Ordering) --> (Definers plane -> Definers plane -> Bool) --> (Definers plane -> Definers plane -> Bool) --> (Definers plane -> Definers plane -> Bool) --> (Definers plane -> Definers plane -> Bool) --> (Definers plane -> Definers plane -> Definers plane) --> (Definers plane -> Definers plane -> Definers plane) --> Ord (Definers plane) -Definers plane -> Definers plane -> Bool -Definers plane -> Definers plane -> Ordering -Definers plane -> Definers plane -> Definers plane -forall a. -Eq a => -(a -> a -> Ordering) --> (a -> a -> Bool) --> (a -> a -> Bool) --> (a -> a -> Bool) --> (a -> a -> Bool) --> (a -> a -> a) --> (a -> a -> a) --> Ord a -forall plane. Ord plane => Eq (Definers plane) -forall plane. Ord plane => Definers plane -> Definers plane -> Bool -forall plane. -Ord plane => -Definers plane -> Definers plane -> Ordering -forall plane. -Ord plane => -Definers plane -> Definers plane -> Definers plane -$ccompare :: forall plane. -Ord plane => -Definers plane -> Definers plane -> Ordering -compare :: Definers plane -> Definers plane -> Ordering -$c< :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool -< :: Definers plane -> Definers plane -> Bool -$c<= :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool -<= :: Definers plane -> Definers plane -> Bool -$c> :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool -> :: Definers plane -> Definers plane -> Bool -$c>= :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool ->= :: Definers plane -> Definers plane -> Bool -$cmax :: forall plane. -Ord plane => -Definers plane -> Definers plane -> Definers plane -max :: Definers plane -> Definers plane -> Definers plane -$cmin :: forall plane. -Ord plane => -Definers plane -> Definers plane -> Definers plane -min :: Definers plane -> Definers plane -> Definers plane -Ord) - deriving newtype ((forall a b. (a -> b) -> Definers a -> Definers b) --> (forall a b. a -> Definers b -> Definers a) -> Functor Definers -forall a b. a -> Definers b -> Definers a -forall a b. (a -> b) -> Definers a -> Definers b -forall (f :: * -> *). -(forall a b. (a -> b) -> f a -> f b) --> (forall a b. a -> f b -> f a) -> Functor f -$cfmap :: forall a b. (a -> b) -> Definers a -> Definers b -fmap :: forall a b. (a -> b) -> Definers a -> Definers b -$c<$ :: forall a b. a -> Definers b -> Definers a -<$ :: forall a b. a -> Definers b -> Definers a -Functor,(forall m. Monoid m => Definers m -> m) --> (forall m a. Monoid m => (a -> m) -> Definers a -> m) --> (forall m a. Monoid m => (a -> m) -> Definers a -> m) --> (forall a b. (a -> b -> b) -> b -> Definers a -> b) --> (forall a b. (a -> b -> b) -> b -> Definers a -> b) --> (forall b a. (b -> a -> b) -> b -> Definers a -> b) --> (forall b a. (b -> a -> b) -> b -> Definers a -> b) --> (forall a. (a -> a -> a) -> Definers a -> a) --> (forall a. (a -> a -> a) -> Definers a -> a) --> (forall a. Definers a -> [a]) --> (forall a. Definers a -> Bool) --> (forall a. Definers a -> Int) --> (forall a. Eq a => a -> Definers a -> Bool) --> (forall a. Ord a => Definers a -> a) --> (forall a. Ord a => Definers a -> a) --> (forall a. Num a => Definers a -> a) --> (forall a. Num a => Definers a -> a) --> Foldable Definers -forall a. Eq a => a -> Definers a -> Bool -forall a. Num a => Definers a -> a -forall a. Ord a => Definers a -> a -forall m. Monoid m => Definers m -> m -forall a. Definers a -> Bool -forall a. Definers a -> Int -forall a. Definers a -> [a] -forall a. (a -> a -> a) -> Definers a -> a -forall m a. Monoid m => (a -> m) -> Definers a -> m -forall b a. (b -> a -> b) -> b -> Definers a -> b -forall a b. (a -> b -> b) -> b -> Definers a -> b -forall (t :: * -> *). -(forall m. Monoid m => t m -> m) --> (forall m a. Monoid m => (a -> m) -> t a -> m) --> (forall m a. Monoid m => (a -> m) -> t a -> m) --> (forall a b. (a -> b -> b) -> b -> t a -> b) --> (forall a b. (a -> b -> b) -> b -> t a -> b) --> (forall b a. (b -> a -> b) -> b -> t a -> b) --> (forall b a. (b -> a -> b) -> b -> t a -> b) --> (forall a. (a -> a -> a) -> t a -> a) --> (forall a. (a -> a -> a) -> t a -> a) --> (forall a. t a -> [a]) --> (forall a. t a -> Bool) --> (forall a. t a -> Int) --> (forall a. Eq a => a -> t a -> Bool) --> (forall a. Ord a => t a -> a) --> (forall a. Ord a => t a -> a) --> (forall a. Num a => t a -> a) --> (forall a. Num a => t a -> a) --> Foldable t -$cfold :: forall m. Monoid m => Definers m -> m -fold :: forall m. Monoid m => Definers m -> m -$cfoldMap :: forall m a. Monoid m => (a -> m) -> Definers a -> m -foldMap :: forall m a. Monoid m => (a -> m) -> Definers a -> m -$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Definers a -> m -foldMap' :: forall m a. Monoid m => (a -> m) -> Definers a -> m -$cfoldr :: forall a b. (a -> b -> b) -> b -> Definers a -> b -foldr :: forall a b. (a -> b -> b) -> b -> Definers a -> b -$cfoldr' :: forall a b. (a -> b -> b) -> b -> Definers a -> b -foldr' :: forall a b. (a -> b -> b) -> b -> Definers a -> b -$cfoldl :: forall b a. (b -> a -> b) -> b -> Definers a -> b -foldl :: forall b a. (b -> a -> b) -> b -> Definers a -> b -$cfoldl' :: forall b a. (b -> a -> b) -> b -> Definers a -> b -foldl' :: forall b a. (b -> a -> b) -> b -> Definers a -> b -$cfoldr1 :: forall a. (a -> a -> a) -> Definers a -> a -foldr1 :: forall a. (a -> a -> a) -> Definers a -> a -$cfoldl1 :: forall a. (a -> a -> a) -> Definers a -> a -foldl1 :: forall a. (a -> a -> a) -> Definers a -> a -$ctoList :: forall a. Definers a -> [a] -toList :: forall a. Definers a -> [a] -$cnull :: forall a. Definers a -> Bool -null :: forall a. Definers a -> Bool -$clength :: forall a. Definers a -> Int -length :: forall a. Definers a -> Int -$celem :: forall a. Eq a => a -> Definers a -> Bool -elem :: forall a. Eq a => a -> Definers a -> Bool -$cmaximum :: forall a. Ord a => Definers a -> a -maximum :: forall a. Ord a => Definers a -> a -$cminimum :: forall a. Ord a => Definers a -> a -minimum :: forall a. Ord a => Definers a -> a -$csum :: forall a. Num a => Definers a -> a -sum :: forall a. Num a => Definers a -> a -$cproduct :: forall a. Num a => Definers a -> a -product :: forall a. Num a => Definers a -> a -Foldable) - --- | Given the planes in order, starting with the one that is closest in the up direction, --- construct the Definers. -fromCCWList :: [plane] -> Definers plane -fromCCWList :: forall plane. [plane] -> Definers plane -fromCCWList = [plane] -> Definers plane -forall plane. [plane] -> Definers plane -Definers - --- | Smart constructor for creating the definers of three planes -definers :: forall plane r.(Plane_ plane r, Ord r, Fractional r) - => Three plane -> Maybe (Point 3 r, Definers plane) -definers :: forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -Three plane -> Maybe (Point 3 r, Definers plane) -definers (Three h1 :: plane -h1@(Plane_ r -a1 r -b1 r -c1) plane -h2 plane -h3) = - do VerticalOrLineEQ r -l12 <- plane -> plane -> Maybe (VerticalOrLineEQ r) -forall plane r. -(Plane_ plane r, Fractional r, Eq r) => -plane -> plane -> Maybe (VerticalOrLineEQ r) -intersectionLine plane -h1 plane -h2 - VerticalOrLineEQ r -l13 <- plane -> plane -> Maybe (VerticalOrLineEQ r) -forall plane r. -(Plane_ plane r, Fractional r, Eq r) => -plane -> plane -> Maybe (VerticalOrLineEQ r) -intersectionLine plane -h1 plane -h3 - VerticalOrLineEQ r --> VerticalOrLineEQ r --> Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r) -forall g h. IsIntersectableWith g h => g -> h -> Intersection g h -intersect VerticalOrLineEQ r -l12 VerticalOrLineEQ r -l13 Maybe (LineLineIntersectionG r (VerticalOrLineEQ r)) --> (LineLineIntersectionG r (VerticalOrLineEQ r) - -> Maybe (Point 3 r, Definers plane)) --> Maybe (Point 3 r, Definers plane) -forall a b. Maybe a -> (a -> Maybe b) -> Maybe b -forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b ->>= \case - Line_x_Line_Line VerticalOrLineEQ r -_ -> Maybe (Point 3 r, Definers plane) -forall a. Maybe a -Nothing - Line_x_Line_Point (Point2 r -x r -y) -> (Point 3 r, Definers plane) -> Maybe (Point 3 r, Definers plane) -forall a. a -> Maybe a -Just ( r -> r -> r -> Point 3 r -forall r. r -> r -> r -> Point 3 r -Point3 r -x r -y (r -a1 r -> r -> r -forall a. Num a => a -> a -> a -* r -x r -> r -> r -forall a. Num a => a -> a -> a -+ r -b1r -> r -> r -forall a. Num a => a -> a -> a -* r -y r -> r -> r -forall a. Num a => a -> a -> a -+ r -c1) - , [plane] -> Definers plane -forall plane. [plane] -> Definers plane -Definers [plane -hMin, plane -hTwo, plane -hThree] - ) - where - (plane -hMin,plane -h,plane -h') = (plane -> r) -> plane -> plane -> plane -> (plane, plane, plane) -forall a c. Ord a => (c -> a) -> c -> c -> c -> (c, c, c) -extractMinOn (Point 2 r -> plane -> r -forall point. -(Num r, 1 <= 3, Point_ point (3 - 1) r) => -point -> plane -> r -forall hyperPlane (d :: Nat) r point. -(NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d, - Point_ point (d - 1) r) => -point -> hyperPlane -> r -evalAt (Point 2 r -> plane -> r) -> Point 2 r -> plane -> r -forall a b. (a -> b) -> a -> b -$ r -> r -> Point 2 r -forall r. r -> r -> Point 2 r -Point2 r -x (r -yr -> r -> r -forall a. Num a => a -> a -> a -+r -1)) plane -h1 plane -h2 plane -h3 - -- we compute the plane hMin that is cheapest directly above the vertex h and - -- h' are the other two planes. That Means hMin is the first definer (in the - -- CCW order). What remains is to determine the order in which the remaining - -- planes h and h' appear in the order. - (plane -hTwo,plane -hThree) = case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering -forall center r point. -(Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => -Vector 2 r -> center -> point -> point -> Ordering -ccwCmpAroundWith (r -> r -> Vector 2 r -forall r. r -> r -> Vector 2 r -Vector2 r -0 r -1) (Point 2 r -forall point (d :: Nat) r. -(Num r, ConstructablePoint_ point d r) => -point -origin :: Point 2 r) - (Vector 2 r -> Point 2 r -forall v. v -> PointF v -Point Vector 2 r -vMinH) (Vector 2 r -> Point 2 r -forall v. v -> PointF v -Point Vector 2 r -vMinH') of - Ordering -LT -> (plane -h,plane -h') - Ordering -EQ -> String -> (plane, plane) -forall a. HasCallStack => String -> a -error String -"definers: weird degeneracy?" - Ordering -GT -> (plane -h',plane -h) - - vMinH :: Vector 2 r -vMinH = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r -forall a. a -> Maybe a -> a -fromMaybe Vector 2 r -forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) --> Maybe (Vector 2 r) -> Vector 2 r -forall a b. (a -> b) -> a -> b -$ plane -> plane -> Maybe (Vector 2 r) -forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -plane -> plane -> Maybe (Vector 2 r) -intersectionVector plane -h plane -hMin - vMinH' :: Vector 2 r -vMinH' = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r -forall a. a -> Maybe a -> a -fromMaybe Vector 2 r -forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) --> Maybe (Vector 2 r) -> Vector 2 r -forall a b. (a -> b) -> a -> b -$ plane -> plane -> Maybe (Vector 2 r) -forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -plane -> plane -> Maybe (Vector 2 r) -intersectionVector plane -h' plane -hMin - err :: a -err = String -> a -forall a. HasCallStack => String -> a -error String -"definers: absurd" - --- | given three elements, returns the minimum element in the first argument and the --- remaining two elements in the second and third argument (in arbitrary order). -extractMinOn :: Ord a => (c -> a) -> c -> c -> c -> (c, c, c) -extractMinOn :: forall a c. Ord a => (c -> a) -> c -> c -> c -> (c, c, c) -extractMinOn c -> a -f c -a c -b c -c = let (c -m,c -ab) = c -> c -> (c, c) -min' c -a c -b - (c -mi,c -c') = c -> c -> (c, c) -min' c -m c -c - in (c -mi, c -ab, c -c') - where - min' :: c -> c -> (c, c) -min' c -x c -y - | c -> a -f c -x a -> a -> Bool -forall a. Ord a => a -> a -> Bool -<= c -> a -f c -y = (c -x,c -y) - | Bool -otherwise = (c -y,c -x) - ----------------------------------------- - --- | returns the CCW predecessor, and CCW successor of the given plane. -findNeighbours :: Eq plane => plane -> Definers plane -> Maybe (plane,plane) -findNeighbours :: forall plane. +import HGeometry.Plane.LowerEnvelope.Connected.VertexForm + +---------------------------------------- + +-- | returns the CCW predecessor, and CCW successor of the given plane. +findNeighbours :: Eq plane => plane -> Definers plane -> Maybe (plane,plane) +findNeighbours :: forall plane. Eq plane => plane -> Definers plane -> Maybe (plane, plane) -findNeighbours plane -h (Definers [plane] -defs) = Int -> (plane, plane) -withNeighs (Int -> (plane, plane)) -> Maybe Int -> Maybe (plane, plane) +findNeighbours plane +h (Definers [plane] +defs) = Int -> (plane, plane) +withNeighs (Int -> (plane, plane)) -> Maybe Int -> Maybe (plane, plane) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> plane -> [plane] -> Maybe Int forall a. Eq a => a -> [a] -> Maybe Int List.elemIndex plane -h [plane] -defs - where - withNeighs :: Int -> (plane, plane) -withNeighs Int -i = ([plane] -defs [plane] -> Int -> plane +h [plane] +defs + where + withNeighs :: Int -> (plane, plane) +withNeighs Int +i = ([plane] +defs [plane] -> Int -> plane forall a. HasCallStack => [a] -> Int -> a List.!! ((Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -k), [plane] -defs [plane] -> Int -> plane +k), [plane] +defs [plane] -> Int -> plane forall a. HasCallStack => [a] -> Int -> a List.!! ((Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -k)) - k :: Int -k = [plane] -> Int +k)) + k :: Int +k = [plane] -> Int forall a. [a] -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length [plane] -defs --- TODO not exactly the best implementation yet - - --- | Adds a plane to the definers. In particular, places it in the right cyclic order. --- pre: the plane is an actual definer; i.e. it also goes through the vertex. -insertPlane :: forall plane r. (Plane_ plane r, Eq plane, Ord r, Fractional r) - => Point 2 r -- ^ the projection of the vertex - -> plane -- ^ the plane that is a definer - -> Definers plane -> Definers plane -insertPlane :: forall plane r. +defs +-- TODO not exactly the best implementation yet + + +-- | Adds a plane to the definers. In particular, places it in the right cyclic order. +-- pre: the plane is an actual definer; i.e. it also goes through the vertex. +insertPlane :: forall plane r. (Plane_ plane r, Eq plane, Ord r, Fractional r) + => Point 2 r -- ^ the projection of the vertex + -> plane -- ^ the plane that is a definer + -> Definers plane -> Definers plane +insertPlane :: forall plane r. (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 2 r -> plane -> Definers plane -> Definers plane -insertPlane (Point2 r -x r -y) plane -plane (Definers [plane] -planes) = [plane] -> Definers plane +insertPlane (Point2 r +x r +y) plane +plane (Definers [plane] +planes) = [plane] -> Definers plane forall plane. [plane] -> Definers plane -Definers ([plane] -> Definers plane) -> [plane] -> Definers plane +Definers ([plane] -> Definers plane) -> [plane] -> Definers plane forall a b. (a -> b) -> a -> b $ plane -> [plane] -> [plane] -go plane -plane [plane] -planes - where - q :: Point 2 r -q = r -> r -> Point 2 r +go plane +plane [plane] +planes + where + q :: Point 2 r +q = r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x (r -yr -> r -> r +x (r +yr -> r -> r forall a. Num a => a -> a -> a +r 1) - q' :: Point 2 r -q' = r -> r -> Point 2 r + q' :: Point 2 r +q' = r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 (r -xr -> r -> r +xr -> r -> r forall a. Num a => a -> a -> a -r 1) (r -yr -> r -> r +yr -> r -> r forall a. Num a => a -> a -> a +r 1) - up :: Vector 2 r -up = r -> r -> Vector 2 r + up :: Vector 2 r +up = r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r 0 r 1 - - -- We first test if the new plane is the new first plane (i.e. that is minimal just - -- above the vertex.) - go :: plane -> [plane] -> [plane] -go plane -h [plane] -hs = case [plane] -hs of - [] -> [plane -h] -- this case should never happen really - (plane -h':[plane] -hs') | plane -h plane -> plane -> Bool + + -- We first test if the new plane is the new first plane (i.e. that is minimal just + -- above the vertex.) + go :: plane -> [plane] -> [plane] +go plane +h [plane] +hs = case [plane] +hs of + [] -> [plane +h] -- this case should never happen really + (plane +h':[plane] +hs') | plane +h plane -> plane -> Bool forall a. Eq a => a -> a -> Bool == plane -h' -> [plane] -hs - | Bool +h' -> [plane] +hs + | Bool otherwise -> case Point 2 r -> plane -> r forall point. (Num r, 1 <= 3, Point_ point (3 - 1) r) => point -> plane -> r -forall hyperPlane (d :: Nat) r point. +forall hyperPlane (d :: Natural) r point. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d, Point_ point (d - 1) r) => point -> hyperPlane -> r evalAt Point 2 r -q plane -h r -> r -> Ordering +q plane +h r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` Point 2 r -> plane -> r forall point. (Num r, 1 <= 3, Point_ point (3 - 1) r) => point -> plane -> r -forall hyperPlane (d :: Nat) r point. +forall hyperPlane (d :: Natural) r point. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d, Point_ point (d - 1) r) => point -> hyperPlane -> r evalAt Point 2 r -q plane -h' of - Ordering +q plane +h' of + Ordering LT -> plane -h plane -> [plane] -> [plane] +h plane -> [plane] -> [plane] forall a. a -> [a] -> [a] : plane -> plane -> [plane] -> plane -> [plane] -insert plane -h plane -h' [plane] -hs' plane -h - Ordering +insert plane +h plane +h' [plane] +hs' plane +h + Ordering EQ -> case Point 2 r -> plane -> r forall point. (Num r, 1 <= 3, Point_ point (3 - 1) r) => point -> plane -> r -forall hyperPlane (d :: Nat) r point. +forall hyperPlane (d :: Natural) r point. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d, Point_ point (d - 1) r) => point -> hyperPlane -> r evalAt Point 2 r -q' plane -h r -> r -> Ordering +q' plane +h r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` Point 2 r -> plane -> r forall point. (Num r, 1 <= 3, Point_ point (3 - 1) r) => point -> plane -> r -forall hyperPlane (d :: Nat) r point. +forall hyperPlane (d :: Natural) r point. (NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d, Point_ point (d - 1) r) => point -> hyperPlane -> r evalAt Point 2 r -q' plane -h' of - Ordering +q' plane +h' of + Ordering LT -> plane -h plane -> [plane] -> [plane] +h plane -> [plane] -> [plane] forall a. a -> [a] -> [a] : plane -> plane -> [plane] -> plane -> [plane] -insert plane -h plane -h' [plane] -hs' plane -h - Ordering +insert plane +h plane +h' [plane] +hs' plane +h + Ordering _ -> plane -h' plane -> [plane] -> [plane] +h' plane -> [plane] -> [plane] forall a. a -> [a] -> [a] : plane -> plane -> [plane] -> plane -> [plane] -insert plane -h' plane -h [plane] -hs' plane -h' - -- h and h' cannot both be equal at v, q and q' - -- unless they are the same plane. - Ordering +insert plane +h' plane +h [plane] +hs' plane +h' + -- h and h' cannot both be equal at v, q and q' + -- unless they are the same plane. + Ordering GT -> plane -h' plane -> [plane] -> [plane] +h' plane -> [plane] -> [plane] forall a. a -> [a] -> [a] : plane -> plane -> [plane] -> plane -> [plane] -insert plane -h' plane -h [plane] -hs' plane -h' - - -- | try to insert h into the cyclic order. - -- pre: hPrev is guaranteed to be in the output, and occurs before h and hNxt - -- h0 is the final plane that also started the cyclic order. - -- hs are the remaining planes in the yclic order. - insert :: plane -> plane -> [plane] -> plane -> [plane] -insert plane -hPrev plane -h [plane] -hs plane -h0 = case [plane] -hs of - [] -> case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering +insert plane +h' plane +h [plane] +hs' plane +h' + + -- | try to insert h into the cyclic order. + -- pre: hPrev is guaranteed to be in the output, and occurs before h and hNxt + -- h0 is the final plane that also started the cyclic order. + -- hs are the remaining planes in the yclic order. + insert :: plane -> plane -> [plane] -> plane -> [plane] +insert plane +hPrev plane +h [plane] +hs plane +h0 = case [plane] +hs of + [] -> case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering ccwCmpAroundWith Vector 2 r -up (Point 2 r -forall point (d :: Nat) r. +up (Point 2 r +forall point (d :: Natural) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point 2 r) (Vector 2 r -> Point 2 r +origin :: Point 2 r) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -u) (Vector 2 r -> Point 2 r +u) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -w) of - Ordering +w) of + Ordering GT -> [plane -h] -- insert h and finish - Ordering +h] -- insert h and finish + Ordering _ -> [] -- h is dominated; don't insert it - where - u :: Vector 2 r -u = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r + where + u :: Vector 2 r +u = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r forall a. a -> Maybe a -> a fromMaybe Vector 2 r forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) +err (Maybe (Vector 2 r) -> Vector 2 r) -> Maybe (Vector 2 r) -> Vector 2 r forall a b. (a -> b) -> a -> b $ plane -> plane -> Maybe (Vector 2 r) @@ -968,14 +296,14 @@ (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -h0 plane -hPrev - w :: Vector 2 r -w = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r +h0 plane +hPrev + w :: Vector 2 r +w = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r forall a. a -> Maybe a -> a fromMaybe Vector 2 r forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) +err (Maybe (Vector 2 r) -> Vector 2 r) -> Maybe (Vector 2 r) -> Vector 2 r forall a b. (a -> b) -> a -> b $ plane -> plane -> Maybe (Vector 2 r) @@ -983,66 +311,66 @@ (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -h plane -h0 - err :: a -err = String -> a -forall a. HasCallStack => String -> a -error String +h plane +h0 + err :: a +err = [Char] -> a +forall a. HasCallStack => [Char] -> a +error [Char] "insertPlane: insert basecase. absurd" - (plane -hNxt:[plane] -hs') - | plane -h plane -> plane -> Bool + (plane +hNxt:[plane] +hs') + | plane +h plane -> plane -> Bool forall a. Eq a => a -> a -> Bool == plane -hNxt -> [plane] -hs -- duplicate plane; exit early - | Bool +hNxt -> [plane] +hs -- duplicate plane; exit early + | Bool otherwise -> case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering ccwCmpAroundWith Vector 2 r -up (Point 2 r -forall point (d :: Nat) r. +up (Point 2 r +forall point (d :: Natural) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point 2 r) (Vector 2 r -> Point 2 r +origin :: Point 2 r) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -u) (Vector 2 r -> Point 2 r +u) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -w) of - Ordering +w) of + Ordering GT -> plane -h plane -> [plane] -> [plane] +h plane -> [plane] -> [plane] forall a. a -> [a] -> [a] : plane -> [plane] -> plane -> [plane] -finish plane -h [plane] -hs plane -h0 - -- we've inserted h, so drop the planes that are dominated by h - Ordering +finish plane +h [plane] +hs plane +h0 + -- we've inserted h, so drop the planes that are dominated by h + Ordering _ -> plane -hNxt plane -> [plane] -> [plane] +hNxt plane -> [plane] -> [plane] forall a. a -> [a] -> [a] : plane -> plane -> [plane] -> plane -> [plane] -insert plane -hNxt plane -h [plane] -hs' plane -h0 -- try to insert at a later position - where - u :: Vector 2 r -u = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r +insert plane +hNxt plane +h [plane] +hs' plane +h0 -- try to insert at a later position + where + u :: Vector 2 r +u = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r forall a. a -> Maybe a -> a fromMaybe Vector 2 r forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) +err (Maybe (Vector 2 r) -> Vector 2 r) -> Maybe (Vector 2 r) -> Vector 2 r forall a b. (a -> b) -> a -> b $ plane -> plane -> Maybe (Vector 2 r) @@ -1050,14 +378,14 @@ (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -hNxt plane -hPrev - w :: Vector 2 r -w = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r +hNxt plane +hPrev + w :: Vector 2 r +w = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r forall a. a -> Maybe a -> a fromMaybe Vector 2 r forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) +err (Maybe (Vector 2 r) -> Vector 2 r) -> Maybe (Vector 2 r) -> Vector 2 r forall a b. (a -> b) -> a -> b $ plane -> plane -> Maybe (Vector 2 r) @@ -1065,69 +393,69 @@ (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -h plane -hNxt - err :: a -err = String -> a -forall a. HasCallStack => String -> a -error String +h plane +hNxt + err :: a +err = [Char] -> a +forall a. HasCallStack => [Char] -> a +error [Char] "insertPlane: insert. absurd" - - -- we've just inserted hNew, so see if we still need/want the remaining planes - -- this is essentially List.dropWhile, but we may need the h0 plane in the end. - finish :: plane -> [plane] -> plane -> [plane] -finish plane -hNew [plane] -hs plane -h0 = case [plane] -hs of - [] -> [] - (plane -h:[plane] -hs') -> case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering + + -- we've just inserted hNew, so see if we still need/want the remaining planes + -- this is essentially List.dropWhile, but we may need the h0 plane in the end. + finish :: plane -> [plane] -> plane -> [plane] +finish plane +hNew [plane] +hs plane +h0 = case [plane] +hs of + [] -> [] + (plane +h:[plane] +hs') -> case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering ccwCmpAroundWith Vector 2 r -up (Point 2 r -forall point (d :: Nat) r. +up (Point 2 r +forall point (d :: Natural) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point 2 r) (Vector 2 r -> Point 2 r +origin :: Point 2 r) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -u) (Vector 2 r -> Point 2 r +u) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -w) of - Ordering +w) of + Ordering LT -> [plane] -hs -- hNew's region indeed ends before h's region ends, so keep - -- h and the remaining planes - Ordering +hs -- hNew's region indeed ends before h's region ends, so keep + -- h and the remaining planes + Ordering _ -> plane -> [plane] -> plane -> [plane] -finish plane -hNew [plane] -hs' plane -h0 -- hNew dominates h, so drop h. - where - hNxt :: plane -hNxt = plane -> Maybe plane -> plane +finish plane +hNew [plane] +hs' plane +h0 -- hNew dominates h, so drop h. + where + hNxt :: plane +hNxt = plane -> Maybe plane -> plane forall a. a -> Maybe a -> a fromMaybe plane -h0 (Maybe plane -> plane) -> Maybe plane -> plane +h0 (Maybe plane -> plane) -> Maybe plane -> plane forall a b. (a -> b) -> a -> b $ [plane] -> Maybe plane forall a. [a] -> Maybe a listToMaybe [plane] -hs' - - u :: Vector 2 r -u = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r +hs' + + u :: Vector 2 r +u = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r forall a. a -> Maybe a -> a fromMaybe Vector 2 r forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) +err (Maybe (Vector 2 r) -> Vector 2 r) -> Maybe (Vector 2 r) -> Vector 2 r forall a b. (a -> b) -> a -> b $ plane -> plane -> Maybe (Vector 2 r) @@ -1135,14 +463,14 @@ (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -hNxt plane -hNew - w :: Vector 2 r -w = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r +hNxt plane +hNew + w :: Vector 2 r +w = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r forall a. a -> Maybe a -> a fromMaybe Vector 2 r forall {a}. a -err (Maybe (Vector 2 r) -> Vector 2 r) +err (Maybe (Vector 2 r) -> Vector 2 r) -> Maybe (Vector 2 r) -> Vector 2 r forall a b. (a -> b) -> a -> b $ plane -> plane -> Maybe (Vector 2 r) @@ -1150,27 +478,27 @@ (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -h plane -hNxt - err :: a -err = String -> a -forall a. HasCallStack => String -> a -error String +h plane +hNxt + err :: a +err = [Char] -> a +forall a. HasCallStack => [Char] -> a +error [Char] "insertPlane: finish. absurd" - --- | Merge two lists of definers. --- --- O(n^2), since we are using incremental insertion. -mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) - => Point 3 r - -> Definers plane -> Definers plane - -> Definers plane -mergeDefiners :: forall plane r. + +-- | Merge two lists of definers. +-- +-- O(n^2), since we are using incremental insertion. +mergeDefiners :: (Plane_ plane r, Eq plane, Ord r, Fractional r) + => Point 3 r + -> Definers plane -> Definers plane + -> Definers plane +mergeDefiners :: forall plane r. (Plane_ plane r, Eq plane, Ord r, Fractional r) => Point 3 r -> Definers plane -> Definers plane -> Definers plane -mergeDefiners (Point3 r -x r -y r +mergeDefiners (Point3 r +x r +y r _) = (plane -> Definers plane -> Definers plane) -> Definers plane -> Definers plane -> Definers plane forall a b. (a -> b -> b) -> b -> Definers a -> b @@ -1187,22 +515,31 @@ $ r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x r -y) --- TODO: improve running time - --------------------------------------------------------------------------------- --- * Converting into a minimization diagram - --- | Given the vertices of the lower envelope; compute the minimization diagram. --- --- \(O(h\log h)\) assuming that the input is degenerate. -fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) - => VertexForm r plane -> MinimizationDiagram r plane -fromVertexForm :: forall plane r. +x r +y) +-- TODO: improve running time + +-------------------------------------------------------------------------------- +-- * Converting into a minimization diagram + +-- | Given the vertices of the lower envelope; compute the minimization diagram. +-- +-- \(O(h\log h)\) assuming that the input is degenerate. +fromVertexForm :: (Plane_ plane r, Ord plane, Ord r, Fractional r) + => VertexForm r plane -> MinimizationDiagram r plane +fromVertexForm :: forall plane r. (Plane_ plane r, Ord plane, Ord r, Fractional r) => VertexForm r plane -> MinimizationDiagram r plane -fromVertexForm = (plane -> Set (Point 3 r, Definers plane) -> Region r (Point 2 r)) +fromVertexForm = Map plane (Region r (Point 2 r)) -> MinimizationDiagram r plane +forall r plane. +Map plane (Region r (Point 2 r)) -> MinimizationDiagram r plane +MinimizationDiagram + (Map plane (Region r (Point 2 r)) -> MinimizationDiagram r plane) +-> (VertexForm r plane -> Map plane (Region r (Point 2 r))) +-> VertexForm r plane +-> MinimizationDiagram r plane +forall b c a. (b -> c) -> (a -> b) -> a -> c +. (plane -> Set (Point 3 r, Definers plane) -> Region r (Point 2 r)) -> Map plane (Set (Point 3 r, Definers plane)) -> Map plane (Region r (Point 2 r)) forall k a b. (k -> a -> b) -> Map k a -> Map k b @@ -1224,45 +561,45 @@ forall k' v' k v. (Ord k', Semigroup v') => (k -> v -> Map k' v') -> Map k v -> Map k' v' -mapWithKeyMerge (\Point 3 r -v Definers plane -defs -> - [(plane, Set (Point 3 r, Definers plane))] +mapWithKeyMerge (\Point 3 r +v Definers plane +defs -> + [(plane, Set (Point 3 r, Definers plane))] -> Map plane (Set (Point 3 r, Definers plane)) forall k a. Ord k => [(k, a)] -> Map k a Map.fromList [ (plane -h, (Point 3 r, Definers plane) -> Set (Point 3 r, Definers plane) +h, (Point 3 r, Definers plane) -> Set (Point 3 r, Definers plane) forall a. a -> Set a Set.singleton (Point 3 r -v,Definers plane -defs)) - | plane -h <- Definers plane -> [plane] +v,Definers plane +defs)) + | plane +h <- Definers plane -> [plane] forall a. Definers a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList Definers plane -defs - ]) --- for each vertex v, we go through its definers defs; and for each such plane h, we --- associate it with with the set {(v,defs)}. the foldMapWithKey part thus collects all --- vertices (together with their definers) incident to h. i.e. it combines these sets {(v, --- defsV)} and {(u, defsU)} etc into one big set with all vertices. - --- TODO: we should improve the running time of merge for the definers from O(k^2) to --- O(k\log k). that should bring the overall running time to O(nlog n) even for degenerate --- inputs. - --- | Given a plane h, and the set of vertices incident to h, compute the corresponding --- region in the minimization diagram. -sortAroundBoundary :: (Plane_ plane r, Ord r, Fractional r, Ord plane) - => plane -> Set (Point 3 r, Definers plane) - -> Region r (Point 2 r) -sortAroundBoundary :: forall plane r. +defs + ]) +-- for each vertex v, we go through its definers defs; and for each such plane h, we +-- associate it with with the set {(v,defs)}. the foldMapWithKey part thus collects all +-- vertices (together with their definers) incident to h. i.e. it combines these sets {(v, +-- defsV)} and {(u, defsU)} etc into one big set with all vertices. + +-- TODO: we should improve the running time of merge for the definers from O(k^2) to +-- O(k\log k). that should bring the overall running time to O(nlog n) even for degenerate +-- inputs. + +-- | Given a plane h, and the set of vertices incident to h, compute the corresponding +-- region in the minimization diagram. +sortAroundBoundary :: (Plane_ plane r, Ord r, Fractional r, Ord plane) + => plane -> Set (Point 3 r, Definers plane) + -> Region r (Point 2 r) +sortAroundBoundary :: forall plane r. (Plane_ plane r, Ord r, Fractional r, Ord plane) => plane -> Set (Point 3 r, Definers plane) -> Region r (Point 2 r) -sortAroundBoundary plane -h Set (Point 3 r, Definers plane) -vertices = case [(Point 2 r, Definers plane)] -> [(Point 2 r, Definers plane)] +sortAroundBoundary plane +h Set (Point 3 r, Definers plane) +vertices = case [(Point 2 r, Definers plane)] -> [(Point 2 r, Definers plane)] forall r a. (Ord r, Fractional r) => [(Point 2 r, a)] -> [(Point 2 r, a)] @@ -1289,16 +626,16 @@ -> Set (Point 3 r, Definers plane) -> [(Point 2 r, Definers plane)] forall a b. (a -> b) -> a -> b $ Set (Point 3 r, Definers plane) -vertices of - [] -> String -> Region r (Point 2 r) -forall a. HasCallStack => String -> a -error String +vertices of + [] -> [Char] -> Region r (Point 2 r) +forall a. HasCallStack => [Char] -> a +error [Char] "absurd: every plane has a non-empty set of incident vertices" - [(Point 2 r, Definers plane) -v] -> let (Vector 2 r -u,Point 2 r -p,Vector 2 r -w) = plane + [(Point 2 r, Definers plane) +v] -> let (Vector 2 r +u,Point 2 r +p,Vector 2 r +w) = plane -> (Point 2 r, Definers plane) -> (Vector 2 r, Point 2 r, Vector 2 r) forall plane r. @@ -1307,35 +644,35 @@ -> (Point 2 r, Definers plane) -> (Vector 2 r, Point 2 r, Vector 2 r) singleVertex plane -h (Point 2 r, Definers plane) -v in Vector 2 r +h (Point 2 r, Definers plane) +v in Vector 2 r -> NonEmpty (Point 2 r) -> Vector 2 r -> Region r (Point 2 r) forall r point. Vector 2 r -> NonEmpty point -> Vector 2 r -> Region r point -Unbounded Vector 2 r -u (Point 2 r -> NonEmpty (Point 2 r) +Unbounded Vector 2 r +u (Point 2 r -> NonEmpty (Point 2 r) forall a. a -> NonEmpty a NonEmpty.singleton Point 2 r -p) Vector 2 r -w - [(Point 2 r, Definers plane)] -vertices' -> let edges :: [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -edges = [(Point 2 r, Definers plane)] +p) Vector 2 r +w + [(Point 2 r, Definers plane)] +vertices' -> let edges :: [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] +edges = [(Point 2 r, Definers plane)] -> [(Point 2 r, Definers plane)] -> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] forall a b. [a] -> [b] -> [(a, b)] zip [(Point 2 r, Definers plane)] -vertices' (Int +vertices' (Int -> [(Point 2 r, Definers plane)] -> [(Point 2 r, Definers plane)] forall a. Int -> [a] -> [a] drop Int 1 [(Point 2 r, Definers plane)] -vertices' [(Point 2 r, Definers plane)] +vertices' [(Point 2 r, Definers plane)] -> [(Point 2 r, Definers plane)] -> [(Point 2 r, Definers plane)] forall a. Semigroup a => a -> a -> a <> [(Point 2 r, Definers plane)] -vertices') - in case (((Point 2 r, Definers plane), (Point 2 r, Definers plane)) +vertices') + in case (((Point 2 r, Definers plane), (Point 2 r, Definers plane)) -> Bool) -> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -> ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))], @@ -1350,14 +687,14 @@ -> ((Point 2 r, Definers plane), (Point 2 r, Definers plane)) -> Bool isInvalid plane -h) [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -edges of - ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -vs, ((Point 2 r, Definers plane) -u,(Point 2 r, Definers plane) -v) : [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -ws) -> let chain :: NonEmpty (Point 2 r) -chain = [Point 2 r] -> NonEmpty (Point 2 r) +h) [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] +edges of + ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))] +vs, ((Point 2 r, Definers plane) +u,(Point 2 r, Definers plane) +v) : [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] +ws) -> let chain :: NonEmpty (Point 2 r) +chain = [Point 2 r] -> NonEmpty (Point 2 r) forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList ([Point 2 r] -> NonEmpty (Point 2 r)) -> ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))] @@ -1382,25 +719,25 @@ -> (Point 2 r, Definers plane) forall a b. (a, b) -> a fst) - ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))] + ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -> NonEmpty (Point 2 r)) -> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -> NonEmpty (Point 2 r) forall a b. (a -> b) -> a -> b $ [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -ws [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] +ws [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] forall a. Semigroup a => a -> a -> a <> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -vs [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] +vs [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] -> [((Point 2 r, Definers plane), (Point 2 r, Definers plane))] forall a. Semigroup a => a -> a -> a <> [((Point 2 r, Definers plane) -u,(Point 2 r, Definers plane) -v)] - in plane +u,(Point 2 r, Definers plane) +v)] + in plane -> NonEmpty (Point 2 r) -> (Point 2 r, Definers plane) -> (Point 2 r, Definers plane) @@ -1413,14 +750,14 @@ -> (Point 2 r, Definers plane) -> Region r (Point 2 r) unboundedRegion plane -h NonEmpty (Point 2 r) -chain (Point 2 r, Definers plane) -v (Point 2 r, Definers plane) -u - ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))] +h NonEmpty (Point 2 r) +chain (Point 2 r, Definers plane) +v (Point 2 r, Definers plane) +u + ([((Point 2 r, Definers plane), (Point 2 r, Definers plane))] _, []) -> [Point 2 r] -> Region r (Point 2 r) forall r point. CircularList point -> Region r point -Bounded ([Point 2 r] -> Region r (Point 2 r)) +Bounded ([Point 2 r] -> Region r (Point 2 r)) -> [Point 2 r] -> Region r (Point 2 r) forall a b. (a -> b) -> a -> b $ ((Point 2 r, Definers plane) -> Point 2 r) @@ -1429,114 +766,114 @@ map (Point 2 r, Definers plane) -> Point 2 r forall a b. (a, b) -> a fst [(Point 2 r, Definers plane)] -vertices' - - --- | Given a plane h, and the single vertex v incident to the region of h, computes the --- unbounded region for h. --- --- In particular, returns the pair (u,p,w). h is the region to the left of u, and also the --- left of w. -singleVertex :: (Plane_ plane r, Ord r, Fractional r, Ord plane) - => plane -> (Point 2 r, Definers plane) - -> (Vector 2 r, Point 2 r, Vector 2 r) -singleVertex :: forall plane r. +vertices' + + +-- | Given a plane h, and the single vertex v incident to the region of h, computes the +-- unbounded region for h. +-- +-- In particular, returns the pair (u,p,w). h is the region to the left of u, and also the +-- left of w. +singleVertex :: (Plane_ plane r, Ord r, Fractional r, Ord plane) + => plane -> (Point 2 r, Definers plane) + -> (Vector 2 r, Point 2 r, Vector 2 r) +singleVertex :: forall plane r. (Plane_ plane r, Ord r, Fractional r, Ord plane) => plane -> (Point 2 r, Definers plane) -> (Vector 2 r, Point 2 r, Vector 2 r) -singleVertex plane -h (Point 2 r -v,Definers plane -defs) = (Vector 2 r, Point 2 r, Vector 2 r) +singleVertex plane +h (Point 2 r +v,Definers plane +defs) = (Vector 2 r, Point 2 r, Vector 2 r) -> Maybe (Vector 2 r, Point 2 r, Vector 2 r) -> (Vector 2 r, Point 2 r, Vector 2 r) forall a. a -> Maybe a -> a -fromMaybe (String -> (Vector 2 r, Point 2 r, Vector 2 r) -forall a. HasCallStack => String -> a -error String +fromMaybe ([Char] -> (Vector 2 r, Point 2 r, Vector 2 r) +forall a. HasCallStack => [Char] -> a +error [Char] "singleVertex: absurd") (Maybe (Vector 2 r, Point 2 r, Vector 2 r) -> (Vector 2 r, Point 2 r, Vector 2 r)) -> Maybe (Vector 2 r, Point 2 r, Vector 2 r) -> (Vector 2 r, Point 2 r, Vector 2 r) forall a b. (a -> b) -> a -> b $ - do (plane -hPred,plane -hSucc) <- plane -> Definers plane -> Maybe (plane, plane) + do (plane +hPred,plane +hSucc) <- plane -> Definers plane -> Maybe (plane, plane) forall plane. Eq plane => plane -> Definers plane -> Maybe (plane, plane) findNeighbours plane -h Definers plane -defs - Vector 2 r -u <- plane -> plane -> Maybe (Vector 2 r) +h Definers plane +defs + Vector 2 r +u <- plane -> plane -> Maybe (Vector 2 r) forall plane r. (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -h plane -hPred - Vector 2 r -w <- plane -> plane -> Maybe (Vector 2 r) +h plane +hPred + Vector 2 r +w <- plane -> plane -> Maybe (Vector 2 r) forall plane r. (Plane_ plane r, Ord r, Fractional r) => plane -> plane -> Maybe (Vector 2 r) intersectionVector plane -h plane -hSucc - (Vector 2 r, Point 2 r, Vector 2 r) +h plane +hSucc + (Vector 2 r, Point 2 r, Vector 2 r) -> Maybe (Vector 2 r, Point 2 r, Vector 2 r) forall a. a -> Maybe a forall (f :: * -> *) a. Applicative f => a -> f a pure (Vector 2 r -w, Point 2 r -v, Vector 2 r -u) - --- | Given: --- --- - plane h bounding an unbounded region R --- - the chain of vertices bounding R --- - the first vertex v (with its definers) --- - the last vertex v (with its definers) --- --- computes the actual region R. In particular, we compute the direction that the --- unbounded edges have. -unboundedRegion :: forall plane r.(Plane_ plane r, Ord r, Fractional r, Ord plane) - => plane - -> NonEmpty (Point 2 r) - -> (Point 2 r, Definers plane) -> (Point 2 r, Definers plane) - -> Region r (Point 2 r) -unboundedRegion :: forall plane r. +w, Point 2 r +v, Vector 2 r +u) + +-- | Given: +-- +-- - plane h bounding an unbounded region R +-- - the chain of vertices bounding R +-- - the first vertex v (with its definers) +-- - the last vertex v (with its definers) +-- +-- computes the actual region R. In particular, we compute the direction that the +-- unbounded edges have. +unboundedRegion :: forall plane r.(Plane_ plane r, Ord r, Fractional r, Ord plane) + => plane + -> NonEmpty (Point 2 r) + -> (Point 2 r, Definers plane) -> (Point 2 r, Definers plane) + -> Region r (Point 2 r) +unboundedRegion :: forall plane r. (Plane_ plane r, Ord r, Fractional r, Ord plane) => plane -> NonEmpty (Point 2 r) -> (Point 2 r, Definers plane) -> (Point 2 r, Definers plane) -> Region r (Point 2 r) -unboundedRegion plane -h NonEmpty (Point 2 r) -chain v :: (Point 2 r, Definers plane) -v@(Point 2 r -v',Definers plane -_) u :: (Point 2 r, Definers plane) -u@(Point 2 r -u',Definers plane +unboundedRegion plane +h NonEmpty (Point 2 r) +chain v :: (Point 2 r, Definers plane) +v@(Point 2 r +v',Definers plane +_) u :: (Point 2 r, Definers plane) +u@(Point 2 r +u',Definers plane _) = Vector 2 r -> NonEmpty (Point 2 r) -> Vector 2 r -> Region r (Point 2 r) forall r point. Vector 2 r -> NonEmpty point -> Vector 2 r -> Region r point -Unbounded Vector 2 r -wv NonEmpty (Point 2 r) -chain Vector 2 r -wu - where - (Vector 2 r -v1,Point 2 r -_,Vector 2 r -v2) = plane +Unbounded Vector 2 r +wv NonEmpty (Point 2 r) +chain Vector 2 r +wu + where + (Vector 2 r +v1,Point 2 r +_,Vector 2 r +v2) = plane -> (Point 2 r, Definers plane) -> (Vector 2 r, Point 2 r, Vector 2 r) forall plane r. @@ -1545,12 +882,12 @@ -> (Point 2 r, Definers plane) -> (Vector 2 r, Point 2 r, Vector 2 r) singleVertex plane -h (Point 2 r, Definers plane) -v - (Vector 2 r -u1,Point 2 r -_,Vector 2 r -u2) = plane +h (Point 2 r, Definers plane) +v + (Vector 2 r +u1,Point 2 r +_,Vector 2 r +u2) = plane -> (Point 2 r, Definers plane) -> (Vector 2 r, Point 2 r, Vector 2 r) forall plane r. @@ -1559,235 +896,235 @@ -> (Point 2 r, Definers plane) -> (Vector 2 r, Point 2 r, Vector 2 r) singleVertex plane -h (Point 2 r, Definers plane) -u - - z :: Vector 2 r -z = Point 2 r -u' Point 2 r -> Point 2 r -> Vector 2 r -forall point (d :: Nat) r. +h (Point 2 r, Definers plane) +u + + z :: Vector 2 r +z = Point 2 r +u' Point 2 r -> Point 2 r -> Vector 2 r +forall point (d :: Natural) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point 2 r -v' - wv :: Vector 2 r -wv = case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering +v' + wv :: Vector 2 r +wv = case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering ccwCmpAroundWith Vector 2 r -z (Point 2 r -forall point (d :: Nat) r. +z (Point 2 r +forall point (d :: Natural) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point 2 r) (Vector 2 r -> Point 2 r +origin :: Point 2 r) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point (Vector 2 r -> Point 2 r) -> Vector 2 r -> Point 2 r forall a b. (a -> b) -> a -> b $ Vector 2 r -> Vector 2 r -forall r vector (d :: Nat). +forall r vector (d :: Natural). (Num r, Vector_ vector d r) => vector -> vector negated Vector 2 r -v1) (Vector 2 r -> Point 2 r +v1) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point (Vector 2 r -> Point 2 r) -> Vector 2 r -> Point 2 r forall a b. (a -> b) -> a -> b $ Vector 2 r -> Vector 2 r -forall r vector (d :: Nat). +forall r vector (d :: Natural). (Num r, Vector_ vector d r) => vector -> vector negated Vector 2 r -v2) of - Ordering +v2) of + Ordering LT -> Vector 2 r -v1 - Ordering +v1 + Ordering EQ -> Vector 2 r -v2 -- this probably shouldn't happen - Ordering +v2 -- this probably shouldn't happen + Ordering GT -> Vector 2 r -v2 - wu :: Vector 2 r -wu = case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering +v2 + wu :: Vector 2 r +wu = case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering ccwCmpAroundWith Vector 2 r -z (Point 2 r -forall point (d :: Nat) r. +z (Point 2 r +forall point (d :: Natural) r. (Num r, ConstructablePoint_ point d r) => point -origin :: Point 2 r) (Vector 2 r -> Point 2 r +origin :: Point 2 r) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -u1) (Vector 2 r -> Point 2 r +u1) (Vector 2 r -> Point 2 r forall v. v -> PointF v Point Vector 2 r -u2) of - Ordering +u2) of + Ordering LT -> Vector 2 r -u2 - Ordering +u2 + Ordering EQ -> Vector 2 r -u1 -- this probably shouldn't happen - Ordering +u1 -- this probably shouldn't happen + Ordering GT -> Vector 2 r -u1 - -- we essentially compare the vectors u1 and u2, and pick the "most CCW" one with respect - -- to the vector from v to u. - - -- overall idea: we reduce to the single vertex case; essentially computing the - -- region of h in the minimization diagram with respect to just the definers of u. - -- this region has two unbounded edges that have directions u1 and u2. - -- - -- the direction wu of the unbounded edge incident to u is one of these two vectors; - -- either u1 or u2. In particular, if we go from v to u, then we want the "most CCW" - -- vector among u1 and u2. - -- - -- We symettrically compute the diagram around v, giving us two candidates v1 and v2. If - -- we arrive at v using v1 or v2, and then turn towards u, we should make a CCW - -- turn. So, we again order the vectors with respect to the base vector from v to u. - -- - -- note we can create a point p so that the vector from p to v is "v1" by using p = v - -- .+^ (negated v1). Hence the negateds. (In the end we just translate everything so - -- that v is the origin, so then we don't need to .+^ the v's.) - - --- | Test if (u,v) is an invalid edge to be on the CCW boundary of h. this can mean that --- either (u,v) is not an actual edge (i.e. u and v) are connected to the vertex at --- infinity. Or that the edge is in the wrong orientation -isInvalid :: (Plane_ plane r, Eq plane, Ord r, Fractional r) - => plane - -> ( (Point 2 r, Definers plane) - , (Point 2 r, Definers plane)) -> Bool -isInvalid :: forall plane r. +u1 + -- we essentially compare the vectors u1 and u2, and pick the "most CCW" one with respect + -- to the vector from v to u. + + -- overall idea: we reduce to the single vertex case; essentially computing the + -- region of h in the minimization diagram with respect to just the definers of u. + -- this region has two unbounded edges that have directions u1 and u2. + -- + -- the direction wu of the unbounded edge incident to u is one of these two vectors; + -- either u1 or u2. In particular, if we go from v to u, then we want the "most CCW" + -- vector among u1 and u2. + -- + -- We symettrically compute the diagram around v, giving us two candidates v1 and v2. If + -- we arrive at v using v1 or v2, and then turn towards u, we should make a CCW + -- turn. So, we again order the vectors with respect to the base vector from v to u. + -- + -- note we can create a point p so that the vector from p to v is "v1" by using p = v + -- .+^ (negated v1). Hence the negateds. (In the end we just translate everything so + -- that v is the origin, so then we don't need to .+^ the v's.) + + +-- | Test if (u,v) is an invalid edge to be on the CCW boundary of h. this can mean that +-- either (u,v) is not an actual edge (i.e. u and v) are connected to the vertex at +-- infinity. Or that the edge is in the wrong orientation +isInvalid :: (Plane_ plane r, Eq plane, Ord r, Fractional r) + => plane + -> ( (Point 2 r, Definers plane) + , (Point 2 r, Definers plane)) -> Bool +isInvalid :: forall plane r. (Plane_ plane r, Eq plane, Ord r, Fractional r) => plane -> ((Point 2 r, Definers plane), (Point 2 r, Definers plane)) -> Bool -isInvalid plane -h ((Point 2 r -_u,Definers plane -defsU), (Point 2 r -_v,Definers plane -defsV)) = - Bool -> Maybe Bool -> Bool +isInvalid plane +h ((Point 2 r +_u,Definers plane +defsU), (Point 2 r +_v,Definers plane +defsV)) = + Bool -> Maybe Bool -> Bool forall a. a -> Maybe a -> a -fromMaybe (String -> Bool -forall a. HasCallStack => String -> a -error String +fromMaybe ([Char] -> Bool +forall a. HasCallStack => [Char] -> a +error [Char] "isInvalid: h not found in the definers!?") (Maybe Bool -> Bool) -> Maybe Bool -> Bool forall a b. (a -> b) -> a -> b $ do - (plane -hPredU,plane + (plane +hPredU,plane _) <- plane -> Definers plane -> Maybe (plane, plane) forall plane. Eq plane => plane -> Definers plane -> Maybe (plane, plane) findNeighbours plane -h Definers plane -defsU - (plane -_,plane -hSuccV) <- plane -> Definers plane -> Maybe (plane, plane) +h Definers plane +defsU + (plane +_,plane +hSuccV) <- plane -> Definers plane -> Maybe (plane, plane) forall plane. Eq plane => plane -> Definers plane -> Maybe (plane, plane) findNeighbours plane -h Definers plane -defsV - Bool -> Maybe Bool +h Definers plane +defsV + Bool -> Maybe Bool forall a. a -> Maybe a forall (f :: * -> *) a. Applicative f => a -> f a pure (Bool -> Maybe Bool) -> Bool -> Maybe Bool forall a b. (a -> b) -> a -> b $ plane -hPredU plane -> plane -> Bool +hPredU plane -> plane -> Bool forall a. Eq a => a -> a -> Bool /= plane -hSuccV - -- if (u,v) is actually a valid edge, i.e. it has h to its left, then the CCW - -- successor w.r.t to v, and the CCW predecessor w.r.t u must be the same plane. - -- if that is not the case the edge must be invalid. - --- | Project the vertex onto the plane. -project :: (Point 3 r, a) -> (Point 2 r, a) -project :: forall r a. (Point 3 r, a) -> (Point 2 r, a) -project (Point3 r -x r -y r -_, a -loc) = (r -> r -> Point 2 r +hSuccV + -- if (u,v) is actually a valid edge, i.e. it has h to its left, then the CCW + -- successor w.r.t to v, and the CCW predecessor w.r.t u must be the same plane. + -- if that is not the case the edge must be invalid. + +-- | Project the vertex onto the plane. +project :: (Point 3 r, a) -> (Point 2 r, a) +project :: forall r a. (Point 3 r, a) -> (Point 2 r, a) +project (Point3 r +x r +y r +_, a +loc) = (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -x r -y, a -loc) - --- | Given a list of vertices of a (possibly unbounded) convex polygonal region (in --- arbitrary orientation), sort the vertices so that they are listed in CCW order. -inCCWOrder :: (Ord r, Fractional r) => [(Point 2 r, a)] -> [(Point 2 r, a)] -inCCWOrder :: forall r a. +x r +y, a +loc) + +-- | Given a list of vertices of a (possibly unbounded) convex polygonal region (in +-- arbitrary orientation), sort the vertices so that they are listed in CCW order. +inCCWOrder :: (Ord r, Fractional r) => [(Point 2 r, a)] -> [(Point 2 r, a)] +inCCWOrder :: forall r a. (Ord r, Fractional r) => [(Point 2 r, a)] -> [(Point 2 r, a)] -inCCWOrder [(Point 2 r, a)] -pts = case [(Point 2 r, a)] -pts of - ((Point 2 r -p,a -_):(Point 2 r -q,a +inCCWOrder [(Point 2 r, a)] +pts = case [(Point 2 r, a)] +pts of + ((Point 2 r +p,a +_):(Point 2 r +q,a _):[(Point 2 r, a)] -_) -> let c :: Point 2 r -c = Point 2 r -p Point 2 r -> Vector 2 r -> Point 2 r -forall point (d :: Nat) r. +_) -> let c :: Point 2 r +c = Point 2 r +p Point 2 r -> Vector 2 r -> Point 2 r +forall point (d :: Natural) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ ((Point 2 r -q Point 2 r -> Point 2 r -> Vector 2 r -forall point (d :: Nat) r. +q Point 2 r -> Point 2 r -> Vector 2 r +forall point (d :: Natural) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point 2 r -p) Vector 2 r -> r -> Vector 2 r -forall vector (d :: Nat) r. +p) Vector 2 r -> r -> Vector 2 r +forall vector (d :: Natural) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector ^/ r 2) - cmp :: (Point 2 r, a) -> (Point 2 r, a) -> Ordering -cmp (Point 2 r -a,a -_) (Point 2 r -b,a + cmp :: (Point 2 r, a) -> (Point 2 r, a) -> Ordering +cmp (Point 2 r +a,a +_) (Point 2 r +b,a _) = Point 2 r -> Point 2 r -> Point 2 r -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering ccwCmpAround Point 2 r -c Point 2 r -a Point 2 r -b Ordering -> Ordering -> Ordering +c Point 2 r +a Point 2 r +b Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> Point 2 r -> Point 2 r -> Point 2 r -> Ordering -forall r point (d :: Nat) center. +forall r point (d :: Natural) center. (Ord r, Num r, Point_ point d r, Point_ center d r, Metric_ (Vector d r) d r) => center -> point -> point -> Ordering cmpByDistanceTo Point 2 r -c Point 2 r -a Point 2 r -b - in ((Point 2 r, a) -> (Point 2 r, a) -> Ordering) +c Point 2 r +a Point 2 r +b + in ((Point 2 r, a) -> (Point 2 r, a) -> Ordering) -> [(Point 2 r, a)] -> [(Point 2 r, a)] forall a. (a -> a -> Ordering) -> [a] -> [a] List.sortBy (Point 2 r, a) -> (Point 2 r, a) -> Ordering -cmp [(Point 2 r, a)] -pts - [(Point 2 r, a)] +cmp [(Point 2 r, a)] +pts + [(Point 2 r, a)] _ -> [(Point 2 r, a)] -pts -- already sorted. - \ No newline at end of file +pts -- already sorted. + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Separator.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Separator.html index 1e18b8252..3a918a0b3 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Separator.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Separator.html @@ -32,78 +32,78 @@ -- | Computes a breath first forest -- (O(n \log n)) -bff :: Ord k => PlaneGraph k v e -> [Tree k] +bff :: Ord k => PlaneGraph k v e -> [Tree k] bff :: forall k v e. Ord k => PlaneGraph k v e -> [Tree k] -bff PlaneGraph k v e -gr = Set k -> [Tree k] -go (PlaneGraph k v e -> Set k +bff PlaneGraph k v e +gr = Set k -> [Tree k] +go (PlaneGraph k v e -> Set k forall k a. Map k a -> Set k Map.keysSet PlaneGraph k v e -gr) +gr) where - go :: Set k -> [Tree k] -go Set k -remaining = case Set k -> Maybe (k, Set k) + go :: Set k -> [Tree k] +go Set k +remaining = case Set k -> Maybe (k, Set k) forall a. Set a -> Maybe (a, Set a) Set.minView Set k -remaining of +remaining of Maybe (k, Set k) Nothing -> [] - Just (k -v, Set k -remaining') -> let (Set k -remaining'', Tree k -t) = PlaneGraph k v e -> k -> Set k -> (Set k, Tree k) + Just (k +v, Set k +remaining') -> let (Set k +remaining'', Tree k +t) = PlaneGraph k v e -> k -> Set k -> (Set k, Tree k) forall k v e. Ord k => PlaneGraph k v e -> k -> Set k -> (Set k, Tree k) bfs PlaneGraph k v e -gr k -v Set k -remaining' +gr k +v Set k +remaining' in Tree k -t Tree k -> [Tree k] -> [Tree k] +t Tree k -> [Tree k] -> [Tree k] forall a. a -> [a] -> [a] : Set k -> [Tree k] -go Set k -remaining'' +go Set k +remaining'' -- | Turn the map into a tree. -toTree :: Ord k => Map k [k] -> k -> Tree k +toTree :: Ord k => Map k [k] -> k -> Tree k toTree :: forall k. Ord k => Map k [k] -> k -> Tree k -toTree Map k [k] -m = k -> Tree k -go +toTree Map k [k] +m = k -> Tree k +go where - go :: k -> Tree k -go k -s = k -> [Tree k] -> Tree k + go :: k -> Tree k +go k +s = k -> [Tree k] -> Tree k forall a. a -> [Tree a] -> Tree a Node k -s ([Tree k] -> Tree k) -> [Tree k] -> Tree k +s ([Tree k] -> Tree k) -> [Tree k] -> Tree k forall a b. (a -> b) -> a -> b $ (k -> Tree k) -> [k] -> [Tree k] forall a b. (a -> b) -> [a] -> [b] map k -> Tree k -go ([k] -> Maybe [k] -> [k] +go ([k] -> Maybe [k] -> [k] forall a. a -> Maybe a -> a fromMaybe [] (Maybe [k] -> [k]) -> Maybe [k] -> [k] forall a b. (a -> b) -> a -> b $ k -> Map k [k] -> Maybe [k] forall k a. Ord k => k -> Map k a -> Maybe a Map.lookup k -s Map k [k] -m) +s Map k [k] +m) -- | BFS from the given starting vertex, and the set of still-to-visit vertices. -- returns the remaining still-to-visit vertices and the tree. -bfs :: Ord k => PlaneGraph k v e -> k -> Set k -> (Set k, Tree k) +bfs :: Ord k => PlaneGraph k v e -> k -> Set k -> (Set k, Tree k) bfs :: forall k v e. Ord k => PlaneGraph k v e -> k -> Set k -> (Set k, Tree k) -bfs PlaneGraph k v e -gr k -s = (Map k [k] -> Tree k) -> (Set k, Map k [k]) -> (Set k, Tree k) +bfs PlaneGraph k v e +gr k +s = (Map k [k] -> Tree k) -> (Set k, Map k [k]) -> (Set k, Tree k) forall a b. (a -> b) -> (Set k, a) -> (Set k, b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap ((Map k [k] -> k -> Tree k) -> k -> Map k [k] -> Tree k @@ -111,46 +111,46 @@ flip Map k [k] -> k -> Tree k forall k. Ord k => Map k [k] -> k -> Tree k toTree k -s) ((Set k, Map k [k]) -> (Set k, Tree k)) +s) ((Set k, Map k [k]) -> (Set k, Tree k)) -> (Set k -> (Set k, Map k [k])) -> Set k -> (Set k, Tree k) forall b c a. (b -> c) -> (a -> b) -> a -> c . [k] -> Set k -> (Set k, Map k [k]) -bfs' [k -s] +bfs' [k +s] where - bfs' :: [k] -> Set k -> (Set k, Map k [k]) -bfs' [k] -lvl Set k -remaining = (k -> (Set k, Map k [k]) -> (Set k, Map k [k])) + bfs' :: [k] -> Set k -> (Set k, Map k [k]) +bfs' [k] +lvl Set k +remaining = (k -> (Set k, Map k [k]) -> (Set k, Map k [k])) -> (Set k, Map k [k]) -> [k] -> (Set k, Map k [k]) forall a b. (a -> b -> b) -> b -> [a] -> b forall (t :: * -> *) a b. Foldable t => (a -> b -> b) -> b -> t a -> b foldr k -> (Set k, Map k [k]) -> (Set k, Map k [k]) -visit (Set k -remaining, Map k [k] +visit (Set k +remaining, Map k [k] forall k a. Map k a Map.empty) [k] -lvl +lvl - visit :: k -> (Set k, Map k [k]) -> (Set k, Map k [k]) -visit k -v (Set k -remaining, Map k [k] -m) = let chs :: [k] -chs = (k -> Bool) -> [k] -> [k] + visit :: k -> (Set k, Map k [k]) -> (Set k, Map k [k]) +visit k +v (Set k +remaining, Map k [k] +m) = let chs :: [k] +chs = (k -> Bool) -> [k] -> [k] forall a. (a -> Bool) -> [a] -> [a] filter ((k -> Set k -> Bool) -> Set k -> k -> Bool forall a b c. (a -> b -> c) -> b -> a -> c flip k -> Set k -> Bool forall a. Ord a => a -> Set a -> Bool Set.member Set k -remaining) ([k] -> [k]) -> [k] -> [k] +remaining) ([k] -> [k]) -> [k] -> [k] forall a b. (a -> b) -> a -> b $ k -> [k] -neighs k -v +neighs k +v in ((k -> Set k -> Set k) -> Set k -> [k] -> Set k forall a b. (a -> b -> b) -> b -> [a] -> b forall (t :: * -> *) a b. @@ -159,16 +159,16 @@ foldr k -> Set k -> Set k forall a. Ord a => a -> Set a -> Set a Set.delete Set k -remaining [k] -chs, k -> [k] -> Map k [k] -> Map k [k] +remaining [k] +chs, k -> [k] -> Map k [k] -> Map k [k] forall k a. Ord k => k -> a -> Map k a -> Map k a Map.insert k -v [k] -chs Map k [k] -m) - neighs :: k -> [k] -neighs k -v = [k] -> ((Map e k, v) -> [k]) -> Maybe (Map e k, v) -> [k] +v [k] +chs Map k [k] +m) + neighs :: k -> [k] +neighs k +v = [k] -> ((Map e k, v) -> [k]) -> Maybe (Map e k, v) -> [k] forall b a. b -> (a -> b) -> Maybe a -> b maybe [] (Map e k -> [k] forall k a. Map k a -> [a] @@ -182,8 +182,8 @@ $ k -> PlaneGraph k v e -> Maybe (Map e k, v) forall k a. Ord k => k -> Map k a -> Maybe a Map.lookup k -v PlaneGraph k v e -gr +v PlaneGraph k v e +gr -------------------------------------------------------------------------------- @@ -192,7 +192,7 @@ -------------------------------------------------------------------------------- -data LevelInfo v = Level { forall v. LevelInfo v -> Int +data LevelInfo v = Level { forall v. LevelInfo v -> Int levelIndex :: {-# UNPACK #-}!Int , forall v. LevelInfo v -> Int levelSize :: {-# UNPACK #-}!Int @@ -201,9 +201,9 @@ accumSize :: {-# UNPACK #-}!Int -- ^ size of the prefix up to this level , forall v. LevelInfo v -> [v] -levelVertices :: [v] +levelVertices :: [v] } - deriving (Int -> LevelInfo v -> ShowS + deriving (Int -> LevelInfo v -> ShowS [LevelInfo v] -> ShowS LevelInfo v -> String (Int -> LevelInfo v -> ShowS) @@ -221,7 +221,7 @@ show :: LevelInfo v -> String $cshowList :: forall v. Show v => [LevelInfo v] -> ShowS showList :: [LevelInfo v] -> ShowS -Show,LevelInfo v -> LevelInfo v -> Bool +Show,LevelInfo v -> LevelInfo v -> Bool (LevelInfo v -> LevelInfo v -> Bool) -> (LevelInfo v -> LevelInfo v -> Bool) -> Eq (LevelInfo v) forall v. Eq v => LevelInfo v -> LevelInfo v -> Bool @@ -230,7 +230,7 @@ == :: LevelInfo v -> LevelInfo v -> Bool $c/= :: forall v. Eq v => LevelInfo v -> LevelInfo v -> Bool /= :: LevelInfo v -> LevelInfo v -> Bool -Eq,(forall m. Monoid m => LevelInfo m -> m) +Eq,(forall m. Monoid m => LevelInfo m -> m) -> (forall m a. Monoid m => (a -> m) -> LevelInfo a -> m) -> (forall m a. Monoid m => (a -> m) -> LevelInfo a -> m) -> (forall a b. (a -> b -> b) -> b -> LevelInfo a -> b) @@ -333,7 +333,7 @@ -- => planarGraph -- -> ([VertexIx planarGraph], Vector 2 [VertexIx planarGraph]) -type Separator k = ([k],Vector 2 [k]) +type Separator k = ([k],Vector 2 [k]) -- | Returns a pair (separator, Vector2 verticesSubGraphA verticesSubGraphB) -- so that @@ -341,33 +341,33 @@ -- 1) there are no edges connecting subGraph A and subgraph B, -- 2) the size of the separator is at most sqrt(n). -- 3) the vertex sets of A and B have weight at most 2/3 the total weight -planarSeparator :: Ord k => PlaneGraph k v e -> Separator k +planarSeparator :: Ord k => PlaneGraph k v e -> Separator k planarSeparator :: forall k v e. Ord k => PlaneGraph k v e -> Separator k -planarSeparator PlaneGraph k v e -gr = case [(Tree k, Int)] -trees of +planarSeparator PlaneGraph k v e +gr = case [(Tree k, Int)] +trees of [] -> ([],[k] -> [k] -> Vector 2 [k] forall r. r -> r -> Vector 2 r Vector2 [] []) - ((Tree k -tr,Int -m):[(Tree k, Int)] -rest) + ((Tree k +tr,Int +m):[(Tree k, Int)] +rest) | Int -m Int -> Int -> Bool +m Int -> Int -> Bool forall a. Ord a => a -> a -> Bool <= Int -twoThirds -> Separator k +twoThirds -> Separator k forall {a}. a -groupComponents +groupComponents | Bool otherwise -> Tree k -> Int -> Separator k -planarSeparator' Tree k -tr Int -m -- we should also add the remaining vertices +planarSeparator' Tree k +tr Int +m -- we should also add the remaining vertices where - trees :: [(Tree k, Int)] -trees = ((Tree k, Int) -> Int) -> [(Tree k, Int)] -> [(Tree k, Int)] + trees :: [(Tree k, Int)] +trees = ((Tree k, Int) -> Int) -> [(Tree k, Int)] -> [(Tree k, Int)] forall b a. Ord b => (a -> b) -> [a] -> [a] List.sortOn (Tree k, Int) -> Int forall a b. (a, b) -> b @@ -376,20 +376,20 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . (Tree k -> (Tree k, Int)) -> [Tree k] -> [(Tree k, Int)] forall a b. (a -> b) -> [a] -> [b] -map (\Tree k -t -> (Tree k -t, Tree k -> Int +map (\Tree k +t -> (Tree k +t, Tree k -> Int forall a. Tree a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length Tree k -t)) ([Tree k] -> [(Tree k, Int)]) -> [Tree k] -> [(Tree k, Int)] +t)) ([Tree k] -> [(Tree k, Int)]) -> [Tree k] -> [(Tree k, Int)] forall a b. (a -> b) -> a -> b $ PlaneGraph k v e -> [Tree k] forall k v e. Ord k => PlaneGraph k v e -> [Tree k] bff PlaneGraph k v e -gr - n :: Int -n = [Int] -> Int +gr + n :: Int +n = [Int] -> Int forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a sum ([Int] -> Int) -> [Int] -> Int @@ -399,43 +399,43 @@ map (Tree k, Int) -> Int forall a b. (a, b) -> b snd [(Tree k, Int)] -trees - half :: Int -half = Int -n Int -> Int -> Int +trees + half :: Int +half = Int +n Int -> Int -> Int forall a. Integral a => a -> a -> a `div` Int 2 - twoThirds :: Int -twoThirds = Int + twoThirds :: Int +twoThirds = Int 2 Int -> Int -> Int forall a. Num a => a -> a -> a * (Int -n Int -> Int -> Int +n Int -> Int -> Int forall a. Integral a => a -> a -> a `div` Int 3) - groupComponents :: a -groupComponents = a + groupComponents :: a +groupComponents = a forall a. HasCallStack => a undefined - planarSeparator' :: Tree k -> Int -> Separator k -planarSeparator' Tree k -tr Int + planarSeparator' :: Tree k -> Int -> Separator k +planarSeparator' Tree k +tr Int _ = case (LevelInfo k -> Bool) -> [LevelInfo k] -> ([LevelInfo k], [LevelInfo k]) forall a. (a -> Bool) -> [a] -> ([a], [a]) -List.break (\LevelInfo k -lvl -> LevelInfo k -> Int +List.break (\LevelInfo k +lvl -> LevelInfo k -> Int forall v. LevelInfo v -> Int accumSize LevelInfo k -lvl Int -> Int -> Bool +lvl Int -> Int -> Bool forall a. Ord a => a -> a -> Bool < Int -half) [LevelInfo k] -lvls of +half) [LevelInfo k] +lvls of ([LevelInfo k] _, []) -> ([], [k] -> [k] -> Vector 2 [k] forall r. r -> r -> Vector 2 r @@ -443,28 +443,28 @@ forall a. Tree a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList Tree k -tr) []) +tr) []) -- somehow we have too little weight; - ([LevelInfo k] -pref, (LevelInfo k -l1 : [LevelInfo k] -suff)) -> PlaneGraph k v e -> Tree k -> Separator k + ([LevelInfo k] +pref, (LevelInfo k +l1 : [LevelInfo k] +suff)) -> PlaneGraph k v e -> Tree k -> Separator k forall k v e. Ord k => PlaneGraph k v e -> Tree k -> Separator k planarSeparatorTree PlaneGraph k v e -gr Tree k -tr' +gr Tree k +tr' where - k :: Int -k = LevelInfo k -> Int + k :: Int +k = LevelInfo k -> Int forall v. LevelInfo v -> Int accumSize LevelInfo k -l1 - p :: LevelInfo k -> Bool -p LevelInfo k -lvl = LevelInfo k -> Int +l1 + p :: LevelInfo k -> Bool +p LevelInfo k +lvl = LevelInfo k -> Int forall v. LevelInfo v -> Int levelSize LevelInfo k -lvl Int -> Int -> Int +lvl Int -> Int -> Int forall a. Num a => a -> a -> a + Int 2Int -> Int -> Int @@ -472,25 +472,25 @@ *(LevelInfo k -> Int forall v. LevelInfo v -> Int levelIndex LevelInfo k -l1 Int -> Int -> Int +l1 Int -> Int -> Int forall a. Num a => a -> a -> a - LevelInfo k -> Int forall v. LevelInfo v -> Int levelIndex LevelInfo k -lvl) Int -> Int -> Bool +lvl) Int -> Int -> Bool forall a. Ord a => a -> a -> Bool <= Int 2 Int -> Int -> Int forall a. Num a => a -> a -> a * Int -> Int sqrt' Int -k - p' :: LevelInfo k -> Bool -p' LevelInfo k -lvl = LevelInfo k -> Int +k + p' :: LevelInfo k -> Bool +p' LevelInfo k +lvl = LevelInfo k -> Int forall v. LevelInfo v -> Int levelSize LevelInfo k -lvl Int -> Int -> Int +lvl Int -> Int -> Int forall a. Num a => a -> a -> a + Int 2Int -> Int -> Int @@ -498,12 +498,12 @@ *(LevelInfo k -> Int forall v. LevelInfo v -> Int levelIndex LevelInfo k -lvl Int -> Int -> Int +lvl Int -> Int -> Int forall a. Num a => a -> a -> a - LevelInfo k -> Int forall v. LevelInfo v -> Int levelIndex LevelInfo k -l1 Int -> Int -> Int +l1 Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1) Int -> Int -> Bool @@ -513,33 +513,33 @@ forall a. Num a => a -> a -> a * Int -> Int sqrt' (Int -nInt -> Int -> Int +nInt -> Int -> Int forall a. Num a => a -> a -> a -Int -k) +k) - l0 :: Maybe (LevelInfo k) -l0 = (LevelInfo k -> Bool) -> [LevelInfo k] -> Maybe (LevelInfo k) + l0 :: Maybe (LevelInfo k) +l0 = (LevelInfo k -> Bool) -> [LevelInfo k] -> Maybe (LevelInfo k) forall a. (a -> Bool) -> [a] -> Maybe a findR LevelInfo k -> Bool -p ([LevelInfo k] -pref [LevelInfo k] -> [LevelInfo k] -> [LevelInfo k] +p ([LevelInfo k] +pref [LevelInfo k] -> [LevelInfo k] -> [LevelInfo k] forall a. Semigroup a => a -> a -> a <> [LevelInfo k -l1]) - l2 :: Maybe (LevelInfo k) -l2 = (LevelInfo k -> Bool) -> [LevelInfo k] -> Maybe (LevelInfo k) +l1]) + l2 :: Maybe (LevelInfo k) +l2 = (LevelInfo k -> Bool) -> [LevelInfo k] -> Maybe (LevelInfo k) forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Maybe a List.find LevelInfo k -> Bool -p' [LevelInfo k] -suff - tr' :: Tree k -tr' = Maybe (LevelInfo k) -> Maybe (LevelInfo k) -> Tree k -> Tree k +p' [LevelInfo k] +suff + tr' :: Tree k +tr' = Maybe (LevelInfo k) -> Maybe (LevelInfo k) -> Tree k -> Tree k forall {p} {p} {p}. p -> p -> p -> p trim Maybe (LevelInfo k) -l0 Maybe (LevelInfo k) -l2 Tree k -tr +l0 Maybe (LevelInfo k) +l2 Tree k +tr -- sep = undefined @@ -548,42 +548,42 @@ where -- compute the levels, their sizes, and the sum of their sizes (Vector 2 Int -_, [LevelInfo k] -lvls) = (Vector 2 Int -> [k] -> (Vector 2 Int, LevelInfo k)) +_, [LevelInfo k] +lvls) = (Vector 2 Int -> [k] -> (Vector 2 Int, LevelInfo k)) -> Vector 2 Int -> [[k]] -> (Vector 2 Int, [LevelInfo k]) forall (t :: * -> *) s a b. Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b) -List.mapAccumL (\(Vector2 Int -i Int -acc) [k] -lvl -> - let m :: Int -m = [k] -> Int +List.mapAccumL (\(Vector2 Int +i Int +acc) [k] +lvl -> + let m :: Int +m = [k] -> Int forall a. [a] -> Int forall (t :: * -> *) a. Foldable t => t a -> Int length [k] -lvl - acc' :: Int -acc' = Int -acc Int -> Int -> Int +lvl + acc' :: Int +acc' = Int +acc Int -> Int -> Int forall a. Num a => a -> a -> a + Int -m +m in ( Int -> Int -> Vector 2 Int forall r. r -> r -> Vector 2 r Vector2 (Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Int -acc', Int -> Int -> Int -> [k] -> LevelInfo k +acc', Int -> Int -> Int -> [k] -> LevelInfo k forall v. Int -> Int -> Int -> [v] -> LevelInfo v Level Int -i Int -m Int -acc' [k] -lvl) +i Int +m Int +acc' [k] +lvl) ) (Int -> Int -> Vector 2 Int forall r. r -> r -> Vector 2 r Vector2 Int @@ -594,11 +594,11 @@ $ Tree k -> [[k]] forall a. Tree a -> [[a]] levels Tree k -tr +tr -- | contracts the plane graph so that we get a spanning tree of diameter at most sqrt(n). -contract :: PlaneGraph k v e -> Tree k -> (PlaneGraph k v e, Tree k) +contract :: PlaneGraph k v e -> Tree k -> (PlaneGraph k v e, Tree k) contract :: forall k v e. PlaneGraph k v e -> Tree k -> (PlaneGraph k v e, Tree k) contract = PlaneGraph k v e -> Tree k -> (PlaneGraph k v e, Tree k) @@ -608,19 +608,19 @@ trim :: p -> p -> p -> p trim p _ p -_ p -tr = p -tr +_ p +tr = p +tr -- TODO: -- | Given a spanning tree of the graph that has diameter r, compute -- a separator of size at most 2r+1 -planarSeparatorTree :: Ord k => PlaneGraph k v e -> Tree k -> Separator k +planarSeparatorTree :: Ord k => PlaneGraph k v e -> Tree k -> Separator k planarSeparatorTree :: forall k v e. Ord k => PlaneGraph k v e -> Tree k -> Separator k -planarSeparatorTree PlaneGraph k v e -gr Tree k -tr = ([k] -sep, (Tree k -> [k]) -> [Tree k] -> [k] +planarSeparatorTree PlaneGraph k v e +gr Tree k +tr = ([k] +sep, (Tree k -> [k]) -> [Tree k] -> [k] forall m a. Monoid m => (a -> m) -> [a] -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => @@ -631,26 +631,26 @@ F.toList ([Tree k] -> [k]) -> Vector 2 [Tree k] -> Vector 2 [k] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Vector 2 [Tree k] -trees) +trees) -- FIXME: continue searching where - e :: (k, k) -e = Set (k, k) -> (k, k) + e :: (k, k) +e = Set (k, k) -> (k, k) forall a. Set a -> a Set.findMin (Set (k, k) -> (k, k)) -> Set (k, k) -> (k, k) forall a b. (a -> b) -> a -> b $ PlaneGraph k v e -> Set (k, k) forall k v e. Ord k => PlaneGraph k v e -> Set (k, k) graphEdges PlaneGraph k v e -gr Set (k, k) -> Set (k, k) -> Set (k, k) +gr Set (k, k) -> Set (k, k) -> Set (k, k) forall a. Ord a => Set a -> Set a -> Set a `Set.difference` Tree k -> Set (k, k) forall k. Ord k => Tree k -> Set (k, k) treeEdges Tree k -tr - ([k] -sep, Vector 2 [Tree k] -trees) = SplitTree k (EndPoint k) -> ([k], Vector 2 [Tree k]) +tr + ([k] +sep, Vector 2 [Tree k] +trees) = SplitTree k (EndPoint k) -> ([k], Vector 2 [Tree k]) forall a. Eq a => SplitTree a (EndPoint a) -> ([a], Vector 2 [Tree a]) @@ -666,15 +666,15 @@ PlaneGraph k v e -> (k, k) -> SplitTree k (Tree k) -> SplitTree k (EndPoint k) splitLeaf PlaneGraph k v e -gr (k, k) -e (SplitTree k (Tree k) -> ([k], Vector 2 [Tree k])) +gr (k, k) +e (SplitTree k (Tree k) -> ([k], Vector 2 [Tree k])) -> SplitTree k (Tree k) -> ([k], Vector 2 [Tree k]) forall a b. (a -> b) -> a -> b $ (k, k) -> Tree k -> SplitTree k (Tree k) forall a. Eq a => (a, a) -> Tree a -> SplitTree a (Tree a) splitTree (k, k) -e Tree k -tr +e Tree k +tr -------------------------------------------------------------------------------- -- * Spliting the tree @@ -684,8 +684,8 @@ -- deriving (Show,Eq) -- -- still not quite right, since now we can't represent rotosplits lower than the root . -newtype SplitTree a l = SplitTree (Path a (Split a l)) - deriving (Int -> SplitTree a l -> ShowS +newtype SplitTree a l = SplitTree (Path a (Split a l)) + deriving (Int -> SplitTree a l -> ShowS [SplitTree a l] -> ShowS SplitTree a l -> String (Int -> SplitTree a l -> ShowS) @@ -703,7 +703,7 @@ show :: SplitTree a l -> String $cshowList :: forall a l. (Show l, Show a) => [SplitTree a l] -> ShowS showList :: [SplitTree a l] -> ShowS -Show,SplitTree a l -> SplitTree a l -> Bool +Show,SplitTree a l -> SplitTree a l -> Bool (SplitTree a l -> SplitTree a l -> Bool) -> (SplitTree a l -> SplitTree a l -> Bool) -> Eq (SplitTree a l) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -712,7 +712,7 @@ == :: SplitTree a l -> SplitTree a l -> Bool $c/= :: forall a l. (Eq l, Eq a) => SplitTree a l -> SplitTree a l -> Bool /= :: SplitTree a l -> SplitTree a l -> Bool -Eq,(forall a b. (a -> b) -> SplitTree a a -> SplitTree a b) +Eq,(forall a b. (a -> b) -> SplitTree a a -> SplitTree a b) -> (forall a b. a -> SplitTree a b -> SplitTree a a) -> Functor (SplitTree a) forall a b. a -> SplitTree a b -> SplitTree a a @@ -729,8 +729,8 @@ Functor) -- | A path in the tree that ends at a "leaf" in which we store something of type l -newtype Path a l = MkPath (NonEmpty (PathNode a l)) - deriving (Int -> Path a l -> ShowS +newtype Path a l = MkPath (NonEmpty (PathNode a l)) + deriving (Int -> Path a l -> ShowS [Path a l] -> ShowS Path a l -> String (Int -> Path a l -> ShowS) @@ -746,7 +746,7 @@ show :: Path a l -> String $cshowList :: forall a l. (Show l, Show a) => [Path a l] -> ShowS showList :: [Path a l] -> ShowS -Show,Path a l -> Path a l -> Bool +Show,Path a l -> Path a l -> Bool (Path a l -> Path a l -> Bool) -> (Path a l -> Path a l -> Bool) -> Eq (Path a l) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -755,7 +755,7 @@ == :: Path a l -> Path a l -> Bool $c/= :: forall a l. (Eq l, Eq a) => Path a l -> Path a l -> Bool /= :: Path a l -> Path a l -> Bool -Eq,(forall a b. (a -> b) -> Path a a -> Path a b) +Eq,(forall a b. (a -> b) -> Path a a -> Path a b) -> (forall a b. a -> Path a b -> Path a a) -> Functor (Path a) forall a b. a -> Path a b -> Path a a forall a b. (a -> b) -> Path a a -> Path a b @@ -770,9 +770,9 @@ <$ :: forall a b. a -> Path a b -> Path a a Functor) -data PathNode a l = PathLeaf l - | PathNode a [Tree a] [Tree a] - deriving (Int -> PathNode a l -> ShowS +data PathNode a l = PathLeaf l + | PathNode a [Tree a] [Tree a] + deriving (Int -> PathNode a l -> ShowS [PathNode a l] -> ShowS PathNode a l -> String (Int -> PathNode a l -> ShowS) @@ -790,7 +790,7 @@ show :: PathNode a l -> String $cshowList :: forall a l. (Show l, Show a) => [PathNode a l] -> ShowS showList :: [PathNode a l] -> ShowS -Show,PathNode a l -> PathNode a l -> Bool +Show,PathNode a l -> PathNode a l -> Bool (PathNode a l -> PathNode a l -> Bool) -> (PathNode a l -> PathNode a l -> Bool) -> Eq (PathNode a l) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -799,7 +799,7 @@ == :: PathNode a l -> PathNode a l -> Bool $c/= :: forall a l. (Eq l, Eq a) => PathNode a l -> PathNode a l -> Bool /= :: PathNode a l -> PathNode a l -> Bool -Eq,(forall a b. (a -> b) -> PathNode a a -> PathNode a b) +Eq,(forall a b. (a -> b) -> PathNode a a -> PathNode a b) -> (forall a b. a -> PathNode a b -> PathNode a a) -> Functor (PathNode a) forall a b. a -> PathNode a b -> PathNode a a @@ -815,61 +815,61 @@ <$ :: forall a b. a -> PathNode a b -> PathNode a a Functor) -pattern Leaf :: l -> Path a l +pattern Leaf :: l -> Path a l pattern $bLeaf :: forall l a. l -> Path a l $mLeaf :: forall {r} {l} {a}. Path a l -> (l -> r) -> ((# #) -> r) -> r -Leaf l = MkPath (PathLeaf l :| []) +Leaf l = MkPath (PathLeaf l :| []) -(<|) :: PathNode a l -> Path a l -> Path a l -PathNode a l -n <| :: forall a l. PathNode a l -> Path a l -> Path a l -<| (MkPath NonEmpty (PathNode a l) -path) = NonEmpty (PathNode a l) -> Path a l +(<|) :: PathNode a l -> Path a l -> Path a l +PathNode a l +n <| :: forall a l. PathNode a l -> Path a l -> Path a l +<| (MkPath NonEmpty (PathNode a l) +path) = NonEmpty (PathNode a l) -> Path a l forall a l. NonEmpty (PathNode a l) -> Path a l MkPath (NonEmpty (PathNode a l) -> Path a l) -> NonEmpty (PathNode a l) -> Path a l forall a b. (a -> b) -> a -> b $ PathNode a l -n PathNode a l -> NonEmpty (PathNode a l) -> NonEmpty (PathNode a l) +n PathNode a l -> NonEmpty (PathNode a l) -> NonEmpty (PathNode a l) forall a. a -> NonEmpty a -> NonEmpty a NonEmpty.<| NonEmpty (PathNode a l) -path +path -pattern Path :: a -> [Tree a] -> Path a l -> [Tree a] -> Path a l +pattern Path :: a -> [Tree a] -> Path a l -> [Tree a] -> Path a l pattern $bPath :: forall a l. a -> [Tree a] -> Path a l -> [Tree a] -> Path a l $mPath :: forall {r} {a} {l}. Path a l -> (a -> [Tree a] -> Path a l -> [Tree a] -> r) -> ((# #) -> r) -> r -Path u before path after <- (unconsPath -> Just (u, before, after, path)) +Path u before path after <- (unconsPath -> Just (u, before, after, path)) where - Path a -u [Tree a] -before Path a l -path [Tree a] -after = a -> [Tree a] -> [Tree a] -> PathNode a l + Path a +u [Tree a] +before Path a l +path [Tree a] +after = a -> [Tree a] -> [Tree a] -> PathNode a l forall a l. a -> [Tree a] -> [Tree a] -> PathNode a l PathNode a -u [Tree a] -before [Tree a] -after PathNode a l -> Path a l -> Path a l +u [Tree a] +before [Tree a] +after PathNode a l -> Path a l -> Path a l forall a l. PathNode a l -> Path a l -> Path a l <| Path a l -path +path -unconsPath :: Path a l -> Maybe (a, [Tree a], [Tree a], Path a l) +unconsPath :: Path a l -> Maybe (a, [Tree a], [Tree a], Path a l) unconsPath :: forall a l. Path a l -> Maybe (a, [Tree a], [Tree a], Path a l) unconsPath = \case - MkPath (PathNode a -u [Tree a] -before [Tree a] -after :| [PathNode a l] -path') -> (a -u,[Tree a] -before,[Tree a] -after,) (Path a l -> (a, [Tree a], [Tree a], Path a l)) + MkPath (PathNode a +u [Tree a] +before [Tree a] +after :| [PathNode a l] +path') -> (a +u,[Tree a] +before,[Tree a] +after,) (Path a l -> (a, [Tree a], [Tree a], Path a l)) -> (NonEmpty (PathNode a l) -> Path a l) -> NonEmpty (PathNode a l) -> (a, [Tree a], [Tree a], Path a l) @@ -884,7 +884,7 @@ <$> [PathNode a l] -> Maybe (NonEmpty (PathNode a l)) forall a. [a] -> Maybe (NonEmpty a) NonEmpty.nonEmpty [PathNode a l] -path' +path' Path a l _ -> Maybe (a, [Tree a], [Tree a], Path a l) forall a. Maybe a @@ -893,20 +893,20 @@ -- | The split node where the two paths diverge -data Split a l = - RootSplit l -- ^ apparently root is the split we are looking for. - [Tree a] (Path a l) [Tree a] - | NodeSplit a -- ^ label of the node we are splitting - [Tree a] -- ^ children before the left path - (Path a l) +data Split a l = + RootSplit l -- ^ apparently root is the split we are looking for. + [Tree a] (Path a l) [Tree a] + | NodeSplit a -- ^ label of the node we are splitting + [Tree a] -- ^ children before the left path + (Path a l) -- ^ the value stored at the left node (i.e. the leaf) we argoing to, -- and the pato that goes there. - [Tree a] -- ^ middle nodes - (Path a l) + [Tree a] -- ^ middle nodes + (Path a l) -- ^ the value stored at the right node we argoing to, and the pato that -- goes there. - [Tree a] - deriving (Int -> Split a l -> ShowS + [Tree a] + deriving (Int -> Split a l -> ShowS [Split a l] -> ShowS Split a l -> String (Int -> Split a l -> ShowS) @@ -924,7 +924,7 @@ show :: Split a l -> String $cshowList :: forall a l. (Show l, Show a) => [Split a l] -> ShowS showList :: [Split a l] -> ShowS -Show,Split a l -> Split a l -> Bool +Show,Split a l -> Split a l -> Bool (Split a l -> Split a l -> Bool) -> (Split a l -> Split a l -> Bool) -> Eq (Split a l) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -933,7 +933,7 @@ == :: Split a l -> Split a l -> Bool $c/= :: forall a l. (Eq l, Eq a) => Split a l -> Split a l -> Bool /= :: Split a l -> Split a l -> Bool -Eq,(forall a b. (a -> b) -> Split a a -> Split a b) +Eq,(forall a b. (a -> b) -> Split a a -> Split a b) -> (forall a b. a -> Split a b -> Split a a) -> Functor (Split a) forall a b. a -> Split a b -> Split a a forall a b. (a -> b) -> Split a a -> Split a b @@ -949,28 +949,28 @@ Functor) -- | Given an non-tree edge (v,w), split the tree usign the root to v,w paths -splitTree :: Eq a => (a,a) -> Tree a -> SplitTree a (Tree a) +splitTree :: Eq a => (a,a) -> Tree a -> SplitTree a (Tree a) splitTree :: forall a. Eq a => (a, a) -> Tree a -> SplitTree a (Tree a) -splitTree (a, a) -e Tree a -t = case (a, a) -> Tree a -> Result a +splitTree (a, a) +e Tree a +t = case (a, a) -> Tree a -> Result a forall a. Eq a => (a, a) -> Tree a -> Result a splitTree' (a, a) -e Tree a -t of - Both SplitTree a (Tree a) -split -> SplitTree a (Tree a) -split +e Tree a +t of + Both SplitTree a (Tree a) +split -> SplitTree a (Tree a) +split Result a _ -> String -> SplitTree a (Tree a) forall a. HasCallStack => String -> a error String "splitTree: absurd, didn't find both endpoints" -data ResultF a b = NotFound - | Single a - | Both b - deriving (Int -> ResultF a b -> ShowS +data ResultF a b = NotFound + | Single a + | Both b + deriving (Int -> ResultF a b -> ShowS [ResultF a b] -> ShowS ResultF a b -> String (Int -> ResultF a b -> ShowS) @@ -988,7 +988,7 @@ show :: ResultF a b -> String $cshowList :: forall a b. (Show a, Show b) => [ResultF a b] -> ShowS showList :: [ResultF a b] -> ShowS -Show,ResultF a b -> ResultF a b -> Bool +Show,ResultF a b -> ResultF a b -> Bool (ResultF a b -> ResultF a b -> Bool) -> (ResultF a b -> ResultF a b -> Bool) -> Eq (ResultF a b) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -997,7 +997,7 @@ == :: ResultF a b -> ResultF a b -> Bool $c/= :: forall a b. (Eq a, Eq b) => ResultF a b -> ResultF a b -> Bool /= :: ResultF a b -> ResultF a b -> Bool -Eq,(forall a b. (a -> b) -> ResultF a a -> ResultF a b) +Eq,(forall a b. (a -> b) -> ResultF a a -> ResultF a b) -> (forall a b. a -> ResultF a b -> ResultF a a) -> Functor (ResultF a) forall a b. a -> ResultF a b -> ResultF a a @@ -1013,23 +1013,23 @@ <$ :: forall a b. a -> ResultF a b -> ResultF a a Functor) -type Result a = ResultF (VW, Path a (Tree a) ) (SplitTree a (Tree a)) +type Result a = ResultF (VW, Path a (Tree a) ) (SplitTree a (Tree a)) data VW = V | W -other :: p -> p -> VW -> p +other :: p -> p -> VW -> p other :: forall p. p -> p -> VW -> p -other p -v p -w = \case +other p +v p +w = \case VW V -> p -w +w VW W -> p -v +v -data Loc a b = Here a | There b deriving (Int -> Loc a b -> ShowS +data Loc a b = Here a | There b deriving (Int -> Loc a b -> ShowS [Loc a b] -> ShowS Loc a b -> String (Int -> Loc a b -> ShowS) @@ -1045,7 +1045,7 @@ show :: Loc a b -> String $cshowList :: forall a b. (Show a, Show b) => [Loc a b] -> ShowS showList :: [Loc a b] -> ShowS -Show,Loc a b -> Loc a b -> Bool +Show,Loc a b -> Loc a b -> Bool (Loc a b -> Loc a b -> Bool) -> (Loc a b -> Loc a b -> Bool) -> Eq (Loc a b) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -1057,11 +1057,11 @@ Eq) -- | Implementation of splitTree; i.e. tries to find both endpoints of the given edge. -splitTree' :: Eq a => (a,a) -> Tree a -> Result a +splitTree' :: Eq a => (a,a) -> Tree a -> Result a splitTree' :: forall a. Eq a => (a, a) -> Tree a -> Result a -splitTree' (a -v,a -w) = (Path a (Split a (Tree a)) -> SplitTree a (Tree a)) +splitTree' (a +v,a +w) = (Path a (Split a (Tree a)) -> SplitTree a (Tree a)) -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) -> ResultF (VW, Path a (Tree a)) (SplitTree a (Tree a)) forall a b. @@ -1079,36 +1079,36 @@ -> ResultF (VW, Path a (Tree a)) (SplitTree a (Tree a)) forall b c a. (b -> c) -> (a -> b) -> a -> c . Tree a -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) -go +go where -- Handle the cases that we find one of the elemtns (identified by 'found') here. - here :: VW + here :: VW -> Tree a -> [Tree a] -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) -here VW -found Tree a -tr [Tree a] -chs = case a -> [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) +here VW +found Tree a +tr [Tree a] +chs = case a -> [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) forall a. Eq a => a -> [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) findNodes a -w [Tree a] -chs of +w [Tree a] +chs of Maybe ([Tree a], [Tree a], Path a (Tree a)) Nothing -> (VW, Path a (Tree a)) -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) forall a b. a -> ResultF a b Single (VW -found, Tree a -> Path a (Tree a) +found, Tree a -> Path a (Tree a) forall l a. l -> Path a l Leaf Tree a -tr) - Just ([Tree a] -before, [Tree a] -after, Path a (Tree a) -path) -> Path a (Split a (Tree a)) +tr) + Just ([Tree a] +before, [Tree a] +after, Path a (Tree a) +path) -> Path a (Split a (Tree a)) -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) forall a b. b -> ResultF a b Both (Path a (Split a (Tree a)) @@ -1128,40 +1128,40 @@ -> [Tree a] -> Path a (Tree a) -> [Tree a] -> Split a (Tree a) forall a l. l -> [Tree a] -> Path a l -> [Tree a] -> Split a l RootSplit Tree a -tr [Tree a] -before Path a (Tree a) -path [Tree a] -after +tr [Tree a] +before Path a (Tree a) +path [Tree a] +after - go :: Tree a -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) -go tr :: Tree a -tr@(Node a -u [Tree a] -chs) + go :: Tree a -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) +go tr :: Tree a +tr@(Node a +u [Tree a] +chs) | a -u a -> a -> Bool +u a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -v = VW +v = VW -> Tree a -> [Tree a] -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) -here VW +here VW V Tree a -tr [Tree a] -chs +tr [Tree a] +chs | a -u a -> a -> Bool +u a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -w = VW +w = VW -> Tree a -> [Tree a] -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) -here VW +here VW W Tree a -tr [Tree a] -chs +tr [Tree a] +chs | Bool otherwise = case (Tree a -> (ResultF @@ -1212,7 +1212,7 @@ (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a)))), [Tree a]) -process (ResultF +process (ResultF ([Tree a], (VW, Path a (Tree a))) ([Tree a], Loc @@ -1220,7 +1220,7 @@ (Path a (Split a (Tree a)))) forall a b. ResultF a b NotFound, []) [Tree a] -chs of +chs of (ResultF ([Tree a], (VW, Path a (Tree a))) ([Tree a], @@ -1231,29 +1231,29 @@ _) -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) forall a b. ResultF a b NotFound - (Single ([Tree a] -middle, (VW -x,Path a (Tree a) -path)),[Tree a] -after) -> (VW, Path a (Tree a)) + (Single ([Tree a] +middle, (VW +x,Path a (Tree a) +path)),[Tree a] +after) -> (VW, Path a (Tree a)) -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) forall a b. a -> ResultF a b Single (VW -x, a -> [Tree a] -> [Tree a] -> PathNode a (Tree a) +x, a -> [Tree a] -> [Tree a] -> PathNode a (Tree a) forall a l. a -> [Tree a] -> [Tree a] -> PathNode a l PathNode a -u [Tree a] -middle [Tree a] -after PathNode a (Tree a) -> Path a (Tree a) -> Path a (Tree a) +u [Tree a] +middle [Tree a] +after PathNode a (Tree a) -> Path a (Tree a) -> Path a (Tree a) forall a l. PathNode a l -> Path a l -> Path a l <| Path a (Tree a) -path) - (Both ([Tree a] -before, Loc +path) + (Both ([Tree a] +before, Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a))) -both'), [Tree a] -after) -> Path a (Split a (Tree a)) +both'), [Tree a] +after) -> Path a (Split a (Tree a)) -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) forall a b. b -> ResultF a b Both (Path a (Split a (Tree a)) @@ -1264,11 +1264,11 @@ $ case Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a))) -both' of - Here (Path a (Tree a) -lp,[Tree a] -middle,Path a (Tree a) -rp) -> Split a (Tree a) -> Path a (Split a (Tree a)) +both' of + Here (Path a (Tree a) +lp,[Tree a] +middle,Path a (Tree a) +rp) -> Split a (Tree a) -> Path a (Split a (Tree a)) forall l a. l -> Path a l Leaf (Split a (Tree a) -> Path a (Split a (Tree a))) -> Split a (Tree a) -> Path a (Split a (Tree a)) @@ -1289,25 +1289,25 @@ -> [Tree a] -> Split a l NodeSplit a -u [Tree a] -before Path a (Tree a) -lp [Tree a] -middle Path a (Tree a) -rp [Tree a] -after) - There Path a (Split a (Tree a)) -path -> a -> [Tree a] -> [Tree a] -> PathNode a (Split a (Tree a)) +u [Tree a] +before Path a (Tree a) +lp [Tree a] +middle Path a (Tree a) +rp [Tree a] +after) + There Path a (Split a (Tree a)) +path -> a -> [Tree a] -> [Tree a] -> PathNode a (Split a (Tree a)) forall a l. a -> [Tree a] -> [Tree a] -> PathNode a l PathNode a -u [Tree a] -before [Tree a] -after PathNode a (Split a (Tree a)) +u [Tree a] +before [Tree a] +after PathNode a (Split a (Tree a)) -> Path a (Split a (Tree a)) -> Path a (Split a (Tree a)) forall a l. PathNode a l -> Path a l -> Path a l <| Path a (Split a (Tree a)) -path +path - process :: Tree a + process :: Tree a -> (ResultF ([Tree a], (VW, Path a (Tree a))) ([Tree a], @@ -1322,20 +1322,20 @@ (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a)))), [Tree a]) -process ch :: Tree a -ch@(Node a -u [Tree a] -chs) = \case +process ch :: Tree a +ch@(Node a +u [Tree a] +chs) = \case (ResultF ([Tree a], (VW, Path a (Tree a))) ([Tree a], Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a)))) -NotFound, [Tree a] -after) -> case Tree a -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) -go Tree a -ch of +NotFound, [Tree a] +after) -> case Tree a -> ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) +go Tree a +ch of ResultF (VW, Path a (Tree a)) (Path a (Split a (Tree a))) NotFound -> (ResultF ([Tree a], (VW, Path a (Tree a))) @@ -1345,12 +1345,12 @@ (Path a (Split a (Tree a)))) forall a b. ResultF a b NotFound, Tree a -chTree a -> [Tree a] -> [Tree a] +chTree a -> [Tree a] -> [Tree a] forall a. a -> [a] -> [a] :[Tree a] -after) - Single (VW, Path a (Tree a)) -rightPath -> (([Tree a], (VW, Path a (Tree a))) +after) + Single (VW, Path a (Tree a)) +rightPath -> (([Tree a], (VW, Path a (Tree a))) -> ResultF ([Tree a], (VW, Path a (Tree a))) ([Tree a], @@ -1359,10 +1359,10 @@ (Path a (Split a (Tree a)))) forall a b. a -> ResultF a b Single ([], (VW, Path a (Tree a)) -rightPath), [Tree a] -after) - Both Path a (Split a (Tree a)) -split -> (([Tree a], +rightPath), [Tree a] +after) + Both Path a (Split a (Tree a)) +split -> (([Tree a], Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a)))) @@ -1379,24 +1379,24 @@ (Path a (Split a (Tree a))) forall a b. b -> Loc a b There Path a (Split a (Tree a)) -split), [Tree a] -after) +split), [Tree a] +after) - (Single ([Tree a] -middle, path :: (VW, Path a (Tree a)) -path@(VW -x, Path a (Tree a) -rightPath)), [Tree a] -after) + (Single ([Tree a] +middle, path :: (VW, Path a (Tree a)) +path@(VW +x, Path a (Tree a) +rightPath)), [Tree a] +after) | a -> a -> VW -> a forall p. p -> p -> VW -> p other a -v a -w VW -x a -> a -> Bool +v a +w VW +x a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -u -> (([Tree a], +u -> (([Tree a], Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a)))) @@ -1415,15 +1415,15 @@ Here (Tree a -> Path a (Tree a) forall l a. l -> Path a l Leaf Tree a -ch, [Tree a] -middle, Path a (Tree a) -rightPath)), [Tree a] -after) +ch, [Tree a] +middle, Path a (Tree a) +rightPath)), [Tree a] +after) | Bool otherwise -> case a -> ([Tree a], [Tree a], Path a (Tree a)) -> Path a (Tree a) forall a l. a -> ([Tree a], [Tree a], Path a l) -> Path a l pathNode a -u (([Tree a], [Tree a], Path a (Tree a)) -> Path a (Tree a)) +u (([Tree a], [Tree a], Path a (Tree a)) -> Path a (Tree a)) -> Maybe ([Tree a], [Tree a], Path a (Tree a)) -> Maybe (Path a (Tree a)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -1434,10 +1434,10 @@ findNodes (a -> a -> VW -> a forall p. p -> p -> VW -> p other a -v a -w VW -x) [Tree a] -chs of +v a +w VW +x) [Tree a] +chs of Maybe (Path a (Tree a)) Nothing -> (([Tree a], (VW, Path a (Tree a))) -> ResultF @@ -1448,14 +1448,14 @@ (Path a (Split a (Tree a)))) forall a b. a -> ResultF a b Single (Tree a -chTree a -> [Tree a] -> [Tree a] +chTree a -> [Tree a] -> [Tree a] forall a. a -> [a] -> [a] :[Tree a] -middle,(VW, Path a (Tree a)) -path), [Tree a] -after) - Just Path a (Tree a) -leftPath -> (([Tree a], +middle,(VW, Path a (Tree a)) +path), [Tree a] +after) + Just Path a (Tree a) +leftPath -> (([Tree a], Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a)))) @@ -1472,17 +1472,17 @@ (Path a (Split a (Tree a))) forall a b. a -> Loc a b Here (Path a (Tree a) -leftPath, [Tree a] -middle, Path a (Tree a) -rightPath)), [Tree a] -after) +leftPath, [Tree a] +middle, Path a (Tree a) +rightPath)), [Tree a] +after) - (Both ([Tree a] -before, Loc + (Both ([Tree a] +before, Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a))) -split), [Tree a] -after) -> (([Tree a], +split), [Tree a] +after) -> (([Tree a], Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a)))) @@ -1494,28 +1494,28 @@ (Path a (Split a (Tree a)))) forall a b. b -> ResultF a b Both (Tree a -chTree a -> [Tree a] -> [Tree a] +chTree a -> [Tree a] -> [Tree a] forall a. a -> [a] -> [a] :[Tree a] -before, Loc +before, Loc (Path a (Tree a), [Tree a], Path a (Tree a)) (Path a (Split a (Tree a))) -split), [Tree a] -after) +split), [Tree a] +after) -- | Search for a given element in a bunch of trees. Returns the path towards -- the node if we find it. -findNodes :: Eq a => a -> [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) +findNodes :: Eq a => a -> [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) findNodes :: forall a. Eq a => a -> [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) -findNodes a -v = [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) -go +findNodes a +v = [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) +go where - go :: [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) -go [Tree a] -chs = case (Tree a + go :: [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) +go [Tree a] +chs = case (Tree a -> (Maybe ([Tree a], Path a (Tree a)), [Tree a]) -> (Maybe ([Tree a], Path a (Tree a)), [Tree a])) -> (Maybe ([Tree a], Path a (Tree a)), [Tree a]) @@ -1528,123 +1528,123 @@ foldr Tree a -> (Maybe ([Tree a], Path a (Tree a)), [Tree a]) -> (Maybe ([Tree a], Path a (Tree a)), [Tree a]) -process (Maybe ([Tree a], Path a (Tree a)) +process (Maybe ([Tree a], Path a (Tree a)) forall a. Maybe a Nothing, []) [Tree a] -chs of +chs of (Maybe ([Tree a], Path a (Tree a)) Nothing, [Tree a] _) -> Maybe ([Tree a], [Tree a], Path a (Tree a)) forall a. Maybe a Nothing - (Just ([Tree a] -before, Path a (Tree a) -path), [Tree a] -after) -> ([Tree a], [Tree a], Path a (Tree a)) + (Just ([Tree a] +before, Path a (Tree a) +path), [Tree a] +after) -> ([Tree a], [Tree a], Path a (Tree a)) -> Maybe ([Tree a], [Tree a], Path a (Tree a)) forall a. a -> Maybe a Just ([Tree a] -before, [Tree a] -after, Path a (Tree a) -path) +before, [Tree a] +after, Path a (Tree a) +path) - process :: Tree a + process :: Tree a -> (Maybe ([Tree a], Path a (Tree a)), [Tree a]) -> (Maybe ([Tree a], Path a (Tree a)), [Tree a]) -process Tree a -ch = \case +process Tree a +ch = \case (Maybe ([Tree a], Path a (Tree a)) -Nothing, [Tree a] -after) -> case Tree a -> Maybe (Path a (Tree a)) -findNode' Tree a -ch of +Nothing, [Tree a] +after) -> case Tree a -> Maybe (Path a (Tree a)) +findNode' Tree a +ch of Maybe (Path a (Tree a)) Nothing -> (Maybe ([Tree a], Path a (Tree a)) forall a. Maybe a Nothing, Tree a -chTree a -> [Tree a] -> [Tree a] +chTree a -> [Tree a] -> [Tree a] forall a. a -> [a] -> [a] :[Tree a] -after) - Just Path a (Tree a) -path -> (([Tree a], Path a (Tree a)) -> Maybe ([Tree a], Path a (Tree a)) +after) + Just Path a (Tree a) +path -> (([Tree a], Path a (Tree a)) -> Maybe ([Tree a], Path a (Tree a)) forall a. a -> Maybe a Just ([],Path a (Tree a) -path), [Tree a] -after) - (Just ([Tree a] -before, Path a (Tree a) -path), [Tree a] -after) -> (([Tree a], Path a (Tree a)) -> Maybe ([Tree a], Path a (Tree a)) +path), [Tree a] +after) + (Just ([Tree a] +before, Path a (Tree a) +path), [Tree a] +after) -> (([Tree a], Path a (Tree a)) -> Maybe ([Tree a], Path a (Tree a)) forall a. a -> Maybe a Just (Tree a -chTree a -> [Tree a] -> [Tree a] +chTree a -> [Tree a] -> [Tree a] forall a. a -> [a] -> [a] :[Tree a] -before, Path a (Tree a) -path), [Tree a] -after) +before, Path a (Tree a) +path), [Tree a] +after) - findNode' :: Tree a -> Maybe (Path a (Tree a)) -findNode' t :: Tree a -t@(Node a -u [Tree a] -chs) + findNode' :: Tree a -> Maybe (Path a (Tree a)) +findNode' t :: Tree a +t@(Node a +u [Tree a] +chs) | a -u a -> a -> Bool +u a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -v = Path a (Tree a) -> Maybe (Path a (Tree a)) +v = Path a (Tree a) -> Maybe (Path a (Tree a)) forall a. a -> Maybe a Just (Tree a -> Path a (Tree a) forall l a. l -> Path a l Leaf Tree a -t) +t) | Bool otherwise = a -> ([Tree a], [Tree a], Path a (Tree a)) -> Path a (Tree a) forall a l. a -> ([Tree a], [Tree a], Path a l) -> Path a l pathNode a -u (([Tree a], [Tree a], Path a (Tree a)) -> Path a (Tree a)) +u (([Tree a], [Tree a], Path a (Tree a)) -> Path a (Tree a)) -> Maybe ([Tree a], [Tree a], Path a (Tree a)) -> Maybe (Path a (Tree a)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> [Tree a] -> Maybe ([Tree a], [Tree a], Path a (Tree a)) -go [Tree a] -chs +go [Tree a] +chs -- | Smart constructor for producign a pathNode -pathNode :: a -> ([Tree a], [Tree a], Path a l) -> Path a l +pathNode :: a -> ([Tree a], [Tree a], Path a l) -> Path a l pathNode :: forall a l. a -> ([Tree a], [Tree a], Path a l) -> Path a l -pathNode a -u ([Tree a] -before, [Tree a] -after, Path a l -path) = a -> [Tree a] -> [Tree a] -> PathNode a l +pathNode a +u ([Tree a] +before, [Tree a] +after, Path a l +path) = a -> [Tree a] -> [Tree a] -> PathNode a l forall a l. a -> [Tree a] -> [Tree a] -> PathNode a l PathNode a -u [Tree a] -before [Tree a] -after PathNode a l -> Path a l -> Path a l +u [Tree a] +before [Tree a] +after PathNode a l -> Path a l -> Path a l forall a l. PathNode a l -> Path a l -> Path a l <| Path a l -path +path ---------------------------------------- -type EndPoint a = (a, [Tree a], [Tree a]) +type EndPoint a = (a, [Tree a], [Tree a]) -- | Split the leaf of the path -splitLeaf :: Ord k - => PlaneGraph k v e - -> (k,k) -> SplitTree k (Tree k) -> SplitTree k (EndPoint k) +splitLeaf :: Ord k + => PlaneGraph k v e + -> (k,k) -> SplitTree k (Tree k) -> SplitTree k (EndPoint k) splitLeaf :: forall k v e. Ord k => PlaneGraph k v e -> (k, k) -> SplitTree k (Tree k) -> SplitTree k (EndPoint k) -splitLeaf PlaneGraph k v e -gr (k -v',k -w') = (Tree k -> EndPoint k) +splitLeaf PlaneGraph k v e +gr (k +v',k +w') = (Tree k -> EndPoint k) -> SplitTree k (Tree k) -> SplitTree k (EndPoint k) forall a b. (a -> b) -> SplitTree k a -> SplitTree k b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -1654,45 +1654,45 @@ -> SplitTree k (Tree k) -> SplitTree k (EndPoint k) forall a b. (a -> b) -> a -> b -$ \(Node k -u [Tree k] -chs) -> k -> [Tree k] -> k -> EndPoint k -split k -u [Tree k] -chs (if k -u k -> k -> Bool +$ \(Node k +u [Tree k] +chs) -> k -> [Tree k] -> k -> EndPoint k +split k +u [Tree k] +chs (if k +u k -> k -> Bool forall a. Eq a => a -> a -> Bool == k -v' then k -w' else k -v') +v' then k +w' else k +v') where - split :: k -> [Tree k] -> k -> EndPoint k -split k -v [Tree k] -chs k -w = case (Tree k -> Bool) -> [Tree k] -> ([Tree k], [Tree k]) + split :: k -> [Tree k] -> k -> EndPoint k +split k +v [Tree k] +chs k +w = case (Tree k -> Bool) -> [Tree k] -> ([Tree k], [Tree k]) forall a. (a -> Bool) -> [a] -> ([a], [a]) List.break (k -> Tree k -> Bool -hasEdge k -v) [Tree k] -chs of - ([Tree k] -before, Tree k -_:[Tree k] -after) -> (k -v, [Tree k] -before, [Tree k] -after) +hasEdge k +v) [Tree k] +chs of + ([Tree k] +before, Tree k +_:[Tree k] +after) -> (k +v, [Tree k] +before, [Tree k] +after) ([Tree k], [Tree k]) _ -> String -> EndPoint k forall a. HasCallStack => String -> a error String "splitLeaf: absurd. edge not found!?" - hasEdge :: k -> Tree k -> Bool -hasEdge k -v Tree k -w = Bool -> ((Map e k, v) -> Bool) -> Maybe (Map e k, v) -> Bool + hasEdge :: k -> Tree k -> Bool +hasEdge k +v Tree k +w = Bool -> ((Map e k, v) -> Bool) -> Maybe (Map e k, v) -> Bool forall b a. b -> (a -> b) -> Maybe a -> b maybe Bool False (k -> Map e k -> Bool @@ -1701,7 +1701,7 @@ F.elem (Tree k -> k forall a. Tree a -> a root Tree k -w) (Map e k -> Bool) +w) (Map e k -> Bool) -> ((Map e k, v) -> Map e k) -> (Map e k, v) -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . (Map e k, v) -> Map e k @@ -1711,66 +1711,66 @@ $ k -> PlaneGraph k v e -> Maybe (Map e k, v) forall k a. Ord k => k -> Map k a -> Maybe a Map.lookup k -v PlaneGraph k v e -gr +v PlaneGraph k v e +gr -- note: this is linear in the number of edges out of v -- | Turn the split tree into a separator, and the trees inside the cycle, and outside the -- separator. -fromSplitTree :: Eq a => SplitTree a (EndPoint a) -> ([a],Vector 2 [Tree a]) +fromSplitTree :: Eq a => SplitTree a (EndPoint a) -> ([a],Vector 2 [Tree a]) fromSplitTree :: forall a. Eq a => SplitTree a (EndPoint a) -> ([a], Vector 2 [Tree a]) -fromSplitTree (SplitTree Path a (Split a (EndPoint a)) -t) = Path a (Split a (EndPoint a)) -> ([a], Vector 2 [Tree a]) -go Path a (Split a (EndPoint a)) -t +fromSplitTree (SplitTree Path a (Split a (EndPoint a)) +t) = Path a (Split a (EndPoint a)) -> ([a], Vector 2 [Tree a]) +go Path a (Split a (EndPoint a)) +t where - go :: Path a (Split a (EndPoint a)) -> ([a], Vector 2 [Tree a]) -go = \case - Leaf Split a (EndPoint a) -split -> Split a (EndPoint a) -> ([a], Vector 2 [Tree a]) + go :: Path a (Split a (EndPoint a)) -> ([a], Vector 2 [Tree a]) +go = \case + Leaf Split a (EndPoint a) +split -> Split a (EndPoint a) -> ([a], Vector 2 [Tree a]) forall a. Eq a => Split a (EndPoint a) -> ([a], Vector 2 [Tree a]) fromSplit Split a (EndPoint a) -split - Path a -u [Tree a] -before Path a (Split a (EndPoint a)) -path [Tree a] -after -> let ([a] -sep,Vector2 [Tree a] -inside [Tree a] -outside) = Path a (Split a (EndPoint a)) -> ([a], Vector 2 [Tree a]) -go Path a (Split a (EndPoint a)) -path +split + Path a +u [Tree a] +before Path a (Split a (EndPoint a)) +path [Tree a] +after -> let ([a] +sep,Vector2 [Tree a] +inside [Tree a] +outside) = Path a (Split a (EndPoint a)) -> ([a], Vector 2 [Tree a]) +go Path a (Split a (EndPoint a)) +path in (a -u a -> [a] -> [a] +u a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -sep,[Tree a] -> [Tree a] -> Vector 2 [Tree a] +sep,[Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 [Tree a] -inside ([Tree a] -before [Tree a] -> [Tree a] -> [Tree a] +inside ([Tree a] +before [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -outside [Tree a] -> [Tree a] -> [Tree a] +outside [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -after)) +after)) -- | Handling a split node -fromSplit :: Eq a => Split a (EndPoint a) -> ([a],Vector 2 [Tree a]) +fromSplit :: Eq a => Split a (EndPoint a) -> ([a],Vector 2 [Tree a]) fromSplit :: forall a. Eq a => Split a (EndPoint a) -> ([a], Vector 2 [Tree a]) fromSplit = \case - RootSplit (a -v,[Tree a] -beforeV,[Tree a] -afterV) [Tree a] -_ Path a (EndPoint a) -path [Tree a] + RootSplit (a +v,[Tree a] +beforeV,[Tree a] +afterV) [Tree a] +_ Path a (EndPoint a) +path [Tree a] _ -> case Path a (EndPoint a) -path of +path of Leaf (a _,[Tree a] _,[Tree a] @@ -1778,61 +1778,61 @@ forall a. HasCallStack => String -> a error String "w is a child of v, that shouldn't really happen" - Path a -u [Tree a] -_ Path a (EndPoint a) -path' [Tree a] + Path a +u [Tree a] +_ Path a (EndPoint a) +path' [Tree a] _ -> case (Tree a -> Bool) -> [Tree a] -> ([Tree a], [Tree a]) forall a. (a -> Bool) -> [a] -> ([a], [a]) List.break ((a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -u) (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool +u) (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . Tree a -> a forall a. Tree a -> a root) [Tree a] -beforeV of +beforeV of -- edge vw lies after the path from v via u to w - ([Tree a] -before, Tree a -_:[Tree a] -insideV) -> (a -v a -> [a] -> [a] + ([Tree a] +before, Tree a +_:[Tree a] +insideV) -> (a +v a -> [a] -> [a] forall a. a -> [a] -> [a] : a -u a -> [a] -> [a] +u a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] +sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 [Tree a] -inside [Tree a] -outside) +inside [Tree a] +outside) where - ([a] -sep, Vector2 [Tree a] -insideU [Tree a] -beforeU) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) + ([a] +sep, Vector2 [Tree a] +insideU [Tree a] +beforeU) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) forall a. Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) fromPath Side After Path a (EndPoint a) -path' - inside :: [Tree a] -inside = [Tree a] -insideU [Tree a] -> [Tree a] -> [Tree a] +path' + inside :: [Tree a] +inside = [Tree a] +insideU [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -insideV - outside :: [Tree a] -outside = [Tree a] -before [Tree a] -> [Tree a] -> [Tree a] +insideV + outside :: [Tree a] +outside = [Tree a] +before [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -beforeU [Tree a] -> [Tree a] -> [Tree a] +beforeU [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -afterV +afterV -- ede vw lies before the path from v via u to w ([Tree a], [Tree a]) _ -> case (Tree a -> Bool) -> [Tree a] -> ([Tree a], [Tree a]) @@ -1840,112 +1840,112 @@ List.break ((a -> a -> Bool forall a. Eq a => a -> a -> Bool == a -u) (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool +u) (a -> Bool) -> (Tree a -> a) -> Tree a -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . Tree a -> a forall a. Tree a -> a root) [Tree a] -afterV of - ([Tree a] -middle, Tree a -_:[Tree a] -afterU) -> (a -v a -> [a] -> [a] +afterV of + ([Tree a] +middle, Tree a +_:[Tree a] +afterU) -> (a +v a -> [a] -> [a] forall a. a -> [a] -> [a] : a -u a -> [a] -> [a] +u a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] +sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 [Tree a] -inside [Tree a] -outside) +inside [Tree a] +outside) where - ([a] -sep, Vector2 [Tree a] -insideU [Tree a] -afterW) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) + ([a] +sep, Vector2 [Tree a] +insideU [Tree a] +afterW) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) forall a. Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) fromPath Side Before Path a (EndPoint a) -path' - inside :: [Tree a] -inside = [Tree a] -middle [Tree a] -> [Tree a] -> [Tree a] +path' + inside :: [Tree a] +inside = [Tree a] +middle [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -insideU - outside :: [Tree a] -outside = [Tree a] -beforeV [Tree a] -> [Tree a] -> [Tree a] +insideU + outside :: [Tree a] +outside = [Tree a] +beforeV [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -afterW [Tree a] -> [Tree a] -> [Tree a] +afterW [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -afterU +afterU ([Tree a], [Tree a]) _ -> String -> ([a], Vector 2 [Tree a]) forall a. HasCallStack => String -> a error String "fromSplit. Rootsplit (v,w) not found" - NodeSplit a -u [Tree a] -before Path a (EndPoint a) -lp [Tree a] -middle Path a (EndPoint a) -rp [Tree a] -after -> (a -u a -> [a] -> [a] + NodeSplit a +u [Tree a] +before Path a (EndPoint a) +lp [Tree a] +middle Path a (EndPoint a) +rp [Tree a] +after -> (a +u a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -lSep [a] -> [a] -> [a] +lSep [a] -> [a] -> [a] forall a. Semigroup a => a -> a -> a <> [a] -rSep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] +rSep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 [Tree a] -inside [Tree a] -outside) +inside [Tree a] +outside) where - ([a] -lSep, Vector2 [Tree a] -lInside [Tree a] -lOutside) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) + ([a] +lSep, Vector2 [Tree a] +lInside [Tree a] +lOutside) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) forall a. Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) fromPath Side After Path a (EndPoint a) -lp - ([a] -rSep, Vector2 [Tree a] -rInside [Tree a] -rOutside) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) +lp + ([a] +rSep, Vector2 [Tree a] +rInside [Tree a] +rOutside) = Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) forall a. Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) fromPath Side Before Path a (EndPoint a) -rp +rp - inside :: [Tree a] -inside = [Tree a] -lInside [Tree a] -> [Tree a] -> [Tree a] + inside :: [Tree a] +inside = [Tree a] +lInside [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -rInside - outside :: [Tree a] -outside = [Tree a] -before [Tree a] -> [Tree a] -> [Tree a] +rInside + outside :: [Tree a] +outside = [Tree a] +before [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -lOutside [Tree a] -> [Tree a] -> [Tree a] +lOutside [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -rOutside [Tree a] -> [Tree a] -> [Tree a] +rOutside [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -after +after -data Side = Before | After deriving (Int -> Side -> ShowS +data Side = Before | After deriving (Int -> Side -> ShowS [Side] -> ShowS Side -> String (Int -> Side -> ShowS) @@ -1958,7 +1958,7 @@ show :: Side -> String $cshowList :: [Side] -> ShowS showList :: [Side] -> ShowS -Show,Side -> Side -> Bool +Show,Side -> Side -> Bool (Side -> Side -> Bool) -> (Side -> Side -> Bool) -> Eq Side forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: Side -> Side -> Bool @@ -1968,84 +1968,84 @@ Eq) -- | And handling the path. The side indicates which side is the inside. -fromPath :: Side -> Path a (EndPoint a) -> ([a],Vector 2 [Tree a]) +fromPath :: Side -> Path a (EndPoint a) -> ([a],Vector 2 [Tree a]) fromPath :: forall a. Side -> Path a (EndPoint a) -> ([a], Vector 2 [Tree a]) -fromPath Side -sel = Path a (a, [Tree a], [Tree a]) -> ([a], Vector 2 [Tree a]) -go +fromPath Side +sel = Path a (a, [Tree a], [Tree a]) -> ([a], Vector 2 [Tree a]) +go where - go :: Path a (a, [Tree a], [Tree a]) -> ([a], Vector 2 [Tree a]) -go = \case - Leaf (a -v, [Tree a] -before, [Tree a] -after) -> case Side -sel of + go :: Path a (a, [Tree a], [Tree a]) -> ([a], Vector 2 [Tree a]) +go = \case + Leaf (a +v, [Tree a] +before, [Tree a] +after) -> case Side +sel of Side Before -> ([a -v], [Tree a] -> [Tree a] -> Vector 2 [Tree a] +v], [Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 [Tree a] -before [Tree a] -after) +before [Tree a] +after) Side After -> ([a -v], [Tree a] -> [Tree a] -> Vector 2 [Tree a] +v], [Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 [Tree a] -after [Tree a] -before) - Path a -u [Tree a] -before Path a (a, [Tree a], [Tree a]) -path [Tree a] -after -> let ([a] -sep, Vector2 [Tree a] -inside [Tree a] -outside) = Path a (a, [Tree a], [Tree a]) -> ([a], Vector 2 [Tree a]) -go Path a (a, [Tree a], [Tree a]) -path +after [Tree a] +before) + Path a +u [Tree a] +before Path a (a, [Tree a], [Tree a]) +path [Tree a] +after -> let ([a] +sep, Vector2 [Tree a] +inside [Tree a] +outside) = Path a (a, [Tree a], [Tree a]) -> ([a], Vector 2 [Tree a]) +go Path a (a, [Tree a], [Tree a]) +path in case Side -sel of +sel of Side Before -> (a -u a -> [a] -> [a] +u a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] +sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 ([Tree a] -before [Tree a] -> [Tree a] -> [Tree a] +before [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -inside) ([Tree a] -after [Tree a] -> [Tree a] -> [Tree a] +inside) ([Tree a] +after [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -outside)) +outside)) Side After -> (a -u a -> [a] -> [a] +u a -> [a] -> [a] forall a. a -> [a] -> [a] : [a] -sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] +sep, [Tree a] -> [Tree a] -> Vector 2 [Tree a] forall r. r -> r -> Vector 2 r Vector2 ([Tree a] -after [Tree a] -> [Tree a] -> [Tree a] +after [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -inside) ([Tree a] -before [Tree a] -> [Tree a] -> [Tree a] +inside) ([Tree a] +before [Tree a] -> [Tree a] -> [Tree a] forall a. Semigroup a => a -> a -> a <> [Tree a] -outside)) +outside)) -class IsWeight w where - data Weighted w :: Type -> Type - getWeight :: Weighted w a -> w +class IsWeight w where + data Weighted w :: Type -> Type + getWeight :: Weighted w a -> w instance IsWeight Int where - data Weighted Int a = Weighted {-#UNPACK#-}!Int a deriving (Int -> Weighted Int a -> ShowS + data Weighted Int a = Weighted {-#UNPACK#-}!Int a deriving (Int -> Weighted Int a -> ShowS [Weighted Int a] -> ShowS Weighted Int a -> String (Int -> Weighted Int a -> ShowS) @@ -2063,7 +2063,7 @@ show :: Weighted Int a -> String $cshowList :: forall a. Show a => [Weighted Int a] -> ShowS showList :: [Weighted Int a] -> ShowS -Show,Weighted Int a -> Weighted Int a -> Bool +Show,Weighted Int a -> Weighted Int a -> Bool (Weighted Int a -> Weighted Int a -> Bool) -> (Weighted Int a -> Weighted Int a -> Bool) -> Eq (Weighted Int a) @@ -2073,7 +2073,7 @@ == :: Weighted Int a -> Weighted Int a -> Bool $c/= :: forall a. Eq a => Weighted Int a -> Weighted Int a -> Bool /= :: Weighted Int a -> Weighted Int a -> Bool -Eq,(forall a b. (a -> b) -> Weighted Int a -> Weighted Int b) +Eq,(forall a b. (a -> b) -> Weighted Int a -> Weighted Int b) -> (forall a b. a -> Weighted Int b -> Weighted Int a) -> Functor (Weighted Int) forall a b. a -> Weighted Int b -> Weighted Int a @@ -2086,34 +2086,34 @@ $c<$ :: forall a b. a -> Weighted Int b -> Weighted Int a <$ :: forall a b. a -> Weighted Int b -> Weighted Int a Functor) - getWeight :: forall a. Weighted Int a -> Int -getWeight (Weighted Int -w a + getWeight :: forall a. Weighted Int a -> Int +getWeight (Weighted Int +w a _) = Int -w +w -mkSeparator :: (Num w, IsWeight w) - => (a,a) -> Tree (Weighted w a) -> Vector 2 (Tree (Weighted w a)) +mkSeparator :: (Num w, IsWeight w) + => (a,a) -> Tree (Weighted w a) -> Vector 2 (Tree (Weighted w a)) mkSeparator :: forall w a. (Num w, IsWeight w) => (a, a) -> Tree (Weighted w a) -> Vector 2 (Tree (Weighted w a)) -mkSeparator (a -v,a -w) = Tree (Weighted w a) -> Vector 2 (Tree (Weighted w a)) +mkSeparator (a +v,a +w) = Tree (Weighted w a) -> Vector 2 (Tree (Weighted w a)) forall {a} {a}. Tree a -> a -go +go where - go :: Tree a -> a -go (Node a -u [Tree a] -chs) = a + go :: Tree a -> a +go (Node a +u [Tree a] +chs) = a forall a. HasCallStack => a undefined -costs :: (Num w, IsWeight w) => [Tree (Weighted w a)] -> w +costs :: (Num w, IsWeight w) => [Tree (Weighted w a)] -> w costs :: forall w a. (Num w, IsWeight w) => [Tree (Weighted w a)] -> w costs = [w] -> w forall a. Num a => [a] -> a @@ -2138,18 +2138,18 @@ -- | Annotate tht tree with the size of the subtrees -annotate :: Tree k -> Tree (Weighted Int k) +annotate :: Tree k -> Tree (Weighted Int k) annotate :: forall k. Tree k -> Tree (Weighted Int k) -annotate (Node k -v [Tree k] -chs) = let chs' :: [Tree (Weighted Int k)] -chs' = (Tree k -> Tree (Weighted Int k)) +annotate (Node k +v [Tree k] +chs) = let chs' :: [Tree (Weighted Int k)] +chs' = (Tree k -> Tree (Weighted Int k)) -> [Tree k] -> [Tree (Weighted Int k)] forall a b. (a -> b) -> [a] -> [b] map Tree k -> Tree (Weighted Int k) forall k. Tree k -> Tree (Weighted Int k) annotate [Tree k] -chs +chs in Weighted Int k -> [Tree (Weighted Int k)] -> Tree (Weighted Int k) forall a. a -> [Tree a] -> Tree a Node (Int -> k -> Weighted Int k @@ -2160,46 +2160,46 @@ + [Tree (Weighted Int k)] -> Int forall w a. (Num w, IsWeight w) => [Tree (Weighted w a)] -> w costs [Tree (Weighted Int k)] -chs') k -v) [Tree (Weighted Int k)] -chs' +chs') k +v) [Tree (Weighted Int k)] +chs' -graphEdges :: Ord k => PlaneGraph k v e -> Set (k,k) +graphEdges :: Ord k => PlaneGraph k v e -> Set (k,k) graphEdges :: forall k v e. Ord k => PlaneGraph k v e -> Set (k, k) graphEdges = (k -> (Map e k, v) -> Set (k, k)) -> Map k (Map e k, v) -> Set (k, k) forall m k a. Monoid m => (k -> a -> m) -> Map k a -> m -Map.foldMapWithKey (\k -u (Map e k -es,v +Map.foldMapWithKey (\k +u (Map e k +es,v _) -> [(k, k)] -> Set (k, k) forall a. Ord a => [a] -> Set a Set.fromList [ (k -u,k -v) | k -v <- Map e k -> [k] +u,k +v) | k +v <- Map e k -> [k] forall k a. Map k a -> [a] Map.elems Map e k -es, k -u k -> k -> Bool +es, k +u k -> k -> Bool forall a. Ord a => a -> a -> Bool <= k -v]) +v]) -treeEdges :: Ord k => Tree k -> Set (k,k) +treeEdges :: Ord k => Tree k -> Set (k,k) treeEdges :: forall k. Ord k => Tree k -> Set (k, k) -treeEdges (Node k -u [Tree k] -chs) = [(k, k)] -> Set (k, k) +treeEdges (Node k +u [Tree k] +chs) = [(k, k)] -> Set (k, k) forall a. Ord a => [a] -> Set a Set.fromList [ (k, k) -> (k, k) forall {b}. Ord b => (b, b) -> (b, b) -orient (k -u,k -v) | Node k -v [Tree k] +orient (k +u,k +v) | Node k +v [Tree k] _ <- [Tree k] -chs ] +chs ] Set (k, k) -> Set (k, k) -> Set (k, k) forall a. Semigroup a => a -> a -> a <> (Tree k -> Set (k, k)) -> [Tree k] -> Set (k, k) @@ -2210,38 +2210,38 @@ foldMap Tree k -> Set (k, k) forall k. Ord k => Tree k -> Set (k, k) treeEdges [Tree k] -chs +chs where - orient :: (b, b) -> (b, b) -orient (b -a,b -b) = if b -a b -> b -> Bool + orient :: (b, b) -> (b, b) +orient (b +a,b +b) = if b +a b -> b -> Bool forall a. Ord a => a -> a -> Bool <= b -b then (b -a,b -b) else (b -b,b -a) +b then (b +a,b +b) else (b +b,b +a) -root :: Tree a -> a +root :: Tree a -> a root :: forall a. Tree a -> a -root (Node a -v [Tree a] +root (Node a +v [Tree a] _) = a -v +v -------------------------------------------------------------------------------- -- | Find the last element matching some predicate -findR :: (a -> Bool) -> [a] -> Maybe a +findR :: (a -> Bool) -> [a] -> Maybe a findR :: forall a. (a -> Bool) -> [a] -> Maybe a -findR a -> Bool -p = (a -> Bool) -> [a] -> Maybe a +findR a -> Bool +p = (a -> Bool) -> [a] -> Maybe a forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Maybe a List.find a -> Bool -p ([a] -> Maybe a) -> ([a] -> [a]) -> [a] -> Maybe a +p ([a] -> Maybe a) -> ([a] -> [a]) -> [a] -> Maybe a forall b c a. (b -> c) -> (a -> b) -> a -> c . [a] -> [a] forall a. [a] -> [a] diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Type.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Type.html index 078b8add2..e98c75827 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Type.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.Type.html @@ -11,419 +11,245 @@ -- -------------------------------------------------------------------------------- module HGeometry.Plane.LowerEnvelope.Connected.Type - ( LowerEnvelope'(LowerEnvelope) - , theUnboundedVertex, boundedVertices - , traverseLowerEnvelope - - , singleton + ( MinimizationDiagram(..) + , asMap + , Region(..) + , CircularList + - , BoundedVertex - , BoundedVertexF(Vertex) - , location, definers, location2 + -- LowerEnvelope'(LowerEnvelope) + -- , theUnboundedVertex, boundedVertices + -- , traverseLowerEnvelope - , UnboundedVertex(UnboundedVertex) - , unboundedVertexId - , HasUnboundedEdges(..) - - , EdgeGeometry - , projectedEdgeGeometries, projectedEdgeGeometry - - - , outgoingUnboundedEdge - , edgeIntersectionLine - , intersectionLine' - , intersectionLineWithDefiners - , EdgeDefiners(..) - ) where - -import Control.Applicative -import Control.Lens -import qualified Data.Foldable as F -import Data.Foldable1 -import Data.Functor.Apply (Apply, (<.*>)) -import qualified Data.Functor.Apply as Apply -import qualified Data.List.NonEmpty as NonEmpty -import Data.Semigroup.Traversable(traverse1Maybe) -import qualified Data.Sequence as Seq -import qualified Data.Set as Set -import qualified Data.Vector as V -import HGeometry.Box -import HGeometry.Combinatorial.Util -import HGeometry.Ext -import HGeometry.Foldable.Sort -import HGeometry.Foldable.Util -import HGeometry.HalfLine -import HGeometry.HyperPlane.Class -import HGeometry.HyperPlane.NonVertical -import HGeometry.Line -import HGeometry.Line.General -import HGeometry.LineSegment -import HGeometry.Plane.LowerEnvelope.Type -import HGeometry.Plane.LowerEnvelope.VertexForm (intersectionLine) -import qualified HGeometry.Plane.LowerEnvelope.VertexForm as VertexForm -import HGeometry.Point -import HGeometry.Properties -import HGeometry.Vector -import HGeometry.Vector.NonEmpty.Util () -import Hiraffe.Graph -import Witherable - - --------------------------------------------------------------------------------- --- * Data type defining a connected lower envelope - --- | A connected lower envelope in adjacencylist form. --- --- invariant: there is always at least one bounded vertex. -data LowerEnvelope' plane = - LowerEnvelope !(UnboundedVertex plane) (Seq.Seq (BoundedVertex plane)) - -deriving instance (Show plane, Show (NumType plane)) => Show (LowerEnvelope' plane) -deriving instance (Eq plane, Eq (NumType plane)) => Eq (LowerEnvelope' plane) - -type instance NumType (LowerEnvelope' plane) = NumType plane -type instance Dimension (LowerEnvelope' plane) = 3 - -instance (Ord (NumType plane), Num (NumType plane)) => IsBoxable (LowerEnvelope' plane) where - -- ^ the bounding box contains all bounded vertices - boundingBox :: forall (d :: Nat) r. -(d ~ Dimension (LowerEnvelope' plane), - r ~ NumType (LowerEnvelope' plane), Ord r) => -LowerEnvelope' plane -> Box (Point d r) -boundingBox LowerEnvelope' plane -env = NonEmpty (Point 3 r) -> Box (Point d r) -forall (d :: Nat) r. -(d ~ Dimension (NonEmpty (Point 3 r)), - r ~ NumType (NonEmpty (Point 3 r)), Ord r) => -NonEmpty (Point 3 r) -> Box (Point d r) -forall g (d :: Nat) r. -(IsBoxable g, d ~ Dimension g, r ~ NumType g, Ord r) => -g -> Box (Point d r) -boundingBox (NonEmpty (Point 3 r) -> Box (Point d r)) --> ([Point 3 r] -> NonEmpty (Point 3 r)) --> [Point 3 r] --> Box (Point d r) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. [Point 3 r] -> NonEmpty (Point 3 r) -forall a. HasCallStack => [a] -> NonEmpty a -NonEmpty.fromList ([Point 3 r] -> Box (Point d r)) -> [Point 3 r] -> Box (Point d r) -forall a b. (a -> b) -> a -> b -$ LowerEnvelope' plane -envLowerEnvelope' plane --> Getting (Endo [Point 3 r]) (LowerEnvelope' plane) (Point 3 r) --> [Point 3 r] -forall s a. s -> Getting (Endo [a]) s a -> [a] -^..(Seq (BoundedVertex plane) - -> Const (Endo [Point 3 r]) (Seq (BoundedVertex plane))) --> LowerEnvelope' plane --> Const (Endo [Point 3 r]) (LowerEnvelope' plane) -forall plane (f :: * -> *). -Functor f => -(Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -boundedVertices((Seq (BoundedVertex plane) - -> Const (Endo [Point 3 r]) (Seq (BoundedVertex plane))) - -> LowerEnvelope' plane - -> Const (Endo [Point 3 r]) (LowerEnvelope' plane)) --> ((Point 3 r -> Const (Endo [Point 3 r]) (Point 3 r)) - -> Seq (BoundedVertex plane) - -> Const (Endo [Point 3 r]) (Seq (BoundedVertex plane))) --> Getting (Endo [Point 3 r]) (LowerEnvelope' plane) (Point 3 r) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(BoundedVertex plane - -> Const (Endo [Point 3 r]) (BoundedVertex plane)) --> Seq (BoundedVertex plane) --> Const (Endo [Point 3 r]) (Seq (BoundedVertex plane)) -forall (t :: * -> *) (f :: * -> *) a b. -(Traversable t, Applicative f) => -(a -> f b) -> t a -> f (t b) -forall (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Seq a -> f (Seq b) -traverse((BoundedVertex plane - -> Const (Endo [Point 3 r]) (BoundedVertex plane)) - -> Seq (BoundedVertex plane) - -> Const (Endo [Point 3 r]) (Seq (BoundedVertex plane))) --> ((Point 3 r -> Const (Endo [Point 3 r]) (Point 3 r)) - -> BoundedVertex plane - -> Const (Endo [Point 3 r]) (BoundedVertex plane)) --> (Point 3 r -> Const (Endo [Point 3 r]) (Point 3 r)) --> Seq (BoundedVertex plane) --> Const (Endo [Point 3 r]) (Seq (BoundedVertex plane)) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(Point 3 r -> Const (Endo [Point 3 r]) (Point 3 r)) --> BoundedVertex plane --> Const (Endo [Point 3 r]) (BoundedVertex plane) -forall plane r (f :: * -> *). -(NumType plane ~ r) => -Lens' (BoundedVertexF f plane) (Point 3 r) -Lens' (BoundedVertex plane) (Point 3 r) -location - -- the fromList is safe since there is alwasy at least one vertex - --- | Traversal of the planes in the lower envelope. Since we need an Ord constraint we --- can't make LowerEnvelope' an instance of Traversable. --- --- Be aware that this may destroy some of the invariants. So use this function with care. -traverseLowerEnvelope :: ( Applicative f, NumType plane ~ NumType plane' - , Ord plane' - ) - => (plane -> f plane') - -> LowerEnvelope' plane - -> f (LowerEnvelope' plane') -traverseLowerEnvelope :: forall (f :: * -> *) plane plane'. -(Applicative f, NumType plane ~ NumType plane', Ord plane') => -(plane -> f plane') --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -traverseLowerEnvelope plane -> f plane' -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = - UnboundedVertex plane' --> Seq (BoundedVertex plane') -> LowerEnvelope' plane' -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope (UnboundedVertex plane' - -> Seq (BoundedVertex plane') -> LowerEnvelope' plane') --> f (UnboundedVertex plane') --> f (Seq (BoundedVertex plane') -> LowerEnvelope' plane') -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> (plane -> f plane') --> UnboundedVertex plane -> f (UnboundedVertex plane') -forall (t :: * -> *) (f :: * -> *) a b. -(Traversable t, Applicative f) => -(a -> f b) -> t a -> f (t b) -forall (f :: * -> *) a b. -Applicative f => -(a -> f b) -> UnboundedVertex a -> f (UnboundedVertex b) -traverse plane -> f plane' -f UnboundedVertex plane -v0 f (Seq (BoundedVertex plane') -> LowerEnvelope' plane') --> f (Seq (BoundedVertex plane')) -> f (LowerEnvelope' plane') -forall a b. f (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b -<*> (BoundedVertex plane -> f (BoundedVertex plane')) --> Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane')) -forall (t :: * -> *) (f :: * -> *) a b. -(Traversable t, Applicative f) => -(a -> f b) -> t a -> f (t b) -forall (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Seq a -> f (Seq b) -traverse ((plane -> f plane') --> BoundedVertex plane -> f (BoundedVertex plane') -forall (f :: * -> *) (g :: * -> *) plane plane'. -(Traversable f, Applicative g, NumType plane ~ NumType plane', - Ord plane') => -(plane -> g plane') --> BoundedVertexF f plane -> g (BoundedVertexF f plane') -traverseBoundedV plane -> f plane' -f) Seq (BoundedVertex plane) -vs - --- | lens to access the unbounded vertex -theUnboundedVertex :: Lens' (LowerEnvelope' plane) (UnboundedVertex plane) -theUnboundedVertex :: forall plane (f :: * -> *). -Functor f => -(UnboundedVertex plane -> f (UnboundedVertex plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -theUnboundedVertex = (LowerEnvelope' plane -> UnboundedVertex plane) --> (LowerEnvelope' plane - -> UnboundedVertex plane -> LowerEnvelope' plane) --> Lens - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (UnboundedVertex plane) - (UnboundedVertex plane) -forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(LowerEnvelope UnboundedVertex plane -v Seq (BoundedVertex plane) -_) -> UnboundedVertex plane -v) - (\(LowerEnvelope UnboundedVertex plane -_ Seq (BoundedVertex plane) -vs) UnboundedVertex plane -v -> UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope UnboundedVertex plane -v Seq (BoundedVertex plane) -vs) - --- | Lens to access the sequence of bounded vertices. -boundedVertices :: Lens' (LowerEnvelope' plane) (Seq.Seq (BoundedVertex plane)) -boundedVertices :: forall plane (f :: * -> *). -Functor f => -(Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -boundedVertices = (LowerEnvelope' plane -> Seq (BoundedVertex plane)) --> (LowerEnvelope' plane - -> Seq (BoundedVertex plane) -> LowerEnvelope' plane) --> Lens - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (Seq (BoundedVertex plane)) - (Seq (BoundedVertex plane)) -forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(LowerEnvelope UnboundedVertex plane -_ Seq (BoundedVertex plane) -vs) -> Seq (BoundedVertex plane) -vs) - (\(LowerEnvelope UnboundedVertex plane -u Seq (BoundedVertex plane) -_ ) Seq (BoundedVertex plane) -vs -> UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope UnboundedVertex plane -u Seq (BoundedVertex plane) -vs) - --------------------------------------------------------------------------------- - --- | Given a single Vertex, construct a LowerEnvelope' out of it. -singleton :: (Plane_ plane r, Ord r, Fractional r, Ord plane) - => VertexForm.LEVertex plane -> LowerEnvelope' plane -singleton :: forall plane r. -(Plane_ plane r, Ord r, Fractional r, Ord plane) => -LEVertex plane -> LowerEnvelope' plane -singleton LEVertex plane -v = UnboundedVertex plane --> Seq (BoundedVertexF Seq plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope UnboundedVertex plane -v0 (BoundedVertexF Seq plane -> Seq (BoundedVertexF Seq plane) -forall a. a -> Seq a -Seq.singleton BoundedVertexF Seq plane -v') - where - i :: Int -i = Int -1 -- the vertexID we are using for this vertex. - v' :: BoundedVertexF Seq plane -v' = LEVertex plane -> BoundedVertexF Seq plane -forall plane r. -(Plane_ plane r, Ord r, Fractional r, Ord plane) => -LEVertex plane -> BoundedVertex plane -fromLEVertex LEVertex plane -v - v0 :: UnboundedVertex plane -v0 = Seq (LEEdge plane) -> UnboundedVertex plane -forall plane. Seq (LEEdge plane) -> UnboundedVertex plane -UnboundedVertex (Seq (LEEdge plane) -> UnboundedVertex plane) --> Seq (LEEdge plane) -> UnboundedVertex plane + -- , singleton + + -- , BoundedVertex + -- , BoundedVertexF(Vertex) + -- , location, definers, location2 + + -- , UnboundedVertex(UnboundedVertex) + -- , unboundedVertexId + -- , HasUnboundedEdges(..) + + -- , EdgeGeometry + -- , projectedEdgeGeometries, projectedEdgeGeometry + + + -- , outgoingUnboundedEdge + -- , edgeIntersectionLine + -- , intersectionLine' + -- , intersectionLineWithDefiners + -- , EdgeDefiners(..) + ) where + +import Control.Subcategory.Functor +import Data.List.NonEmpty (NonEmpty(..)) +import Data.Map (Map) +import qualified Data.Map as Map +import HGeometry.Point +import HGeometry.Properties +import HGeometry.Vector +import HGeometry.Vector.NonEmpty.Util () + +-------------------------------------------------------------------------------- +-- * The Minimization Diagram, i.e. the type that we use to represent our +-- lower envelope + +-- | A minimization daigram just maps every plane on the lower envelope to the region +-- above which it is minimal. Every plane has at most one such a region. +newtype MinimizationDiagram r plane = MinimizationDiagram (Map plane (Region r (Point 2 r))) + deriving stock (Int -> MinimizationDiagram r plane -> ShowS +[MinimizationDiagram r plane] -> ShowS +MinimizationDiagram r plane -> String +(Int -> MinimizationDiagram r plane -> ShowS) +-> (MinimizationDiagram r plane -> String) +-> ([MinimizationDiagram r plane] -> ShowS) +-> Show (MinimizationDiagram r plane) +forall a. +(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a +forall r plane. +(Show plane, Show r) => +Int -> MinimizationDiagram r plane -> ShowS +forall r plane. +(Show plane, Show r) => +[MinimizationDiagram r plane] -> ShowS +forall r plane. +(Show plane, Show r) => +MinimizationDiagram r plane -> String +$cshowsPrec :: forall r plane. +(Show plane, Show r) => +Int -> MinimizationDiagram r plane -> ShowS +showsPrec :: Int -> MinimizationDiagram r plane -> ShowS +$cshow :: forall r plane. +(Show plane, Show r) => +MinimizationDiagram r plane -> String +show :: MinimizationDiagram r plane -> String +$cshowList :: forall r plane. +(Show plane, Show r) => +[MinimizationDiagram r plane] -> ShowS +showList :: [MinimizationDiagram r plane] -> ShowS +Show,MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool +(MinimizationDiagram r plane + -> MinimizationDiagram r plane -> Bool) +-> (MinimizationDiagram r plane + -> MinimizationDiagram r plane -> Bool) +-> Eq (MinimizationDiagram r plane) +forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a +forall r plane. +(Eq plane, Eq r) => +MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool +$c== :: forall r plane. +(Eq plane, Eq r) => +MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool +== :: MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool +$c/= :: forall r plane. +(Eq plane, Eq r) => +MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool +/= :: MinimizationDiagram r plane -> MinimizationDiagram r plane -> Bool +Eq) + +type instance NumType (MinimizationDiagram r plane) = r +type instance Dimension (MinimizationDiagram r plane) = 2 + +instance Constrained (MinimizationDiagram r) where + type Dom (MinimizationDiagram r) plane = (Ord plane, NumType plane ~ r) + +instance CFunctor (MinimizationDiagram r) where + cmap :: forall a b. +(Dom (MinimizationDiagram r) a, Dom (MinimizationDiagram r) b) => +(a -> b) -> MinimizationDiagram r a -> MinimizationDiagram r b +cmap a -> b +f (MinimizationDiagram Map a (Region r (Point 2 r)) +m) = Map b (Region r (Point 2 r)) -> MinimizationDiagram r b +forall r plane. +Map plane (Region r (Point 2 r)) -> MinimizationDiagram r plane +MinimizationDiagram (Map b (Region r (Point 2 r)) -> MinimizationDiagram r b) +-> Map b (Region r (Point 2 r)) -> MinimizationDiagram r b forall a b. (a -> b) -> a -> b -$ Int -> LEEdge plane -> LEEdge plane -forall plane. Int -> LEEdge plane -> LEEdge plane -flipEdge Int -i (LEEdge plane -> LEEdge plane) --> Seq (LEEdge plane) -> Seq (LEEdge plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> Getting - (Seq (LEEdge plane)) - (BoundedVertexF Seq plane) - (Seq (LEEdge plane)) --> BoundedVertexF Seq plane -> Seq (LEEdge plane) -forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a -view Getting - (Seq (LEEdge plane)) - (BoundedVertexF Seq plane) - (Seq (LEEdge plane)) -forall (f1 :: * -> *) plane (g :: * -> *) (f2 :: * -> *). -Functor f2 => -(f1 (LEEdge plane) -> f2 (g (LEEdge plane))) --> BoundedVertexF f1 plane -> f2 (BoundedVertexF g plane) -incidentEdgesB BoundedVertexF Seq plane -v' - -- do we need to reverse the sequenceo f edges? - --------------------------------------------------------------------------------- - --- | The unbounded vertex. -newtype UnboundedVertex plane = UnboundedVertex { forall plane. UnboundedVertex plane -> Seq (LEEdge plane) -_incidentEdgesU :: Seq.Seq (LEEdge plane) } - deriving (Int -> UnboundedVertex plane -> ShowS -[UnboundedVertex plane] -> ShowS -UnboundedVertex plane -> String -(Int -> UnboundedVertex plane -> ShowS) --> (UnboundedVertex plane -> String) --> ([UnboundedVertex plane] -> ShowS) --> Show (UnboundedVertex plane) -forall plane. Show plane => Int -> UnboundedVertex plane -> ShowS -forall plane. Show plane => [UnboundedVertex plane] -> ShowS -forall plane. Show plane => UnboundedVertex plane -> String +$ (a -> b) +-> Map a (Region r (Point 2 r)) -> Map b (Region r (Point 2 r)) +forall k2 k1 a. Ord k2 => (k1 -> k2) -> Map k1 a -> Map k2 a +Map.mapKeys a -> b +f Map a (Region r (Point 2 r)) +m + + + +-- | Get the underlying Map that relates every plane in the envelope to its projected region +asMap :: MinimizationDiagram r plane -> Map plane (Region r (Point 2 r)) +asMap :: forall r plane. +MinimizationDiagram r plane -> Map plane (Region r (Point 2 r)) +asMap (MinimizationDiagram Map plane (Region r (Point 2 r)) +m) = Map plane (Region r (Point 2 r)) +m + + + +-- | A region in the minimization diagram. The boundary is given in CCW order; i.e. the +-- region is to the left of the boundary. +data Region r point = Bounded (CircularList point) + | Unbounded (Vector 2 r) + -- ^ vector indicating the direction of the unbounded edge + -- incident to the first vertex. Note that this vector + -- thus points INTO vertex v. + (NonEmpty point) + -- ^ the vertices in CCW order, + (Vector 2 r) + -- ^ the vector indicating the direction of the unbounded + -- edge incident to the last vertex. The vector points + -- away from the vertex (i.e. towards +infty). + deriving stock (Int -> Region r point -> ShowS +[Region r point] -> ShowS +Region r point -> String +(Int -> Region r point -> ShowS) +-> (Region r point -> String) +-> ([Region r point] -> ShowS) +-> Show (Region r point) forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a -$cshowsPrec :: forall plane. Show plane => Int -> UnboundedVertex plane -> ShowS -showsPrec :: Int -> UnboundedVertex plane -> ShowS -$cshow :: forall plane. Show plane => UnboundedVertex plane -> String -show :: UnboundedVertex plane -> String -$cshowList :: forall plane. Show plane => [UnboundedVertex plane] -> ShowS -showList :: [UnboundedVertex plane] -> ShowS -Show,UnboundedVertex plane -> UnboundedVertex plane -> Bool -(UnboundedVertex plane -> UnboundedVertex plane -> Bool) --> (UnboundedVertex plane -> UnboundedVertex plane -> Bool) --> Eq (UnboundedVertex plane) -forall plane. -Eq plane => -UnboundedVertex plane -> UnboundedVertex plane -> Bool +forall r point. +(Show point, Show r) => +Int -> Region r point -> ShowS +forall r point. (Show point, Show r) => [Region r point] -> ShowS +forall r point. (Show point, Show r) => Region r point -> String +$cshowsPrec :: forall r point. +(Show point, Show r) => +Int -> Region r point -> ShowS +showsPrec :: Int -> Region r point -> ShowS +$cshow :: forall r point. (Show point, Show r) => Region r point -> String +show :: Region r point -> String +$cshowList :: forall r point. (Show point, Show r) => [Region r point] -> ShowS +showList :: [Region r point] -> ShowS +Show,Region r point -> Region r point -> Bool +(Region r point -> Region r point -> Bool) +-> (Region r point -> Region r point -> Bool) +-> Eq (Region r point) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a -$c== :: forall plane. -Eq plane => -UnboundedVertex plane -> UnboundedVertex plane -> Bool -== :: UnboundedVertex plane -> UnboundedVertex plane -> Bool -$c/= :: forall plane. -Eq plane => -UnboundedVertex plane -> UnboundedVertex plane -> Bool -/= :: UnboundedVertex plane -> UnboundedVertex plane -> Bool -Eq,(forall a b. (a -> b) -> UnboundedVertex a -> UnboundedVertex b) --> (forall a b. a -> UnboundedVertex b -> UnboundedVertex a) --> Functor UnboundedVertex -forall a b. a -> UnboundedVertex b -> UnboundedVertex a -forall a b. (a -> b) -> UnboundedVertex a -> UnboundedVertex b +forall r point. +(Eq point, Eq r) => +Region r point -> Region r point -> Bool +$c== :: forall r point. +(Eq point, Eq r) => +Region r point -> Region r point -> Bool +== :: Region r point -> Region r point -> Bool +$c/= :: forall r point. +(Eq point, Eq r) => +Region r point -> Region r point -> Bool +/= :: Region r point -> Region r point -> Bool +Eq,(forall a b. (a -> b) -> Region r a -> Region r b) +-> (forall a b. a -> Region r b -> Region r a) +-> Functor (Region r) +forall a b. a -> Region r b -> Region r a +forall a b. (a -> b) -> Region r a -> Region r b +forall r a b. a -> Region r b -> Region r a +forall r a b. (a -> b) -> Region r a -> Region r b forall (f :: * -> *). (forall a b. (a -> b) -> f a -> f b) -> (forall a b. a -> f b -> f a) -> Functor f -$cfmap :: forall a b. (a -> b) -> UnboundedVertex a -> UnboundedVertex b -fmap :: forall a b. (a -> b) -> UnboundedVertex a -> UnboundedVertex b -$c<$ :: forall a b. a -> UnboundedVertex b -> UnboundedVertex a -<$ :: forall a b. a -> UnboundedVertex b -> UnboundedVertex a -Functor,(forall m. Monoid m => UnboundedVertex m -> m) --> (forall m a. Monoid m => (a -> m) -> UnboundedVertex a -> m) --> (forall m a. Monoid m => (a -> m) -> UnboundedVertex a -> m) --> (forall a b. (a -> b -> b) -> b -> UnboundedVertex a -> b) --> (forall a b. (a -> b -> b) -> b -> UnboundedVertex a -> b) --> (forall b a. (b -> a -> b) -> b -> UnboundedVertex a -> b) --> (forall b a. (b -> a -> b) -> b -> UnboundedVertex a -> b) --> (forall a. (a -> a -> a) -> UnboundedVertex a -> a) --> (forall a. (a -> a -> a) -> UnboundedVertex a -> a) --> (forall a. UnboundedVertex a -> [a]) --> (forall a. UnboundedVertex a -> Bool) --> (forall a. UnboundedVertex a -> Int) --> (forall a. Eq a => a -> UnboundedVertex a -> Bool) --> (forall a. Ord a => UnboundedVertex a -> a) --> (forall a. Ord a => UnboundedVertex a -> a) --> (forall a. Num a => UnboundedVertex a -> a) --> (forall a. Num a => UnboundedVertex a -> a) --> Foldable UnboundedVertex -forall a. Eq a => a -> UnboundedVertex a -> Bool -forall a. Num a => UnboundedVertex a -> a -forall a. Ord a => UnboundedVertex a -> a -forall m. Monoid m => UnboundedVertex m -> m -forall a. UnboundedVertex a -> Bool -forall a. UnboundedVertex a -> Int -forall a. UnboundedVertex a -> [a] -forall a. (a -> a -> a) -> UnboundedVertex a -> a -forall m a. Monoid m => (a -> m) -> UnboundedVertex a -> m -forall b a. (b -> a -> b) -> b -> UnboundedVertex a -> b -forall a b. (a -> b -> b) -> b -> UnboundedVertex a -> b +$cfmap :: forall r a b. (a -> b) -> Region r a -> Region r b +fmap :: forall a b. (a -> b) -> Region r a -> Region r b +$c<$ :: forall r a b. a -> Region r b -> Region r a +<$ :: forall a b. a -> Region r b -> Region r a +Functor,(forall m. Monoid m => Region r m -> m) +-> (forall m a. Monoid m => (a -> m) -> Region r a -> m) +-> (forall m a. Monoid m => (a -> m) -> Region r a -> m) +-> (forall a b. (a -> b -> b) -> b -> Region r a -> b) +-> (forall a b. (a -> b -> b) -> b -> Region r a -> b) +-> (forall b a. (b -> a -> b) -> b -> Region r a -> b) +-> (forall b a. (b -> a -> b) -> b -> Region r a -> b) +-> (forall a. (a -> a -> a) -> Region r a -> a) +-> (forall a. (a -> a -> a) -> Region r a -> a) +-> (forall a. Region r a -> [a]) +-> (forall a. Region r a -> Bool) +-> (forall a. Region r a -> Int) +-> (forall a. Eq a => a -> Region r a -> Bool) +-> (forall a. Ord a => Region r a -> a) +-> (forall a. Ord a => Region r a -> a) +-> (forall a. Num a => Region r a -> a) +-> (forall a. Num a => Region r a -> a) +-> Foldable (Region r) +forall a. Eq a => a -> Region r a -> Bool +forall a. Num a => Region r a -> a +forall a. Ord a => Region r a -> a +forall m. Monoid m => Region r m -> m +forall a. Region r a -> Bool +forall a. Region r a -> Int +forall a. Region r a -> [a] +forall a. (a -> a -> a) -> Region r a -> a +forall r a. Eq a => a -> Region r a -> Bool +forall r a. Num a => Region r a -> a +forall r a. Ord a => Region r a -> a +forall m a. Monoid m => (a -> m) -> Region r a -> m +forall r m. Monoid m => Region r m -> m +forall r a. Region r a -> Bool +forall r a. Region r a -> Int +forall r a. Region r a -> [a] +forall b a. (b -> a -> b) -> b -> Region r a -> b +forall a b. (a -> b -> b) -> b -> Region r a -> b +forall r a. (a -> a -> a) -> Region r a -> a +forall r m a. Monoid m => (a -> m) -> Region r a -> m +forall r b a. (b -> a -> b) -> b -> Region r a -> b +forall r a b. (a -> b -> b) -> b -> Region r a -> b forall (t :: * -> *). (forall m. Monoid m => t m -> m) -> (forall m a. Monoid m => (a -> m) -> t a -> m) @@ -443,56 +269,70 @@ -> (forall a. Num a => t a -> a) -> (forall a. Num a => t a -> a) -> Foldable t -$cfold :: forall m. Monoid m => UnboundedVertex m -> m -fold :: forall m. Monoid m => UnboundedVertex m -> m -$cfoldMap :: forall m a. Monoid m => (a -> m) -> UnboundedVertex a -> m -foldMap :: forall m a. Monoid m => (a -> m) -> UnboundedVertex a -> m -$cfoldMap' :: forall m a. Monoid m => (a -> m) -> UnboundedVertex a -> m -foldMap' :: forall m a. Monoid m => (a -> m) -> UnboundedVertex a -> m -$cfoldr :: forall a b. (a -> b -> b) -> b -> UnboundedVertex a -> b -foldr :: forall a b. (a -> b -> b) -> b -> UnboundedVertex a -> b -$cfoldr' :: forall a b. (a -> b -> b) -> b -> UnboundedVertex a -> b -foldr' :: forall a b. (a -> b -> b) -> b -> UnboundedVertex a -> b -$cfoldl :: forall b a. (b -> a -> b) -> b -> UnboundedVertex a -> b -foldl :: forall b a. (b -> a -> b) -> b -> UnboundedVertex a -> b -$cfoldl' :: forall b a. (b -> a -> b) -> b -> UnboundedVertex a -> b -foldl' :: forall b a. (b -> a -> b) -> b -> UnboundedVertex a -> b -$cfoldr1 :: forall a. (a -> a -> a) -> UnboundedVertex a -> a -foldr1 :: forall a. (a -> a -> a) -> UnboundedVertex a -> a -$cfoldl1 :: forall a. (a -> a -> a) -> UnboundedVertex a -> a -foldl1 :: forall a. (a -> a -> a) -> UnboundedVertex a -> a -$ctoList :: forall a. UnboundedVertex a -> [a] -toList :: forall a. UnboundedVertex a -> [a] -$cnull :: forall a. UnboundedVertex a -> Bool -null :: forall a. UnboundedVertex a -> Bool -$clength :: forall a. UnboundedVertex a -> Int -length :: forall a. UnboundedVertex a -> Int -$celem :: forall a. Eq a => a -> UnboundedVertex a -> Bool -elem :: forall a. Eq a => a -> UnboundedVertex a -> Bool -$cmaximum :: forall a. Ord a => UnboundedVertex a -> a -maximum :: forall a. Ord a => UnboundedVertex a -> a -$cminimum :: forall a. Ord a => UnboundedVertex a -> a -minimum :: forall a. Ord a => UnboundedVertex a -> a -$csum :: forall a. Num a => UnboundedVertex a -> a -sum :: forall a. Num a => UnboundedVertex a -> a -$cproduct :: forall a. Num a => UnboundedVertex a -> a -product :: forall a. Num a => UnboundedVertex a -> a -Foldable,Functor UnboundedVertex -Foldable UnboundedVertex -(Functor UnboundedVertex, Foldable UnboundedVertex) => +$cfold :: forall r m. Monoid m => Region r m -> m +fold :: forall m. Monoid m => Region r m -> m +$cfoldMap :: forall r m a. Monoid m => (a -> m) -> Region r a -> m +foldMap :: forall m a. Monoid m => (a -> m) -> Region r a -> m +$cfoldMap' :: forall r m a. Monoid m => (a -> m) -> Region r a -> m +foldMap' :: forall m a. Monoid m => (a -> m) -> Region r a -> m +$cfoldr :: forall r a b. (a -> b -> b) -> b -> Region r a -> b +foldr :: forall a b. (a -> b -> b) -> b -> Region r a -> b +$cfoldr' :: forall r a b. (a -> b -> b) -> b -> Region r a -> b +foldr' :: forall a b. (a -> b -> b) -> b -> Region r a -> b +$cfoldl :: forall r b a. (b -> a -> b) -> b -> Region r a -> b +foldl :: forall b a. (b -> a -> b) -> b -> Region r a -> b +$cfoldl' :: forall r b a. (b -> a -> b) -> b -> Region r a -> b +foldl' :: forall b a. (b -> a -> b) -> b -> Region r a -> b +$cfoldr1 :: forall r a. (a -> a -> a) -> Region r a -> a +foldr1 :: forall a. (a -> a -> a) -> Region r a -> a +$cfoldl1 :: forall r a. (a -> a -> a) -> Region r a -> a +foldl1 :: forall a. (a -> a -> a) -> Region r a -> a +$ctoList :: forall r a. Region r a -> [a] +toList :: forall a. Region r a -> [a] +$cnull :: forall r a. Region r a -> Bool +null :: forall a. Region r a -> Bool +$clength :: forall r a. Region r a -> Int +length :: forall a. Region r a -> Int +$celem :: forall r a. Eq a => a -> Region r a -> Bool +elem :: forall a. Eq a => a -> Region r a -> Bool +$cmaximum :: forall r a. Ord a => Region r a -> a +maximum :: forall a. Ord a => Region r a -> a +$cminimum :: forall r a. Ord a => Region r a -> a +minimum :: forall a. Ord a => Region r a -> a +$csum :: forall r a. Num a => Region r a -> a +sum :: forall a. Num a => Region r a -> a +$cproduct :: forall r a. Num a => Region r a -> a +product :: forall a. Num a => Region r a -> a +Foldable,Functor (Region r) +Foldable (Region r) +(Functor (Region r), Foldable (Region r)) => (forall (f :: * -> *) a b. Applicative f => - (a -> f b) -> UnboundedVertex a -> f (UnboundedVertex b)) + (a -> f b) -> Region r a -> f (Region r b)) -> (forall (f :: * -> *) a. Applicative f => - UnboundedVertex (f a) -> f (UnboundedVertex a)) + Region r (f a) -> f (Region r a)) -> (forall (m :: * -> *) a b. Monad m => - (a -> m b) -> UnboundedVertex a -> m (UnboundedVertex b)) + (a -> m b) -> Region r a -> m (Region r b)) -> (forall (m :: * -> *) a. Monad m => - UnboundedVertex (m a) -> m (UnboundedVertex a)) --> Traversable UnboundedVertex + Region r (m a) -> m (Region r a)) +-> Traversable (Region r) +forall r. Functor (Region r) +forall r. Foldable (Region r) +forall r (m :: * -> *) a. +Monad m => +Region r (m a) -> m (Region r a) +forall r (f :: * -> *) a. +Applicative f => +Region r (f a) -> f (Region r a) +forall r (m :: * -> *) a b. +Monad m => +(a -> m b) -> Region r a -> m (Region r b) +forall r (f :: * -> *) a b. +Applicative f => +(a -> f b) -> Region r a -> f (Region r b) forall (t :: * -> *). (Functor t, Foldable t) => (forall (f :: * -> *) a b. @@ -504,2185 +344,47 @@ (a -> m b) -> t a -> m (t b)) -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a)) -> Traversable t -forall (m :: * -> *) a. -Monad m => -UnboundedVertex (m a) -> m (UnboundedVertex a) +forall (m :: * -> *) a. Monad m => Region r (m a) -> m (Region r a) forall (f :: * -> *) a. Applicative f => -UnboundedVertex (f a) -> f (UnboundedVertex a) +Region r (f a) -> f (Region r a) forall (m :: * -> *) a b. Monad m => -(a -> m b) -> UnboundedVertex a -> m (UnboundedVertex b) +(a -> m b) -> Region r a -> m (Region r b) forall (f :: * -> *) a b. Applicative f => -(a -> f b) -> UnboundedVertex a -> f (UnboundedVertex b) -$ctraverse :: forall (f :: * -> *) a b. +(a -> f b) -> Region r a -> f (Region r b) +$ctraverse :: forall r (f :: * -> *) a b. Applicative f => -(a -> f b) -> UnboundedVertex a -> f (UnboundedVertex b) +(a -> f b) -> Region r a -> f (Region r b) traverse :: forall (f :: * -> *) a b. Applicative f => -(a -> f b) -> UnboundedVertex a -> f (UnboundedVertex b) -$csequenceA :: forall (f :: * -> *) a. +(a -> f b) -> Region r a -> f (Region r b) +$csequenceA :: forall r (f :: * -> *) a. Applicative f => -UnboundedVertex (f a) -> f (UnboundedVertex a) +Region r (f a) -> f (Region r a) sequenceA :: forall (f :: * -> *) a. Applicative f => -UnboundedVertex (f a) -> f (UnboundedVertex a) -$cmapM :: forall (m :: * -> *) a b. +Region r (f a) -> f (Region r a) +$cmapM :: forall r (m :: * -> *) a b. Monad m => -(a -> m b) -> UnboundedVertex a -> m (UnboundedVertex b) +(a -> m b) -> Region r a -> m (Region r b) mapM :: forall (m :: * -> *) a b. Monad m => -(a -> m b) -> UnboundedVertex a -> m (UnboundedVertex b) -$csequence :: forall (m :: * -> *) a. +(a -> m b) -> Region r a -> m (Region r b) +$csequence :: forall r (m :: * -> *) a. Monad m => -UnboundedVertex (m a) -> m (UnboundedVertex a) -sequence :: forall (m :: * -> *) a. -Monad m => -UnboundedVertex (m a) -> m (UnboundedVertex a) +Region r (m a) -> m (Region r a) +sequence :: forall (m :: * -> *) a. Monad m => Region r (m a) -> m (Region r a) Traversable) - --- | access the incidentEdges of an unbounded vertex -incidentEdgesU :: Iso (UnboundedVertex plane) (UnboundedVertex plane') - (Seq.Seq (LEEdge plane)) (Seq.Seq (LEEdge plane')) -incidentEdgesU :: forall plane plane' (p :: * -> * -> *) (f :: * -> *). -(Profunctor p, Functor f) => -p (Seq (LEEdge plane)) (f (Seq (LEEdge plane'))) --> p (UnboundedVertex plane) (f (UnboundedVertex plane')) -incidentEdgesU = p (Seq (LEEdge plane)) (f (Seq (LEEdge plane'))) --> p (UnboundedVertex plane) (f (UnboundedVertex plane')) -forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b -Iso - (UnboundedVertex plane) - (UnboundedVertex plane') - (Seq (LEEdge plane)) - (Seq (LEEdge plane')) -coerced - --- | The vertexID of the unbounded vertex -unboundedVertexId :: VertexID -unboundedVertexId :: Int -unboundedVertexId = Int -0 - --------------------------------------------------------------------------------- - --- | Vertices in of the lower envelope in adjacencylist form. -type BoundedVertex = BoundedVertexF Seq.Seq - --- | Given a vertex in vertex form, construct A BoundedVertex from --- it. Note that this essentially assumes the vertex is connected to --- the unbounded vertex with all its outgoing edgse. --- --- \(O(k \log k)\), where \(k\) is the number of definers. -fromLEVertex :: (Plane_ plane r, Ord r, Fractional r, Ord plane) - => VertexForm.LEVertex plane - -> BoundedVertex plane -fromLEVertex :: forall plane r. -(Plane_ plane r, Ord r, Fractional r, Ord plane) => -LEVertex plane -> BoundedVertex plane -fromLEVertex (VertexForm.LEVertex Point 3 (NumType plane) -v Definers plane -defs) = Point 3 (NumType plane) --> Definers plane -> Seq (LEEdge plane) -> BoundedVertexF Seq plane -forall (f :: * -> *) plane. -Point 3 (NumType plane) --> Set plane -> f (LEEdge plane) -> BoundedVertexF f plane -Vertex Point 3 (NumType plane) -v Definers plane -defs Seq (LEEdge plane) -es - where - es :: Seq (LEEdge plane) -es = (\(HalfLine (Point 2 r) -_ :+ EdgeDefiners plane -hl plane -hr) -> Int -> plane -> plane -> LEEdge plane -forall plane. Int -> plane -> plane -> LEEdge plane -Edge Int -unboundedVertexId plane -hl plane -hr) ((HalfLine (Point 2 r) :+ EdgeDefiners plane) -> LEEdge plane) --> Seq (HalfLine (Point 2 r) :+ EdgeDefiners plane) --> Seq (LEEdge plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> [HalfLine (Point 2 r) :+ EdgeDefiners plane] --> Seq (HalfLine (Point 2 r) :+ EdgeDefiners plane) -forall (f :: * -> *) r e. -(Foldable f, Ord r, Num r) => -f (HalfLine (Point 2 r) :+ e) -> Seq (HalfLine (Point 2 r) :+ e) -sortAroundStart [HalfLine (Point 2 r) :+ EdgeDefiners plane] -es' - es' :: [HalfLine (Point 2 r) :+ EdgeDefiners plane] -es' = (Two plane -> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane)) --> [Two plane] -> [HalfLine (Point 2 r) :+ EdgeDefiners plane] -forall a b. (a -> Maybe b) -> [a] -> [b] -forall (f :: * -> *) a b. -Filterable f => -(a -> Maybe b) -> f a -> f b -mapMaybe (\t :: Two plane -t@(Two plane -h1 plane -h2) -> let defs' :: NonEmpty plane -defs' = Definers plane -> NonEmpty plane -forall {t :: * -> *} {a}. Foldable t => t a -> NonEmpty a -toNonEmpty' (Definers plane -> NonEmpty plane) --> Definers plane -> NonEmpty plane -forall a b. (a -> b) -> a -> b -$ plane -> Definers plane -> Definers plane -forall a. Ord a => a -> Set a -> Set a -Set.delete plane -h1 (Definers plane -> Definers plane) --> Definers plane -> Definers plane -forall a b. (a -> b) -> a -> b -$ plane -> Definers plane -> Definers plane -forall a. Ord a => a -> Set a -> Set a -Set.delete plane -h2 Definers plane -defs - in Point 3 r --> Two plane --> NonEmpty plane --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -forall plane r (f :: * -> *). -(Plane_ plane r, Ord r, Fractional r, Foldable1 f) => -Point 3 r --> Two plane --> f plane --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -outgoingUnboundedEdge Point 3 r -Point 3 (NumType plane) -v Two plane -t NonEmpty plane -defs' - ) ([Two plane] -> [HalfLine (Point 2 r) :+ EdgeDefiners plane]) --> [Two plane] -> [HalfLine (Point 2 r) :+ EdgeDefiners plane] -forall a b. (a -> b) -> a -> b -$ Definers plane -> [Two plane] -forall (f :: * -> *) a. Foldable f => f a -> [Two a] -uniquePairs Definers plane -defs - toNonEmpty' :: t a -> NonEmpty a -toNonEmpty' t a -s = case [a] -> Maybe (NonEmpty a) -forall a. [a] -> Maybe (NonEmpty a) -NonEmpty.nonEmpty ([a] -> Maybe (NonEmpty a)) -> [a] -> Maybe (NonEmpty a) -forall a b. (a -> b) -> a -> b -$ t a -> [a] -forall a. t a -> [a] -forall (t :: * -> *) a. Foldable t => t a -> [a] -F.toList t a -s of - Just NonEmpty a -xs -> NonEmpty a -xs - Maybe (NonEmpty a) -_ -> String -> NonEmpty a -forall a. HasCallStack => String -> a -error String -"fromLEVertex: absurd, there should be at least 3 definers" - - --- | Given a bunch of halflines that all share their starting point v, --- sort them cyclically around the starting point v. -sortAroundStart :: (Foldable f, Ord r, Num r) - => f (HalfLine (Point 2 r) :+ e) -> Seq.Seq (HalfLine (Point 2 r) :+ e) -sortAroundStart :: forall (f :: * -> *) r e. -(Foldable f, Ord r, Num r) => -f (HalfLine (Point 2 r) :+ e) -> Seq (HalfLine (Point 2 r) :+ e) -sortAroundStart = Vector (HalfLine (Point 2 r) :+ e) --> Seq (HalfLine (Point 2 r) :+ e) -forall (f :: * -> *) (g :: * -> *) a. -(HasFromFoldable f, Foldable g) => -g a -> f a -forall (g :: * -> *) a. Foldable g => g a -> Seq a -fromFoldable (Vector (HalfLine (Point 2 r) :+ e) - -> Seq (HalfLine (Point 2 r) :+ e)) --> (f (HalfLine (Point 2 r) :+ e) - -> Vector (HalfLine (Point 2 r) :+ e)) --> f (HalfLine (Point 2 r) :+ e) --> Seq (HalfLine (Point 2 r) :+ e) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. forall (vector :: * -> *) (f :: * -> *) a. -(Foldable f, Vector vector a) => -(a -> a -> Ordering) -> f a -> vector a -sortBy @V.Vector (HalfLine (Point 2 r) :+ e) --> (HalfLine (Point 2 r) :+ e) -> Ordering -forall {point} {point} {extra} {extra}. -(NumType point ~ NumType point, Dimension point ~ 2, - Dimension point ~ 2, Point_ point 2 (NumType point), - Ord (NumType point), Num (NumType point)) => -(HalfLine point :+ extra) -> (HalfLine point :+ extra) -> Ordering -compareAroundStart - where - compareAroundStart :: (HalfLine point :+ extra) -> (HalfLine point :+ extra) -> Ordering -compareAroundStart (HalfLine point -v Vector (Dimension point) (NumType point) -d :+ extra -_) - (HalfLine point -_ Vector (Dimension point) (NumType point) -d' :+ extra -_) = point -> point -> point -> Ordering -forall center r point. -(Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => -center -> point -> point -> Ordering -ccwCmpAround point -v (point -v point -> Vector (Dimension point) (NumType point) -> point -forall point (d :: Nat) r. -(Affine_ point d r, Num r) => -point -> Vector d r -> point -.+^ Vector (Dimension point) (NumType point) -d) (point -v point -> Vector (Dimension point) (NumType point) -> point -forall point (d :: Nat) r. -(Affine_ point d r, Num r) => -point -> Vector d r -> point -.+^ Vector (Dimension point) (NumType point) -d') - - - --- | Given a location of a vertex v, a pair of planes h1,h2 and the --- remaining defining planes of v, computes the outgoing half-line --- from v on which h1,h2 are the lowest (if such an halfline exists). -outgoingUnboundedEdge :: ( Plane_ plane r, Ord r, Fractional r - , Foldable1 f - ) - => Point 3 r -- ^ the location of the vertex v - -> Two plane -- ^ the pair of planes for which to compute - -- the halfine - -> f plane -- ^ the other planes intersecting at v - -> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -outgoingUnboundedEdge :: forall plane r (f :: * -> *). -(Plane_ plane r, Ord r, Fractional r, Foldable1 f) => -Point 3 r --> Two plane --> f plane --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -outgoingUnboundedEdge Point 3 r -v (Two plane -h1 plane -h2) f plane -h3s = - plane -> plane -> Maybe (LinePV 2 r :+ EdgeDefiners plane) -forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -plane -> plane -> Maybe (LinePV 2 r :+ EdgeDefiners plane) -intersectionLineWithDefiners plane -h1 plane -h2 Maybe (LinePV 2 r :+ EdgeDefiners plane) --> ((LinePV 2 r :+ EdgeDefiners plane) - -> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane)) --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -forall a b. Maybe a -> (a -> Maybe b) -> Maybe b -forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b ->>= Point 2 r --> f plane --> (LinePV 2 r :+ EdgeDefiners plane) --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -forall plane r (f :: * -> *). -(Plane_ plane r, Foldable1 f, Fractional r, Ord r) => -Point 2 r --> f plane --> (LinePV 2 r :+ EdgeDefiners plane) --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -toHalfLineFrom (Point 3 r -> Point 2 r -forall (i :: Nat) point (d :: Nat) r. -(Point_ point d r, i <= d, Has_ Vector_ i r) => -point -> Point i r -projectPoint Point 3 r -v) f plane -h3s - -- todo, if there are more planes, I guess we should check if the hl is not dominated by the other - -- planes either. - --- | Given : --- --- v : the projected location of the vertex --- hs : the remaining planes defining v (typically just one plane h3) --- l : the (projection of the) line l in which planes h1 and h2 intersect (containing v) --- --- we compute the half-line eminating from v in which h1 and h2 define --- an edge incident to v. -toHalfLineFrom :: (Plane_ plane r, Foldable1 f, Fractional r, Ord r) - => Point 2 r -- ^ vertex v - -> f plane -- ^ the remaining plane(s) hs - -> LinePV 2 r :+ EdgeDefiners plane -- ^ the line l - -> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -toHalfLineFrom :: forall plane r (f :: * -> *). -(Plane_ plane r, Foldable1 f, Fractional r, Ord r) => -Point 2 r --> f plane --> (LinePV 2 r :+ EdgeDefiners plane) --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -toHalfLineFrom Point 2 r -v f plane -hs ((LinePV Point 2 r -_ Vector 2 r -w) :+ defs :: EdgeDefiners plane -defs@(EdgeDefiners plane -h1 plane -h2)) = - Vector 2 r --> EdgeDefiners plane --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -validate Vector 2 r -w EdgeDefiners plane -defs Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -forall a. Maybe a -> Maybe a -> Maybe a -forall (f :: * -> *) a. Alternative f => f a -> f a -> f a -<|> Vector 2 r --> EdgeDefiners plane --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -validate ((-r -1) r -> Vector 2 r -> Vector 2 r -forall r vector (d :: Nat). -(Num r, Vector_ vector d r) => -r -> vector -> vector -*^ Vector 2 r -w) (plane -> plane -> EdgeDefiners plane -forall plane. plane -> plane -> EdgeDefiners plane -EdgeDefiners plane -h2 plane -h1) - -- We try both directions. Note that if we reverse the direction - -- of the line, what the left/right plane is changes. - -- - -- If neither direction works, then h1,h2 do not define a good - -- direction. This should happen only when there are more than 3 - -- planes intersecting in v, i.e. in degernate sitatuions - where - -- | test if direction d is a good direction, i.e. if towards direction d - -- h1 (and thus also h2) is actually lower than all remaining defining planes. - validate :: Vector 2 r --> EdgeDefiners plane --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -validate Vector 2 r -d EdgeDefiners plane -defs' = let zVal :: plane -> r -zVal = Point 2 r -> plane -> r -forall point. -(Num r, 1 <= 3, Point_ point (3 - 1) r) => -point -> plane -> r -forall hyperPlane (d :: Nat) r point. -(NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d, - Point_ point (d - 1) r) => -point -> hyperPlane -> r -evalAt (Point 2 r -v Point 2 r -> Vector 2 r -> Point 2 r -forall point (d :: Nat) r. -(Affine_ point d r, Num r) => -point -> Vector d r -> point -.+^ Vector 2 r -d) - in if (plane -> Bool) -> f plane -> Bool -forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool -all (\plane -h3 -> plane -> r -zVal plane -h1 r -> r -> Bool -forall a. Ord a => a -> a -> Bool -< plane -> r -zVal plane -h3) f plane -hs - then (HalfLine (Point 2 r) :+ EdgeDefiners plane) --> Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -forall a. a -> Maybe a -Just (Point 2 r --> Vector (Dimension (Point 2 r)) (NumType (Point 2 r)) --> HalfLine (Point 2 r) -forall point. -point -> Vector (Dimension point) (NumType point) -> HalfLine point -HalfLine Point 2 r -v Vector 2 r -Vector (Dimension (Point 2 r)) (NumType (Point 2 r)) -d HalfLine (Point 2 r) --> EdgeDefiners plane -> HalfLine (Point 2 r) :+ EdgeDefiners plane -forall core extra. core -> extra -> core :+ extra -:+ EdgeDefiners plane -defs') else Maybe (HalfLine (Point 2 r) :+ EdgeDefiners plane) -forall a. Maybe a -Nothing - - - - --- | The planes left (above) and right (below) their intersection --- line. -data EdgeDefiners plane = EdgeDefiners { forall plane. EdgeDefiners plane -> plane -_leftPlane :: plane -- ^ above plane - , forall plane. EdgeDefiners plane -> plane -_rightPlane :: plane -- ^ below plane - } - --- | Computes the line in which the two planes intersect, and labels --- the halfplanes with the lowest plane. --- --- The returned line will have h to its left and h' to its right. -intersectionLineWithDefiners :: ( Plane_ plane r, Ord r, Fractional r) - => plane -> plane -> Maybe (LinePV 2 r :+ EdgeDefiners plane) -intersectionLineWithDefiners :: forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -plane -> plane -> Maybe (LinePV 2 r :+ EdgeDefiners plane) -intersectionLineWithDefiners plane -h plane -h' = (LinePV 2 r --> EdgeDefiners plane -> LinePV 2 r :+ EdgeDefiners plane -forall core extra. core -> extra -> core :+ extra -:+ plane -> plane -> EdgeDefiners plane -forall plane. plane -> plane -> EdgeDefiners plane -EdgeDefiners plane -h plane -h') (LinePV 2 r -> LinePV 2 r :+ EdgeDefiners plane) --> Maybe (LinePV 2 r) -> Maybe (LinePV 2 r :+ EdgeDefiners plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> plane -> plane -> Maybe (LinePV 2 r) -forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -plane -> plane -> Maybe (LinePV 2 r) -intersectionLine' plane -h plane -h' - - --- | Computes the line in which the two planes intersect. The returned line will have h to --- its left and h' to its right. --- --- -intersectionLine' :: ( Plane_ plane r, Ord r, Fractional r) - => plane -> plane -> Maybe (LinePV 2 r) -intersectionLine' :: forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -plane -> plane -> Maybe (LinePV 2 r) -intersectionLine' plane -h plane -h' = plane -> plane -> Maybe (VerticalOrLineEQ r) -forall plane r. -(Plane_ plane r, Fractional r, Eq r) => -plane -> plane -> Maybe (VerticalOrLineEQ r) -intersectionLine plane -h plane -h' Maybe (VerticalOrLineEQ r) --> (VerticalOrLineEQ r -> LinePV 2 r) -> Maybe (LinePV 2 r) -forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b -<&> \case - VerticalLineThrough r -x -> LinePV 2 r -> Point 2 r -> LinePV 2 r -reorient (Point 2 r -> Vector 2 r -> LinePV 2 r -forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r -LinePV (r -> r -> Point 2 r -forall r. r -> r -> Point 2 r -Point2 r -x r -0) (r -> r -> Vector 2 r -forall r. r -> r -> Vector 2 r -Vector2 r -0 r -1)) (r -> r -> Point 2 r -forall r. r -> r -> Point 2 r -Point2 (r -xr -> r -> r -forall a. Num a => a -> a -> a --r -1) r -0) - NonVertical LineEQ r -l -> let l' :: LinePV 2 r -l'@(LinePV Point 2 r -p Vector 2 r -_) = LineEQ r -> LinePV 2 r -forall {r}. Num r => LineEQ r -> LinePV 2 r -fromLineEQ LineEQ r -l - in LinePV 2 r -> Point 2 r -> LinePV 2 r -reorient LinePV 2 r -l' (Point 2 r -pPoint 2 r -> (Point 2 r -> Point 2 r) -> Point 2 r -forall a b. a -> (a -> b) -> b -&(r -> Identity r) -> Point 2 r -> Identity (Point 2 r) -forall (d :: Nat) point r. -(2 <= d, Point_ point d r) => -IndexedLens' Int point r -IndexedLens' Int (Point 2 r) r -yCoord ((r -> Identity r) -> Point 2 r -> Identity (Point 2 r)) --> (r -> r) -> Point 2 r -> Point 2 r -forall s t a b. ASetter s t a b -> (a -> b) -> s -> t -%~ (r -> r -> r -forall a. Num a => a -> a -> a -+r -1)) - where - -- make sure h is to the left of the line - reorient :: LinePV 2 r -> Point 2 r -> LinePV 2 r -reorient LinePV 2 r -l Point 2 r -q = let f :: plane -> r -f = Point 2 r -> plane -> r -forall point. -(Num r, 1 <= 3, Point_ point (3 - 1) r) => -point -> plane -> r -forall hyperPlane (d :: Nat) r point. -(NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d, - Point_ point (d - 1) r) => -point -> hyperPlane -> r -evalAt Point 2 r -q - in if plane -> r -f plane -h r -> r -> Bool -forall a. Ord a => a -> a -> Bool -<= plane -> r -f plane -h' then LinePV 2 r -l else LinePV 2 r -lLinePV 2 r -> (LinePV 2 r -> LinePV 2 r) -> LinePV 2 r -forall a b. a -> (a -> b) -> b -&(Vector 2 r -> Identity (Vector 2 r)) --> LinePV 2 r -> Identity (LinePV 2 r) -forall (d :: Nat) r. -(Dimension (LinePV 2 r) ~ d, NumType (LinePV 2 r) ~ r) => -Lens' (LinePV 2 r) (Vector d r) -forall t (d :: Nat) r. -(HasDirection t, Dimension t ~ d, NumType t ~ r) => -Lens' t (Vector d r) -Lens' (LinePV 2 r) (Vector 2 r) -direction ((Vector 2 r -> Identity (Vector 2 r)) - -> LinePV 2 r -> Identity (LinePV 2 r)) --> (Vector 2 r -> Vector 2 r) -> LinePV 2 r -> LinePV 2 r -forall s t a b. ASetter s t a b -> (a -> b) -> s -> t -%~ Vector 2 r -> Vector 2 r -forall r vector (d :: Nat). -(Num r, Vector_ vector d r) => -vector -> vector -negated - fromLineEQ :: LineEQ r -> LinePV 2 r -fromLineEQ (LineEQ r -a r -b) = r -> r -> LinePV 2 r -forall r. Num r => r -> r -> LinePV 2 r -fromLinearFunction r -a r -b - --- | Computes the supportingline of the (downward projection of) the edge. -edgeIntersectionLine :: ( Plane_ plane r, Ord r, Fractional r) - => LEEdge plane -> LinePV 2 r -edgeIntersectionLine :: forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -LEEdge plane -> LinePV 2 r -edgeIntersectionLine LEEdge plane -e = case plane -> plane -> Maybe (LinePV 2 r) -forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -plane -> plane -> Maybe (LinePV 2 r) -intersectionLine' (LEEdge plane -eLEEdge plane -> Getting plane (LEEdge plane) plane -> plane -forall s a. s -> Getting a s a -> a -^.Getting plane (LEEdge plane) plane -forall plane (f :: * -> *). -Functor f => -(plane -> f plane) -> LEEdge plane -> f (LEEdge plane) -leftPlane) (LEEdge plane -eLEEdge plane -> Getting plane (LEEdge plane) plane -> plane -forall s a. s -> Getting a s a -> a -^.Getting plane (LEEdge plane) plane -forall plane (f :: * -> *). -Functor f => -(plane -> f plane) -> LEEdge plane -> f (LEEdge plane) -rightPlane) of - Just LinePV 2 r -l -> LinePV 2 r -l - Maybe (LinePV 2 r) -Nothing -> String -> LinePV 2 r -forall a. HasCallStack => String -> a -error String -"edgeIntersectionLine: absurd. no intersection line !?" - - - --------------------------------------------------------------------------------- - --- | Types that have an IncidentEdges' field. -class HasIncidentEdges t where - -- | Lens to access the incident edges field. - incidentEdges' :: Lens' (t plane) (Seq.Seq (LEEdge plane)) - -instance HasIncidentEdges UnboundedVertex where - incidentEdges' :: forall plane. Lens' (UnboundedVertex plane) (Seq (LEEdge plane)) -incidentEdges' = (Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> UnboundedVertex plane -> f (UnboundedVertex plane) -forall plane plane' (p :: * -> * -> *) (f :: * -> *). -(Profunctor p, Functor f) => -p (Seq (LEEdge plane)) (f (Seq (LEEdge plane'))) --> p (UnboundedVertex plane) (f (UnboundedVertex plane')) -incidentEdgesU - -instance HasIncidentEdges BoundedVertex where - incidentEdges' :: forall plane. Lens' (BoundedVertex plane) (Seq (LEEdge plane)) -incidentEdges' = (BoundedVertexF Seq plane -> Seq (LEEdge plane)) --> (BoundedVertexF Seq plane - -> Seq (LEEdge plane) -> BoundedVertexF Seq plane) --> Lens - (BoundedVertexF Seq plane) - (BoundedVertexF Seq plane) - (Seq (LEEdge plane)) - (Seq (LEEdge plane)) -forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (Getting - (Seq (LEEdge plane)) - (BoundedVertexF Seq plane) - (Seq (LEEdge plane)) --> BoundedVertexF Seq plane -> Seq (LEEdge plane) -forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a -view Getting - (Seq (LEEdge plane)) - (BoundedVertexF Seq plane) - (Seq (LEEdge plane)) -forall (f1 :: * -> *) plane (g :: * -> *) (f2 :: * -> *). -Functor f2 => -(f1 (LEEdge plane) -> f2 (g (LEEdge plane))) --> BoundedVertexF f1 plane -> f2 (BoundedVertexF g plane) -incidentEdgesB) (\(Vertex Point 3 (NumType plane) -p Set plane -d Seq (LEEdge plane) -_) Seq (LEEdge plane) -es -> Point 3 (NumType plane) --> Set plane -> Seq (LEEdge plane) -> BoundedVertexF Seq plane -forall (f :: * -> *) plane. -Point 3 (NumType plane) --> Set plane -> f (LEEdge plane) -> BoundedVertexF f plane -Vertex Point 3 (NumType plane) -p Set plane -d Seq (LEEdge plane) -es) - --- instance HasIncidentEdges (Vertex (LowerEnvelope' plane)) plane where --- incidentEdges' = undefined -- pick either incidentEdges on the left or on the right thing. - - --------------------------------------------------------------------------------- --- * The Instances for HasVertices, HasDarts, HasFaces etc - -instance HasVertices' (LowerEnvelope' plane) where - type Vertex (LowerEnvelope' plane) = Either (UnboundedVertex plane) (BoundedVertex plane) - type VertexIx (LowerEnvelope' plane) = VertexID - - -- | note, trying to assign the unbounded vertex to something with index /= - -- unboundedVertexId is an error. - vertexAt :: VertexID - -> IndexedTraversal' VertexID (LowerEnvelope' plane) - (Vertex (LowerEnvelope' plane)) - vertexAt :: Int --> IndexedTraversal' - Int (LowerEnvelope' plane) (Vertex (LowerEnvelope' plane)) -vertexAt Int -i - | Int -i Int -> Int -> Bool -forall a. Eq a => a -> a -> Bool -== Int -unboundedVertexId = ((p ~ (->)) => - (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> (p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall (p :: * -> * -> *) (q :: * -> * -> *) a b r. -Conjoined p => -((p ~ (->)) => q (a -> b) r) -> q (p a b) r -> q (p a b) r -forall (q :: * -> * -> *) a b r. -((p ~ (->)) => q (a -> b) r) -> q (p a b) r -> q (p a b) r -conjoined (p ~ (->)) => -(Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -(Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -forall {f :: * -> *} {plane} {b} {b}. -Functor f => -(Either (UnboundedVertex plane) b - -> f (Either (UnboundedVertex plane) b)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -trav0 ((Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -(Int - -> Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -forall (f :: * -> *). -Applicative f => -(Int - -> Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -itrav0 ((Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> (p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> Int --> Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -forall a b. p a b -> Int -> a -> b -forall i (p :: * -> * -> *) a b. -Indexable i p => -p a b -> i -> a -> b -indexed) - | Bool -otherwise = ((p ~ (->)) => - (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> (p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall (p :: * -> * -> *) (q :: * -> * -> *) a b r. -Conjoined p => -((p ~ (->)) => q (a -> b) r) -> q (p a b) r -> q (p a b) r -forall (q :: * -> * -> *) a b r. -((p ~ (->)) => q (a -> b) r) -> q (p a b) r -> q (p a b) r -conjoined (p ~ (->)) => -(Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -(Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -(Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -forall (f :: * -> *). -Applicative f => -(Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -travVs ((Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -itravVs((Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> (p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> Int --> Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -forall a b. p a b -> Int -> a -> b -forall i (p :: * -> * -> *) a b. -Indexable i p => -p a b -> i -> a -> b -indexed) - where - trav0 :: (Either (UnboundedVertex plane) b - -> f (Either (UnboundedVertex plane) b)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -trav0 Either (UnboundedVertex plane) b --> f (Either (UnboundedVertex plane) b) -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = (UnboundedVertex plane - -> Seq (BoundedVertex plane) -> LowerEnvelope' plane) --> Seq (BoundedVertex plane) --> UnboundedVertex plane --> LowerEnvelope' plane -forall a b c. (a -> b -> c) -> b -> a -> c -flip UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope Seq (BoundedVertex plane) -vs (UnboundedVertex plane -> LowerEnvelope' plane) --> (Either (UnboundedVertex plane) b -> UnboundedVertex plane) --> Either (UnboundedVertex plane) b --> LowerEnvelope' plane -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Either (UnboundedVertex plane) b -> UnboundedVertex plane -forall {c} {b}. Either c b -> c -unLeft (Either (UnboundedVertex plane) b -> LowerEnvelope' plane) --> f (Either (UnboundedVertex plane) b) -> f (LowerEnvelope' plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> Either (UnboundedVertex plane) b --> f (Either (UnboundedVertex plane) b) -f (UnboundedVertex plane -> Either (UnboundedVertex plane) b -forall a b. a -> Either a b -Left UnboundedVertex plane -v0) - - itrav0 :: Applicative f - => (VertexID -> Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane) - itrav0 :: forall (f :: * -> *). -Applicative f => -(Int - -> Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -itrav0 Int --> Vertex (LowerEnvelope' plane) --> f (Vertex (LowerEnvelope' plane)) -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = (UnboundedVertex plane - -> Seq (BoundedVertex plane) -> LowerEnvelope' plane) --> Seq (BoundedVertex plane) --> UnboundedVertex plane --> LowerEnvelope' plane -forall a b c. (a -> b -> c) -> b -> a -> c -flip UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope Seq (BoundedVertex plane) -vs (UnboundedVertex plane -> LowerEnvelope' plane) --> (Either (UnboundedVertex plane) (BoundedVertex plane) - -> UnboundedVertex plane) --> Either (UnboundedVertex plane) (BoundedVertex plane) --> LowerEnvelope' plane -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Either (UnboundedVertex plane) (BoundedVertex plane) --> UnboundedVertex plane -forall {c} {b}. Either c b -> c -unLeft (Either (UnboundedVertex plane) (BoundedVertex plane) - -> LowerEnvelope' plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) --> f (LowerEnvelope' plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> Int --> Vertex (LowerEnvelope' plane) --> f (Vertex (LowerEnvelope' plane)) -f Int -0 (UnboundedVertex plane --> Either (UnboundedVertex plane) (BoundedVertex plane) -forall a b. a -> Either a b -Left UnboundedVertex plane -v0) - - travVs :: Applicative f - => (Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane) - travVs :: forall (f :: * -> *). -Applicative f => -(Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -travVs Vertex (LowerEnvelope' plane) -> f (Vertex (LowerEnvelope' plane)) -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = - UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope UnboundedVertex plane -v0 (Seq (BoundedVertex plane) -> LowerEnvelope' plane) --> f (Seq (BoundedVertex plane)) -> f (LowerEnvelope' plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> (Seq (BoundedVertex plane) -vsSeq (BoundedVertex plane) --> (Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane))) --> f (Seq (BoundedVertex plane)) -forall a b. a -> (a -> b) -> b -&Index (Seq (BoundedVertex plane)) --> Traversal' - (Seq (BoundedVertex plane)) (IxValue (Seq (BoundedVertex plane))) -forall m. Ixed m => Index m -> Traversal' m (IxValue m) -ix (Int -iInt -> Int -> Int -forall a. Num a => a -> a -> a --Int -1) ((BoundedVertex plane -> f (BoundedVertex plane)) - -> Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane))) --> (BoundedVertex plane -> f (BoundedVertex plane)) --> Seq (BoundedVertex plane) --> f (Seq (BoundedVertex plane)) -forall {k} (f :: k -> *) s (t :: k) a (b :: k). -LensLike f s t a b -> LensLike f s t a b -%%~ (Either (UnboundedVertex plane) (BoundedVertex plane) - -> BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) --> f (BoundedVertex plane) -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap Either (UnboundedVertex plane) (BoundedVertex plane) --> BoundedVertex plane -forall {a} {c}. Either a c -> c -unRight (f (Either (UnboundedVertex plane) (BoundedVertex plane)) - -> f (BoundedVertex plane)) --> (BoundedVertex plane - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> BoundedVertex plane --> f (BoundedVertex plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -Vertex (LowerEnvelope' plane) -> f (Vertex (LowerEnvelope' plane)) -f (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> (BoundedVertex plane - -> Either (UnboundedVertex plane) (BoundedVertex plane)) --> BoundedVertex plane --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. BoundedVertex plane --> Either (UnboundedVertex plane) (BoundedVertex plane) -forall a b. b -> Either a b -Right) - itravVs :: (Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -itravVs Int --> Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = - UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope UnboundedVertex plane -v0 (Seq (BoundedVertex plane) -> LowerEnvelope' plane) --> f (Seq (BoundedVertex plane)) -> f (LowerEnvelope' plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> (Seq (BoundedVertex plane) -vsSeq (BoundedVertex plane) --> (Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane))) --> f (Seq (BoundedVertex plane)) -forall a b. a -> (a -> b) -> b -&Index (Seq (BoundedVertex plane)) --> Traversal' - (Seq (BoundedVertex plane)) (IxValue (Seq (BoundedVertex plane))) -forall m. Ixed m => Index m -> Traversal' m (IxValue m) -ix (Int -iInt -> Int -> Int -forall a. Num a => a -> a -> a --Int -1) ((BoundedVertex plane -> f (BoundedVertex plane)) - -> Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane))) --> (BoundedVertex plane -> f (BoundedVertex plane)) --> Seq (BoundedVertex plane) --> f (Seq (BoundedVertex plane)) -forall {k} (f :: k -> *) s (t :: k) a (b :: k). -LensLike f s t a b -> LensLike f s t a b -%%~ (Either (UnboundedVertex plane) (BoundedVertex plane) - -> BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) --> f (BoundedVertex plane) -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap Either (UnboundedVertex plane) (BoundedVertex plane) --> BoundedVertex plane -forall {a} {c}. Either a c -> c -unRight (f (Either (UnboundedVertex plane) (BoundedVertex plane)) - -> f (BoundedVertex plane)) --> (BoundedVertex plane - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> BoundedVertex plane --> f (BoundedVertex plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Int --> Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -f Int -i (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> (BoundedVertex plane - -> Either (UnboundedVertex plane) (BoundedVertex plane)) --> BoundedVertex plane --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. BoundedVertex plane --> Either (UnboundedVertex plane) (BoundedVertex plane) -forall a b. b -> Either a b -Right) - - unLeft :: Either c b -> c -unLeft = (c -> c) -> (b -> c) -> Either c b -> c -forall a c b. (a -> c) -> (b -> c) -> Either a b -> c -either c -> c -forall a. a -> a -id (String -> b -> c -forall a. HasCallStack => String -> a -error String -"LowerEnvelope'.vertexAt: trying to convert v_infty into a normal vertex is not allowed") - unRight :: Either a c -> c -unRight = (a -> c) -> (c -> c) -> Either a c -> c -forall a c b. (a -> c) -> (b -> c) -> Either a b -> c -either (String -> a -> c -forall a. HasCallStack => String -> a -error String -"LowerEnvelope'.vertexAt: trying to convert a regular bounded vertex into v_infty is not allowed") c -> c -forall a. a -> a -id - {-# INLINE vertexAt #-} - - -instance HasVertices (LowerEnvelope' plane) (LowerEnvelope' plane') where - - vertices :: IndexedTraversal1 - (VertexIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (LowerEnvelope' plane') - (Vertex (LowerEnvelope' plane)) - (Vertex (LowerEnvelope' plane')) -vertices = ((p ~ (->)) => - (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane')) --> (p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane') (BoundedVertex plane'))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane')) --> p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> LowerEnvelope' plane --> f (LowerEnvelope' plane') -forall (p :: * -> * -> *) (q :: * -> * -> *) a b r. -Conjoined p => -((p ~ (->)) => q (a -> b) r) -> q (p a b) r -> q (p a b) r -forall (q :: * -> * -> *) a b r. -((p ~ (->)) => q (a -> b) r) -> q (p a b) r -> q (p a b) r -conjoined (p ~ (->)) => -(Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -(Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -(Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -forall (f :: * -> *). -Apply f => -(Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -traverse' ((Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -(Int - -> Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -forall (f :: * -> *). -Apply f => -(Int - -> Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -itraverse' ((Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane')) --> (p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane') (BoundedVertex plane'))) - -> Int - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> LowerEnvelope' plane --> f (LowerEnvelope' plane') -forall b c a. (b -> c) -> (a -> b) -> a -> c -. p (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> Int --> Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) -forall a b. p a b -> Int -> a -> b -forall i (p :: * -> * -> *) a b. -Indexable i p => -p a b -> i -> a -> b -indexed) - where - traverse' :: (Apply f) - => (Vertex (LowerEnvelope' plane) -> f (Vertex (LowerEnvelope' plane'))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane') - traverse' :: forall (f :: * -> *). -Apply f => -(Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -traverse' Vertex (LowerEnvelope' plane) -> f (Vertex (LowerEnvelope' plane')) -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = - UnboundedVertex plane' --> Seq (BoundedVertex plane') -> LowerEnvelope' plane' -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope (UnboundedVertex plane' - -> Seq (BoundedVertex plane') -> LowerEnvelope' plane') --> f (UnboundedVertex plane') --> f (Seq (BoundedVertex plane') -> LowerEnvelope' plane') -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> ((Either (UnboundedVertex plane') (BoundedVertex plane') - -> UnboundedVertex plane') --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) --> f (UnboundedVertex plane') -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap Either (UnboundedVertex plane') (BoundedVertex plane') --> UnboundedVertex plane' -forall {c} {b}. Either c b -> c -unLeft (f (Either (UnboundedVertex plane') (BoundedVertex plane')) - -> f (UnboundedVertex plane')) --> (UnboundedVertex plane - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> UnboundedVertex plane --> f (UnboundedVertex plane') -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) -Vertex (LowerEnvelope' plane) -> f (Vertex (LowerEnvelope' plane')) -f (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> (UnboundedVertex plane - -> Either (UnboundedVertex plane) (BoundedVertex plane)) --> UnboundedVertex plane --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.UnboundedVertex plane --> Either (UnboundedVertex plane) (BoundedVertex plane) -forall a b. a -> Either a b -Left) UnboundedVertex plane -v0 - f (Seq (BoundedVertex plane') -> LowerEnvelope' plane') --> MaybeApply f (Seq (BoundedVertex plane')) --> f (LowerEnvelope' plane') -forall (f :: * -> *) a b. -Apply f => -f (a -> b) -> MaybeApply f a -> f b -<.*> (BoundedVertex plane -> f (BoundedVertex plane')) --> Seq (BoundedVertex plane) --> MaybeApply f (Seq (BoundedVertex plane')) -forall (t :: * -> *) (f :: * -> *) a b. -(Traversable t, Apply f) => -(a -> f b) -> t a -> MaybeApply f (t b) -traverse1Maybe ((Either (UnboundedVertex plane') (BoundedVertex plane') - -> BoundedVertex plane') --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) --> f (BoundedVertex plane') -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap Either (UnboundedVertex plane') (BoundedVertex plane') --> BoundedVertex plane' -forall {a} {c}. Either a c -> c -unRight (f (Either (UnboundedVertex plane') (BoundedVertex plane')) - -> f (BoundedVertex plane')) --> (BoundedVertex plane - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> BoundedVertex plane --> f (BoundedVertex plane') -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) -Vertex (LowerEnvelope' plane) -> f (Vertex (LowerEnvelope' plane')) -f (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> (BoundedVertex plane - -> Either (UnboundedVertex plane) (BoundedVertex plane)) --> BoundedVertex plane --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. BoundedVertex plane --> Either (UnboundedVertex plane) (BoundedVertex plane) -forall a b. b -> Either a b -Right) Seq (BoundedVertex plane) -vs - - unLeft :: Either c b -> c -unLeft = (c -> c) -> (b -> c) -> Either c b -> c -forall a c b. (a -> c) -> (b -> c) -> Either a b -> c -either c -> c -forall a. a -> a -id (String -> b -> c -forall a. HasCallStack => String -> a -error String -"LowerEnvelope'.vertices: trying to convert v_infty into a normal vertex is not allowed") - unRight :: Either a c -> c -unRight = (a -> c) -> (c -> c) -> Either a c -> c -forall a c b. (a -> c) -> (b -> c) -> Either a b -> c -either (String -> a -> c -forall a. HasCallStack => String -> a -error String -"LowerEnvelope'.vertices: trying to convert a regular bounded vertex into v_infty is not allowed") c -> c -forall a. a -> a -id - - itraverse' :: (Apply f) - => (VertexID -> Vertex (LowerEnvelope' plane) -> f (Vertex (LowerEnvelope' plane'))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane') - itraverse' :: forall (f :: * -> *). -Apply f => -(Int - -> Vertex (LowerEnvelope' plane) - -> f (Vertex (LowerEnvelope' plane'))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane') -itraverse' Int --> Vertex (LowerEnvelope' plane) --> f (Vertex (LowerEnvelope' plane')) -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = - UnboundedVertex plane' --> Seq (BoundedVertex plane') -> LowerEnvelope' plane' -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope (UnboundedVertex plane' - -> Seq (BoundedVertex plane') -> LowerEnvelope' plane') --> f (UnboundedVertex plane') --> f (Seq (BoundedVertex plane') -> LowerEnvelope' plane') -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> ((Either (UnboundedVertex plane') (BoundedVertex plane') - -> UnboundedVertex plane') --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) --> f (UnboundedVertex plane') -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap Either (UnboundedVertex plane') (BoundedVertex plane') --> UnboundedVertex plane' -forall {c} {b}. Either c b -> c -unLeft (f (Either (UnboundedVertex plane') (BoundedVertex plane')) - -> f (UnboundedVertex plane')) --> (UnboundedVertex plane - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> UnboundedVertex plane --> f (UnboundedVertex plane') -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Int --> Vertex (LowerEnvelope' plane) --> f (Vertex (LowerEnvelope' plane')) -f Int -unboundedVertexId (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> (UnboundedVertex plane - -> Either (UnboundedVertex plane) (BoundedVertex plane)) --> UnboundedVertex plane --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.UnboundedVertex plane --> Either (UnboundedVertex plane) (BoundedVertex plane) -forall a b. a -> Either a b -Left) UnboundedVertex plane -v0 - f (Seq (BoundedVertex plane') -> LowerEnvelope' plane') --> MaybeApply f (Seq (BoundedVertex plane')) --> f (LowerEnvelope' plane') -forall (f :: * -> *) a b. -Apply f => -f (a -> b) -> MaybeApply f a -> f b -<.*> (Int -> BoundedVertex plane -> f (BoundedVertex plane')) --> Seq (BoundedVertex plane) --> MaybeApply f (Seq (BoundedVertex plane')) -forall i (t :: * -> *) (f :: * -> *) a b. -(TraversableWithIndex i t, Apply f) => -(i -> a -> f b) -> t a -> MaybeApply f (t b) -itraverse1Maybe (\Int -i -> (Either (UnboundedVertex plane') (BoundedVertex plane') - -> BoundedVertex plane') --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) --> f (BoundedVertex plane') -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap Either (UnboundedVertex plane') (BoundedVertex plane') --> BoundedVertex plane' -forall {a} {c}. Either a c -> c -unRight (f (Either (UnboundedVertex plane') (BoundedVertex plane')) - -> f (BoundedVertex plane')) --> (BoundedVertex plane - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> BoundedVertex plane --> f (BoundedVertex plane') -forall b c a. (b -> c) -> (a -> b) -> a -> c -. Int --> Vertex (LowerEnvelope' plane) --> f (Vertex (LowerEnvelope' plane')) -f (Int -iInt -> Int -> Int -forall a. Num a => a -> a -> a -+Int -1) (Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane') (BoundedVertex plane'))) --> (BoundedVertex plane - -> Either (UnboundedVertex plane) (BoundedVertex plane)) --> BoundedVertex plane --> f (Either (UnboundedVertex plane') (BoundedVertex plane')) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. BoundedVertex plane --> Either (UnboundedVertex plane) (BoundedVertex plane) -forall a b. b -> Either a b -Right) Seq (BoundedVertex plane) -vs - {-# INLINE vertices #-} - --- | Indexed version of 'traverse1Maybe'. -itraverse1Maybe :: (TraversableWithIndex i t, Apply f) - => (i -> a -> f b) -> t a -> Apply.MaybeApply f (t b) -itraverse1Maybe :: forall i (t :: * -> *) (f :: * -> *) a b. -(TraversableWithIndex i t, Apply f) => -(i -> a -> f b) -> t a -> MaybeApply f (t b) -itraverse1Maybe i -> a -> f b -f = (i -> a -> MaybeApply f b) -> t a -> MaybeApply f (t b) -forall i (t :: * -> *) (f :: * -> *) a b. -(TraversableWithIndex i t, Applicative f) => -(i -> a -> f b) -> t a -> f (t b) -forall (f :: * -> *) a b. -Applicative f => -(i -> a -> f b) -> t a -> f (t b) -itraverse (\i -i -> Either (f b) b -> MaybeApply f b -forall (f :: * -> *) a. Either (f a) a -> MaybeApply f a -Apply.MaybeApply (Either (f b) b -> MaybeApply f b) --> (a -> Either (f b) b) -> a -> MaybeApply f b -forall b c a. (b -> c) -> (a -> b) -> a -> c -. f b -> Either (f b) b -forall a b. a -> Either a b -Left (f b -> Either (f b) b) -> (a -> f b) -> a -> Either (f b) b -forall b c a. (b -> c) -> (a -> b) -> a -> c -. i -> a -> f b -f i -i) - ----------------------------------------- - -instance HasDarts' (LowerEnvelope' plane) where - type Dart (LowerEnvelope' plane) = LEEdge plane - type DartIx (LowerEnvelope' plane) = ( VertexIx (LowerEnvelope' plane) - , VertexIx (LowerEnvelope' plane) - ) - dartAt :: DartIx (LowerEnvelope' plane) --> IndexedTraversal' - (DartIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Dart (LowerEnvelope' plane)) -dartAt (Int -u,Int -v) = VertexIx (LowerEnvelope' plane) --> IndexedTraversal' - (VertexIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Vertex (LowerEnvelope' plane)) -forall graph. -HasVertices' graph => -VertexIx graph --> IndexedTraversal' (VertexIx graph) graph (Vertex graph) -vertexAt Int -VertexIx (LowerEnvelope' plane) -u (Indexed - Int - (Either (UnboundedVertex plane) (BoundedVertex plane)) - (f (Either (UnboundedVertex plane) (BoundedVertex plane))) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> (Indexed Int (LEEdge plane) (f (LEEdge plane)) - -> Either (UnboundedVertex plane) (BoundedVertex plane) - -> f (Either (UnboundedVertex plane) (BoundedVertex plane))) --> p (LEEdge plane) (f (LEEdge plane)) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall i j (p :: * -> * -> *) s t r a b. -Indexable (i, j) p => -(Indexed i s t -> r) -> (Indexed j a b -> s -> t) -> p a b -> r -<.> Optical - (Indexed Int) - (->) - f - (UnboundedVertex plane) - (UnboundedVertex plane) - (LEEdge plane) - (LEEdge plane) --> Optical - (Indexed Int) - (->) - f - (BoundedVertex plane) - (BoundedVertex plane) - (LEEdge plane) - (LEEdge plane) --> Indexed Int (LEEdge plane) (f (LEEdge plane)) --> Either (UnboundedVertex plane) (BoundedVertex plane) --> f (Either (UnboundedVertex plane) (BoundedVertex plane)) -forall (q :: * -> * -> *) (f :: * -> *) (r :: * -> * -> *) - (p :: * -> * -> *) s t a b s' t'. -(Representable q, Applicative (Rep q), Applicative f, - Bitraversable r) => -Optical p q f s t a b --> Optical p q f s' t' a b -> Optical p q f (r s s') (r t t') a b -beside Optical - (Indexed Int) - (->) - f - (UnboundedVertex plane) - (UnboundedVertex plane) - (LEEdge plane) - (LEEdge plane) -forall (t :: * -> *). -HasIncidentEdges t => -IndexedTraversal' Int (t plane) (LEEdge plane) -IndexedTraversal' Int (UnboundedVertex plane) (LEEdge plane) -l Optical - (Indexed Int) - (->) - f - (BoundedVertex plane) - (BoundedVertex plane) - (LEEdge plane) - (LEEdge plane) -forall (t :: * -> *). -HasIncidentEdges t => -IndexedTraversal' Int (t plane) (LEEdge plane) -IndexedTraversal' Int (BoundedVertex plane) (LEEdge plane) -l - where - l :: HasIncidentEdges t => IndexedTraversal' VertexID (t plane) (LEEdge plane) - l :: forall (t :: * -> *). -HasIncidentEdges t => -IndexedTraversal' Int (t plane) (LEEdge plane) -l = (Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> t plane -> f (t plane) -forall plane. Lens' (t plane) (Seq (LEEdge plane)) -forall (t :: * -> *) plane. -HasIncidentEdges t => -Lens' (t plane) (Seq (LEEdge plane)) -incidentEdges' ((Seq (LEEdge plane) -> f (Seq (LEEdge plane))) - -> t plane -> f (t plane)) --> (p (LEEdge plane) (f (LEEdge plane)) - -> Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> p (LEEdge plane) (f (LEEdge plane)) --> t plane --> f (t plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.> Int --> (LEEdge plane -> Int) --> IndexedTraversal' Int (Seq (LEEdge plane)) (LEEdge plane) -forall i a. Eq i => i -> (a -> i) -> IndexedTraversal' i (Seq a) a -first' Int -v (Getting Int (LEEdge plane) Int -> LEEdge plane -> Int -forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a -view Getting Int (LEEdge plane) Int -forall plane (f :: * -> *). -(Contravariant f, Functor f) => -(Int -> f Int) -> LEEdge plane -> f (LEEdge plane) -destination) - {-# INLINE dartAt #-} - --- | Helper function to access the an edge -first' :: Eq i => i -> (a -> i) - -> IndexedTraversal' i (Seq.Seq a) a -first' :: forall i a. Eq i => i -> (a -> i) -> IndexedTraversal' i (Seq a) a -first' i -i a -> i -getIdx p a (f a) -f Seq a -s = case (a -> Bool) -> Seq a -> Maybe Int -forall a. (a -> Bool) -> Seq a -> Maybe Int -Seq.findIndexL ((i -> i -> Bool -forall a. Eq a => a -> a -> Bool -== i -i) (i -> Bool) -> (a -> i) -> a -> Bool -forall b c a. (b -> c) -> (a -> b) -> a -> c -. a -> i -getIdx) Seq a -s of - Maybe Int -Nothing -> Seq a -> f (Seq a) -forall a. a -> f a -forall (f :: * -> *) a. Applicative f => a -> f a -pure Seq a -s - Just Int -j -> Seq a -sSeq a -> (Seq a -> f (Seq a)) -> f (Seq a) -forall a b. a -> (a -> b) -> b -&Index (Seq a) -> Traversal' (Seq a) (IxValue (Seq a)) -forall m. Ixed m => Index m -> Traversal' m (IxValue m) -ix Int -Index (Seq a) -j ((a -> f a) -> Seq a -> f (Seq a)) --> (a -> f a) -> Seq a -> f (Seq a) -forall {k} (f :: k -> *) s (t :: k) a (b :: k). -LensLike f s t a b -> LensLike f s t a b -%%~ p a (f a) -> i -> a -> f a -forall a b. p a b -> i -> a -> b -forall i (p :: * -> * -> *) a b. -Indexable i p => -p a b -> i -> a -> b -indexed p a (f a) -f i -i - - -instance HasDarts (LowerEnvelope' plane) (LowerEnvelope' plane) where - darts :: IndexedTraversal - (DartIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (Dart (LowerEnvelope' plane)) - (Dart (LowerEnvelope' plane)) -darts = ((Int, Int) -> LEEdge plane -> f (LEEdge plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -(DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -forall (f :: * -> *). -Applicative f => -(DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -itraverse' (((Int, Int) -> LEEdge plane -> f (LEEdge plane)) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> (p (LEEdge plane) (f (LEEdge plane)) - -> (Int, Int) -> LEEdge plane -> f (LEEdge plane)) --> p (LEEdge plane) (f (LEEdge plane)) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. p (LEEdge plane) (f (LEEdge plane)) --> (Int, Int) -> LEEdge plane -> f (LEEdge plane) -forall a b. p a b -> (Int, Int) -> a -> b -forall i (p :: * -> * -> *) a b. -Indexable i p => -p a b -> i -> a -> b -indexed - -- the traverse' variant that does not use the indices does not really look all that - -- useful. So I didn't bother writing the faster version. - where - itraverse' :: (Applicative f) - => (DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane) - itraverse' :: forall (f :: * -> *). -Applicative f => -(DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -itraverse' DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane) -f (LowerEnvelope UnboundedVertex plane -v0 Seq (BoundedVertex plane) -vs) = - UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -forall plane. -UnboundedVertex plane --> Seq (BoundedVertex plane) -> LowerEnvelope' plane -LowerEnvelope (UnboundedVertex plane - -> Seq (BoundedVertex plane) -> LowerEnvelope' plane) --> f (UnboundedVertex plane) --> f (Seq (BoundedVertex plane) -> LowerEnvelope' plane) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> (UnboundedVertex plane -v0UnboundedVertex plane --> (UnboundedVertex plane -> f (UnboundedVertex plane)) --> f (UnboundedVertex plane) -forall a b. a -> (a -> b) -> b -&(Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> UnboundedVertex plane -> f (UnboundedVertex plane) -forall plane plane' (p :: * -> * -> *) (f :: * -> *). -(Profunctor p, Functor f) => -p (Seq (LEEdge plane)) (f (Seq (LEEdge plane'))) --> p (UnboundedVertex plane) (f (UnboundedVertex plane')) -incidentEdgesU((Seq (LEEdge plane) -> f (Seq (LEEdge plane))) - -> UnboundedVertex plane -> f (UnboundedVertex plane)) --> ((LEEdge plane -> f (LEEdge plane)) - -> Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> (LEEdge plane -> f (LEEdge plane)) --> UnboundedVertex plane --> f (UnboundedVertex plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(LEEdge plane -> f (LEEdge plane)) --> Seq (LEEdge plane) -> f (Seq (LEEdge plane)) -forall (t :: * -> *) (f :: * -> *) a b. -(Traversable t, Applicative f) => -(a -> f b) -> t a -> f (t b) -forall (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Seq a -> f (Seq b) -traverse ((LEEdge plane -> f (LEEdge plane)) - -> UnboundedVertex plane -> f (UnboundedVertex plane)) --> (LEEdge plane -> f (LEEdge plane)) --> UnboundedVertex plane --> f (UnboundedVertex plane) -forall {k} (f :: k -> *) s (t :: k) a (b :: k). -LensLike f s t a b -> LensLike f s t a b -%%~ (DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> VertexIx (LowerEnvelope' plane) --> LEEdge plane --> f (LEEdge plane) -forall (f :: * -> *). -(DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> VertexIx (LowerEnvelope' plane) --> LEEdge plane --> f (LEEdge plane) -liftF DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane) -f Int -VertexIx (LowerEnvelope' plane) -unboundedVertexId) - f (Seq (BoundedVertex plane) -> LowerEnvelope' plane) --> f (Seq (BoundedVertex plane)) -> f (LowerEnvelope' plane) -forall a b. f (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b -<*> (Int -> BoundedVertex plane -> f (BoundedVertex plane)) --> Seq (BoundedVertex plane) -> f (Seq (BoundedVertex plane)) -forall i (t :: * -> *) (f :: * -> *) a b. -(TraversableWithIndex i t, Applicative f) => -(i -> a -> f b) -> t a -> f (t b) -forall (f :: * -> *) a b. -Applicative f => -(Int -> a -> f b) -> Seq a -> f (Seq b) -itraverse (\Int -i BoundedVertex plane -vtx -> BoundedVertex plane -vtxBoundedVertex plane --> (BoundedVertex plane -> f (BoundedVertex plane)) --> f (BoundedVertex plane) -forall a b. a -> (a -> b) -> b -&(Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> BoundedVertex plane -> f (BoundedVertex plane) -forall (f1 :: * -> *) plane (g :: * -> *) (f2 :: * -> *). -Functor f2 => -(f1 (LEEdge plane) -> f2 (g (LEEdge plane))) --> BoundedVertexF f1 plane -> f2 (BoundedVertexF g plane) -incidentEdgesB((Seq (LEEdge plane) -> f (Seq (LEEdge plane))) - -> BoundedVertex plane -> f (BoundedVertex plane)) --> ((LEEdge plane -> f (LEEdge plane)) - -> Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> (LEEdge plane -> f (LEEdge plane)) --> BoundedVertex plane --> f (BoundedVertex plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(LEEdge plane -> f (LEEdge plane)) --> Seq (LEEdge plane) -> f (Seq (LEEdge plane)) -forall (t :: * -> *) (f :: * -> *) a b. -(Traversable t, Applicative f) => -(a -> f b) -> t a -> f (t b) -forall (f :: * -> *) a b. -Applicative f => -(a -> f b) -> Seq a -> f (Seq b) -traverse ((LEEdge plane -> f (LEEdge plane)) - -> BoundedVertex plane -> f (BoundedVertex plane)) --> (LEEdge plane -> f (LEEdge plane)) --> BoundedVertex plane --> f (BoundedVertex plane) -forall {k} (f :: k -> *) s (t :: k) a (b :: k). -LensLike f s t a b -> LensLike f s t a b -%%~ (DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> VertexIx (LowerEnvelope' plane) --> LEEdge plane --> f (LEEdge plane) -forall (f :: * -> *). -(DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> VertexIx (LowerEnvelope' plane) --> LEEdge plane --> f (LEEdge plane) -liftF DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane) -f (Int -iInt -> Int -> Int -forall a. Num a => a -> a -> a -+Int -1)) Seq (BoundedVertex plane) -vs - - liftF :: (DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) - -> VertexIx (LowerEnvelope' plane) - -> LEEdge plane -> f (LEEdge plane) - liftF :: forall (f :: * -> *). -(DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane)) --> VertexIx (LowerEnvelope' plane) --> LEEdge plane --> f (LEEdge plane) -liftF DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane) -f VertexIx (LowerEnvelope' plane) -u LEEdge plane -e = DartIx (LowerEnvelope' plane) -> LEEdge plane -> f (LEEdge plane) -f (Int -VertexIx (LowerEnvelope' plane) -u,LEEdge plane -eLEEdge plane -> Getting Int (LEEdge plane) Int -> Int -forall s a. s -> Getting a s a -> a -^.Getting Int (LEEdge plane) Int -forall plane (f :: * -> *). -(Contravariant f, Functor f) => -(Int -> f Int) -> LEEdge plane -> f (LEEdge plane) -destination) LEEdge plane -e - {-# INLINE darts #-} - --------------------------------------------------------------------------------- - - -instance HasEdges' (LowerEnvelope' plane) where - type Edge (LowerEnvelope' plane) = LEEdge plane - type EdgeIx (LowerEnvelope' plane) = ( VertexIx (LowerEnvelope' plane) - , VertexIx (LowerEnvelope' plane) - ) - edgeAt :: EdgeIx (LowerEnvelope' plane) --> IndexedTraversal' - (EdgeIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Edge (LowerEnvelope' plane)) -edgeAt = EdgeIx (LowerEnvelope' plane) --> IndexedTraversal' - (EdgeIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Edge (LowerEnvelope' plane)) -DartIx (LowerEnvelope' plane) --> IndexedTraversal' - (DartIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Dart (LowerEnvelope' plane)) -forall graph. -HasDarts' graph => -DartIx graph -> IndexedTraversal' (DartIx graph) graph (Dart graph) -dartAt - {-# INLINE edgeAt #-} - -instance HasEdges (LowerEnvelope' plane) (LowerEnvelope' plane) where - -- | Traversal of all edges in the graph; i.e. we traverse the edges only in the - -- direction from lower vertex id to higher vertexId. - edges :: IndexedTraversal - (EdgeIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (Edge (LowerEnvelope' plane)) - (Edge (LowerEnvelope' plane)) -edges = Indexed - (Int, Int) - (Dart (LowerEnvelope' plane)) - (f (Dart (LowerEnvelope' plane))) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -Indexed (Int, Int) (LEEdge plane) (f (LEEdge plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -forall graph graph'. -HasDarts graph graph' => -IndexedTraversal - (DartIx graph) graph graph' (Dart graph) (Dart graph') -IndexedTraversal - (DartIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (Dart (LowerEnvelope' plane)) - (Dart (LowerEnvelope' plane)) -darts (Indexed (Int, Int) (LEEdge plane) (f (LEEdge plane)) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> (p (LEEdge plane) (f (LEEdge plane)) - -> Indexed (Int, Int) (LEEdge plane) (f (LEEdge plane))) --> p (LEEdge plane) (f (LEEdge plane)) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -. ((Int, Int) -> LEEdge plane -> Bool) --> p (LEEdge plane) (f (LEEdge plane)) --> Indexed (Int, Int) (LEEdge plane) (f (LEEdge plane)) -forall i (p :: * -> * -> *) (f :: * -> *) a. -(Indexable i p, Applicative f) => -(i -> a -> Bool) -> Optical' p (Indexed i) f a a -ifiltered (\(Int -u,Int -v) LEEdge plane -_ -> Int -u Int -> Int -> Bool -forall a. Ord a => a -> a -> Bool -< Int -v) - {-# INLINE edges #-} - --- instance Graph_ (LowerEnvelope' plane) where - -class HasUnboundedEdges t e | t -> e where - -- | Lens to access the unbounded edges. - unboundedEdges :: Lens' t (Seq.Seq e) - -instance HasUnboundedEdges (LowerEnvelope' plane) (LEEdge plane) where - unboundedEdges :: Lens' (LowerEnvelope' plane) (Seq (LEEdge plane)) -unboundedEdges = (UnboundedVertex plane -> f (UnboundedVertex plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -forall plane (f :: * -> *). -Functor f => -(UnboundedVertex plane -> f (UnboundedVertex plane)) --> LowerEnvelope' plane -> f (LowerEnvelope' plane) -theUnboundedVertex((UnboundedVertex plane -> f (UnboundedVertex plane)) - -> LowerEnvelope' plane -> f (LowerEnvelope' plane)) --> ((Seq (LEEdge plane) -> f (Seq (LEEdge plane))) - -> UnboundedVertex plane -> f (UnboundedVertex plane)) --> (Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> LowerEnvelope' plane --> f (LowerEnvelope' plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(Seq (LEEdge plane) -> f (Seq (LEEdge plane))) --> UnboundedVertex plane -> f (UnboundedVertex plane) -forall plane plane' (p :: * -> * -> *) (f :: * -> *). -(Profunctor p, Functor f) => -p (Seq (LEEdge plane)) (f (Seq (LEEdge plane'))) --> p (UnboundedVertex plane) (f (UnboundedVertex plane')) -incidentEdgesU - - --- | Edges are either halflines or Linesegments -type EdgeGeometry point = Either (HalfLine point) (ClosedLineSegment point) - --- | Get the projected geometries (halflines and edges line segments ) representing the --- edges. -projectedEdgeGeometries :: (Plane_ plane r, Ord r, Fractional r - , Show plane, Show r - - ) - => IndexedFold (EdgeIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) (EdgeGeometry (Point 2 r)) -projectedEdgeGeometries :: forall plane r. -(Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => -IndexedFold - (EdgeIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (EdgeGeometry (Point 2 r)) -projectedEdgeGeometries = (LowerEnvelope' plane -> [((Int, Int), EdgeGeometry (Point 2 r))]) --> Over - p - f - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (EdgeGeometry (Point 2 r)) - (EdgeGeometry (Point 2 r)) -forall (f :: * -> *) i (p :: * -> * -> *) (g :: * -> *) s a t b. -(Foldable f, Indexable i p, Contravariant g, Applicative g) => -(s -> f (i, a)) -> Over p g s t a b -ifolding ((LowerEnvelope' plane -> [((Int, Int), EdgeGeometry (Point 2 r))]) - -> Over - p - f - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (EdgeGeometry (Point 2 r)) - (EdgeGeometry (Point 2 r))) --> (LowerEnvelope' plane - -> [((Int, Int), EdgeGeometry (Point 2 r))]) --> Over - p - f - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (EdgeGeometry (Point 2 r)) - (EdgeGeometry (Point 2 r)) -forall a b. (a -> b) -> a -> b -$ \LowerEnvelope' plane -env -> - (\((Int, Int) -i,LEEdge plane -e) -> ((Int, Int) -i, LowerEnvelope' plane --> EdgeIx (LowerEnvelope' plane) --> Edge (LowerEnvelope' plane) --> EdgeGeometry (Point 2 r) -forall plane r. -(Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => -LowerEnvelope' plane --> EdgeIx (LowerEnvelope' plane) --> Edge (LowerEnvelope' plane) --> EdgeGeometry (Point 2 r) -projectedEdgeGeometry LowerEnvelope' plane -env (Int, Int) -EdgeIx (LowerEnvelope' plane) -i Edge (LowerEnvelope' plane) -LEEdge plane -e)) (((Int, Int), LEEdge plane) - -> ((Int, Int), EdgeGeometry (Point 2 r))) --> [((Int, Int), LEEdge plane)] --> [((Int, Int), EdgeGeometry (Point 2 r))] -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> LowerEnvelope' plane -envLowerEnvelope' plane --> Getting - (Endo [((Int, Int), LEEdge plane)]) - (LowerEnvelope' plane) - ((Int, Int), LEEdge plane) --> [((Int, Int), LEEdge plane)] -forall s a. s -> Getting (Endo [a]) s a -> [a] -^..Indexed - (Int, Int) - (Edge (LowerEnvelope' plane)) - (Const - (Endo [((Int, Int), LEEdge plane)]) (Edge (LowerEnvelope' plane))) --> LowerEnvelope' plane --> Const (Endo [((Int, Int), LEEdge plane)]) (LowerEnvelope' plane) -Indexed - (Int, Int) - (LEEdge plane) - (Const (Endo [((Int, Int), LEEdge plane)]) (LEEdge plane)) --> LowerEnvelope' plane --> Const (Endo [((Int, Int), LEEdge plane)]) (LowerEnvelope' plane) -forall graph graph'. -HasEdges graph graph' => -IndexedTraversal - (EdgeIx graph) graph graph' (Edge graph) (Edge graph') -IndexedTraversal - (EdgeIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (LowerEnvelope' plane) - (Edge (LowerEnvelope' plane)) - (Edge (LowerEnvelope' plane)) -edges(Indexed - (Int, Int) - (LEEdge plane) - (Const (Endo [((Int, Int), LEEdge plane)]) (LEEdge plane)) - -> LowerEnvelope' plane - -> Const - (Endo [((Int, Int), LEEdge plane)]) (LowerEnvelope' plane)) --> ((((Int, Int), LEEdge plane) - -> Const - (Endo [((Int, Int), LEEdge plane)]) ((Int, Int), LEEdge plane)) - -> Indexed - (Int, Int) - (LEEdge plane) - (Const (Endo [((Int, Int), LEEdge plane)]) (LEEdge plane))) --> Getting - (Endo [((Int, Int), LEEdge plane)]) - (LowerEnvelope' plane) - ((Int, Int), LEEdge plane) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(((Int, Int), LEEdge plane) - -> Const - (Endo [((Int, Int), LEEdge plane)]) ((Int, Int), LEEdge plane)) --> Indexed - (Int, Int) - (LEEdge plane) - (Const (Endo [((Int, Int), LEEdge plane)]) (LEEdge plane)) -forall i (p :: * -> * -> *) (f :: * -> *) s j t. -(Indexable i p, Functor f) => -p (i, s) (f (j, t)) -> Indexed i s (f t) -withIndex - -- TODO; this is kind of horrible, there must be a nicer way of writing this. - --- | Computes the (projected) LineSegment or HalfLine representing a given edge. -projectedEdgeGeometry :: (Plane_ plane r, Ord r, Fractional r - , Show plane, Show r - ) - => LowerEnvelope' plane - -> EdgeIx (LowerEnvelope' plane) - -> Edge (LowerEnvelope' plane) - -> EdgeGeometry (Point 2 r) -projectedEdgeGeometry :: forall plane r. -(Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => -LowerEnvelope' plane --> EdgeIx (LowerEnvelope' plane) --> Edge (LowerEnvelope' plane) --> EdgeGeometry (Point 2 r) -projectedEdgeGeometry LowerEnvelope' plane -env (Int -ui,Int -vi) Edge (LowerEnvelope' plane) -e = case LowerEnvelope' plane -envLowerEnvelope' plane --> Getting - (Endo (Either (UnboundedVertex plane) (BoundedVertexF Seq plane))) - (LowerEnvelope' plane) - (Either (UnboundedVertex plane) (BoundedVertexF Seq plane)) --> Either (UnboundedVertex plane) (BoundedVertexF Seq plane) -forall s a. HasCallStack => s -> Getting (Endo a) s a -> a -^?!VertexIx (LowerEnvelope' plane) --> IndexedTraversal' - (VertexIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Vertex (LowerEnvelope' plane)) -forall graph. -HasVertices' graph => -VertexIx graph --> IndexedTraversal' (VertexIx graph) graph (Vertex graph) -vertexAt Int -VertexIx (LowerEnvelope' plane) -ui of - Left UnboundedVertex plane -_unboundedVtx -> case LowerEnvelope' plane -envLowerEnvelope' plane --> Getting - (Endo (Either (UnboundedVertex plane) (BoundedVertexF Seq plane))) - (LowerEnvelope' plane) - (Either (UnboundedVertex plane) (BoundedVertexF Seq plane)) --> Either (UnboundedVertex plane) (BoundedVertexF Seq plane) -forall s a. HasCallStack => s -> Getting (Endo a) s a -> a -^?!VertexIx (LowerEnvelope' plane) --> IndexedTraversal' - (VertexIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Vertex (LowerEnvelope' plane)) -forall graph. -HasVertices' graph => -VertexIx graph --> IndexedTraversal' (VertexIx graph) graph (Vertex graph) -vertexAt Int -VertexIx (LowerEnvelope' plane) -vi of - Left UnboundedVertex plane -_ -> String -> EdgeGeometry (Point 2 r) -forall a. HasCallStack => String -> a -error String -"projectedEdgeGeometry: absurd edge from vInfty to vInfty" - Right BoundedVertexF Seq plane -v -> BoundedVertexF Seq plane -> EdgeGeometry (Point 2 r) -unboundedEdge BoundedVertexF Seq plane -v - Right BoundedVertexF Seq plane -u -> case LowerEnvelope' plane -envLowerEnvelope' plane --> Getting - (Endo (Either (UnboundedVertex plane) (BoundedVertexF Seq plane))) - (LowerEnvelope' plane) - (Either (UnboundedVertex plane) (BoundedVertexF Seq plane)) --> Either (UnboundedVertex plane) (BoundedVertexF Seq plane) -forall s a. HasCallStack => s -> Getting (Endo a) s a -> a -^?!VertexIx (LowerEnvelope' plane) --> IndexedTraversal' - (VertexIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (Vertex (LowerEnvelope' plane)) -forall graph. -HasVertices' graph => -VertexIx graph --> IndexedTraversal' (VertexIx graph) graph (Vertex graph) -vertexAt Int -VertexIx (LowerEnvelope' plane) -vi of - Left UnboundedVertex plane -_unboundedVtx -> BoundedVertexF Seq plane -> EdgeGeometry (Point 2 r) -unboundedEdge BoundedVertexF Seq plane -u - Right BoundedVertexF Seq plane -v -> ClosedLineSegment (Point 2 r) -> EdgeGeometry (Point 2 r) -forall a b. b -> Either a b -Right (ClosedLineSegment (Point 2 r) -> EdgeGeometry (Point 2 r)) --> ClosedLineSegment (Point 2 r) -> EdgeGeometry (Point 2 r) -forall a b. (a -> b) -> a -> b -$ Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) -forall point. point -> point -> ClosedLineSegment point -ClosedLineSegment (BoundedVertexF Seq plane -uBoundedVertexF Seq plane --> Getting (Point 2 r) (BoundedVertexF Seq plane) (Point 2 r) --> Point 2 r -forall s a. s -> Getting a s a -> a -^.Getting (Point 2 r) (BoundedVertexF Seq plane) (Point 2 r) -forall plane r (f :: * -> *). -(NumType plane ~ r) => -Getter (BoundedVertexF f plane) (Point 2 r) -Getter (BoundedVertexF Seq plane) (Point 2 r) -location2) (BoundedVertexF Seq plane -vBoundedVertexF Seq plane --> Getting (Point 2 r) (BoundedVertexF Seq plane) (Point 2 r) --> Point 2 r -forall s a. s -> Getting a s a -> a -^.Getting (Point 2 r) (BoundedVertexF Seq plane) (Point 2 r) -forall plane r (f :: * -> *). -(NumType plane ~ r) => -Getter (BoundedVertexF f plane) (Point 2 r) -Getter (BoundedVertexF Seq plane) (Point 2 r) -location2) - where - unboundedEdge :: BoundedVertexF Seq plane -> EdgeGeometry (Point 2 r) -unboundedEdge BoundedVertexF Seq plane -v = let dir :: Vector 2 r -dir = LEEdge plane -> LinePV 2 r -forall plane r. -(Plane_ plane r, Ord r, Fractional r) => -LEEdge plane -> LinePV 2 r -edgeIntersectionLine Edge (LowerEnvelope' plane) -LEEdge plane -e LinePV 2 r --> Getting (Vector 2 r) (LinePV 2 r) (Vector 2 r) -> Vector 2 r -forall s a. s -> Getting a s a -> a -^.Getting (Vector 2 r) (LinePV 2 r) (Vector 2 r) -forall (d :: Nat) r. -(Dimension (LinePV 2 r) ~ d, NumType (LinePV 2 r) ~ r) => -Lens' (LinePV 2 r) (Vector d r) -forall t (d :: Nat) r. -(HasDirection t, Dimension t ~ d, NumType t ~ r) => -Lens' t (Vector d r) -Lens' (LinePV 2 r) (Vector 2 r) -directionGetting (Vector 2 r) (LinePV 2 r) (Vector 2 r) --> ((Vector 2 r -> Const (Vector 2 r) (Vector 2 r)) - -> Vector 2 r -> Const (Vector 2 r) (Vector 2 r)) --> Getting (Vector 2 r) (LinePV 2 r) (Vector 2 r) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(Vector 2 r -> Vector 2 r) --> (Vector 2 r -> Const (Vector 2 r) (Vector 2 r)) --> Vector 2 r --> Const (Vector 2 r) (Vector 2 r) -forall (p :: * -> * -> *) (f :: * -> *) s a. -(Profunctor p, Contravariant f) => -(s -> a) -> Optic' p f s a -to Vector 2 r -> Vector 2 r -forall r vector (d :: Nat). -(Num r, Vector_ vector d r) => -vector -> vector -negated - in HalfLine (Point 2 r) -> EdgeGeometry (Point 2 r) -forall a b. a -> Either a b -Left (HalfLine (Point 2 r) -> EdgeGeometry (Point 2 r)) --> HalfLine (Point 2 r) -> EdgeGeometry (Point 2 r) -forall a b. (a -> b) -> a -> b -$ Point 2 r --> Vector (Dimension (Point 2 r)) (NumType (Point 2 r)) --> HalfLine (Point 2 r) -forall point. -point -> Vector (Dimension point) (NumType point) -> HalfLine point -HalfLine (BoundedVertexF Seq plane -vBoundedVertexF Seq plane --> Getting (Point 2 r) (BoundedVertexF Seq plane) (Point 2 r) --> Point 2 r -forall s a. s -> Getting a s a -> a -^.Getting (Point 2 r) (BoundedVertexF Seq plane) (Point 2 r) -forall plane r (f :: * -> *). -(NumType plane ~ r) => -Getter (BoundedVertexF f plane) (Point 2 r) -Getter (BoundedVertexF Seq plane) (Point 2 r) -location2) Vector 2 r -Vector (Dimension (Point 2 r)) (NumType (Point 2 r)) -dir - -- edge e is oriented from the lowerId towards the higherId, so in particular *from* - -- the unbounded vertex into the bounded vertex that means that to construct the - -- halfline we actually wish to flip the orientation of the line - --------------------------------------------------------------------------------- - \ No newline at end of file + +type instance NumType (Region r point) = r +type instance Dimension (Region r point) = Dimension point + +-- | bounded regions are really circular lists, but we just represent them as lists for +-- now. +type CircularList a = [a] + + +-------------------------------------------------------------------------------- + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.VertexForm.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.VertexForm.html new file mode 100644 index 000000000..adb24f3dd --- /dev/null +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.VertexForm.html @@ -0,0 +1,455 @@ +
--------------------------------------------------------------------------------
+-- |
+-- Module      :  HGeometry.Plane.LowerEnvelope.VertexForm
+-- Copyright   :  (C) Frank Staals
+-- License     :  see the LICENSE file
+-- Maintainer  :  Frank Staals
+--
+-- The vertices of the lower envelope; i.e. the lower envelope in VertexForm
+--
+--------------------------------------------------------------------------------
+module HGeometry.Plane.LowerEnvelope.Connected.VertexForm
+  ( VertexForm
+  , Definers(..)
+  , fromCCWList
+  , definers
+  ) where
+
+import qualified Data.Foldable as F
+import qualified Data.List as List
+import           Data.List.NonEmpty (NonEmpty(..))
+import qualified Data.List.NonEmpty as NonEmpty
+import           Data.Map (Map)
+import qualified Data.Map as Map
+import           Data.Maybe (fromMaybe, listToMaybe)
+import           Data.Set (Set)
+import qualified Data.Set as Set
+import           HGeometry.Combinatorial.Util
+import           HGeometry.HyperPlane.Class
+import           HGeometry.HyperPlane.NonVertical
+import           HGeometry.Intersection
+import           HGeometry.Line
+import           HGeometry.Plane.LowerEnvelope.Connected.MonoidalMap
+import           HGeometry.Plane.LowerEnvelope.Connected.Primitives
+import           HGeometry.Plane.LowerEnvelope.Connected.Type
+import           HGeometry.Point
+import           HGeometry.Properties
+import           HGeometry.Vector
+
+--------------------------------------------------------------------------------
+-- *  The planes defining a vertex
+
+-- | The vertices of a lower envelope is just a Map with every vertex its definers,
+-- i.e. the planes that define the vertex in CCW order around it.
+type VertexForm r plane = Map (Point 3 r) (Definers plane)
+
+----------------------------------------
+-- *  The planes defining a vertex
+
+-- | in CCW order, starting with the plane that is minimal at the vertical up direction
+-- from their common vertex.
+newtype Definers plane = Definers [plane]
+  deriving stock (Int -> Definers plane -> ShowS
+[Definers plane] -> ShowS
+Definers plane -> String
+(Int -> Definers plane -> ShowS)
+-> (Definers plane -> String)
+-> ([Definers plane] -> ShowS)
+-> Show (Definers plane)
+forall plane. Show plane => Int -> Definers plane -> ShowS
+forall plane. Show plane => [Definers plane] -> ShowS
+forall plane. Show plane => Definers plane -> String
+forall a.
+(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
+$cshowsPrec :: forall plane. Show plane => Int -> Definers plane -> ShowS
+showsPrec :: Int -> Definers plane -> ShowS
+$cshow :: forall plane. Show plane => Definers plane -> String
+show :: Definers plane -> String
+$cshowList :: forall plane. Show plane => [Definers plane] -> ShowS
+showList :: [Definers plane] -> ShowS
+Show,Definers plane -> Definers plane -> Bool
+(Definers plane -> Definers plane -> Bool)
+-> (Definers plane -> Definers plane -> Bool)
+-> Eq (Definers plane)
+forall plane. Eq plane => Definers plane -> Definers plane -> Bool
+forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
+$c== :: forall plane. Eq plane => Definers plane -> Definers plane -> Bool
+== :: Definers plane -> Definers plane -> Bool
+$c/= :: forall plane. Eq plane => Definers plane -> Definers plane -> Bool
+/= :: Definers plane -> Definers plane -> Bool
+Eq,Eq (Definers plane)
+Eq (Definers plane) =>
+(Definers plane -> Definers plane -> Ordering)
+-> (Definers plane -> Definers plane -> Bool)
+-> (Definers plane -> Definers plane -> Bool)
+-> (Definers plane -> Definers plane -> Bool)
+-> (Definers plane -> Definers plane -> Bool)
+-> (Definers plane -> Definers plane -> Definers plane)
+-> (Definers plane -> Definers plane -> Definers plane)
+-> Ord (Definers plane)
+Definers plane -> Definers plane -> Bool
+Definers plane -> Definers plane -> Ordering
+Definers plane -> Definers plane -> Definers plane
+forall a.
+Eq a =>
+(a -> a -> Ordering)
+-> (a -> a -> Bool)
+-> (a -> a -> Bool)
+-> (a -> a -> Bool)
+-> (a -> a -> Bool)
+-> (a -> a -> a)
+-> (a -> a -> a)
+-> Ord a
+forall plane. Ord plane => Eq (Definers plane)
+forall plane. Ord plane => Definers plane -> Definers plane -> Bool
+forall plane.
+Ord plane =>
+Definers plane -> Definers plane -> Ordering
+forall plane.
+Ord plane =>
+Definers plane -> Definers plane -> Definers plane
+$ccompare :: forall plane.
+Ord plane =>
+Definers plane -> Definers plane -> Ordering
+compare :: Definers plane -> Definers plane -> Ordering
+$c< :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool
+< :: Definers plane -> Definers plane -> Bool
+$c<= :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool
+<= :: Definers plane -> Definers plane -> Bool
+$c> :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool
+> :: Definers plane -> Definers plane -> Bool
+$c>= :: forall plane. Ord plane => Definers plane -> Definers plane -> Bool
+>= :: Definers plane -> Definers plane -> Bool
+$cmax :: forall plane.
+Ord plane =>
+Definers plane -> Definers plane -> Definers plane
+max :: Definers plane -> Definers plane -> Definers plane
+$cmin :: forall plane.
+Ord plane =>
+Definers plane -> Definers plane -> Definers plane
+min :: Definers plane -> Definers plane -> Definers plane
+Ord)
+  deriving newtype ((forall a b. (a -> b) -> Definers a -> Definers b)
+-> (forall a b. a -> Definers b -> Definers a) -> Functor Definers
+forall a b. a -> Definers b -> Definers a
+forall a b. (a -> b) -> Definers a -> Definers b
+forall (f :: * -> *).
+(forall a b. (a -> b) -> f a -> f b)
+-> (forall a b. a -> f b -> f a) -> Functor f
+$cfmap :: forall a b. (a -> b) -> Definers a -> Definers b
+fmap :: forall a b. (a -> b) -> Definers a -> Definers b
+$c<$ :: forall a b. a -> Definers b -> Definers a
+<$ :: forall a b. a -> Definers b -> Definers a
+Functor,(forall m. Monoid m => Definers m -> m)
+-> (forall m a. Monoid m => (a -> m) -> Definers a -> m)
+-> (forall m a. Monoid m => (a -> m) -> Definers a -> m)
+-> (forall a b. (a -> b -> b) -> b -> Definers a -> b)
+-> (forall a b. (a -> b -> b) -> b -> Definers a -> b)
+-> (forall b a. (b -> a -> b) -> b -> Definers a -> b)
+-> (forall b a. (b -> a -> b) -> b -> Definers a -> b)
+-> (forall a. (a -> a -> a) -> Definers a -> a)
+-> (forall a. (a -> a -> a) -> Definers a -> a)
+-> (forall a. Definers a -> [a])
+-> (forall a. Definers a -> Bool)
+-> (forall a. Definers a -> Int)
+-> (forall a. Eq a => a -> Definers a -> Bool)
+-> (forall a. Ord a => Definers a -> a)
+-> (forall a. Ord a => Definers a -> a)
+-> (forall a. Num a => Definers a -> a)
+-> (forall a. Num a => Definers a -> a)
+-> Foldable Definers
+forall a. Eq a => a -> Definers a -> Bool
+forall a. Num a => Definers a -> a
+forall a. Ord a => Definers a -> a
+forall m. Monoid m => Definers m -> m
+forall a. Definers a -> Bool
+forall a. Definers a -> Int
+forall a. Definers a -> [a]
+forall a. (a -> a -> a) -> Definers a -> a
+forall m a. Monoid m => (a -> m) -> Definers a -> m
+forall b a. (b -> a -> b) -> b -> Definers a -> b
+forall a b. (a -> b -> b) -> b -> Definers a -> b
+forall (t :: * -> *).
+(forall m. Monoid m => t m -> m)
+-> (forall m a. Monoid m => (a -> m) -> t a -> m)
+-> (forall m a. Monoid m => (a -> m) -> t a -> m)
+-> (forall a b. (a -> b -> b) -> b -> t a -> b)
+-> (forall a b. (a -> b -> b) -> b -> t a -> b)
+-> (forall b a. (b -> a -> b) -> b -> t a -> b)
+-> (forall b a. (b -> a -> b) -> b -> t a -> b)
+-> (forall a. (a -> a -> a) -> t a -> a)
+-> (forall a. (a -> a -> a) -> t a -> a)
+-> (forall a. t a -> [a])
+-> (forall a. t a -> Bool)
+-> (forall a. t a -> Int)
+-> (forall a. Eq a => a -> t a -> Bool)
+-> (forall a. Ord a => t a -> a)
+-> (forall a. Ord a => t a -> a)
+-> (forall a. Num a => t a -> a)
+-> (forall a. Num a => t a -> a)
+-> Foldable t
+$cfold :: forall m. Monoid m => Definers m -> m
+fold :: forall m. Monoid m => Definers m -> m
+$cfoldMap :: forall m a. Monoid m => (a -> m) -> Definers a -> m
+foldMap :: forall m a. Monoid m => (a -> m) -> Definers a -> m
+$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Definers a -> m
+foldMap' :: forall m a. Monoid m => (a -> m) -> Definers a -> m
+$cfoldr :: forall a b. (a -> b -> b) -> b -> Definers a -> b
+foldr :: forall a b. (a -> b -> b) -> b -> Definers a -> b
+$cfoldr' :: forall a b. (a -> b -> b) -> b -> Definers a -> b
+foldr' :: forall a b. (a -> b -> b) -> b -> Definers a -> b
+$cfoldl :: forall b a. (b -> a -> b) -> b -> Definers a -> b
+foldl :: forall b a. (b -> a -> b) -> b -> Definers a -> b
+$cfoldl' :: forall b a. (b -> a -> b) -> b -> Definers a -> b
+foldl' :: forall b a. (b -> a -> b) -> b -> Definers a -> b
+$cfoldr1 :: forall a. (a -> a -> a) -> Definers a -> a
+foldr1 :: forall a. (a -> a -> a) -> Definers a -> a
+$cfoldl1 :: forall a. (a -> a -> a) -> Definers a -> a
+foldl1 :: forall a. (a -> a -> a) -> Definers a -> a
+$ctoList :: forall a. Definers a -> [a]
+toList :: forall a. Definers a -> [a]
+$cnull :: forall a. Definers a -> Bool
+null :: forall a. Definers a -> Bool
+$clength :: forall a. Definers a -> Int
+length :: forall a. Definers a -> Int
+$celem :: forall a. Eq a => a -> Definers a -> Bool
+elem :: forall a. Eq a => a -> Definers a -> Bool
+$cmaximum :: forall a. Ord a => Definers a -> a
+maximum :: forall a. Ord a => Definers a -> a
+$cminimum :: forall a. Ord a => Definers a -> a
+minimum :: forall a. Ord a => Definers a -> a
+$csum :: forall a. Num a => Definers a -> a
+sum :: forall a. Num a => Definers a -> a
+$cproduct :: forall a. Num a => Definers a -> a
+product :: forall a. Num a => Definers a -> a
+Foldable)
+
+-- | Given the planes in order, starting with the one that is closest in the up direction,
+-- construct the Definers.
+fromCCWList :: [plane] -> Definers plane
+fromCCWList :: forall plane. [plane] -> Definers plane
+fromCCWList = [plane] -> Definers plane
+forall plane. [plane] -> Definers plane
+Definers
+
+-- | Smart constructor for creating the definers of three planes
+definers                                    :: forall plane r.(Plane_ plane r, Ord r, Fractional r)
+                                            => Three plane -> Maybe (Point 3 r, Definers plane)
+definers :: forall plane r.
+(Plane_ plane r, Ord r, Fractional r) =>
+Three plane -> Maybe (Point 3 r, Definers plane)
+definers (Three h1 :: plane
+h1@(Plane_ r
+a1 r
+b1 r
+c1) plane
+h2 plane
+h3) =
+    do VerticalOrLineEQ r
+l12 <- plane -> plane -> Maybe (VerticalOrLineEQ r)
+forall plane r.
+(Plane_ plane r, Fractional r, Eq r) =>
+plane -> plane -> Maybe (VerticalOrLineEQ r)
+intersectionLine plane
+h1 plane
+h2
+       VerticalOrLineEQ r
+l13 <- plane -> plane -> Maybe (VerticalOrLineEQ r)
+forall plane r.
+(Plane_ plane r, Fractional r, Eq r) =>
+plane -> plane -> Maybe (VerticalOrLineEQ r)
+intersectionLine plane
+h1 plane
+h3
+       VerticalOrLineEQ r
+-> VerticalOrLineEQ r
+-> Intersection (VerticalOrLineEQ r) (VerticalOrLineEQ r)
+forall g h. IsIntersectableWith g h => g -> h -> Intersection g h
+intersect VerticalOrLineEQ r
+l12 VerticalOrLineEQ r
+l13 Maybe (LineLineIntersectionG r (VerticalOrLineEQ r))
+-> (LineLineIntersectionG r (VerticalOrLineEQ r)
+    -> Maybe (Point 3 r, Definers plane))
+-> Maybe (Point 3 r, Definers plane)
+forall a b. Maybe a -> (a -> Maybe b) -> Maybe b
+forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
+>>= \case
+         Line_x_Line_Line VerticalOrLineEQ r
+_             -> Maybe (Point 3 r, Definers plane)
+forall a. Maybe a
+Nothing
+         Line_x_Line_Point (Point2 r
+x r
+y) -> (Point 3 r, Definers plane) -> Maybe (Point 3 r, Definers plane)
+forall a. a -> Maybe a
+Just ( r -> r -> r -> Point 3 r
+forall r. r -> r -> r -> Point 3 r
+Point3 r
+x r
+y (r
+a1 r -> r -> r
+forall a. Num a => a -> a -> a
+* r
+x r -> r -> r
+forall a. Num a => a -> a -> a
++ r
+b1r -> r -> r
+forall a. Num a => a -> a -> a
+* r
+y r -> r -> r
+forall a. Num a => a -> a -> a
++ r
+c1)
+                                                , [plane] -> Definers plane
+forall plane. [plane] -> Definers plane
+Definers [plane
+hMin, plane
+hTwo, plane
+hThree]
+                                                )
+           where
+             (plane
+hMin,plane
+h,plane
+h')   = (plane -> r) -> plane -> plane -> plane -> (plane, plane, plane)
+forall a c. Ord a => (c -> a) -> c -> c -> c -> (c, c, c)
+extractMinOn (Point 2 r -> plane -> r
+forall point.
+(Num r, 1 <= 3, Point_ point (3 - 1) r) =>
+point -> plane -> r
+forall hyperPlane (d :: Natural) r point.
+(NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d,
+ Point_ point (d - 1) r) =>
+point -> hyperPlane -> r
+evalAt (Point 2 r -> plane -> r) -> Point 2 r -> plane -> r
+forall a b. (a -> b) -> a -> b
+$ r -> r -> Point 2 r
+forall r. r -> r -> Point 2 r
+Point2 r
+x (r
+yr -> r -> r
+forall a. Num a => a -> a -> a
++r
+1)) plane
+h1 plane
+h2 plane
+h3
+             -- we compute the plane hMin that is cheapest directly above the vertex h and
+             -- h' are the other two planes. That Means hMin is the first definer (in the
+             -- CCW order). What remains is to determine the order in which the remaining
+             -- planes h and h' appear in the order.
+             (plane
+hTwo,plane
+hThree) = case Vector 2 r -> Point 2 r -> Point 2 r -> Point 2 r -> Ordering
+forall center r point.
+(Point_ center 2 r, Point_ point 2 r, Ord r, Num r) =>
+Vector 2 r -> center -> point -> point -> Ordering
+ccwCmpAroundWith (r -> r -> Vector 2 r
+forall r. r -> r -> Vector 2 r
+Vector2 r
+0 r
+1) (Point 2 r
+forall point (d :: Natural) r.
+(Num r, ConstructablePoint_ point d r) =>
+point
+origin :: Point 2 r)
+                                                   (Vector 2 r -> Point 2 r
+forall v. v -> PointF v
+Point Vector 2 r
+vMinH) (Vector 2 r -> Point 2 r
+forall v. v -> PointF v
+Point Vector 2 r
+vMinH') of
+                               Ordering
+LT -> (plane
+h,plane
+h')
+                               Ordering
+EQ -> String -> (plane, plane)
+forall a. HasCallStack => String -> a
+error String
+"definers: weird degeneracy?"
+                               Ordering
+GT -> (plane
+h',plane
+h)
+
+             vMinH :: Vector 2 r
+vMinH  = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r
+forall a. a -> Maybe a -> a
+fromMaybe Vector 2 r
+forall {a}. a
+err (Maybe (Vector 2 r) -> Vector 2 r)
+-> Maybe (Vector 2 r) -> Vector 2 r
+forall a b. (a -> b) -> a -> b
+$ plane -> plane -> Maybe (Vector 2 r)
+forall plane r.
+(Plane_ plane r, Ord r, Fractional r) =>
+plane -> plane -> Maybe (Vector 2 r)
+intersectionVector plane
+h  plane
+hMin
+             vMinH' :: Vector 2 r
+vMinH' = Vector 2 r -> Maybe (Vector 2 r) -> Vector 2 r
+forall a. a -> Maybe a -> a
+fromMaybe Vector 2 r
+forall {a}. a
+err (Maybe (Vector 2 r) -> Vector 2 r)
+-> Maybe (Vector 2 r) -> Vector 2 r
+forall a b. (a -> b) -> a -> b
+$ plane -> plane -> Maybe (Vector 2 r)
+forall plane r.
+(Plane_ plane r, Ord r, Fractional r) =>
+plane -> plane -> Maybe (Vector 2 r)
+intersectionVector plane
+h' plane
+hMin
+             err :: a
+err = String -> a
+forall a. HasCallStack => String -> a
+error String
+"definers: absurd"
+
+-- | given three elements, returns the minimum element in the first argument and the
+-- remaining two elements in the second and third argument (in arbitrary order).
+extractMinOn         :: Ord a => (c -> a) -> c -> c -> c -> (c, c, c)
+extractMinOn :: forall a c. Ord a => (c -> a) -> c -> c -> c -> (c, c, c)
+extractMinOn c -> a
+f c
+a c
+b c
+c = let (c
+m,c
+ab)  = c -> c -> (c, c)
+min' c
+a c
+b
+                           (c
+mi,c
+c') = c -> c -> (c, c)
+min' c
+m c
+c
+                       in (c
+mi, c
+ab, c
+c')
+  where
+    min' :: c -> c -> (c, c)
+min' c
+x c
+y
+      | c -> a
+f c
+x a -> a -> Bool
+forall a. Ord a => a -> a -> Bool
+<= c -> a
+f c
+y = (c
+x,c
+y)
+      | Bool
+otherwise  = (c
+y,c
+x)
+
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.html index 32aa897eb..5fabeb54c 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Connected.html @@ -1,38 +1,25 @@ -
{-# LANGUAGE UndecidableInstances #-}
---------------------------------------------------------------------------------
--- |
--- Module      :  HGeometry.LowerEnvelope.Connected
--- Copyright   :  (C) Frank Staals
--- License     :  see the LICENSE file
--- Maintainer  :  Frank Staals
---
--- A Representation of the Lower envelope of planes in Adjacency-list
--- form.
---
---------------------------------------------------------------------------------
-module HGeometry.Plane.LowerEnvelope.Connected
-  ( LowerEnvelope'(LowerEnvelope)
-  , theUnboundedVertex, boundedVertices
-
-  , singleton
-  , fromVertexForm'
-
-  , BoundedVertexF(Vertex)
-  , location, definers, location2
-
-  , UnboundedVertex(UnboundedVertex)
-  , unboundedVertexId
-  , HasUnboundedEdges(..)
-
-  , EdgeGeometry
-  , projectedEdgeGeometries, projectedEdgeGeometry
-  ) where
-
-import           HGeometry.Plane.LowerEnvelope.Type
-import           HGeometry.Plane.LowerEnvelope.Connected.Type
-import           HGeometry.Plane.LowerEnvelope.Connected.FromVertexForm
-import           HGeometry.Vector.NonEmpty.Util ()
-
-
---------------------------------------------------------------------------------
-
\ No newline at end of file +
--------------------------------------------------------------------------------
+-- |
+-- Module      :  HGeometry.Plane.LowerEnvelope.Connected
+-- Copyright   :  (C) Frank Staals
+-- License     :  see the LICENSE file
+-- Maintainer  :  Frank Staals
+--
+-- A Representation of the Lower envelope of planes as a bunch of convex regions
+--
+--------------------------------------------------------------------------------
+module HGeometry.Plane.LowerEnvelope.Connected
+  ( MinimizationDiagram
+  , asMap
+  , Region(..)
+  , CircularList
+  , module HGeometry.Plane.LowerEnvelope.Connected.Primitives
+  , module HGeometry.Plane.LowerEnvelope.Connected.Regions
+  , module HGeometry.Plane.LowerEnvelope.Connected.BruteForce
+  ) where
+
+import HGeometry.Plane.LowerEnvelope.Connected.BruteForce
+import HGeometry.Plane.LowerEnvelope.Connected.Primitives
+import HGeometry.Plane.LowerEnvelope.Connected.Regions
+import HGeometry.Plane.LowerEnvelope.Connected.Type
+
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.ConnectedNew.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.ConnectedNew.html deleted file mode 100644 index d6c4f6bae..000000000 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.ConnectedNew.html +++ /dev/null @@ -1,20 +0,0 @@ -
--------------------------------------------------------------------------------
--- |
--- Module      :  HGeometry.Plane.LowerEnvelope.ConnectedNew
--- Copyright   :  (C) Frank Staals
--- License     :  see the LICENSE file
--- Maintainer  :  Frank Staals
---
--- A Representation of the Lower envelope of planes as a bunch of convex regions
---
---------------------------------------------------------------------------------
-module HGeometry.Plane.LowerEnvelope.ConnectedNew
-  ( module HGeometry.Plane.LowerEnvelope.Connected.Primitives
-  , module HGeometry.Plane.LowerEnvelope.Connected.Regions
-  , module HGeometry.Plane.LowerEnvelope.Connected.BruteForce
-  ) where
-
-import HGeometry.Plane.LowerEnvelope.Connected.Primitives
-import HGeometry.Plane.LowerEnvelope.Connected.BruteForce
-import HGeometry.Plane.LowerEnvelope.Connected.Regions
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.DivideAndConquer.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.DivideAndConquer.html deleted file mode 100644 index b506707de..000000000 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.DivideAndConquer.html +++ /dev/null @@ -1,781 +0,0 @@ -
module HGeometry.Plane.LowerEnvelope.DivideAndConquer
-  ( lowerEnvelope
-  ) where
-
-import           Control.Lens
-import           Data.Foldable1
-import qualified Data.List as List
-import           Data.List.NonEmpty (NonEmpty(..))
-import qualified Data.List.NonEmpty as NonEmpty
-import qualified Data.Map as Map
-import qualified Data.Set as Set
-import           Data.Word
-import           HGeometry.Ext
-import           HGeometry.HyperPlane.Class
-import           HGeometry.HyperPlane.NonVertical
-import           HGeometry.Intersection
-import           HGeometry.Line
-import           HGeometry.Line.General
-import           HGeometry.Line.LineEQ
-import qualified HGeometry.Line.LowerEnvelope as LowerEnvelope
-import           HGeometry.Line.PointAndVector
-import           HGeometry.Plane.LowerEnvelope.AdjListForm
-import           HGeometry.Plane.LowerEnvelope.EpsApproximation
-import qualified HGeometry.Plane.LowerEnvelope.Naive as Naive
-import           HGeometry.Plane.LowerEnvelope.Type
-import           HGeometry.Plane.LowerEnvelope.VertexForm
-import           HGeometry.Point
-import           HGeometry.Properties
-import           HGeometry.Vector
-import           Witherable
-
---------------------------------------------------------------------------------
-
-
-
--- | below this value we use the naive algorithm.
-nZero :: Int
-nZero :: Int
-nZero = Int
-10
-
-eps :: Rational
-eps :: Rational
-eps = Rational
-1Rational -> Rational -> Rational
-forall a. Fractional a => a -> a -> a
-/Rational
-8 -- TODO figure out what this had to be again.
-
---------------------------------------------------------------------------------
-
--- | divide and conquer algorithm
---
--- running time: \(O(n \log n)\)
-lowerEnvelope    :: ( Plane_ plane r
-                    , Ord r, Fractional r, Foldable1 f, Functor f, Ord plane
-                    , Show plane, Show r
-
-
-                    , Intersection (VerticalOrLineEQ r :+ plane) (VerticalOrLineEQ r :+ plane)
-                      ~ Maybe (LineLineIntersection (VerticalOrLineEQ r :+ plane))
-                    ) => f plane -> LowerEnvelope plane
-lowerEnvelope :: forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
- Ord plane, Show plane, Show r,
- Intersection
-   (VerticalOrLineEQ r :+ plane) (VerticalOrLineEQ r :+ plane)
- ~ Maybe (LineLineIntersection (VerticalOrLineEQ r :+ plane))) =>
-f plane -> LowerEnvelope plane
-lowerEnvelope f plane
-hs = case f plane -> VerifyDegenerate plane r
-forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Ord plane,
- Show plane, Show r) =>
-f plane -> VerifyDegenerate plane r
-verifyNotAllColinear f plane
-hs of
-    JustOnePlane plane
-h  -> Set (ParallelPlane plane) -> LowerEnvelope plane
-forall plane. Set (ParallelPlane plane) -> LowerEnvelope plane
-ParallelStrips (Set (ParallelPlane plane) -> LowerEnvelope plane)
--> Set (ParallelPlane plane) -> LowerEnvelope plane
-forall a b. (a -> b) -> a -> b
-$ ParallelPlane plane -> Set (ParallelPlane plane)
-forall a. a -> Set a
-Set.singleton (plane
-hplane
--> Getting (ParallelPlane plane) plane (ParallelPlane plane)
--> ParallelPlane plane
-forall s a. s -> Getting a s a -> a
-^.AReview (ParallelPlane plane) plane
--> Getter plane (ParallelPlane plane)
-forall t b. AReview t b -> Getter b t
-re AReview (ParallelPlane plane) plane
-Tagged
-  (Unwrapped (ParallelPlane plane))
-  (Identity (Unwrapped (ParallelPlane plane)))
--> Tagged (ParallelPlane plane) (Identity (ParallelPlane plane))
-forall s. Wrapped s => Iso' s (Unwrapped s)
-Iso' (ParallelPlane plane) (Unwrapped (ParallelPlane plane))
-_Wrapped')
-    AllColinear Vector 2 r
-v   -> let lines :: f (LineEQ r :+ plane)
-lines = (plane -> LineEQ r :+ plane) -> f plane -> f (LineEQ r :+ plane)
-forall a b. (a -> b) -> f a -> f b
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-fmap (Vector 2 r -> plane -> LineEQ r :+ plane
-forall r plane. Vector 2 r -> plane -> LineEQ r :+ plane
-toLine Vector 2 r
-v) f plane
-hs
-                           env :: LowerEnvelopeF [] (Point 2 r) (LineEQ r :+ plane)
-env   = f (LineEQ r :+ plane)
--> LowerEnvelopeF [] (Point 2 r) (LineEQ r :+ plane)
-forall (g :: * -> *) (f :: * -> *) line r.
-(NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f,
- Functor f, IsIntersectableWith line line,
- Intersection line line ~ Maybe (LineLineIntersection line),
- HasFromFoldable g) =>
-f line -> LowerEnvelopeF g (Point 2 r) line
-LowerEnvelope.lowerEnvelope f (LineEQ r :+ plane)
-lines
-                       in Set (ParallelPlane plane) -> LowerEnvelope plane
-forall plane. Set (ParallelPlane plane) -> LowerEnvelope plane
-ParallelStrips (Set (ParallelPlane plane) -> LowerEnvelope plane)
--> Set (ParallelPlane plane) -> LowerEnvelope plane
-forall a b. (a -> b) -> a -> b
-$ LowerEnvelopeF [] (Point 2 r) (LineEQ r :+ plane)
--> Set (ParallelPlane plane)
-forall (g :: * -> *) r plane.
-(g ~ []) =>
-LowerEnvelopeF g (Point 2 r) (LineEQ r :+ plane)
--> Set (ParallelPlane plane)
-fromEnv LowerEnvelopeF [] (Point 2 r) (LineEQ r :+ plane)
-env
-    NonDegenerate Vector 3 plane
-_ -> f plane -> VertexForm plane -> LowerEnvelope plane
-forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane,
- Show r, Foldable1 f) =>
-f plane -> VertexForm plane -> LowerEnvelope plane
-fromVertexForm f plane
-hs (VertexForm plane -> LowerEnvelope plane)
--> (f plane -> VertexForm plane) -> f plane -> LowerEnvelope plane
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. f plane -> VertexForm plane
-forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
- Ord plane, Show plane, Show r) =>
-f plane -> VertexForm plane
-lowerEnvelopeVertexForm (f plane -> LowerEnvelope plane) -> f plane -> LowerEnvelope plane
-forall a b. (a -> b) -> a -> b
-$ f plane
-hs
-
-toLine :: Vector 2 r -> plane -> LineEQ r :+ plane
-toLine :: forall r plane. Vector 2 r -> plane -> LineEQ r :+ plane
-toLine = Vector 2 r -> plane -> LineEQ r :+ plane
-forall a. HasCallStack => a
-undefined
-
-fromEnv :: ( g ~ [])
-        => LowerEnvelope.LowerEnvelopeF g (Point 2 r) (LineEQ r :+ plane) -> Set.Set (ParallelPlane plane)
-fromEnv :: forall (g :: * -> *) r plane.
-(g ~ []) =>
-LowerEnvelopeF g (Point 2 r) (LineEQ r :+ plane)
--> Set (ParallelPlane plane)
-fromEnv = LowerEnvelopeF g (Point 2 r) (LineEQ r :+ plane)
--> Set (ParallelPlane plane)
-forall a. HasCallStack => a
-undefined
-
-
--- | Helper type that describes whether the planes are degenerate or not
-data VerifyDegenerate plane r = JustOnePlane plane
-                              | AllColinear (Vector 2 r)
-                              -- ^ All edges of the lower envelope are parallel to
-                              -- this direction.
-                              | NonDegenerate (Vector 3 plane)
-                              -- ^ three non-degenrate planes prove that we will have a vertex
-                              deriving (Int -> VerifyDegenerate plane r -> ShowS
-[VerifyDegenerate plane r] -> ShowS
-VerifyDegenerate plane r -> String
-(Int -> VerifyDegenerate plane r -> ShowS)
--> (VerifyDegenerate plane r -> String)
--> ([VerifyDegenerate plane r] -> ShowS)
--> Show (VerifyDegenerate plane r)
-forall a.
-(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
-forall plane r.
-(Show plane, Show r) =>
-Int -> VerifyDegenerate plane r -> ShowS
-forall plane r.
-(Show plane, Show r) =>
-[VerifyDegenerate plane r] -> ShowS
-forall plane r.
-(Show plane, Show r) =>
-VerifyDegenerate plane r -> String
-$cshowsPrec :: forall plane r.
-(Show plane, Show r) =>
-Int -> VerifyDegenerate plane r -> ShowS
-showsPrec :: Int -> VerifyDegenerate plane r -> ShowS
-$cshow :: forall plane r.
-(Show plane, Show r) =>
-VerifyDegenerate plane r -> String
-show :: VerifyDegenerate plane r -> String
-$cshowList :: forall plane r.
-(Show plane, Show r) =>
-[VerifyDegenerate plane r] -> ShowS
-showList :: [VerifyDegenerate plane r] -> ShowS
-Show,VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool
-(VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool)
--> (VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool)
--> Eq (VerifyDegenerate plane r)
-forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
-forall plane r.
-(Eq plane, Eq r) =>
-VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool
-$c== :: forall plane r.
-(Eq plane, Eq r) =>
-VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool
-== :: VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool
-$c/= :: forall plane r.
-(Eq plane, Eq r) =>
-VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool
-/= :: VerifyDegenerate plane r -> VerifyDegenerate plane r -> Bool
-Eq)
-
--- | Verifies that not all planes are colinear.
-verifyNotAllColinear    :: forall f plane r.
-                           ( Plane_ plane r
-                           , Ord r, Fractional r, Foldable1 f, Ord plane
-                           , Show plane, Show r
-                           ) => f plane -> VerifyDegenerate plane r
-verifyNotAllColinear :: forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Ord plane,
- Show plane, Show r) =>
-f plane -> VerifyDegenerate plane r
-verifyNotAllColinear f plane
-hs = NonEmpty plane -> VerifyDegenerate plane r
-findOnParalellPlanes (f plane -> NonEmpty plane
-forall a. f a -> NonEmpty a
-forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a
-toNonEmpty f plane
-hs)
-  where
-    -- try to find two non-parallel planes h1 h2
-    findOnParalellPlanes              :: NonEmpty plane -> VerifyDegenerate plane r
-    findOnParalellPlanes :: NonEmpty plane -> VerifyDegenerate plane r
-findOnParalellPlanes (plane
-h1 :| [plane]
-rest) = case [plane] -> Maybe (NonEmpty plane)
-forall a. [a] -> Maybe (NonEmpty a)
-NonEmpty.nonEmpty [plane]
-rest of
-      Maybe (NonEmpty plane)
-Nothing            -> plane -> VerifyDegenerate plane r
-forall plane r. plane -> VerifyDegenerate plane r
-JustOnePlane plane
-h1
-      Just (plane
-h2 :| [plane]
-rest') -> case plane -> plane -> Either plane (Vector 2 r)
-direction plane
-h1 plane
-h2 of
-        Left plane
-h' -> NonEmpty plane -> VerifyDegenerate plane r
-findOnParalellPlanes (plane
-h' plane -> [plane] -> NonEmpty plane
-forall a. a -> [a] -> NonEmpty a
-:| [plane]
-rest')
-        Right Vector 2 r
-l -> plane -> plane -> Vector 2 r -> [plane] -> VerifyDegenerate plane r
-findThirdPlane plane
-h1 plane
-h2 Vector 2 r
-l [plane]
-rest -- find a third plane
-
-    -- Tries to compute the vector of the line in which the two planes intersect,
-    -- returns this vector (if the intersection line exists), or the lowest plane if one
-    -- is always below the other.
-    direction       :: plane -> plane -> Either plane (Vector 2 r)
-    direction :: plane -> plane -> Either plane (Vector 2 r)
-direction plane
-h1 plane
-h2 = case plane -> plane -> Maybe (VerticalOrLineEQ r)
-forall plane r.
-(Plane_ plane r, Fractional r, Eq r) =>
-plane -> plane -> Maybe (VerticalOrLineEQ r)
-intersectionLine plane
-h1 plane
-h2 of
-      Maybe (VerticalOrLineEQ r)
-Nothing | plane -> r
-heightOf plane
-h1 r -> r -> Bool
-forall a. Ord a => a -> a -> Bool
-<= plane -> r
-heightOf plane
-h2 -> plane -> Either plane (Vector 2 r)
-forall a b. a -> Either a b
-Left plane
-h1
-              | Bool
-otherwise                  -> plane -> Either plane (Vector 2 r)
-forall a b. a -> Either a b
-Left plane
-h2
-      Just VerticalOrLineEQ r
-l                               -> Vector 2 r -> Either plane (Vector 2 r)
-forall a b. b -> Either a b
-Right (Vector 2 r -> Either plane (Vector 2 r))
--> Vector 2 r -> Either plane (Vector 2 r)
-forall a b. (a -> b) -> a -> b
-$ case VerticalOrLineEQ r
-l of
-        VerticalLineThrough r
-_    -> r -> r -> Vector 2 r
-forall r. r -> r -> Vector 2 r
-Vector2 r
-0 r
-1
-        NonVertical (LineEQ r
-a r
-_) -> r -> r -> Vector 2 r
-forall r. r -> r -> Vector 2 r
-Vector2 r
-1 r
-a
-
-    heightOf :: plane -> r
-heightOf = Point 2 r -> plane -> r
-forall point.
-(Num r, 1 <= 3, Point_ point (3 - 1) r) =>
-point -> plane -> r
-forall hyperPlane (d :: Nat) r point.
-(NonVerticalHyperPlane_ hyperPlane d r, Num r, 1 <= d,
- Point_ point (d - 1) r) =>
-point -> hyperPlane -> r
-evalAt (Point 2 r
-forall point (d :: Nat) r.
-(Num r, ConstructablePoint_ point d r) =>
-point
-origin :: Point 2 r)
-
-
-    findThirdPlane :: plane -> plane -> Vector 2 r -> [plane] -> VerifyDegenerate plane r
-findThirdPlane plane
-h1 plane
-h2 Vector 2 r
-v = [plane] -> VerifyDegenerate plane r
-go
-      where
-        go :: [plane] -> VerifyDegenerate plane r
-go = \case
-          []                                    -> Vector 2 r -> VerifyDegenerate plane r
-forall plane r. Vector 2 r -> VerifyDegenerate plane r
-AllColinear Vector 2 r
-v
-          (plane
-h3 : [plane]
-rest) -> case plane -> plane -> Either plane (Vector 2 r)
-direction plane
-h1 plane
-h3 of
-            Left plane
-_  -> [plane] -> VerifyDegenerate plane r
-go [plane]
-rest -- h3 is parallel to h1, so simply continue the search
-                               -- note that we don't really care if h1 or h3 is the lowest
-            Right Vector 2 r
-u | Vector 2 r
-u  Vector 2 r -> Vector 2 r -> Bool
-forall {a}. (Eq a, Num a) => Vector 2 a -> Vector 2 a -> Bool
-`isParallelTo'` Vector 2 r
-v      -> [plane] -> VerifyDegenerate plane r
-go [plane]
-rest
-                    | Bool
-otherwise                 -> Vector 3 plane -> VerifyDegenerate plane r
-forall plane r. Vector 3 plane -> VerifyDegenerate plane r
-NonDegenerate (Vector 3 plane -> VerifyDegenerate plane r)
--> Vector 3 plane -> VerifyDegenerate plane r
-forall a b. (a -> b) -> a -> b
-$ plane -> plane -> plane -> Vector 3 plane
-forall r. r -> r -> r -> Vector 3 r
-Vector3 plane
-h1 plane
-h2 plane
-h3
-
-    isParallelTo' :: Vector 2 a -> Vector 2 a -> Bool
-isParallelTo' (Vector2 a
-ux a
-uy) (Vector2 a
-vx a
-vy) = a
-denom a -> a -> Bool
-forall a. Eq a => a -> a -> Bool
-== a
-0
-      where
-        denom :: a
-denom = a
-vy a -> a -> a
-forall a. Num a => a -> a -> a
-* a
-ux a -> a -> a
-forall a. Num a => a -> a -> a
-- a
-vx a -> a -> a
-forall a. Num a => a -> a -> a
-* a
-uy
-
--- | Compute the vertices of the lower envelope
---
---
--- running time: \(O(n \log n)\)
-lowerEnvelopeVertexForm    :: forall f plane r.
-                              ( Plane_ plane r
-                              , Ord r, Fractional r, Foldable1 f, Functor f, Ord plane
-                              , Show plane, Show r
-                              ) => f plane -> VertexForm plane
-lowerEnvelopeVertexForm :: forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
- Ord plane, Show plane, Show r) =>
-f plane -> VertexForm plane
-lowerEnvelopeVertexForm f plane
-hs
-    | Int
-n Int -> Int -> Bool
-forall a. Ord a => a -> a -> Bool
-<= Int
-nZero = f plane -> VertexForm plane
-forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable f, Ord plane) =>
-f plane -> VertexForm plane
-Naive.lowerEnvelopeVertexForm f plane
-hs
-    | Bool
-otherwise  = (NonEmpty plane -> VertexForm plane)
--> NonEmpty (NonEmpty plane) -> VertexForm plane
-forall m a. Monoid m => (a -> m) -> NonEmpty a -> m
-forall (t :: * -> *) m a.
-(Foldable t, Monoid m) =>
-(a -> m) -> t a -> m
-foldMap NonEmpty plane -> VertexForm plane
-forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
- Ord plane, Show plane, Show r) =>
-f plane -> VertexForm plane
-lowerEnvelopeVertexForm NonEmpty (NonEmpty plane)
-superCells'
-                   -- we recursively compute the lower envelope (in vertex form)
-                   -- for each supercell, and combine (= concatenate) their results.
-  where
-    -- | Computes an 1/r-net of the planes in hs
-    net :: NonEmpty plane
-net  = Int -> f plane -> NonEmpty plane
-forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
- Ord plane) =>
-Int -> f plane -> NonEmpty plane
-epsilonNet Int
-forall {a}. a
-r f plane
-hs
-    -- Compute the triangulated lower envelope of the net
-    env :: TriangulatedLowerEnvelope plane
-env = NonEmpty plane -> TriangulatedLowerEnvelope plane
-forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable f, Functor f,
- Ord plane, Show plane, Show r) =>
-f plane -> TriangulatedLowerEnvelope plane
-triangulatedLowerEnvelope NonEmpty plane
-net
-    -- We form supercells out of the triangles of the lower envelop
-    superCells :: NonEmpty (SuperCell plane)
-superCells  = Int
--> TriangulatedLowerEnvelope plane -> NonEmpty (SuperCell plane)
-forall plane.
-Int
--> TriangulatedLowerEnvelope plane -> NonEmpty (SuperCell plane)
-formSuperCells Int
-forall {a}. a
-s TriangulatedLowerEnvelope plane
-env
-    -- and for each supercell, compute its conflict list.
-    superCells' :: NonEmpty (NonEmpty plane)
-    superCells' :: NonEmpty (NonEmpty plane)
-superCells' = NonEmpty (NonEmpty plane)
-forall a. HasCallStack => a
-undefined
-
-    r :: a
-r = a
-forall a. HasCallStack => a
-undefined -- parameter for the 1/r net
-    s :: a
-s = a
-forall a. HasCallStack => a
-undefined -- parameter for the number of cells per super cell
-
-    conflictLists' :: Map (Vertex' plane) (f plane)
-conflictLists' = TriangulatedLowerEnvelope plane
--> f plane -> Map (Vertex' plane) (f plane)
-forall plane (f :: * -> *).
-TriangulatedLowerEnvelope plane
--> f plane -> Map (Vertex' plane) (f plane)
-computeConflictLists TriangulatedLowerEnvelope plane
-env f plane
-hs
-
-
-    -- conflictLists = undefined --- combineConlictLists
-
-
-
-
-    -- do ss            <- sample p hs
-    --                 (env, prisms) <- computePrisms hs ss
-    --                 subEnvs       <- mapM (over conflictList lowerEnvelope) prisms
-    --                 merge env subEnvs
-    n :: Int
-n = f plane -> Int
-forall a. f a -> Int
-forall (t :: * -> *) a. Foldable t => t a -> Int
-length f plane
-hs
-    -- s = n ^^^ (1-eps)
-    -- p = probability s n
-
-
-type TriangulatedLowerEnvelope plane = LowerEnvelope' plane
-
-triangulatedLowerEnvelope :: ( Plane_ plane r
-                             , Ord r, Fractional r, Foldable f, Functor f, Ord plane
-                             , Show plane, Show r
-                             ) => f plane -> TriangulatedLowerEnvelope plane
-triangulatedLowerEnvelope :: forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable f, Functor f,
- Ord plane, Show plane, Show r) =>
-f plane -> TriangulatedLowerEnvelope plane
-triangulatedLowerEnvelope = f plane -> TriangulatedLowerEnvelope plane
-forall a. HasCallStack => a
-undefined
-
-
-type SuperCell plane = SuperCell' (NumType plane) plane
-data SuperCell' r plane = SuperCell
-                          -- { boundary :: SimplePolygon (Point 2 r)
-                          -- , internalVertices :: [BoundedVertex plane]
-                          -- }
-
-
-
-formSuperCells :: Int -- ^ the number of triangles s in each super cell
-               -> TriangulatedLowerEnvelope plane
-               -> NonEmpty (SuperCell plane)
-formSuperCells :: forall plane.
-Int
--> TriangulatedLowerEnvelope plane -> NonEmpty (SuperCell plane)
-formSuperCells = Int
--> TriangulatedLowerEnvelope plane
--> NonEmpty (SuperCell' (NumType plane) plane)
-forall a. HasCallStack => a
-undefined
-
-
--- newtype VerticesWithConflictLists
-
-newtype Vertex' plane = Vertex' (Point 3 (NumType plane))
-
-
-computeConflictLists :: TriangulatedLowerEnvelope plane
-                     -> f plane
-                     -> Map.Map (Vertex' plane) (f plane)
-computeConflictLists :: forall plane (f :: * -> *).
-TriangulatedLowerEnvelope plane
--> f plane -> Map (Vertex' plane) (f plane)
-computeConflictLists = TriangulatedLowerEnvelope plane
--> f plane -> Map (Vertex' plane) (f plane)
-forall a. HasCallStack => a
-undefined
-
-
-mergeConflictLists :: Map.Map (Vertex' plane) (f plane)
-mergeConflictLists :: forall plane (f :: * -> *). Map (Vertex' plane) (f plane)
-mergeConflictLists = Map (Vertex' plane) (f plane)
-forall a. HasCallStack => a
-undefined
-
-
-
-
-
-
-
-
---------------------------------------------------------------------------------
-
-data LevelInfo v = Level { forall v. LevelInfo v -> Int
-levelIndex  :: {-# UNPACK #-}!Int
-                         , forall v. LevelInfo v -> Int
-levelSize   :: {-# UNPACK #-}!Int
-                         -- ^ size of this level
-                         , forall v. LevelInfo v -> Int
-acccumSize :: {-# UNPACK #-}!Int
-                         -- ^ size of the prefix up to this level
-                         , forall v. LevelInfo v -> [v]
-levelVertices :: [v]
-                         }
-                 deriving (Int -> LevelInfo v -> ShowS
-[LevelInfo v] -> ShowS
-LevelInfo v -> String
-(Int -> LevelInfo v -> ShowS)
--> (LevelInfo v -> String)
--> ([LevelInfo v] -> ShowS)
--> Show (LevelInfo v)
-forall v. Show v => Int -> LevelInfo v -> ShowS
-forall v. Show v => [LevelInfo v] -> ShowS
-forall v. Show v => LevelInfo v -> String
-forall a.
-(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
-$cshowsPrec :: forall v. Show v => Int -> LevelInfo v -> ShowS
-showsPrec :: Int -> LevelInfo v -> ShowS
-$cshow :: forall v. Show v => LevelInfo v -> String
-show :: LevelInfo v -> String
-$cshowList :: forall v. Show v => [LevelInfo v] -> ShowS
-showList :: [LevelInfo v] -> ShowS
-Show,LevelInfo v -> LevelInfo v -> Bool
-(LevelInfo v -> LevelInfo v -> Bool)
--> (LevelInfo v -> LevelInfo v -> Bool) -> Eq (LevelInfo v)
-forall v. Eq v => LevelInfo v -> LevelInfo v -> Bool
-forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
-$c== :: forall v. Eq v => LevelInfo v -> LevelInfo v -> Bool
-== :: LevelInfo v -> LevelInfo v -> Bool
-$c/= :: forall v. Eq v => LevelInfo v -> LevelInfo v -> Bool
-/= :: LevelInfo v -> LevelInfo v -> Bool
-Eq,(forall m. Monoid m => LevelInfo m -> m)
--> (forall m a. Monoid m => (a -> m) -> LevelInfo a -> m)
--> (forall m a. Monoid m => (a -> m) -> LevelInfo a -> m)
--> (forall a b. (a -> b -> b) -> b -> LevelInfo a -> b)
--> (forall a b. (a -> b -> b) -> b -> LevelInfo a -> b)
--> (forall b a. (b -> a -> b) -> b -> LevelInfo a -> b)
--> (forall b a. (b -> a -> b) -> b -> LevelInfo a -> b)
--> (forall a. (a -> a -> a) -> LevelInfo a -> a)
--> (forall a. (a -> a -> a) -> LevelInfo a -> a)
--> (forall v. LevelInfo v -> [v])
--> (forall a. LevelInfo a -> Bool)
--> (forall v. LevelInfo v -> Int)
--> (forall a. Eq a => a -> LevelInfo a -> Bool)
--> (forall a. Ord a => LevelInfo a -> a)
--> (forall a. Ord a => LevelInfo a -> a)
--> (forall a. Num a => LevelInfo a -> a)
--> (forall a. Num a => LevelInfo a -> a)
--> Foldable LevelInfo
-forall a. Eq a => a -> LevelInfo a -> Bool
-forall a. Num a => LevelInfo a -> a
-forall a. Ord a => LevelInfo a -> a
-forall m. Monoid m => LevelInfo m -> m
-forall a. LevelInfo a -> Bool
-forall v. LevelInfo v -> Int
-forall v. LevelInfo v -> [v]
-forall a. (a -> a -> a) -> LevelInfo a -> a
-forall m a. Monoid m => (a -> m) -> LevelInfo a -> m
-forall b a. (b -> a -> b) -> b -> LevelInfo a -> b
-forall a b. (a -> b -> b) -> b -> LevelInfo a -> b
-forall (t :: * -> *).
-(forall m. Monoid m => t m -> m)
--> (forall m a. Monoid m => (a -> m) -> t a -> m)
--> (forall m a. Monoid m => (a -> m) -> t a -> m)
--> (forall a b. (a -> b -> b) -> b -> t a -> b)
--> (forall a b. (a -> b -> b) -> b -> t a -> b)
--> (forall b a. (b -> a -> b) -> b -> t a -> b)
--> (forall b a. (b -> a -> b) -> b -> t a -> b)
--> (forall a. (a -> a -> a) -> t a -> a)
--> (forall a. (a -> a -> a) -> t a -> a)
--> (forall a. t a -> [a])
--> (forall a. t a -> Bool)
--> (forall a. t a -> Int)
--> (forall a. Eq a => a -> t a -> Bool)
--> (forall a. Ord a => t a -> a)
--> (forall a. Ord a => t a -> a)
--> (forall a. Num a => t a -> a)
--> (forall a. Num a => t a -> a)
--> Foldable t
-$cfold :: forall m. Monoid m => LevelInfo m -> m
-fold :: forall m. Monoid m => LevelInfo m -> m
-$cfoldMap :: forall m a. Monoid m => (a -> m) -> LevelInfo a -> m
-foldMap :: forall m a. Monoid m => (a -> m) -> LevelInfo a -> m
-$cfoldMap' :: forall m a. Monoid m => (a -> m) -> LevelInfo a -> m
-foldMap' :: forall m a. Monoid m => (a -> m) -> LevelInfo a -> m
-$cfoldr :: forall a b. (a -> b -> b) -> b -> LevelInfo a -> b
-foldr :: forall a b. (a -> b -> b) -> b -> LevelInfo a -> b
-$cfoldr' :: forall a b. (a -> b -> b) -> b -> LevelInfo a -> b
-foldr' :: forall a b. (a -> b -> b) -> b -> LevelInfo a -> b
-$cfoldl :: forall b a. (b -> a -> b) -> b -> LevelInfo a -> b
-foldl :: forall b a. (b -> a -> b) -> b -> LevelInfo a -> b
-$cfoldl' :: forall b a. (b -> a -> b) -> b -> LevelInfo a -> b
-foldl' :: forall b a. (b -> a -> b) -> b -> LevelInfo a -> b
-$cfoldr1 :: forall a. (a -> a -> a) -> LevelInfo a -> a
-foldr1 :: forall a. (a -> a -> a) -> LevelInfo a -> a
-$cfoldl1 :: forall a. (a -> a -> a) -> LevelInfo a -> a
-foldl1 :: forall a. (a -> a -> a) -> LevelInfo a -> a
-$ctoList :: forall v. LevelInfo v -> [v]
-toList :: forall v. LevelInfo v -> [v]
-$cnull :: forall a. LevelInfo a -> Bool
-null :: forall a. LevelInfo a -> Bool
-$clength :: forall v. LevelInfo v -> Int
-length :: forall v. LevelInfo v -> Int
-$celem :: forall a. Eq a => a -> LevelInfo a -> Bool
-elem :: forall a. Eq a => a -> LevelInfo a -> Bool
-$cmaximum :: forall a. Ord a => LevelInfo a -> a
-maximum :: forall a. Ord a => LevelInfo a -> a
-$cminimum :: forall a. Ord a => LevelInfo a -> a
-minimum :: forall a. Ord a => LevelInfo a -> a
-$csum :: forall a. Num a => LevelInfo a -> a
-sum :: forall a. Num a => LevelInfo a -> a
-$cproduct :: forall a. Num a => LevelInfo a -> a
-product :: forall a. Num a => LevelInfo a -> a
-Foldable)
-
-{-
--- | Returns a pair (separator, Vector2 verticesSubGraphA verticesSubGraphB)
--- so that
---
--- 1) there are no edges connecting subGraph A and subgraph B,
--- 2) the size of the separator is at most sqrt(n).
--- 3) the vertex sets of A and B have weight at most 2/3 the total weight
-planarSeparator    :: PlanarGraph_ planarGraph
-                   => planarGraph
-                   -> ([VertexIx planarGraph], Vector 2 [VertexIx planarGraph])
-planarSeparator gr = case List.break (\lvl -> accumSize lvl < half) lvls of
-    (pref, [])           -> ([], gr^..vertices.asIndex, [])
-                            -- somehow we have too little weight;
-    (pref, suff@(l1 : _) ->
-         let k   = accumSize l1
-             ls0 = List.takeWhile (\lvl ->
-                                      levelSize lvl + 2*(levelIndex l1 - levelIndex lvl)                                                   <= 2 * sqrt' k) pref
-              ls2 = undefined
-         in (sep, Vector2 verticesA verticesB)
-  where
-    sep       = undefined
-    verticesA = undefined
-    verticesB = undefined
-
-    v0   = gr^.vertices.head1
-    tr   = bfs gr v0
-
-    lZero = 0
-
-    -- compute the levels, their sizes, and the sum of their sizes
-    (_, lvls) = List.mapAccumL (\(Vector2 i acc) lvl ->
-                                   let m    = length lvl
-                                       acc' = acc + m
-                                   in ( Vector2 (i+1) acc', Level i m acc' lvl)
-                               ) (Vector2 0 0) $ levels tr
-
-    half = n `div` 2
-    n = numVertices gr
-
--}
-
-
-
-
--- if the input graph is connected, are subgraph A and SubGraphB then connected?
--- I don't think so; in particular; the "outer layers", so Graph B may be disconnected I guess.
-
-
--- data Separators planarGraph =
-
-
--- planarSeparators :: PlanarGraph_ planarGraph
---                  => planarGraph -> Tree
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.EpsApproximation.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.EpsApproximation.html deleted file mode 100644 index bc8a94327..000000000 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.EpsApproximation.html +++ /dev/null @@ -1,102 +0,0 @@ -
module HGeometry.Plane.LowerEnvelope.EpsApproximation
-  ( epsilonNet
-  ) where
-
--- import           Control.Monad.State.Class
-import           Data.Foldable1
-import           Data.List.NonEmpty (NonEmpty(..))
-import qualified Data.List.NonEmpty as NonEmpty
--- import           HGeometry.HyperPlane.Class
-import           HGeometry.HyperPlane.NonVertical
--- import           System.Random.Stateful
--- import           Witherable
-
---------------------------------------------------------------------------------
-
--- | Given a value r, and a set of planes H, we construct a 1/r-net A of H w.r.t
--- the shallow downward ranges.
-epsilonNet    :: ( Plane_ plane r
-                 , Ord r, Fractional r, Foldable1 f, Functor f, Ord plane
-                 )
-              => Int -- ^ the parameter r
-             -> f plane -> NonEmpty plane
-epsilonNet :: forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
- Ord plane) =>
-Int -> f plane -> NonEmpty plane
-epsilonNet Int
-r = [plane] -> NonEmpty plane
-forall a. HasCallStack => [a] -> NonEmpty a
-NonEmpty.fromList ([plane] -> NonEmpty plane)
--> (f plane -> [plane]) -> f plane -> NonEmpty plane
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. Int -> NonEmpty plane -> [plane]
-forall a. Int -> NonEmpty a -> [a]
-NonEmpty.take Int
-size (NonEmpty plane -> [plane])
--> (f plane -> NonEmpty plane) -> f plane -> [plane]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. f plane -> NonEmpty plane
-forall a. f a -> NonEmpty a
-forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a
-toNonEmpty
-  where
-    size :: Int
-size = Int
-r Int -> Int -> Int
-forall a. Num a => a -> a -> a
-* Int -> Int
-lg Int
-r
-  -- FIXME: this currently does not really construct not eps net
-
--- | Compute something like log base 2 (this is a bit silly)
-lg   :: Int -> Int
-lg :: Int -> Int
-lg Int
-n = case Int
-n Int -> Int -> Ordering
-forall a. Ord a => a -> a -> Ordering
-`compare` Int
-2 of
-         Ordering
-LT -> Int
-0
-         Ordering
-EQ -> Int
-1
-         Ordering
-GT -> Int
-1 Int -> Int -> Int
-forall a. Num a => a -> a -> a
-+ Int -> Int
-lg (Int
-n Int -> Int -> Int
-forall a. Integral a => a -> a -> a
-`div` Int
-2)
-
-{-
-
--- | Given a value r, and a set of planes H, we construct a 1/r-approximation A of H w.r.t
--- the shallow downward ranges.
-epsApproximation :: ( Plane_ plane r
-                    , Ord r, Fractional r, Foldable f, Functor f, Ord plane
-                    )
-                 => Int -- ^ the parameter r
-                 -> f plane -> f plane
-epsApproximation = undefined
-
--- | Given a value r, and a set of planes H, we construct a 1/r-approximation A of H w.r.t
--- the shallow downward ranges.
-epsApproximation'      :: ( Plane_ plane r
-                          , Ord r, Fractional r, Foldable f, Functor f, Ord plane
-                          , RandomGen gen, MonadState gen m
-                          , Show plane, Show r
-                          )
-                       => Int -- ^ the parameter r
-                       -> f plane -> m (f plane)
-epsApproximation' r hs = undefined
-
--}
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Naive.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Naive.html index 696d9ca7b..d99797c50 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Naive.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Naive.html @@ -1,220 +1,545 @@
{-# LANGUAGE UndecidableInstances #-}
 module HGeometry.Plane.LowerEnvelope.Naive
   ( lowerEnvelope
-  , lowerEnvelopeVertexForm
-  -- , triangulatedLowerEnvelope
+  , lowerEnvelopeWith
+  ) where
 
-  , asVertex
-  , belowAll
-  ) where
-
---------------------------------------------------------------------------------
-
-import           Control.Monad (guard)
-import           Data.Foldable1
-import qualified Data.Set as Set
-import           HGeometry.Combinatorial.Util
-import           HGeometry.HyperPlane.Class
-import           HGeometry.HyperPlane.NonVertical
-import           HGeometry.Plane.LowerEnvelope.AdjListForm (LowerEnvelope, fromVertexForm)
-import           HGeometry.Plane.LowerEnvelope.VertexForm
-import           HGeometry.Point
-
---------------------------------------------------------------------------------
-
--- | Brute force implementation that computes the lower envelope, by explicitly
--- considering every triple of planes.
---
--- pre: the input forms a *set* of planes, i.e. no duplicates
---
+--------------------------------------------------------------------------------
+
+import           Control.Lens
+import           Data.Either (partitionEithers)
+import           Data.Foldable1
+import qualified Data.List as List
+import           Data.List.NonEmpty (NonEmpty(..))
+import           Data.Maybe
+import           HGeometry.Ext
+import           HGeometry.HyperPlane.Class
+import           HGeometry.HyperPlane.NonVertical
+import           HGeometry.Line
+import           HGeometry.Line.General
+import qualified HGeometry.Line.LowerEnvelope as Line
+import           HGeometry.Plane.LowerEnvelope.Connected
+import           HGeometry.Plane.LowerEnvelope.Type
+import           HGeometry.Point
+import           HGeometry.Sequence.Alternating (firstWithNeighbors)
+import           HGeometry.Vector
+--------------------------------------------------------------------------------
+
+-- | Brute force implementation that computes the lower envelope, by explicitly
+-- considering every triple of planes.
 --
--- running time: \(O(n^4 )\)
-lowerEnvelope    :: ( Plane_ plane r
-                    , Ord r, Fractional r, Foldable1 f, Functor f, Ord plane
-                    , Show plane, Show r
-                    ) => f plane -> LowerEnvelope plane
-lowerEnvelope :: forall plane r (f :: * -> *).
+-- pre: the input forms a *set* of planes, i.e. no duplicates
+--
+--
+-- running time: \(O(n^4 )\)
+lowerEnvelope :: ( Plane_ plane r
+                 , Ord r, Fractional r, Foldable1 f, Functor f, Ord plane
+                 , Show plane, Show r
+                 ) => f plane -> LowerEnvelope plane
+lowerEnvelope :: forall plane r (f :: * -> *).
 (Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f,
  Ord plane, Show plane, Show r) =>
 f plane -> LowerEnvelope plane
-lowerEnvelope f plane
-hs = f plane -> VertexForm plane -> LowerEnvelope plane
-forall (f :: * -> *) plane r.
-(Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane,
- Show r, Foldable1 f) =>
-f plane -> VertexForm plane -> LowerEnvelope plane
-fromVertexForm f plane
-hs (VertexForm plane -> LowerEnvelope plane)
--> VertexForm plane -> LowerEnvelope plane
-forall a b. (a -> b) -> a -> b
-$ f plane -> VertexForm plane
-forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable f, Ord plane) =>
-f plane -> VertexForm plane
-lowerEnvelopeVertexForm f plane
-hs
-
---------------------------------------------------------------------------------
-
+lowerEnvelope = (NonEmpty plane -> MinimizationDiagram r plane)
+-> f plane -> LowerEnvelope plane
+forall (nonEmpty :: * -> *) plane r.
+(Plane_ plane r, Ord r, Fractional r, Foldable1 nonEmpty) =>
+(NonEmpty plane -> MinimizationDiagram r plane)
+-> nonEmpty plane -> LowerEnvelope plane
+lowerEnvelopeWith NonEmpty plane -> MinimizationDiagram r plane
+forall plane r (set :: * -> *).
+(Plane_ plane r, Ord plane, Ord r, Fractional r, Foldable set) =>
+set plane -> MinimizationDiagram r plane
+bruteForceLowerEnvelope
 
 --------------------------------------------------------------------------------
--- * Computing a lower envelope in vertex form
-
--- | Brute force implementation that computes the vertex form of the
--- lower envelope, by explicitly considering every triple of planes.
---
--- pre: the input forms a *set* of planes, i.e. no duplicates
---
---
--- general position assumptions: None. Though keep in mind that
--- e.g. if all planes are parallel there are no vertices.
---
---
---
--- running time: \(O(n^4 )\)
-lowerEnvelopeVertexForm    :: ( Plane_ plane r
-                              , Ord r, Fractional r, Foldable f, Ord plane
-                              ) => f plane -> VertexForm plane
-lowerEnvelopeVertexForm :: forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Fractional r, Foldable f, Ord plane) =>
-f plane -> VertexForm plane
-lowerEnvelopeVertexForm f plane
-hs = (Three plane -> VertexForm plane)
--> [Three plane] -> VertexForm plane
-forall m a. Monoid m => (a -> m) -> [a] -> m
-forall (t :: * -> *) m a.
-(Foldable t, Monoid m) =>
-(a -> m) -> t a -> m
-foldMap (VertexForm plane
--> (LEVertex plane -> VertexForm plane)
--> Maybe (LEVertex plane)
--> VertexForm plane
-forall b a. b -> (a -> b) -> Maybe a -> b
-maybe VertexForm plane
-forall a. Monoid a => a
-mempty LEVertex plane -> VertexForm plane
-forall plane. LEVertex plane -> VertexForm plane
-singleton (Maybe (LEVertex plane) -> VertexForm plane)
--> (Three plane -> Maybe (LEVertex plane))
--> Three plane
--> VertexForm plane
+
+-- | Computes the lower envelope of the planes; possibly using the given function to
+-- construct the minimization diagram.
+--
+-- In particular, we distinguish whether the planes define a connected lower envelope
+-- (in that case, we actually call the algorithm on it). Or that the planes are degenerate
+-- and are all parallel and thus define parallel strips. In that case, we use a two dimensional
+-- lower envelope algorithm to compute the lower envelope of the (parallel) planes.
+--
+-- \(O(T(n) + n \log n)\).
+lowerEnvelopeWith                        :: forall nonEmpty plane r.
+                                            ( Plane_ plane r
+                                            , Ord r, Fractional r, Foldable1 nonEmpty
+                                          )
+                                         => (NonEmpty plane -> MinimizationDiagram r plane)
+                                         -> nonEmpty plane -> LowerEnvelope plane
+lowerEnvelopeWith :: forall (nonEmpty :: * -> *) plane r.
+(Plane_ plane r, Ord r, Fractional r, Foldable1 nonEmpty) =>
+(NonEmpty plane -> MinimizationDiagram r plane)
+-> nonEmpty plane -> LowerEnvelope plane
+lowerEnvelopeWith NonEmpty plane -> MinimizationDiagram r plane
+minimizationDiagram nonEmpty plane
+hs = case NonEmpty plane
+-> Either (NonEmpty (LineEQ r :+ plane)) (Vector 3 plane, [plane])
+forall plane r.
+(Plane_ plane r, Eq r, Fractional r) =>
+NonEmpty plane
+-> Either (NonEmpty (LineEQ r :+ plane)) (Vector 3 plane, [plane])
+distinguish (nonEmpty plane -> NonEmpty plane
+forall a. nonEmpty a -> NonEmpty a
+forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a
+toNonEmpty nonEmpty plane
+hs) of
+    Left NonEmpty (LineEQ r :+ plane)
+lines'                   -> Alternating Vector (VerticalOrLineEQ r) plane
+-> LowerEnvelope plane
+Alternating Vector (VerticalOrLineEQ (NumType plane)) plane
+-> LowerEnvelope plane
+forall plane.
+Alternating Vector (VerticalOrLineEQ (NumType plane)) plane
+-> LowerEnvelope plane
+ParallelStrips (Alternating Vector (VerticalOrLineEQ r) plane
+ -> LowerEnvelope plane)
+-> (NonEmpty (LineEQ r :+ plane)
+    -> Alternating Vector (VerticalOrLineEQ r) plane)
+-> NonEmpty (LineEQ r :+ plane)
+-> LowerEnvelope plane
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. NonEmpty (LineEQ r :+ plane)
+-> Alternating Vector (VerticalOrLineEQ r) plane
+fromLines (NonEmpty (LineEQ r :+ plane) -> LowerEnvelope plane)
+-> NonEmpty (LineEQ r :+ plane) -> LowerEnvelope plane
+forall a b. (a -> b) -> a -> b
+$ NonEmpty (LineEQ r :+ plane)
+lines'
+    Right (Vector3 plane
+h1 plane
+h2 plane
+h3, [plane]
+hs') -> MinimizationDiagram (NumType plane) plane -> LowerEnvelope plane
+forall plane.
+MinimizationDiagram (NumType plane) plane -> LowerEnvelope plane
+ConnectedEnvelope (MinimizationDiagram (NumType plane) plane -> LowerEnvelope plane)
+-> MinimizationDiagram (NumType plane) plane -> LowerEnvelope plane
+forall a b. (a -> b) -> a -> b
+$ NonEmpty plane -> MinimizationDiagram r plane
+minimizationDiagram (plane
+h1 plane -> [plane] -> NonEmpty plane
+forall a. a -> [a] -> NonEmpty a
+:| plane
+h2 plane -> [plane] -> [plane]
+forall a. a -> [a] -> [a]
+: plane
+h3 plane -> [plane] -> [plane]
+forall a. a -> [a] -> [a]
+: [plane]
+hs')
+  where
+    fromLines :: NonEmpty (LineEQ r :+ plane)
+-> Alternating Vector (VerticalOrLineEQ r) plane
+fromLines = (plane -> Point 2 r -> plane -> VerticalOrLineEQ r)
+-> Alternating Vector (Point 2 r) plane
+-> Alternating Vector (VerticalOrLineEQ r) plane
+forall (f :: * -> *) a sep sep'.
+Traversable f =>
+(a -> sep -> a -> sep')
+-> Alternating f sep a -> Alternating f sep' a
+firstWithNeighbors (\plane
+h Point 2 r
+_ plane
+h' -> VerticalOrLineEQ r
+-> Maybe (VerticalOrLineEQ r) -> VerticalOrLineEQ r
+forall a. a -> Maybe a -> a
+fromMaybe VerticalOrLineEQ r
+forall {a}. a
+err (Maybe (VerticalOrLineEQ r) -> VerticalOrLineEQ r)
+-> Maybe (VerticalOrLineEQ r) -> VerticalOrLineEQ r
+forall a b. (a -> b) -> a -> b
+$ plane -> plane -> Maybe (VerticalOrLineEQ r)
+forall plane r.
+(Plane_ plane r, Fractional r, Eq r) =>
+plane -> plane -> Maybe (VerticalOrLineEQ r)
+intersectionLine plane
+h plane
+h')
+              (Alternating Vector (Point 2 r) plane
+ -> Alternating Vector (VerticalOrLineEQ r) plane)
+-> (NonEmpty (LineEQ r :+ plane)
+    -> Alternating Vector (Point 2 r) plane)
+-> NonEmpty (LineEQ r :+ plane)
+-> Alternating Vector (VerticalOrLineEQ r) plane
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. ((LineEQ r :+ plane) -> plane)
+-> Alternating Vector (Point 2 r) (LineEQ r :+ plane)
+-> Alternating Vector (Point 2 r) plane
+forall a b.
+(a -> b)
+-> Alternating Vector (Point 2 r) a
+-> Alternating Vector (Point 2 r) b
+forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
+fmap (Getting plane (LineEQ r :+ plane) plane
+-> (LineEQ r :+ plane) -> plane
+forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a
+view Getting plane (LineEQ r :+ plane) plane
+forall core extra extra' (f :: * -> *).
+Functor f =>
+(extra -> f extra') -> (core :+ extra) -> f (core :+ extra')
+extra) (Alternating Vector (Point 2 r) (LineEQ r :+ plane)
+ -> Alternating Vector (Point 2 r) plane)
+-> (NonEmpty (LineEQ r :+ plane)
+    -> Alternating Vector (Point 2 r) (LineEQ r :+ plane))
+-> NonEmpty (LineEQ r :+ plane)
+-> Alternating Vector (Point 2 r) plane
 forall b c a. (b -> c) -> (a -> b) -> a -> c
-. f plane -> Three plane -> Maybe (LEVertex plane)
-forall plane r (f :: * -> *).
-(Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) =>
-f plane -> Three plane -> Maybe (LEVertex plane)
-asVertex f plane
-hs) ([Three plane] -> VertexForm plane)
--> [Three plane] -> VertexForm plane
+. Getting
+  (Alternating Vector (Point 2 r) (LineEQ r :+ plane))
+  (LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane))
+  (Alternating Vector (Point 2 r) (LineEQ r :+ plane))
+-> LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane)
+-> Alternating Vector (Point 2 r) (LineEQ r :+ plane)
+forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a
+view Getting
+  (Alternating Vector (Point 2 r) (LineEQ r :+ plane))
+  (LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane))
+  (Alternating Vector (Point 2 r) (LineEQ r :+ plane))
+forall (f1 :: * -> *) vertex line (f' :: * -> *) vertex' line'
+       (p :: * -> * -> *) (f2 :: * -> *).
+(Profunctor p, Functor f2) =>
+p (Alternating f1 vertex line) (f2 (Alternating f' vertex' line'))
+-> p (LowerEnvelopeF f1 vertex line)
+     (f2 (LowerEnvelopeF f' vertex' line'))
+Line._Alternating
+              (LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane)
+ -> Alternating Vector (Point 2 r) (LineEQ r :+ plane))
+-> (NonEmpty (LineEQ r :+ plane)
+    -> LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane))
+-> NonEmpty (LineEQ r :+ plane)
+-> Alternating Vector (Point 2 r) (LineEQ r :+ plane)
+forall b c a. (b -> c) -> (a -> b) -> a -> c
+. NonEmpty (LineEQ r :+ plane)
+-> LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane)
+lowerEnvelope'
+    err :: a
+err = [Char] -> a
+forall a. HasCallStack => [Char] -> a
+error [Char]
+"lowerEnvelopeWith. absurd: neighbouring planes must intersect"
+
+    lowerEnvelope' :: NonEmpty (LineEQ r :+ plane)
+                   -> Line.LowerEnvelope (Point 2 r) (LineEQ r :+ plane)
+    lowerEnvelope' :: NonEmpty (LineEQ r :+ plane)
+-> LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane)
+lowerEnvelope' = NonEmpty (LineEQ r :+ plane)
+-> LowerEnvelopeF Vector (Point 2 r) (LineEQ r :+ plane)
+forall (g :: * -> *) (f :: * -> *) line r.
+(NonVerticalHyperPlane_ line 2 r, Fractional r, Ord r, Foldable1 f,
+ Functor f, IsIntersectableWith line line,
+ Intersection line line ~ Maybe (LineLineIntersection line),
+ HasFromFoldable g) =>
+f line -> LowerEnvelopeF g (Point 2 r) line
+Line.lowerEnvelope
+    -- for whatever reason GHC 9.8 does not want to compile this without the type signature
+    -- things are fine with 9.10 though; so maybe at some point we an just inline this.
+
+-- | We distinguish whether the planes are all parallel (left), and thus actually just
+-- define a 2D lower envelope of lines, or that the planes actually have a connected lower
+-- envelope. In that case, we return three planes that certify that the lower envelope
+-- will be connected, as well as the rest of the planes.
+--
+-- (Note that those three planes that we return do not necesarily define a vertex of the
+-- envelope).
+--
+-- running time: \(O(n)\)
+distinguish                :: ( Plane_ plane r, Eq r, Fractional r
+                              )
+                           => NonEmpty plane -> Either (NonEmpty (LineEQ r :+ plane))
+                                                       (Vector 3 plane, [plane])
+distinguish :: forall plane r.
+(Plane_ plane r, Eq r, Fractional r) =>
+NonEmpty plane
+-> Either (NonEmpty (LineEQ r :+ plane)) (Vector 3 plane, [plane])
+distinguish hs :: NonEmpty plane
+hs@(plane
+h :| [plane]
+rest) = case [Maybe (VerticalOrLineEQ r) :+ plane]
+-> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane])
+forall r plane.
+(Eq r, Num r) =>
+[Maybe (VerticalOrLineEQ r) :+ plane]
+-> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane])
+findDifferent [Maybe (VerticalOrLineEQ r) :+ plane]
+lines' of
+    Left VerticalOrLineEQ r
+baseLine                -> NonEmpty (LineEQ r :+ plane)
+-> Either (NonEmpty (LineEQ r :+ plane)) (Vector 3 plane, [plane])
+forall a b. a -> Either a b
+Left (NonEmpty (LineEQ r :+ plane)
+ -> Either (NonEmpty (LineEQ r :+ plane)) (Vector 3 plane, [plane]))
+-> NonEmpty (LineEQ r :+ plane)
+-> Either (NonEmpty (LineEQ r :+ plane)) (Vector 3 plane, [plane])
 forall a b. (a -> b) -> a -> b
-$ f plane -> [Three plane]
-forall (f :: * -> *) a. Foldable f => f a -> [Three a]
-uniqueTriplets f plane
-hs
-
--- | Given all planes, and a triple, computes if the triple defines a
--- vertex of the lower envelope, and if so returns it.
-asVertex                       :: (Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r)
-                               => f plane -> Three plane -> Maybe (LEVertex plane)
-asVertex :: forall plane r (f :: * -> *).
-(Plane_ plane r, Foldable f, Ord plane, Ord r, Fractional r) =>
-f plane -> Three plane -> Maybe (LEVertex plane)
-asVertex f plane
-hs t :: Three plane
-t@(Three plane
-h1 plane
-h2 plane
-h3) = do Point 3 r
-v <- Three plane -> Maybe (Point 3 r)
+$ (plane -> LineEQ r :+ plane)
+-> NonEmpty plane -> NonEmpty (LineEQ r :+ plane)
+forall a b. (a -> b) -> NonEmpty a -> NonEmpty b
+forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
+fmap ((plane -> VerticalOrLineEQ r -> LineEQ r :+ plane)
+-> VerticalOrLineEQ r -> plane -> LineEQ r :+ plane
+forall a b c. (a -> b -> c) -> b -> a -> c
+flip plane -> VerticalOrLineEQ r -> LineEQ r :+ plane
+forall plane r.
+(Plane_ plane r, Num r) =>
+plane -> VerticalOrLineEQ r -> LineEQ r :+ plane
+asLine VerticalOrLineEQ r
+baseLine) NonEmpty plane
+hs
+    Right (Vector2 plane
+h2 plane
+h3, [plane]
+rest') -> (Vector 3 plane, [plane])
+-> Either (NonEmpty (LineEQ r :+ plane)) (Vector 3 plane, [plane])
+forall a b. b -> Either a b
+Right (plane -> plane -> plane -> Vector 3 plane
+forall r. r -> r -> r -> Vector 3 r
+Vector3 plane
+h plane
+h2 plane
+h3, [plane]
+rest')
+
+  where
+    lines' :: [Maybe (VerticalOrLineEQ r) :+ plane]
+lines' = (plane -> Maybe (VerticalOrLineEQ r) :+ plane)
+-> [plane] -> [Maybe (VerticalOrLineEQ r) :+ plane]
+forall a b. (a -> b) -> [a] -> [b]
+map (\plane
+h' -> (VerticalOrLineEQ r -> VerticalOrLineEQ r
+forall r.
+(Fractional r, Eq r) =>
+VerticalOrLineEQ r -> VerticalOrLineEQ r
+perpendicularTo' (VerticalOrLineEQ r -> VerticalOrLineEQ r)
+-> Maybe (VerticalOrLineEQ r) -> Maybe (VerticalOrLineEQ r)
+forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
+<$> plane -> plane -> Maybe (VerticalOrLineEQ r)
 forall plane r.
-(Plane_ plane r, Ord r, Fractional r) =>
-Three plane -> Maybe (Point 3 r)
-intersectionPoint Three plane
-t
-                                    Bool -> Maybe ()
-forall (f :: * -> *). Alternative f => Bool -> f ()
-guard (Point 3 r
-v Point 3 r -> f plane -> Bool
-forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Num r, Foldable f) =>
-Point 3 r -> f plane -> Bool
-`belowAll` f plane
-hs)
-                                    LEVertex plane -> Maybe (LEVertex plane)
-forall a. a -> Maybe a
-forall (f :: * -> *) a. Applicative f => a -> f a
-pure (LEVertex plane -> Maybe (LEVertex plane))
--> LEVertex plane -> Maybe (LEVertex plane)
+(Plane_ plane r, Fractional r, Eq r) =>
+plane -> plane -> Maybe (VerticalOrLineEQ r)
+intersectionLine plane
+h plane
+h') Maybe (VerticalOrLineEQ r)
+-> plane -> Maybe (VerticalOrLineEQ r) :+ plane
+forall core extra. core -> extra -> core :+ extra
+:+ plane
+h') [plane]
+rest
+    -- for each plane, compute (the downward projection of) its line of intersection with
+    -- with h. We actually all rotate these lines by 90 degrees.
+    --
+    -- if these lines are all parallel, then our input was degenerate. We pick one of
+    -- those lines baseLine, and compute the intersection of the plane h with the vertical
+    -- wall through this
+
+perpendicularTo' :: (Fractional r, Eq r) => VerticalOrLineEQ r -> VerticalOrLineEQ r
+perpendicularTo' :: forall r.
+(Fractional r, Eq r) =>
+VerticalOrLineEQ r -> VerticalOrLineEQ r
+perpendicularTo' = \case
+  VerticalLineThrough r
+x    -> LineEQ r -> VerticalOrLineEQ r
+forall r. LineEQ r -> VerticalOrLineEQ r
+NonVertical (LineEQ r -> VerticalOrLineEQ r) -> LineEQ r -> VerticalOrLineEQ r
 forall a b. (a -> b) -> a -> b
-$ Point 3 (NumType plane) -> Definers plane -> LEVertex plane
-forall plane.
-Point 3 (NumType plane) -> Definers plane -> LEVertex plane
-LEVertex Point 3 r
-Point 3 (NumType plane)
-v ([plane] -> Definers plane
-forall a. Ord a => [a] -> Set a
-Set.fromList [plane
-h1,plane
-h2,plane
-h3])
-
--- | test if v lies below (or on) all the planes in hs
-belowAll   :: (Plane_ plane r, Ord r, Num r, Foldable f) => Point 3 r -> f plane -> Bool
-belowAll :: forall plane r (f :: * -> *).
-(Plane_ plane r, Ord r, Num r, Foldable f) =>
-Point 3 r -> f plane -> Bool
-belowAll Point 3 r
-v = (plane -> Bool) -> f plane -> Bool
-forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
-all (\plane
-h -> Point 3 r -> plane -> Ordering
-forall point.
-(1 <= 3, Point_ point 3 r, Ord r, Num r) =>
-point -> plane -> Ordering
-forall hyperPlane (d :: Nat) r point.
-(NonVerticalHyperPlane_ hyperPlane d r, 1 <= d, Point_ point d r,
- Ord r, Num r) =>
-point -> hyperPlane -> Ordering
-verticalSideTest Point 3 r
-v plane
-h Ordering -> Ordering -> Bool
-forall a. Eq a => a -> a -> Bool
-/= Ordering
-GT)
-{-# INLINE belowAll #-}
-
-
-
-
-{-
-
-triangulatedLowerEnvelope    :: ( Plane_ plane r
-                                , Ord r, Fractional r, Foldable f
-                                ) => f plane -> LowerEnvelope plane
-triangulatedLowerEnvelope hs = undefined
-
--}
---------------------------------------------------------------------------------
-
-{-
-
--- TODO: attach the two defining halfplanes to the result
-
--- | Given two halfplanes h and h' computes the halfplane where h lies
--- vertically below h'.
-liesBelowIn                                :: (Plane_ plane r, Ord r, Fractional r)
-                                           => plane -> plane -> Maybe (HalfPlane r)
-liesBelowIn (Plane_ a b c) (Plane_ a' b' c') = case b `compare` b' of
-                                                 LT -> Just $ Above (LineEQ d e)
-                                                 GT -> Just $ Below (LineEQ d e)
-                                                 EQ -> case a `compare` a' of
-                                                         LT -> Just $ RightOf f
-                                                         GT -> Just $ LeftOf f
-                                                         EQ -> Nothing
-  where
-    d = (a-a') / (b - b')
-    e = (c-c') / (b - b')
-    f = (c-c') / (a - a')
-
--}
-
\ No newline at end of file +
$
r -> r -> LineEQ r +forall r. r -> r -> LineEQ r +LineEQ r +0 r +x + NonVertical (LineEQ r +0 r +b) -> r -> VerticalOrLineEQ r +forall r. r -> VerticalOrLineEQ r +VerticalLineThrough r +b + NonVertical (LineEQ r +a r +b) -> LineEQ r -> VerticalOrLineEQ r +forall r. LineEQ r -> VerticalOrLineEQ r +NonVertical (LineEQ r -> VerticalOrLineEQ r) -> LineEQ r -> VerticalOrLineEQ r +forall a b. (a -> b) -> a -> b +$ r -> r -> LineEQ r +forall r. r -> r -> LineEQ r +LineEQ (r +1r -> r -> r +forall a. Fractional a => a -> a -> a +/r +a) r +b + +-- | Given the planes tagged with their intersection line with some plane h0, returns +-- either a Left baseLine if all these lines are parallel, or two planes that have +-- non-paralel intersection lines (as well as the rest of the planes). +-- +-- the baseLine is one of the parallel lines (or vertical if there are no lines to begin with). +findDifferent :: (Eq r, Num r + ) + => [Maybe (VerticalOrLineEQ r) :+ plane] -> Either (VerticalOrLineEQ r) + (Vector 2 plane, [plane]) +findDifferent :: forall r plane. +(Eq r, Num r) => +[Maybe (VerticalOrLineEQ r) :+ plane] +-> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane]) +findDifferent [Maybe (VerticalOrLineEQ r) :+ plane] +xs = case [Either plane (VerticalOrLineEQ r :+ plane)] +-> ([plane], [VerticalOrLineEQ r :+ plane]) +forall a b. [Either a b] -> ([a], [b]) +partitionEithers ([Either plane (VerticalOrLineEQ r :+ plane)] + -> ([plane], [VerticalOrLineEQ r :+ plane])) +-> [Either plane (VerticalOrLineEQ r :+ plane)] +-> ([plane], [VerticalOrLineEQ r :+ plane]) +forall a b. (a -> b) -> a -> b +$ ((Maybe (VerticalOrLineEQ r) :+ plane) + -> Either plane (VerticalOrLineEQ r :+ plane)) +-> [Maybe (VerticalOrLineEQ r) :+ plane] +-> [Either plane (VerticalOrLineEQ r :+ plane)] +forall a b. (a -> b) -> [a] -> [b] +map (Maybe (VerticalOrLineEQ r) :+ plane) +-> Either plane (VerticalOrLineEQ r :+ plane) +forall {core} {extra}. +(Maybe core :+ extra) -> Either extra (core :+ extra) +distinguishParallel [Maybe (VerticalOrLineEQ r) :+ plane] +xs of + ([plane] +_,[]) -> VerticalOrLineEQ r +-> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane]) +forall a b. a -> Either a b +Left (VerticalOrLineEQ r + -> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane])) +-> VerticalOrLineEQ r +-> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane]) +forall a b. (a -> b) -> a -> b +$ r -> VerticalOrLineEQ r +forall r. r -> VerticalOrLineEQ r +VerticalLineThrough r +0 -- all planes happen to be paralell + ([plane] +pars0, (VerticalOrLineEQ r +l :+ plane +h) : [VerticalOrLineEQ r :+ plane] +rest) -> case ((VerticalOrLineEQ r :+ plane) -> Bool) +-> [VerticalOrLineEQ r :+ plane] +-> ([VerticalOrLineEQ r :+ plane], [VerticalOrLineEQ r :+ plane]) +forall a. (a -> Bool) -> [a] -> ([a], [a]) +List.span (VerticalOrLineEQ r -> (VerticalOrLineEQ r :+ plane) -> Bool +forall hyperPlane (d :: Nat) r hyperPlane'. +(HyperPlane_ hyperPlane d r, HyperPlane_ hyperPlane' d r, + Has_ Metric_ d r, Num r, Eq r, 1 <= d) => +hyperPlane -> hyperPlane' -> Bool +isParallelTo VerticalOrLineEQ r +l) [VerticalOrLineEQ r :+ plane] +rest of + ([VerticalOrLineEQ r :+ plane] +_,[]) -> VerticalOrLineEQ r +-> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane]) +forall a b. a -> Either a b +Left VerticalOrLineEQ r +l -- degnerate; planes are all parralel + ([VerticalOrLineEQ r :+ plane] +pars1, (VerticalOrLineEQ r +_ :+ plane +h') : [VerticalOrLineEQ r :+ plane] +rest') -> (Vector 2 plane, [plane]) +-> Either (VerticalOrLineEQ r) (Vector 2 plane, [plane]) +forall a b. b -> Either a b +Right ( plane -> plane -> Vector 2 plane +forall r. r -> r -> Vector 2 r +Vector2 plane +h plane +h' + , [plane] +pars0 [plane] -> [plane] -> [plane] +forall a. Semigroup a => a -> a -> a +<> ((VerticalOrLineEQ r :+ plane) -> plane) +-> [VerticalOrLineEQ r :+ plane] -> [plane] +forall a b. (a -> b) -> [a] -> [b] +map (Getting plane (VerticalOrLineEQ r :+ plane) plane +-> (VerticalOrLineEQ r :+ plane) -> plane +forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a +view Getting plane (VerticalOrLineEQ r :+ plane) plane +forall core extra extra' (f :: * -> *). +Functor f => +(extra -> f extra') -> (core :+ extra) -> f (core :+ extra') +extra) ([VerticalOrLineEQ r :+ plane] +pars1 [VerticalOrLineEQ r :+ plane] +-> [VerticalOrLineEQ r :+ plane] -> [VerticalOrLineEQ r :+ plane] +forall a. Semigroup a => a -> a -> a +<> [VerticalOrLineEQ r :+ plane] +rest') + ) + where + distinguishParallel :: (Maybe core :+ extra) -> Either extra (core :+ extra) +distinguishParallel (Maybe core +m :+ extra +h) = case Maybe core +m of + Maybe core +Nothing -> extra -> Either extra (core :+ extra) +forall a b. a -> Either a b +Left extra +h + Just core +l -> (core :+ extra) -> Either extra (core :+ extra) +forall a b. b -> Either a b +Right (core +l core -> extra -> core :+ extra +forall core extra. core -> extra -> core :+ extra +:+ extra +h) + +-- | given a plane h, and a line l, erect a vertical plane through l, and return the line +-- in which h intersects this vertical plane. +asLine :: (Plane_ plane r, Num r) + => plane -> VerticalOrLineEQ r -> LineEQ r :+ plane +asLine :: forall plane r. +(Plane_ plane r, Num r) => +plane -> VerticalOrLineEQ r -> LineEQ r :+ plane +asLine h :: plane +h@(Plane_ r +a r +b r +c) = \case + VerticalLineThrough r +x -> r -> r -> LineEQ r +forall r. r -> r -> LineEQ r +LineEQ r +b (r +ar -> r -> r +forall a. Num a => a -> a -> a +*r +x r -> r -> r +forall a. Num a => a -> a -> a ++ r +c) LineEQ r -> plane -> LineEQ r :+ plane +forall core extra. core -> extra -> core :+ extra +:+ plane +h + NonVertical (LineEQ r +a' r +b') -> r -> r -> LineEQ r +forall r. r -> r -> LineEQ r +LineEQ (r +a r -> r -> r +forall a. Num a => a -> a -> a ++ r +a'r -> r -> r +forall a. Num a => a -> a -> a +*r +b) (r +br -> r -> r +forall a. Num a => a -> a -> a +*r +b' r -> r -> r +forall a. Num a => a -> a -> a ++ r +c) LineEQ r -> plane -> LineEQ r :+ plane +forall core extra. core -> extra -> core :+ extra +:+ plane +h + -- we simply fill in the coordinates of the line into the equation for h. this gives us + -- line (either parameterized in terms of the y-coordinate, or in case of the + -- x-coordinate of R^3 in the second case). + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Type.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Type.html index aad41ef77..3381e4b90 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Type.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.Type.html @@ -1,744 +1,103 @@
{-# LANGUAGE UndecidableInstances #-}
 module HGeometry.Plane.LowerEnvelope.Type
-  ( VertexID
-  , BoundedVertexF(Vertex)
-  , location, definers, location2, incidentEdgesB
-  , traverseBoundedV
-
-  , LEEdge(Edge)
-  -- , createEdge
-  , destination, leftPlane, rightPlane
-  , flipEdge
-  ) where
-
-import           Control.Lens
-import qualified Data.Set as Set
-import           HGeometry.Point
-import           HGeometry.Properties
-
---------------------------------------------------------------------------------
-
--- | VertexIds are just ints
-type VertexID = Int
-
--- | Orders the plane around their intersection point.
-newtype AroundVertex plane = AroundVertex plane
-                           deriving stock (Int -> AroundVertex plane -> ShowS
-[AroundVertex plane] -> ShowS
-AroundVertex plane -> String
-(Int -> AroundVertex plane -> ShowS)
--> (AroundVertex plane -> String)
--> ([AroundVertex plane] -> ShowS)
--> Show (AroundVertex plane)
-forall plane. Show plane => Int -> AroundVertex plane -> ShowS
-forall plane. Show plane => [AroundVertex plane] -> ShowS
-forall plane. Show plane => AroundVertex plane -> String
-forall a.
-(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
-$cshowsPrec :: forall plane. Show plane => Int -> AroundVertex plane -> ShowS
-showsPrec :: Int -> AroundVertex plane -> ShowS
-$cshow :: forall plane. Show plane => AroundVertex plane -> String
-show :: AroundVertex plane -> String
-$cshowList :: forall plane. Show plane => [AroundVertex plane] -> ShowS
-showList :: [AroundVertex plane] -> ShowS
-Show,AroundVertex plane -> AroundVertex plane -> Bool
-(AroundVertex plane -> AroundVertex plane -> Bool)
--> (AroundVertex plane -> AroundVertex plane -> Bool)
--> Eq (AroundVertex plane)
-forall plane.
-Eq plane =>
-AroundVertex plane -> AroundVertex plane -> Bool
-forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
-$c== :: forall plane.
-Eq plane =>
-AroundVertex plane -> AroundVertex plane -> Bool
-== :: AroundVertex plane -> AroundVertex plane -> Bool
-$c/= :: forall plane.
-Eq plane =>
-AroundVertex plane -> AroundVertex plane -> Bool
-/= :: AroundVertex plane -> AroundVertex plane -> Bool
-Eq,(forall a b. (a -> b) -> AroundVertex a -> AroundVertex b)
--> (forall a b. a -> AroundVertex b -> AroundVertex a)
--> Functor AroundVertex
-forall a b. a -> AroundVertex b -> AroundVertex a
-forall a b. (a -> b) -> AroundVertex a -> AroundVertex b
-forall (f :: * -> *).
-(forall a b. (a -> b) -> f a -> f b)
--> (forall a b. a -> f b -> f a) -> Functor f
-$cfmap :: forall a b. (a -> b) -> AroundVertex a -> AroundVertex b
-fmap :: forall a b. (a -> b) -> AroundVertex a -> AroundVertex b
-$c<$ :: forall a b. a -> AroundVertex b -> AroundVertex a
-<$ :: forall a b. a -> AroundVertex b -> AroundVertex a
-Functor,(forall m. Monoid m => AroundVertex m -> m)
--> (forall m a. Monoid m => (a -> m) -> AroundVertex a -> m)
--> (forall m a. Monoid m => (a -> m) -> AroundVertex a -> m)
--> (forall a b. (a -> b -> b) -> b -> AroundVertex a -> b)
--> (forall a b. (a -> b -> b) -> b -> AroundVertex a -> b)
--> (forall b a. (b -> a -> b) -> b -> AroundVertex a -> b)
--> (forall b a. (b -> a -> b) -> b -> AroundVertex a -> b)
--> (forall a. (a -> a -> a) -> AroundVertex a -> a)
--> (forall a. (a -> a -> a) -> AroundVertex a -> a)
--> (forall a. AroundVertex a -> [a])
--> (forall a. AroundVertex a -> Bool)
--> (forall a. AroundVertex a -> Int)
--> (forall a. Eq a => a -> AroundVertex a -> Bool)
--> (forall a. Ord a => AroundVertex a -> a)
--> (forall a. Ord a => AroundVertex a -> a)
--> (forall a. Num a => AroundVertex a -> a)
--> (forall a. Num a => AroundVertex a -> a)
--> Foldable AroundVertex
-forall a. Eq a => a -> AroundVertex a -> Bool
-forall a. Num a => AroundVertex a -> a
-forall a. Ord a => AroundVertex a -> a
-forall m. Monoid m => AroundVertex m -> m
-forall a. AroundVertex a -> Bool
-forall a. AroundVertex a -> Int
-forall a. AroundVertex a -> [a]
-forall a. (a -> a -> a) -> AroundVertex a -> a
-forall m a. Monoid m => (a -> m) -> AroundVertex a -> m
-forall b a. (b -> a -> b) -> b -> AroundVertex a -> b
-forall a b. (a -> b -> b) -> b -> AroundVertex a -> b
-forall (t :: * -> *).
-(forall m. Monoid m => t m -> m)
--> (forall m a. Monoid m => (a -> m) -> t a -> m)
--> (forall m a. Monoid m => (a -> m) -> t a -> m)
--> (forall a b. (a -> b -> b) -> b -> t a -> b)
--> (forall a b. (a -> b -> b) -> b -> t a -> b)
--> (forall b a. (b -> a -> b) -> b -> t a -> b)
--> (forall b a. (b -> a -> b) -> b -> t a -> b)
--> (forall a. (a -> a -> a) -> t a -> a)
--> (forall a. (a -> a -> a) -> t a -> a)
--> (forall a. t a -> [a])
--> (forall a. t a -> Bool)
--> (forall a. t a -> Int)
--> (forall a. Eq a => a -> t a -> Bool)
--> (forall a. Ord a => t a -> a)
--> (forall a. Ord a => t a -> a)
--> (forall a. Num a => t a -> a)
--> (forall a. Num a => t a -> a)
--> Foldable t
-$cfold :: forall m. Monoid m => AroundVertex m -> m
-fold :: forall m. Monoid m => AroundVertex m -> m
-$cfoldMap :: forall m a. Monoid m => (a -> m) -> AroundVertex a -> m
-foldMap :: forall m a. Monoid m => (a -> m) -> AroundVertex a -> m
-$cfoldMap' :: forall m a. Monoid m => (a -> m) -> AroundVertex a -> m
-foldMap' :: forall m a. Monoid m => (a -> m) -> AroundVertex a -> m
-$cfoldr :: forall a b. (a -> b -> b) -> b -> AroundVertex a -> b
-foldr :: forall a b. (a -> b -> b) -> b -> AroundVertex a -> b
-$cfoldr' :: forall a b. (a -> b -> b) -> b -> AroundVertex a -> b
-foldr' :: forall a b. (a -> b -> b) -> b -> AroundVertex a -> b
-$cfoldl :: forall b a. (b -> a -> b) -> b -> AroundVertex a -> b
-foldl :: forall b a. (b -> a -> b) -> b -> AroundVertex a -> b
-$cfoldl' :: forall b a. (b -> a -> b) -> b -> AroundVertex a -> b
-foldl' :: forall b a. (b -> a -> b) -> b -> AroundVertex a -> b
-$cfoldr1 :: forall a. (a -> a -> a) -> AroundVertex a -> a
-foldr1 :: forall a. (a -> a -> a) -> AroundVertex a -> a
-$cfoldl1 :: forall a. (a -> a -> a) -> AroundVertex a -> a
-foldl1 :: forall a. (a -> a -> a) -> AroundVertex a -> a
-$ctoList :: forall a. AroundVertex a -> [a]
-toList :: forall a. AroundVertex a -> [a]
-$cnull :: forall a. AroundVertex a -> Bool
-null :: forall a. AroundVertex a -> Bool
-$clength :: forall a. AroundVertex a -> Int
-length :: forall a. AroundVertex a -> Int
-$celem :: forall a. Eq a => a -> AroundVertex a -> Bool
-elem :: forall a. Eq a => a -> AroundVertex a -> Bool
-$cmaximum :: forall a. Ord a => AroundVertex a -> a
-maximum :: forall a. Ord a => AroundVertex a -> a
-$cminimum :: forall a. Ord a => AroundVertex a -> a
-minimum :: forall a. Ord a => AroundVertex a -> a
-$csum :: forall a. Num a => AroundVertex a -> a
-sum :: forall a. Num a => AroundVertex a -> a
-$cproduct :: forall a. Num a => AroundVertex a -> a
-product :: forall a. Num a => AroundVertex a -> a
-Foldable,Functor AroundVertex
-Foldable AroundVertex
-(Functor AroundVertex, Foldable AroundVertex) =>
-(forall (f :: * -> *) a b.
- Applicative f =>
- (a -> f b) -> AroundVertex a -> f (AroundVertex b))
--> (forall (f :: * -> *) a.
-    Applicative f =>
-    AroundVertex (f a) -> f (AroundVertex a))
--> (forall (m :: * -> *) a b.
-    Monad m =>
-    (a -> m b) -> AroundVertex a -> m (AroundVertex b))
--> (forall (m :: * -> *) a.
-    Monad m =>
-    AroundVertex (m a) -> m (AroundVertex a))
--> Traversable AroundVertex
-forall (t :: * -> *).
-(Functor t, Foldable t) =>
-(forall (f :: * -> *) a b.
- Applicative f =>
- (a -> f b) -> t a -> f (t b))
--> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
--> (forall (m :: * -> *) a b.
-    Monad m =>
-    (a -> m b) -> t a -> m (t b))
--> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
--> Traversable t
-forall (m :: * -> *) a.
-Monad m =>
-AroundVertex (m a) -> m (AroundVertex a)
-forall (f :: * -> *) a.
-Applicative f =>
-AroundVertex (f a) -> f (AroundVertex a)
-forall (m :: * -> *) a b.
-Monad m =>
-(a -> m b) -> AroundVertex a -> m (AroundVertex b)
-forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> AroundVertex a -> f (AroundVertex b)
-$ctraverse :: forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> AroundVertex a -> f (AroundVertex b)
-traverse :: forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> AroundVertex a -> f (AroundVertex b)
-$csequenceA :: forall (f :: * -> *) a.
-Applicative f =>
-AroundVertex (f a) -> f (AroundVertex a)
-sequenceA :: forall (f :: * -> *) a.
-Applicative f =>
-AroundVertex (f a) -> f (AroundVertex a)
-$cmapM :: forall (m :: * -> *) a b.
-Monad m =>
-(a -> m b) -> AroundVertex a -> m (AroundVertex b)
-mapM :: forall (m :: * -> *) a b.
-Monad m =>
-(a -> m b) -> AroundVertex a -> m (AroundVertex b)
-$csequence :: forall (m :: * -> *) a.
-Monad m =>
-AroundVertex (m a) -> m (AroundVertex a)
-sequence :: forall (m :: * -> *) a.
-Monad m =>
-AroundVertex (m a) -> m (AroundVertex a)
-Traversable)
+  ( LowerEnvelope(..)
+  , pointLocateParallel
+  ) where
+
+import           Control.Lens
+import qualified Data.Set as Set
+import qualified Data.Vector as Vector
+import           HGeometry.Algorithms.BinarySearch
+import           HGeometry.HyperPlane.Class
+import           HGeometry.HyperPlane.NonVertical
+import           HGeometry.Line.General
+import           HGeometry.Plane.LowerEnvelope.Connected
+import           HGeometry.Point
+import           HGeometry.Properties
+import           HGeometry.Sequence.Alternating (Alternating(..))
+import qualified HGeometry.Sequence.Alternating as Alternating
+
+--------------------------------------------------------------------------------
+-- * Data type defining a lower envelope
+
+-- | The lower enevelope of planes in R^3. (Or rather, its minimization diagram)
+data LowerEnvelope plane =
+    ParallelStrips    !(Alternating Vector.Vector (VerticalOrLineEQ (NumType plane)) plane)
+  | ConnectedEnvelope !(MinimizationDiagram (NumType plane) plane)
 
--- instance Ord (AroundVertex plane) where
---   (AroundVertex h) `compare` (AroundVertex h') = undefined
---     where
---       -- the vertex location; aquire this using reflection somehow
---       v :: Point 2 (NumType plane)
---       v = undefined
-
-      -- I guess we somehow compute the bisector, and figure out if h lies above the bisector or below.
-
-
--- | Data type representing the bounded vertices of the lower
--- envelope.
---
--- In the vertexform, the f will be Const (), i.e. we don't have
--- adjacency information. But in case of Adjacencylist form we can
--- implement it using a Sequence.
-data BoundedVertexF f plane = Vertex { forall (f :: * -> *) plane.
-BoundedVertexF f plane -> Point 3 (NumType plane)
-_location       :: !(Point 3 (NumType plane))
-                                     , forall (f :: * -> *) plane. BoundedVertexF f plane -> Set plane
-_definers       :: Set.Set plane
-                                     , forall (f :: * -> *) plane.
-BoundedVertexF f plane -> f (LEEdge plane)
-_incidentEdgesB :: f (LEEdge plane)
-                                     -- ^ incident edges, in CCW order.
-                                     }
-
-deriving instance ( Show plane, Show (NumType plane)
-                  , Show (f (LEEdge plane))
-                  ) => Show (BoundedVertexF f plane)
-deriving instance ( Eq plane
-                  , Eq (NumType plane)
-                  , Eq (f (LEEdge plane))
-                  ) => Eq   (BoundedVertexF f plane)
-
--- instance Functor (BoundedVertex )
-
-
-
--- | Traverse the bounded vertex.
---
--- \(O(k\log k)\), where \(k\) is the number of definers of v.
-traverseBoundedV   :: (Traversable f, Applicative g, NumType plane ~ NumType plane', Ord plane')
-                   => (plane -> g plane') -> BoundedVertexF f plane -> g (BoundedVertexF f plane')
-traverseBoundedV :: forall (f :: * -> *) (g :: * -> *) plane plane'.
-(Traversable f, Applicative g, NumType plane ~ NumType plane',
- Ord plane') =>
-(plane -> g plane')
--> BoundedVertexF f plane -> g (BoundedVertexF f plane')
-traverseBoundedV plane -> g plane'
-f = \case
-  Vertex Point 3 (NumType plane)
-l Set plane
-defs f (LEEdge plane)
-es -> Point 3 (NumType plane')
--> Set plane' -> f (LEEdge plane') -> BoundedVertexF f plane'
-forall (f :: * -> *) plane.
-Point 3 (NumType plane)
--> Set plane -> f (LEEdge plane) -> BoundedVertexF f plane
-Vertex Point 3 (NumType plane)
-Point 3 (NumType plane')
-l (Set plane' -> f (LEEdge plane') -> BoundedVertexF f plane')
--> g (Set plane')
--> g (f (LEEdge plane') -> BoundedVertexF f plane')
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-<$> (plane -> g plane') -> Set plane -> g (Set plane')
-forall b (f :: * -> *) a.
-(Ord b, Applicative f) =>
-(a -> f b) -> Set a -> f (Set b)
-traverseSet plane -> g plane'
-f Set plane
-defs g (f (LEEdge plane') -> BoundedVertexF f plane')
--> g (f (LEEdge plane')) -> g (BoundedVertexF f plane')
-forall a b. g (a -> b) -> g a -> g b
-forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
-<*> (LEEdge plane -> g (LEEdge plane'))
--> f (LEEdge plane) -> g (f (LEEdge plane'))
-forall (t :: * -> *) (f :: * -> *) a b.
-(Traversable t, Applicative f) =>
-(a -> f b) -> t a -> f (t b)
-forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> f a -> f (f b)
-traverse ((plane -> g plane') -> LEEdge plane -> g (LEEdge plane')
-forall (t :: * -> *) (f :: * -> *) a b.
-(Traversable t, Applicative f) =>
-(a -> f b) -> t a -> f (t b)
-forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> LEEdge a -> f (LEEdge b)
-traverse plane -> g plane'
-f) f (LEEdge plane)
-es
-
--- | Traverse on a Set.
-traverseSet   :: (Ord b, Applicative f) => (a -> f b) -> Set.Set a -> f (Set.Set b)
-traverseSet :: forall b (f :: * -> *) a.
-(Ord b, Applicative f) =>
-(a -> f b) -> Set a -> f (Set b)
-traverseSet a -> f b
-f = ([b] -> Set b) -> f [b] -> f (Set b)
-forall a b. (a -> b) -> f a -> f b
-forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
-fmap [b] -> Set b
-forall a. Ord a => [a] -> Set a
-Set.fromList (f [b] -> f (Set b)) -> (Set a -> f [b]) -> Set a -> f (Set b)
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (a -> f b) -> [a] -> f [b]
-forall (t :: * -> *) (f :: * -> *) a b.
-(Traversable t, Applicative f) =>
-(a -> f b) -> t a -> f (t b)
-forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> [a] -> f [b]
-traverse a -> f b
-f ([a] -> f [b]) -> (Set a -> [a]) -> Set a -> f [b]
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. Set a -> [a]
-forall a. Set a -> [a]
-Set.toAscList
-
-
-
-
--- | The location of the vertex
-location :: (NumType plane ~ r) => Lens' (BoundedVertexF f plane) (Point 3 r)
-location :: forall plane r (f :: * -> *).
-(NumType plane ~ r) =>
-Lens' (BoundedVertexF f plane) (Point 3 r)
-location = (BoundedVertexF f plane -> Point 3 r)
--> (BoundedVertexF f plane -> Point 3 r -> BoundedVertexF f plane)
--> Lens
-     (BoundedVertexF f plane)
-     (BoundedVertexF f plane)
-     (Point 3 r)
-     (Point 3 r)
-forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens BoundedVertexF f plane -> Point 3 r
-BoundedVertexF f plane -> Point 3 (NumType plane)
-forall (f :: * -> *) plane.
-BoundedVertexF f plane -> Point 3 (NumType plane)
-_location (\BoundedVertexF f plane
-v Point 3 r
-l -> BoundedVertexF f plane
-v { _location = l })
-
--- | Projected 2d location of the point
-location2 :: (NumType plane ~ r) => Getter (BoundedVertexF f plane) (Point 2 r)
-location2 :: forall plane r (f :: * -> *).
-(NumType plane ~ r) =>
-Getter (BoundedVertexF f plane) (Point 2 r)
-location2 = (Point 3 r -> f (Point 3 r))
--> BoundedVertexF f plane -> f (BoundedVertexF f plane)
-forall plane r (f :: * -> *).
-(NumType plane ~ r) =>
-Lens' (BoundedVertexF f plane) (Point 3 r)
-Lens' (BoundedVertexF f plane) (Point 3 r)
-location ((Point 3 r -> f (Point 3 r))
- -> BoundedVertexF f plane -> f (BoundedVertexF f plane))
--> ((Point 2 r -> f (Point 2 r)) -> Point 3 r -> f (Point 3 r))
--> (Point 2 r -> f (Point 2 r))
--> BoundedVertexF f plane
--> f (BoundedVertexF f plane)
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. (Point 3 r -> Point 2 r)
--> (Point 2 r -> f (Point 2 r)) -> Point 3 r -> f (Point 3 r)
-forall (p :: * -> * -> *) (f :: * -> *) s a.
-(Profunctor p, Contravariant f) =>
-(s -> a) -> Optic' p f s a
-to Point 3 r -> Point 2 r
-forall (i :: Nat) point (d :: Nat) r.
-(Point_ point d r, i <= d, Has_ Vector_ i r) =>
-point -> Point i r
-projectPoint
-
--- | The three planes defining the vertex
-definers :: Lens' (BoundedVertexF f plane) (Set.Set plane)
-definers :: forall (f :: * -> *) plane (f :: * -> *).
-Functor f =>
-(Set plane -> f (Set plane))
--> BoundedVertexF f plane -> f (BoundedVertexF f plane)
-definers = (BoundedVertexF f plane -> Set plane)
--> (BoundedVertexF f plane -> Set plane -> BoundedVertexF f plane)
--> Lens
-     (BoundedVertexF f plane)
-     (BoundedVertexF f plane)
-     (Set plane)
-     (Set plane)
-forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens BoundedVertexF f plane -> Set plane
-forall (f :: * -> *) plane. BoundedVertexF f plane -> Set plane
-_definers (\BoundedVertexF f plane
-v Set plane
-ds -> BoundedVertexF f plane
-v { _definers = ds })
-
--- | Lens to access the incident edges of a vertex
-incidentEdgesB :: Lens (BoundedVertexF f plane)
-                       (BoundedVertexF g plane) (f (LEEdge plane)) (g (LEEdge plane))
-incidentEdgesB :: forall (f :: * -> *) plane (g :: * -> *) (f :: * -> *).
-Functor f =>
-(f (LEEdge plane) -> f (g (LEEdge plane)))
--> BoundedVertexF f plane -> f (BoundedVertexF g plane)
-incidentEdgesB = (BoundedVertexF f plane -> f (LEEdge plane))
--> (BoundedVertexF f plane
-    -> g (LEEdge plane) -> BoundedVertexF g plane)
--> Lens
-     (BoundedVertexF f plane)
-     (BoundedVertexF g plane)
-     (f (LEEdge plane))
-     (g (LEEdge plane))
-forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens BoundedVertexF f plane -> f (LEEdge plane)
-forall (f :: * -> *) plane.
-BoundedVertexF f plane -> f (LEEdge plane)
-_incidentEdgesB (\BoundedVertexF f plane
-v g (LEEdge plane)
-es -> BoundedVertexF f plane
-v { _incidentEdgesB = es })
-
---------------------------------------------------------------------------------
-
--- | An (half)Edge in the Lower envelope
-data LEEdge plane = Edge { forall plane. LEEdge plane -> Int
-_destination :: {-# UNPACK #-}!VertexID
-                         , forall plane. LEEdge plane -> plane
-_leftPlane   :: plane
-                         , forall plane. LEEdge plane -> plane
-_rightPlane  :: plane
-                         } deriving stock (Int -> LEEdge plane -> ShowS
-[LEEdge plane] -> ShowS
-LEEdge plane -> String
-(Int -> LEEdge plane -> ShowS)
--> (LEEdge plane -> String)
--> ([LEEdge plane] -> ShowS)
--> Show (LEEdge plane)
-forall plane. Show plane => Int -> LEEdge plane -> ShowS
-forall plane. Show plane => [LEEdge plane] -> ShowS
-forall plane. Show plane => LEEdge plane -> String
-forall a.
-(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
-$cshowsPrec :: forall plane. Show plane => Int -> LEEdge plane -> ShowS
-showsPrec :: Int -> LEEdge plane -> ShowS
-$cshow :: forall plane. Show plane => LEEdge plane -> String
-show :: LEEdge plane -> String
-$cshowList :: forall plane. Show plane => [LEEdge plane] -> ShowS
-showList :: [LEEdge plane] -> ShowS
-Show,LEEdge plane -> LEEdge plane -> Bool
-(LEEdge plane -> LEEdge plane -> Bool)
--> (LEEdge plane -> LEEdge plane -> Bool) -> Eq (LEEdge plane)
-forall plane. Eq plane => LEEdge plane -> LEEdge plane -> Bool
-forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
-$c== :: forall plane. Eq plane => LEEdge plane -> LEEdge plane -> Bool
-== :: LEEdge plane -> LEEdge plane -> Bool
-$c/= :: forall plane. Eq plane => LEEdge plane -> LEEdge plane -> Bool
-/= :: LEEdge plane -> LEEdge plane -> Bool
-Eq,Eq (LEEdge plane)
-Eq (LEEdge plane) =>
-(LEEdge plane -> LEEdge plane -> Ordering)
--> (LEEdge plane -> LEEdge plane -> Bool)
--> (LEEdge plane -> LEEdge plane -> Bool)
--> (LEEdge plane -> LEEdge plane -> Bool)
--> (LEEdge plane -> LEEdge plane -> Bool)
--> (LEEdge plane -> LEEdge plane -> LEEdge plane)
--> (LEEdge plane -> LEEdge plane -> LEEdge plane)
--> Ord (LEEdge plane)
-LEEdge plane -> LEEdge plane -> Bool
-LEEdge plane -> LEEdge plane -> Ordering
-LEEdge plane -> LEEdge plane -> LEEdge plane
-forall a.
-Eq a =>
-(a -> a -> Ordering)
--> (a -> a -> Bool)
--> (a -> a -> Bool)
--> (a -> a -> Bool)
--> (a -> a -> Bool)
--> (a -> a -> a)
--> (a -> a -> a)
--> Ord a
-forall plane. Ord plane => Eq (LEEdge plane)
-forall plane. Ord plane => LEEdge plane -> LEEdge plane -> Bool
-forall plane. Ord plane => LEEdge plane -> LEEdge plane -> Ordering
-forall plane.
-Ord plane =>
-LEEdge plane -> LEEdge plane -> LEEdge plane
-$ccompare :: forall plane. Ord plane => LEEdge plane -> LEEdge plane -> Ordering
-compare :: LEEdge plane -> LEEdge plane -> Ordering
-$c< :: forall plane. Ord plane => LEEdge plane -> LEEdge plane -> Bool
-< :: LEEdge plane -> LEEdge plane -> Bool
-$c<= :: forall plane. Ord plane => LEEdge plane -> LEEdge plane -> Bool
-<= :: LEEdge plane -> LEEdge plane -> Bool
-$c> :: forall plane. Ord plane => LEEdge plane -> LEEdge plane -> Bool
-> :: LEEdge plane -> LEEdge plane -> Bool
-$c>= :: forall plane. Ord plane => LEEdge plane -> LEEdge plane -> Bool
->= :: LEEdge plane -> LEEdge plane -> Bool
-$cmax :: forall plane.
-Ord plane =>
-LEEdge plane -> LEEdge plane -> LEEdge plane
-max :: LEEdge plane -> LEEdge plane -> LEEdge plane
-$cmin :: forall plane.
-Ord plane =>
-LEEdge plane -> LEEdge plane -> LEEdge plane
-min :: LEEdge plane -> LEEdge plane -> LEEdge plane
-Ord,(forall a b. (a -> b) -> LEEdge a -> LEEdge b)
--> (forall a b. a -> LEEdge b -> LEEdge a) -> Functor LEEdge
-forall a b. a -> LEEdge b -> LEEdge a
-forall a b. (a -> b) -> LEEdge a -> LEEdge b
-forall (f :: * -> *).
-(forall a b. (a -> b) -> f a -> f b)
--> (forall a b. a -> f b -> f a) -> Functor f
-$cfmap :: forall a b. (a -> b) -> LEEdge a -> LEEdge b
-fmap :: forall a b. (a -> b) -> LEEdge a -> LEEdge b
-$c<$ :: forall a b. a -> LEEdge b -> LEEdge a
-<$ :: forall a b. a -> LEEdge b -> LEEdge a
-Functor,(forall m. Monoid m => LEEdge m -> m)
--> (forall m a. Monoid m => (a -> m) -> LEEdge a -> m)
--> (forall m a. Monoid m => (a -> m) -> LEEdge a -> m)
--> (forall a b. (a -> b -> b) -> b -> LEEdge a -> b)
--> (forall a b. (a -> b -> b) -> b -> LEEdge a -> b)
--> (forall b a. (b -> a -> b) -> b -> LEEdge a -> b)
--> (forall b a. (b -> a -> b) -> b -> LEEdge a -> b)
--> (forall a. (a -> a -> a) -> LEEdge a -> a)
--> (forall a. (a -> a -> a) -> LEEdge a -> a)
--> (forall a. LEEdge a -> [a])
--> (forall a. LEEdge a -> Bool)
--> (forall plane. LEEdge plane -> Int)
--> (forall a. Eq a => a -> LEEdge a -> Bool)
--> (forall a. Ord a => LEEdge a -> a)
--> (forall a. Ord a => LEEdge a -> a)
--> (forall a. Num a => LEEdge a -> a)
--> (forall a. Num a => LEEdge a -> a)
--> Foldable LEEdge
-forall a. Eq a => a -> LEEdge a -> Bool
-forall a. Num a => LEEdge a -> a
-forall a. Ord a => LEEdge a -> a
-forall m. Monoid m => LEEdge m -> m
-forall a. LEEdge a -> Bool
-forall plane. LEEdge plane -> Int
-forall a. LEEdge a -> [a]
-forall a. (a -> a -> a) -> LEEdge a -> a
-forall m a. Monoid m => (a -> m) -> LEEdge a -> m
-forall b a. (b -> a -> b) -> b -> LEEdge a -> b
-forall a b. (a -> b -> b) -> b -> LEEdge a -> b
-forall (t :: * -> *).
-(forall m. Monoid m => t m -> m)
--> (forall m a. Monoid m => (a -> m) -> t a -> m)
--> (forall m a. Monoid m => (a -> m) -> t a -> m)
--> (forall a b. (a -> b -> b) -> b -> t a -> b)
--> (forall a b. (a -> b -> b) -> b -> t a -> b)
--> (forall b a. (b -> a -> b) -> b -> t a -> b)
--> (forall b a. (b -> a -> b) -> b -> t a -> b)
--> (forall a. (a -> a -> a) -> t a -> a)
--> (forall a. (a -> a -> a) -> t a -> a)
--> (forall a. t a -> [a])
--> (forall a. t a -> Bool)
--> (forall a. t a -> Int)
--> (forall a. Eq a => a -> t a -> Bool)
--> (forall a. Ord a => t a -> a)
--> (forall a. Ord a => t a -> a)
--> (forall a. Num a => t a -> a)
--> (forall a. Num a => t a -> a)
--> Foldable t
-$cfold :: forall m. Monoid m => LEEdge m -> m
-fold :: forall m. Monoid m => LEEdge m -> m
-$cfoldMap :: forall m a. Monoid m => (a -> m) -> LEEdge a -> m
-foldMap :: forall m a. Monoid m => (a -> m) -> LEEdge a -> m
-$cfoldMap' :: forall m a. Monoid m => (a -> m) -> LEEdge a -> m
-foldMap' :: forall m a. Monoid m => (a -> m) -> LEEdge a -> m
-$cfoldr :: forall a b. (a -> b -> b) -> b -> LEEdge a -> b
-foldr :: forall a b. (a -> b -> b) -> b -> LEEdge a -> b
-$cfoldr' :: forall a b. (a -> b -> b) -> b -> LEEdge a -> b
-foldr' :: forall a b. (a -> b -> b) -> b -> LEEdge a -> b
-$cfoldl :: forall b a. (b -> a -> b) -> b -> LEEdge a -> b
-foldl :: forall b a. (b -> a -> b) -> b -> LEEdge a -> b
-$cfoldl' :: forall b a. (b -> a -> b) -> b -> LEEdge a -> b
-foldl' :: forall b a. (b -> a -> b) -> b -> LEEdge a -> b
-$cfoldr1 :: forall a. (a -> a -> a) -> LEEdge a -> a
-foldr1 :: forall a. (a -> a -> a) -> LEEdge a -> a
-$cfoldl1 :: forall a. (a -> a -> a) -> LEEdge a -> a
-foldl1 :: forall a. (a -> a -> a) -> LEEdge a -> a
-$ctoList :: forall a. LEEdge a -> [a]
-toList :: forall a. LEEdge a -> [a]
-$cnull :: forall a. LEEdge a -> Bool
-null :: forall a. LEEdge a -> Bool
-$clength :: forall plane. LEEdge plane -> Int
-length :: forall plane. LEEdge plane -> Int
-$celem :: forall a. Eq a => a -> LEEdge a -> Bool
-elem :: forall a. Eq a => a -> LEEdge a -> Bool
-$cmaximum :: forall a. Ord a => LEEdge a -> a
-maximum :: forall a. Ord a => LEEdge a -> a
-$cminimum :: forall a. Ord a => LEEdge a -> a
-minimum :: forall a. Ord a => LEEdge a -> a
-$csum :: forall a. Num a => LEEdge a -> a
-sum :: forall a. Num a => LEEdge a -> a
-$cproduct :: forall a. Num a => LEEdge a -> a
-product :: forall a. Num a => LEEdge a -> a
-Foldable,Functor LEEdge
-Foldable LEEdge
-(Functor LEEdge, Foldable LEEdge) =>
-(forall (f :: * -> *) a b.
- Applicative f =>
- (a -> f b) -> LEEdge a -> f (LEEdge b))
--> (forall (f :: * -> *) a.
-    Applicative f =>
-    LEEdge (f a) -> f (LEEdge a))
--> (forall (m :: * -> *) a b.
-    Monad m =>
-    (a -> m b) -> LEEdge a -> m (LEEdge b))
--> (forall (m :: * -> *) a.
-    Monad m =>
-    LEEdge (m a) -> m (LEEdge a))
--> Traversable LEEdge
-forall (t :: * -> *).
-(Functor t, Foldable t) =>
-(forall (f :: * -> *) a b.
- Applicative f =>
- (a -> f b) -> t a -> f (t b))
--> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
--> (forall (m :: * -> *) a b.
-    Monad m =>
-    (a -> m b) -> t a -> m (t b))
--> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
--> Traversable t
-forall (m :: * -> *) a. Monad m => LEEdge (m a) -> m (LEEdge a)
-forall (f :: * -> *) a.
-Applicative f =>
-LEEdge (f a) -> f (LEEdge a)
-forall (m :: * -> *) a b.
-Monad m =>
-(a -> m b) -> LEEdge a -> m (LEEdge b)
-forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> LEEdge a -> f (LEEdge b)
-$ctraverse :: forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> LEEdge a -> f (LEEdge b)
-traverse :: forall (f :: * -> *) a b.
-Applicative f =>
-(a -> f b) -> LEEdge a -> f (LEEdge b)
-$csequenceA :: forall (f :: * -> *) a.
-Applicative f =>
-LEEdge (f a) -> f (LEEdge a)
-sequenceA :: forall (f :: * -> *) a.
-Applicative f =>
-LEEdge (f a) -> f (LEEdge a)
-$cmapM :: forall (m :: * -> *) a b.
-Monad m =>
-(a -> m b) -> LEEdge a -> m (LEEdge b)
-mapM :: forall (m :: * -> *) a b.
-Monad m =>
-(a -> m b) -> LEEdge a -> m (LEEdge b)
-$csequence :: forall (m :: * -> *) a. Monad m => LEEdge (m a) -> m (LEEdge a)
-sequence :: forall (m :: * -> *) a. Monad m => LEEdge (m a) -> m (LEEdge a)
-Traversable)
-
--- -- | Create an edge
--- createEdge         :: VertexID  -- ^ the destination
---                    -> plane     -- ^ the left plane
---                    -> plane     -- ^ the right plane
---                    -> LEEdge plane
--- createEdge u hl hr = Edge u hl hr
-
--- | Given some vertex u and an edge e from u towards some other
--- vertex v, flip the edge e, s othat it is the edge from v to u.
-flipEdge                  :: VertexID -> LEEdge plane -> LEEdge plane
-flipEdge :: forall plane. Int -> LEEdge plane -> LEEdge plane
-flipEdge Int
-u (Edge Int
-_ plane
-hl plane
-hr) = Int -> plane -> plane -> LEEdge plane
-forall plane. Int -> plane -> plane -> LEEdge plane
-Edge Int
-u plane
-hr plane
-hl
-
--- | Getter to access the destination field of an edge.
-destination :: Getter (LEEdge plane) VertexID
-destination :: forall plane (f :: * -> *).
-(Contravariant f, Functor f) =>
-(Int -> f Int) -> LEEdge plane -> f (LEEdge plane)
-destination = (LEEdge plane -> Int)
--> (Int -> f Int) -> LEEdge plane -> f (LEEdge plane)
-forall (p :: * -> * -> *) (f :: * -> *) s a.
-(Profunctor p, Contravariant f) =>
-(s -> a) -> Optic' p f s a
-to LEEdge plane -> Int
-forall plane. LEEdge plane -> Int
-_destination
-
-
--- | Lens to access the plane left of/above the edge
-leftPlane :: Lens' (LEEdge plane) plane
-leftPlane :: forall plane (f :: * -> *).
-Functor f =>
-(plane -> f plane) -> LEEdge plane -> f (LEEdge plane)
-leftPlane = (LEEdge plane -> plane)
--> (LEEdge plane -> plane -> LEEdge plane)
--> Lens (LEEdge plane) (LEEdge plane) plane plane
-forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens LEEdge plane -> plane
-forall plane. LEEdge plane -> plane
-_leftPlane (\LEEdge plane
-ed plane
-h -> LEEdge plane
-ed { _leftPlane = h })
-
--- | Lens to access the plane right of/below the edge
-rightPlane :: Lens' (LEEdge plane) plane
-rightPlane :: forall plane (f :: * -> *).
-Functor f =>
-(plane -> f plane) -> LEEdge plane -> f (LEEdge plane)
-rightPlane = (LEEdge plane -> plane)
--> (LEEdge plane -> plane -> LEEdge plane)
--> Lens (LEEdge plane) (LEEdge plane) plane plane
-forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
-lens LEEdge plane -> plane
-forall plane. LEEdge plane -> plane
-_rightPlane (\LEEdge plane
-ed plane
-h -> LEEdge plane
-ed { _rightPlane = h })
-
---------------------------------------------------------------------------------
-
\ No newline at end of file +
deriving instance (Show plane, Show (NumType plane)) => Show (LowerEnvelope plane) +deriving instance (Eq plane, Eq (NumType plane)) => Eq (LowerEnvelope plane) + + +-------------------------------------------------------------------------------- + +-- | Point locates the given point among the parralel strips. +-- +-- \(O(\log h)\), where \(h\) is the number of planes on the lower envelope +pointLocateParallel :: (Plane_ plane r, Point_ point 2 r, Ord r, Num r) + => point + -> Alternating Vector.Vector (VerticalOrLineEQ r) plane + -> plane +pointLocateParallel :: forall plane r point. +(Plane_ plane r, Point_ point 2 r, Ord r, Num r) => +point -> Alternating Vector (VerticalOrLineEQ r) plane -> plane +pointLocateParallel point +q (Alternating plane +h0 Vector (VerticalOrLineEQ r, plane) +hs) = case (Elem (Vector (VerticalOrLineEQ r, plane)) -> Bool) +-> Vector (VerticalOrLineEQ r, plane) +-> BinarySearchResult (Elem (Vector (VerticalOrLineEQ r, plane))) +forall v. +BinarySearch v => +(Elem v -> Bool) -> v -> BinarySearchResult (Elem v) +binarySearchIn (point +q `liesRightOf`) Vector (VerticalOrLineEQ r, plane) +hs of + AllTrue (VerticalOrLineEQ r +_,plane +h) -> plane +h + FlipsAt Elem (Vector (VerticalOrLineEQ r, plane)) +_ (VerticalOrLineEQ r +_,plane +h) -> plane +h + AllFalse Maybe (Elem (Vector (VerticalOrLineEQ r, plane))) +_ -> plane +h0 + where + point +q' liesRightOf :: point -> (VerticalOrLineEQ r, plane) -> Bool +`liesRightOf` (VerticalOrLineEQ r +sep, plane +_) = case VerticalOrLineEQ r +sep of + VerticalLineThrough r +x -> point +qpoint -> Getting r point r -> r +forall s a. s -> Getting a s a -> a +^.Getting r point r +forall (d :: Natural) point r. +(1 <= d, Point_ point d r) => +IndexedLens' Int point r +IndexedLens' Int point r +xCoord r -> r -> Bool +forall a. Ord a => a -> a -> Bool +> r +x + NonVertical LineEQ r +l -> point -> LineEQ r -> Ordering +forall point. +(1 <= 2, Point_ point 2 r, Ord r, Num r) => +point -> LineEQ r -> Ordering +forall hyperPlane (d :: Natural) r point. +(NonVerticalHyperPlane_ hyperPlane d r, 1 <= d, Point_ point d r, + Ord r, Num r) => +point -> hyperPlane -> Ordering +verticalSideTest point +q LineEQ r +l Ordering -> Ordering -> Bool +forall a. Eq a => a -> a -> Bool +== Ordering +GT + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.VertexForm.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.VertexForm.html deleted file mode 100644 index 17b0ae31d..000000000 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.VertexForm.html +++ /dev/null @@ -1,493 +0,0 @@ -
{-# LANGUAGE UndecidableInstances #-}
---------------------------------------------------------------------------------
--- |
--- Module      :  HGeometry.Plane.LowerEnvelope.VertexForm
--- Copyright   :  (C) Frank Staals
--- License     :  see the LICENSE file
--- Maintainer  :  Frank Staals
---
--- A Representation of the Lower envelope of planes in vertex form;
--- i.e. storing only the vertices.
---
---------------------------------------------------------------------------------
-module HGeometry.Plane.LowerEnvelope.VertexForm
-  ( VertexForm(VertexForm)
-  , hasVertices, vertices'
-  , singleton
-  , LEVertex, pattern LEVertex, Definers
-  , BoundedVertexF(Vertex)
-  , location, definers, location2
-
-  , intersectionLine
-  , intersectionPoint
-  ) where
-
-import           Control.Lens
-import qualified Data.Map as Map
-import qualified Data.Set as Set
-import           HGeometry.Combinatorial.Util
-import           HGeometry.HyperPlane.NonVertical
-import           HGeometry.Intersection
-import           HGeometry.Line
-import           HGeometry.Line.General
-import           HGeometry.Plane.LowerEnvelope.Type
-import           HGeometry.Point
-import           HGeometry.Properties
-import           Hiraffe.Graph
-
---------------------------------------------------------------------------------
-
--- | Vertices of a lower envelope in vertex form.
-type LEVertex = BoundedVertexF (Const ())
-
--- | Convenience Constructor for computing vertices of the lower
--- envelope that are in Vertex form.
-pattern LEVertex        :: Point 3 (NumType plane) -> Definers plane -> LEVertex plane
-pattern $bLEVertex :: forall plane.
-Point 3 (NumType plane) -> Definers plane -> LEVertex plane
-$mLEVertex :: forall {r} {plane}.
-LEVertex plane
--> (Point 3 (NumType plane) -> Definers plane -> r)
--> ((# #) -> r)
--> r
-LEVertex v defs = Vertex v defs (Const ())
-{-# COMPLETE LEVertex #-}
-
--- | The definers of a vertex.
-type Definers plane = Set.Set plane
-
--- | The lower envelope in vertex form
-newtype VertexForm plane =
-  VertexForm (Map.Map (Point 3 (NumType plane))
-                      (Definers plane)
-             )
-
--- | Iso to access the underlying Map.
-_VertexFormMap :: Iso (VertexForm plane) (VertexForm plane')
-                      (Map.Map (Point 3 (NumType plane))  (Definers plane))
-                      (Map.Map (Point 3 (NumType plane')) (Definers plane'))
-_VertexFormMap :: forall plane plane' (p :: * -> * -> *) (f :: * -> *).
-(Profunctor p, Functor f) =>
-p (Map (Point 3 (NumType plane)) (Definers plane))
-  (f (Map (Point 3 (NumType plane')) (Definers plane')))
--> p (VertexForm plane) (f (VertexForm plane'))
-_VertexFormMap = p (Map (Point 3 (NumType plane)) (Definers plane))
-  (f (Map (Point 3 (NumType plane')) (Definers plane')))
--> p (VertexForm plane) (f (VertexForm plane'))
-forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
-Iso
-  (VertexForm plane)
-  (VertexForm plane')
-  (Map (Point 3 (NumType plane)) (Definers plane))
-  (Map (Point 3 (NumType plane')) (Definers plane'))
-coerced
-
--- | Test if there are vertices
-hasVertices :: VertexForm plane -> Bool
-hasVertices :: forall plane. VertexForm plane -> Bool
-hasVertices = Bool -> Bool
-not (Bool -> Bool)
--> (VertexForm plane -> Bool) -> VertexForm plane -> Bool
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. Map (Point 3 (NumType plane)) (Definers plane) -> Bool
-forall k a. Map k a -> Bool
-Map.null (Map (Point 3 (NumType plane)) (Definers plane) -> Bool)
--> (VertexForm plane
-    -> Map (Point 3 (NumType plane)) (Definers plane))
--> VertexForm plane
--> Bool
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. Getting
-  (Map (Point 3 (NumType plane)) (Definers plane))
-  (VertexForm plane)
-  (Map (Point 3 (NumType plane)) (Definers plane))
--> VertexForm plane
--> Map (Point 3 (NumType plane)) (Definers plane)
-forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a
-view Getting
-  (Map (Point 3 (NumType plane)) (Definers plane))
-  (VertexForm plane)
-  (Map (Point 3 (NumType plane)) (Definers plane))
-forall plane plane' (p :: * -> * -> *) (f :: * -> *).
-(Profunctor p, Functor f) =>
-p (Map (Point 3 (NumType plane)) (Definers plane))
-  (f (Map (Point 3 (NumType plane')) (Definers plane')))
--> p (VertexForm plane) (f (VertexForm plane'))
-_VertexFormMap
-
-deriving instance ( Show plane, Show (NumType plane)
-                  ) => Show (VertexForm plane)
-deriving instance ( Eq plane
-                  , Eq (NumType plane)
-                  ) => Eq   (VertexForm plane)
-
--- | Computes a lower envelope consisting of a single vertex.
-singleton   :: LEVertex plane -> VertexForm plane
-singleton :: forall plane. LEVertex plane -> VertexForm plane
-singleton LEVertex plane
-v = Map (Point 3 (NumType plane)) (Definers plane) -> VertexForm plane
-forall plane.
-Map (Point 3 (NumType plane)) (Definers plane) -> VertexForm plane
-VertexForm (Map (Point 3 (NumType plane)) (Definers plane)
- -> VertexForm plane)
--> Map (Point 3 (NumType plane)) (Definers plane)
--> VertexForm plane
-forall a b. (a -> b) -> a -> b
-$ Point 3 (NumType plane)
--> Definers plane -> Map (Point 3 (NumType plane)) (Definers plane)
-forall k a. k -> a -> Map k a
-Map.singleton (LEVertex plane
-vLEVertex plane
--> Getting
-     (Point 3 (NumType plane))
-     (LEVertex plane)
-     (Point 3 (NumType plane))
--> Point 3 (NumType plane)
-forall s a. s -> Getting a s a -> a
-^.Getting
-  (Point 3 (NumType plane))
-  (LEVertex plane)
-  (Point 3 (NumType plane))
-forall plane r (f :: * -> *).
-(NumType plane ~ r) =>
-Lens' (BoundedVertexF f plane) (Point 3 r)
-Lens' (LEVertex plane) (Point 3 (NumType plane))
-location) (LEVertex plane
-vLEVertex plane
--> Getting (Definers plane) (LEVertex plane) (Definers plane)
--> Definers plane
-forall s a. s -> Getting a s a -> a
-^.Getting (Definers plane) (LEVertex plane) (Definers plane)
-forall (f1 :: * -> *) plane (f2 :: * -> *).
-Functor f2 =>
-(Set plane -> f2 (Set plane))
--> BoundedVertexF f1 plane -> f2 (BoundedVertexF f1 plane)
-definers)
-
-instance (Ord (NumType plane), Ord plane) => Semigroup (VertexForm plane) where
-  (VertexForm Map (Point 3 (NumType plane)) (Definers plane)
-m) <> :: VertexForm plane -> VertexForm plane -> VertexForm plane
-<> (VertexForm Map (Point 3 (NumType plane)) (Definers plane)
-m') = Map (Point 3 (NumType plane)) (Definers plane) -> VertexForm plane
-forall plane.
-Map (Point 3 (NumType plane)) (Definers plane) -> VertexForm plane
-VertexForm (Map (Point 3 (NumType plane)) (Definers plane)
- -> VertexForm plane)
--> Map (Point 3 (NumType plane)) (Definers plane)
--> VertexForm plane
-forall a b. (a -> b) -> a -> b
-$ (Definers plane -> Definers plane -> Definers plane)
--> Map (Point 3 (NumType plane)) (Definers plane)
--> Map (Point 3 (NumType plane)) (Definers plane)
--> Map (Point 3 (NumType plane)) (Definers plane)
-forall k a. Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
-Map.unionWith Definers plane -> Definers plane -> Definers plane
-forall a. Semigroup a => a -> a -> a
-(<>) Map (Point 3 (NumType plane)) (Definers plane)
-m Map (Point 3 (NumType plane)) (Definers plane)
-m'
-instance (Ord (NumType plane), Ord plane) => Monoid (VertexForm plane) where
-  mempty :: VertexForm plane
-mempty = Map (Point 3 (NumType plane)) (Definers plane) -> VertexForm plane
-forall plane.
-Map (Point 3 (NumType plane)) (Definers plane) -> VertexForm plane
-VertexForm Map (Point 3 (NumType plane)) (Definers plane)
-forall a. Monoid a => a
-mempty
-
-instance Ord (NumType plane) => HasVertices' (VertexForm plane) where
-  type Vertex   (VertexForm plane) = Definers plane
-  type VertexIx (VertexForm plane) = Point 3 (NumType plane)
-  vertexAt :: VertexIx (VertexForm plane)
--> IndexedTraversal'
-     (VertexIx (VertexForm plane))
-     (VertexForm plane)
-     (Vertex (VertexForm plane))
-vertexAt VertexIx (VertexForm plane)
-i = (Map (Point 3 (NumType plane)) (Definers plane)
- -> f (Map (Point 3 (NumType plane)) (Definers plane)))
--> VertexForm plane -> f (VertexForm plane)
-forall plane plane' (p :: * -> * -> *) (f :: * -> *).
-(Profunctor p, Functor f) =>
-p (Map (Point 3 (NumType plane)) (Definers plane))
-  (f (Map (Point 3 (NumType plane')) (Definers plane')))
--> p (VertexForm plane) (f (VertexForm plane'))
-_VertexFormMap ((Map (Point 3 (NumType plane)) (Definers plane)
-  -> f (Map (Point 3 (NumType plane)) (Definers plane)))
- -> VertexForm plane -> f (VertexForm plane))
--> (p (Definers plane) (f (Definers plane))
-    -> Map (Point 3 (NumType plane)) (Definers plane)
-    -> f (Map (Point 3 (NumType plane)) (Definers plane)))
--> p (Definers plane) (f (Definers plane))
--> VertexForm plane
--> f (VertexForm plane)
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. Index (Map (Point 3 (NumType plane)) (Definers plane))
--> IndexedTraversal'
-     (Index (Map (Point 3 (NumType plane)) (Definers plane)))
-     (Map (Point 3 (NumType plane)) (Definers plane))
-     (IxValue (Map (Point 3 (NumType plane)) (Definers plane)))
-forall m.
-Ixed m =>
-Index m -> IndexedTraversal' (Index m) m (IxValue m)
-iix VertexIx (VertexForm plane)
-Index (Map (Point 3 (NumType plane)) (Definers plane))
-i
-  numVertices :: VertexForm plane -> Int
-numVertices (VertexForm Map (Point 3 (NumType plane)) (Definers plane)
-m) = Map (Point 3 (NumType plane)) (Definers plane) -> Int
-forall k a. Map k a -> Int
-Map.size Map (Point 3 (NumType plane)) (Definers plane)
-m
-
--- instance Ord (NumType plane) => HasVertices (VertexForm plane) (VertexForm plane) where
---   vertices = _VertexFormMap . itraversed
-
--- | Traversal (rather than a traversal1) of the vertices.
-vertices' :: IndexedTraversal' (VertexIx (VertexForm plane))
-                                      (VertexForm plane) (Vertex (VertexForm plane))
-vertices' :: forall plane (p :: * -> * -> *) (f :: * -> *).
-(Indexable (VertexIx (VertexForm plane)) p, Applicative f) =>
-p (Vertex (VertexForm plane)) (f (Vertex (VertexForm plane)))
--> VertexForm plane -> f (VertexForm plane)
-vertices' = (Map (PointF (Vector 3 (NumType plane))) (Definers plane)
- -> f (Map (PointF (Vector 3 (NumType plane))) (Definers plane)))
--> VertexForm plane -> f (VertexForm plane)
-forall plane plane' (p :: * -> * -> *) (f :: * -> *).
-(Profunctor p, Functor f) =>
-p (Map (Point 3 (NumType plane)) (Definers plane))
-  (f (Map (Point 3 (NumType plane')) (Definers plane')))
--> p (VertexForm plane) (f (VertexForm plane'))
-_VertexFormMap ((Map (PointF (Vector 3 (NumType plane))) (Definers plane)
-  -> f (Map (PointF (Vector 3 (NumType plane))) (Definers plane)))
- -> VertexForm plane -> f (VertexForm plane))
--> (p (Definers plane) (f (Definers plane))
-    -> Map (PointF (Vector 3 (NumType plane))) (Definers plane)
-    -> f (Map (PointF (Vector 3 (NumType plane))) (Definers plane)))
--> p (Definers plane) (f (Definers plane))
--> VertexForm plane
--> f (VertexForm plane)
-forall b c a. (b -> c) -> (a -> b) -> a -> c
-. p (Definers plane) (f (Definers plane))
--> Map (PointF (Vector 3 (NumType plane))) (Definers plane)
--> f (Map (PointF (Vector 3 (NumType plane))) (Definers plane))
-forall i (t :: * -> *) a b.
-TraversableWithIndex i t =>
-IndexedTraversal i (t a) (t b) a b
-IndexedTraversal
-  (PointF (Vector 3 (NumType plane)))
-  (Map (PointF (Vector 3 (NumType plane))) (Definers plane))
-  (Map (PointF (Vector 3 (NumType plane))) (Definers plane))
-  (Definers plane)
-  (Definers plane)
-itraversed
-
---------------------------------------------------------------------------------
-
-
--- | Given two planes, computes the line in which they intersect.
-intersectionLine :: (Plane_ plane r, Fractional r, Eq r)
-                 => plane -> plane -> Maybe (VerticalOrLineEQ r)
-intersectionLine :: forall plane r.
-(Plane_ plane r, Fractional r, Eq r) =>
-plane -> plane -> Maybe (VerticalOrLineEQ r)
-intersectionLine (Plane_ r
-a1 r
-b1 r
-c1) (Plane_ r
-a2 r
-b2 r
-c2)
-    | r
-b1 r -> r -> Bool
-forall a. Eq a => a -> a -> Bool
-/= r
-b2  = VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r)
-forall a. a -> Maybe a
-Just (VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r))
--> VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r)
-forall a b. (a -> b) -> a -> b
-$ LineEQ r -> VerticalOrLineEQ r
-forall r. LineEQ r -> VerticalOrLineEQ r
-NonVertical (LineEQ r -> VerticalOrLineEQ r) -> LineEQ r -> VerticalOrLineEQ r
-forall a b. (a -> b) -> a -> b
-$ r -> r -> LineEQ r
-forall r. r -> r -> LineEQ r
-LineEQ ((r
-a2 r -> r -> r
-forall a. Num a => a -> a -> a
-- r
-a1) r -> r -> r
-forall a. Fractional a => a -> a -> a
-/ r
-diffB) ((r
-c2 r -> r -> r
-forall a. Num a => a -> a -> a
-- r
-c1) r -> r -> r
-forall a. Fractional a => a -> a -> a
-/ r
-diffB)
-                  -- the two planes intersect in some normal line
-    | r
-a1 r -> r -> Bool
-forall a. Eq a => a -> a -> Bool
-/= r
-a2  = VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r)
-forall a. a -> Maybe a
-Just (VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r))
--> VerticalOrLineEQ r -> Maybe (VerticalOrLineEQ r)
-forall a b. (a -> b) -> a -> b
-$ r -> VerticalOrLineEQ r
-forall r. r -> VerticalOrLineEQ r
-VerticalLineThrough ((r
-c2 r -> r -> r
-forall a. Num a => a -> a -> a
--r
-c1) r -> r -> r
-forall a. Fractional a => a -> a -> a
-/ (r
-a1 r -> r -> r
-forall a. Num a => a -> a -> a
-- r
-a2))
-                  -- the planes intersect in a vertical line
-    | Bool
-otherwise = Maybe (VerticalOrLineEQ r)
-forall a. Maybe a
-Nothing
-                  -- the planes don't intersect at all
-  where
-    diffB :: r
-diffB = r
-b1 r -> r -> r
-forall a. Num a => a -> a -> a
-- r
-b2
-
--- | Computes there the three planes intersect
-intersectionPoint                                    :: ( Plane_ plane r, Ord r, Fractional r)
-                                                     => Three plane -> Maybe (Point 3 r)
-intersectionPoint :: forall plane r.
-(Plane_ plane r, Ord r, Fractional r) =>
-Three plane -> Maybe (Point 3 r)
-intersectionPoint (Three h1 :: plane
-h1@(Plane_ r
-a1 r
-b1 r
-c1) plane
-h2 plane
-h3) =
-    do VerticalOrLineEQ r
-l12 <- plane -> plane -> Maybe (VerticalOrLineEQ r)
-forall plane r.
-(Plane_ plane r, Fractional r, Eq r) =>
-plane -> plane -> Maybe (VerticalOrLineEQ r)
-intersectionLine plane
-h1 plane
-h2
-       VerticalOrLineEQ r
-l13 <- plane -> plane -> Maybe (VerticalOrLineEQ r)
-forall plane r.
-(Plane_ plane r, Fractional r, Eq r) =>
-plane -> plane -> Maybe (VerticalOrLineEQ r)
-intersectionLine plane
-h1 plane
-h3
-       case (VerticalOrLineEQ r
-l12,VerticalOrLineEQ r
-l13) of
-         (VerticalLineThrough r
-_x12, VerticalLineThrough r
-_x13) -> Maybe (Point 3 r)
-forall a. Maybe a
-Nothing
-           -- if the xes are the same they would be the same plane even
-         (VerticalLineThrough r
-x, NonVertical LineEQ r
-l)               -> r -> LineEQ r -> Maybe (Point 3 r)
-vertNonVertIntersect r
-x LineEQ r
-l
-         (NonVertical LineEQ r
-l, VerticalLineThrough r
-x)               -> r -> LineEQ r -> Maybe (Point 3 r)
-vertNonVertIntersect r
-x LineEQ r
-l
-         (NonVertical LineEQ r
-l, NonVertical LineEQ r
-m)                       -> LineEQ r
-l LineEQ r -> LineEQ r -> Intersection (LineEQ r) (LineEQ r)
-forall g h. IsIntersectableWith g h => g -> h -> Intersection g h
-`intersect` LineEQ r
-m Maybe (LineLineIntersectionG r (LineEQ r))
--> (LineLineIntersectionG r (LineEQ r) -> Maybe (Point 3 r))
--> Maybe (Point 3 r)
-forall a b. Maybe a -> (a -> Maybe b) -> Maybe b
-forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
->>= \case
-           Line_x_Line_Point (Point2 r
-x r
-y) -> Point 3 r -> Maybe (Point 3 r)
-forall a. a -> Maybe a
-Just (Point 3 r -> Maybe (Point 3 r)) -> Point 3 r -> Maybe (Point 3 r)
-forall a b. (a -> b) -> a -> b
-$ r -> r -> r -> Point 3 r
-forall r. r -> r -> r -> Point 3 r
-Point3 r
-x r
-y (r
-a1 r -> r -> r
-forall a. Num a => a -> a -> a
-* r
-x r -> r -> r
-forall a. Num a => a -> a -> a
-+ r
-b1r -> r -> r
-forall a. Num a => a -> a -> a
-* r
-y r -> r -> r
-forall a. Num a => a -> a -> a
-+ r
-c1)
-           Line_x_Line_Line LineEQ r
-_             -> Maybe (Point 3 r)
-forall a. Maybe a
-Nothing
-   where
-     vertNonVertIntersect :: r -> LineEQ r -> Maybe (Point 3 r)
-vertNonVertIntersect r
-x LineEQ r
-l = let y :: r
-y = r -> LineEQ r -> r
-forall r. Num r => r -> LineEQ r -> r
-evalAt' r
-x LineEQ r
-l
-                                    z :: r
-z = r
-a1 r -> r -> r
-forall a. Num a => a -> a -> a
-* r
-x r -> r -> r
-forall a. Num a => a -> a -> a
-+ r
-b1r -> r -> r
-forall a. Num a => a -> a -> a
-* r
-y r -> r -> r
-forall a. Num a => a -> a -> a
-+ r
-c1
-                                in Point 3 r -> Maybe (Point 3 r)
-forall a. a -> Maybe a
-Just (Point 3 r -> Maybe (Point 3 r)) -> Point 3 r -> Maybe (Point 3 r)
-forall a b. (a -> b) -> a -> b
-$ r -> r -> r -> Point 3 r
-forall r. r -> r -> r -> Point 3 r
-Point3 r
-x r
-y r
-z
-
\ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.html b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.html index 6d2091623..b4a6f8e98 100644 --- a/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.html +++ b/haddocks/hgeometry/src/HGeometry.Plane.LowerEnvelope.html @@ -9,15 +9,14 @@
-- -------------------------------------------------------------------------------- module HGeometry.Plane.LowerEnvelope - ( module HGeometry.Plane.LowerEnvelope.Naive - , module HGeometry.Plane.LowerEnvelope.Type - , module HGeometry.Plane.LowerEnvelope.AdjListForm - -- , module HGeometry.Plane.LowerEnvelope.Naive - ) where - -import HGeometry.Plane.LowerEnvelope.AdjListForm -import HGeometry.Plane.LowerEnvelope.Naive -import HGeometry.Plane.LowerEnvelope.Type - --------------------------------------------------------------------------------- - \ No newline at end of file +
( module HGeometry.Plane.LowerEnvelope.Naive + , module HGeometry.Plane.LowerEnvelope.Type + , module HGeometry.Plane.LowerEnvelope.Connected + ) where + +import HGeometry.Plane.LowerEnvelope.Connected +import HGeometry.Plane.LowerEnvelope.Naive +import HGeometry.Plane.LowerEnvelope.Type + +-------------------------------------------------------------------------------- + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.PlaneGraph.Class.html b/haddocks/hgeometry/src/HGeometry.PlaneGraph.Class.html index 9a7e065ff..f6024a3b3 100644 --- a/haddocks/hgeometry/src/HGeometry.PlaneGraph.Class.html +++ b/haddocks/hgeometry/src/HGeometry.PlaneGraph.Class.html @@ -46,11 +46,11 @@
-- | A class representing Plane graphs, i.e. planar graphs that have a straight line -- embedding in the plane. -class ( PlanarGraph_ planeGraph - , vertex ~ Vertex planeGraph - , Point_ vertex 2 (NumType vertex) - , NumType vertex ~ NumType planeGraph - ) => PlaneGraph_ planeGraph vertex | planeGraph -> vertex where +class ( PlanarGraph_ planeGraph + , vertex ~ Vertex planeGraph + , Point_ vertex 2 (NumType vertex) + , NumType vertex ~ NumType planeGraph + ) => PlaneGraph_ planeGraph vertex | planeGraph -> vertex where {-# MINIMAL fromEmbedding #-} @@ -61,17 +61,17 @@ -- that itself does not appear in the adjacencylist, we may drop -- it. In other words if u has a neighbour v, then v better have a -- specification of its neighbours somewhere. - fromEmbedding :: ( Foldable1 f, Functor f, Foldable h, Functor h - , vi ~ VertexIx planeGraph - , v ~ Vertex planeGraph - , e ~ Edge planeGraph - , GraphFromAdjListExtraConstraints planeGraph h - ) => f (vi, v, h (vi, e)) -> planeGraph + fromEmbedding :: ( Foldable1 f, Functor f, Foldable h, Functor h + , vi ~ VertexIx planeGraph + , v ~ Vertex planeGraph + , e ~ Edge planeGraph + , GraphFromAdjListExtraConstraints planeGraph h + ) => f (vi, v, h (vi, e)) -> planeGraph -- | Getter to access the outer face - outerFace :: Eq (FaceIx planeGraph) - => IndexedLens' (FaceIx planeGraph) planeGraph (Face planeGraph) - outerFace = Traversing + outerFace :: Eq (FaceIx planeGraph) + => IndexedLens' (FaceIx planeGraph) planeGraph (Face planeGraph) + outerFace = Traversing p f planeGraph planeGraph (Face planeGraph) (Face planeGraph) -> p (Face planeGraph) (f (Face planeGraph)) -> planeGraph @@ -86,48 +86,48 @@ Indexable (FaceIx graph) p, Applicative f, Point_ (Vertex graph) 2 (NumType graph)) => p (Face graph) (f (Face graph)) -> graph -> f graph -theLens +theLens where - theLens :: p (Face graph) (f (Face graph)) -> graph -> f graph -theLens p (Face graph) (f (Face graph)) -pFaceFFace graph -g = FaceIx graph -> IndexedTraversal' (FaceIx graph) graph (Face graph) + theLens :: p (Face graph) (f (Face graph)) -> graph -> f graph +theLens p (Face graph) (f (Face graph)) +pFaceFFace graph +g = FaceIx graph -> IndexedTraversal' (FaceIx graph) graph (Face graph) forall graph. HasFaces' graph => FaceIx graph -> IndexedTraversal' (FaceIx graph) graph (Face graph) faceAt FaceIx graph -theOuterFaceId p (Face graph) (f (Face graph)) -pFaceFFace graph -g +theOuterFaceId p (Face graph) (f (Face graph)) +pFaceFFace graph +g where - theOuterFaceId :: FaceIx graph -theOuterFaceId = graph -> FaceIx graph + theOuterFaceId :: FaceIx graph +theOuterFaceId = graph -> FaceIx graph forall planeGraph vertex. PlaneGraph_ planeGraph vertex => planeGraph -> FaceIx planeGraph outerFaceId graph -g +g -- | Traversal of all interior faces in the graph - interiorFaces :: (Eq (FaceIx planeGraph)) - => IndexedTraversal' (FaceIx planeGraph) planeGraph (Face planeGraph) - interiorFaces = p (Face planeGraph) (f (Face planeGraph)) + interiorFaces :: (Eq (FaceIx planeGraph)) + => IndexedTraversal' (FaceIx planeGraph) planeGraph (Face planeGraph) + interiorFaces = p (Face planeGraph) (f (Face planeGraph)) -> planeGraph -> f planeGraph forall (f :: * -> *) (p :: * -> * -> *). (Applicative f, Indexable (FaceIx planeGraph) p) => p (Face planeGraph) (f (Face planeGraph)) -> planeGraph -> f planeGraph -theTraversal +theTraversal where - theTraversal :: (Applicative f, Indexable (FaceIx planeGraph) p) - => p (Face planeGraph) (f (Face planeGraph)) -> planeGraph -> f planeGraph - theTraversal :: forall (f :: * -> *) (p :: * -> * -> *). + theTraversal :: (Applicative f, Indexable (FaceIx planeGraph) p) + => p (Face planeGraph) (f (Face planeGraph)) -> planeGraph -> f planeGraph + theTraversal :: forall (f :: * -> *) (p :: * -> * -> *). (Applicative f, Indexable (FaceIx planeGraph) p) => p (Face planeGraph) (f (Face planeGraph)) -> planeGraph -> f planeGraph -theTraversal p (Face planeGraph) (f (Face planeGraph)) -pFaceFFace planeGraph -g = WrappedApplicative f planeGraph -> f planeGraph +theTraversal p (Face planeGraph) (f (Face planeGraph)) +pFaceFFace planeGraph +g = WrappedApplicative f planeGraph -> f planeGraph forall (f :: * -> *) a. WrappedApplicative f a -> f a unwrapApplicative (WrappedApplicative f planeGraph -> f planeGraph) @@ -171,13 +171,13 @@ forall i (p :: * -> * -> *) (f :: * -> *) a. (Indexable i p, Applicative f) => (i -> a -> Bool) -> Optical' p (Indexed i) f a a -ifiltered (\FaceIx planeGraph -i Face planeGraph +ifiltered (\FaceIx planeGraph +i Face planeGraph _ -> FaceIx planeGraph -i FaceIx planeGraph -> FaceIx planeGraph -> Bool +i FaceIx planeGraph -> FaceIx planeGraph -> Bool forall a. Eq a => a -> a -> Bool /= FaceIx planeGraph -theOuterFaceId)) +theOuterFaceId)) ((f (Face planeGraph) -> WrappedApplicative f (Face planeGraph)) -> p (Face planeGraph) (f (Face planeGraph)) -> p (Face planeGraph) (WrappedApplicative f (Face planeGraph)) @@ -188,24 +188,24 @@ rmap f (Face planeGraph) -> WrappedApplicative f (Face planeGraph) forall (f :: * -> *) a. f a -> WrappedApplicative f a WrapApplicative p (Face planeGraph) (f (Face planeGraph)) -pFaceFFace) +pFaceFFace) planeGraph -g +g where - theOuterFaceId :: FaceIx planeGraph -theOuterFaceId = planeGraph -> FaceIx planeGraph + theOuterFaceId :: FaceIx planeGraph +theOuterFaceId = planeGraph -> FaceIx planeGraph forall planeGraph vertex. PlaneGraph_ planeGraph vertex => planeGraph -> FaceIx planeGraph outerFaceId planeGraph -g +g
-- | gets the id of the outer face -- - outerFaceId :: planeGraph -> FaceIx planeGraph - outerFaceId planeGraph -ps = planeGraph -psplaneGraph + outerFaceId :: planeGraph -> FaceIx planeGraph + outerFaceId planeGraph +ps = planeGraph +psplaneGraph -> Getting (FaceIx planeGraph) planeGraph (FaceIx planeGraph) -> FaceIx planeGraph forall s a. s -> Getting a s a -> a @@ -220,7 +220,7 @@ PlaneGraph_ planeGraph vertex => planeGraph -> DartIx planeGraph outerFaceDart planeGraph -ps)(Indexed +ps)(Indexed (FaceIx planeGraph) (Face planeGraph) (Const (FaceIx planeGraph) (Face planeGraph)) @@ -249,11 +249,11 @@ -- -- running time: \(O(n)\) -- - outerFaceDart :: planeGraph -> DartIx planeGraph - default outerFaceDart :: (r ~ NumType planeGraph, Ord r, Num r) - => planeGraph -> DartIx planeGraph - outerFaceDart planeGraph -pg = Getting + outerFaceDart :: planeGraph -> DartIx planeGraph + default outerFaceDart :: (r ~ NumType planeGraph, Ord r, Num r) + => planeGraph -> DartIx planeGraph + outerFaceDart planeGraph +pg = Getting (Endo (Endo (Maybe (DartIx planeGraph)))) planeGraph (DartIx planeGraph) @@ -269,7 +269,7 @@ DiGraph_ graph => VertexIx graph -> IndexedFold (DartIx graph) graph (Dart graph) outgoingDartsOf VertexIx planeGraph -vi(Indexed +vi(Indexed (DartIx planeGraph) (Dart planeGraph) (Const (Endo (Endo (Maybe (DartIx planeGraph)))) (Dart planeGraph)) @@ -299,12 +299,12 @@ (Indexable i p, Contravariant f, Functor f) => p i (f i) -> Indexed i s (f s) asIndex) DartIx planeGraph -> DartIx planeGraph -> Ordering -cmp planeGraph -pg +cmp planeGraph +pg where - (VertexIx planeGraph -vi,vertex -v) = Getting + (VertexIx planeGraph +vi,vertex +v) = Getting (Endo (Endo (Maybe (VertexIx planeGraph, vertex)))) planeGraph (VertexIx planeGraph, vertex) @@ -404,12 +404,12 @@ Lens' point (Point d r) Lens' vertex (Point 2 r) asPoint)) planeGraph -pg +pg -- compare lexicographically; i.e. if same x-coord prefer the one with the lowest one - cmp :: DartIx planeGraph -> DartIx planeGraph -> Ordering -cmp DartIx planeGraph -d1 DartIx planeGraph -d2 = Vector 2 r -> vertex -> vertex -> vertex -> Ordering + cmp :: DartIx planeGraph -> DartIx planeGraph -> Ordering +cmp DartIx planeGraph +d1 DartIx planeGraph +d2 = Vector 2 r -> vertex -> vertex -> vertex -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering @@ -418,8 +418,8 @@ Vector2 (-r 1) r 0) vertex -v (planeGraph -pgplaneGraph -> Getting vertex planeGraph vertex -> vertex +v (planeGraph +pgplaneGraph -> Getting vertex planeGraph vertex -> vertex forall s a. s -> Getting a s a -> a ^.DartIx planeGraph -> IndexedGetter @@ -428,8 +428,8 @@ DiGraph_ graph => DartIx graph -> IndexedGetter (VertexIx graph) graph (Vertex graph) headOf DartIx planeGraph -d1) (planeGraph -pgplaneGraph -> Getting vertex planeGraph vertex -> vertex +d1) (planeGraph +pgplaneGraph -> Getting vertex planeGraph vertex -> vertex forall s a. s -> Getting a s a -> a ^.DartIx planeGraph -> IndexedGetter @@ -438,7 +438,7 @@ DiGraph_ graph => DartIx graph -> IndexedGetter (VertexIx graph) graph (Vertex graph) headOf DartIx planeGraph -d2) +d2) -- based on the approach sketched at https://cstheory.stackexchange.com/questions/27586/finding-outer-face-in-plane-graph-embedded-planar-graph -- basically: find the leftmost vertex, find the incident edge with the largest slope @@ -456,42 +456,42 @@ -- -- Note that this is a fold rather than a getter for the same reason dartAt is a traversal -- rather than a lens: i.e. if you pass some nonsensical DartIx the dart may not exist. -dartSegmentAt :: forall planeGraph vertex. - ( PlaneGraph_ planeGraph vertex - , Point_ vertex 2 (NumType vertex) +dartSegmentAt :: forall planeGraph vertex. + ( PlaneGraph_ planeGraph vertex + , Point_ vertex 2 (NumType vertex) ) - => DartIx planeGraph - -> IndexedFold (DartIx planeGraph) - planeGraph - (ClosedLineSegment vertex) + => DartIx planeGraph + -> IndexedFold (DartIx planeGraph) + planeGraph + (ClosedLineSegment vertex) dartSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => DartIx planeGraph -> IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex) -dartSegmentAt DartIx planeGraph -ei = p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +dartSegmentAt DartIx planeGraph +ei = p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold +theFold where - theFold :: p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) + theFold :: p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg planeGraph -g = DartIx planeGraph +theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +pSegFSeg planeGraph +g = DartIx planeGraph -> IndexedTraversal' (DartIx planeGraph) planeGraph (Dart planeGraph) forall graph. HasDarts' graph => DartIx graph -> IndexedTraversal' (DartIx graph) graph (Dart graph) dartAt DartIx planeGraph -ei p (Dart planeGraph) (f (Dart planeGraph)) -pDartFDart planeGraph -g +ei p (Dart planeGraph) (f (Dart planeGraph)) +pDartFDart planeGraph +g where - pDartFDart :: p (Dart planeGraph) (f (Dart planeGraph)) -pDartFDart = (Dart planeGraph -> ClosedLineSegment vertex) + pDartFDart :: p (Dart planeGraph) (f (Dart planeGraph)) +pDartFDart = (Dart planeGraph -> ClosedLineSegment vertex) -> (f (ClosedLineSegment vertex) -> f (Dart planeGraph)) -> p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> p (Dart planeGraph) (f (Dart planeGraph)) @@ -500,11 +500,11 @@ Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d dimap Dart planeGraph -> ClosedLineSegment vertex -dartToSeg f (ClosedLineSegment vertex) -> f (Dart planeGraph) -fSegTofDart p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg - dartToSeg :: Dart planeGraph -> ClosedLineSegment vertex -dartToSeg Dart planeGraph +dartToSeg f (ClosedLineSegment vertex) -> f (Dart planeGraph) +fSegTofDart p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +pSegFSeg + dartToSeg :: Dart planeGraph -> ClosedLineSegment vertex +dartToSeg Dart planeGraph _ = (vertex -> vertex -> ClosedLineSegment vertex) -> (vertex, vertex) -> ClosedLineSegment vertex forall a b c. (a -> b -> c) -> (a, b) -> c @@ -514,7 +514,7 @@ -> (vertex, vertex) -> ClosedLineSegment vertex forall a b. (a -> b) -> a -> b $ planeGraph -gplaneGraph +gplaneGraph -> Getting (vertex, vertex) planeGraph (vertex, vertex) -> (vertex, vertex) forall s a. s -> Getting a s a -> a @@ -529,57 +529,57 @@ -> IndexedGetter (VertexIx graph, VertexIx graph) graph (Vertex graph, Vertex graph) endPointsOf DartIx planeGraph -ei - fSegTofDart :: f (ClosedLineSegment vertex) -> f (Dart planeGraph) -fSegTofDart = (Dart planeGraph -> ClosedLineSegment vertex) +ei + fSegTofDart :: f (ClosedLineSegment vertex) -> f (Dart planeGraph) +fSegTofDart = (Dart planeGraph -> ClosedLineSegment vertex) -> f (ClosedLineSegment vertex) -> f (Dart planeGraph) forall a' a. (a' -> a) -> f a -> f a' forall (f :: * -> *) a' a. Contravariant f => (a' -> a) -> f a -> f a' contramap Dart planeGraph -> ClosedLineSegment vertex -dartToSeg +dartToSeg -- | Get the line segment representing a particular edge. -- -- Note that this is a fold rather than a getter for the same reason edgeAt is a traversal -- rather than a lens: i.e. if you pass some nonsensical EdgeIx the edge may not exist. -edgeSegmentAt :: forall planeGraph vertex. - ( PlaneGraph_ planeGraph vertex - , Point_ vertex 2 (NumType vertex) +edgeSegmentAt :: forall planeGraph vertex. + ( PlaneGraph_ planeGraph vertex + , Point_ vertex 2 (NumType vertex) ) - => EdgeIx planeGraph - -> IndexedFold (EdgeIx planeGraph) - planeGraph - (ClosedLineSegment vertex) + => EdgeIx planeGraph + -> IndexedFold (EdgeIx planeGraph) + planeGraph + (ClosedLineSegment vertex) edgeSegmentAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => EdgeIx planeGraph -> IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex) -edgeSegmentAt EdgeIx planeGraph -ei = p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +edgeSegmentAt EdgeIx planeGraph +ei = p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold +theFold where - theFold :: p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) + theFold :: p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg planeGraph -g = EdgeIx planeGraph +theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +pSegFSeg planeGraph +g = EdgeIx planeGraph -> IndexedTraversal' (EdgeIx planeGraph) planeGraph (Edge planeGraph) forall graph. HasEdges' graph => EdgeIx graph -> IndexedTraversal' (EdgeIx graph) graph (Edge graph) edgeAt EdgeIx planeGraph -ei p (Edge planeGraph) (f (Edge planeGraph)) -pEdgeFEdge planeGraph -g +ei p (Edge planeGraph) (f (Edge planeGraph)) +pEdgeFEdge planeGraph +g where - pEdgeFEdge :: p (Edge planeGraph) (f (Edge planeGraph)) -pEdgeFEdge = (Edge planeGraph -> ClosedLineSegment vertex) + pEdgeFEdge :: p (Edge planeGraph) (f (Edge planeGraph)) +pEdgeFEdge = (Edge planeGraph -> ClosedLineSegment vertex) -> (f (ClosedLineSegment vertex) -> f (Edge planeGraph)) -> p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> p (Edge planeGraph) (f (Edge planeGraph)) @@ -588,17 +588,17 @@ Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d dimap Edge planeGraph -> ClosedLineSegment vertex -edgeToSeg ((Edge planeGraph -> ClosedLineSegment vertex) +edgeToSeg ((Edge planeGraph -> ClosedLineSegment vertex) -> f (ClosedLineSegment vertex) -> f (Edge planeGraph) forall a' a. (a' -> a) -> f a -> f a' forall (f :: * -> *) a' a. Contravariant f => (a' -> a) -> f a -> f a' contramap Edge planeGraph -> ClosedLineSegment vertex -edgeToSeg) p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg - edgeToSeg :: Edge planeGraph -> ClosedLineSegment vertex -edgeToSeg Edge planeGraph +edgeToSeg) p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +pSegFSeg + edgeToSeg :: Edge planeGraph -> ClosedLineSegment vertex +edgeToSeg Edge planeGraph _ = (vertex -> vertex -> ClosedLineSegment vertex) -> (vertex, vertex) -> ClosedLineSegment vertex forall a b c. (a -> b -> c) -> (a, b) -> c @@ -608,7 +608,7 @@ -> (vertex, vertex) -> ClosedLineSegment vertex forall a b. (a -> b) -> a -> b $ planeGraph -gplaneGraph +gplaneGraph -> Getting (vertex, vertex) planeGraph (vertex, vertex) -> (vertex, vertex) forall s a. s -> Getting a s a -> a @@ -627,17 +627,17 @@ BidirGraph_ graph => graph -> EdgeIx graph -> DartIx graph getPositiveDart planeGraph -g EdgeIx planeGraph -ei) +g EdgeIx planeGraph +ei) -- see dartSegment for more info. -- | Renders all darts as line segments. Thesegments are all oriented in the direction of -- the dart. -dartSegments :: forall planeGraph vertex. - ( PlaneGraph_ planeGraph vertex - , Point_ vertex 2 (NumType vertex) +dartSegments :: forall planeGraph vertex. + ( PlaneGraph_ planeGraph vertex + , Point_ vertex 2 (NumType vertex) ) - => IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex) + => IndexedFold (DartIx planeGraph) planeGraph (ClosedLineSegment vertex) dartSegments :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => @@ -650,21 +650,21 @@ Contravariant f) => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold +theFold where - theFold :: forall p f. - ( Indexable (DartIx planeGraph) p, Applicative f, Contravariant f) - => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) - -> planeGraph - -> f planeGraph - theFold :: forall (p :: * -> * -> *) (f :: * -> *). + theFold :: forall p f. + ( Indexable (DartIx planeGraph) p, Applicative f, Contravariant f) + => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) + -> planeGraph + -> f planeGraph + theFold :: forall (p :: * -> * -> *) (f :: * -> *). (Indexable (DartIx planeGraph) p, Applicative f, Contravariant f) => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg planeGraph -g = Indexed (DartIx planeGraph) (Dart planeGraph) (f (Dart planeGraph)) +theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +pSegFSeg planeGraph +g = Indexed (DartIx planeGraph) (Dart planeGraph) (f (Dart planeGraph)) -> planeGraph -> f planeGraph forall graph graph'. HasDarts graph graph' => @@ -681,15 +681,15 @@ (DartIx planeGraph) (Dart planeGraph) (f (Dart planeGraph)) forall i a b. (i -> a -> b) -> Indexed i a b Indexed DartIx planeGraph -> Dart planeGraph -> f (Dart planeGraph) -draw) planeGraph -g +draw) planeGraph +g where - draw :: DartIx planeGraph -> Dart planeGraph -> f (Dart planeGraph) - draw :: DartIx planeGraph -> Dart planeGraph -> f (Dart planeGraph) -draw DartIx planeGraph -d Dart planeGraph -_ = let seg :: ClosedLineSegment vertex -seg = (vertex -> vertex -> ClosedLineSegment vertex) + draw :: DartIx planeGraph -> Dart planeGraph -> f (Dart planeGraph) + draw :: DartIx planeGraph -> Dart planeGraph -> f (Dart planeGraph) +draw DartIx planeGraph +d Dart planeGraph +_ = let seg :: ClosedLineSegment vertex +seg = (vertex -> vertex -> ClosedLineSegment vertex) -> (vertex, vertex) -> ClosedLineSegment vertex forall a b c. (a -> b -> c) -> (a, b) -> c uncurry vertex -> vertex -> ClosedLineSegment vertex @@ -698,7 +698,7 @@ -> (vertex, vertex) -> ClosedLineSegment vertex forall a b. (a -> b) -> a -> b $ planeGraph -gplaneGraph +gplaneGraph -> Getting (vertex, vertex) planeGraph (vertex, vertex) -> (vertex, vertex) forall s a. s -> Getting a s a -> a @@ -713,9 +713,9 @@ -> IndexedGetter (VertexIx graph, VertexIx graph) graph (Vertex graph, Vertex graph) endPointsOf DartIx planeGraph -d +d in ClosedLineSegment vertex -seg ClosedLineSegment vertex +seg ClosedLineSegment vertex -> f (ClosedLineSegment vertex) -> f (Dart planeGraph) forall b a. b -> f b -> f a forall (f :: * -> *) b a. Contravariant f => b -> f b -> f a @@ -728,18 +728,18 @@ Indexable i p => p a b -> i -> a -> b indexed p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg DartIx planeGraph -d ClosedLineSegment vertex -seg +pSegFSeg
DartIx planeGraph +d ClosedLineSegment vertex +seg -- | Renders all edges as line segments. -edgeSegments :: forall planeGraph vertex. - ( HasEdges planeGraph planeGraph - , BidirGraph_ planeGraph - , vertex ~ Vertex planeGraph - , Point_ vertex 2 (NumType vertex) +edgeSegments :: forall planeGraph vertex. + ( HasEdges planeGraph planeGraph + , BidirGraph_ planeGraph + , vertex ~ Vertex planeGraph + , Point_ vertex 2 (NumType vertex) ) - => IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex) + => IndexedFold (EdgeIx planeGraph) planeGraph (ClosedLineSegment vertex) edgeSegments :: forall planeGraph vertex. (HasEdges planeGraph planeGraph, BidirGraph_ planeGraph, vertex ~ Vertex planeGraph, Point_ vertex 2 (NumType vertex)) => @@ -752,21 +752,21 @@ Contravariant f) => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold +theFold where - theFold :: forall p f. - ( Indexable (EdgeIx planeGraph) p, Applicative f, Contravariant f) - => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) - -> planeGraph - -> f planeGraph - theFold :: forall (p :: * -> * -> *) (f :: * -> *). + theFold :: forall p f. + ( Indexable (EdgeIx planeGraph) p, Applicative f, Contravariant f) + => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) + -> planeGraph + -> f planeGraph + theFold :: forall (p :: * -> * -> *) (f :: * -> *). (Indexable (EdgeIx planeGraph) p, Applicative f, Contravariant f) => p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -> planeGraph -> f planeGraph -theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg planeGraph -g = Indexed (EdgeIx planeGraph) (Edge planeGraph) (f (Edge planeGraph)) +theFold p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) +pSegFSeg planeGraph +g = Indexed (EdgeIx planeGraph) (Edge planeGraph) (f (Edge planeGraph)) -> planeGraph -> f planeGraph forall graph graph'. HasEdges graph graph' => @@ -783,15 +783,15 @@ (EdgeIx planeGraph) (Edge planeGraph) (f (Edge planeGraph)) forall i a b. (i -> a -> b) -> Indexed i a b Indexed EdgeIx planeGraph -> Edge planeGraph -> f (Edge planeGraph) -draw) planeGraph -g +draw) planeGraph +g where - draw :: EdgeIx planeGraph -> Edge planeGraph -> f (Edge planeGraph) - draw :: EdgeIx planeGraph -> Edge planeGraph -> f (Edge planeGraph) -draw EdgeIx planeGraph -ei Edge planeGraph -_ = let seg :: ClosedLineSegment vertex -seg = (vertex -> vertex -> ClosedLineSegment vertex) + draw :: EdgeIx planeGraph -> Edge planeGraph -> f (Edge planeGraph) + draw :: EdgeIx planeGraph -> Edge planeGraph -> f (Edge planeGraph) +draw EdgeIx planeGraph +ei Edge planeGraph +_ = let seg :: ClosedLineSegment vertex +seg = (vertex -> vertex -> ClosedLineSegment vertex) -> (vertex, vertex) -> ClosedLineSegment vertex forall a b c. (a -> b -> c) -> (a, b) -> c uncurry vertex -> vertex -> ClosedLineSegment vertex @@ -800,7 +800,7 @@ -> (vertex, vertex) -> ClosedLineSegment vertex forall a b. (a -> b) -> a -> b $ planeGraph -gplaneGraph +gplaneGraph -> Getting (vertex, vertex) planeGraph (vertex, vertex) -> (vertex, vertex) forall s a. s -> Getting a s a -> a @@ -819,10 +819,10 @@ BidirGraph_ graph => graph -> EdgeIx graph -> DartIx graph getPositiveDart planeGraph -g EdgeIx planeGraph -ei) +g EdgeIx planeGraph +ei) in ClosedLineSegment vertex -seg ClosedLineSegment vertex +seg ClosedLineSegment vertex -> f (ClosedLineSegment vertex) -> f (Edge planeGraph) forall b a. b -> f b -> f a forall (f :: * -> *) b a. Contravariant f => b -> f b -> f a @@ -835,20 +835,20 @@ Indexable i p => p a b -> i -> a -> b indexed p (ClosedLineSegment vertex) (f (ClosedLineSegment vertex)) -pSegFSeg EdgeIx planeGraph -ei ClosedLineSegment vertex -seg +pSegFSeg
EdgeIx planeGraph +ei ClosedLineSegment vertex +seg -- | Renders all interior faces as simple polygons. -interiorFacePolygons :: forall planeGraph vertex r. - ( PlaneGraph_ planeGraph vertex - , Point_ vertex 2 r - , Ord r, Num r - , Eq (FaceIx planeGraph) +interiorFacePolygons :: forall planeGraph vertex r. + ( PlaneGraph_ planeGraph vertex + , Point_ vertex 2 r + , Ord r, Num r + , Eq (FaceIx planeGraph) ) - => IndexedFold (FaceIx planeGraph) - planeGraph - (SimplePolygon (vertex :+ VertexIx planeGraph)) + => IndexedFold (FaceIx planeGraph) + planeGraph + (SimplePolygon (vertex :+ VertexIx planeGraph)) interiorFacePolygons :: forall planeGraph vertex r. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 r, Ord r, Num r, Eq (FaceIx planeGraph)) => @@ -865,25 +865,25 @@ p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -> planeGraph -> f planeGraph -theFold +theFold where - theFold :: forall p f. - ( PlaneGraph_ planeGraph vertex - , Indexable (FaceIx planeGraph) p, Applicative f, Contravariant f) - => p (SimplePolygon (vertex :+ VertexIx planeGraph)) - (f (SimplePolygon (vertex :+ VertexIx planeGraph))) - -> planeGraph - -> f planeGraph - theFold :: forall (p :: * -> * -> *) (f :: * -> *). + theFold :: forall p f. + ( PlaneGraph_ planeGraph vertex + , Indexable (FaceIx planeGraph) p, Applicative f, Contravariant f) + => p (SimplePolygon (vertex :+ VertexIx planeGraph)) + (f (SimplePolygon (vertex :+ VertexIx planeGraph))) + -> planeGraph + -> f planeGraph + theFold :: forall (p :: * -> * -> *) (f :: * -> *). (PlaneGraph_ planeGraph vertex, Indexable (FaceIx planeGraph) p, Applicative f, Contravariant f) => p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -> planeGraph -> f planeGraph -theFold p (SimplePolygon (vertex :+ VertexIx planeGraph)) +theFold p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -pPolyFPoly planeGraph -g = Indexed (FaceIx planeGraph) (Face planeGraph) (f (Face planeGraph)) +pPolyFPoly planeGraph +g = Indexed (FaceIx planeGraph) (Face planeGraph) (f (Face planeGraph)) -> planeGraph -> f planeGraph forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Eq (FaceIx planeGraph)) => @@ -894,15 +894,15 @@ (FaceIx planeGraph) (Face planeGraph) (f (Face planeGraph)) forall i a b. (i -> a -> b) -> Indexed i a b Indexed FaceIx planeGraph -> Face planeGraph -> f (Face planeGraph) -draw) planeGraph -g +draw) planeGraph +g where - draw :: FaceIx planeGraph -> Face planeGraph -> f (Face planeGraph) - draw :: FaceIx planeGraph -> Face planeGraph -> f (Face planeGraph) -draw FaceIx planeGraph -fi Face planeGraph -_ = let poly :: SimplePolygon (vertex :+ VertexIx planeGraph) -poly = planeGraph + draw :: FaceIx planeGraph -> Face planeGraph -> f (Face planeGraph) + draw :: FaceIx planeGraph -> Face planeGraph -> f (Face planeGraph) +draw FaceIx planeGraph +fi Face planeGraph +_ = let poly :: SimplePolygon (vertex :+ VertexIx planeGraph) +poly = planeGraph -> FaceIx planeGraph -> SimplePolygon (vertex :+ VertexIx planeGraph) forall planeGraph vertex r. @@ -911,10 +911,10 @@ -> FaceIx planeGraph -> SimplePolygon (vertex :+ VertexIx planeGraph) polygonFromFace planeGraph -g FaceIx planeGraph -fi +g FaceIx planeGraph +fi in SimplePolygon (vertex :+ VertexIx planeGraph) -poly SimplePolygon (vertex :+ VertexIx planeGraph) +poly SimplePolygon (vertex :+ VertexIx planeGraph) -> f (SimplePolygon (vertex :+ VertexIx planeGraph)) -> f (Face planeGraph) forall b a. b -> f b -> f a @@ -930,24 +930,24 @@ p a b -> i -> a -> b indexed p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -pPolyFPoly FaceIx planeGraph -fi SimplePolygon (vertex :+ VertexIx planeGraph) -poly +pPolyFPoly
FaceIx planeGraph +fi SimplePolygon (vertex :+ VertexIx planeGraph) +poly -polygonFromFace :: forall planeGraph vertex r.( PlaneGraph_ planeGraph vertex - , Point_ vertex 2 r +polygonFromFace :: forall planeGraph vertex r.( PlaneGraph_ planeGraph vertex + , Point_ vertex 2 r ) - => planeGraph -> FaceIx planeGraph - -> SimplePolygon (vertex :+ VertexIx planeGraph) + => planeGraph -> FaceIx planeGraph + -> SimplePolygon (vertex :+ VertexIx planeGraph) polygonFromFace :: forall planeGraph vertex r. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 r) => planeGraph -> FaceIx planeGraph -> SimplePolygon (vertex :+ VertexIx planeGraph) -polygonFromFace planeGraph -gr FaceIx planeGraph -fi = SimplePolygon (vertex :+ VertexIx planeGraph) -poly'SimplePolygon (vertex :+ VertexIx planeGraph) +polygonFromFace
planeGraph +gr FaceIx planeGraph +fi = SimplePolygon (vertex :+ VertexIx planeGraph) +poly'SimplePolygon (vertex :+ VertexIx planeGraph) -> (SimplePolygon (vertex :+ VertexIx planeGraph) -> SimplePolygon (vertex :+ VertexIx planeGraph)) -> SimplePolygon (vertex :+ VertexIx planeGraph) @@ -999,9 +999,9 @@ forall a b. Coercible a b => a -> b coerce where - poly' :: SimplePolygon (vertex :+ VertexIx planeGraph) - poly' :: SimplePolygon (vertex :+ VertexIx planeGraph) -poly' = NonEmptyVector (vertex :+ VertexIx planeGraph) + poly' :: SimplePolygon (vertex :+ VertexIx planeGraph) + poly' :: SimplePolygon (vertex :+ VertexIx planeGraph) +poly' = NonEmptyVector (vertex :+ VertexIx planeGraph) -> SimplePolygon (vertex :+ VertexIx planeGraph) forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => @@ -1023,9 +1023,9 @@ -> NonEmptyVector (vertex :+ VertexIx planeGraph) forall a b. (a -> b) -> NonEmptyVector a -> NonEmptyVector b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\VertexIx planeGraph -vi -> planeGraph -grplaneGraph -> Getting (Endo vertex) planeGraph vertex -> vertex +fmap (\VertexIx planeGraph +vi -> planeGraph +grplaneGraph -> Getting (Endo vertex) planeGraph vertex -> vertex forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!VertexIx planeGraph -> IndexedTraversal' @@ -1035,10 +1035,10 @@ VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx planeGraph -vi vertex -> VertexIx planeGraph -> vertex :+ VertexIx planeGraph +vi vertex -> VertexIx planeGraph -> vertex :+ VertexIx planeGraph forall core extra. core -> extra -> core :+ extra :+ VertexIx planeGraph -vi) +vi) (NonEmptyVector (VertexIx planeGraph) -> SimplePolygon (vertex :+ VertexIx planeGraph)) -> NonEmptyVector (VertexIx planeGraph) @@ -1051,8 +1051,8 @@ FaceIx planarGraph -> planarGraph -> NonEmptyVector (VertexIx planarGraph) boundaryVertices FaceIx planeGraph -fi planeGraph -gr +fi
planeGraph +gr -- note that this is safe, since boundaryVerticesOf guarantees that for -- interior faces, the vertices are returned in CCW order. @@ -1063,14 +1063,14 @@ -- -- Note that this is a fold rather than a getter for the same reason faceAt is a traversal -- rather than a lens: i.e. if you pass some nonsensical FaceIx the face may not exist. -interiorFacePolygonAt :: forall planeGraph vertex. - ( PlaneGraph_ planeGraph vertex - , Point_ vertex 2 (NumType vertex) +interiorFacePolygonAt :: forall planeGraph vertex. + ( PlaneGraph_ planeGraph vertex + , Point_ vertex 2 (NumType vertex) ) - => FaceIx planeGraph - -> IndexedFold (FaceIx planeGraph) - planeGraph - (SimplePolygon (vertex :+ VertexIx planeGraph)) + => FaceIx planeGraph + -> IndexedFold (FaceIx planeGraph) + planeGraph + (SimplePolygon (vertex :+ VertexIx planeGraph)) interiorFacePolygonAt :: forall planeGraph vertex. (PlaneGraph_ planeGraph vertex, Point_ vertex 2 (NumType vertex)) => @@ -1079,34 +1079,34 @@ (FaceIx planeGraph) planeGraph (SimplePolygon (vertex :+ VertexIx planeGraph)) -interiorFacePolygonAt FaceIx planeGraph -fi = p (SimplePolygon (vertex :+ VertexIx planeGraph)) +interiorFacePolygonAt
FaceIx planeGraph +fi = p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -> planeGraph -> f planeGraph -theFold +theFold
where - theFold :: p (SimplePolygon (vertex :+ VertexIx planeGraph)) + theFold :: p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -> planeGraph -> f planeGraph -theFold p (SimplePolygon (vertex :+ VertexIx planeGraph)) +theFold p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -pPolyFPoly planeGraph -gr = FaceIx planeGraph +pPolyFPoly planeGraph +gr = FaceIx planeGraph -> IndexedTraversal' (FaceIx planeGraph) planeGraph (Face planeGraph) forall graph. HasFaces' graph => FaceIx graph -> IndexedTraversal' (FaceIx graph) graph (Face graph) faceAt FaceIx planeGraph -fi Face planeGraph -> f (Face planeGraph) -draw planeGraph -gr +fi Face planeGraph -> f (Face planeGraph) +draw planeGraph +gr where -- draw :: Face planeGraph -> f (Face planeGraph) - draw :: Face planeGraph -> f (Face planeGraph) -draw Face planeGraph -_ = let poly :: SimplePolygon (vertex :+ VertexIx planeGraph) -poly = planeGraph + draw :: Face planeGraph -> f (Face planeGraph) +draw Face planeGraph +_ = let poly :: SimplePolygon (vertex :+ VertexIx planeGraph) +poly = planeGraph -> FaceIx planeGraph -> SimplePolygon (vertex :+ VertexIx planeGraph) forall planeGraph vertex r. @@ -1115,10 +1115,10 @@ -> FaceIx planeGraph -> SimplePolygon (vertex :+ VertexIx planeGraph) polygonFromFace planeGraph -gr FaceIx planeGraph -fi +gr FaceIx planeGraph +fi in SimplePolygon (vertex :+ VertexIx planeGraph) -poly SimplePolygon (vertex :+ VertexIx planeGraph) +poly SimplePolygon (vertex :+ VertexIx planeGraph) -> f (SimplePolygon (vertex :+ VertexIx planeGraph)) -> f (Face planeGraph) forall b a. b -> f b -> f a @@ -1134,20 +1134,20 @@ p a b -> i -> a -> b indexed p (SimplePolygon (vertex :+ VertexIx planeGraph)) (f (SimplePolygon (vertex :+ VertexIx planeGraph))) -pPolyFPoly FaceIx planeGraph -fi SimplePolygon (vertex :+ VertexIx planeGraph) -poly +pPolyFPoly
FaceIx planeGraph +fi SimplePolygon (vertex :+ VertexIx planeGraph) +poly -------------------------------------------------------------------------------- -- | get the minimum of the elements the lens points to using the given comparison function -minimum1ByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a +minimum1ByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a minimum1ByOf :: forall a s. Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a -minimum1ByOf Getting (Endo (Endo (Maybe a))) s a -l a -> a -> Ordering -cmp = a -> Maybe a -> a +minimum1ByOf
Getting (Endo (Endo (Maybe a))) s a +l a -> a -> Ordering +cmp = a -> Maybe a -> a forall a. a -> Maybe a -> a fromMaybe ([Char] -> a forall a. HasCallStack => [Char] -> a @@ -1160,8 +1160,8 @@ Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a minimumByOf Getting (Endo (Endo (Maybe a))) s a -l a -> a -> Ordering -cmp +l
a -> a -> Ordering +cmp -- -- type Getting r s a = (a -> Const r a) -> s -> Const r s diff --git a/haddocks/hgeometry/src/HGeometry.PlaneGraph.Type.html b/haddocks/hgeometry/src/HGeometry.PlaneGraph.Type.html index e54f4bfaa..ebabf23cb 100644 --- a/haddocks/hgeometry/src/HGeometry.PlaneGraph.Type.html +++ b/haddocks/hgeometry/src/HGeometry.PlaneGraph.Type.html @@ -36,9 +36,9 @@ -- * The PlaneGraph type -- | An Embedded, *connected*, planar graph -newtype PlaneGraph s v e f = - PlaneGraph (PlanarGraph s Primal v e f) - deriving stock (Int -> PlaneGraph s v e f -> ShowS +newtype PlaneGraph s v e f = + PlaneGraph (PlanarGraph s Primal v e f) + deriving stock (Int -> PlaneGraph s v e f -> ShowS [PlaneGraph s v e f] -> ShowS PlaneGraph s v e f -> String (Int -> PlaneGraph s v e f -> ShowS) @@ -68,7 +68,7 @@ (Show v, Show e, Show f) => [PlaneGraph s v e f] -> ShowS showList :: [PlaneGraph s v e f] -> ShowS -Show,PlaneGraph s v e f -> PlaneGraph s v e f -> Bool +Show,PlaneGraph s v e f -> PlaneGraph s v e f -> Bool (PlaneGraph s v e f -> PlaneGraph s v e f -> Bool) -> (PlaneGraph s v e f -> PlaneGraph s v e f -> Bool) -> Eq (PlaneGraph s v e f) @@ -84,7 +84,7 @@ (Eq v, Eq e, Eq f) => PlaneGraph s v e f -> PlaneGraph s v e f -> Bool /= :: PlaneGraph s v e f -> PlaneGraph s v e f -> Bool -Eq,(forall x. PlaneGraph s v e f -> Rep (PlaneGraph s v e f) x) +Eq,(forall x. PlaneGraph s v e f -> Rep (PlaneGraph s v e f) x) -> (forall x. Rep (PlaneGraph s v e f) x -> PlaneGraph s v e f) -> Generic (PlaneGraph s v e f) forall x. Rep (PlaneGraph s v e f) x -> PlaneGraph s v e f @@ -102,7 +102,7 @@ Rep (PlaneGraph s v e f) x -> PlaneGraph s v e f to :: forall x. Rep (PlaneGraph s v e f) x -> PlaneGraph s v e f Generic) - deriving newtype (PlaneGraph s v e f -> Node () + deriving newtype (PlaneGraph s v e f -> Node () (PlaneGraph s v e f -> Node ()) -> ToYAML (PlaneGraph s v e f) forall a. (a -> Node ()) -> ToYAML a forall k (s :: k) v e f. @@ -112,7 +112,7 @@ (ToYAML v, ToYAML e, ToYAML f) => PlaneGraph s v e f -> Node () toYAML :: PlaneGraph s v e f -> Node () -ToYAML,Node Pos -> Parser (PlaneGraph s v e f) +ToYAML,Node Pos -> Parser (PlaneGraph s v e f) (Node Pos -> Parser (PlaneGraph s v e f)) -> FromYAML (PlaneGraph s v e f) forall a. (Node Pos -> Parser a) -> FromYAML a @@ -125,12 +125,12 @@ parseYAML :: Node Pos -> Parser (PlaneGraph s v e f) FromYAML) -type instance NumType (PlaneGraph s v e f) = NumType v -type instance Dimension (PlaneGraph s v e f) = 2 +type instance NumType (PlaneGraph s v e f) = NumType v +type instance Dimension (PlaneGraph s v e f) = 2 -- | Iso to access the graph -_PlanarGraph :: Iso (PlaneGraph s v e f) (PlaneGraph s v' e' f') - (PlanarGraph s Primal v e f) (PlanarGraph s Primal v' e' f') +_PlanarGraph :: Iso (PlaneGraph s v e f) (PlaneGraph s v' e' f') + (PlanarGraph s Primal v e f) (PlanarGraph s Primal v' e' f') _PlanarGraph :: forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -151,16 +151,16 @@ ---------------------------------------- -instance HasVertices' (PlaneGraph s v e f) where - type Vertex (PlaneGraph s v e f) = v - type VertexIx (PlaneGraph s v e f) = VertexId s - vertexAt :: VertexIx (PlaneGraph s v e f) +instance HasVertices' (PlaneGraph s v e f) where + type Vertex (PlaneGraph s v e f) = v + type VertexIx (PlaneGraph s v e f) = VertexId s + vertexAt :: VertexIx (PlaneGraph s v e f) -> IndexedTraversal' (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Vertex (PlaneGraph s v e f)) -vertexAt VertexIx (PlaneGraph s v e f) -i = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +vertexAt VertexIx (PlaneGraph s v e f) +i = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -187,16 +187,16 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx (PlanarGraph s 'Primal v e f) VertexIx (PlaneGraph s v e f) -i +i -instance HasVertices (PlaneGraph s v e f) (PlaneGraph s v' e f) where - vertices :: IndexedTraversal1 +instance HasVertices (PlaneGraph s v e f) (PlaneGraph s v' e f) where + vertices :: IndexedTraversal1 (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v' e f) (Vertex (PlaneGraph s v e f)) (Vertex (PlaneGraph s v' e f)) -vertices = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v' e f)) +vertices = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v' e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v' e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -231,16 +231,16 @@ ---------------------------------------- -instance HasDarts' (PlaneGraph s v e f) where - type Dart (PlaneGraph s v e f) = e - type DartIx (PlaneGraph s v e f) = DartId s - dartAt :: DartIx (PlaneGraph s v e f) +instance HasDarts' (PlaneGraph s v e f) where + type Dart (PlaneGraph s v e f) = e + type DartIx (PlaneGraph s v e f) = DartId s + dartAt :: DartIx (PlaneGraph s v e f) -> IndexedTraversal' (DartIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Dart (PlaneGraph s v e f)) -dartAt DartIx (PlaneGraph s v e f) -i = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +dartAt DartIx (PlaneGraph s v e f) +i = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -266,16 +266,16 @@ DartIx graph -> IndexedTraversal' (DartIx graph) graph (Dart graph) dartAt DartIx (PlanarGraph s 'Primal v e f) DartIx (PlaneGraph s v e f) -i +i -instance HasDarts (PlaneGraph s v e f) (PlaneGraph s v e' f) where - darts :: IndexedTraversal +instance HasDarts (PlaneGraph s v e f) (PlaneGraph s v e' f) where + darts :: IndexedTraversal (DartIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v e' f) (Dart (PlaneGraph s v e f)) (Dart (PlaneGraph s v e' f)) -darts = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e' f)) +darts = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e' f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e' f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -310,16 +310,16 @@ ---------------------------------------- -instance HasEdges' (PlaneGraph s v e f) where - type Edge (PlaneGraph s v e f) = e - type EdgeIx (PlaneGraph s v e f) = DartId s - edgeAt :: EdgeIx (PlaneGraph s v e f) +instance HasEdges' (PlaneGraph s v e f) where + type Edge (PlaneGraph s v e f) = e + type EdgeIx (PlaneGraph s v e f) = DartId s + edgeAt :: EdgeIx (PlaneGraph s v e f) -> IndexedTraversal' (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) -edgeAt EdgeIx (PlaneGraph s v e f) -d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +edgeAt EdgeIx (PlaneGraph s v e f) +d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -345,16 +345,16 @@ EdgeIx graph -> IndexedTraversal' (EdgeIx graph) graph (Edge graph) edgeAt EdgeIx (PlanarGraph s 'Primal v e f) EdgeIx (PlaneGraph s v e f) -d +d -instance HasEdges (PlaneGraph s v e f) (PlaneGraph s v e f) where - edges :: IndexedTraversal +instance HasEdges (PlaneGraph s v e f) (PlaneGraph s v e f) where + edges :: IndexedTraversal (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) (Edge (PlaneGraph s v e f)) -edges = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +edges = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -389,16 +389,16 @@ ---------------------------------------- -instance HasFaces' (PlaneGraph s v e f) where - type Face (PlaneGraph s v e f) = f - type FaceIx (PlaneGraph s v e f) = FaceId s - faceAt :: FaceIx (PlaneGraph s v e f) +instance HasFaces' (PlaneGraph s v e f) where + type Face (PlaneGraph s v e f) = f + type FaceIx (PlaneGraph s v e f) = FaceId s + faceAt :: FaceIx (PlaneGraph s v e f) -> IndexedTraversal' (FaceIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Face (PlaneGraph s v e f)) -faceAt FaceIx (PlaneGraph s v e f) -fi = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +faceAt FaceIx (PlaneGraph s v e f) +fi = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -424,17 +424,17 @@ FaceIx graph -> IndexedTraversal' (FaceIx graph) graph (Face graph) faceAt FaceIx (PlanarGraph s 'Primal v e f) FaceIx (PlaneGraph s v e f) -fi +fi -instance HasFaces (PlaneGraph s v e f) (PlaneGraph s v e f') where - faces :: IndexedTraversal1 +instance HasFaces (PlaneGraph s v e f) (PlaneGraph s v e f') where + faces :: IndexedTraversal1 (FaceIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (PlaneGraph s v e f') (Face (PlaneGraph s v e f)) (Face (PlaneGraph s v e f')) -faces = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f')) +faces = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f')) -> PlaneGraph s v e f -> f (PlaneGraph s v e f') forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -468,17 +468,17 @@ faces ---------------------------------------- -instance DiGraph_ (PlaneGraph s v e f) where - type DiGraphFromAdjListExtraConstraints (PlaneGraph s v e f) h = (f ~ (), Foldable1 h) +instance DiGraph_ (PlaneGraph s v e f) where + type DiGraphFromAdjListExtraConstraints (PlaneGraph s v e f) h = (f ~ (), Foldable1 h) -- | The vertices are expected to have their adjacencies in CCW order. - diGraphFromAdjacencyLists :: forall (f :: * -> *) (h :: * -> *) vi v d. + diGraphFromAdjacencyLists :: forall (f :: * -> *) (h :: * -> *) vi v d. (Foldable1 f, Functor f, Foldable h, Functor h, vi ~ VertexIx (PlaneGraph s v e f), v ~ Vertex (PlaneGraph s v e f), d ~ Dart (PlaneGraph s v e f), DiGraphFromAdjListExtraConstraints (PlaneGraph s v e f) h) => f (vi, v, h (vi, d)) -> PlaneGraph s v e f -diGraphFromAdjacencyLists = PlanarGraph s 'Primal v e f -> PlaneGraph s v e f +diGraphFromAdjacencyLists = PlanarGraph s 'Primal v e f -> PlaneGraph s v e f forall {k} (s :: k) v e f. PlanarGraph s 'Primal v e f -> PlaneGraph s v e f PlaneGraph (PlanarGraph s 'Primal v e f -> PlaneGraph s v e f) @@ -503,11 +503,11 @@ diGraphFromAdjacencyLists -- TODO: we should probably use some toEmbedding here as well I think - endPoints :: PlaneGraph s v e f + endPoints :: PlaneGraph s v e f -> DartIx (PlaneGraph s v e f) -> (VertexIx (PlaneGraph s v e f), VertexIx (PlaneGraph s v e f)) -endPoints (PlaneGraph PlanarGraph s 'Primal v e f -g) = PlanarGraph s 'Primal v e f +endPoints (PlaneGraph PlanarGraph s 'Primal v e f +g) = PlanarGraph s 'Primal v e f -> DartIx (PlanarGraph s 'Primal v e f) -> (VertexIx (PlanarGraph s 'Primal v e f), VertexIx (PlanarGraph s 'Primal v e f)) @@ -515,18 +515,18 @@ DiGraph_ graph => graph -> DartIx graph -> (VertexIx graph, VertexIx graph) endPoints PlanarGraph s 'Primal v e f -g - twinDartOf :: DartIx (PlaneGraph s v e f) +g + twinDartOf :: DartIx (PlaneGraph s v e f) -> Getter (PlaneGraph s v e f) (Maybe (DartIx (PlaneGraph s v e f))) -twinDartOf DartIx (PlaneGraph s v e f) -d = DartIx (PlaneGraph s v e f) +twinDartOf DartIx (PlaneGraph s v e f) +d = DartIx (PlaneGraph s v e f) -> Getter (PlaneGraph s v e f) (DartIx (PlaneGraph s v e f)) forall graph. BidirGraph_ graph => DartIx graph -> Getter graph (DartIx graph) twinOf DartIx (PlaneGraph s v e f) -d ((DartId s -> f (DartId s)) +d ((DartId s -> f (DartId s)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f)) -> ((Maybe (DartId s) -> f (Maybe (DartId s))) -> DartId s -> f (DartId s)) @@ -544,13 +544,13 @@ to DartId s -> Maybe (DartId s) forall a. a -> Maybe a Just - outgoingDartsOf :: VertexIx (PlaneGraph s v e f) + outgoingDartsOf :: VertexIx (PlaneGraph s v e f) -> IndexedFold (DartIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Dart (PlaneGraph s v e f)) -outgoingDartsOf VertexIx (PlaneGraph s v e f) -v = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +outgoingDartsOf VertexIx (PlaneGraph s v e f) +v = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -576,13 +576,13 @@ VertexIx graph -> IndexedFold (DartIx graph) graph (Dart graph) outgoingDartsOf VertexIx (PlanarGraph s 'Primal v e f) VertexIx (PlaneGraph s v e f) -v +v -instance BidirGraph_ (PlaneGraph s v e f) where - twinOf :: DartIx (PlaneGraph s v e f) +instance BidirGraph_ (PlaneGraph s v e f) where + twinOf :: DartIx (PlaneGraph s v e f) -> Getter (PlaneGraph s v e f) (DartIx (PlaneGraph s v e f)) -twinOf DartIx (PlaneGraph s v e f) -d = (PlaneGraph s v e f -> DartIx (PlaneGraph s v e f)) +twinOf DartIx (PlaneGraph s v e f) +d = (PlaneGraph s v e f -> DartIx (PlaneGraph s v e f)) -> (DartIx (PlaneGraph s v e f) -> f (DartIx (PlaneGraph s v e f))) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) @@ -604,33 +604,33 @@ forall {k} (s :: k). Dart s -> Dart s PG.twin DartIx (PlaneGraph s v e f) Dart s -d) - getPositiveDart :: PlaneGraph s v e f +d) + getPositiveDart :: PlaneGraph s v e f -> EdgeIx (PlaneGraph s v e f) -> DartIx (PlaneGraph s v e f) -getPositiveDart (PlaneGraph PlanarGraph s 'Primal v e f -g) EdgeIx (PlaneGraph s v e f) -e = PlanarGraph s 'Primal v e f +getPositiveDart (PlaneGraph PlanarGraph s 'Primal v e f +g) EdgeIx (PlaneGraph s v e f) +e = PlanarGraph s 'Primal v e f -> EdgeIx (PlanarGraph s 'Primal v e f) -> DartIx (PlanarGraph s 'Primal v e f) forall graph. BidirGraph_ graph => graph -> EdgeIx graph -> DartIx graph getPositiveDart PlanarGraph s 'Primal v e f -g EdgeIx (PlanarGraph s 'Primal v e f) +g EdgeIx (PlanarGraph s 'Primal v e f) EdgeIx (PlaneGraph s v e f) -e +e -- | Computes the cyclic order of adjacencies around each vertex. -- -- \(O(n \log n)\) -toEmbedding :: ( Foldable1 g, Functor g, Foldable h, Functor h - , vi ~ VertexIx (PlaneGraph s v e f) - , v ~ Vertex (PlaneGraph s v e f) - , e ~ Edge (PlaneGraph s v e f) - , GraphFromAdjListExtraConstraints (PlaneGraph s v e f) h - , Point_ v 2 r, Ord r, Num r - ) => g (vi, v, h (vi, e)) -> g (vi, v, Vector.NonEmptyVector (vi, e)) +toEmbedding :: ( Foldable1 g, Functor g, Foldable h, Functor h + , vi ~ VertexIx (PlaneGraph s v e f) + , v ~ Vertex (PlaneGraph s v e f) + , e ~ Edge (PlaneGraph s v e f) + , GraphFromAdjListExtraConstraints (PlaneGraph s v e f) h + , Point_ v 2 r, Ord r, Num r + ) => g (vi, v, h (vi, e)) -> g (vi, v, Vector.NonEmptyVector (vi, e)) toEmbedding :: forall {k} (g :: * -> *) (h :: * -> *) vi (s :: k) v e f r. (Foldable1 g, Functor g, Foldable h, Functor h, vi ~ VertexIx (PlaneGraph s v e f), @@ -638,38 +638,38 @@ GraphFromAdjListExtraConstraints (PlaneGraph s v e f) h, Point_ v 2 r, Ord r, Num r) => g (vi, v, h (vi, e)) -> g (vi, v, NonEmptyVector (vi, e)) -toEmbedding g (vi, v, h (vi, e)) -vs = ((vi, v, h (vi, e)) -> (vi, v, NonEmptyVector (vi, e))) +toEmbedding g (vi, v, h (vi, e)) +vs = ((vi, v, h (vi, e)) -> (vi, v, NonEmptyVector (vi, e))) -> g (vi, v, h (vi, e)) -> g (vi, v, NonEmptyVector (vi, e)) forall a b. (a -> b) -> g a -> g b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap (vi, v, h (vi, e)) -> (vi, v, NonEmptyVector (vi, e)) -sortAround' g (vi, v, h (vi, e)) -vs +sortAround' g (vi, v, h (vi, e)) +vs where - vertexLocs :: Map vi v -vertexLocs = ((vi, v, h (vi, e)) -> Map vi v) + vertexLocs :: Map vi v +vertexLocs = ((vi, v, h (vi, e)) -> Map vi v) -> g (vi, v, h (vi, e)) -> Map vi v forall m a. Monoid m => (a -> m) -> g a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m -foldMap (\(vi -vi,v -v,h (vi, e) +foldMap (\(vi +vi,v +v,h (vi, e) _) -> vi -> v -> Map vi v forall k a. k -> a -> Map k a Map.singleton vi -vi v -v) g (vi, v, h (vi, e)) -vs - sortAround' :: (vi, v, h (vi, e)) -> (vi, v, NonEmptyVector (vi, e)) -sortAround' (vi -vi,v -v,h (vi, e) -adjs) = (vi -vi,v -v, Vector (vi, e) -> NonEmptyVector (vi, e) +vi v +v) g (vi, v, h (vi, e)) +vs + sortAround' :: (vi, v, h (vi, e)) -> (vi, v, NonEmptyVector (vi, e)) +sortAround' (vi +vi,v +v,h (vi, e) +adjs) = (vi +vi,v +v, Vector (vi, e) -> NonEmptyVector (vi, e) forall a. Vector a -> NonEmptyVector a Vector.unsafeFromVector (Vector (vi, e) -> NonEmptyVector (vi, e)) -> Vector (vi, e) -> NonEmptyVector (vi, e) @@ -679,44 +679,44 @@ (Foldable f, Vector vector a) => (a -> a -> Ordering) -> f a -> vector a sortBy (v -> (vi, e) -> (vi, e) -> Ordering -ccwCmpAround' v -v) h (vi, e) -adjs) - ccwCmpAround' :: v -> (vi, e) -> (vi, e) -> Ordering -ccwCmpAround' v -v (vi -ui,e -_) (vi -wi,e +ccwCmpAround' v +v) h (vi, e) +adjs) + ccwCmpAround' :: v -> (vi, e) -> (vi, e) -> Ordering +ccwCmpAround' v +v (vi +ui,e +_) (vi +wi,e _) = v -> v -> v -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => center -> point -> point -> Ordering ccwCmpAround v -v (Map vi v -vertexLocs Map vi v -> vi -> v +v (Map vi v +vertexLocs Map vi v -> vi -> v forall k a. Ord k => Map k a -> k -> a Map.! vi -ui) (Map vi v -vertexLocs Map vi v -> vi -> v +ui) (Map vi v +vertexLocs Map vi v -> vi -> v forall k a. Ord k => Map k a -> k -> a Map.! vi -wi) +wi) -instance ( Point_ v 2 (NumType v) - , Ord (NumType v), Num (NumType v) - ) => Graph_ (PlaneGraph s v e f) where - type GraphFromAdjListExtraConstraints (PlaneGraph s v e f) h = (f ~ (), Foldable1 h) +instance ( Point_ v 2 (NumType v) + , Ord (NumType v), Num (NumType v) + ) => Graph_ (PlaneGraph s v e f) where + type GraphFromAdjListExtraConstraints (PlaneGraph s v e f) h = (f ~ (), Foldable1 h) - fromAdjacencyLists :: forall (f :: * -> *) (h :: * -> *) vi v e. + fromAdjacencyLists :: forall (f :: * -> *) (h :: * -> *) vi v e. (Foldable1 f, Functor f, Foldable h, Functor h, vi ~ VertexIx (PlaneGraph s v e f), v ~ Vertex (PlaneGraph s v e f), e ~ Edge (PlaneGraph s v e f), GraphFromAdjListExtraConstraints (PlaneGraph s v e f) h) => f (vi, v, h (vi, e)) -> PlaneGraph s v e f -fromAdjacencyLists = f (vi, v, NonEmptyVector (vi, e)) -> PlaneGraph s v e f +fromAdjacencyLists = f (vi, v, NonEmptyVector (vi, e)) -> PlaneGraph s v e f forall planeGraph vertex (f :: * -> *) (h :: * -> *) vi v e. (PlaneGraph_ planeGraph vertex, Foldable1 f, Functor f, Foldable h, Functor h, vi ~ VertexIx planeGraph, v ~ Vertex planeGraph, @@ -744,13 +744,13 @@ g (vi, v, h (vi, e)) -> g (vi, v, NonEmptyVector (vi, e)) toEmbedding - neighboursOf :: VertexIx (PlaneGraph s v e f) + neighboursOf :: VertexIx (PlaneGraph s v e f) -> IndexedFold (VertexIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Vertex (PlaneGraph s v e f)) -neighboursOf VertexIx (PlaneGraph s v e f) -u = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +neighboursOf VertexIx (PlaneGraph s v e f) +u = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -776,14 +776,14 @@ VertexIx graph -> IndexedFold (VertexIx graph) graph (Vertex graph) neighboursOf VertexIx (PlanarGraph s 'Primal v e f) VertexIx (PlaneGraph s v e f) -u - incidentEdgesOf :: VertexIx (PlaneGraph s v e f) +u + incidentEdgesOf :: VertexIx (PlaneGraph s v e f) -> IndexedFold (EdgeIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Edge (PlaneGraph s v e f)) -incidentEdgesOf VertexIx (PlaneGraph s v e f) -u = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +incidentEdgesOf VertexIx (PlaneGraph s v e f) +u = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -809,15 +809,15 @@ VertexIx graph -> IndexedFold (EdgeIx graph) graph (Edge graph) incidentEdgesOf VertexIx (PlanarGraph s 'Primal v e f) VertexIx (PlaneGraph s v e f) -u +u -instance ( Point_ v 2 (NumType v) - , Ord (NumType v), Num (NumType v) - ) => PlanarGraph_ (PlaneGraph s v e f) where - type DualGraphOf (PlaneGraph s v e f) = PlanarGraph s Dual f e v +instance ( Point_ v 2 (NumType v) + , Ord (NumType v), Num (NumType v) + ) => PlanarGraph_ (PlaneGraph s v e f) where + type DualGraphOf (PlaneGraph s v e f) = PlanarGraph s Dual f e v - dualGraph :: PlaneGraph s v e f -> DualGraphOf (PlaneGraph s v e f) -dualGraph = PlanarGraph s 'Primal v e f + dualGraph :: PlaneGraph s v e f -> DualGraphOf (PlaneGraph s v e f) +dualGraph = PlanarGraph s 'Primal v e f -> DualGraphOf (PlanarGraph s 'Primal v e f) PlanarGraph s 'Primal v e f -> PlanarGraph s 'Dual f e v forall planarGraph. @@ -830,15 +830,15 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @_ @(PlanarGraph s Primal v e f) +coerce @_ @(PlanarGraph s Primal v e f) - leftFaceOf :: DartIx (PlaneGraph s v e f) + leftFaceOf :: DartIx (PlaneGraph s v e f) -> IndexedLens' (FaceIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Face (PlaneGraph s v e f)) -leftFaceOf DartIx (PlaneGraph s v e f) -d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +leftFaceOf DartIx (PlaneGraph s v e f) +d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -865,14 +865,14 @@ -> IndexedLens' (FaceIx planarGraph) planarGraph (Face planarGraph) leftFaceOf DartIx (PlanarGraph s 'Primal v e f) DartIx (PlaneGraph s v e f) -d - rightFaceOf :: DartIx (PlaneGraph s v e f) +d + rightFaceOf :: DartIx (PlaneGraph s v e f) -> IndexedLens' (FaceIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Face (PlaneGraph s v e f)) -rightFaceOf DartIx (PlaneGraph s v e f) -d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +rightFaceOf DartIx (PlaneGraph s v e f) +d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -899,15 +899,15 @@ -> IndexedLens' (FaceIx planarGraph) planarGraph (Face planarGraph) rightFaceOf DartIx (PlanarGraph s 'Primal v e f) DartIx (PlaneGraph s v e f) -d +d - nextDartOf :: DartIx (PlaneGraph s v e f) + nextDartOf :: DartIx (PlaneGraph s v e f) -> IndexedLens' (DartIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Dart (PlaneGraph s v e f)) -nextDartOf DartIx (PlaneGraph s v e f) -d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +nextDartOf DartIx (PlaneGraph s v e f) +d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -934,14 +934,14 @@ -> IndexedLens' (DartIx planarGraph) planarGraph (Dart planarGraph) nextDartOf DartIx (PlanarGraph s 'Primal v e f) DartIx (PlaneGraph s v e f) -d - prevDartOf :: DartIx (PlaneGraph s v e f) +d + prevDartOf :: DartIx (PlaneGraph s v e f) -> IndexedLens' (DartIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Dart (PlaneGraph s v e f)) -prevDartOf DartIx (PlaneGraph s v e f) -d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +prevDartOf DartIx (PlaneGraph s v e f) +d = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -968,15 +968,15 @@ -> IndexedLens' (DartIx planarGraph) planarGraph (Dart planarGraph) prevDartOf DartIx (PlanarGraph s 'Primal v e f) DartIx (PlaneGraph s v e f) -d +d - boundaryDartOf :: FaceIx (PlaneGraph s v e f) + boundaryDartOf :: FaceIx (PlaneGraph s v e f) -> IndexedLens' (DartIx (PlaneGraph s v e f)) (PlaneGraph s v e f) (Dart (PlaneGraph s v e f)) -boundaryDartOf FaceIx (PlaneGraph s v e f) -f = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) +boundaryDartOf FaceIx (PlaneGraph s v e f) +f = (PlanarGraph s 'Primal v e f -> f (PlanarGraph s 'Primal v e f)) -> PlaneGraph s v e f -> f (PlaneGraph s v e f) forall {k} (s :: k) v e f v' e' f' (p :: * -> * -> *) (f :: * -> *). @@ -1003,12 +1003,12 @@ -> IndexedLens' (DartIx planarGraph) planarGraph (Dart planarGraph) boundaryDartOf FaceIx (PlanarGraph s 'Primal v e f) FaceIx (PlaneGraph s v e f) -f - boundaryDarts :: FaceIx (PlaneGraph s v e f) +f + boundaryDarts :: FaceIx (PlaneGraph s v e f) -> PlaneGraph s v e f -> NonEmptyVector (DartIx (PlaneGraph s v e f)) -boundaryDarts FaceIx (PlaneGraph s v e f) -f = FaceIx (PlanarGraph s 'Primal v e f) +boundaryDarts FaceIx (PlaneGraph s v e f) +f = FaceIx (PlanarGraph s 'Primal v e f) -> PlanarGraph s 'Primal v e f -> NonEmptyVector (DartIx (PlanarGraph s 'Primal v e f)) forall planarGraph. @@ -1017,20 +1017,20 @@ -> planarGraph -> NonEmptyVector (DartIx planarGraph) boundaryDarts FaceIx (PlanarGraph s 'Primal v e f) FaceIx (PlaneGraph s v e f) -f (PlanarGraph s 'Primal v e f -> NonEmptyVector (DartId s)) +f (PlanarGraph s 'Primal v e f -> NonEmptyVector (DartId s)) -> (PlaneGraph s v e f -> PlanarGraph s 'Primal v e f) -> PlaneGraph s v e f -> NonEmptyVector (DartId s) forall b c a. (b -> c) -> (a -> b) -> a -> c . forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @_ @(PlanarGraph s Primal v e f) +coerce @_ @(PlanarGraph s Primal v e f) -instance ( Point_ v 2 (NumType v) - , Ord (NumType v), Num (NumType v) - ) => PlaneGraph_ (PlaneGraph s v e f) v where - fromEmbedding :: forall (f :: * -> *) (h :: * -> *) vi v e. +instance ( Point_ v 2 (NumType v) + , Ord (NumType v), Num (NumType v) + ) => PlaneGraph_ (PlaneGraph s v e f) v where + fromEmbedding :: forall (f :: * -> *) (h :: * -> *) vi v e. (Foldable1 f, Functor f, Foldable h, Functor h, vi ~ VertexIx (PlaneGraph s v e f), v ~ Vertex (PlaneGraph s v e f), e ~ Edge (PlaneGraph s v e f), @@ -1060,16 +1060,16 @@ f (vi, v, h (vi, e)) -> PlanarGraph s 'Primal v e f fromAdjacencyLists -instance ( Point_ v 2 r, Point_ v' 2 r' - ) => HasPoints (PlaneGraph s v e f) - (PlaneGraph s v' e f) v v' where - allPoints :: forall (d :: Nat) r r'. +instance ( Point_ v 2 r, Point_ v' 2 r' + ) => HasPoints (PlaneGraph s v e f) + (PlaneGraph s v' e f) v v' where + allPoints :: forall (d :: Nat) r r'. (Point_ v d r, Point_ v' d r', NumType (PlaneGraph s v e f) ~ r, NumType (PlaneGraph s v' e f) ~ r', Dimension (PlaneGraph s v e f) ~ d, Dimension (PlaneGraph s v' e f) ~ d) => Traversal1 (PlaneGraph s v e f) (PlaneGraph s v' e f) v v' -allPoints = (v -> f v') -> PlaneGraph s v e f -> f (PlaneGraph s v' e f) +allPoints = (v -> f v') -> PlaneGraph s v e f -> f (PlaneGraph s v' e f) (Vertex (PlaneGraph s v e f) -> f (Vertex (PlaneGraph s v' e f))) -> PlaneGraph s v e f -> f (PlaneGraph s v' e f) forall graph graph'. @@ -1084,13 +1084,13 @@ (Vertex (PlaneGraph s v' e f)) vertices -instance ( Point_ v 2 r - , Ord r, Num r - ) => IsBoxable (PlaneGraph s v e f) +instance ( Point_ v 2 r + , Ord r, Num r + ) => IsBoxable (PlaneGraph s v e f) -instance ( Point_ v 2 r - , DefaultTransformByConstraints (PlaneGraph s v e f) 2 r - ) => IsTransformable (PlaneGraph s v e f) +instance ( Point_ v 2 r + , DefaultTransformByConstraints (PlaneGraph s v e f) 2 r + ) => IsTransformable (PlaneGraph s v e f) diff --git a/haddocks/hgeometry/src/HGeometry.PolyLine.Class.html b/haddocks/hgeometry/src/HGeometry.PolyLine.Class.html index 225af23d2..44cd048ed 100644 --- a/haddocks/hgeometry/src/HGeometry.PolyLine.Class.html +++ b/haddocks/hgeometry/src/HGeometry.PolyLine.Class.html @@ -25,31 +25,31 @@ -------------------------------------------------------------------------------- -- | A class representing PolyLines -class ( HasVertices polyLine polyLine - , HasPoints' polyLine point - , HasStart polyLine point - , HasEnd polyLine point - , Vertex polyLine ~ point - , Point_ point (Dimension point) (NumType point) - , NumType polyLine ~ NumType point - , Dimension polyLine ~ Dimension point - ) => PolyLine_ polyLine point | polyLine -> point where +class ( HasVertices polyLine polyLine + , HasPoints' polyLine point + , HasStart polyLine point + , HasEnd polyLine point + , Vertex polyLine ~ point + , Point_ point (Dimension point) (NumType point) + , NumType polyLine ~ NumType point + , Dimension polyLine ~ Dimension point + ) => PolyLine_ polyLine point | polyLine -> point where -- | Class for constructable polylglines -class PolyLine_ polyLine point => ConstructablePolyLine_ polyLine point where +class PolyLine_ polyLine point => ConstructablePolyLine_ polyLine point where -- | Constructs a polyline from a given sequence of points. -- -- pre: there should be at least two distinct points - polyLineFromPoints :: Foldable1 f => f point -> polyLine + polyLineFromPoints :: Foldable1 f => f point -> polyLine -- maybe make these two functions into a prism instead -- | Prism between a polyline and a line segment -_PolyLineLineSegment :: ( ConstructableLineSegment_ lineSegment point - , ConstructablePolyLine_ polyLine point - ) => Prism' polyLine lineSegment +_PolyLineLineSegment :: ( ConstructableLineSegment_ lineSegment point + , ConstructablePolyLine_ polyLine point + ) => Prism' polyLine lineSegment _PolyLineLineSegment :: forall lineSegment point polyLine. (ConstructableLineSegment_ lineSegment point, ConstructablePolyLine_ polyLine point) => @@ -63,7 +63,7 @@ (ConstructablePolyLine_ c (Vertex c), HasStart s (Vertex c), HasEnd s (Vertex c)) => s -> c -lineSegmentToPolyLine polyLine -> Maybe lineSegment +lineSegmentToPolyLine polyLine -> Maybe lineSegment forall {a} {s}. (HasVertices s s, ConstructableLineSegment_ a (IxValue (EndPointOf a)), @@ -74,11 +74,11 @@ (Dimension (IxValue (EndPointOf a))) (NumType (IxValue (EndPointOf a)))) => s -> Maybe a -polyLineToLineSegment +polyLineToLineSegment where - lineSegmentToPolyLine :: s -> c -lineSegmentToPolyLine s -s = NonEmpty (Vertex c) -> c + lineSegmentToPolyLine :: s -> c +lineSegmentToPolyLine s +s = NonEmpty (Vertex c) -> c forall polyLine point (f :: * -> *). (ConstructablePolyLine_ polyLine point, Foldable1 f) => f point -> polyLine @@ -91,22 +91,22 @@ NonEmpty.fromList ([Vertex c] -> c) -> [Vertex c] -> c forall a b. (a -> b) -> a -> b $ [s -ss -> Getting (Vertex c) s (Vertex c) -> Vertex c +ss -> Getting (Vertex c) s (Vertex c) -> Vertex c forall s a. s -> Getting a s a -> a ^.Getting (Vertex c) s (Vertex c) forall seg p. HasStart seg p => Lens' seg p Lens' s (Vertex c) start, s -ss -> Getting (Vertex c) s (Vertex c) -> Vertex c +ss -> Getting (Vertex c) s (Vertex c) -> Vertex c forall s a. s -> Getting a s a -> a ^.Getting (Vertex c) s (Vertex c) forall seg p. HasEnd seg p => Lens' seg p Lens' s (Vertex c) end] - polyLineToLineSegment :: s -> Maybe a -polyLineToLineSegment s -pl + polyLineToLineSegment :: s -> Maybe a +polyLineToLineSegment s +pl | Getting (Endo (Endo Int)) s (Vertex s) -> s -> Int forall s a. Getting (Endo (Endo Int)) s a -> s -> Int lengthOf Getting (Endo (Endo Int)) s (Vertex s) @@ -116,7 +116,7 @@ (VertexIx graph) graph graph' (Vertex graph) (Vertex graph') IndexedTraversal1 (VertexIx s) s s (Vertex s) (Vertex s) vertices s -pl Int -> Int -> Bool +pl Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int 2 = a -> Maybe a @@ -128,7 +128,7 @@ ConstructableLineSegment_ lineSegment point => point -> point -> lineSegment uncheckedLineSegment (s -pls +pls -> Getting (IxValue (EndPointOf a)) s (IxValue (EndPointOf a)) -> IxValue (EndPointOf a) forall s a. s -> Getting a s a -> a @@ -136,7 +136,7 @@ forall seg p. HasStart seg p => Lens' seg p Lens' s (IxValue (EndPointOf a)) start) (s -pls +pls -> Getting (IxValue (EndPointOf a)) s (IxValue (EndPointOf a)) -> IxValue (EndPointOf a) forall s a. s -> Getting a s a -> a diff --git a/haddocks/hgeometry/src/HGeometry.PolyLine.Frechet.Discrete.html b/haddocks/hgeometry/src/HGeometry.PolyLine.Frechet.Discrete.html index 3fb729282..3218fc6a5 100644 --- a/haddocks/hgeometry/src/HGeometry.PolyLine.Frechet.Discrete.html +++ b/haddocks/hgeometry/src/HGeometry.PolyLine.Frechet.Discrete.html @@ -22,49 +22,49 @@ -- -- O(nm*(I+T)), where I is the time to index one of the vertices and T is the time to -- evaluate the distance function. -frechetDistanceWith :: ( HasVertices' polyLine - , HasVertices' polyLine' - , Ord r - , VertexIx polyLine ~ Int, VertexIx polyLine' ~ Int +frechetDistanceWith :: ( HasVertices' polyLine + , HasVertices' polyLine' + , Ord r + , VertexIx polyLine ~ Int, VertexIx polyLine' ~ Int ) - => (Vertex polyLine -> Vertex polyLine' -> r) - -> polyLine -> polyLine' - -> r + => (Vertex polyLine -> Vertex polyLine' -> r) + -> polyLine -> polyLine' + -> r frechetDistanceWith :: forall polyLine polyLine' r. (HasVertices' polyLine, HasVertices' polyLine', Ord r, VertexIx polyLine ~ Int, VertexIx polyLine' ~ Int) => (Vertex polyLine -> Vertex polyLine' -> r) -> polyLine -> polyLine' -> r -frechetDistanceWith Vertex polyLine -> Vertex polyLine' -> r -dist' polyLine -polyP polyLine' -polyQ = (Int, Int) -> r -fd (Int -n,Int -m) +frechetDistanceWith Vertex polyLine -> Vertex polyLine' -> r +dist' polyLine +polyP polyLine' +polyQ = (Int, Int) -> r +fd (Int +n,Int +m) where - n :: Int -n = polyLine -> Int + n :: Int +n = polyLine -> Int forall graph. HasVertices' graph => graph -> Int numVertices polyLine -polyP Int -> Int -> Int +polyP Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1 - m :: Int -m = polyLine' -> Int + m :: Int +m = polyLine' -> Int forall graph. HasVertices' graph => graph -> Int numVertices polyLine' -polyQ Int -> Int -> Int +polyQ Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1 - dist :: Int -> Int -> r -dist Int -i Int -j = Vertex polyLine -> Vertex polyLine' -> r -dist' (polyLine -polyPpolyLine + dist :: Int -> Int -> r +dist Int +i Int +j = Vertex polyLine -> Vertex polyLine' -> r +dist' (polyLine +polyPpolyLine -> Getting (Endo (Vertex polyLine)) polyLine (Vertex polyLine) -> Vertex polyLine forall s a. HasCallStack => s -> Getting (Endo a) s a -> a @@ -76,8 +76,8 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt Int VertexIx polyLine -i) (polyLine' -polyQpolyLine' +i) (polyLine' +polyQpolyLine' -> Getting (Endo (Vertex polyLine')) polyLine' (Vertex polyLine') -> Vertex polyLine' forall s a. HasCallStack => s -> Getting (Endo a) s a -> a @@ -90,84 +90,84 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt Int VertexIx polyLine' -j) +j) -- use dynamic programming - fd :: (Int, Int) -> r -fd = ((Int, Int), (Int, Int)) -> ((Int, Int) -> r) -> (Int, Int) -> r + fd :: (Int, Int) -> r +fd = ((Int, Int), (Int, Int)) -> ((Int, Int) -> r) -> (Int, Int) -> r forall i a. Ix i => (i, i) -> (i -> a) -> i -> a memo ((Int 0, Int 0), (Int -n, Int -m)) (Int, Int) -> r -fd' +n, Int +m)) (Int, Int) -> r +fd' - fd' :: (Int, Int) -> r -fd' (Int + fd' :: (Int, Int) -> r +fd' (Int 0,Int 0) = Int -> Int -> r -dist Int +dist Int 0 Int 0 - fd' (Int -0,Int -q) = Int -> Int -> r -dist Int + fd' (Int +0,Int +q) = Int -> Int -> r +dist Int 0 Int -q r -> r -> r +q r -> r -> r forall a. Ord a => a -> a -> a `max` (Int, Int) -> r -fd (Int +fd (Int 0, Int -qInt -> Int -> Int +qInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) - fd' (Int -p,Int + fd' (Int +p,Int 0) = Int -> Int -> r -dist Int -p Int +dist Int +p Int 0 r -> r -> r forall a. Ord a => a -> a -> a `max` (Int, Int) -> r -fd (Int -pInt -> Int -> Int +fd (Int +pInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1, Int 0) - fd' (Int -p,Int -q) = Int -> Int -> r -dist Int -p Int -q r -> r -> r + fd' (Int +p,Int +q) = Int -> Int -> r +dist Int +p Int +q r -> r -> r forall a. Ord a => a -> a -> a `max` ((Int, Int) -> r -fd (Int -p, Int -qInt -> Int -> Int +fd (Int +p, Int +qInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) r -> r -> r forall a. Ord a => a -> a -> a `min` (Int, Int) -> r -fd (Int -pInt -> Int -> Int +fd (Int +pInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1, Int -q) r -> r -> r +q) r -> r -> r forall a. Ord a => a -> a -> a `min` (Int, Int) -> r -fd (Int -pInt -> Int -> Int +fd (Int +pInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1, Int -qInt -> Int -> Int +qInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1)) @@ -177,28 +177,28 @@ -- * Dynamic programming / Memoization stuff -- | Create a table -tabulate :: Ix i => (i,i) -> (i -> a) -> Array i a +tabulate :: Ix i => (i,i) -> (i -> a) -> Array i a tabulate :: forall i a. Ix i => (i, i) -> (i -> a) -> Array i a -tabulate (i, i) -rng i -> a -f = (i, i) -> [a] -> Array i a +tabulate (i, i) +rng i -> a +f = (i, i) -> [a] -> Array i a forall i e. Ix i => (i, i) -> [e] -> Array i e listArray (i, i) -rng ((i -> a) -> [i] -> [a] +rng ((i -> a) -> [i] -> [a] forall a b. (a -> b) -> [a] -> [b] map i -> a -f ([i] -> [a]) -> [i] -> [a] +f ([i] -> [a]) -> [i] -> [a] forall a b. (a -> b) -> a -> b $ (i, i) -> [i] forall a. Ix a => (a, a) -> [a] range (i, i) -rng) +rng) -- | Memoize a function using an Array -memo :: Ix i => (i,i) -> (i -> a) -> (i -> a) +memo :: Ix i => (i,i) -> (i -> a) -> (i -> a) memo :: forall i a. Ix i => (i, i) -> (i -> a) -> i -> a -memo (i, i) -rng = Array i a -> i -> a +memo (i, i) +rng = Array i a -> i -> a forall i e. Ix i => Array i e -> i -> e (!) (Array i a -> i -> a) -> ((i -> a) -> Array i a) -> (i -> a) -> i -> a @@ -206,7 +206,7 @@ . (i, i) -> (i -> a) -> Array i a forall i a. Ix i => (i, i) -> (i -> a) -> Array i a tabulate (i, i) -rng +rng -- see: for the idea of this memoization -- https://byorgey.wordpress.com/2023/06/06/dynamic-programming-in-haskell-automatic-memoization/ diff --git a/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.DouglasPeucker.html b/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.DouglasPeucker.html index 2c8cbc3ff..e8af08182 100644 --- a/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.DouglasPeucker.html +++ b/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.DouglasPeucker.html @@ -29,20 +29,20 @@ -- original polyline. -- -- Running time: \( O(n^2) \) worst case, \( O(n log n) \) on average. -douglasPeucker :: forall polyLine point d r. - ( PolyLine_ polyLine point - , Point_ point d r - , Ord r, Fractional r - , HasSquaredEuclideanDistance point +douglasPeucker :: forall polyLine point d r. + ( PolyLine_ polyLine point + , Point_ point d r + , Ord r, Fractional r + , HasSquaredEuclideanDistance point ) - => r -> polyLine -> PolyLineF ViewR1 point + => r -> polyLine -> PolyLineF ViewR1 point douglasPeucker :: forall polyLine point (d :: Nat) r. (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLineF ViewR1 point -douglasPeucker r -eps = PolyLineF ViewR1 point -> PolyLineF ViewR1 point -go (PolyLineF ViewR1 point -> PolyLineF ViewR1 point) +douglasPeucker r +eps = PolyLineF ViewR1 point -> PolyLineF ViewR1 point +go (PolyLineF ViewR1 point -> PolyLineF ViewR1 point) -> (polyLine -> PolyLineF ViewR1 point) -> polyLine -> PolyLineF ViewR1 point @@ -75,17 +75,17 @@ Traversal1 polyLine polyLine point point allPoints where - go :: PolyLineF ViewR1 point -> PolyLineF ViewR1 point -go PolyLineF ViewR1 point -pl + go :: PolyLineF ViewR1 point -> PolyLineF ViewR1 point +go PolyLineF ViewR1 point +pl | r -dst r -> r -> Bool +dst r -> r -> Bool forall a. Ord a => a -> a -> Bool <= (r -epsr -> r -> r +epsr -> r -> r forall a. Num a => a -> a -> a *r -eps) = NonEmpty point -> PolyLineF ViewR1 point +eps) = NonEmpty point -> PolyLineF ViewR1 point forall polyLine point (f :: * -> *). (ConstructablePolyLine_ polyLine point, Foldable1 f) => f point -> polyLine @@ -96,50 +96,50 @@ -> NonEmpty point -> PolyLineF ViewR1 point forall a b. (a -> b) -> a -> b $ point -a point -> [point] -> NonEmpty point +a point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :| [point -b] +b] | Bool otherwise = PolyLineF ViewR1 point -> PolyLineF ViewR1 point -go PolyLineF ViewR1 point -pref PolyLineF ViewR1 point +go PolyLineF ViewR1 point +pref PolyLineF ViewR1 point -> PolyLineF ViewR1 point -> PolyLineF ViewR1 point forall point. PolyLineF ViewR1 point -> PolyLineF ViewR1 point -> PolyLineF ViewR1 point `merge` PolyLineF ViewR1 point -> PolyLineF ViewR1 point -go PolyLineF ViewR1 point -subf +go PolyLineF ViewR1 point +subf where - a, b :: point - a :: point -a = PolyLineF ViewR1 point -plPolyLineF ViewR1 point + a, b :: point + a :: point +a = PolyLineF ViewR1 point +plPolyLineF ViewR1 point -> Getting point (PolyLineF ViewR1 point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (PolyLineF ViewR1 point) point forall seg p. HasStart seg p => Lens' seg p Lens' (PolyLineF ViewR1 point) point start - b :: point -b = PolyLineF ViewR1 point -plPolyLineF ViewR1 point + b :: point +b = PolyLineF ViewR1 point +plPolyLineF ViewR1 point -> Getting point (PolyLineF ViewR1 point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (PolyLineF ViewR1 point) point forall seg p. HasEnd seg p => Lens' seg p Lens' (PolyLineF ViewR1 point) point end - (OnSnd Int -i r -dst) = ViewR1 point -> ClosedLineSegment point -> OnSnd r + (OnSnd Int +i r +dst) = ViewR1 point -> ClosedLineSegment point -> OnSnd r forall point (d :: Nat) r (f :: * -> *). (Point_ point d r, Ord r, Fractional r, Foldable1WithIndex Int f, HasSquaredEuclideanDistance point) => f point -> ClosedLineSegment point -> OnSnd r maxDist (PolyLineF ViewR1 point -plPolyLineF ViewR1 point +plPolyLineF ViewR1 point -> Getting (ViewR1 point) (PolyLineF ViewR1 point) (ViewR1 point) -> ViewR1 point forall s a. s -> Getting a s a -> a @@ -152,11 +152,11 @@ _PolyLineF) (point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -a point -b) - (PolyLineF ViewR1 point -pref,PolyLineF ViewR1 point -subf) = Int +a point +b) + (PolyLineF ViewR1 point +pref,PolyLineF ViewR1 point +subf) = Int -> PolyLineF ViewR1 point -> (PolyLineF ViewR1 point, PolyLineF ViewR1 point) forall point. @@ -164,23 +164,23 @@ -> PolyLineF ViewR1 point -> (PolyLineF ViewR1 point, PolyLineF ViewR1 point) split Int -i PolyLineF ViewR1 point -pl +i PolyLineF ViewR1 point +pl -------------------------------------------------------------------------------- -- * Internal functions -- | Concatenate the two polylines, dropping their shared vertex -merge :: PolyLineF ViewR1 point -> PolyLineF ViewR1 point -> PolyLineF ViewR1 point +merge :: PolyLineF ViewR1 point -> PolyLineF ViewR1 point -> PolyLineF ViewR1 point merge :: forall point. PolyLineF ViewR1 point -> PolyLineF ViewR1 point -> PolyLineF ViewR1 point -merge PolyLineF ViewR1 point -pref PolyLineF ViewR1 point -sub = let (point -_ :<< Seq point -sub') = PolyLineF ViewR1 point -subPolyLineF ViewR1 point +merge PolyLineF ViewR1 point +pref PolyLineF ViewR1 point +sub = let (point +_ :<< Seq point +sub') = PolyLineF ViewR1 point +subPolyLineF ViewR1 point -> Getting (ViewL1 point) (PolyLineF ViewR1 point) (ViewL1 point) -> ViewL1 point forall s a. s -> Getting a s a -> a @@ -215,7 +215,7 @@ -> ViewR1 point -> PolyLineF ViewR1 point forall a b. (a -> b) -> a -> b $ (PolyLineF ViewR1 point -prefPolyLineF ViewR1 point +prefPolyLineF ViewR1 point -> Getting (ViewR1 point) (PolyLineF ViewR1 point) (ViewR1 point) -> ViewR1 point forall s a. s -> Getting a s a -> a @@ -228,56 +228,56 @@ _PolyLineF) ViewR1 point -> Seq point -> ViewR1 point forall a. ViewR1 a -> Seq a -> ViewR1 a <>> Seq point -sub' +sub' -- | Split the polyline at the given vertex. Both polylines contain this vertex -split :: Int -> PolyLineF ViewR1 point - -> (PolyLineF ViewR1 point, PolyLineF ViewR1 point) +split :: Int -> PolyLineF ViewR1 point + -> (PolyLineF ViewR1 point, PolyLineF ViewR1 point) split :: forall point. Int -> PolyLineF ViewR1 point -> (PolyLineF ViewR1 point, PolyLineF ViewR1 point) -split Int -i (PolyLine (Seq point -vs :>> point -r)) = (ViewR1 point -> PolyLineF ViewR1 point +split Int +i (PolyLine (Seq point +vs :>> point +r)) = (ViewR1 point -> PolyLineF ViewR1 point forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine ViewR1 point -ls, ViewR1 point -> PolyLineF ViewR1 point +ls, ViewR1 point -> PolyLineF ViewR1 point forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine ViewR1 point -rs) +rs) where - (Seq point -ls',Seq point -rs') = Int -> Seq point -> (Seq point, Seq point) + (Seq point +ls',Seq point +rs') = Int -> Seq point -> (Seq point, Seq point) forall a. Int -> Seq a -> (Seq a, Seq a) Seq.splitAt (Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Seq point -vs - (ViewR1 point -ls,ViewR1 point -rs) = case Seq point -> ViewR point +vs + (ViewR1 point +ls,ViewR1 point +rs) = case Seq point -> ViewR point forall a. Seq a -> ViewR a Seq.viewr Seq point -ls' of - (Seq point -xs Seq.:> point -v) -> (Seq point -xs Seq point -> point -> ViewR1 point +ls' of + (Seq point +xs Seq.:> point +v) -> (Seq point +xs Seq point -> point -> ViewR1 point forall a. Seq a -> a -> ViewR1 a :>> point -v, (point -v point -> Seq point -> Seq point +v, (point +v point -> Seq point -> Seq point forall a. a -> Seq a -> Seq a :<| Seq point -rs') Seq point -> point -> ViewR1 point +rs') Seq point -> point -> ViewR1 point forall a. Seq a -> a -> ViewR1 a :>> point -r) +r) ViewR point _ -> [Char] -> (ViewR1 point, ViewR1 point) forall a. HasCallStack => [Char] -> a @@ -288,27 +288,27 @@ -- | Given a sequence of points, find the index of the point that has the -- Furthest distance to the LineSegment. The result is the index of the point -- and this distance. -maxDist :: ( Point_ point d r, Ord r, Fractional r, Foldable1WithIndex Int f - , HasSquaredEuclideanDistance point +maxDist :: ( Point_ point d r, Ord r, Fractional r, Foldable1WithIndex Int f + , HasSquaredEuclideanDistance point ) - => f point -> ClosedLineSegment point -> OnSnd r + => f point -> ClosedLineSegment point -> OnSnd r maxDist :: forall point (d :: Nat) r (f :: * -> *). (Point_ point d r, Ord r, Fractional r, Foldable1WithIndex Int f, HasSquaredEuclideanDistance point) => f point -> ClosedLineSegment point -> OnSnd r -maxDist f point -pts ClosedLineSegment point -s = (Int -> point -> OnSnd r) -> f point -> OnSnd r +maxDist f point +pts ClosedLineSegment point +s = (Int -> point -> OnSnd r) -> f point -> OnSnd r forall m a. Semigroup m => (Int -> a -> m) -> f a -> m forall i (f :: * -> *) m a. (Foldable1WithIndex i f, Semigroup m) => (i -> a -> m) -> f a -> m -ifoldMap1' (\Int -i point -p -> Int -> r -> OnSnd r +ifoldMap1' (\Int +i point +p -> Int -> r -> OnSnd r forall r. Int -> r -> OnSnd r OnSnd Int -i (r -> OnSnd r) -> r -> OnSnd r +i (r -> OnSnd r) -> r -> OnSnd r forall a b. (a -> b) -> a -> b $ point -> ClosedLineSegment point -> r forall g r (d :: Nat) point. @@ -321,16 +321,16 @@ Point_ point d r) => point -> ClosedLineSegment point -> r squaredEuclideanDistTo point -p ClosedLineSegment point -s) f point -pts +p ClosedLineSegment point +s) f point +pts -data OnSnd r = OnSnd { forall r. OnSnd r -> Int +data OnSnd r = OnSnd { forall r. OnSnd r -> Int _getI :: {-# UNPACK #-}!Int, forall r. OnSnd r -> r -getR :: !r } +getR :: !r } -instance Eq r => Eq (OnSnd r) where - == :: OnSnd r -> OnSnd r -> Bool +instance Eq r => Eq (OnSnd r) where + == :: OnSnd r -> OnSnd r -> Bool (==) = r -> r -> Bool forall a. Eq a => a -> a -> Bool (==) (r -> r -> Bool) -> (OnSnd r -> r) -> OnSnd r -> OnSnd r -> Bool @@ -338,24 +338,24 @@ `on` OnSnd r -> r forall r. OnSnd r -> r getR -instance Ord r => Ord (OnSnd r) where - compare :: OnSnd r -> OnSnd r -> Ordering -compare = (OnSnd r -> r) -> OnSnd r -> OnSnd r -> Ordering +instance Ord r => Ord (OnSnd r) where + compare :: OnSnd r -> OnSnd r -> Ordering +compare = (OnSnd r -> r) -> OnSnd r -> OnSnd r -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing OnSnd r -> r forall r. OnSnd r -> r getR -instance Ord r => Semigroup (OnSnd r) where - OnSnd r -a <> :: OnSnd r -> OnSnd r -> OnSnd r -<> OnSnd r -b | OnSnd r -a OnSnd r -> OnSnd r -> Bool +instance Ord r => Semigroup (OnSnd r) where + OnSnd r +a <> :: OnSnd r -> OnSnd r -> OnSnd r +<> OnSnd r +b | OnSnd r +a OnSnd r -> OnSnd r -> Bool forall a. Ord a => a -> a -> Bool < OnSnd r -b = OnSnd r -b -- return the max +b = OnSnd r +b -- return the max | Bool otherwise = OnSnd r -a +a \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.ImaiIri.html b/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.ImaiIri.html index 012f42190..1ba4b44e3 100644 --- a/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.ImaiIri.html +++ b/haddocks/hgeometry/src/HGeometry.PolyLine.Simplification.ImaiIri.html @@ -30,18 +30,18 @@ -- dist eps to the original polyline. -- -- Running time: \( O(n^2) \) time. -simplify :: ( PolyLine_ polyLine point - , Point_ point d r - , Ord r, Fractional r - , HasSquaredEuclideanDistance point +simplify :: ( PolyLine_ polyLine point + , Point_ point d r + , Ord r, Fractional r + , HasSquaredEuclideanDistance point ) - => r -> polyLine -> PolyLine point + => r -> polyLine -> PolyLine point simplify :: forall polyLine point (d :: Nat) r. (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r, HasSquaredEuclideanDistance point) => r -> polyLine -> PolyLine point -simplify r -eps = +simplify r +eps = (ClosedLineSegment point -> PolyLine point -> Bool) -> polyLine -> PolyLine point forall polyLine point (d :: Nat) r. @@ -55,9 +55,9 @@ -> polyLine -> PolyLine point forall a b. (a -> b) -> a -> b -$ \ClosedLineSegment point -shortcut PolyLine point -subPoly -> Getting All (PolyLine point) point +$ \ClosedLineSegment point +shortcut PolyLine point +subPoly -> Getting All (PolyLine point) point -> (point -> Bool) -> PolyLine point -> Bool forall s a. Getting All s a -> (a -> Bool) -> s -> Bool allOf Getting All (PolyLine point) point @@ -74,14 +74,14 @@ (Vertex (PolyLine point)) (Vertex (PolyLine point)) vertices (ClosedLineSegment point -> point -> Bool -closeTo ClosedLineSegment point -shortcut) PolyLine point -subPoly +closeTo ClosedLineSegment point +shortcut) PolyLine point +subPoly where - closeTo :: ClosedLineSegment point -> point -> Bool -closeTo ClosedLineSegment point -seg point -p = point -> ClosedLineSegment point -> r + closeTo :: ClosedLineSegment point -> point -> Bool +closeTo ClosedLineSegment point +seg point +p = point -> ClosedLineSegment point -> r forall g r (d :: Nat) point. (HasSquaredEuclideanDistance g, r ~ NumType g, d ~ Dimension g, Num r, Point_ point d r) => @@ -92,37 +92,37 @@ Point_ point d r) => point -> ClosedLineSegment point -> r squaredEuclideanDistTo point -p ClosedLineSegment point -seg r -> r -> Bool +p ClosedLineSegment point +seg r -> r -> Bool forall a. Ord a => a -> a -> Bool <= r -epsSq - epsSq :: r -epsSq = r -epsr -> r -> r +epsSq + epsSq :: r +epsSq = r +epsr -> r -> r forall a. Num a => a -> a -> a *r -eps +eps -- | Given a function that tests if the shortcut is valid, compute a -- simplification using the Imai-Iri algorithm. -- -- Running time: \( O(Tn^2 \) time, where \(T\) is the time to -- evaluate the predicate. -simplifyWith :: ( PolyLine_ polyLine point - , Point_ point d r - , Ord r, Fractional r +simplifyWith :: ( PolyLine_ polyLine point + , Point_ point d r + , Ord r, Fractional r ) - => (ClosedLineSegment point -> PolyLine point -> Bool) - -> polyLine -> PolyLine point + => (ClosedLineSegment point -> PolyLine point -> Bool) + -> polyLine -> PolyLine point simplifyWith :: forall polyLine point (d :: Nat) r. (PolyLine_ polyLine point, Point_ point d r, Ord r, Fractional r) => (ClosedLineSegment point -> PolyLine point -> Bool) -> polyLine -> PolyLine point -simplifyWith ClosedLineSegment point -> PolyLine point -> Bool -isValid polyLine -pl = NonEmptyVector point -> PolyLine point +simplifyWith ClosedLineSegment point -> PolyLine point -> Bool +isValid polyLine +pl = NonEmptyVector point -> PolyLine point forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine (NonEmptyVector point -> PolyLine point) -> NonEmptyVector point -> PolyLine point @@ -131,8 +131,8 @@ forall point. NonEmpty Int -> NonEmptyVector point -> NonEmptyVector point extract NonEmpty Int -path (PolyLine point -pl'PolyLine point +path (PolyLine point +pl'PolyLine point -> Getting (NonEmptyVector point) (PolyLine point) (NonEmptyVector point) -> NonEmptyVector point @@ -146,8 +146,8 @@ -> p (PolyLineF f1 point) (f2 (PolyLineF f' point')) _PolyLineF) where - pl' :: PolyLine point -pl' = NonEmpty point -> PolyLine point + pl' :: PolyLine point +pl' = NonEmpty point -> PolyLine point forall polyLine point (f :: * -> *). (ConstructablePolyLine_ polyLine point, Foldable1 f) => f point -> polyLine @@ -172,93 +172,93 @@ allPoints (polyLine -> PolyLine point) -> polyLine -> PolyLine point forall a b. (a -> b) -> a -> b $ polyLine -pl - g :: Graph -g = (ClosedLineSegment point -> PolyLine point -> Bool) +pl + g :: Graph +g = (ClosedLineSegment point -> PolyLine point -> Bool) -> PolyLine point -> Graph forall point. (ClosedLineSegment point -> PolyLine point -> Bool) -> PolyLine point -> Graph mkGraph ClosedLineSegment point -> PolyLine point -> Bool -isValid PolyLine point -pl' - spt :: Tree (VertexIx Graph) -spt = Graph -> VertexIx Graph -> Tree (VertexIx Graph) +isValid PolyLine point +pl' + spt :: Tree (VertexIx Graph) +spt = Graph -> VertexIx Graph -> Tree (VertexIx Graph) forall graph. (DiGraph_ graph, Enum (VertexIx graph)) => graph -> VertexIx graph -> Tree (VertexIx graph) bfs Graph -g Int +g Int VertexIx Graph 0 - path :: NonEmpty Int -path = case Int -> Tree Int -> [NonEmpty Int] + path :: NonEmpty Int +path = case Int -> Tree Int -> [NonEmpty Int] forall a. Eq a => a -> Tree a -> [NonEmpty a] pathsTo (PolyLine point -> Int forall graph. HasVertices' graph => graph -> Int numVertices PolyLine point -pl' Int -> Int -> Int +pl' Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1) Tree Int Tree (VertexIx Graph) -spt of +spt of [] -> [Char] -> NonEmpty Int forall a. HasCallStack => [Char] -> a error [Char] "no path found?" - (NonEmpty Int -pth:[NonEmpty Int] + (NonEmpty Int +pth:[NonEmpty Int] _) -> NonEmpty Int -pth +pth ---------------------------------------- -- | Constructs the shortcut graph -mkGraph :: (ClosedLineSegment point -> PolyLine point -> Bool) - -> PolyLine point -> Graph +mkGraph :: (ClosedLineSegment point -> PolyLine point -> Bool) + -> PolyLine point -> Graph mkGraph :: forall point. (ClosedLineSegment point -> PolyLine point -> Bool) -> PolyLine point -> Graph -mkGraph ClosedLineSegment point -> PolyLineF NonEmptyVector point -> Bool -isValid pl :: PolyLineF NonEmptyVector point -pl@(PolyLine NonEmptyVector point -vs) = +mkGraph ClosedLineSegment point -> PolyLineF NonEmptyVector point -> Bool +isValid pl :: PolyLineF NonEmptyVector point +pl@(PolyLine NonEmptyVector point +vs) = Bounds -> [Bounds] -> Graph buildG Bounds -rng [ (Int -i,Int -j) | Int -i <- Bounds -> [Int] +rng [ (Int +i,Int +j) | Int +i <- Bounds -> [Int] forall a. Ix a => (a, a) -> [a] Array.range Bounds -rng, Int -j <- Bounds -> [Int] +rng, Int +j <- Bounds -> [Int] forall a. Ix a => (a, a) -> [a] Array.range Bounds -rng, Int -i Int -> Int -> Bool +rng, Int +i Int -> Int -> Bool forall a. Ord a => a -> a -> Bool < Int -j, Int -> Int -> Bool -isValid' Int -i Int -j ] +j, Int -> Int -> Bool +isValid' Int +i Int +j ] where - rng :: Bounds -rng = (Int + rng :: Bounds +rng = (Int 0,PolyLineF NonEmptyVector point -> Int forall graph. HasVertices' graph => graph -> Int numVertices PolyLineF NonEmptyVector point -plInt -> Int -> Int +plInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) - isValid' :: Int -> Int -> Bool -isValid' Int -i Int -j = let subPoly :: PolyLineF NonEmptyVector point -subPoly = NonEmptyVector point -> PolyLineF NonEmptyVector point + isValid' :: Int -> Int -> Bool +isValid' Int +i Int +j = let subPoly :: PolyLineF NonEmptyVector point +subPoly = NonEmptyVector point -> PolyLineF NonEmptyVector point forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine (NonEmptyVector point -> PolyLineF NonEmptyVector point) -> (Vector point -> NonEmptyVector point) @@ -274,27 +274,27 @@ Int -> Int -> NonEmptyVector point -> Vector point forall a. Int -> Int -> NonEmptyVector a -> Vector a NonEmptyVector.slice Int -i (Int -jInt -> Int -> Int +i (Int +jInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1Int -> Int -> Int forall a. Num a => a -> a -> a -Int -i) NonEmptyVector point -vs - shortcut :: ClosedLineSegment point -shortcut = point -> point -> ClosedLineSegment point +i) NonEmptyVector point +vs + shortcut :: ClosedLineSegment point +shortcut = point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment (PolyLineF NonEmptyVector point -subPolyPolyLineF NonEmptyVector point +subPolyPolyLineF NonEmptyVector point -> Getting point (PolyLineF NonEmptyVector point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (PolyLineF NonEmptyVector point) point forall seg p. HasStart seg p => Lens' seg p Lens' (PolyLineF NonEmptyVector point) point start) (PolyLineF NonEmptyVector point -subPolyPolyLineF NonEmptyVector point +subPolyPolyLineF NonEmptyVector point -> Getting point (PolyLineF NonEmptyVector point) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (PolyLineF NonEmptyVector point) point @@ -302,20 +302,20 @@ Lens' (PolyLineF NonEmptyVector point) point end) in ClosedLineSegment point -> PolyLineF NonEmptyVector point -> Bool -isValid ClosedLineSegment point -shortcut PolyLineF NonEmptyVector point -subPoly +isValid ClosedLineSegment point +shortcut PolyLineF NonEmptyVector point +subPoly -- | Given a non-empty list of indices, and some LSeq, extract the elemnets -- on those indices. -- -- running time: \(O(n)\) -extract :: NonEmpty Int - -> NonEmptyVector.NonEmptyVector point -> NonEmptyVector.NonEmptyVector point +extract :: NonEmpty Int + -> NonEmptyVector.NonEmptyVector point -> NonEmptyVector.NonEmptyVector point extract :: forall point. NonEmpty Int -> NonEmptyVector point -> NonEmptyVector point -extract NonEmpty Int -is = [point] -> NonEmptyVector point +extract NonEmpty Int +is = [point] -> NonEmptyVector point forall a. [a] -> NonEmptyVector a NonEmptyVector.unsafeFromList ([point] -> NonEmptyVector point) -> (NonEmptyVector point -> [point]) @@ -328,7 +328,7 @@ forall a. NonEmpty a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList NonEmpty Int -is) Int +is) Int 0 ([point] -> [point]) -> (NonEmptyVector point -> [point]) -> NonEmptyVector point @@ -340,7 +340,7 @@ F.toList -- | Extract the indices -extract' :: [Int] -> Int -> [a] -> [a] +extract' :: [Int] -> Int -> [a] -> [a] extract' :: forall a. [Int] -> Int -> [a] -> [a] extract' [] Int _ [a] @@ -349,38 +349,38 @@ _:[Int] _) Int _ [] = [] -extract' is' :: [Int] -is'@(Int -i:[Int] -is) Int -j (a -x:[a] -xs) | Int -i Int -> Int -> Bool +extract' is' :: [Int] +is'@(Int +i:[Int] +is) Int +j (a +x:[a] +xs) | Int +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -j = a -x a -> [a] -> [a] +j = a +x a -> [a] -> [a] forall a. a -> [a] -> [a] : [Int] -> Int -> [a] -> [a] forall a. [Int] -> Int -> [a] -> [a] extract' [Int] -is (Int -jInt -> Int -> Int +is (Int +jInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) [a] -xs +xs | Bool otherwise = [Int] -> Int -> [a] -> [a] forall a. [Int] -> Int -> [a] -> [a] extract' [Int] -is' (Int -jInt -> Int -> Int +is' (Int +jInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) [a] -xs +xs -------------------------------------------------------------------------------- diff --git a/haddocks/hgeometry/src/HGeometry.PolyLine.html b/haddocks/hgeometry/src/HGeometry.PolyLine.html index 18dce297b..e3382e43d 100644 --- a/haddocks/hgeometry/src/HGeometry.PolyLine.html +++ b/haddocks/hgeometry/src/HGeometry.PolyLine.html @@ -37,8 +37,8 @@ -------------------------------------------------------------------------------- -- | Simple polygons just store their vertices in CCCW order -newtype PolyLineF f point = PolyLine (f point) - deriving stock ((forall x. PolyLineF f point -> Rep (PolyLineF f point) x) +newtype PolyLineF f point = PolyLine (f point) + deriving stock ((forall x. PolyLineF f point -> Rep (PolyLineF f point) x) -> (forall x. Rep (PolyLineF f point) x -> PolyLineF f point) -> Generic (PolyLineF f point) forall x. Rep (PolyLineF f point) x -> PolyLineF f point @@ -55,7 +55,7 @@ $cto :: forall k (f :: k -> *) (point :: k) x. Rep (PolyLineF f point) x -> PolyLineF f point to :: forall x. Rep (PolyLineF f point) x -> PolyLineF f point -Generic,Int -> PolyLineF f point -> ShowS +Generic,Int -> PolyLineF f point -> ShowS [PolyLineF f point] -> ShowS PolyLineF f point -> String (Int -> PolyLineF f point -> ShowS) @@ -85,7 +85,7 @@ Show (f point) => [PolyLineF f point] -> ShowS showList :: [PolyLineF f point] -> ShowS -Show, ReadPrec [PolyLineF f point] +Show, ReadPrec [PolyLineF f point] ReadPrec (PolyLineF f point) Int -> ReadS (PolyLineF f point) ReadS [PolyLineF f point] @@ -126,7 +126,7 @@ ReadPrec [PolyLineF f point] readListPrec :: ReadPrec [PolyLineF f point] Read) - deriving newtype (PolyLineF f point -> () + deriving newtype (PolyLineF f point -> () (PolyLineF f point -> ()) -> NFData (PolyLineF f point) forall a. (a -> ()) -> NFData a forall k (f :: k -> *) (point :: k). @@ -136,7 +136,7 @@ NFData (f point) => PolyLineF f point -> () rnf :: PolyLineF f point -> () -NFData,(forall a b. (a -> b) -> PolyLineF f a -> PolyLineF f b) +NFData,(forall a b. (a -> b) -> PolyLineF f a -> PolyLineF f b) -> (forall a b. a -> PolyLineF f b -> PolyLineF f a) -> Functor (PolyLineF f) forall a b. a -> PolyLineF f b -> PolyLineF f a @@ -158,7 +158,7 @@ Functor f => a -> PolyLineF f b -> PolyLineF f a <$ :: forall a b. a -> PolyLineF f b -> PolyLineF f a -Functor,(forall m. Monoid m => PolyLineF f m -> m) +Functor,(forall m. Monoid m => PolyLineF f m -> m) -> (forall m a. Monoid m => (a -> m) -> PolyLineF f a -> m) -> (forall m a. Monoid m => (a -> m) -> PolyLineF f a -> m) -> (forall a b. (a -> b -> b) -> b -> PolyLineF f a -> b) @@ -283,7 +283,7 @@ sum :: forall a. Num a => PolyLineF f a -> a $cproduct :: forall (f :: * -> *) a. (Foldable f, Num a) => PolyLineF f a -> a product :: forall a. Num a => PolyLineF f a -> a -Foldable,Foldable (PolyLineF f) +Foldable,Foldable (PolyLineF f) Foldable (PolyLineF f) => (forall m. Semigroup m => PolyLineF f m -> m) -> (forall m a. Semigroup m => (a -> m) -> PolyLineF f a -> m) @@ -374,7 +374,7 @@ Foldable1 f => (a -> b) -> (a -> b -> b) -> PolyLineF f a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> PolyLineF f a -> b -Foldable1,PolyLineF f point -> PolyLineF f point -> Bool +Foldable1,PolyLineF f point -> PolyLineF f point -> Bool (PolyLineF f point -> PolyLineF f point -> Bool) -> (PolyLineF f point -> PolyLineF f point -> Bool) -> Eq (PolyLineF f point) @@ -390,7 +390,7 @@ Eq (f point) => PolyLineF f point -> PolyLineF f point -> Bool /= :: PolyLineF f point -> PolyLineF f point -> Bool -Eq,Eq (PolyLineF f point) +Eq,Eq (PolyLineF f point) Eq (PolyLineF f point) => (PolyLineF f point -> PolyLineF f point -> Ordering) -> (PolyLineF f point -> PolyLineF f point -> Bool) @@ -453,7 +453,7 @@ Ord (f point) => PolyLineF f point -> PolyLineF f point -> PolyLineF f point min :: PolyLineF f point -> PolyLineF f point -> PolyLineF f point -Ord,(forall a. Eq a => Eq (PolyLineF f a)) => +Ord,(forall a. Eq a => Eq (PolyLineF f a)) => (forall a b. (a -> b -> Bool) -> PolyLineF f a -> PolyLineF f b -> Bool) -> Eq1 (PolyLineF f) @@ -472,7 +472,7 @@ (a -> b -> Bool) -> PolyLineF f a -> PolyLineF f b -> Bool liftEq :: forall a b. (a -> b -> Bool) -> PolyLineF f a -> PolyLineF f b -> Bool -Eq1,Eq1 (PolyLineF f) +Eq1,Eq1 (PolyLineF f) (Eq1 (PolyLineF f), forall a. Ord a => Ord (PolyLineF f a)) => (forall a b. (a -> b -> Ordering) -> PolyLineF f a -> PolyLineF f b -> Ordering) @@ -499,13 +499,13 @@ -- | By default we store simple poylline as non-empty vectors. type PolyLine = PolyLineF NonEmptyVector -type instance Dimension (PolyLineF f point) = Dimension point -type instance NumType (PolyLineF f point) = NumType point +type instance Dimension (PolyLineF f point) = Dimension point +type instance NumType (PolyLineF f point) = NumType point -- | Access the container -_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') - (f point) (f' point' ) +_PolyLineF :: Iso (PolyLineF f point) (PolyLineF f' point') + (f point) (f' point' ) _PolyLineF :: forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -516,19 +516,19 @@ -> Iso (PolyLineF f point) (PolyLineF f' point') (f point) (f' point') forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b -iso (\(PolyLine f point -vs) -> f point -vs) f' point' -> PolyLineF f' point' +iso (\(PolyLine f point +vs) -> f point +vs) f' point' -> PolyLineF f' point' forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine -instance Traversable f => Traversable (PolyLineF f) where - traverse :: forall (f :: * -> *) a b. +instance Traversable f => Traversable (PolyLineF f) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> PolyLineF f a -> f (PolyLineF f b) -traverse a -> f b -f (PolyLine f a -vs) = f b -> PolyLineF f b +traverse a -> f b +f (PolyLine f a +vs) = f b -> PolyLineF f b forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine (f b -> PolyLineF f b) -> f (f b) -> f (PolyLineF f b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -540,15 +540,15 @@ Applicative f => (a -> f b) -> f a -> f (f b) traverse a -> f b -f f a -vs -instance Traversable1 f => Traversable1 (PolyLineF f) where - traverse1 :: forall (f :: * -> *) a b. +f f a +vs +instance Traversable1 f => Traversable1 (PolyLineF f) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> PolyLineF f a -> f (PolyLineF f b) -traverse1 a -> f b -f (PolyLine f a -vs) = f b -> PolyLineF f b +traverse1 a -> f b +f (PolyLine f a +vs) = f b -> PolyLineF f b forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine (f b -> PolyLineF f b) -> f (f b) -> f (PolyLineF f b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -558,22 +558,22 @@ (a -> f b) -> t a -> f (t b) forall (f :: * -> *) a b. Apply f => (a -> f b) -> f a -> f (f b) traverse1 a -> f b -f f a -vs +f f a +vs -instance ( TraversableWithIndex Int f - , Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - ) => HasVertices (PolyLineF f point) (PolyLineF f point') where - vertices :: IndexedTraversal1 +instance ( TraversableWithIndex Int f + , Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + ) => HasVertices (PolyLineF f point) (PolyLineF f point') where + vertices :: IndexedTraversal1 (VertexIx (PolyLineF f point)) (PolyLineF f point) (PolyLineF f point') (Vertex (PolyLineF f point)) (Vertex (PolyLineF f point')) -vertices = (f point -> f (f point')) +vertices = (f point -> f (f point')) -> PolyLineF f point -> f (PolyLineF f point') forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -594,18 +594,18 @@ IndexedTraversal1 Int (f point) (f point') point point' traversed1 -instance ( Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - ) => HasPoints (PolyLineF f point) (PolyLineF f point') point point' where - allPoints :: forall (d :: Nat) r r'. +instance ( Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + ) => HasPoints (PolyLineF f point) (PolyLineF f point') point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (PolyLineF f point) ~ r, NumType (PolyLineF f point') ~ r', Dimension (PolyLineF f point) ~ d, Dimension (PolyLineF f point') ~ d) => Traversal1 (PolyLineF f point) (PolyLineF f point') point point' -allPoints = (f point -> f (f point')) +allPoints = (f point -> f (f point')) -> PolyLineF f point -> f (PolyLineF f point') forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -626,37 +626,37 @@ IndexedTraversal1 Int (f point) (f point') point point' traversed1 -instance ( Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - , DefaultTransformByConstraints (PolyLineF f point) 2 r - , Point_ point 2 r - ) => IsTransformable (PolyLineF f point) +instance ( Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + , DefaultTransformByConstraints (PolyLineF f point) 2 r + , Point_ point 2 r + ) => IsTransformable (PolyLineF f point) -instance ( Traversable1 f - , IxValue (f point) ~ point - , Index (f point) ~ Int - , Ixed (f point) - , Point_ point 2 r +instance ( Traversable1 f + , IxValue (f point) ~ point + , Index (f point) ~ Int + , Ixed (f point) + , Point_ point 2 r -- , OptVector_ 2 r, OptMetric_ 2 r - ) => IsBoxable (PolyLineF f point) + ) => IsBoxable (PolyLineF f point) -instance ( TraversableWithIndex Int f - , Traversable1 f - , Ixed (f point) - , IxValue (f point) ~ point - , Index (f point) ~ Int - ) => HasVertices' (PolyLineF f point) where - type Vertex (PolyLineF f point) = point - type VertexIx (PolyLineF f point) = Int - vertexAt :: VertexIx (PolyLineF f point) +instance ( TraversableWithIndex Int f + , Traversable1 f + , Ixed (f point) + , IxValue (f point) ~ point + , Index (f point) ~ Int + ) => HasVertices' (PolyLineF f point) where + type Vertex (PolyLineF f point) = point + type VertexIx (PolyLineF f point) = Int + vertexAt :: VertexIx (PolyLineF f point) -> IndexedTraversal' (VertexIx (PolyLineF f point)) (PolyLineF f point) (Vertex (PolyLineF f point)) -vertexAt VertexIx (PolyLineF f point) -i = (f point -> f (f point)) +vertexAt VertexIx (PolyLineF f point) +i = (f point -> f (f point)) -> PolyLineF f point -> f (PolyLineF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -678,47 +678,47 @@ Index m -> IndexedTraversal' (Index m) m (IxValue m) iix VertexIx (PolyLineF f point) Index (f point) -i +i -instance ( Traversable1 f +instance ( Traversable1 f -- , Ixed (f point) -- , IxValue (f point) ~ point -- , Index (f point) ~ Int - ) => HasStart (PolyLineF f point) point where - start :: Lens' (PolyLineF f point) point -start = (point -> f point) -> PolyLineF f point -> f (PolyLineF f point) + ) => HasStart (PolyLineF f point) point where + start :: Lens' (PolyLineF f point) point +start = (point -> f point) -> PolyLineF f point -> f (PolyLineF f point) Lens' (PolyLineF f point) point forall (t :: * -> *) a. Traversable1 t => Lens' (t a) a head1 -instance ( Traversable1 f +instance ( Traversable1 f -- , Ixed (f point) -- , IxValue (f point) ~ point -- , Index (f point) ~ Int - ) => HasEnd (PolyLineF f point) point where - end :: Lens' (PolyLineF f point) point -end = (point -> f point) -> PolyLineF f point -> f (PolyLineF f point) + ) => HasEnd (PolyLineF f point) point where + end :: Lens' (PolyLineF f point) point +end = (point -> f point) -> PolyLineF f point -> f (PolyLineF f point) Lens' (PolyLineF f point) point forall (t :: * -> *) a. Traversable1 t => Lens' (t a) a last1 -instance ( Traversable1 f - , IxValue (f point) ~ point, Index (f point) ~ Int - , Ixed (f point) - , HasFromFoldable1 f - , Point_ point d r - , TraversableWithIndex Int f - ) => PolyLine_ (PolyLineF f point) point where +instance ( Traversable1 f + , IxValue (f point) ~ point, Index (f point) ~ Int + , Ixed (f point) + , HasFromFoldable1 f + , Point_ point d r + , TraversableWithIndex Int f + ) => PolyLine_ (PolyLineF f point) point where -instance ( Traversable1 f - , IxValue (f point) ~ point, Index (f point) ~ Int - , Ixed (f point) - , HasFromFoldable1 f - , Point_ point d r - , TraversableWithIndex Int f - ) => ConstructablePolyLine_ (PolyLineF f point) point where - polyLineFromPoints :: forall (f :: * -> *). Foldable1 f => f point -> PolyLineF f point -polyLineFromPoints = f point -> PolyLineF f point +instance ( Traversable1 f + , IxValue (f point) ~ point, Index (f point) ~ Int + , Ixed (f point) + , HasFromFoldable1 f + , Point_ point d r + , TraversableWithIndex Int f + ) => ConstructablePolyLine_ (PolyLineF f point) point where + polyLineFromPoints :: forall (f :: * -> *). Foldable1 f => f point -> PolyLineF f point +polyLineFromPoints = f point -> PolyLineF f point forall {k} (f :: k -> *) (point :: k). f point -> PolyLineF f point PolyLine (f point -> PolyLineF f point) -> (f point -> f point) -> f point -> PolyLineF f point diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Class.html b/haddocks/hgeometry/src/HGeometry.Polygon.Class.html index 688bc4fff..ba54f54d3 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Class.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Class.html @@ -44,17 +44,17 @@ -------------------------------------------------------------------------------- -- ^ A class for items that have an outer boundary. -class HasVertices polygon polygon => HasOuterBoundary polygon where +class HasVertices polygon polygon => HasOuterBoundary polygon where {-# MINIMAL outerBoundaryVertexAt, ccwOuterBoundaryFrom, cwOuterBoundaryFrom #-} -- | A fold over all vertices of the outer boundary, the -- vertices are traversed in CCW order. -- -- running time :: \(O(n)\) - outerBoundary :: IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) - default outerBoundary :: Num (VertexIx polygon) - => IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) - outerBoundary = VertexIx polygon + outerBoundary :: IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) + default outerBoundary :: Num (VertexIx polygon) + => IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) + outerBoundary = VertexIx polygon -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) forall polygon. HasOuterBoundary polygon => @@ -67,21 +67,21 @@ -- from the vertex with the given index. -- -- running time :: \(O(n)\) - ccwOuterBoundaryFrom :: VertexIx polygon - -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) + ccwOuterBoundaryFrom :: VertexIx polygon + -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) -- | A CW-fold over all vertices of the outer boundary, starting -- from the vertex with the given index. -- -- running time :: \(O(n)\) - cwOuterBoundaryFrom :: VertexIx polygon - -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) + cwOuterBoundaryFrom :: VertexIx polygon + -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) -- | A particular vertex of the outer polygon -- -- running time: \(O(1)\) - outerBoundaryVertexAt :: VertexIx polygon - -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) + outerBoundaryVertexAt :: VertexIx polygon + -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) -- | A fold over all edges in the polygon. The edges are folded over -- in CCW order, and each edge is associated with the index of its start vertex @@ -89,12 +89,12 @@ -- -- -- running time :: \(O(n)\) - outerBoundaryEdges :: IndexedFold1 (VertexIx polygon,VertexIx polygon) polygon - (Vertex polygon, Vertex polygon) + outerBoundaryEdges :: IndexedFold1 (VertexIx polygon,VertexIx polygon) polygon + (Vertex polygon, Vertex polygon) default outerBoundaryEdges - :: Enum (VertexIx polygon) - => IndexedFold1 (VertexIx polygon,VertexIx polygon) polygon (Vertex polygon, Vertex polygon) - outerBoundaryEdges = (polygon + :: Enum (VertexIx polygon) + => IndexedFold1 (VertexIx polygon,VertexIx polygon) polygon (Vertex polygon, Vertex polygon) + outerBoundaryEdges = (polygon -> NonEmpty ((VertexIx polygon, VertexIx polygon), (Vertex polygon, Vertex polygon))) @@ -132,13 +132,13 @@ (Vertex polygon, Vertex polygon) forall a b. (a -> b) -> a -> b $ - \polygon -pg -> ( \(VertexIx polygon -i,Vertex polygon -u) -> let (VertexIx polygon -j,Vertex polygon -v) = polygon -pg polygon + \polygon +pg -> ( \(VertexIx polygon +i,Vertex polygon +u) -> let (VertexIx polygon +j,Vertex polygon +v) = polygon +pg polygon -> Getting (VertexIx polygon, Vertex polygon) polygon @@ -154,7 +154,7 @@ outerBoundaryVertexAt (VertexIx polygon -> VertexIx polygon forall a. Enum a => a -> a succ VertexIx polygon -i)(Indexed +i)(Indexed (VertexIx polygon) (Vertex polygon) (Const (VertexIx polygon, Vertex polygon) (Vertex polygon)) @@ -185,10 +185,10 @@ p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex in ((VertexIx polygon -i,VertexIx polygon -j) , (Vertex polygon -u,Vertex polygon -v)) +i,VertexIx polygon +j) , (Vertex polygon +u,Vertex polygon +v)) ) ((VertexIx polygon, Vertex polygon) -> ((VertexIx polygon, VertexIx polygon), (Vertex polygon, Vertex polygon))) @@ -215,7 +215,7 @@ IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) outerBoundary polygon -pg +pg -- \pg -> fmap ( \(i,u) -> (i,(u, pg ^.outerBoundaryVertexAt (succ i))) ) -- . NonEmpty.fromList -- $ itoListOf outerBoundary pg @@ -225,17 +225,17 @@ -- | Get the edge that has the given vertex as its starting edge -- -- running time: \(O(1)\) - outerBoundaryEdgeAt :: VertexIx polygon - -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon - (Vertex polygon, Vertex polygon) + outerBoundaryEdgeAt :: VertexIx polygon + -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon + (Vertex polygon, Vertex polygon) -- default implementation of outerBoundaryEdge. It achieves the -- desired running time when indexing is indeed constant. - default outerBoundaryEdgeAt :: Enum (VertexIx polygon) - => VertexIx polygon - -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon - (Vertex polygon, Vertex polygon) - outerBoundaryEdgeAt VertexIx polygon -i = (polygon + default outerBoundaryEdgeAt :: Enum (VertexIx polygon) + => VertexIx polygon + -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon + (Vertex polygon, Vertex polygon) + outerBoundaryEdgeAt VertexIx polygon +i = (polygon -> ((VertexIx polygon, VertexIx polygon), (Vertex polygon, Vertex polygon))) -> Over' p f polygon (Vertex polygon, Vertex polygon) @@ -252,11 +252,11 @@ -> Over' p f polygon (Vertex polygon, Vertex polygon) forall a b. (a -> b) -> a -> b $ - \polygon -pg -> let (VertexIx polygon -j,Vertex polygon -v) = polygon -pgpolygon + \polygon +pg -> let (VertexIx polygon +j,Vertex polygon +v) = polygon +pgpolygon -> Getting (VertexIx polygon, Vertex polygon) polygon @@ -272,7 +272,7 @@ outerBoundaryVertexAt (VertexIx polygon -> VertexIx polygon forall a. Enum a => a -> a succ VertexIx polygon -i)(Indexed +i)(Indexed (VertexIx polygon) (Vertex polygon) (Const (VertexIx polygon, Vertex polygon) (Vertex polygon)) @@ -303,9 +303,9 @@ p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex in ( (VertexIx polygon -i,VertexIx polygon -j), (polygon -pgpolygon +i,VertexIx polygon +j), (polygon +pgpolygon -> Getting (Vertex polygon) polygon (Vertex polygon) -> Vertex polygon forall s a. s -> Getting a s a -> a @@ -316,16 +316,16 @@ VertexIx polygon -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt VertexIx polygon -i, Vertex polygon -v)) +i, Vertex polygon +v)) -------------------------------------------------------------------------------- -- end of te HasOuterBoundary class -------------------------------------------------------------------------------- -instance HasOuterBoundary polygon => HasOuterBoundary (polygon :+ extra) where - outerBoundary :: IndexedTraversal1' +instance HasOuterBoundary polygon => HasOuterBoundary (polygon :+ extra) where + outerBoundary :: IndexedTraversal1' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) @@ -348,13 +348,13 @@ IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) outerBoundary - ccwOuterBoundaryFrom :: VertexIx (polygon :+ extra) + ccwOuterBoundaryFrom :: VertexIx (polygon :+ extra) -> IndexedTraversal1' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) -ccwOuterBoundaryFrom VertexIx (polygon :+ extra) -u = (polygon -> f polygon) +ccwOuterBoundaryFrom VertexIx (polygon :+ extra) +u = (polygon -> f polygon) -> (polygon :+ extra) -> f (polygon :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -375,14 +375,14 @@ -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) ccwOuterBoundaryFrom VertexIx polygon VertexIx (polygon :+ extra) -u - cwOuterBoundaryFrom :: VertexIx (polygon :+ extra) +u + cwOuterBoundaryFrom :: VertexIx (polygon :+ extra) -> IndexedTraversal1' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) -cwOuterBoundaryFrom VertexIx (polygon :+ extra) -u = (polygon -> f polygon) +cwOuterBoundaryFrom VertexIx (polygon :+ extra) +u = (polygon -> f polygon) -> (polygon :+ extra) -> f (polygon :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -403,14 +403,14 @@ -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) cwOuterBoundaryFrom VertexIx polygon VertexIx (polygon :+ extra) -u - outerBoundaryVertexAt :: VertexIx (polygon :+ extra) +u + outerBoundaryVertexAt :: VertexIx (polygon :+ extra) -> IndexedGetter (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) -outerBoundaryVertexAt VertexIx (polygon :+ extra) -u = (polygon -> f polygon) +outerBoundaryVertexAt VertexIx (polygon :+ extra) +u = (polygon -> f polygon) -> (polygon :+ extra) -> f (polygon :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -431,8 +431,8 @@ -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt VertexIx polygon VertexIx (polygon :+ extra) -u - outerBoundaryEdges :: IndexedFold1 +u + outerBoundaryEdges :: IndexedFold1 (VertexIx (polygon :+ extra), VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra), Vertex (polygon :+ extra)) @@ -465,13 +465,13 @@ polygon (Vertex polygon, Vertex polygon) outerBoundaryEdges - outerBoundaryEdgeAt :: VertexIx (polygon :+ extra) + outerBoundaryEdgeAt :: VertexIx (polygon :+ extra) -> IndexedGetter (VertexIx (polygon :+ extra), VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra), Vertex (polygon :+ extra)) -outerBoundaryEdgeAt VertexIx (polygon :+ extra) -u = (polygon -> f polygon) +outerBoundaryEdgeAt VertexIx (polygon :+ extra) +u = (polygon -> f polygon) -> (polygon :+ extra) -> f (polygon :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -500,7 +500,7 @@ (Vertex polygon, Vertex polygon) outerBoundaryEdgeAt VertexIx polygon VertexIx (polygon :+ extra) -u +u -------------------------------------------------------------------------------- -- * HasOuterBoundary Helpers @@ -512,15 +512,15 @@ -- | Yield the minimum vertex of a polygon according to the given comparison function. -- -- running time \( O(n) \) -minimumVertexBy :: forall polygon. (HasOuterBoundary polygon) - => (Vertex polygon -> Vertex polygon -> Ordering) - -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) +minimumVertexBy :: forall polygon. (HasOuterBoundary polygon) + => (Vertex polygon -> Vertex polygon -> Ordering) + -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) minimumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) -minimumVertexBy Vertex polygon -> Vertex polygon -> Ordering -cmp = ((p ~ (->)) => +minimumVertexBy Vertex polygon -> Vertex polygon -> Ordering +cmp = ((p ~ (->)) => (Vertex polygon -> f (Vertex polygon)) -> polygon -> f polygon) -> (p (Vertex polygon) (f (Vertex polygon)) -> polygon -> f polygon) @@ -536,13 +536,13 @@ (Vertex polygon -> f (Vertex polygon)) -> polygon -> f polygon (Vertex polygon -> f (Vertex polygon)) -> polygon -> f polygon Fold1 polygon (Vertex polygon) -go p (Vertex polygon) (f (Vertex polygon)) -> polygon -> f polygon +go p (Vertex polygon) (f (Vertex polygon)) -> polygon -> f polygon IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) -igo +igo where - go :: Fold1 polygon (Vertex polygon) - go :: Fold1 polygon (Vertex polygon) -go = (polygon -> First (Vertex polygon)) + go :: Fold1 polygon (Vertex polygon) + go :: Fold1 polygon (Vertex polygon) +go = (polygon -> First (Vertex polygon)) -> Fold1 polygon (Vertex polygon) forall (f :: * -> *) s a. Foldable1 f => (s -> f a) -> Fold1 s a folding1 ((polygon -> First (Vertex polygon)) @@ -558,18 +558,18 @@ forall {a} {a}. Getting (Endo (Endo (Maybe a))) a a -> (a -> a -> Ordering) -> a -> First a -f Getting +f Getting (Endo (Endo (Maybe (Vertex polygon)))) polygon (Vertex polygon) forall polygon. HasOuterBoundary polygon => IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) outerBoundary Vertex polygon -> Vertex polygon -> Ordering -cmp +cmp - igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) - igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) -igo = (polygon -> First (VertexIx polygon, Vertex polygon)) + igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) + igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) +igo = (polygon -> First (VertexIx polygon, Vertex polygon)) -> Over p f polygon polygon (Vertex polygon) (Vertex polygon) forall (f :: * -> *) i (p :: * -> * -> *) (g :: * -> *) s a t b. (Foldable1 f, Indexable i p, Contravariant g, Apply g) => @@ -590,7 +590,7 @@ forall {a} {a}. Getting (Endo (Endo (Maybe a))) a a -> (a -> a -> Ordering) -> a -> First a -f (Indexed +f (Indexed (VertexIx polygon) (Vertex polygon) (Const @@ -641,7 +641,7 @@ (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex) (Vertex polygon -> Vertex polygon -> Ordering -cmp (Vertex polygon -> Vertex polygon -> Ordering) +cmp (Vertex polygon -> Vertex polygon -> Ordering) -> ((VertexIx polygon, Vertex polygon) -> Vertex polygon) -> (VertexIx polygon, Vertex polygon) -> (VertexIx polygon, Vertex polygon) @@ -651,11 +651,11 @@ forall a b. (a, b) -> b snd) - f :: Getting (Endo (Endo (Maybe a))) a a + f :: Getting (Endo (Endo (Maybe a))) a a -> (a -> a -> Ordering) -> a -> First a -f Getting (Endo (Endo (Maybe a))) a a -boundary a -> a -> Ordering -cmp' = First a -> (a -> First a) -> Maybe a -> First a +f Getting (Endo (Endo (Maybe a))) a a +boundary a -> a -> Ordering +cmp' = First a -> (a -> First a) -> Maybe a -> First a forall b a. b -> (a -> b) -> Maybe a -> b maybe ([Char] -> First a forall a. HasCallStack => [Char] -> a @@ -671,21 +671,21 @@ Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a minimumByOf Getting (Endo (Endo (Maybe a))) a a -boundary a -> a -> Ordering -cmp' +boundary a -> a -> Ordering +cmp' -- | Yield the maximum vertex of a polygon according to the given comparison function. -- -- running time \( O(n) \) -maximumVertexBy :: forall polygon. (HasOuterBoundary polygon) - => (Vertex polygon -> Vertex polygon -> Ordering) - -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) +maximumVertexBy :: forall polygon. (HasOuterBoundary polygon) + => (Vertex polygon -> Vertex polygon -> Ordering) + -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) maximumVertexBy :: forall polygon. HasOuterBoundary polygon => (Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) -maximumVertexBy Vertex polygon -> Vertex polygon -> Ordering -cmp = ((p ~ (->)) => +maximumVertexBy Vertex polygon -> Vertex polygon -> Ordering +cmp = ((p ~ (->)) => (Vertex polygon -> f (Vertex polygon)) -> polygon -> f polygon) -> (p (Vertex polygon) (f (Vertex polygon)) -> polygon -> f polygon) @@ -701,13 +701,13 @@ (Vertex polygon -> f (Vertex polygon)) -> polygon -> f polygon (Vertex polygon -> f (Vertex polygon)) -> polygon -> f polygon Fold1 polygon (Vertex polygon) -go p (Vertex polygon) (f (Vertex polygon)) -> polygon -> f polygon +go p (Vertex polygon) (f (Vertex polygon)) -> polygon -> f polygon IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) -igo +igo where - go :: Fold1 polygon (Vertex polygon) - go :: Fold1 polygon (Vertex polygon) -go = (polygon -> First (Vertex polygon)) + go :: Fold1 polygon (Vertex polygon) + go :: Fold1 polygon (Vertex polygon) +go = (polygon -> First (Vertex polygon)) -> Fold1 polygon (Vertex polygon) forall (f :: * -> *) s a. Foldable1 f => (s -> f a) -> Fold1 s a folding1 ((polygon -> First (Vertex polygon)) @@ -723,18 +723,18 @@ forall {a} {a}. Getting (Endo (Endo (Maybe a))) a a -> (a -> a -> Ordering) -> a -> First a -f Getting +f Getting (Endo (Endo (Maybe (Vertex polygon)))) polygon (Vertex polygon) forall polygon. HasOuterBoundary polygon => IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) outerBoundary Vertex polygon -> Vertex polygon -> Ordering -cmp +cmp - igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) - igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) -igo = (polygon -> First (VertexIx polygon, Vertex polygon)) + igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) + igo :: IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) +igo = (polygon -> First (VertexIx polygon, Vertex polygon)) -> Over p f polygon polygon (Vertex polygon) (Vertex polygon) forall (f :: * -> *) i (p :: * -> * -> *) (g :: * -> *) s a t b. (Foldable1 f, Indexable i p, Contravariant g, Apply g) => @@ -755,7 +755,7 @@ forall {a} {a}. Getting (Endo (Endo (Maybe a))) a a -> (a -> a -> Ordering) -> a -> First a -f (Indexed +f (Indexed (VertexIx polygon) (Vertex polygon) (Const @@ -806,7 +806,7 @@ (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex) (Vertex polygon -> Vertex polygon -> Ordering -cmp (Vertex polygon -> Vertex polygon -> Ordering) +cmp (Vertex polygon -> Vertex polygon -> Ordering) -> ((VertexIx polygon, Vertex polygon) -> Vertex polygon) -> (VertexIx polygon, Vertex polygon) -> (VertexIx polygon, Vertex polygon) @@ -816,11 +816,11 @@ forall a b. (a, b) -> b snd) - f :: Getting (Endo (Endo (Maybe a))) a a + f :: Getting (Endo (Endo (Maybe a))) a a -> (a -> a -> Ordering) -> a -> First a -f Getting (Endo (Endo (Maybe a))) a a -boundary a -> a -> Ordering -cmp' = First a -> (a -> First a) -> Maybe a -> First a +f Getting (Endo (Endo (Maybe a))) a a +boundary a -> a -> Ordering +cmp' = First a -> (a -> First a) -> Maybe a -> First a forall b a. b -> (a -> b) -> Maybe a -> b maybe ([Char] -> First a forall a. HasCallStack => [Char] -> a @@ -836,8 +836,8 @@ Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a maximumByOf Getting (Endo (Endo (Maybe a))) a a -boundary a -> a -> Ordering -cmp' +boundary a -> a -> Ordering +cmp' -- | Compute the signed area times 2 of a simple polygon. The the -- vertices are in clockwise order, the signed area will be negative, @@ -845,20 +845,20 @@ -- be positive. -- -- running time: \(O(n)\) -signedArea2X :: (Num r, HasOuterBoundary simplePolygon - , Point_ point 2 r - , Vertex simplePolygon ~ point - ) => simplePolygon -> r +signedArea2X :: (Num r, HasOuterBoundary simplePolygon + , Point_ point 2 r + , Vertex simplePolygon ~ point + ) => simplePolygon -> r signedArea2X :: forall r simplePolygon point. (Num r, HasOuterBoundary simplePolygon, Point_ point 2 r, Vertex simplePolygon ~ point) => simplePolygon -> r -signedArea2X simplePolygon -poly = [r] -> r +signedArea2X simplePolygon +poly = [r] -> r forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a sum [ point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Natural) point r. @@ -868,7 +868,7 @@ xCoord r -> r -> r forall a. Num a => a -> a -> a * point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Natural) point r. @@ -878,7 +878,7 @@ yCoord r -> r -> r forall a. Num a => a -> a -> a - point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Natural) point r. @@ -888,7 +888,7 @@ xCoord r -> r -> r forall a. Num a => a -> a -> a * point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Natural) point r. @@ -896,10 +896,10 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord - | (point -p,point -q) <- simplePolygon -poly simplePolygon + | (point +p,point +q) <- simplePolygon +poly simplePolygon -> Getting (Endo [(point, point)]) simplePolygon (point, point) -> [(point, point)] forall s a. s -> Getting (Endo [a]) s a -> [a] @@ -924,14 +924,14 @@ -- | Get the line segment representing the edge that has the given vertex as its starting edge -- -- running time: \(O(1)\) -outerBoundaryEdgeSegmentAt :: ( HasOuterBoundary polygon - , Vertex polygon ~ point - , Point_ point 2 r +outerBoundaryEdgeSegmentAt :: ( HasOuterBoundary polygon + , Vertex polygon ~ point + , Point_ point 2 r ) - => VertexIx polygon - -> IndexedGetter (VertexIx polygon, VertexIx polygon) - polygon - (ClosedLineSegment point) + => VertexIx polygon + -> IndexedGetter (VertexIx polygon, VertexIx polygon) + polygon + (ClosedLineSegment point) outerBoundaryEdgeSegmentAt :: forall polygon point r. (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => @@ -940,8 +940,8 @@ (VertexIx polygon, VertexIx polygon) polygon (ClosedLineSegment point) -outerBoundaryEdgeSegmentAt VertexIx polygon -i = VertexIx polygon +outerBoundaryEdgeSegmentAt VertexIx polygon +i = VertexIx polygon -> IndexedGetter (VertexIx polygon, VertexIx polygon) polygon @@ -954,7 +954,7 @@ polygon (Vertex polygon, Vertex polygon) outerBoundaryEdgeAt VertexIx polygon -i(p (point, point) (f (point, point)) -> polygon -> f polygon) +i(p (point, point) (f (point, point)) -> polygon -> f polygon) -> (p (ClosedLineSegment point) (f (ClosedLineSegment point)) -> p (point, point) (f (point, point))) -> p (ClosedLineSegment point) (f (ClosedLineSegment point)) @@ -975,14 +975,14 @@ ClosedLineSegment) -- | Get the line segments representing the outer boundary of the polygon. -outerBoundaryEdgeSegments :: forall polygon point r. - ( HasOuterBoundary polygon - , Vertex polygon ~ point - , Point_ point 2 r +outerBoundaryEdgeSegments :: forall polygon point r. + ( HasOuterBoundary polygon + , Vertex polygon ~ point + , Point_ point 2 r ) - => IndexedFold1 (VertexIx polygon,VertexIx polygon) - polygon - (ClosedLineSegment point) + => IndexedFold1 (VertexIx polygon,VertexIx polygon) + polygon + (ClosedLineSegment point) outerBoundaryEdgeSegments :: forall polygon point r. (HasOuterBoundary polygon, Vertex polygon ~ point, Point_ point 2 r) => @@ -1027,13 +1027,13 @@ -- | A fold that associates each vertex on the boundary with its -- predecessor and successor (in that order) along the boundary. -outerBoundaryWithNeighbours :: ( HasOuterBoundary polygon - , VertexIx polygon ~ Int +outerBoundaryWithNeighbours :: ( HasOuterBoundary polygon + , VertexIx polygon ~ Int ) - => IndexedFold1 (VertexIx polygon, - (VertexIx polygon, VertexIx polygon)) - polygon - (Vertex polygon, (Vertex polygon, Vertex polygon)) + => IndexedFold1 (VertexIx polygon, + (VertexIx polygon, VertexIx polygon)) + polygon + (Vertex polygon, (Vertex polygon, Vertex polygon)) outerBoundaryWithNeighbours :: forall polygon. (HasOuterBoundary polygon, VertexIx polygon ~ Int) => IndexedFold1 @@ -1078,8 +1078,8 @@ (Vertex polygon, (Vertex polygon, Vertex polygon)) forall a b. (a -> b) -> a -> b $ - \polygon -pg -> polygon + \polygon +pg -> polygon -> VertexIx polygon -> (VertexIx polygon, Vertex polygon) -> ((VertexIx polygon, (VertexIx polygon, VertexIx polygon)), @@ -1091,11 +1091,11 @@ -> (VertexIx s, a) -> ((VertexIx s, (VertexIx s, VertexIx s)), (a, (Vertex s, Vertex s))) -f polygon -pg (polygon -> Int +f polygon +pg (polygon -> Int forall graph. HasVertices' graph => graph -> Int numVertices polygon -pg) ((Int, Vertex polygon) +pg) ((Int, Vertex polygon) -> ((Int, (Int, Int)), (Vertex polygon, (Vertex polygon, Vertex polygon)))) -> NonEmpty (Int, Vertex polygon) @@ -1115,21 +1115,21 @@ IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) outerBoundary polygon -pg +pg where - f :: s + f :: s -> VertexIx s -> (VertexIx s, a) -> ((VertexIx s, (VertexIx s, VertexIx s)), (a, (Vertex s, Vertex s))) -f s -pg VertexIx s -n (VertexIx s -i,a -u) = let (VertexIx s -j,Vertex s -v) = s -pgs +f s +pg VertexIx s +n (VertexIx s +i,a +u) = let (VertexIx s +j,Vertex s +v) = s +pgs -> Getting (VertexIx s, Vertex s) s (VertexIx s, Vertex s) -> (VertexIx s, Vertex s) forall s a. s -> Getting a s a -> a @@ -1139,13 +1139,13 @@ VertexIx polygon -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt ((VertexIx s -iVertexIx s -> VertexIx s -> VertexIx s +iVertexIx s -> VertexIx s -> VertexIx s forall a. Num a => a -> a -> a -VertexIx s 1) VertexIx s -> VertexIx s -> VertexIx s forall a. Integral a => a -> a -> a `mod` VertexIx s -n)(Indexed +n)(Indexed (VertexIx s) (Vertex s) (Const (VertexIx s, Vertex s) (Vertex s)) -> s -> Const (VertexIx s, Vertex s) s) -> (((VertexIx s, Vertex s) @@ -1162,10 +1162,10 @@ (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex - (VertexIx s -k,Vertex s -w) = s -pgs + (VertexIx s +k,Vertex s +w) = s +pgs -> Getting (VertexIx s, Vertex s) s (VertexIx s, Vertex s) -> (VertexIx s, Vertex s) forall s a. s -> Getting a s a -> a @@ -1175,13 +1175,13 @@ VertexIx polygon -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt ((VertexIx s -iVertexIx s -> VertexIx s -> VertexIx s +iVertexIx s -> VertexIx s -> VertexIx s forall a. Num a => a -> a -> a +VertexIx s 1) VertexIx s -> VertexIx s -> VertexIx s forall a. Integral a => a -> a -> a `mod` VertexIx s -n)(Indexed +n)(Indexed (VertexIx s) (Vertex s) (Const (VertexIx s, Vertex s) (Vertex s)) -> s -> Const (VertexIx s, Vertex s) s) -> (((VertexIx s, Vertex s) @@ -1199,62 +1199,62 @@ p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex in ( (VertexIx s -i, (VertexIx s -j,VertexIx s -k)) , (a -u, (Vertex s -v, Vertex s -w)) ) +i, (VertexIx s +j,VertexIx s +k)) , (a +u, (Vertex s +v, Vertex s +w)) ) -------------------------------------------------------------------------------- -- | A hole is a simple polygon -type Hole polygon = SimplePolygonF (HoleF polygon) (Vertex polygon) +type Hole polygon = SimplePolygonF (HoleF polygon) (Vertex polygon) -- | Accessing the holes in a polygon (if there are any.) -- -- the default implementation assumes there are no holes -class VertexContainer (HoleF polygon) (Vertex polygon) => HasHoles polygon where +class VertexContainer (HoleF polygon) (Vertex polygon) => HasHoles polygon where {-# MINIMAL #-} -- | Type we use to index holes. - type HoleIx polygon :: Type - type HoleIx polygon = Void + type HoleIx polygon :: Type + type HoleIx polygon = Void -- | The functor used in the holes - type HoleF polygon :: Type -> Type - type HoleF polygon = Cyclic NonEmptyVector + type HoleF polygon :: Type -> Type + type HoleF polygon = Cyclic NonEmptyVector -- ^ Traversal over the holes in the polygon. Each hole is a simple polygon. - holes :: IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) - holes = \p (Hole polygon) (f (Hole polygon)) -_ polygon -pg -> polygon -> f polygon + holes :: IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) + holes = \p (Hole polygon) (f (Hole polygon)) +_ polygon +pg -> polygon -> f polygon forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure polygon -pg +pg -- ^ Access a particular hole. This is supposed to be an affine traversal. - holeAt :: HoleIx polygon -> IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) - holeAt HoleIx polygon + holeAt :: HoleIx polygon -> IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) + holeAt HoleIx polygon _ = \p (Hole polygon) (f (Hole polygon)) -_ polygon -pg -> polygon -> f polygon +_ polygon +pg -> polygon -> f polygon forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure polygon -pg +pg -- | A class representing (planar) polygons. The edges of the polygon -- may not intersect. -class ( HasOuterBoundary polygon - , Vertex polygon ~ point - , Point_ point 2 r - , NumType polygon ~ r, Dimension polygon ~ 2 - , HasHoles polygon - ) => Polygon_ polygon point r where +class ( HasOuterBoundary polygon + , Vertex polygon ~ point + , Point_ point 2 r + , NumType polygon ~ r, Dimension polygon ~ 2 + , HasHoles polygon + ) => Polygon_ polygon point r where -- signedArea2X pg - @@ -1262,11 +1262,11 @@ -- | Finds the extreme points, minimum and maximum, in a given direction -- -- running time: \(O(n)\) - extremes :: (Num r, Ord r, Point_ point 2 r) - => Vector 2 r -> polygon -> (point, point) - extremes Vector 2 r -u polygon -pg = ( Getting (First point) polygon point -> polygon -> point + extremes :: (Num r, Ord r, Point_ point 2 r) + => Vector 2 r -> polygon -> (point, point) + extremes Vector 2 r +u polygon +pg = ( Getting (First point) polygon point -> polygon -> point forall a s. Getting (First a) s a -> s -> a first1Of ((Vertex polygon -> Vertex polygon -> Ordering) -> IndexedFold1 (VertexIx polygon) polygon (Vertex polygon) @@ -1279,8 +1279,8 @@ (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering cmpInDirection Vector 2 r -u)) polygon -pg +u)) polygon +pg , Getting (First point) polygon point -> polygon -> point forall a s. Getting (First a) s a -> s -> a first1Of ((Vertex polygon -> Vertex polygon -> Ordering) @@ -1294,27 +1294,27 @@ (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering cmpInDirection Vector 2 r -u)) polygon -pg +u)) polygon +pg ) -- | Given a vertexIdx v; get an IndexedLens to access the CCW predecessor of v - ccwPredecessorOf :: VertexIx polygon - -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) + ccwPredecessorOf :: VertexIx polygon + -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) -- | Given a vertexIdx v; get an IndexedLens to access the CCW predecessor of v - ccwSuccessorOf :: VertexIx polygon - -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) + ccwSuccessorOf :: VertexIx polygon + -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) -------------------------------------------------------------------------------- -- end of te Polygon_ class -------------------------------------------------------------------------------- -instance HasHoles polygon => HasHoles (polygon :+ extra) where - type HoleIx (polygon :+ extra) = HoleIx polygon - type HoleF (polygon :+ extra) = HoleF polygon - holes :: IndexedTraversal' +instance HasHoles polygon => HasHoles (polygon :+ extra) where + type HoleIx (polygon :+ extra) = HoleIx polygon + type HoleF (polygon :+ extra) = HoleF polygon + holes :: IndexedTraversal' (HoleIx (polygon :+ extra)) (polygon :+ extra) (Hole (polygon :+ extra)) @@ -1344,13 +1344,13 @@ polygon (SimplePolygonF (HoleF polygon) (Vertex polygon)) holes - holeAt :: HoleIx (polygon :+ extra) + holeAt :: HoleIx (polygon :+ extra) -> IndexedTraversal' (HoleIx (polygon :+ extra)) (polygon :+ extra) (Hole (polygon :+ extra)) -holeAt HoleIx (polygon :+ extra) -i = (polygon -> f polygon) +holeAt HoleIx (polygon :+ extra) +i = (polygon -> f polygon) -> (polygon :+ extra) -> f (polygon :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -1376,18 +1376,18 @@ -> IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) holeAt HoleIx polygon HoleIx (polygon :+ extra) -i +i -instance Polygon_ polygon point r => Polygon_ (polygon :+ extra) point r where - extremes :: (Num r, Ord r, Point_ point 2 r) => +instance Polygon_ polygon point r => Polygon_ (polygon :+ extra) point r where + extremes :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> (polygon :+ extra) -> (point, point) -extremes Vector 2 r -u = Vector 2 r -> polygon -> (point, point) +extremes Vector 2 r +u = Vector 2 r -> polygon -> (point, point) forall polygon point r. (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => Vector 2 r -> polygon -> (point, point) extremes Vector 2 r -u (polygon -> (point, point)) +u (polygon -> (point, point)) -> ((polygon :+ extra) -> polygon) -> (polygon :+ extra) -> (point, point) @@ -1400,13 +1400,13 @@ Functor f => (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core - ccwPredecessorOf :: VertexIx (polygon :+ extra) + ccwPredecessorOf :: VertexIx (polygon :+ extra) -> IndexedLens' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) -ccwPredecessorOf VertexIx (polygon :+ extra) -u = (polygon -> f polygon) +ccwPredecessorOf VertexIx (polygon :+ extra) +u = (polygon -> f polygon) -> (polygon :+ extra) -> f (polygon :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -1426,14 +1426,14 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwPredecessorOf VertexIx polygon VertexIx (polygon :+ extra) -u - ccwSuccessorOf :: VertexIx (polygon :+ extra) +u + ccwSuccessorOf :: VertexIx (polygon :+ extra) -> IndexedLens' (VertexIx (polygon :+ extra)) (polygon :+ extra) (Vertex (polygon :+ extra)) -ccwSuccessorOf VertexIx (polygon :+ extra) -u = (polygon -> f polygon) +ccwSuccessorOf VertexIx (polygon :+ extra) +u = (polygon -> f polygon) -> (polygon :+ extra) -> f (polygon :+ extra) forall core extra core' (f :: * -> *). Functor f => @@ -1453,7 +1453,7 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwSuccessorOf VertexIx polygon VertexIx (polygon :+ extra) -u +u -------------------------------------------------------------------------------- diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Class.html b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Class.html index f3f26099a..e2a028768 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Class.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Class.html @@ -15,6 +15,6 @@ import HGeometry.Polygon.Simple.Class -- | Class modelling convex polygons. -class ( SimplePolygon_ convexPolygon point r - ) => ConvexPolygon_ convexPolygon point r where +class ( SimplePolygon_ convexPolygon point r + ) => ConvexPolygon_ convexPolygon point r where \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Implementation.html b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Implementation.html index 9019bbc5b..ebfd77054 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Implementation.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Implementation.html @@ -45,13 +45,13 @@ -------------------------------------------------------------------------------- -- | Convex polygons -newtype ConvexPolygonF f point = +newtype ConvexPolygonF f point = ConvexPolygon { forall {k} (f :: k -> *) (point :: k). ConvexPolygonF f point -> SimplePolygonF f point -toSimplePolygon :: SimplePolygonF f point +toSimplePolygon :: SimplePolygonF f point -- ^ Convert to a simple polygon, i.e. forget the polygon is convex. } - deriving newtype (ConvexPolygonF f point -> () + deriving newtype (ConvexPolygonF f point -> () (ConvexPolygonF f point -> ()) -> NFData (ConvexPolygonF f point) forall a. (a -> ()) -> NFData a forall k (f :: k -> *) (point :: k). @@ -61,7 +61,7 @@ NFData (f point) => ConvexPolygonF f point -> () rnf :: ConvexPolygonF f point -> () -NFData, ConvexPolygonF f point -> ConvexPolygonF f point -> Bool +NFData, ConvexPolygonF f point -> ConvexPolygonF f point -> Bool (ConvexPolygonF f point -> ConvexPolygonF f point -> Bool) -> (ConvexPolygonF f point -> ConvexPolygonF f point -> Bool) -> Eq (ConvexPolygonF f point) @@ -88,8 +88,8 @@ -- -- Note that this is unchecked; i.e. one can turn an arbitrary simple polygon -- into a suposedly convex one. -_UncheckedConvexPolygon :: Iso (ConvexPolygonF f point) (ConvexPolygonF f' point') - (SimplePolygonF f point) (SimplePolygonF f' point') +_UncheckedConvexPolygon :: Iso (ConvexPolygonF f point) (ConvexPolygonF f' point') + (SimplePolygonF f point) (SimplePolygonF f' point') _UncheckedConvexPolygon :: forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -113,9 +113,9 @@ -- | Prism that can forget that the polygon is convex -- -_ConvexPolygon :: forall f point r. (Num r, Ord r, Point_ point 2 r - , VertexContainer f point - ) => Prism' (SimplePolygonF f point) (ConvexPolygonF f point) +_ConvexPolygon :: forall f point r. (Num r, Ord r, Point_ point 2 r + , VertexContainer f point + ) => Prism' (SimplePolygonF f point) (ConvexPolygonF f point) _ConvexPolygon :: forall (f :: * -> *) point r. (Num r, Ord r, Point_ point 2 r, VertexContainer f point) => Prism' (SimplePolygonF f point) (ConvexPolygonF f point) @@ -138,20 +138,20 @@ -- deriving instance Eq (ConvexPolygonF f point r) -- | Polygons are per definition 2 dimensional -type instance Dimension (ConvexPolygonF f point) = 2 -type instance NumType (ConvexPolygonF f point) = NumType point +type instance Dimension (ConvexPolygonF f point) = 2 +type instance NumType (ConvexPolygonF f point) = NumType point -instance (ShiftedEq (f point), ElemCyclic (f point) ~ point - ) => ShiftedEq (ConvexPolygonF f point) where - type ElemCyclic (ConvexPolygonF f point) = point - isShiftOf :: Eq (ElemCyclic (ConvexPolygonF f point)) => +instance (ShiftedEq (f point), ElemCyclic (f point) ~ point + ) => ShiftedEq (ConvexPolygonF f point) where + type ElemCyclic (ConvexPolygonF f point) = point + isShiftOf :: Eq (ElemCyclic (ConvexPolygonF f point)) => ConvexPolygonF f point -> ConvexPolygonF f point -> Bool -isShiftOf ConvexPolygonF f point -p ConvexPolygonF f point -q = SimplePolygonF f point -> SimplePolygonF f point -> Bool +isShiftOf ConvexPolygonF f point +p ConvexPolygonF f point +q = SimplePolygonF f point -> SimplePolygonF f point -> Bool forall t. (ShiftedEq t, Eq (ElemCyclic t)) => t -> t -> Bool isShiftOf (ConvexPolygonF f point -pConvexPolygonF f point +pConvexPolygonF f point -> Getting (SimplePolygonF f point) (ConvexPolygonF f point) @@ -168,7 +168,7 @@ p (SimplePolygonF f point) (f (SimplePolygonF f' point')) -> p (ConvexPolygonF f point) (f (ConvexPolygonF f' point')) _UncheckedConvexPolygon) (ConvexPolygonF f point -qConvexPolygonF f point +qConvexPolygonF f point -> Getting (SimplePolygonF f point) (ConvexPolygonF f point) @@ -186,15 +186,15 @@ -> p (ConvexPolygonF f point) (f (ConvexPolygonF f' point')) _UncheckedConvexPolygon) -instance ( HasVertices (SimplePolygonF f point) (SimplePolygonF f point') - ) => HasVertices (ConvexPolygonF f point) (ConvexPolygonF f point') where - vertices :: IndexedTraversal1 +instance ( HasVertices (SimplePolygonF f point) (SimplePolygonF f point') + ) => HasVertices (ConvexPolygonF f point) (ConvexPolygonF f point') where + vertices :: IndexedTraversal1 (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (ConvexPolygonF f point') (Vertex (ConvexPolygonF f point)) (Vertex (ConvexPolygonF f point')) -vertices = (SimplePolygonF f point -> f (SimplePolygonF f point')) +vertices = (SimplePolygonF f point -> f (SimplePolygonF f point')) -> ConvexPolygonF f point -> f (ConvexPolygonF f point') forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -226,9 +226,9 @@ (Vertex (SimplePolygonF f point')) vertices -instance ( VertexContainer f point - ) => HasPoints (ConvexPolygonF f point) (ConvexPolygonF f point') point point' where - allPoints :: forall (d :: Nat) r r'. +instance ( VertexContainer f point + ) => HasPoints (ConvexPolygonF f point) (ConvexPolygonF f point') point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (ConvexPolygonF f point) ~ r, NumType (ConvexPolygonF f point') ~ r', @@ -236,7 +236,7 @@ Dimension (ConvexPolygonF f point') ~ d) => Traversal1 (ConvexPolygonF f point) (ConvexPolygonF f point') point point' -allPoints = (SimplePolygonF f point -> f (SimplePolygonF f point')) +allPoints = (SimplePolygonF f point -> f (SimplePolygonF f point')) -> ConvexPolygonF f point -> f (ConvexPolygonF f point') forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -269,16 +269,16 @@ (SimplePolygonF f point) (SimplePolygonF f point') point point' allPoints -instance HasVertices' (SimplePolygonF f point) => HasVertices' (ConvexPolygonF f point) where - type Vertex (ConvexPolygonF f point) = Vertex (SimplePolygonF f point) - type VertexIx (ConvexPolygonF f point) = VertexIx (SimplePolygonF f point) - vertexAt :: VertexIx (ConvexPolygonF f point) +instance HasVertices' (SimplePolygonF f point) => HasVertices' (ConvexPolygonF f point) where + type Vertex (ConvexPolygonF f point) = Vertex (SimplePolygonF f point) + type VertexIx (ConvexPolygonF f point) = VertexIx (SimplePolygonF f point) + vertexAt :: VertexIx (ConvexPolygonF f point) -> IndexedTraversal' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) -vertexAt VertexIx (ConvexPolygonF f point) -i = (SimplePolygonF f point -> f (SimplePolygonF f point)) +vertexAt VertexIx (ConvexPolygonF f point) +i = (SimplePolygonF f point -> f (SimplePolygonF f point)) -> ConvexPolygonF f point -> f (ConvexPolygonF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -306,9 +306,9 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx (SimplePolygonF f point) VertexIx (ConvexPolygonF f point) -i - numVertices :: ConvexPolygonF f point -> Int -numVertices = SimplePolygonF f point -> Int +i + numVertices :: ConvexPolygonF f point -> Int +numVertices = SimplePolygonF f point -> Int forall graph. HasVertices' graph => graph -> Int numVertices (SimplePolygonF f point -> Int) -> (ConvexPolygonF f point -> SimplePolygonF f point) @@ -332,15 +332,15 @@ -> p (ConvexPolygonF f point) (f (ConvexPolygonF f' point')) _UncheckedConvexPolygon -instance ( HasOuterBoundary (SimplePolygonF f point) - , VertexIx (SimplePolygonF f point) ~ Int +instance ( HasOuterBoundary (SimplePolygonF f point) + , VertexIx (SimplePolygonF f point) ~ Int ) => - HasOuterBoundary (ConvexPolygonF f point) where - outerBoundary :: IndexedTraversal1' + HasOuterBoundary (ConvexPolygonF f point) where + outerBoundary :: IndexedTraversal1' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) -outerBoundary = (SimplePolygonF f point -> f (SimplePolygonF f point)) +outerBoundary = (SimplePolygonF f point -> f (SimplePolygonF f point)) -> ConvexPolygonF f point -> f (ConvexPolygonF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -368,13 +368,13 @@ (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) outerBoundary - outerBoundaryVertexAt :: VertexIx (ConvexPolygonF f point) + outerBoundaryVertexAt :: VertexIx (ConvexPolygonF f point) -> IndexedGetter (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) -outerBoundaryVertexAt VertexIx (ConvexPolygonF f point) -i = (SimplePolygonF f point -> f (SimplePolygonF f point)) +outerBoundaryVertexAt VertexIx (ConvexPolygonF f point) +i = (SimplePolygonF f point -> f (SimplePolygonF f point)) -> ConvexPolygonF f point -> f (ConvexPolygonF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -402,14 +402,14 @@ -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt VertexIx (SimplePolygonF f point) VertexIx (ConvexPolygonF f point) -i - ccwOuterBoundaryFrom :: VertexIx (ConvexPolygonF f point) +i + ccwOuterBoundaryFrom :: VertexIx (ConvexPolygonF f point) -> IndexedTraversal1' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) -ccwOuterBoundaryFrom VertexIx (ConvexPolygonF f point) -i = (SimplePolygonF f point -> f (SimplePolygonF f point)) +ccwOuterBoundaryFrom VertexIx (ConvexPolygonF f point) +i = (SimplePolygonF f point -> f (SimplePolygonF f point)) -> ConvexPolygonF f point -> f (ConvexPolygonF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -437,14 +437,14 @@ -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) ccwOuterBoundaryFrom VertexIx (SimplePolygonF f point) VertexIx (ConvexPolygonF f point) -i - cwOuterBoundaryFrom :: VertexIx (ConvexPolygonF f point) +i + cwOuterBoundaryFrom :: VertexIx (ConvexPolygonF f point) -> IndexedTraversal1' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) -cwOuterBoundaryFrom VertexIx (ConvexPolygonF f point) -i = (SimplePolygonF f point -> f (SimplePolygonF f point)) +cwOuterBoundaryFrom VertexIx (ConvexPolygonF f point) +i = (SimplePolygonF f point -> f (SimplePolygonF f point)) -> ConvexPolygonF f point -> f (ConvexPolygonF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -472,18 +472,18 @@ -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) cwOuterBoundaryFrom VertexIx (SimplePolygonF f point) VertexIx (ConvexPolygonF f point) -i +i -instance HasHoles (ConvexPolygonF f point) +instance HasHoles (ConvexPolygonF f point) -instance ( SimplePolygon_ (SimplePolygonF f point) point r - , Point_ point 2 r - ) => Polygon_ (ConvexPolygonF f point) point r where - extremes :: (Num r, Ord r, Point_ point 2 r) => +instance ( SimplePolygon_ (SimplePolygonF f point) point r + , Point_ point 2 r + ) => Polygon_ (ConvexPolygonF f point) point r where + extremes :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> ConvexPolygonF f point -> (point, point) -extremes Vector 2 r -u ConvexPolygonF f point -p = (Vector 2 r -> ConvexPolygonF f point -> point +extremes Vector 2 r +u ConvexPolygonF f point +p = (Vector 2 r -> ConvexPolygonF f point -> point forall r convexPolygon point. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => Vector 2 r -> convexPolygon -> point @@ -493,21 +493,21 @@ (Num r, Vector_ vector d r) => r -> vector -> vector *^ Vector 2 r -u) ConvexPolygonF f point -p, Vector 2 r -> ConvexPolygonF f point -> point +u) ConvexPolygonF f point +p, Vector 2 r -> ConvexPolygonF f point -> point forall r convexPolygon point. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => Vector 2 r -> convexPolygon -> point maxInDirection Vector 2 r -u ConvexPolygonF f point -p) - ccwPredecessorOf :: VertexIx (ConvexPolygonF f point) +u ConvexPolygonF f point +p) + ccwPredecessorOf :: VertexIx (ConvexPolygonF f point) -> IndexedLens' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) -ccwPredecessorOf VertexIx (ConvexPolygonF f point) -u = (SimplePolygonF f point -> f (SimplePolygonF f point)) +ccwPredecessorOf VertexIx (ConvexPolygonF f point) +u = (SimplePolygonF f point -> f (SimplePolygonF f point)) -> ConvexPolygonF f point -> f (ConvexPolygonF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -533,14 +533,14 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwPredecessorOf VertexIx (SimplePolygonF f point) VertexIx (ConvexPolygonF f point) -u - ccwSuccessorOf :: VertexIx (ConvexPolygonF f point) +u + ccwSuccessorOf :: VertexIx (ConvexPolygonF f point) -> IndexedLens' (VertexIx (ConvexPolygonF f point)) (ConvexPolygonF f point) (Vertex (ConvexPolygonF f point)) -ccwSuccessorOf VertexIx (ConvexPolygonF f point) -u = (SimplePolygonF f point -> f (SimplePolygonF f point)) +ccwSuccessorOf VertexIx (ConvexPolygonF f point) +u = (SimplePolygonF f point -> f (SimplePolygonF f point)) -> ConvexPolygonF f point -> f (ConvexPolygonF f point) forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -566,22 +566,22 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwSuccessorOf VertexIx (SimplePolygonF f point) VertexIx (ConvexPolygonF f point) -u +u -instance ( SimplePolygon_ (SimplePolygonF f point) point r - , Point_ point 2 r - ) => SimplePolygon_ (ConvexPolygonF f point) point r where - type ConstructableSimplePolygon (ConvexPolygonF f point) point r = - ( VertexContainer f point - , Ord r - , Num r +instance ( SimplePolygon_ (SimplePolygonF f point) point r + , Point_ point 2 r + ) => SimplePolygon_ (ConvexPolygonF f point) point r where + type ConstructableSimplePolygon (ConvexPolygonF f point) point r = + ( VertexContainer f point + , Ord r + , Num r ) -- | Additional precondition: the points actually form a convex polygon - uncheckedFromCCWPoints :: forall (f :: * -> *). + uncheckedFromCCWPoints :: forall (f :: * -> *). Foldable f => f point -> ConvexPolygonF f point -uncheckedFromCCWPoints = SimplePolygonF f point -> ConvexPolygonF f point +uncheckedFromCCWPoints = SimplePolygonF f point -> ConvexPolygonF f point forall {k} (f :: k -> *) (point :: k). SimplePolygonF f point -> ConvexPolygonF f point ConvexPolygon (SimplePolygonF f point -> ConvexPolygonF f point) @@ -597,12 +597,12 @@ Foldable f => f point -> SimplePolygonF f point uncheckedFromCCWPoints - fromPoints :: forall (f :: * -> *). + fromPoints :: forall (f :: * -> *). (Foldable f, ConstructableSimplePolygon (ConvexPolygonF f point) point r) => f point -> Maybe (ConvexPolygonF f point) -fromPoints f point -pts = f point -> Maybe (SimplePolygonF f point) +fromPoints f point +pts = f point -> Maybe (SimplePolygonF f point) forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f, ConstructableSimplePolygon simplePolygon point r) => @@ -612,7 +612,7 @@ ConstructableSimplePolygon (SimplePolygonF f point) point r) => f point -> Maybe (SimplePolygonF f point) fromPoints f point -pts Maybe (SimplePolygonF f point) +pts Maybe (SimplePolygonF f point) -> (SimplePolygonF f point -> Maybe (ConvexPolygonF f point)) -> Maybe (ConvexPolygonF f point) forall a b. Maybe a -> (a -> Maybe b) -> Maybe b @@ -623,54 +623,54 @@ SimplePolygonF f point -> Maybe (ConvexPolygonF f point) fromSimplePolygon -instance ( SimplePolygon_ (SimplePolygonF f point) point r - , Point_ point 2 r - ) => ConvexPolygon_ (ConvexPolygonF f point) point r where +instance ( SimplePolygon_ (SimplePolygonF f point) point r + , Point_ point 2 r + ) => ConvexPolygon_ (ConvexPolygonF f point) point r where -- | Smart constructor to construct a strictly convex polygon from a -- simple polygon. -fromSimplePolygon :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) - => SimplePolygonF f point -> Maybe (ConvexPolygonF f point) +fromSimplePolygon :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) + => SimplePolygonF f point -> Maybe (ConvexPolygonF f point) fromSimplePolygon :: forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Maybe (ConvexPolygonF f point) -fromSimplePolygon SimplePolygonF f point -pg +fromSimplePolygon SimplePolygonF f point +pg | SimplePolygonF f point -> Bool forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool isStrictlyConvex SimplePolygonF f point -pg = ConvexPolygonF f point -> Maybe (ConvexPolygonF f point) +pg = ConvexPolygonF f point -> Maybe (ConvexPolygonF f point) forall a. a -> Maybe a Just (SimplePolygonF f point -> ConvexPolygonF f point forall {k} (f :: k -> *) (point :: k). SimplePolygonF f point -> ConvexPolygonF f point ConvexPolygon SimplePolygonF f point -pg) +pg) | Bool otherwise = Maybe (ConvexPolygonF f point) forall a. Maybe a Nothing -instance ( Show point - , SimplePolygon_ (ConvexPolygonF f point) point r - ) => Show (ConvexPolygonF f point) where - showsPrec :: Int -> ConvexPolygonF f point -> ShowS -showsPrec = String -> Int -> ConvexPolygonF f point -> ShowS +instance ( Show point + , SimplePolygon_ (ConvexPolygonF f point) point r + ) => Show (ConvexPolygonF f point) where + showsPrec :: Int -> ConvexPolygonF f point -> ShowS +showsPrec = String -> Int -> ConvexPolygonF f point -> ShowS forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, Show point) => String -> Int -> simplePolygon -> ShowS showsPrecSimplePolygon String "ConvexPolygon" -instance ( Read point - , SimplePolygon_ (ConvexPolygonF f point) point r - ) => Read (ConvexPolygonF f point) where - readsPrec :: Int -> ReadS (ConvexPolygonF f point) -readsPrec = String -> Int -> ReadS (ConvexPolygonF f point) +instance ( Read point + , SimplePolygon_ (ConvexPolygonF f point) point r + ) => Read (ConvexPolygonF f point) where + readsPrec :: Int -> ReadS (ConvexPolygonF f point) +readsPrec = String -> Int -> ReadS (ConvexPolygonF f point) forall simplePolygon point r. (Read point, SimplePolygon_ simplePolygon point r) => String -> Int -> ReadS simplePolygon @@ -690,33 +690,33 @@ -- TODO: we should be able to implement this in O(log n) time instead!! -} -instance ( VertexContainer f point - , DefaultTransformByConstraints (ConvexPolygonF f point) 2 r - , Point_ point 2 r - ) => IsTransformable (ConvexPolygonF f point) +instance ( VertexContainer f point + , DefaultTransformByConstraints (ConvexPolygonF f point) 2 r + , Point_ point 2 r + ) => IsTransformable (ConvexPolygonF f point) -instance ( VertexContainer f point - , Point_ point 2 r, Num r, HasFromFoldable1 f - ) => IsBoxable (ConvexPolygonF f point) where - boundingBox :: forall (d :: Nat) r. +instance ( VertexContainer f point + , Point_ point 2 r, Num r, HasFromFoldable1 f + ) => IsBoxable (ConvexPolygonF f point) where + boundingBox :: forall (d :: Nat) r. (d ~ Dimension (ConvexPolygonF f point), r ~ NumType (ConvexPolygonF f point), Ord r) => ConvexPolygonF f point -> Box (Point d r) -boundingBox ConvexPolygonF f point -pg = Point d r -> Point d r -> Box (Point d r) +boundingBox ConvexPolygonF f point +pg = Point d r -> Point d r -> Box (Point d r) forall point. point -> point -> Box point Box (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -xMin r -yMin) (r -> r -> Point 2 r +xMin r +yMin) (r -> r -> Point 2 r forall r. r -> r -> Point 2 r Point2 r -xMax r -yMax) +xMax r +yMax) where - xMin :: r -xMin = Getting r point r -> point -> r + xMin :: r +xMin = Getting r point r -> point -> r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view (r -> Const r r) -> point -> Const r point Getting r point r @@ -735,9 +735,9 @@ Vector2 (-r 1) r 0 ) ConvexPolygonF f point -pg - xMax :: r -xMax = Getting r point r -> point -> r +pg + xMax :: r +xMax = Getting r point r -> point -> r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view (r -> Const r r) -> point -> Const r point Getting r point r @@ -756,9 +756,9 @@ Vector2 r 1 r 0 ) ConvexPolygonF f point -pg - yMin :: r -yMin = Getting r point r -> point -> r +pg + yMin :: r +yMin = Getting r point r -> point -> r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view (r -> Const r r) -> point -> Const r point Getting r point r @@ -777,9 +777,9 @@ Vector2 r 0 (-r 1)) ConvexPolygonF f point -pg - yMax :: r -yMax = Getting r point r -> point -> r +pg + yMax :: r +yMax = Getting r point r -> point -> r forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view (r -> Const r r) -> point -> Const r point Getting r point r @@ -798,7 +798,7 @@ Vector2 r 0 r 1 ) ConvexPolygonF f point -pg +pg -------------------------------------------------------------------------------- @@ -806,8 +806,8 @@ -- | Verify that a convex polygon is strictly convex. -- -- running time \( O(n) \) -verifyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) - => ConvexPolygonF f point -> Bool +verifyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) + => ConvexPolygonF f point -> Bool verifyConvex :: forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => ConvexPolygonF f point -> Bool @@ -826,8 +826,8 @@ toSimplePolygon -- | \( O(n) \) Check if a polygon is strictly convex. -isStrictlyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) - => SimplePolygonF f point -> Bool +isStrictlyConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) + => SimplePolygonF f point -> Bool isStrictlyConvex :: forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool @@ -866,28 +866,28 @@ Point_ point'' 2 (NumType point), Num (NumType point), Ord (NumType point)) => (point', (point, point'')) -> Bool -isStrictlyConvexVertex +isStrictlyConvexVertex where - isStrictlyConvexVertex :: (point', (point, point'')) -> Bool -isStrictlyConvexVertex (point' -v,(point -u,point'' -w)) = point -> point' -> point'' -> CCW + isStrictlyConvexVertex :: (point', (point, point'')) -> Bool +isStrictlyConvexVertex (point' +v,(point +u,point'' +w)) = point -> point' -> point'' -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -u point' -v point'' -w CCW -> CCW -> Bool +u point' +v point'' +w CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CCW -- | \( O(n) \) Check if a polygon is convex. -isConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) - => SimplePolygonF f point -> Bool +isConvex :: (Ord r, Num r, Point_ point 2 r, VertexContainer f point) + => SimplePolygonF f point -> Bool isConvex :: forall r point (f :: * -> *). (Ord r, Num r, Point_ point 2 r, VertexContainer f point) => SimplePolygonF f point -> Bool @@ -926,21 +926,21 @@ Point_ point'' 2 (NumType point), Num (NumType point), Ord (NumType point)) => (point', (point, point'')) -> Bool -isConvexVertex +isConvexVertex where - isConvexVertex :: (point', (point, point'')) -> Bool -isConvexVertex (point' -v,(point -u,point'' -w)) = point -> point' -> point'' -> CCW + isConvexVertex :: (point', (point, point'')) -> Bool +isConvexVertex (point' +v,(point +u,point'' +w)) = point -> point' -> point'' -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -u point' -v point'' -w CCW -> CCW -> Bool +u point' +v point'' +w CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool /= CCW CW @@ -955,13 +955,13 @@ -- pre: The input polygon is strictly convex. -- -- running time: \(O(\log n)\) -maxInDirection :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r) - => Vector 2 r -> convexPolygon -> point +maxInDirection :: (Num r, Ord r, ConvexPolygon_ convexPolygon point r) + => Vector 2 r -> convexPolygon -> point maxInDirection :: forall r convexPolygon point. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => Vector 2 r -> convexPolygon -> point -maxInDirection Vector 2 r -u = (point -> point -> Ordering) -> convexPolygon -> point +maxInDirection Vector 2 r +u = (point -> point -> Ordering) -> convexPolygon -> point forall convexPolygon point r. ConvexPolygon_ convexPolygon point r => (point -> point -> Ordering) -> convexPolygon -> point @@ -970,20 +970,20 @@ (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering cmpInDirection Vector 2 r -u) +u) -- | Find the maximum vertex in a convex polygon using a binary search. -- \( O(\log n) \) -findMaxWith :: (ConvexPolygon_ convexPolygon point r) - => (point -> point -> Ordering) - -> convexPolygon -> point +findMaxWith :: (ConvexPolygon_ convexPolygon point r) + => (point -> point -> Ordering) + -> convexPolygon -> point findMaxWith :: forall convexPolygon point r. ConvexPolygon_ convexPolygon point r => (point -> point -> Ordering) -> convexPolygon -> point -findMaxWith point -> point -> Ordering -cmp convexPolygon -pg = convexPolygon -pgconvexPolygon -> Getting point convexPolygon point -> point +findMaxWith point -> point -> Ordering +cmp convexPolygon +pg = convexPolygon +pgconvexPolygon -> Getting point convexPolygon point -> point forall s a. s -> Getting a s a -> a ^.VertexIx convexPolygon -> IndexedGetter @@ -993,20 +993,20 @@ VertexIx polygon -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt (Int -> Int -> Int -worker Int +worker Int 0 Int -n) +n) where - n :: Int -n = convexPolygon -> Int + n :: Int +n = convexPolygon -> Int forall graph. HasVertices' graph => graph -> Int numVertices convexPolygon -pg - Int -a icmp :: Int -> Int -> Ordering -`icmp` Int -b = (convexPolygon -pgconvexPolygon -> Getting point convexPolygon point -> point +pg + Int +a icmp :: Int -> Int -> Ordering +`icmp` Int +b = (convexPolygon +pgconvexPolygon -> Getting point convexPolygon point -> point forall s a. s -> Getting a s a -> a ^.VertexIx convexPolygon -> IndexedGetter @@ -1017,9 +1017,9 @@ -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt Int VertexIx convexPolygon -a) point -> point -> Ordering -`cmp` (convexPolygon -pgconvexPolygon -> Getting point convexPolygon point -> point +a) point -> point -> Ordering +`cmp` (convexPolygon +pgconvexPolygon -> Getting point convexPolygon point -> point forall s a. s -> Getting a s a -> a ^.VertexIx convexPolygon -> IndexedGetter @@ -1030,34 +1030,34 @@ -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt Int VertexIx convexPolygon -b) - worker :: Int -> Int -> Int -worker Int -a Int -b +b) + worker :: Int -> Int -> Int +worker Int +a Int +b | Int -> Bool -localMaximum Int -c = Int -c +localMaximum Int +c = Int +c | Int -aInt -> Int -> Int +aInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1Int -> Int -> Bool forall a. Eq a => a -> a -> Bool ==Int -b = Int -b +b = Int +b | Bool otherwise = case (Int -> Bool -isUpwards Int -a, Int -> Bool -isUpwards Int -c, Int -c Int -> Int -> Ordering -`icmp` Int -a Ordering -> Ordering -> Bool +isUpwards Int +a, Int -> Bool +isUpwards Int +c, Int +c Int -> Int -> Ordering +`icmp` Int +a Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool /= Ordering LT) of @@ -1065,60 +1065,60 @@ True, Bool False, Bool _) -> Int -> Int -> Int -worker Int -a Int -c -- A is up, C is down, pick [a,c] +worker Int +a Int +c -- A is up, C is down, pick [a,c] (Bool True, Bool True, Bool True) -> Int -> Int -> Int -worker Int -c Int -b -- A is up, C is up, C is GTE A, pick [c,b] +worker Int +c Int +b -- A is up, C is up, C is GTE A, pick [c,b] (Bool True, Bool True, Bool False) -> Int -> Int -> Int -worker Int -a Int -c -- A is up, C is LT A, pick [a,c] +worker Int +a Int +c -- A is up, C is LT A, pick [a,c] (Bool False, Bool True, Bool _) -> Int -> Int -> Int -worker Int -c Int -b -- A is down, C is up, pick [c,b] +worker Int +c Int +b -- A is down, C is up, pick [c,b] (Bool False, Bool False, Bool False) -> Int -> Int -> Int -worker Int -c Int -b -- A is down, C is down, C is LT A, pick [c,b] +worker Int +c Int +b -- A is down, C is down, C is LT A, pick [c,b] (Bool False, Bool _, Bool True) -> Int -> Int -> Int -worker Int -a Int -c -- A is down, C is GTE A, pick [a,c] +worker Int +a Int +c -- A is down, C is GTE A, pick [a,c] where - c :: Int -c = (Int -aInt -> Int -> Int + c :: Int +c = (Int +aInt -> Int -> Int forall a. Num a => a -> a -> a +Int -b) Int -> Int -> Int +b) Int -> Int -> Int forall a. Integral a => a -> a -> a `div` Int 2 - localMaximum :: Int -> Bool -localMaximum Int -idx = Int -idx Int -> Int -> Ordering -`icmp` (Int -cInt -> Int -> Int + localMaximum :: Int -> Bool +localMaximum Int +idx = Int +idx Int -> Int -> Ordering +`icmp` (Int +cInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) Ordering -> Ordering -> Bool @@ -1126,21 +1126,21 @@ == Ordering GT Bool -> Bool -> Bool && Int -idx Int -> Int -> Ordering -`icmp` (Int -cInt -> Int -> Int +idx Int -> Int -> Ordering +`icmp` (Int +cInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Ordering -> Ordering -> Bool forall a. Eq a => a -> a -> Bool == Ordering GT - isUpwards :: Int -> Bool -isUpwards Int -idx = Int -idx Int -> Int -> Ordering -`icmp` (Int -idxInt -> Int -> Int + isUpwards :: Int -> Bool +isUpwards Int +idx = Int +idx Int -> Int -> Ordering +`icmp` (Int +idxInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1) Ordering -> Ordering -> Bool @@ -1162,10 +1162,10 @@ -- convex polygon. -- -- \( O(\log n) \) -inConvex :: ( ConvexPolygon_ convexPolygon point r - , Point_ queryPoint 2 r, Num r, Ord r) - => queryPoint -> convexPolygon - -> PointLocationResultWith (VertexIx convexPolygon) +inConvex :: ( ConvexPolygon_ convexPolygon point r + , Point_ queryPoint 2 r, Num r, Ord r) + => queryPoint -> convexPolygon + -> PointLocationResultWith (VertexIx convexPolygon) inConvex :: forall convexPolygon point r queryPoint. (ConvexPolygon_ convexPolygon point r, Point_ queryPoint 2 r, Num r, Ord r) => @@ -1180,71 +1180,71 @@ Point_ point d r => Lens' point (Point d r) Lens' queryPoint (Point 2 r) -asPoint -> Point 2 r -q) convexPolygon -poly +asPoint -> Point 2 r +q) convexPolygon +poly | Point 2 r -q Point 2 r -> ClosedLineSegment (Point 2 r) -> Bool +q Point 2 r -> ClosedLineSegment (Point 2 r) -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment (Point 2 r) -leftEdge = Int -> PointLocationResultWith Int +leftEdge = Int -> PointLocationResultWith Int forall edge. edge -> PointLocationResultWith edge OnBoundaryEdge Int -n +n | Point 2 r -q Point 2 r -> ClosedLineSegment (Point 2 r) -> Bool +q Point 2 r -> ClosedLineSegment (Point 2 r) -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment (Point 2 r) -rightEdge = Int -> PointLocationResultWith Int +rightEdge = Int -> PointLocationResultWith Int forall edge. edge -> PointLocationResultWith edge OnBoundaryEdge Int 0 | Bool otherwise = Int -> Int -> PointLocationResultWith Int -worker Int +worker Int 1 Int -n +n where - n :: Int -n = convexPolygon -> Int + n :: Int +n = convexPolygon -> Int forall graph. HasVertices' graph => graph -> Int numVertices convexPolygon -poly Int -> Int -> Int +poly Int -> Int -> Int forall a. Num a => a -> a -> a - Int 1 - point0 :: Point 2 r -point0 = Int -> Point 2 r -point Int + point0 :: Point 2 r +point0 = Int -> Point 2 r +point Int 0 - leftEdge :: ClosedLineSegment (Point 2 r) -leftEdge = Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) + leftEdge :: ClosedLineSegment (Point 2 r) +leftEdge = Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) forall point. point -> point -> ClosedLineSegment point ClosedLineSegment Point 2 r -point0 (Int -> Point 2 r -point Int -n) - rightEdge :: ClosedLineSegment (Point 2 r) -rightEdge = Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) +point0 (Int -> Point 2 r +point Int +n) + rightEdge :: ClosedLineSegment (Point 2 r) +rightEdge = Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) forall point. point -> point -> ClosedLineSegment point ClosedLineSegment Point 2 r -point0 (Int -> Point 2 r -point Int +point0 (Int -> Point 2 r +point Int 1) - worker :: Int -> Int -> PointLocationResultWith Int -worker Int -a Int -b + worker :: Int -> Int -> PointLocationResultWith Int +worker Int +a Int +b | Int -aInt -> Int -> Int +aInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1 Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -b = +b = if Point 2 r -q Point 2 r -> ClosedLineSegment (Point 2 r) -> Bool +q Point 2 r -> ClosedLineSegment (Point 2 r) -> Bool forall lineSegment (d :: Nat) r point. (HasOnSegment lineSegment d, Ord r, Point_ point d r, r ~ NumType lineSegment, d ~ Dimension lineSegment) => @@ -1257,26 +1257,26 @@ `onSegment` Point 2 r -> Point 2 r -> ClosedLineSegment (Point 2 r) forall point. point -> point -> ClosedLineSegment point ClosedLineSegment (Int -> Point 2 r -point Int -a) (Int -> Point 2 r -point Int -b) +point Int +a) (Int -> Point 2 r +point Int +b) then Int -> PointLocationResultWith Int forall edge. edge -> PointLocationResultWith edge OnBoundaryEdge Int -a +a else if Point 2 r -q Point 2 r -> Triangle (Point 2 r) -> Bool +q Point 2 r -> Triangle (Point 2 r) -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` Point 2 r -> Point 2 r -> Point 2 r -> Triangle (Point 2 r) forall point. point -> point -> point -> Triangle point Triangle Point 2 r -point0 (Int -> Point 2 r -point Int -a) (Int -> Point 2 r -point Int -b) +point0 (Int -> Point 2 r +point Int +a) (Int -> Point 2 r +point Int +b) then PointLocationResultWith Int forall edge. PointLocationResultWith edge StrictlyInside @@ -1289,35 +1289,35 @@ Ord r) => point -> point' -> point'' -> CCW ccw Point 2 r -point0 (Int -> Point 2 r -point Int -c) Point 2 r -q CCW -> CCW -> Bool +point0 (Int -> Point 2 r +point Int +c) Point 2 r +q CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CCW = Int -> Int -> PointLocationResultWith Int -worker Int -c Int -b +worker Int +c Int +b | Bool otherwise = Int -> Int -> PointLocationResultWith Int -worker Int -a Int -c - where c :: Int -c = (Int -aInt -> Int -> Int +worker Int +a Int +c + where c :: Int +c = (Int +aInt -> Int -> Int forall a. Num a => a -> a -> a +Int -b) Int -> Int -> Int +b) Int -> Int -> Int forall a. Integral a => a -> a -> a `div` Int 2 - point :: Int -> Point 2 r -point Int -x = convexPolygon -polyconvexPolygon + point :: Int -> Point 2 r +point Int +x = convexPolygon +polyconvexPolygon -> Getting (Point 2 r) convexPolygon (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.VertexIx convexPolygon @@ -1329,7 +1329,7 @@ -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt Int VertexIx convexPolygon -x((point -> Const (Point 2 r) point) +x((point -> Const (Point 2 r) point) -> convexPolygon -> Const (Point 2 r) convexPolygon) -> ((Point 2 r -> Const (Point 2 r) (Point 2 r)) -> point -> Const (Point 2 r) point) @@ -1343,14 +1343,14 @@ Lens' point (Point 2 r) asPoint -instance ConvexPolygon_ (ConvexPolygonF f point) point r - => HasInPolygon (ConvexPolygonF f point) point r where - inPolygon :: forall queryPoint. +instance ConvexPolygon_ (ConvexPolygonF f point) point r + => HasInPolygon (ConvexPolygonF f point) point r where + inPolygon :: forall queryPoint. (Num r, Ord r, Point_ queryPoint 2 r) => queryPoint -> ConvexPolygonF f point -> PointLocationResultWith (VertexIx (ConvexPolygonF f point)) -inPolygon = queryPoint +inPolygon = queryPoint -> ConvexPolygonF f point -> PointLocationResultWith (VertexIx (ConvexPolygonF f point)) forall convexPolygon point r queryPoint. diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.MinkowskiSum.html b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.MinkowskiSum.html index 6c67fb99c..3c76f909e 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.MinkowskiSum.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.MinkowskiSum.html @@ -34,19 +34,19 @@ -- te oriin first. -- -- running time: \(O(n+m)\). -minkowskiSum :: ( Ord r, Num r - , ConvexPolygon_ convexPolygon point r - , ConvexPolygon_ convexPolygon' point' r +minkowskiSum :: ( Ord r, Num r + , ConvexPolygon_ convexPolygon point r + , ConvexPolygon_ convexPolygon' point' r ) - => convexPolygon -> convexPolygon' - -> ConvexPolygon (point :+ point') + => convexPolygon -> convexPolygon' + -> ConvexPolygon (point :+ point') minkowskiSum :: forall r convexPolygon point convexPolygon' point'. (Ord r, Num r, ConvexPolygon_ convexPolygon point r, ConvexPolygon_ convexPolygon' point' r) => convexPolygon -> convexPolygon' -> ConvexPolygon (point :+ point') -minkowskiSum convexPolygon -p convexPolygon' -q = [point :+ point'] -> ConvexPolygon (point :+ point') +minkowskiSum convexPolygon +p convexPolygon' +q = [point :+ point'] -> ConvexPolygon (point :+ point') forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -63,25 +63,25 @@ Ord (NumType point), Point_ point 2 (NumType point), Affine_ point 2 (NumType point)) => NonEmpty point -> NonEmpty point -> [point :+ point] -merge' (convexPolygon -> NonEmpty (Vertex convexPolygon) +merge' (convexPolygon -> NonEmpty (Vertex convexPolygon) forall {s}. (Dimension (Vertex s) ~ 2, Polygon_ s (Vertex s) (NumType (Vertex s)), Ord (NumType (Vertex s))) => s -> NonEmpty (Vertex s) -theVertices convexPolygon -p) (convexPolygon' -> NonEmpty (Vertex convexPolygon') +theVertices convexPolygon +p) (convexPolygon' -> NonEmpty (Vertex convexPolygon') forall {s}. (Dimension (Vertex s) ~ 2, Polygon_ s (Vertex s) (NumType (Vertex s)), Ord (NumType (Vertex s))) => s -> NonEmpty (Vertex s) -theVertices convexPolygon' -q) +theVertices convexPolygon' +q) where - theVertices :: s -> NonEmpty (Vertex s) -theVertices s -p' = case Getting (NonEmptyDList (Vertex s)) s (Vertex s) + theVertices :: s -> NonEmpty (Vertex s) +theVertices s +p' = case Getting (NonEmptyDList (Vertex s)) s (Vertex s) -> s -> NonEmpty (Vertex s) forall a s. Getting (NonEmptyDList a) s a -> s -> NonEmpty a toNonEmptyOf (VertexIx s -> IndexedTraversal1' (VertexIx s) s (Vertex s) @@ -97,29 +97,29 @@ (Polygon_ polygon point r, Ord r) => polygon -> VertexIx polygon bottomMost s -p') s -p' of - Vertex s -v :| [Vertex s] -xs -> Vertex s -vVertex s -> [Vertex s] -> NonEmpty (Vertex s) +p') s +p' of + Vertex s +v :| [Vertex s] +xs -> Vertex s +vVertex s -> [Vertex s] -> NonEmpty (Vertex s) forall a. a -> [a] -> NonEmpty a :| ([Vertex s] -xs[Vertex s] -> [Vertex s] -> [Vertex s] +xs[Vertex s] -> [Vertex s] -> [Vertex s] forall a. [a] -> [a] -> [a] ++[Vertex s -v]) +v]) - core -v .+. :: core -> extra -> core :+ extra -.+. extra -w = core -v core -> Vector (Dimension extra) (NumType extra) -> core + core +v .+. :: core -> extra -> core :+ extra +.+. extra +w = core +v core -> Vector (Dimension extra) (NumType extra) -> core forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ (extra -wextra +wextra -> Getting (Vector (Dimension extra) (NumType extra)) extra @@ -146,14 +146,14 @@ vector) core -> extra -> core :+ extra forall core extra. core -> extra -> core :+ extra :+ extra -w +w - cmpAngle :: point -> point -> point -> point -> Ordering -cmpAngle point -v point -v' point -w point -w' = + cmpAngle :: point -> point -> point -> point -> Ordering +cmpAngle point +v point +v' point +w point +w' = Point 2 (NumType point) -> PointF (Vector (Dimension point) (NumType point)) -> PointF (Vector (Dimension point) (NumType point)) @@ -163,8 +163,8 @@ center -> point -> point -> Ordering ccwCmpAround (point -> Point 2 (NumType point) forall point r. (Point_ point 2 r, Num r) => point -> Point 2 r -origin' point -v') (Vector (Dimension point) (NumType point) +origin' point +v') (Vector (Dimension point) (NumType point) -> PointF (Vector (Dimension point) (NumType point)) forall v. v -> PointF v Point (Vector (Dimension point) (NumType point) @@ -173,12 +173,12 @@ -> PointF (Vector (Dimension point) (NumType point)) forall a b. (a -> b) -> a -> b $ point -v' point -> point -> Vector (Dimension point) (NumType point) +v' point -> point -> Vector (Dimension point) (NumType point) forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -v) (Vector (Dimension point) (NumType point) +v) (Vector (Dimension point) (NumType point) -> PointF (Vector (Dimension point) (NumType point)) forall v. v -> PointF v Point (Vector (Dimension point) (NumType point) @@ -187,88 +187,88 @@ -> PointF (Vector (Dimension point) (NumType point)) forall a b. (a -> b) -> a -> b $ point -w' point -> point -> Vector (Dimension point) (NumType point) +w' point -> point -> Vector (Dimension point) (NumType point) forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -w) +w) -- hack to satisfy GHC 9.8; shouldn't be necessary with 9.10 and on ; just use origin as is - origin' :: (Point_ point 2 r, Num r) => point -> Point 2 r - origin' :: forall point r. (Point_ point 2 r, Num r) => point -> Point 2 r -origin' point + origin' :: (Point_ point 2 r, Num r) => point -> Point 2 r + origin' :: forall point r. (Point_ point 2 r, Num r) => point -> Point 2 r +origin' point _ = Point 2 r forall point (d :: Nat) r. (Num r, ConstructablePoint_ point d r) => point origin - merge' :: NonEmpty point -> NonEmpty point -> [point :+ point] -merge' vs0 :: NonEmpty point -vs0@(point -v:|[point] -vs1) ws0 :: NonEmpty point -ws0@(point -w:|[point] -ws1) = [point] -> [point] -> [point :+ point] -go [point] -vs1 [point] -ws1 + merge' :: NonEmpty point -> NonEmpty point -> [point :+ point] +merge' vs0 :: NonEmpty point +vs0@(point +v:|[point] +vs1) ws0 :: NonEmpty point +ws0@(point +w:|[point] +ws1) = [point] -> [point] -> [point :+ point] +go [point] +vs1 [point] +ws1 where - go :: [point] -> [point] -> [point :+ point] -go [] [] = [] - go [] (point -w':[point] -ws) = point -v point -> point -> point :+ point + go :: [point] -> [point] -> [point :+ point] +go [] [] = [] + go [] (point +w':[point] +ws) = point +v point -> point -> point :+ point forall {extra} {core}. (Dimension extra ~ Dimension core, NumType extra ~ NumType core, Affine_ core (Dimension core) (NumType core), Num (NumType core), HasVector extra extra) => core -> extra -> core :+ extra -.+. point -w (point :+ point) -> [point :+ point] -> [point :+ point] +.+. point +w (point :+ point) -> [point :+ point] -> [point :+ point] forall a. a -> [a] -> [a] : NonEmpty point -> NonEmpty point -> [point :+ point] -merge' NonEmpty point -vs0 (point -w'point -> [point] -> NonEmpty point +merge' NonEmpty point +vs0 (point +w'point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :|[point] -ws) - go (point -v':[point] -vs) [] = point -v point -> point -> point :+ point +ws) + go (point +v':[point] +vs) [] = point +v point -> point -> point :+ point forall {extra} {core}. (Dimension extra ~ Dimension core, NumType extra ~ NumType core, Affine_ core (Dimension core) (NumType core), Num (NumType core), HasVector extra extra) => core -> extra -> core :+ extra -.+. point -w (point :+ point) -> [point :+ point] -> [point :+ point] +.+. point +w (point :+ point) -> [point :+ point] -> [point :+ point] forall a. a -> [a] -> [a] : NonEmpty point -> NonEmpty point -> [point :+ point] -merge' (point -v'point -> [point] -> NonEmpty point +merge' (point +v'point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :|[point] -vs) NonEmpty point -ws0 - go (point -v':[point] -vs) (point -w':[point] -ws) = point -v point -> point -> point :+ point +vs) NonEmpty point +ws0 + go (point +v':[point] +vs) (point +w':[point] +ws) = point +v point -> point -> point :+ point forall {extra} {core}. (Dimension extra ~ Dimension core, NumType extra ~ NumType core, Affine_ core (Dimension core) (NumType core), Num (NumType core), HasVector extra extra) => core -> extra -> core :+ extra -.+. point -w (point :+ point) -> [point :+ point] -> [point :+ point] +.+. point +w (point :+ point) -> [point :+ point] -> [point :+ point] forall a. a -> [a] -> [a] : case point -> point -> point -> point -> Ordering forall {point} {point}. @@ -277,40 +277,40 @@ Point_ point 2 (NumType point), Num (NumType point), Affine_ point 2 (NumType point)) => point -> point -> point -> point -> Ordering -cmpAngle point -v point -v' point -w point -w' of +cmpAngle point +v point +v' point +w point +w' of Ordering LT -> NonEmpty point -> NonEmpty point -> [point :+ point] -merge' (point -v'point -> [point] -> NonEmpty point +merge' (point +v'point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :|[point] -vs) NonEmpty point -ws0 +vs) NonEmpty point +ws0 Ordering GT -> NonEmpty point -> NonEmpty point -> [point :+ point] -merge' NonEmpty point -vs0 (point -w'point -> [point] -> NonEmpty point +merge' NonEmpty point +vs0 (point +w'point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :|[point] -ws) +ws) Ordering EQ -> NonEmpty point -> NonEmpty point -> [point :+ point] -merge' (point -v'point -> [point] -> NonEmpty point +merge' (point +v'point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :|[point] -vs) (point -w'point -> [point] -> NonEmpty point +vs) (point +w'point -> [point] -> NonEmpty point forall a. a -> [a] -> NonEmpty a :|[point] -ws) +ws) -bottomMost :: (Polygon_ polygon point r, Ord r) => polygon -> VertexIx polygon +bottomMost :: (Polygon_ polygon point r, Ord r) => polygon -> VertexIx polygon bottomMost :: forall polygon point r. (Polygon_ polygon point r, Ord r) => polygon -> VertexIx polygon @@ -342,7 +342,7 @@ (TypeError ...), Ord (NumType b), Point_ b (Dimension b) (NumType b)) => b -> b -> Ordering -cmp (Indexed +cmp (Indexed (VertexIx polygon) point (Const (First (VertexIx polygon, point)) point) @@ -369,10 +369,10 @@ p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex) where - cmp :: b -> b -> Ordering -cmp b -p b -q = (b -> NumType b) -> b -> b -> Ordering + cmp :: b -> b -> Ordering +cmp b +p b +q = (b -> NumType b) -> b -> b -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (b -> Getting (NumType b) b (NumType b) -> NumType b forall s a. s -> Getting a s a -> a @@ -382,8 +382,8 @@ IndexedLens' Int point r IndexedLens' Int b (NumType b) yCoord) b -p b -q Ordering -> Ordering -> Ordering +p b +q Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> (b -> NumType b) -> b -> b -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering @@ -395,8 +395,8 @@ IndexedLens' Int point r IndexedLens' Int b (NumType b) xCoord) b -p b -q +p b +q -- newtype UnsafeExtra extra = UnsafeExtra extra diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Random.html b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Random.html index 4ef4a62b4..f6be7b39c 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Random.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Random.html @@ -60,18 +60,18 @@ -- And the sum of [-3, 4, -1] = -3+4-1 = 0. -- O(n log n) -randomBetween :: (MonadState g m, RandomGen g) - => Int -> Int -> m (VU.Vector Int) +randomBetween :: (MonadState g m, RandomGen g) + => Int -> Int -> m (VU.Vector Int) randomBetween :: forall g (m :: * -> *). (MonadState g m, RandomGen g) => Int -> Int -> m (Vector Int) -randomBetween Int -n Int -vMax | Int -vMax Int -> Int -> Bool +randomBetween Int +n Int +vMax | Int +vMax Int -> Int -> Bool forall a. Ord a => a -> a -> Bool < Int -nInt -> Int -> Int +nInt -> Int -> Int forall a. Num a => a -> a -> a +Int 1 = Vector Int -> m (Vector Int) @@ -82,65 +82,65 @@ $ Int -> Int -> Vector Int forall a. Unbox a => Int -> a -> Vector a VU.replicate Int -vMax Int +vMax Int 1 -randomBetween Int -n Int -vMax = Int -> IntSet -> m (Vector Int) -worker (Int -nInt -> Int -> Int +randomBetween Int +n Int +vMax = Int -> IntSet -> m (Vector Int) +worker (Int +nInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) IntSet IS.empty where - gen :: Int -> [Int] -> [Int] -gen Int -from' [] = [Int -vMaxInt -> Int -> Int + gen :: Int -> [Int] -> [Int] +gen Int +from' [] = [Int +vMaxInt -> Int -> Int forall a. Num a => a -> a -> a -Int -from'] - gen Int -from' (Int -x:[Int] -xs) = (Int -xInt -> Int -> Int +from'] + gen Int +from' (Int +x:[Int] +xs) = (Int +xInt -> Int -> Int forall a. Num a => a -> a -> a -Int -from') Int -> [Int] -> [Int] +from') Int -> [Int] -> [Int] forall a. a -> [a] -> [a] : Int -> [Int] -> [Int] -gen Int -x [Int] -xs - worker :: Int -> IntSet -> m (Vector Int) -worker Int -0 IntSet -seen = Vector Int -> m (Vector Int) +gen Int +x [Int] +xs + worker :: Int -> IntSet -> m (Vector Int) +worker Int +0 IntSet +seen = Vector Int -> m (Vector Int) forall a. a -> m a forall (f :: * -> *) a. Applicative f => a -> f a pure ([Int] -> Vector Int forall a. Unbox a => [a] -> Vector a VU.fromList (Int -> [Int] -> [Int] -gen Int +gen Int 0 ([Int] -> [Int]) -> [Int] -> [Int] forall a b. (a -> b) -> a -> b $ IntSet -> [Int] IS.elems IntSet -seen)) - worker Int -i IntSet -seen = do - Int -v <- (Int, Int) -> StateGenM g -> m Int +seen)) + worker Int +i IntSet +seen = do + Int +v <- (Int, Int) -> StateGenM g -> m Int forall a g (m :: * -> *). (UniformRange a, StatefulGen g m) => (a, a) -> g -> m a forall g (m :: * -> *). StatefulGen g m => (Int, Int) -> g -> m Int uniformRM (Int 1, Int -vMaxInt -> Int -> Int +vMaxInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) StateGenM g @@ -148,29 +148,29 @@ StateGenM if Int -> IntSet -> Bool IS.member Int -v IntSet -seen +v IntSet +seen then Int -> IntSet -> m (Vector Int) -worker Int -i IntSet -seen +worker Int +i IntSet +seen else Int -> IntSet -> m (Vector Int) -worker (Int -iInt -> Int -> Int +worker (Int +iInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) (Int -> IntSet -> IntSet IS.insert Int -v IntSet -seen) +v IntSet +seen) -randomBetweenZero :: (MonadState g m, RandomGen g) => Int -> Int -> m (VU.Vector Int) +randomBetweenZero :: (MonadState g m, RandomGen g) => Int -> Int -> m (VU.Vector Int) randomBetweenZero :: forall g (m :: * -> *). (MonadState g m, RandomGen g) => Int -> Int -> m (Vector Int) -randomBetweenZero Int -n Int -vMax = (Int -> Int -> Int) -> Vector Int -> Vector Int -> Vector Int +randomBetweenZero Int +n Int +vMax = (Int -> Int -> Int) -> Vector Int -> Vector Int -> Vector Int forall a b c. (Unbox a, Unbox b, Unbox c) => (a -> b -> c) -> Vector a -> Vector b -> Vector c @@ -182,8 +182,8 @@ (MonadState g m, RandomGen g) => Int -> Int -> m (Vector Int) randomBetween Int -n Int -vMax m (Vector Int -> Vector Int) -> m (Vector Int) -> m (Vector Int) +n Int +vMax m (Vector Int -> Vector Int) -> m (Vector Int) -> m (Vector Int) forall a b. m (a -> b) -> m a -> m b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> Int -> m (Vector Int) @@ -191,16 +191,16 @@ (MonadState g m, RandomGen g) => Int -> Int -> m (Vector Int) randomBetween Int -n Int -vMax +n Int +vMax -randomEdges :: (MonadState g m, RandomGen g) => Int -> Int -> m [Point 2 Int] +randomEdges :: (MonadState g m, RandomGen g) => Int -> Int -> m [Point 2 Int] randomEdges :: forall g (m :: * -> *). (MonadState g m, RandomGen g) => Int -> Int -> m [Point 2 Int] -randomEdges Int -n Int -vMax = do +randomEdges Int +n Int +vMax = do (Int -> Int -> Point 2 Int) -> [Int] -> [Int] -> [Point 2 Int] forall a b c. (a -> b -> c) -> [a] -> [b] -> [c] zipWith Int -> Int -> Point 2 Int @@ -219,8 +219,8 @@ (MonadState g m, RandomGen g) => Int -> Int -> m (Vector Int) randomBetweenZero Int -n Int -vMax) +n Int +vMax) m ([Int] -> [Point 2 Int]) -> m [Int] -> m [Point 2 Int] forall a b. m (a -> b) -> m a -> m b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b @@ -234,21 +234,21 @@ (MonadState g m, RandomGen g) => Int -> Int -> m (Vector Int) randomBetweenZero Int -n Int -vMax) +n Int +vMax) -- | Generate a random ConvexPolygon with @N@ vertices and a granularity of @vMax@. -- -- \( O(n \log n) \) -randomConvex :: (MonadState g m, RandomGen g) - => Int -> Int -> m (ConvexPolygon (Point 2 Rational)) +randomConvex :: (MonadState g m, RandomGen g) + => Int -> Int -> m (ConvexPolygon (Point 2 Rational)) randomConvex :: forall g (m :: * -> *). (MonadState g m, RandomGen g) => Int -> Int -> m (ConvexPolygon (Point 2 Rational)) -randomConvex Int -n Int -_vMax | Int -n Int -> Int -> Bool +randomConvex Int +n Int +_vMax | Int +n Int -> Int -> Bool forall a. Ord a => a -> a -> Bool < Int 3 = @@ -256,12 +256,12 @@ forall a. HasCallStack => [Char] -> a error [Char] "HGeometry.Polygon.Convex.randomConvex: At least 3 edges are required." -randomConvex Int -n Int -vMax = do - (Point 2 Int -v:|[Point 2 Int] -vs) <- [Point 2 Int] -> NonEmpty (Point 2 Int) +randomConvex Int +n Int +vMax = do + (Point 2 Int +v:|[Point 2 Int] +vs) <- [Point 2 Int] -> NonEmpty (Point 2 Int) forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList ([Point 2 Int] -> NonEmpty (Point 2 Int)) -> ([Point 2 Int] -> [Point 2 Int]) @@ -284,10 +284,10 @@ (MonadState g m, RandomGen g) => Int -> Int -> m [Point 2 Int] randomEdges Int -n Int -vMax - let theVertices :: NonEmpty (Point 2 Rational) -theVertices = ASetter +n Int +vMax + let theVertices :: NonEmpty (Point 2 Rational) +theVertices = ASetter (Point 2 Int) (Point 2 Rational) Int (NumType (Point 2 Rational)) -> (Int -> NumType (Point 2 Rational)) -> Point 2 Int @@ -312,7 +312,7 @@ / Int -> NumType (Point 2 Rational) forall a b. (Real a, Fractional b) => a -> b realToFrac Int -vMax) (NumType (Point 2 Rational) -> NumType (Point 2 Rational)) +vMax) (NumType (Point 2 Rational) -> NumType (Point 2 Rational)) -> (Int -> NumType (Point 2 Rational)) -> Int -> NumType (Point 2 Rational) @@ -328,15 +328,15 @@ forall (f :: * -> *) b a. Foldable f => (b -> a -> b) -> b -> f a -> NonEmpty b -NonEmpty.scanl (\Point 2 Int -p Point 2 Int -u -> Point 2 Int -p Point 2 Int -> Vector 2 Int -> Point 2 Int +NonEmpty.scanl (\Point 2 Int +p Point 2 Int +u -> Point 2 Int +p Point 2 Int -> Vector 2 Int -> Point 2 Int forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ (Point 2 Int -uPoint 2 Int +uPoint 2 Int -> Getting (Vector 2 Int) (Point 2 Int) (Vector 2 Int) -> Vector 2 Int forall s a. s -> Getting a s a -> a @@ -351,10 +351,10 @@ Lens point point' (Vector d r) (Vector d s) Lens (Point 2 Int) (Point 2 Int) (Vector 2 Int) (Vector 2 Int) vector)) Point 2 Int -v [Point 2 Int] -vs - pRational :: ConvexPolygon (Point 2 Rational) -pRational = NonEmpty (Point 2 Rational) -> ConvexPolygon (Point 2 Rational) +v [Point 2 Int] +vs + pRational :: ConvexPolygon (Point 2 Rational) +pRational = NonEmpty (Point 2 Rational) -> ConvexPolygon (Point 2 Rational) forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon @@ -362,9 +362,9 @@ Foldable f => f (Point 2 Rational) -> ConvexPolygon (Point 2 Rational) uncheckedFromCCWPoints NonEmpty (Point 2 Rational) -theVertices - Point Vector 2 Rational -c = ConvexPolygon (Point 2 Rational) -> Point 2 Rational +theVertices + Point Vector 2 Rational +c = ConvexPolygon (Point 2 Rational) -> Point 2 Rational forall point'. (Fractional Rational, ConstructablePoint_ point' 2 Rational) => ConvexPolygon (Point 2 Rational) -> point' @@ -373,7 +373,7 @@ ConstructablePoint_ point' 2 r) => simplePolygon -> point' centroid ConvexPolygon (Point 2 Rational) -pRational +pRational ConvexPolygon (Point 2 Rational) -> m (ConvexPolygon (Point 2 Rational)) forall a. a -> m a @@ -384,7 +384,7 @@ -> m (ConvexPolygon (Point 2 Rational)) forall a b. (a -> b) -> a -> b $ ConvexPolygon (Point 2 Rational) -pRationalConvexPolygon (Point 2 Rational) +pRationalConvexPolygon (Point 2 Rational) -> (ConvexPolygon (Point 2 Rational) -> ConvexPolygon (Point 2 Rational)) -> ConvexPolygon (Point 2 Rational) @@ -415,5 +415,5 @@ (Affine_ point d r, Num r) => point -> Vector d r -> point .-^ Vector 2 Rational -c) +c) \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Tangents.html b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Tangents.html index f41980668..132524eb1 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Tangents.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Convex.Tangents.html @@ -37,14 +37,14 @@ -- s.t. the polygon lies completely to the right of the line from q to v. -- -- running time: \(O(\log n)\). -leftTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) - => convexPolygon -> point -> point +leftTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) + => convexPolygon -> point -> point leftTangent :: forall r convexPolygon point. (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point -leftTangent convexPolygon -poly point -q = (point -> point -> Ordering) -> convexPolygon -> point +leftTangent convexPolygon +poly point +q = (point -> point -> Ordering) -> convexPolygon -> point forall convexPolygon point r. ConvexPolygon_ convexPolygon point r => (point -> point -> Ordering) -> convexPolygon -> point @@ -53,22 +53,22 @@ (Num r, Ord r, Point_ point 2 r) => point -> point -> point -> Ordering tangentCmp point -q) convexPolygon -poly +q) convexPolygon +poly -- | Given a convex polygon poly, and a point outside the polygon, find the -- right tangent of q and the polygon, i.e. the vertex v of the convex polygon -- s.t. the polygon lies completely to the left of the line from q to v. -- -- running time: \(O(\log n)\). -rightTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) - => convexPolygon -> point -> point +rightTangent :: (Ord r, Num r, ConvexPolygon_ convexPolygon point r) + => convexPolygon -> point -> point rightTangent :: forall r convexPolygon point. (Ord r, Num r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> point -> point -rightTangent convexPolygon -poly point -q = (point -> point -> Ordering) -> convexPolygon -> point +rightTangent convexPolygon +poly point +q = (point -> point -> Ordering) -> convexPolygon -> point forall convexPolygon point r. ConvexPolygon_ convexPolygon point r => (point -> point -> Ordering) -> convexPolygon -> point @@ -82,27 +82,27 @@ (Num r, Ord r, Point_ point 2 r) => point -> point -> point -> Ordering tangentCmp point -q) convexPolygon -poly +q) convexPolygon +poly -tangentCmp :: (Num r, Ord r, Point_ point 2 r) - => point -> point -> point -> Ordering +tangentCmp :: (Num r, Ord r, Point_ point 2 r) + => point -> point -> point -> Ordering tangentCmp :: forall r point. (Num r, Ord r, Point_ point 2 r) => point -> point -> point -> Ordering -tangentCmp point -o point -p point -q = case point -> point -> point -> CCW +tangentCmp point +o point +p point +q = case point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -o point -p point -q of +o point +p point +q of CCW CCW -> Ordering LT -- q is left of the line from o to p @@ -124,26 +124,26 @@ -- - The vertices of the polygons are given in clockwise order -- -- Running time: O(n+m), where n and m are the sizes of the two polygons respectively -lowerTangent :: ( Num r, Ord r - , ConvexPolygon_ convexPolygon point r, Point_ point 2 r +lowerTangent :: ( Num r, Ord r + , ConvexPolygon_ convexPolygon point r, Point_ point 2 r ) - => convexPolygon - -> convexPolygon - -> ClosedLineSegment point + => convexPolygon + -> convexPolygon + -> ClosedLineSegment point lowerTangent :: forall r convexPolygon point. (Num r, Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> convexPolygon -> ClosedLineSegment point -lowerTangent convexPolygon -lp convexPolygon -rp = point -> point -> ClosedLineSegment point +lowerTangent convexPolygon +lp convexPolygon +rp = point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -l point -r +l point +r where - lh :: NonEmpty point -lh = Getting (NonEmptyDList point) convexPolygon point + lh :: NonEmpty point +lh = Getting (NonEmptyDList point) convexPolygon point -> convexPolygon -> NonEmpty point forall a s. Getting (NonEmptyDList a) s a -> s -> NonEmpty a toNonEmptyOf (VertexIx convexPolygon @@ -158,10 +158,10 @@ (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> Int rightMostIdx convexPolygon -lp)) convexPolygon -lp - rh :: NonEmpty point -rh = Getting (NonEmptyDList point) convexPolygon point +lp)) convexPolygon +lp + rh :: NonEmpty point +rh = Getting (NonEmptyDList point) convexPolygon point -> convexPolygon -> NonEmpty point forall a s. Getting (NonEmptyDList a) s a -> s -> NonEmpty a toNonEmptyOf (VertexIx convexPolygon @@ -176,23 +176,23 @@ (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> Int leftMostIdx convexPolygon -rp)) convexPolygon -rp - (Vector2 (point -l :+ [point] -_) (point -r :+ [point] +rp)) convexPolygon +rp + (Vector2 (point +l :+ [point] +_) (point +r :+ [point] _)) = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) forall point r (f :: * -> *). (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point]) lowerTangent' NonEmpty point -lh NonEmpty point -rh +lh NonEmpty point +rh -- | Index of the rightmost vertex. Returns the topmost such vertex if there are multiple -rightMostIdx :: (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) - => convexPolygon -> Int +rightMostIdx :: (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) + => convexPolygon -> Int rightMostIdx :: forall r convexPolygon point. (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> Int @@ -247,15 +247,15 @@ comparePtsXY -- | compare on x and y coordinates -comparePtsXY :: (Ord r, Point_ point 2 r) => (i, point) -> (i,point) -> Ordering +comparePtsXY :: (Ord r, Point_ point 2 r) => (i, point) -> (i,point) -> Ordering comparePtsXY :: forall r point i. (Ord r, Point_ point 2 r) => (i, point) -> (i, point) -> Ordering comparePtsXY (i -_,point -p) (i -_,point -q) = (point -> r) -> point -> point -> Ordering +_,point +p) (i +_,point +q) = (point -> r) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (point -> Getting r point r -> r forall s a. s -> Getting a s a -> a @@ -265,8 +265,8 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord) point -p point -q Ordering -> Ordering -> Ordering +p point +q Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> (point -> r) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering @@ -278,12 +278,12 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) point -p point -q +p point +q -- | Index of the leftmost vertex, returns the bottommost if there are multiple. -leftMostIdx :: (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) - => convexPolygon -> Int +leftMostIdx :: (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) + => convexPolygon -> Int leftMostIdx :: forall r convexPolygon point. (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> Int @@ -338,13 +338,13 @@ comparePtsXY -- | get the maximum of the elements the lens points to using the given comparison function -maximum1ByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a +maximum1ByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a maximum1ByOf :: forall a s. Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a -maximum1ByOf Getting (Endo (Endo (Maybe a))) s a -l a -> a -> Ordering -cmp = a -> Maybe a -> a +maximum1ByOf Getting (Endo (Endo (Maybe a))) s a +l a -> a -> Ordering +cmp = a -> Maybe a -> a forall a. a -> Maybe a -> a fromMaybe ([Char] -> a forall a. HasCallStack => [Char] -> a @@ -357,17 +357,17 @@ Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a maximumByOf Getting (Endo (Endo (Maybe a))) s a -l a -> a -> Ordering -cmp +l a -> a -> Ordering +cmp -- | get the minimum of the elements the lens points to using the given comparison function -minimum1ByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a +minimum1ByOf :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a minimum1ByOf :: forall a s. Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> a -minimum1ByOf Getting (Endo (Endo (Maybe a))) s a -l a -> a -> Ordering -cmp = a -> Maybe a -> a +minimum1ByOf Getting (Endo (Endo (Maybe a))) s a +l a -> a -> Ordering +cmp = a -> Maybe a -> a forall a. a -> Maybe a -> a fromMaybe ([Char] -> a forall a. HasCallStack => [Char] -> a @@ -380,8 +380,8 @@ Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> Ordering) -> s -> Maybe a minimumByOf Getting (Endo (Endo (Maybe a))) s a -l a -> a -> Ordering -cmp +l a -> a -> Ordering +cmp -- | Compute the lower tangent of the two convex chains lp and rp -- @@ -397,62 +397,62 @@ -- -- Running time: \(O(n+m)\), where n and m are the sizes of the two chains -- respectively -lowerTangent' :: forall point r f. (Ord r, Num r, Foldable1 f, Point_ point 2 r) - => f point -> f point -> Vector 2 (point :+ [point]) +lowerTangent' :: forall point r f. (Ord r, Num r, Foldable1 f, Point_ point 2 r) + => f point -> f point -> Vector 2 (point :+ [point]) lowerTangent' :: forall point r (f :: * -> *). (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point]) -lowerTangent' f point -l0 f point -r0 = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) +lowerTangent' f point +l0 f point +r0 = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) forall {core}. (Dimension core ~ 2, Point_ core 2 (NumType core), Num (NumType core), Ord (NumType core)) => NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go (f point -> NonEmpty point +go (f point -> NonEmpty point forall a. f a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty f point -l0) (f point -> NonEmpty point +l0) (f point -> NonEmpty point forall a. f a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty f point -r0) +r0) where - ne :: [a] -> NonEmpty a -ne = [a] -> NonEmpty a + ne :: [a] -> NonEmpty a +ne = [a] -> NonEmpty a forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList - isRight' :: [point''] -> point -> point' -> Bool -isRight' [] point + isRight' :: [point''] -> point -> point' -> Bool +isRight' [] point _ point' _ = Bool False - isRight' (point'' -x:[point''] -_) point -l point' -r = point -> point' -> point'' -> CCW + isRight' (point'' +x:[point''] +_) point +l point' +r = point -> point' -> point'' -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -l point' -r point'' -x CCW -> CCW -> Bool +l point' +r point'' +x CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool /= CCW CCW - go :: NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go lh :: NonEmpty core -lh@(core -l:|[core] -ls) rh :: NonEmpty core -rh@(core -r:|[core] -rs) | [core] -> core -> core -> Bool + go :: NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) +go lh :: NonEmpty core +lh@(core +l:|[core] +ls) rh :: NonEmpty core +rh@(core +r:|[core] +rs) | [core] -> core -> core -> Bool forall {point} {point''} {point'}. (Dimension point ~ 2, Dimension point'' ~ 2, Dimension point' ~ 2, NumType point' ~ NumType point, NumType point'' ~ NumType point, @@ -460,15 +460,15 @@ Point_ point'' 2 (NumType point), Num (NumType point), Ord (NumType point)) => [point''] -> point -> point' -> Bool -isRight' [core] -rs core -l core -r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go NonEmpty core -lh ([core] -> NonEmpty core +isRight' [core] +rs core +l core +r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) +go NonEmpty core +lh ([core] -> NonEmpty core forall {a}. [a] -> NonEmpty a -ne [core] -rs) +ne [core] +rs) | [core] -> core -> core -> Bool forall {point} {point''} {point'}. (Dimension point ~ 2, Dimension point'' ~ 2, Dimension point' ~ 2, @@ -477,27 +477,27 @@ Point_ point'' 2 (NumType point), Num (NumType point), Ord (NumType point)) => [point''] -> point -> point' -> Bool -isRight' [core] -ls core -l core -r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go ([core] -> NonEmpty core +isRight' [core] +ls core +l core +r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) +go ([core] -> NonEmpty core forall {a}. [a] -> NonEmpty a -ne [core] -ls) NonEmpty core -rh +ne [core] +ls) NonEmpty core +rh | Bool otherwise = (core :+ [core]) -> (core :+ [core]) -> Vector 2 (core :+ [core]) forall r. r -> r -> Vector 2 r Vector2 (core -l core -> [core] -> core :+ [core] +l core -> [core] -> core :+ [core] forall core extra. core -> extra -> core :+ extra :+ [core] -ls) (core -r core -> [core] -> core :+ [core] +ls) (core +r core -> [core] -> core :+ [core] forall core extra. core -> extra -> core :+ extra :+ [core] -rs) +rs) @@ -519,25 +519,25 @@ -- - The vertices of the polygons are given in clockwise order -- -- Running time: \( O(n+m) \), where n and m are the sizes of the two polygons respectively -upperTangent :: forall convexPolygon point r. - ( Num r, Ord r - , ConvexPolygon_ convexPolygon point r) - => convexPolygon - -> convexPolygon - -> ClosedLineSegment point +upperTangent :: forall convexPolygon point r. + ( Num r, Ord r + , ConvexPolygon_ convexPolygon point r) + => convexPolygon + -> convexPolygon + -> ClosedLineSegment point upperTangent :: forall convexPolygon point r. (Num r, Ord r, ConvexPolygon_ convexPolygon point r) => convexPolygon -> convexPolygon -> ClosedLineSegment point -upperTangent convexPolygon -lp convexPolygon -rp = point -> point -> ClosedLineSegment point +upperTangent convexPolygon +lp convexPolygon +rp = point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point -l point -r +l point +r where - lh :: NonEmpty point -lh = Getting (NonEmptyDList point) convexPolygon point + lh :: NonEmpty point +lh = Getting (NonEmptyDList point) convexPolygon point -> convexPolygon -> NonEmpty point forall a s. Getting (NonEmptyDList a) s a -> s -> NonEmpty a toNonEmptyOf (VertexIx convexPolygon @@ -552,10 +552,10 @@ (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> Int rightMostIdx convexPolygon -lp)) convexPolygon -lp - rh :: NonEmpty point -rh = Getting (NonEmptyDList point) convexPolygon point +lp)) convexPolygon +lp + rh :: NonEmpty point +rh = Getting (NonEmptyDList point) convexPolygon point -> convexPolygon -> NonEmpty point forall a s. Getting (NonEmptyDList a) s a -> s -> NonEmpty a toNonEmptyOf (VertexIx convexPolygon @@ -570,19 +570,19 @@ (Ord r, ConvexPolygon_ convexPolygon point r, Point_ point 2 r) => convexPolygon -> Int leftMostIdx convexPolygon -rp)) convexPolygon -rp - (Vector2 (point -l :+ [point] -_) (point -r :+ [point] +rp)) convexPolygon +rp + (Vector2 (point +l :+ [point] +_) (point +r :+ [point] _)) = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) forall r (f :: * -> *) point. (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point]) upperTangent' NonEmpty point -lh NonEmpty point -rh +lh NonEmpty point +rh -- | Compute the upper tangent of the two convex chains lp and rp -- @@ -598,62 +598,62 @@ -- -- Running time: \(O(n+m)\), where n and m are the sizes of the two chains -- respectively -upperTangent' :: (Ord r, Num r, Foldable1 f, Point_ point 2 r) - => f point -> f point -> Vector 2 (point :+ [point]) +upperTangent' :: (Ord r, Num r, Foldable1 f, Point_ point 2 r) + => f point -> f point -> Vector 2 (point :+ [point]) upperTangent' :: forall r (f :: * -> *) point. (Ord r, Num r, Foldable1 f, Point_ point 2 r) => f point -> f point -> Vector 2 (point :+ [point]) -upperTangent' f point -l0 f point -r0 = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) +upperTangent' f point +l0 f point +r0 = NonEmpty point -> NonEmpty point -> Vector 2 (point :+ [point]) forall {core}. (Dimension core ~ 2, Point_ core 2 (NumType core), Num (NumType core), Ord (NumType core)) => NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go (f point -> NonEmpty point +go (f point -> NonEmpty point forall a. f a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty f point -l0) (f point -> NonEmpty point +l0) (f point -> NonEmpty point forall a. f a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty f point -r0) +r0) where - ne :: [a] -> NonEmpty a -ne = [a] -> NonEmpty a + ne :: [a] -> NonEmpty a +ne = [a] -> NonEmpty a forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList - isLeft' :: [point''] -> point -> point' -> Bool -isLeft' [] point + isLeft' :: [point''] -> point -> point' -> Bool +isLeft' [] point _ point' _ = Bool False - isLeft' (point'' -x:[point''] -_) point -l point' -r = point -> point' -> point'' -> CCW + isLeft' (point'' +x:[point''] +_) point +l point' +r = point -> point' -> point'' -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -l point' -r point'' -x CCW -> CCW -> Bool +l point' +r point'' +x CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool /= CCW CW - go :: NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go lh :: NonEmpty core -lh@(core -l:|[core] -ls) rh :: NonEmpty core -rh@(core -r:|[core] -rs) | [core] -> core -> core -> Bool + go :: NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) +go lh :: NonEmpty core +lh@(core +l:|[core] +ls) rh :: NonEmpty core +rh@(core +r:|[core] +rs) | [core] -> core -> core -> Bool forall {point} {point''} {point'}. (Dimension point ~ 2, Dimension point'' ~ 2, Dimension point' ~ 2, NumType point' ~ NumType point, NumType point'' ~ NumType point, @@ -661,15 +661,15 @@ Point_ point'' 2 (NumType point), Num (NumType point), Ord (NumType point)) => [point''] -> point -> point' -> Bool -isLeft' [core] -rs core -l core -r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go NonEmpty core -lh ([core] -> NonEmpty core +isLeft' [core] +rs core +l core +r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) +go NonEmpty core +lh ([core] -> NonEmpty core forall {a}. [a] -> NonEmpty a -ne [core] -rs) +ne [core] +rs) | [core] -> core -> core -> Bool forall {point} {point''} {point'}. (Dimension point ~ 2, Dimension point'' ~ 2, Dimension point' ~ 2, @@ -678,25 +678,25 @@ Point_ point'' 2 (NumType point), Num (NumType point), Ord (NumType point)) => [point''] -> point -> point' -> Bool -isLeft' [core] -ls core -l core -r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) -go ([core] -> NonEmpty core +isLeft' [core] +ls core +l core +r = NonEmpty core -> NonEmpty core -> Vector 2 (core :+ [core]) +go ([core] -> NonEmpty core forall {a}. [a] -> NonEmpty a -ne [core] -ls) NonEmpty core -rh +ne [core] +ls) NonEmpty core +rh | Bool otherwise = (core :+ [core]) -> (core :+ [core]) -> Vector 2 (core :+ [core]) forall r. r -> r -> Vector 2 r Vector2 (core -l core -> [core] -> core :+ [core] +l core -> [core] -> core :+ [core] forall core extra. core -> extra -> core :+ extra :+ [core] -ls) (core -r core -> [core] -> core :+ [core] +ls) (core +r core -> [core] -> core :+ [core] forall core extra. core -> extra -> core :+ extra :+ [core] -rs) +rs) \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Monotone.html b/haddocks/hgeometry/src/HGeometry.Polygon.Monotone.html index fc6c4a352..da8df4520 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Monotone.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Monotone.html @@ -46,20 +46,20 @@ -- | A type representing montone polygons type MonotonePolygon :: Type -> Type -type MonotonePolygon point = MonotonePolygonF (SimplePolygon point) +type MonotonePolygon point = MonotonePolygonF (SimplePolygon point) -- | Monotone polygons. A polygon is monotone in direction d if any -- line perpendicular to direction d intersects the polygon in a -- single interval. -- -data MonotonePolygonF simplePolygon = +data MonotonePolygonF simplePolygon = MonotonePolygon { forall simplePolygon. MonotonePolygonF simplePolygon -> Vector 2 (NumType simplePolygon) -monotoneDirection :: Vector 2 (NumType simplePolygon) +monotoneDirection :: Vector 2 (NumType simplePolygon) -- ^ the direction in which we are monotone , forall simplePolygon. MonotonePolygonF simplePolygon -> simplePolygon -toSimplePolygon :: simplePolygon +toSimplePolygon :: simplePolygon -- ^ Convert to a simple polygon, i.e. forget the polygon is monotone } -- deriving (NFData, Eq) @@ -68,8 +68,8 @@ -- direction v, creates a Monotone polygon out of it. All of this is unchecked. -- -- running time: O(1) -uncheckedMontonePolygon :: ( SimplePolygon_ simplePolygon point r - ) => Vector 2 r -> simplePolygon -> MonotonePolygonF simplePolygon +uncheckedMontonePolygon :: ( SimplePolygon_ simplePolygon point r + ) => Vector 2 r -> simplePolygon -> MonotonePolygonF simplePolygon uncheckedMontonePolygon :: forall simplePolygon point r. SimplePolygon_ simplePolygon point r => Vector 2 r -> simplePolygon -> MonotonePolygonF simplePolygon @@ -82,8 +82,8 @@ MonotonePolygon -type instance Dimension (MonotonePolygonF simplePolygon) = 2 -type instance NumType (MonotonePolygonF simplePolygon) = NumType simplePolygon +type instance Dimension (MonotonePolygonF simplePolygon) = 2 +type instance NumType (MonotonePolygonF simplePolygon) = NumType simplePolygon -- | Try to establish that the given simple polygon is monotone with @@ -91,25 +91,25 @@ -- -- -- \( O(n \log n) \) -asMonotonePolygon :: (SimplePolygon_ simplePolygon point r, Num r, Ord r +asMonotonePolygon :: (SimplePolygon_ simplePolygon point r, Num r, Ord r ) - => Vector 2 r - -> simplePolygon - -> Maybe (MonotonePolygonF simplePolygon) + => Vector 2 r + -> simplePolygon + -> Maybe (MonotonePolygonF simplePolygon) asMonotonePolygon :: forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Maybe (MonotonePolygonF simplePolygon) -asMonotonePolygon Vector 2 r -v simplePolygon -pg +asMonotonePolygon Vector 2 r +v simplePolygon +pg | Vector 2 r -> simplePolygon -> Bool forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Bool isMonotone Vector 2 r -v simplePolygon -pg = MonotonePolygonF simplePolygon +v simplePolygon +pg = MonotonePolygonF simplePolygon -> Maybe (MonotonePolygonF simplePolygon) forall a. a -> Maybe a Just (MonotonePolygonF simplePolygon @@ -124,8 +124,8 @@ -> simplePolygon -> MonotonePolygonF simplePolygon MonotonePolygon Vector 2 r Vector 2 (NumType simplePolygon) -v simplePolygon -pg +v simplePolygon +pg | Bool otherwise = Maybe (MonotonePolygonF simplePolygon) forall a. Maybe a @@ -136,20 +136,20 @@ -- cannot have more than two intersections. -- -- \( O(n \log n) \) -isMonotone :: ( SimplePolygon_ simplePolygon point r - , Num r, Ord r +isMonotone :: ( SimplePolygon_ simplePolygon point r + , Num r, Ord r ) - => Vector 2 r -> simplePolygon -> Bool + => Vector 2 r -> simplePolygon -> Bool isMonotone :: forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, Num r, Ord r) => Vector 2 r -> simplePolygon -> Bool -isMonotone Vector 2 r -direction simplePolygon -pg = (point -> Bool) -> [point] -> Bool +isMonotone Vector 2 r +direction simplePolygon +pg = (point -> Bool) -> [point] -> Bool forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool all point -> Bool -isMonotoneAt (simplePolygon -pgsimplePolygon +isMonotoneAt (simplePolygon +pgsimplePolygon -> Getting (Endo [point]) simplePolygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) simplePolygon point @@ -171,9 +171,9 @@ -- line starting at the vertex and going out in the given direction -- intersects with the edges of the polygon no more than 2 times. where - isMonotoneAt :: point -> Bool -isMonotoneAt point -pt = + isMonotoneAt :: point -> Bool +isMonotoneAt point +pt = [Integer] -> Integer forall a. Num a => [a] -> a forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a @@ -181,9 +181,9 @@ -> [ClosedLineSegment point] -> [Integer] forall a b. (a -> b) -> [a] -> [b] map (point -> ClosedLineSegment point -> Integer -intersectionsThrough point -pt) (simplePolygon -pgsimplePolygon +intersectionsThrough point +pt) (simplePolygon +pgsimplePolygon -> Getting (Endo [ClosedLineSegment point]) simplePolygon @@ -210,26 +210,26 @@ <= Integer 2 - intersectionsThrough :: point -> ClosedLineSegment point -> Integer -intersectionsThrough point -pt ClosedLineSegment point -edge + intersectionsThrough :: point -> ClosedLineSegment point -> Integer +intersectionsThrough point +pt ClosedLineSegment point +edge | LinePV 2 r -line LinePV 2 r -> ClosedLineSegment point -> Bool +line LinePV 2 r -> ClosedLineSegment point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedLineSegment point -edge = Integer +edge = Integer 1 | Bool otherwise = Integer 0 -- note that if the line is the supporting line of the edge this counts as one intersection where - line :: LinePV 2 r -line = Point 2 r -> Vector 2 r -> LinePV 2 r + line :: LinePV 2 r +line = Point 2 r -> Vector 2 r -> LinePV 2 r forall (d :: Nat) r. Point d r -> Vector d r -> LinePV d r LinePV (point -ptpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +ptpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -238,34 +238,34 @@ Lens' point (Point 2 r) asPoint) (Vector 2 r -> Vector 2 r forall {r}. Num r => Vector 2 r -> Vector 2 r -rot90 Vector 2 r -direction) - rot90 :: Vector 2 r -> Vector 2 r -rot90 (Vector2 r -x r -y) = r -> r -> Vector 2 r +rot90 Vector 2 r +direction) + rot90 :: Vector 2 r -> Vector 2 r +rot90 (Vector2 r +x r +y) = r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (-r -y) r -x +y) r +x -- | Generate a random N-sided polygon that is monotone in a random direction. -- -- -- pre: n >= 3 -- -- \( O(n \log n) \) -randomMonotone :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) - => Int -> m (MonotonePolygon (Point 2 r)) +randomMonotone :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) + => Int -> m (MonotonePolygon (Point 2 r)) randomMonotone :: forall g (m :: * -> *) r. (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> m (MonotonePolygon (Point 2 r)) -randomMonotone Int -n = Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r)) +randomMonotone Int +n = Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r)) forall g (m :: * -> *) r. (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r)) randomMonotoneDirected Int -n (Vector 2 r -> m (MonotonePolygon (Point 2 r))) +n (Vector 2 r -> m (MonotonePolygon (Point 2 r))) -> m (Vector 2 r) -> m (MonotonePolygon (Point 2 r)) forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b =<< m (Vector 2 r) @@ -296,27 +296,27 @@ -- pre: n >= 3 -- -- \( O(n \log n) \) -randomMonotoneDirected :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) - => Int -> Vector 2 r - -> m (MonotonePolygon (Point 2 r)) +randomMonotoneDirected :: (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) + => Int -> Vector 2 r + -> m (MonotonePolygon (Point 2 r)) randomMonotoneDirected :: forall g (m :: * -> *) r. (MonadState g m, RandomGen g, Uniform r, Ord r, Num r) => Int -> Vector 2 r -> m (MonotonePolygon (Point 2 r)) -randomMonotoneDirected Int -n Vector 2 r -direction = do - Point 2 r -p <- StateGenM g -> m (Point 2 r) +randomMonotoneDirected Int +n Vector 2 r +direction = do + Point 2 r +p <- StateGenM g -> m (Point 2 r) forall a g (m :: * -> *). (Uniform a, StatefulGen g m) => g -> m a forall g (m :: * -> *). StatefulGen g m => g -> m (Point 2 r) uniformM StateGenM g forall g. StateGenM g StateGenM - [Point 2 r] -points <- Int -> m (Point 2 r) -> m [Point 2 r] + [Point 2 r] +points <- Int -> m (Point 2 r) -> m [Point 2 r] forall (m :: * -> *) a. Applicative m => Int -> m a -> m [a] replicateM (Int -nInt -> Int -> Int +nInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) (StateGenM g -> m (Point 2 r) @@ -331,20 +331,20 @@ (Ord r, Num r, Foldable1 f, Point_ point 2 r, Eq point) => Vector 2 r -> f point -> Maybe (MonotonePolygon point) monotoneFrom Vector 2 r -direction (NonEmpty (Point 2 r) -> Maybe (MonotonePolygon (Point 2 r))) +direction (NonEmpty (Point 2 r) -> Maybe (MonotonePolygon (Point 2 r))) -> NonEmpty (Point 2 r) -> Maybe (MonotonePolygon (Point 2 r)) forall a b. (a -> b) -> a -> b $ Point 2 r -p Point 2 r -> [Point 2 r] -> NonEmpty (Point 2 r) +p Point 2 r -> [Point 2 r] -> NonEmpty (Point 2 r) forall a. a -> [a] -> NonEmpty a :| [Point 2 r] -points of - Just MonotonePolygon (Point 2 r) -pg -> MonotonePolygon (Point 2 r) -> m (MonotonePolygon (Point 2 r)) +points of + Just MonotonePolygon (Point 2 r) +pg -> MonotonePolygon (Point 2 r) -> m (MonotonePolygon (Point 2 r)) forall a. a -> m a forall (f :: * -> *) a. Applicative f => a -> f a pure MonotonePolygon (Point 2 r) -pg +pg Maybe (MonotonePolygon (Point 2 r)) Nothing -> [Char] -> m (MonotonePolygon (Point 2 r)) forall a. HasCallStack => [Char] -> a @@ -357,29 +357,29 @@ -- pre: at least 3 points are given -- -- \( O(n \log n) \) -monotoneFrom :: (Ord r, Num r, Foldable1 f, Point_ point 2 r, Eq point) - => Vector 2 r -> f point -> Maybe (MonotonePolygon point) +monotoneFrom :: (Ord r, Num r, Foldable1 f, Point_ point 2 r, Eq point) + => Vector 2 r -> f point -> Maybe (MonotonePolygon point) monotoneFrom :: forall r (f :: * -> *) point. (Ord r, Num r, Foldable1 f, Point_ point 2 r, Eq point) => Vector 2 r -> f point -> Maybe (MonotonePolygon point) -monotoneFrom Vector 2 r -direction f point -pts = Vector 2 (NumType (SimplePolygon point)) +monotoneFrom Vector 2 r +direction f point +pts = Vector 2 (NumType (SimplePolygon point)) -> SimplePolygon point -> MonotonePolygonF (SimplePolygon point) forall simplePolygon. Vector 2 (NumType simplePolygon) -> simplePolygon -> MonotonePolygonF simplePolygon MonotonePolygon Vector 2 r Vector 2 (NumType (SimplePolygon point)) -direction (SimplePolygon point -> MonotonePolygonF (SimplePolygon point)) +direction (SimplePolygon point -> MonotonePolygonF (SimplePolygon point)) -> Maybe (SimplePolygon point) -> Maybe (MonotonePolygonF (SimplePolygon point)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Maybe (SimplePolygon point) -thePolygon +thePolygon where - thePolygon :: Maybe (SimplePolygon point) -thePolygon = [point] -> Maybe (SimplePolygon point) + thePolygon :: Maybe (SimplePolygon point) +thePolygon = [point] -> Maybe (SimplePolygon point) forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f, ConstructableSimplePolygon simplePolygon point r) => @@ -389,19 +389,19 @@ ConstructableSimplePolygon (SimplePolygon point) point r) => f point -> Maybe (SimplePolygon point) fromPoints ([point -minP] [point] -> [point] -> [point] +minP] [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point] -rightHalf [point] -> [point] -> [point] +rightHalf [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point -maxP] [point] -> [point] -> [point] +maxP] [point] -> [point] -> [point] forall a. Semigroup a => a -> a -> a <> [point] -leftHalf) +leftHalf) - minP :: point -minP = (point -> point -> Ordering) -> f point -> point + minP :: point +minP = (point -> point -> Ordering) -> f point -> point forall (t :: * -> *) a. Foldable1 t => (a -> a -> Ordering) -> t a -> a @@ -410,10 +410,10 @@ (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering cmpInDirection Vector 2 r -direction) f point -pts - maxP :: point -maxP = (point -> point -> Ordering) -> f point -> point +direction) f point +pts + maxP :: point +maxP = (point -> point -> Ordering) -> f point -> point forall (t :: * -> *) a. Foldable1 t => (a -> a -> Ordering) -> t a -> a @@ -422,44 +422,44 @@ (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering cmpInDirection Vector 2 r -direction) f point -pts +direction) f point +pts -- 4 - pointsWithoutExtremes :: [point] -pointsWithoutExtremes = (point -> Bool) -> NonEmpty point -> [point] + pointsWithoutExtremes :: [point] +pointsWithoutExtremes = (point -> Bool) -> NonEmpty point -> [point] forall a. (a -> Bool) -> NonEmpty a -> [a] -NonEmpty.filter (\point -p -> point -p point -> point -> Bool +NonEmpty.filter (\point +p -> point +p point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -minP Bool -> Bool -> Bool +minP Bool -> Bool -> Bool && point -p point -> point -> Bool +p point -> point -> Bool forall a. Eq a => a -> a -> Bool /= point -maxP) (NonEmpty point -> [point]) -> NonEmpty point -> [point] +maxP) (NonEmpty point -> [point]) -> NonEmpty point -> [point] forall a b. (a -> b) -> a -> b $ f point -> NonEmpty point forall a. f a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty f point -pts +pts -- 5, 6 - ([point] -leftHalfUnsorted,[point] -rightHalfUnsorted) = (point -> Bool) -> [point] -> ([point], [point]) + ([point] +leftHalfUnsorted,[point] +rightHalfUnsorted) = (point -> Bool) -> [point] -> ([point], [point]) forall a. (a -> Bool) -> [a] -> ([a], [a]) List.partition (point -> point -> point -> Bool forall point r. (Point_ point 2 r, Ord r, Num r) => point -> point -> point -> Bool toTheLeft point -minP point -maxP) [point] -pointsWithoutExtremes - leftHalf :: [point] -leftHalf = (point -> point -> Ordering) -> [point] -> [point] +minP point +maxP) [point] +pointsWithoutExtremes + leftHalf :: [point] +leftHalf = (point -> point -> Ordering) -> [point] -> [point] forall a. (a -> a -> Ordering) -> [a] -> [a] List.sortBy ((point -> point -> Ordering) -> point -> point -> Ordering forall a b c. (a -> b -> c) -> b -> a -> c @@ -471,53 +471,53 @@ (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering cmpInDirection Vector 2 r -direction) [point] -leftHalfUnsorted - rightHalf :: [point] -rightHalf = (point -> point -> Ordering) -> [point] -> [point] +direction) [point] +leftHalfUnsorted + rightHalf :: [point] +rightHalf = (point -> point -> Ordering) -> [point] -> [point] forall a. (a -> a -> Ordering) -> [a] -> [a] List.sortBy (Vector 2 r -> point -> point -> Ordering forall r point. (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> point -> point -> Ordering cmpInDirection Vector 2 r -direction) [point] -rightHalfUnsorted +direction) [point] +rightHalfUnsorted ------------------------------------------------------------------------------------------------- -- helper functions -- for partitioning points -toTheLeft :: (Point_ point 2 r, Ord r, Num r) => point -> point -> point -> Bool +toTheLeft :: (Point_ point 2 r, Ord r, Num r) => point -> point -> point -> Bool toTheLeft :: forall point r. (Point_ point 2 r, Ord r, Num r) => point -> point -> point -> Bool -toTheLeft point -minP point -maxP point -x = point -> point -> point -> CCW +toTheLeft point +minP point +maxP point +x = point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -minP point -maxP point -x CCW -> CCW -> Bool +minP point +maxP point +x CCW -> CCW -> Bool forall a. Eq a => a -> a -> Bool == CCW CCW -- | \( O(1) \) -- Create a random 2D vector which has a non-zero magnitude. -randomNonZeroVector :: (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) - => m (Vector 2 r) +randomNonZeroVector :: (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) + => m (Vector 2 r) randomNonZeroVector :: forall g (m :: * -> *) r. (MonadState g m, RandomGen g, Uniform r, Eq r, Num r) => m (Vector 2 r) randomNonZeroVector = do - Vector 2 r -v <- StateGenM g -> m (Vector 2 r) + Vector 2 r +v <- StateGenM g -> m (Vector 2 r) forall a g (m :: * -> *). (Uniform a, StatefulGen g m) => g -> m a forall g (m :: * -> *). StatefulGen g m => g -> m (Vector 2 r) uniformM StateGenM g @@ -528,7 +528,7 @@ (Metric_ vector d r, Num r) => vector -> r quadrance Vector 2 r -vr -> r -> Bool +vr -> r -> Bool forall a. Eq a => a -> a -> Bool ==r 0) @@ -541,5 +541,5 @@ forall a. a -> m a forall (f :: * -> *) a. Applicative f => a -> f a pure Vector 2 r -v +v \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Class.html b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Class.html index 47ede4d01..48eb7d376 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Class.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Class.html @@ -27,10 +27,10 @@ -- | A class representing simple polygons; i.e. polygons without holes -- (and without self intersections in the boundary.) -class ( Polygon_ simplePolygon point r - , VertexIx simplePolygon ~ Int - , Point_ point 2 r - ) => SimplePolygon_ simplePolygon point r where +class ( Polygon_ simplePolygon point r + , VertexIx simplePolygon ~ Int + , Point_ point 2 r + ) => SimplePolygon_ simplePolygon point r where -- | Given the vertices of the polygon, in CCW order, constructs the -- polygon. The vertices are numbered in the order they are given. @@ -39,35 +39,35 @@ -- - at least 3 vertices, not all colinear -- - no repeated vertices -- - no self-inttersections - uncheckedFromCCWPoints :: Foldable f => f point -> simplePolygon + uncheckedFromCCWPoints :: Foldable f => f point -> simplePolygon -- | Constraints that allow us to construct a simple polygon - type ConstructableSimplePolygon simplePolygon point r :: Constraint - type ConstructableSimplePolygon simplePolygon point r = (Eq r, Num r) + type ConstructableSimplePolygon simplePolygon point r :: Constraint + type ConstructableSimplePolygon simplePolygon point r = (Eq r, Num r) -- | Given the vertices of the polygon, constructs the polygon. This -- function will make sure the polygon is a valid simple polygon, -- i.e. it has at least three vertices, is given in CCW order, no -- repeated vertices etc. - fromPoints :: ( Foldable f - , ConstructableSimplePolygon simplePolygon point r + fromPoints :: ( Foldable f + , ConstructableSimplePolygon simplePolygon point r ) - => f point -> Maybe simplePolygon + => f point -> Maybe simplePolygon -- | Compute the centroid of a simple polygon. -- -- running time: \(O(n)\) - centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => simplePolygon -> point' - centroid simplePolygon -poly = Vector 2 r -> point' + centroid :: (Fractional r, ConstructablePoint_ point' 2 r) => simplePolygon -> point' + centroid simplePolygon +poly = Vector 2 r -> point' forall point (d :: Nat) r. ConstructablePoint_ point d r => Vector d r -> point fromVector (Vector 2 r -> point') -> Vector 2 r -> point' forall a b. (a -> b) -> a -> b $ [Vector 2 r] -> Vector 2 r -sum' [Vector 2 r] -xs Vector 2 r -> r -> Vector 2 r +sum' [Vector 2 r] +xs Vector 2 r -> r -> Vector 2 r forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector @@ -80,11 +80,11 @@ Vertex simplePolygon ~ point) => simplePolygon -> r signedArea2X simplePolygon -poly) +poly) where - xs :: [Vector 2 r] -xs = [ (point -ppoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r + xs :: [Vector 2 r] +xs = [ (point +ppoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 r) point (Vector 2 r) forall (d :: Nat) r s. @@ -101,7 +101,7 @@ (Num r, Additive_ vector d r) => vector -> vector -> vector ^+^ point -qpoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r +qpoint -> Getting (Vector 2 r) point (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 r) point (Vector 2 r) forall (d :: Nat) r s. @@ -118,7 +118,7 @@ (Num r, Vector_ vector d r) => vector -> r -> vector ^* (point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -128,7 +128,7 @@ xCoord r -> r -> r forall a. Num a => a -> a -> a * point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -138,7 +138,7 @@ yCoord r -> r -> r forall a. Num a => a -> a -> a - point -qpoint -> Getting r point r -> r +qpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -148,7 +148,7 @@ xCoord r -> r -> r forall a. Num a => a -> a -> a * point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -156,10 +156,10 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) - | (point -p,point -q) <- simplePolygon -poly simplePolygon + | (point +p,point +q) <- simplePolygon +poly simplePolygon -> Getting (Endo [(point, point)]) simplePolygon (point, point) -> [(point, point)] forall s a. s -> Getting (Endo [a]) s a -> [a] @@ -180,8 +180,8 @@ simplePolygon (Vertex simplePolygon, Vertex simplePolygon) outerBoundaryEdges ] - sum' :: [Vector 2 r] -> Vector 2 r -sum' = (Vector 2 r -> Vector 2 r -> Vector 2 r) + sum' :: [Vector 2 r] -> Vector 2 r +sum' = (Vector 2 r -> Vector 2 r -> Vector 2 r) -> Vector 2 r -> [Vector 2 r] -> Vector 2 r forall b a. (b -> a -> b) -> b -> [a] -> b forall (t :: * -> *) b a. @@ -195,11 +195,11 @@ forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector zero -instance ( SimplePolygon_ simplePolygon point r - , Default extra +instance ( SimplePolygon_ simplePolygon point r + , Default extra ) - => SimplePolygon_ (simplePolygon :+ extra) point r where - uncheckedFromCCWPoints :: forall (f :: * -> *). + => SimplePolygon_ (simplePolygon :+ extra) point r where + uncheckedFromCCWPoints :: forall (f :: * -> *). Foldable f => f point -> simplePolygon :+ extra uncheckedFromCCWPoints = (simplePolygon -> extra -> simplePolygon :+ extra @@ -215,9 +215,9 @@ f point -> simplePolygon forall (f :: * -> *). Foldable f => f point -> simplePolygon uncheckedFromCCWPoints - type ConstructableSimplePolygon (simplePolygon :+ extra) point r = - (ConstructableSimplePolygon simplePolygon point r, Default extra) - fromPoints :: forall (f :: * -> *). + type ConstructableSimplePolygon (simplePolygon :+ extra) point r = + (ConstructableSimplePolygon simplePolygon point r, Default extra) + fromPoints :: forall (f :: * -> *). (Foldable f, ConstructableSimplePolygon (simplePolygon :+ extra) point r) => f point -> Maybe (simplePolygon :+ extra) diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Implementation.html b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Implementation.html index 1671a39a8..c9c27b0e0 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Implementation.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Implementation.html @@ -43,19 +43,19 @@ -- since any valid simplePolygon should be in CCW order! -- -- running time: \( O(n) \) -isCounterClockwise :: (Num r, Eq r, SimplePolygon_ simplePolygon point r) - => simplePolygon -> Bool +isCounterClockwise :: (Num r, Eq r, SimplePolygon_ simplePolygon point r) + => simplePolygon -> Bool isCounterClockwise :: forall r simplePolygon point. (Num r, Eq r, SimplePolygon_ simplePolygon point r) => simplePolygon -> Bool -isCounterClockwise = (\r -x -> r -x r -> r -> Bool +isCounterClockwise = (\r +x -> r +x r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -> r forall a. Num a => a -> a abs r -x) (r -> Bool) -> (simplePolygon -> r) -> simplePolygon -> Bool +x) (r -> Bool) -> (simplePolygon -> r) -> simplePolygon -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . simplePolygon -> r forall r simplePolygon point. @@ -72,20 +72,20 @@ -- since any valid simplePolygon should be in CCW order! -- -- running time: \( O(n) \) -toCounterClockwiseOrder :: (Num r, Eq r, SimplePolygon_ simplePolygon point r) - => simplePolygon -> simplePolygon +toCounterClockwiseOrder :: (Num r, Eq r, SimplePolygon_ simplePolygon point r) + => simplePolygon -> simplePolygon toCounterClockwiseOrder :: forall r simplePolygon point. (Num r, Eq r, SimplePolygon_ simplePolygon point r) => simplePolygon -> simplePolygon -toCounterClockwiseOrder simplePolygon -pg +toCounterClockwiseOrder simplePolygon +pg | simplePolygon -> Bool forall r simplePolygon point. (Num r, Eq r, SimplePolygon_ simplePolygon point r) => simplePolygon -> Bool isCounterClockwise simplePolygon -pg = simplePolygon -pg +pg = simplePolygon +pg | Bool otherwise = [point] -> simplePolygon forall simplePolygon point r (f :: * -> *). @@ -100,7 +100,7 @@ List.reverse ([point] -> simplePolygon) -> [point] -> simplePolygon forall a b. (a -> b) -> a -> b $ simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [point]) simplePolygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) simplePolygon point @@ -118,29 +118,29 @@ -- * Show -- | helper implementation for show -showsPrecSimplePolygon :: ( SimplePolygon_ simplePolygon point r - , Show point +showsPrecSimplePolygon :: ( SimplePolygon_ simplePolygon point r + , Show point ) => String -- ^ Polygon type name -> Int - -> simplePolygon -> ShowS + -> simplePolygon -> ShowS showsPrecSimplePolygon :: forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, Show point) => String -> Int -> simplePolygon -> ShowS -showsPrecSimplePolygon String -name Int -k simplePolygon -pg = Bool -> ShowS -> ShowS +showsPrecSimplePolygon String +name Int +k simplePolygon +pg = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ShowS -> ShowS) -> ShowS -> ShowS +app_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ String -> ShowS showString String -name ShowS -> ShowS -> ShowS +name ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS showChar Char @@ -151,7 +151,7 @@ forall a. Show a => Int -> a -> ShowS showsPrec Int 11 (simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [point]) simplePolygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) simplePolygon point @@ -165,8 +165,8 @@ (VertexIx simplePolygon) simplePolygon (Vertex simplePolygon) outerBoundary) where - app_prec :: Int -app_prec = Int + app_prec :: Int +app_prec = Int 10 @@ -174,67 +174,67 @@ -- * Read -- | default implementation for readsPrec -readsPrecSimplePolygon :: forall simplePolygon point r. - ( Read point - , SimplePolygon_ simplePolygon point r +readsPrecSimplePolygon :: forall simplePolygon point r. + ( Read point + , SimplePolygon_ simplePolygon point r ) => String -- ^ constructor name - -> Int -> ReadS simplePolygon + -> Int -> ReadS simplePolygon readsPrecSimplePolygon :: forall simplePolygon point r. (Read point, SimplePolygon_ simplePolygon point r) => String -> Int -> ReadS simplePolygon -readsPrecSimplePolygon String -name Int -d = Bool -> ReadS simplePolygon -> ReadS simplePolygon +readsPrecSimplePolygon String +name Int +d = Bool -> ReadS simplePolygon -> ReadS simplePolygon forall a. Bool -> ReadS a -> ReadS a readParen (Int -d Int -> Int -> Bool +d Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ReadS simplePolygon -> ReadS simplePolygon) +app_prec) (ReadS simplePolygon -> ReadS simplePolygon) -> ReadS simplePolygon -> ReadS simplePolygon forall a b. (a -> b) -> a -> b -$ \String -r -> +$ \String +r -> [ (forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon -uncheckedFromCCWPoints @simplePolygon @point @r @[] [point] -vs, String -t) - | (String -name', String -s) <- ReadS String +uncheckedFromCCWPoints @simplePolygon @point @r @[] [point] +vs, String +t) + | (String +name', String +s) <- ReadS String lex String -r +r , String -name String -> String -> Bool +name String -> String -> Bool forall a. Eq a => a -> a -> Bool == String -name' - , ([point] -vs, String -t) <- ReadS [point] +name' + , ([point] +vs, String +t) <- ReadS [point] forall a. Read a => ReadS a reads String -s +s ] - where app_prec :: Int -app_prec = Int + where app_prec :: Int +app_prec = Int 10 -------------------------------------------------------------------------------- -- * Aeson -toJSONSimplePolgyon :: ( ToJSON point - , SimplePolygon_ simplePolygon point r - ) => simplePolygon -> Value +toJSONSimplePolgyon :: ( ToJSON point + , SimplePolygon_ simplePolygon point r + ) => simplePolygon -> Value toJSONSimplePolgyon :: forall point simplePolygon r. (ToJSON point, SimplePolygon_ simplePolygon point r) => simplePolygon -> Value -toJSONSimplePolgyon simplePolygon -pg = [Pair] -> Value +toJSONSimplePolgyon simplePolygon +pg = [Pair] -> Value object [ Key "tag" Key -> String -> Pair forall v. ToJSON v => Key -> v -> Pair @@ -246,7 +246,7 @@ forall v. ToJSON v => Key -> v -> Pair forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv Aeson..= (simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [point]) simplePolygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) simplePolygon point @@ -262,10 +262,10 @@ ] -- instance (FromJSON r, Eq r, Num r, FromJSON p) => FromJSON (Polygon Simple p r) where -parseJSONSimplePolygon :: forall simplePolygon point r. - ( FromJSON point - , SimplePolygon_ simplePolygon point r - ) => Value -> Parser simplePolygon +parseJSONSimplePolygon :: forall simplePolygon point r. + ( FromJSON point + , SimplePolygon_ simplePolygon point r + ) => Value -> Parser simplePolygon parseJSONSimplePolygon :: forall simplePolygon point r. (FromJSON point, SimplePolygon_ simplePolygon point r) => Value -> Parser simplePolygon @@ -280,9 +280,9 @@ -> Value -> Parser simplePolygon forall a b. (a -> b) -> a -> b -$ \Object -o -> Object -o Object -> Key -> Parser String +$ \Object +o -> Object +o Object -> Key -> Parser String forall a. FromJSON a => Object -> Key -> Parser a .: Key "tag" Parser String @@ -292,8 +292,8 @@ >>= \case String "SimplePolygon" -> Object -> Parser simplePolygon -pSimple Object -o +pSimple Object +o (String _ :: String) -> String -> Parser simplePolygon forall a. String -> Parser a @@ -301,16 +301,16 @@ fail String "Not a SimplePolygon" where - pSimple :: Object -> Parser simplePolygon -pSimple Object -o = forall simplePolygon point r (f :: * -> *). + pSimple :: Object -> Parser simplePolygon +pSimple Object +o = forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => f point -> simplePolygon -uncheckedFromCCWPoints @simplePolygon @point @r @[] ([point] -> simplePolygon) +uncheckedFromCCWPoints @simplePolygon @point @r @[] ([point] -> simplePolygon) -> Parser [point] -> Parser simplePolygon forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Object -o Object -> Key -> Parser [point] +o Object -> Key -> Parser [point] forall a. FromJSON a => Object -> Key -> Parser a .: Key "vertices" diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.InPolygon.html b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.InPolygon.html index 9d34a3162..aba795fec 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.InPolygon.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.InPolygon.html @@ -44,9 +44,9 @@ -- simpleTriangle = uncheckedFromCCWPoints $ [ Point2 0 0, Point2 2 0, Point2 1 1] -- test = Point2 1 1 `inPolygon` simplePoly -data AboveCount seg = OnEdge !seg +data AboveCount seg = OnEdge !seg | NumStrictlyAbove {-# UNPACK #-} !Int - deriving (Int -> AboveCount seg -> ShowS + deriving (Int -> AboveCount seg -> ShowS [AboveCount seg] -> ShowS AboveCount seg -> String (Int -> AboveCount seg -> ShowS) @@ -64,7 +64,7 @@ show :: AboveCount seg -> String $cshowList :: forall seg. Show seg => [AboveCount seg] -> ShowS showList :: [AboveCount seg] -> ShowS -Show,AboveCount seg -> AboveCount seg -> Bool +Show,AboveCount seg -> AboveCount seg -> Bool (AboveCount seg -> AboveCount seg -> Bool) -> (AboveCount seg -> AboveCount seg -> Bool) -> Eq (AboveCount seg) @@ -76,50 +76,50 @@ /= :: AboveCount seg -> AboveCount seg -> Bool Eq) -instance Semigroup (AboveCount seg) where - l :: AboveCount seg -l@(OnEdge seg -_) <> :: AboveCount seg -> AboveCount seg -> AboveCount seg +instance Semigroup (AboveCount seg) where + l :: AboveCount seg +l@(OnEdge seg +_) <> :: AboveCount seg -> AboveCount seg -> AboveCount seg <> AboveCount seg _ = AboveCount seg -l -- ^ prefers the first segment +l -- ^ prefers the first segment AboveCount seg -_ <> r :: AboveCount seg -r@(OnEdge seg +_ <> r :: AboveCount seg +r@(OnEdge seg _) = AboveCount seg -r -- ^ already found a boundary - (NumStrictlyAbove Int -l) <> (NumStrictlyAbove Int -r) = Int -> AboveCount seg +r -- ^ already found a boundary + (NumStrictlyAbove Int +l) <> (NumStrictlyAbove Int +r) = Int -> AboveCount seg forall seg. Int -> AboveCount seg NumStrictlyAbove (Int -lInt -> Int -> Int +lInt -> Int -> Int forall a. Num a => a -> a -> a +Int -r) +r) -instance Monoid (AboveCount seg) where - mempty :: AboveCount seg +instance Monoid (AboveCount seg) where + mempty :: AboveCount seg mempty = Int -> AboveCount seg forall seg. Int -> AboveCount seg NumStrictlyAbove Int 0 -- | Types that implement a point-in-polygon test. -class HasInPolygon polygon point r | polygon -> point, point -> r where +class HasInPolygon polygon point r | polygon -> point, point -> r where -- | Check if a point lies inside a polygon, on the boundary, or outside of the -- polygon. If the point lies on the boundary we also return an edge e containing the -- point (identified by the vertex v so that e follows v in the CCW order along the -- boundary). No guarantees are given about which edge is returned if the query point -- lies on multiple edges (i.e. when it coincides with a vertex.) - inPolygon :: ( Num r, Ord r, Point_ queryPoint 2 r) - => queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon) - default inPolygon :: ( Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r - , SimplePolygon_ polygon point r + inPolygon :: ( Num r, Ord r, Point_ queryPoint 2 r) + => queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon) + default inPolygon :: ( Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r + , SimplePolygon_ polygon point r ) - => queryPoint -> polygon - -> PointLocationResultWith (VertexIx polygon) - inPolygon = queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon) + => queryPoint -> polygon + -> PointLocationResultWith (VertexIx polygon) + inPolygon = queryPoint -> polygon -> PointLocationResultWith (VertexIx polygon) forall queryPoint simplePolygon point r. (Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r, SimplePolygon_ simplePolygon point r) => @@ -155,21 +155,21 @@ -- OnBoundaryEdge 1 -- >>> Point2 20 5 `inPolygon` simplePoly -- StrictlyOutside -inSimplePolygon :: forall queryPoint simplePolygon point r. - ( Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r - , SimplePolygon_ simplePolygon point r +inSimplePolygon :: forall queryPoint simplePolygon point r. + ( Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r + , SimplePolygon_ simplePolygon point r ) - => queryPoint -> simplePolygon - -> PointLocationResultWith (VertexIx simplePolygon) -queryPoint -q inSimplePolygon :: forall queryPoint simplePolygon point r. + => queryPoint -> simplePolygon + -> PointLocationResultWith (VertexIx simplePolygon) +queryPoint +q inSimplePolygon :: forall queryPoint simplePolygon point r. (Num r, Ord r, Point_ point 2 r, Point_ queryPoint 2 r, SimplePolygon_ simplePolygon point r) => queryPoint -> simplePolygon -> PointLocationResultWith (VertexIx simplePolygon) -`inSimplePolygon` simplePolygon -pg = case IndexedGetting +`inSimplePolygon` simplePolygon +pg = case IndexedGetting (Int, Int) (AboveCount Int) simplePolygon (point, point) -> ((Int, Int) -> (point, point) -> AboveCount Int) -> simplePolygon @@ -194,18 +194,18 @@ simplePolygon (Vertex simplePolygon, Vertex simplePolygon) outerBoundaryEdges (Int, Int) -> (point, point) -> AboveCount Int -countAbove simplePolygon -pg of - OnEdge Int -s -> Int -> PointLocationResultWith Int +countAbove simplePolygon +pg of + OnEdge Int +s -> Int -> PointLocationResultWith Int forall edge. edge -> PointLocationResultWith edge OnBoundaryEdge Int -s - NumStrictlyAbove Int -m | Int -> Bool +s + NumStrictlyAbove Int +m | Int -> Bool forall a. Integral a => a -> Bool odd Int -m -> PointLocationResultWith Int +m -> PointLocationResultWith Int PointLocationResultWith (VertexIx simplePolygon) forall edge. PointLocationResultWith edge StrictlyInside @@ -221,13 +221,13 @@ -- (e.g. the <=> does not hold in that case). If we discover q lies -- on an edge e, we actually report that. where - countAbove :: (Int, Int) -> (point, point) -> AboveCount Int -countAbove (Int -i,Int -_) (point -u,point -v) = case (point -upoint -> Getting r point r -> r + countAbove :: (Int, Int) -> (point, point) -> AboveCount Int +countAbove (Int +i,Int +_) (point +u,point +v) = case (point +upoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -237,7 +237,7 @@ xCoord) r -> r -> Ordering forall a. Ord a => a -> a -> Ordering `compare` (point -vpoint -> Getting r point r -> r +vpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -247,48 +247,48 @@ xCoord) of Ordering EQ | point -> point -> Bool -onVerticalEdge point -u point -v -> Int -> AboveCount Int +onVerticalEdge point +u point +v -> Int -> AboveCount Int forall seg. seg -> AboveCount seg OnEdge Int -i +i | Bool otherwise -> AboveCount Int forall a. Monoid a => a mempty Ordering LT -> Int -> AnEndPoint point -> AnEndPoint point -> AboveCount Int -countAbove' Int -i (point -> AnEndPoint point +countAbove' Int +i (point -> AnEndPoint point forall r. r -> AnEndPoint r AnClosedE point -u) (point -> AnEndPoint point +u) (point -> AnEndPoint point forall r. r -> AnEndPoint r AnOpenE point -v) +v) Ordering GT -> Int -> AnEndPoint point -> AnEndPoint point -> AboveCount Int -countAbove' Int -i (point -> AnEndPoint point +countAbove' Int +i (point -> AnEndPoint point forall r. r -> AnEndPoint r AnOpenE point -v) (point -> AnEndPoint point +v) (point -> AnEndPoint point forall r. r -> AnEndPoint r AnClosedE point -u) +u) -- count the edge if q - countAbove' :: Int -> AnEndPoint point -> AnEndPoint point -> AboveCount Int -countAbove' Int -i AnEndPoint point -l AnEndPoint point -r + countAbove' :: Int -> AnEndPoint point -> AnEndPoint point -> AboveCount Int +countAbove' Int +i AnEndPoint point +l AnEndPoint point +r | (r -> Point 1 r forall r. r -> Point 1 r Point1 (r -> Point 1 r) -> r -> Point 1 r forall a b. (a -> b) -> a -> b $ queryPoint -qqueryPoint -> Getting r queryPoint r -> r +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Nat) point r. @@ -310,15 +310,15 @@ forall {k} (endPoint :: k -> *) (r :: k). endPoint r -> endPoint r -> Interval endPoint r Interval AnEndPoint point -l AnEndPoint point -r) +l AnEndPoint point +r) = case Point 2 r -> Point 2 r -> Point 2 r -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw (AnEndPoint point -lAnEndPoint point +lAnEndPoint point -> Getting (Point 2 r) (AnEndPoint point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -347,7 +347,7 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) (queryPoint -qqueryPoint +qqueryPoint -> Getting (Point 2 r) queryPoint (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) queryPoint (Point 2 r) @@ -356,7 +356,7 @@ Lens' point (Point d r) Lens' queryPoint (Point 2 r) asPoint) (AnEndPoint point -rAnEndPoint point +rAnEndPoint point -> Getting (Point 2 r) (AnEndPoint point) (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) @@ -394,7 +394,7 @@ CoLinear -> Int -> AboveCount Int forall seg. seg -> AboveCount seg OnEdge Int -i +i CCW CCW -> AboveCount Int forall a. Monoid a => a @@ -408,15 +408,15 @@ -- test if q lies on the vertical edge defined by u and v - onVerticalEdge :: point -> point -> Bool -onVerticalEdge point -u point -v = let yr :: ClosedInterval r -yr = forall interval r. + onVerticalEdge :: point -> point -> Bool +onVerticalEdge point +u point +v = let yr :: ClosedInterval r +yr = forall interval r. (ConstructableClosedInterval_ interval r, Ord r) => r -> r -> interval -buildClosedInterval @(ClosedInterval r) (point -upoint -> Getting r point r -> r +buildClosedInterval @(ClosedInterval r) (point +upoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -424,7 +424,7 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) (point -vpoint -> Getting r point r -> r +vpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -433,7 +433,7 @@ IndexedLens' Int point r yCoord) in queryPoint -qqueryPoint -> Getting r queryPoint r -> r +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Nat) point r. @@ -443,7 +443,7 @@ xCoord r -> r -> Bool forall a. Eq a => a -> a -> Bool == point -upoint -> Getting r point r -> r +upoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -456,7 +456,7 @@ Point1 (r -> Point 1 r) -> r -> Point 1 r forall a b. (a -> b) -> a -> b $ queryPoint -qqueryPoint -> Getting r queryPoint r -> r +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Nat) point r. @@ -466,7 +466,7 @@ yCoord) Point 1 r -> ClosedInterval r -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` ClosedInterval r -yr +yr diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Sample.html b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Sample.html index 78c7906f5..1a6e85310 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Sample.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Sample.html @@ -35,9 +35,9 @@ -------------------------------------------------------------------------------- -- | A data structure that can be used to efficiently sample values of type v. -data Sampler w v = Sampler !w -- ^ the total weight - (Map.Map w v) - deriving (Int -> Sampler w v -> ShowS +data Sampler w v = Sampler !w -- ^ the total weight + (Map.Map w v) + deriving (Int -> Sampler w v -> ShowS [Sampler w v] -> ShowS Sampler w v -> String (Int -> Sampler w v -> ShowS) @@ -55,7 +55,7 @@ show :: Sampler w v -> String $cshowList :: forall w v. (Show w, Show v) => [Sampler w v] -> ShowS showList :: [Sampler w v] -> ShowS -Show,ReadPrec [Sampler w v] +Show,ReadPrec [Sampler w v] ReadPrec (Sampler w v) Int -> ReadS (Sampler w v) ReadS [Sampler w v] @@ -79,7 +79,7 @@ readPrec :: ReadPrec (Sampler w v) $creadListPrec :: forall w v. (Ord w, Read w, Read v) => ReadPrec [Sampler w v] readListPrec :: ReadPrec [Sampler w v] -Read,Sampler w v -> Sampler w v -> Bool +Read,Sampler w v -> Sampler w v -> Bool (Sampler w v -> Sampler w v -> Bool) -> (Sampler w v -> Sampler w v -> Bool) -> Eq (Sampler w v) forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -88,7 +88,7 @@ == :: Sampler w v -> Sampler w v -> Bool $c/= :: forall w v. (Eq w, Eq v) => Sampler w v -> Sampler w v -> Bool /= :: Sampler w v -> Sampler w v -> Bool -Eq,(forall a b. (a -> b) -> Sampler w a -> Sampler w b) +Eq,(forall a b. (a -> b) -> Sampler w a -> Sampler w b) -> (forall a b. a -> Sampler w b -> Sampler w a) -> Functor (Sampler w) forall a b. a -> Sampler w b -> Sampler w a @@ -102,7 +102,7 @@ fmap :: forall a b. (a -> b) -> Sampler w a -> Sampler w b $c<$ :: forall w a b. a -> Sampler w b -> Sampler w a <$ :: forall a b. a -> Sampler w b -> Sampler w a -Functor,(forall m. Monoid m => Sampler w m -> m) +Functor,(forall m. Monoid m => Sampler w m -> m) -> (forall m a. Monoid m => (a -> m) -> Sampler w a -> m) -> (forall m a. Monoid m => (a -> m) -> Sampler w a -> m) -> (forall a b. (a -> b -> b) -> b -> Sampler w a -> b) @@ -197,17 +197,17 @@ product :: forall a. Num a => Sampler w a -> a Foldable) -instance Traversable (Sampler w) where - traverse :: forall (f :: * -> *) a b. +instance Traversable (Sampler w) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> Sampler w a -> f (Sampler w b) -traverse a -> f b -f (Sampler w -w Map w a -m) = w -> Map w b -> Sampler w b +traverse a -> f b +f (Sampler w +w Map w a +m) = w -> Map w b -> Sampler w b forall w v. w -> Map w v -> Sampler w v Sampler w -w (Map w b -> Sampler w b) -> f (Map w b) -> f (Sampler w b) +w (Map w b -> Sampler w b) -> f (Map w b) -> f (Sampler w b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (a -> f b) -> Map w a -> f (Map w b) forall (t :: * -> *) (f :: * -> *) a b. @@ -217,20 +217,20 @@ Applicative f => (a -> f b) -> Map w a -> f (Map w b) traverse a -> f b -f Map w a -m +f Map w a +m -- | Build a sampler -- -- O(n) -buildSampler :: (Foldable1 nonEmpty, Num w, Ord w) => nonEmpty (w, v) -> Sampler w v +buildSampler :: (Foldable1 nonEmpty, Num w, Ord w) => nonEmpty (w, v) -> Sampler w v buildSampler :: forall (nonEmpty :: * -> *) w v. (Foldable1 nonEmpty, Num w, Ord w) => nonEmpty (w, v) -> Sampler w v -buildSampler nonEmpty (w, v) -xs = let Weighted w -total [(w, v)] -xs' = ((w, v) -> Weighted w [(w, v)] -> Weighted w [(w, v)]) +buildSampler nonEmpty (w, v) +xs = let Weighted w +total [(w, v)] +xs' = ((w, v) -> Weighted w [(w, v)] -> Weighted w [(w, v)]) -> Weighted w [(w, v)] -> nonEmpty (w, v) -> Weighted w [(w, v)] forall a b. (a -> b -> b) -> b -> nonEmpty a -> b forall (t :: * -> *) a b. @@ -240,38 +240,38 @@ forall {a} {b}. Num a => (a, b) -> Weighted a [(a, b)] -> Weighted a [(a, b)] -f (w -> [(w, v)] -> Weighted w [(w, v)] +f (w -> [(w, v)] -> Weighted w [(w, v)] forall w v. w -> v -> Weighted w v Weighted w 0 []) nonEmpty (w, v) -xs - f :: (a, b) -> Weighted a [(a, b)] -> Weighted a [(a, b)] -f (a -w,b -x) (Weighted a -t [(a, b)] -acc) = a -> [(a, b)] -> Weighted a [(a, b)] +xs + f :: (a, b) -> Weighted a [(a, b)] -> Weighted a [(a, b)] +f (a +w,b +x) (Weighted a +t [(a, b)] +acc) = a -> [(a, b)] -> Weighted a [(a, b)] forall w v. w -> v -> Weighted w v Weighted (a -wa -> a -> a +wa -> a -> a forall a. Num a => a -> a -> a +a -t) ((a -t,b -x)(a, b) -> [(a, b)] -> [(a, b)] +t) ((a +t,b +x)(a, b) -> [(a, b)] -> [(a, b)] forall a. a -> [a] -> [a] :[(a, b)] -acc) +acc) in w -> Map w v -> Sampler w v forall w v. w -> Map w v -> Sampler w v Sampler w -total ([(w, v)] -> Map w v +total ([(w, v)] -> Map w v forall k a. Eq k => [(k, a)] -> Map k a Map.fromDescList [(w, v)] -xs') +xs') -- | Helper data type -data Weighted w v = Weighted !w v deriving (Int -> Weighted w v -> ShowS +data Weighted w v = Weighted !w v deriving (Int -> Weighted w v -> ShowS [Weighted w v] -> ShowS Weighted w v -> String (Int -> Weighted w v -> ShowS) @@ -294,19 +294,19 @@ -- | Sample a value from the sampler -- -- \(O(\log n)\) -sample :: (StatefulGen g m, Ord w, Num w, UniformRange w) - => Sampler w v -> g -> m v +sample :: (StatefulGen g m, Ord w, Num w, UniformRange w) + => Sampler w v -> g -> m v sample :: forall g (m :: * -> *) w v. (StatefulGen g m, Ord w, Num w, UniformRange w) => Sampler w v -> g -> m v -sample (Sampler w -total Map w v -m) g -g = (v -> ((w, v) -> v) -> Maybe (w, v) -> v +sample (Sampler w +total Map w v +m) g +g = (v -> ((w, v) -> v) -> Maybe (w, v) -> v forall b a. b -> (a -> b) -> Maybe a -> b maybe v forall {a}. a -err (w, v) -> v +err (w, v) -> v forall a b. (a, b) -> b snd (Maybe (w, v) -> v) -> (w -> Maybe (w, v)) -> w -> v forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -315,7 +315,7 @@ flip w -> Map w v -> Maybe (w, v) forall k v. Ord k => k -> Map k v -> Maybe (k, v) Map.lookupLE Map w v -m) (w -> v) -> m w -> m v +m) (w -> v) -> m w -> m v forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (w, w) -> g -> m w forall a g (m :: * -> *). @@ -324,10 +324,10 @@ forall g (m :: * -> *). StatefulGen g m => (w, w) -> g -> m w uniformRM (w 0, w -total) g -g - where err :: a -err = String -> a +total) g +g + where err :: a +err = String -> a forall a. HasCallStack => String -> a error String "sample: absurd." @@ -340,8 +340,8 @@ -- with probability proportional to its area. -- -- \(O(N\log N\), where \(N\) is the total size of all polygons. -triangleSampler :: (SimplePolygon_ polygon point r, Num r, Ord r, Foldable1 nonEmpty) - => nonEmpty polygon -> Sampler r (Triangle point) +triangleSampler :: (SimplePolygon_ polygon point r, Num r, Ord r, Foldable1 nonEmpty) + => nonEmpty polygon -> Sampler r (Triangle point) triangleSampler :: forall polygon point r (nonEmpty :: * -> *). (SimplePolygon_ polygon point r, Num r, Ord r, Foldable1 nonEmpty) => @@ -359,14 +359,14 @@ -> NonEmpty (Triangle point) -> NonEmpty (r, Triangle point) forall a b. (a -> b) -> NonEmpty a -> NonEmpty b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\Triangle point -tri -> (Triangle point -> r +fmap (\Triangle point +tri -> (Triangle point -> r forall r point triangle. (Num r, Point_ point 2 r, Triangle_ triangle point) => triangle -> r triangleSignedArea2X Triangle point -tri, Triangle point -tri)) +tri, Triangle point +tri)) (NonEmpty (Triangle point) -> NonEmpty (r, Triangle point)) -> (nonEmpty polygon -> NonEmpty (Triangle point)) -> nonEmpty polygon @@ -385,21 +385,21 @@ toTriangles -- | Sample a point -samplePoint :: (Point_ point 2 r, StatefulGen g m, Real r, Ord r, UniformRange r) - => Sampler r (Triangle point) -> g -> m (Point 2 Double) +samplePoint :: (Point_ point 2 r, StatefulGen g m, Real r, Ord r, UniformRange r) + => Sampler r (Triangle point) -> g -> m (Point 2 Double) samplePoint :: forall point r g (m :: * -> *). (Point_ point 2 r, StatefulGen g m, Real r, Ord r, UniformRange r) => Sampler r (Triangle point) -> g -> m (Point 2 Double) -samplePoint Sampler r (Triangle point) -sampler g -g = Sampler r (Triangle point) -> g -> m (Triangle point) +samplePoint Sampler r (Triangle point) +sampler g +g = Sampler r (Triangle point) -> g -> m (Triangle point) forall g (m :: * -> *) w v. (StatefulGen g m, Ord w, Num w, UniformRange w) => Sampler w v -> g -> m v sample Sampler r (Triangle point) -sampler g -g m (Triangle point) +sampler g +g m (Triangle point) -> (Triangle point -> m (Point 2 Double)) -> m (Point 2 Double) forall a b. m a -> (a -> m b) -> m b forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b @@ -411,23 +411,23 @@ (Point_ point 2 r, Real r, StatefulGen g m) => Triangle point -> g -> m (Point 2 Double) sampleTriangle g -g +g -- | Unfiormly samples a point from a set of polygons. You may want to build a -- pointSampler if the goal is to sample multiple points. -- -- \(O(N\log N\), where \(N\) is the total size of all polygons. -samplePolygons :: ( SimplePolygon_ polygon point r, StatefulGen g m - , Foldable1 nonEmpty, Real r, Ord r, UniformRange r +samplePolygons :: ( SimplePolygon_ polygon point r, StatefulGen g m + , Foldable1 nonEmpty, Real r, Ord r, UniformRange r ) - => nonEmpty polygon -> g -> m (Point 2 Double) + => nonEmpty polygon -> g -> m (Point 2 Double) samplePolygons :: forall polygon point r g (m :: * -> *) (nonEmpty :: * -> *). (SimplePolygon_ polygon point r, StatefulGen g m, Foldable1 nonEmpty, Real r, Ord r, UniformRange r) => nonEmpty polygon -> g -> m (Point 2 Double) -samplePolygons nonEmpty polygon -pgs g -g = (Sampler r (Triangle point) -> g -> m (Point 2 Double)) +samplePolygons nonEmpty polygon +pgs g +g = (Sampler r (Triangle point) -> g -> m (Point 2 Double)) -> g -> Sampler r (Triangle point) -> m (Point 2 Double) forall a b c. (a -> b -> c) -> b -> a -> c flip Sampler r (Triangle point) -> g -> m (Point 2 Double) @@ -436,7 +436,7 @@ UniformRange r) => Sampler r (Triangle point) -> g -> m (Point 2 Double) samplePoint g -g (Sampler r (Triangle point) -> m (Point 2 Double)) +g (Sampler r (Triangle point) -> m (Point 2 Double)) -> Sampler r (Triangle point) -> m (Point 2 Double) forall a b. (a -> b) -> a -> b $ nonEmpty polygon -> Sampler r (Triangle point) @@ -445,20 +445,20 @@ Foldable1 nonEmpty) => nonEmpty polygon -> Sampler r (Triangle point) triangleSampler nonEmpty polygon -pgs +pgs -- | Uniformly samples a point in a polygon. -- -- \(O(n\log n )\) -samplePolygon :: ( SimplePolygon_ polygon point r, Ord r, Real r, UniformRange r - , StatefulGen g m) - => polygon -> g -> m (Point 2 Double) +samplePolygon :: ( SimplePolygon_ polygon point r, Ord r, Real r, UniformRange r + , StatefulGen g m) + => polygon -> g -> m (Point 2 Double) samplePolygon :: forall polygon point r g (m :: * -> *). (SimplePolygon_ polygon point r, Ord r, Real r, UniformRange r, StatefulGen g m) => polygon -> g -> m (Point 2 Double) -samplePolygon polygon -p = NonEmpty polygon -> g -> m (Point 2 Double) +samplePolygon polygon +p = NonEmpty polygon -> g -> m (Point 2 Double) forall polygon point r g (m :: * -> *) (nonEmpty :: * -> *). (SimplePolygon_ polygon point r, StatefulGen g m, Foldable1 nonEmpty, Real r, Ord r, UniformRange r) => @@ -467,14 +467,14 @@ -> NonEmpty polygon -> g -> m (Point 2 Double) forall a b. (a -> b) -> a -> b $ polygon -p polygon -> [polygon] -> NonEmpty polygon +p polygon -> [polygon] -> NonEmpty polygon forall a. a -> [a] -> NonEmpty a NonEmpty.:| [] -- | Uniformly samples a triangle in \(O(1)\) time. -sampleTriangle :: ( Point_ point 2 r, Real r - , StatefulGen g m) - => Triangle point -> g -> m (Point 2 Double) +sampleTriangle :: ( Point_ point 2 r, Real r + , StatefulGen g m) + => Triangle point -> g -> m (Point 2 Double) sampleTriangle :: forall point r g (m :: * -> *). (Point_ point 2 r, Real r, StatefulGen g m) => Triangle point -> g -> m (Point 2 Double) @@ -486,13 +486,13 @@ forall point r. (Point_ point 2 r, Real r) => point -> Point 2 Double -doubleP -> Triangle Point 2 Double -v1 Point 2 Double -v2 Point 2 Double -v3) g -g = +doubleP -> Triangle Point 2 Double +v1 Point 2 Double +v2 Point 2 Double +v3) g +g = Double -> Double -> Point 2 Double -f (Double -> Double -> Point 2 Double) +f (Double -> Double -> Point 2 Double) -> m Double -> m (Double -> Point 2 Double) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> (Double, Double) -> g -> m Double @@ -505,7 +505,7 @@ uniformRM (Double 0, Double 1) g -g m (Double -> Point 2 Double) -> m Double -> m (Point 2 Double) +g m (Double -> Point 2 Double) -> m Double -> m (Point 2 Double) forall a b. m (a -> b) -> m a -> m b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> (Double, Double) -> g -> m Double @@ -518,75 +518,75 @@ uniformRM (Double 0, Double 1) g -g +g where - f :: Double -> Double -> Point 2 Double - f :: Double -> Double -> Point 2 Double -f Double -a' Double -b' = let (Double -a, Double -b) = if Double -a' Double -> Double -> Double + f :: Double -> Double -> Point 2 Double + f :: Double -> Double -> Point 2 Double +f Double +a' Double +b' = let (Double +a, Double +b) = if Double +a' Double -> Double -> Double forall a. Num a => a -> a -> a + Double -b' Double -> Double -> Bool +b' Double -> Double -> Bool forall a. Ord a => a -> a -> Bool > Double 1 then (Double 1 Double -> Double -> Double forall a. Num a => a -> a -> a - Double -a', Double +a', Double 1 Double -> Double -> Double forall a. Num a => a -> a -> a - Double -b') else (Double -a', Double -b') - u :: Vector 2 Double -u = Point 2 Double -v2 Point 2 Double -> Point 2 Double -> Vector 2 Double +b') else (Double +a', Double +b') + u :: Vector 2 Double +u = Point 2 Double +v2 Point 2 Double -> Point 2 Double -> Vector 2 Double forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point 2 Double -v1 - v :: Vector 2 Double -v = Point 2 Double -v3 Point 2 Double -> Point 2 Double -> Vector 2 Double +v1 + v :: Vector 2 Double +v = Point 2 Double +v3 Point 2 Double -> Point 2 Double -> Vector 2 Double forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. Point 2 Double -v1 +v1 in Point 2 Double -v1 Point 2 Double -> Vector 2 Double -> Point 2 Double +v1 Point 2 Double -> Vector 2 Double -> Point 2 Double forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ (Double -aDouble -> Vector 2 Double -> Vector 2 Double +aDouble -> Vector 2 Double -> Vector 2 Double forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^Vector 2 Double -u) Point 2 Double -> Vector 2 Double -> Point 2 Double +u) Point 2 Double -> Vector 2 Double -> Point 2 Double forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> Vector d r -> point .+^ (Double -bDouble -> Vector 2 Double -> Vector 2 Double +bDouble -> Vector 2 Double -> Vector 2 Double forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^Vector 2 Double -v) +v) -- the idea is based on -- https://blogs.sas.com/content/iml/2020/10/19/random-points-in-triangle.html -- | Convert to a point with double coordiantes -doubleP :: (Point_ point 2 r, Real r) => point -> Point 2 Double +doubleP :: (Point_ point 2 r, Real r) => point -> Point 2 Double doubleP :: forall point r. (Point_ point 2 r, Real r) => point -> Point 2 Double @@ -620,8 +620,8 @@ asPoint -- | Triangulates a polygon \(O(n \log n)\). -toTriangles :: (SimplePolygon_ polygon point r, Num r, Ord r) - => polygon -> NonEmpty.NonEmpty (Triangle point) +toTriangles :: (SimplePolygon_ polygon point r, Num r, Ord r) + => polygon -> NonEmpty.NonEmpty (Triangle point) toTriangles :: forall polygon point r. (SimplePolygon_ polygon point r, Num r, Ord r) => polygon -> NonEmpty (Triangle point) diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Type.html b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Type.html index c7917eeae..4a9609349 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Type.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.Type.html @@ -46,8 +46,8 @@ -------------------------------------------------------------------------------- -- | Simple polygons just store their vertices in CCCW order -newtype SimplePolygonF f point = MkSimplePolygon (f point) - deriving stock ((forall x. +newtype SimplePolygonF f point = MkSimplePolygon (f point) + deriving stock ((forall x. SimplePolygonF f point -> Rep (SimplePolygonF f point) x) -> (forall x. Rep (SimplePolygonF f point) x -> SimplePolygonF f point) @@ -67,7 +67,7 @@ Rep (SimplePolygonF f point) x -> SimplePolygonF f point to :: forall x. Rep (SimplePolygonF f point) x -> SimplePolygonF f point Generic) - deriving newtype (SimplePolygonF f point -> () + deriving newtype (SimplePolygonF f point -> () (SimplePolygonF f point -> ()) -> NFData (SimplePolygonF f point) forall a. (a -> ()) -> NFData a forall k (f :: k -> *) (point :: k). @@ -77,7 +77,7 @@ NFData (f point) => SimplePolygonF f point -> () rnf :: SimplePolygonF f point -> () -NFData,(forall a b. (a -> b) -> SimplePolygonF f a -> SimplePolygonF f b) +NFData,(forall a b. (a -> b) -> SimplePolygonF f a -> SimplePolygonF f b) -> (forall a b. a -> SimplePolygonF f b -> SimplePolygonF f a) -> Functor (SimplePolygonF f) forall a b. a -> SimplePolygonF f b -> SimplePolygonF f a @@ -99,7 +99,7 @@ Functor f => a -> SimplePolygonF f b -> SimplePolygonF f a <$ :: forall a b. a -> SimplePolygonF f b -> SimplePolygonF f a -Functor,(forall m. Monoid m => SimplePolygonF f m -> m) +Functor,(forall m. Monoid m => SimplePolygonF f m -> m) -> (forall m a. Monoid m => (a -> m) -> SimplePolygonF f a -> m) -> (forall m a. Monoid m => (a -> m) -> SimplePolygonF f a -> m) -> (forall a b. (a -> b -> b) -> b -> SimplePolygonF f a -> b) @@ -236,7 +236,7 @@ (Foldable f, Num a) => SimplePolygonF f a -> a product :: forall a. Num a => SimplePolygonF f a -> a -Foldable,Foldable (SimplePolygonF f) +Foldable,Foldable (SimplePolygonF f) Foldable (SimplePolygonF f) => (forall m. Semigroup m => SimplePolygonF f m -> m) -> (forall m a. Semigroup m => (a -> m) -> SimplePolygonF f a -> m) @@ -341,7 +341,7 @@ Foldable1 f => (a -> b) -> (a -> b -> b) -> SimplePolygonF f a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> SimplePolygonF f a -> b -Foldable1,SimplePolygonF f point -> SimplePolygonF f point -> Bool +Foldable1,SimplePolygonF f point -> SimplePolygonF f point -> Bool (SimplePolygonF f point -> SimplePolygonF f point -> Bool) -> (SimplePolygonF f point -> SimplePolygonF f point -> Bool) -> Eq (SimplePolygonF f point) @@ -357,7 +357,7 @@ Eq (f point) => SimplePolygonF f point -> SimplePolygonF f point -> Bool /= :: SimplePolygonF f point -> SimplePolygonF f point -> Bool -Eq,Eq (SimplePolygonF f point) +Eq,Eq (SimplePolygonF f point) Eq (SimplePolygonF f point) => (SimplePolygonF f point -> SimplePolygonF f point -> Ordering) -> (SimplePolygonF f point -> SimplePolygonF f point -> Bool) @@ -428,7 +428,7 @@ -> SimplePolygonF f point -> SimplePolygonF f point min :: SimplePolygonF f point -> SimplePolygonF f point -> SimplePolygonF f point -Ord,(forall a. Eq a => Eq (SimplePolygonF f a)) => +Ord,(forall a. Eq a => Eq (SimplePolygonF f a)) => (forall a b. (a -> b -> Bool) -> SimplePolygonF f a -> SimplePolygonF f b -> Bool) @@ -452,7 +452,7 @@ liftEq :: forall a b. (a -> b -> Bool) -> SimplePolygonF f a -> SimplePolygonF f b -> Bool -Eq1,Eq1 (SimplePolygonF f) +Eq1,Eq1 (SimplePolygonF f) (Eq1 (SimplePolygonF f), forall a. Ord a => Ord (SimplePolygonF f a)) => (forall a b. @@ -486,8 +486,8 @@ -- | By default we store simple polygons as non-empty circular vectors. type SimplePolygon = SimplePolygonF (Cyclic NonEmptyVector) -type instance Dimension (SimplePolygonF f point) = 2 -type instance NumType (SimplePolygonF f point) = NumType point +type instance Dimension (SimplePolygonF f point) = 2 +type instance NumType (SimplePolygonF f point) = NumType point -- TODO: should we use allow cyclic shifts? -- deriving instance Eq (f point) => Eq (SimplePolygonF f point) @@ -495,8 +495,8 @@ -- | Access the container -_SimplePolygonF :: Iso (SimplePolygonF f point) (SimplePolygonF f' point') - (f point) (f' point' ) +_SimplePolygonF :: Iso (SimplePolygonF f point) (SimplePolygonF f' point') + (f point) (f' point' ) _SimplePolygonF :: forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => @@ -510,20 +510,20 @@ (f point) (f' point') forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b -iso (\(MkSimplePolygon f point -vs) -> f point -vs) f' point' -> SimplePolygonF f' point' +iso (\(MkSimplePolygon f point +vs) -> f point +vs) f' point' -> SimplePolygonF f' point' forall {k} (f :: k -> *) (point :: k). f point -> SimplePolygonF f point MkSimplePolygon -instance Traversable f => Traversable (SimplePolygonF f) where - traverse :: forall (f :: * -> *) a b. +instance Traversable f => Traversable (SimplePolygonF f) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> SimplePolygonF f a -> f (SimplePolygonF f b) -traverse a -> f b -f (MkSimplePolygon f a -vs) = f b -> SimplePolygonF f b +traverse a -> f b +f (MkSimplePolygon f a +vs) = f b -> SimplePolygonF f b forall {k} (f :: k -> *) (point :: k). f point -> SimplePolygonF f point MkSimplePolygon (f b -> SimplePolygonF f b) -> f (f b) -> f (SimplePolygonF f b) @@ -536,15 +536,15 @@ Applicative f => (a -> f b) -> f a -> f (f b) traverse a -> f b -f f a -vs -instance Traversable1 f => Traversable1 (SimplePolygonF f) where - traverse1 :: forall (f :: * -> *) a b. +f f a +vs +instance Traversable1 f => Traversable1 (SimplePolygonF f) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> SimplePolygonF f a -> f (SimplePolygonF f b) -traverse1 a -> f b -f (MkSimplePolygon f a -vs) = f b -> SimplePolygonF f b +traverse1 a -> f b +f (MkSimplePolygon f a +vs) = f b -> SimplePolygonF f b forall {k} (f :: k -> *) (point :: k). f point -> SimplePolygonF f point MkSimplePolygon (f b -> SimplePolygonF f b) -> f (f b) -> f (SimplePolygonF f b) @@ -555,20 +555,20 @@ (a -> f b) -> t a -> f (t b) forall (f :: * -> *) a b. Apply f => (a -> f b) -> f a -> f (f b) traverse1 a -> f b -f f a -vs +f f a +vs -instance (ShiftedEq (f point), ElemCyclic (f point) ~ point - ) => ShiftedEq (SimplePolygonF f point) where - type ElemCyclic (SimplePolygonF f point) = point - isShiftOf :: Eq (ElemCyclic (SimplePolygonF f point)) => +instance (ShiftedEq (f point), ElemCyclic (f point) ~ point + ) => ShiftedEq (SimplePolygonF f point) where + type ElemCyclic (SimplePolygonF f point) = point + isShiftOf :: Eq (ElemCyclic (SimplePolygonF f point)) => SimplePolygonF f point -> SimplePolygonF f point -> Bool -isShiftOf SimplePolygonF f point -p SimplePolygonF f point -q = f point -> f point -> Bool +isShiftOf SimplePolygonF f point +p SimplePolygonF f point +q = f point -> f point -> Bool forall t. (ShiftedEq t, Eq (ElemCyclic t)) => t -> t -> Bool isShiftOf (SimplePolygonF f point -pSimplePolygonF f point +pSimplePolygonF f point -> Getting (f point) (SimplePolygonF f point) (f point) -> f point forall s a. s -> Getting a s a -> a ^.Getting (f point) (SimplePolygonF f point) (f point) @@ -578,7 +578,7 @@ p (f point) (f (f' point')) -> p (SimplePolygonF f point) (f (SimplePolygonF f' point')) _SimplePolygonF) (SimplePolygonF f point -qSimplePolygonF f point +qSimplePolygonF f point -> Getting (f point) (SimplePolygonF f point) (f point) -> f point forall s a. s -> Getting a s a -> a ^.Getting (f point) (SimplePolygonF f point) (f point) @@ -589,10 +589,10 @@ -> p (SimplePolygonF f point) (f (SimplePolygonF f' point')) _SimplePolygonF) -instance (Foldable f, ToJSON point) => ToJSON (SimplePolygonF f point) where - toJSON :: SimplePolygonF f point -> Value -toJSON SimplePolygonF f point -pg = [Pair] -> Value +instance (Foldable f, ToJSON point) => ToJSON (SimplePolygonF f point) where + toJSON :: SimplePolygonF f point -> Value +toJSON SimplePolygonF f point +pg = [Pair] -> Value object [ Key "tag" Key -> String -> Pair forall v. ToJSON v => Key -> v -> Pair @@ -607,11 +607,11 @@ forall a. SimplePolygonF f a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList SimplePolygonF f point -pg +pg ] -instance (HasFromFoldable1 f, FromJSON point) => FromJSON (SimplePolygonF f point) where - parseJSON :: Value -> Parser (SimplePolygonF f point) -parseJSON = String +instance (HasFromFoldable1 f, FromJSON point) => FromJSON (SimplePolygonF f point) where + parseJSON :: Value -> Parser (SimplePolygonF f point) +parseJSON = String -> (Object -> Parser (SimplePolygonF f point)) -> Value -> Parser (SimplePolygonF f point) @@ -623,11 +623,11 @@ -> Value -> Parser (SimplePolygonF f point) forall a b. (a -> b) -> a -> b -$ \Object -o -> do +$ \Object +o -> do (String "SimplePolygon" :: String) <- Object -o Object -> Key -> Parser String +o Object -> Key -> Parser String forall a. FromJSON a => Object -> Key -> Parser a .: Key "tag" @@ -640,27 +640,27 @@ -> SimplePolygonF f point forall b c a. (b -> c) -> (a -> b) -> a -> c . forall (f :: * -> *) a. HasFromFoldable1 f => NonEmpty a -> f a -F.fromNonEmpty @f @point (NonEmpty point -> SimplePolygonF f point) +F.fromNonEmpty @f @point (NonEmpty point -> SimplePolygonF f point) -> Parser (NonEmpty point) -> Parser (SimplePolygonF f point) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Object -o Object -> Key -> Parser (NonEmpty point) +o Object -> Key -> Parser (NonEmpty point) forall a. FromJSON a => Object -> Key -> Parser a .: Key "vertices" -- | shortcut for all default properties of f we need to store the vertices. -type VertexContainer f point = ( IxValue (f point) ~ point - , Index (f point) ~ Int - , TraversableWithIndex Int f - , Traversable1 f - , Ixed (f point) - , HasDirectedTraversals f +type VertexContainer f point = ( IxValue (f point) ~ point + , Index (f point) ~ Int + , TraversableWithIndex Int f + , Traversable1 f + , Ixed (f point) + , HasDirectedTraversals f ) -instance ( VertexContainer f point - ) => HasPoints (SimplePolygonF f point) (SimplePolygonF f point') point point' where - allPoints :: forall (d :: Nat) r r'. +instance ( VertexContainer f point + ) => HasPoints (SimplePolygonF f point) (SimplePolygonF f point') point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (SimplePolygonF f point) ~ r, NumType (SimplePolygonF f point') ~ r', @@ -668,7 +668,7 @@ Dimension (SimplePolygonF f point') ~ d) => Traversal1 (SimplePolygonF f point) (SimplePolygonF f point') point point' -allPoints = (f point -> f (f point')) +allPoints = (f point -> f (f point')) -> SimplePolygonF f point -> f (SimplePolygonF f point') forall {k} {k} (f :: k -> *) (point :: k) (f' :: k -> *) (point' :: k) (p :: * -> * -> *) (f :: * -> *). @@ -689,19 +689,19 @@ IndexedTraversal1 Int (f point) (f point') point point' traversed1 -instance ( VertexContainer f point - , DefaultTransformByConstraints (SimplePolygonF f point) 2 r - , Point_ point 2 r - ) => IsTransformable (SimplePolygonF f point) +instance ( VertexContainer f point + , DefaultTransformByConstraints (SimplePolygonF f point) 2 r + , Point_ point 2 r + ) => IsTransformable (SimplePolygonF f point) -instance ( VertexContainer f point - , Point_ point 2 r - ) => IsBoxable (SimplePolygonF f point) +instance ( VertexContainer f point + , Point_ point 2 r + ) => IsBoxable (SimplePolygonF f point) -------------------------------------------------------------------------------- -- | Get the underlying cyclic vector. -toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point +toCyclic :: SimplePolygonF (Cyclic v) point -> Cyclic v point toCyclic :: forall {k} (v :: k -> *) (point :: k). SimplePolygonF (Cyclic v) point -> Cyclic v point toCyclic = Getting diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.html b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.html index b502e5a08..eebfe9bab 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Simple.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Simple.html @@ -43,15 +43,15 @@ -------------------------------------------------------------------------------- -instance ( VertexContainer f point - ) => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') where - vertices :: IndexedTraversal1 +instance ( VertexContainer f point + ) => HasVertices (SimplePolygonF f point) (SimplePolygonF f point') where + vertices :: IndexedTraversal1 (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (SimplePolygonF f point') (Vertex (SimplePolygonF f point)) (Vertex (SimplePolygonF f point')) -vertices = (f point -> f (f point')) +vertices = (f point -> f (f point')) -> SimplePolygonF f point -> f (SimplePolygonF f point') forall {k1} {k2} (f1 :: k1 -> *) (point :: k1) (f' :: k2 -> *) (point' :: k2) (p :: * -> * -> *) (f2 :: * -> *). @@ -72,17 +72,17 @@ IndexedTraversal1 Int (f point) (f point') point point' traversed1 -instance ( VertexContainer f point - ) => HasVertices' (SimplePolygonF f point) where - type Vertex (SimplePolygonF f point) = point - type VertexIx (SimplePolygonF f point) = Int - vertexAt :: VertexIx (SimplePolygonF f point) +instance ( VertexContainer f point + ) => HasVertices' (SimplePolygonF f point) where + type Vertex (SimplePolygonF f point) = point + type VertexIx (SimplePolygonF f point) = Int + vertexAt :: VertexIx (SimplePolygonF f point) -> IndexedTraversal' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) -vertexAt VertexIx (SimplePolygonF f point) -i = (f point -> f (f point)) +vertexAt VertexIx (SimplePolygonF f point) +i = (f point -> f (f point)) -> SimplePolygonF f point -> f (SimplePolygonF f point) forall {k1} {k2} (f1 :: k1 -> *) (point :: k1) (f' :: k2 -> *) (point' :: k2) (p :: * -> * -> *) (f2 :: * -> *). @@ -104,9 +104,9 @@ Index m -> IndexedTraversal' (Index m) m (IxValue m) iix VertexIx (SimplePolygonF f point) Index (f point) -i - numVertices :: SimplePolygonF f point -> Int -numVertices = f point -> Int +i + numVertices :: SimplePolygonF f point -> Int +numVertices = f point -> Int forall a. f a -> Int forall (t :: * -> *) a. Foldable t => t a -> Int F.length (f point -> Int) @@ -149,13 +149,13 @@ -- edgeAt (which would modify both vertices), and edges, which would modify only one vertex. -- that is a bit too weird. -instance ( VertexContainer f point - ) => HasOuterBoundary (SimplePolygonF f point) where - outerBoundary :: IndexedTraversal1' +instance ( VertexContainer f point + ) => HasOuterBoundary (SimplePolygonF f point) where + outerBoundary :: IndexedTraversal1' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) -outerBoundary = (f point -> f (f point)) +outerBoundary = (f point -> f (f point)) -> SimplePolygonF f point -> f (SimplePolygonF f point) forall {k1} {k2} (f1 :: k1 -> *) (point :: k1) (f' :: k2 -> *) (point' :: k2) (p :: * -> * -> *) (f2 :: * -> *). @@ -175,13 +175,13 @@ IndexedTraversal1 Int (f a) (f b) a b IndexedTraversal1 Int (f point) (f point) point point traversed1 - outerBoundaryVertexAt :: VertexIx (SimplePolygonF f point) + outerBoundaryVertexAt :: VertexIx (SimplePolygonF f point) -> IndexedGetter (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) -outerBoundaryVertexAt VertexIx (SimplePolygonF f point) -i = Traversing +outerBoundaryVertexAt VertexIx (SimplePolygonF f point) +i = Traversing p f (SimplePolygonF f point) (SimplePolygonF f point) point point -> Over p f (SimplePolygonF f point) (SimplePolygonF f point) point point @@ -198,15 +198,15 @@ VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx (SimplePolygonF f point) -i) +i) - ccwOuterBoundaryFrom :: VertexIx (SimplePolygonF f point) + ccwOuterBoundaryFrom :: VertexIx (SimplePolygonF f point) -> IndexedTraversal1' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) -ccwOuterBoundaryFrom VertexIx (SimplePolygonF f point) -i = (f point -> f (f point)) +ccwOuterBoundaryFrom VertexIx (SimplePolygonF f point) +i = (f point -> f (f point)) -> SimplePolygonF f point -> f (SimplePolygonF f point) forall {k1} {k2} (f1 :: k1 -> *) (point :: k1) (f' :: k2 -> *) (point' :: k2) (p :: * -> * -> *) (f2 :: * -> *). @@ -228,14 +228,14 @@ Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a traverseRightFrom VertexIx (SimplePolygonF f point) Index (f point) -i - cwOuterBoundaryFrom :: VertexIx (SimplePolygonF f point) +i + cwOuterBoundaryFrom :: VertexIx (SimplePolygonF f point) -> IndexedTraversal1' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) -cwOuterBoundaryFrom VertexIx (SimplePolygonF f point) -i = (f point -> f (f point)) +cwOuterBoundaryFrom VertexIx (SimplePolygonF f point) +i = (f point -> f (f point)) -> SimplePolygonF f point -> f (SimplePolygonF f point) forall {k1} {k2} (f1 :: k1 -> *) (point :: k1) (f' :: k2 -> *) (point' :: k2) (p :: * -> * -> *) (f2 :: * -> *). @@ -257,41 +257,41 @@ Index (v a) -> IndexedTraversal1' (Index (v a)) (v a) a traverseLeftFrom VertexIx (SimplePolygonF f point) Index (f point) -i +i -instance HasHoles (SimplePolygonF f point) +instance HasHoles (SimplePolygonF f point) -instance ( Point_ point 2 r - , HasFromFoldable1 f - , VertexContainer f point - ) => Polygon_ (SimplePolygonF f point) point r where +instance ( Point_ point 2 r + , HasFromFoldable1 f + , VertexContainer f point + ) => Polygon_ (SimplePolygonF f point) point r where - ccwPredecessorOf :: VertexIx (SimplePolygonF f point) + ccwPredecessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) -ccwPredecessorOf VertexIx (SimplePolygonF f point) -u = \p (Vertex (SimplePolygonF f point)) +ccwPredecessorOf VertexIx (SimplePolygonF f point) +u = \p (Vertex (SimplePolygonF f point)) (f (Vertex (SimplePolygonF f point))) -pvFv SimplePolygonF f point -pg -> let n :: Int -n = SimplePolygonF f point -> Int +pvFv SimplePolygonF f point +pg -> let n :: Int +n = SimplePolygonF f point -> Int forall graph. HasVertices' graph => graph -> Int numVertices SimplePolygonF f point -pg - p :: Int -p = (Int -> Int +pg + p :: Int +p = (Int -> Int forall a. Enum a => a -> a pred Int VertexIx (SimplePolygonF f point) -u) Int -> Int -> Int +u) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n - l :: Over +n + l :: Over p f (SimplePolygonF f point) (SimplePolygonF f point) point point -l = Traversing +l = Traversing p f (SimplePolygonF f point) (SimplePolygonF f point) point point -> Over p f (SimplePolygonF f point) (SimplePolygonF f point) point point @@ -318,41 +318,41 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt Int VertexIx (SimplePolygonF f point) -p +p in Over p f (SimplePolygonF f point) (SimplePolygonF f point) point point -l p point (f point) +l p point (f point) p (Vertex (SimplePolygonF f point)) (f (Vertex (SimplePolygonF f point))) -pvFv SimplePolygonF f point -pg +pvFv SimplePolygonF f point +pg -- make sure to wrap the index to make sure we report the right index. - ccwSuccessorOf :: VertexIx (SimplePolygonF f point) + ccwSuccessorOf :: VertexIx (SimplePolygonF f point) -> IndexedLens' (VertexIx (SimplePolygonF f point)) (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) -ccwSuccessorOf VertexIx (SimplePolygonF f point) -u = \p (Vertex (SimplePolygonF f point)) +ccwSuccessorOf VertexIx (SimplePolygonF f point) +u = \p (Vertex (SimplePolygonF f point)) (f (Vertex (SimplePolygonF f point))) -pvFv SimplePolygonF f point -pg -> let n :: Int -n = SimplePolygonF f point -> Int +pvFv SimplePolygonF f point +pg -> let n :: Int +n = SimplePolygonF f point -> Int forall graph. HasVertices' graph => graph -> Int numVertices SimplePolygonF f point -pg - s :: Int -s = (Int -> Int +pg + s :: Int +s = (Int -> Int forall a. Enum a => a -> a succ Int VertexIx (SimplePolygonF f point) -u) Int -> Int -> Int +u) Int -> Int -> Int forall a. Integral a => a -> a -> a `mod` Int -n - l :: Over +n + l :: Over p f (SimplePolygonF f point) (SimplePolygonF f point) point point -l = Traversing +l = Traversing p f (SimplePolygonF f point) (SimplePolygonF f point) point point -> Over p f (SimplePolygonF f point) (SimplePolygonF f point) point point @@ -379,23 +379,23 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt Int VertexIx (SimplePolygonF f point) -s +s in Over p f (SimplePolygonF f point) (SimplePolygonF f point) point point -l p point (f point) +l p point (f point) p (Vertex (SimplePolygonF f point)) (f (Vertex (SimplePolygonF f point))) -pvFv SimplePolygonF f point -pg +pvFv SimplePolygonF f point +pg -instance ( Point_ point 2 r - , VertexContainer f point - , HasFromFoldable1 f - ) => SimplePolygon_ (SimplePolygonF f point) point r where - uncheckedFromCCWPoints :: forall (f :: * -> *). +instance ( Point_ point 2 r + , VertexContainer f point + , HasFromFoldable1 f + ) => SimplePolygon_ (SimplePolygonF f point) point r where + uncheckedFromCCWPoints :: forall (f :: * -> *). Foldable f => f point -> SimplePolygonF f point -uncheckedFromCCWPoints = f point -> SimplePolygonF f point +uncheckedFromCCWPoints = f point -> SimplePolygonF f point forall {k} (f :: k -> *) (point :: k). f point -> SimplePolygonF f point MkSimplePolygon (f point -> SimplePolygonF f point) @@ -420,18 +420,18 @@ forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList - fromPoints :: forall (f :: * -> *). + fromPoints :: forall (f :: * -> *). (Foldable f, ConstructableSimplePolygon (SimplePolygonF f point) point r) => f point -> Maybe (SimplePolygonF f point) -fromPoints f point -pts = case f point -> [point] +fromPoints f point +pts = case f point -> [point] forall a. f a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] F.toList f point -pts of - pts' :: [point] -pts'@(point +pts of + pts' :: [point] +pts'@(point _ : point _ : point _ : [point] @@ -462,7 +462,7 @@ -> [point] -> Maybe (SimplePolygonF f point) forall a b. (a -> b) -> a -> b $ [point] -pts' +pts' -- TODO: verify that: -- we have no repeated vertices, -- no self intersections, and @@ -472,22 +472,22 @@ forall a. Maybe a Nothing -- we need at least three vertices -instance ( Show point - , SimplePolygon_ (SimplePolygonF f point) point r - ) => Show (SimplePolygonF f point) where - showsPrec :: Int -> SimplePolygonF f point -> ShowS -showsPrec = String -> Int -> SimplePolygonF f point -> ShowS +instance ( Show point + , SimplePolygon_ (SimplePolygonF f point) point r + ) => Show (SimplePolygonF f point) where + showsPrec :: Int -> SimplePolygonF f point -> ShowS +showsPrec = String -> Int -> SimplePolygonF f point -> ShowS forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, Show point) => String -> Int -> simplePolygon -> ShowS showsPrecSimplePolygon String "SimplePolygon" -instance ( Read point - , SimplePolygon_ (SimplePolygonF f point) point r - ) => Read (SimplePolygonF f point) where - readsPrec :: Int -> ReadS (SimplePolygonF f point) -readsPrec = String -> Int -> ReadS (SimplePolygonF f point) +instance ( Read point + , SimplePolygon_ (SimplePolygonF f point) point r + ) => Read (SimplePolygonF f point) where + readsPrec :: Int -> ReadS (SimplePolygonF f point) +readsPrec = String -> Int -> ReadS (SimplePolygonF f point) forall simplePolygon point r. (Read point, SimplePolygon_ simplePolygon point r) => String -> Int -> ReadS simplePolygon @@ -529,17 +529,17 @@ -------------------------------------------------------------------------------- -instance SimplePolygon_ (SimplePolygonF f point) point r - => HasInPolygon (SimplePolygonF f point) point r +instance SimplePolygon_ (SimplePolygonF f point) point r + => HasInPolygon (SimplePolygonF f point) point r -instance ( SimplePolygon_ (SimplePolygonF f point) point r - , Num r, Ord r - ) => HasIntersectionWith (Point 2 r) (SimplePolygonF f point) where - Point 2 r -q intersects :: Point 2 r -> SimplePolygonF f point -> Bool -`intersects` SimplePolygonF f point -pg = Point 2 r -q Point 2 r +instance ( SimplePolygon_ (SimplePolygonF f point) point r + , Num r, Ord r + ) => HasIntersectionWith (Point 2 r) (SimplePolygonF f point) where + Point 2 r +q intersects :: Point 2 r -> SimplePolygonF f point -> Bool +`intersects` SimplePolygonF f point +pg = Point 2 r +q Point 2 r -> SimplePolygonF f point -> PointLocationResultWith (VertexIx (SimplePolygonF f point)) forall queryPoint simplePolygon point r. @@ -549,30 +549,30 @@ -> simplePolygon -> PointLocationResultWith (VertexIx simplePolygon) `inSimplePolygon` SimplePolygonF f point -pg PointLocationResultWith Int -> PointLocationResultWith Int -> Bool +pg PointLocationResultWith Int -> PointLocationResultWith Int -> Bool forall a. Eq a => a -> a -> Bool /= PointLocationResultWith Int forall edge. PointLocationResultWith edge StrictlyOutside -type instance Intersection (Point 2 r) (SimplePolygonF f point) = Maybe (Point 2 r) +type instance Intersection (Point 2 r) (SimplePolygonF f point) = Maybe (Point 2 r) -instance ( SimplePolygon_ (SimplePolygonF f point) point r - , Num r, Ord r - ) => IsIntersectableWith (Point 2 r) (SimplePolygonF f point) where - Point 2 r -q intersect :: Point 2 r +instance ( SimplePolygon_ (SimplePolygonF f point) point r + , Num r, Ord r + ) => IsIntersectableWith (Point 2 r) (SimplePolygonF f point) where + Point 2 r +q intersect :: Point 2 r -> SimplePolygonF f point -> Intersection (Point 2 r) (SimplePolygonF f point) -`intersect` SimplePolygonF f point -pg | Point 2 r -q Point 2 r -> SimplePolygonF f point -> Bool +`intersect` SimplePolygonF f point +pg | Point 2 r +q Point 2 r -> SimplePolygonF f point -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` SimplePolygonF f point -pg = Point 2 r -> Maybe (Point 2 r) +pg = Point 2 r -> Maybe (Point 2 r) forall a. a -> Maybe a Just Point 2 r -q +q | Bool otherwise = Maybe (Point 2 r) Intersection (Point 2 r) (SimplePolygonF f point) @@ -584,17 +584,17 @@ -------------------------------------------------------------------------------- -- | verify that some sequence of points has no self intersecting edges. -hasNoSelfIntersections :: forall f point r. - (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) - => f point -> Bool +hasNoSelfIntersections :: forall f point r. + (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) + => f point -> Bool hasNoSelfIntersections :: forall (f :: * -> *) point r. (Foldable f, Functor f, Point_ point 2 r, Ord r, Real r) => f point -> Bool -hasNoSelfIntersections f point -vs = let vs' :: f (PointF (Vector 2 Rational)) -vs' = (\point -p -> (point -ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +hasNoSelfIntersections f point +vs = let vs' :: f (PointF (Vector 2 Rational)) +vs' = (\point +p -> (point +ppoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -629,10 +629,10 @@ -> f point -> f (PointF (Vector 2 Rational)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> f point -vs - pg :: SimplePolygon (Point 2 Rational) - pg :: SimplePolygon (PointF (Vector 2 Rational)) -pg = f (PointF (Vector 2 Rational)) +vs + pg :: SimplePolygon (Point 2 Rational) + pg :: SimplePolygon (PointF (Vector 2 Rational)) +pg = f (PointF (Vector 2 Rational)) -> SimplePolygon (PointF (Vector 2 Rational)) forall simplePolygon point r (f :: * -> *). (SimplePolygon_ simplePolygon point r, Foldable f) => @@ -642,7 +642,7 @@ f (PointF (Vector 2 Rational)) -> SimplePolygon (PointF (Vector 2 Rational)) uncheckedFromCCWPoints f (PointF (Vector 2 Rational)) -vs' +vs' in Map (PointF (Vector 2 Rational)) (Associated (ClosedLineSegment (PointF (Vector 2 Rational)))) @@ -677,7 +677,7 @@ (Associated (ClosedLineSegment (PointF (Vector 2 Rational)))) forall a b. (a -> b) -> a -> b $ SimplePolygon (PointF (Vector 2 Rational)) -pgSimplePolygon (PointF (Vector 2 Rational)) +pgSimplePolygon (PointF (Vector 2 Rational)) -> Getting (Endo [ClosedLineSegment (PointF (Vector 2 Rational))]) (SimplePolygon (PointF (Vector 2 Rational))) diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.MakeMonotone.html b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.MakeMonotone.html index 16168e893..b1c269d1d 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.MakeMonotone.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.MakeMonotone.html @@ -38,15 +38,15 @@ -- into y-monotone subpolygons. -- -- running time: \(O(n\log n)\) -makeMonotone :: forall s polygon point r. - (SimplePolygon_ polygon point r, Ord r, Num r) - => polygon - -> PlaneGraph s point PolygonEdgeType PolygonFaceData +makeMonotone :: forall s polygon point r. + (SimplePolygon_ polygon point r, Ord r, Num r) + => polygon + -> PlaneGraph s point PolygonEdgeType PolygonFaceData makeMonotone :: forall {k} (s :: k) polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData -makeMonotone polygon -pg = polygon +makeMonotone polygon +pg = polygon -> [Diagonal polygon] -> PlaneGraph s point PolygonEdgeType PolygonFaceData forall {k} (s :: k) polygon point r (f :: * -> *). @@ -56,29 +56,29 @@ -> f (Diagonal polygon) -> PlaneGraph s point PolygonEdgeType PolygonFaceData constructGraph polygon -pg (polygon -> [Diagonal polygon] +pg (polygon -> [Diagonal polygon] forall polygon point r. (Polygon_ polygon point r, Point_ point 2 r, Ord r, Num r, Ord (VertexIx polygon)) => polygon -> [Diagonal polygon] computeDiagonals polygon -pg) +pg) -- | Given a polygon, find a set of non-intersecting diagonals that partition -- the polygon into y-monotone pieces. -- -- running time: \(O(n\log n)\) -computeDiagonals :: ( Polygon_ polygon point r, Point_ point 2 r - , Ord r, Num r, Ord (VertexIx polygon) +computeDiagonals :: ( Polygon_ polygon point r, Point_ point 2 r + , Ord r, Num r, Ord (VertexIx polygon) ) - => polygon -> [Diagonal polygon] + => polygon -> [Diagonal polygon] computeDiagonals :: forall polygon point r. (Polygon_ polygon point r, Point_ point 2 r, Ord r, Num r, Ord (VertexIx polygon)) => polygon -> [Diagonal polygon] -computeDiagonals polygon -pg = +computeDiagonals polygon +pg = (StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) @@ -134,7 +134,7 @@ -> Event polygon -> (StatusSruct polygon, [Diagonal polygon]) handle polygon -pg) (Set (ClosedLineSegment point :+ VertexIx polygon) +pg) (Set (ClosedLineSegment point :+ VertexIx polygon) -> Map (VertexIx polygon) (VertexIx polygon) -> StatusStructure (VertexIx polygon) @@ -147,11 +147,11 @@ Set.empty Map (VertexIx polygon) (VertexIx polygon) forall k a. Map k a Map.empty, []) Vector (Event' (VertexIx polygon) point) -events +events -- sweep line algorithm to compute the diagonals where - events :: Vector (Event' (VertexIx polygon) point) -events = (Event' (VertexIx polygon) point + events :: Vector (Event' (VertexIx polygon) point) +events = (Event' (VertexIx polygon) point -> Event' (VertexIx polygon) point -> Ordering) -> Vector (Event' (VertexIx polygon) point) -> Vector (Event' (VertexIx polygon) point) @@ -211,9 +211,9 @@ polygon (Vertex polygon) (Vertex polygon) -vertices (\VertexIx polygon -i point -v -> Event' (VertexIx polygon) point +vertices (\VertexIx polygon +i point +v -> Event' (VertexIx polygon) point -> Builder (Event' (VertexIx polygon) point) forall element. element -> Builder element Builder.singleton (Event' (VertexIx polygon) point @@ -222,15 +222,15 @@ -> Builder (Event' (VertexIx polygon) point) forall a b. (a -> b) -> a -> b $ VertexIx polygon -> point -> Event' (VertexIx polygon) point -toEvent VertexIx polygon -i point -v) polygon -pg +toEvent VertexIx polygon +i point +v) polygon +pg -- Transform the vertex into an Event - toEvent :: VertexIx polygon -> point -> Event' (VertexIx polygon) point -toEvent VertexIx polygon -i point -v = VertexType + toEvent :: VertexIx polygon -> point -> Event' (VertexIx polygon) point +toEvent VertexIx polygon +i point +v = VertexType -> VertexIx polygon -> point -> VertexIx polygon @@ -243,12 +243,12 @@ (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> VertexIx polygon -> point -> VertexType classify polygon -pg VertexIx polygon -i point -v) VertexIx polygon -i point -v (polygon -pgpolygon +pg VertexIx polygon +i point +v) VertexIx polygon +i point +v (polygon +pgpolygon -> Getting (VertexIx polygon) polygon (VertexIx polygon) -> VertexIx polygon forall s a. s -> Getting a s a -> a @@ -259,7 +259,7 @@ VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwPredecessorOf VertexIx polygon -i(Indexed (VertexIx polygon) point (Const (VertexIx polygon) point) +i(Indexed (VertexIx polygon) point (Const (VertexIx polygon) point) -> polygon -> Const (VertexIx polygon) polygon) -> ((VertexIx polygon -> Const (VertexIx polygon) (VertexIx polygon)) @@ -298,7 +298,7 @@ (VertexIx polygon) _1) (polygon -pgpolygon +pgpolygon -> Getting (VertexIx polygon) polygon (VertexIx polygon) -> VertexIx polygon forall s a. s -> Getting a s a -> a @@ -309,7 +309,7 @@ VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwSuccessorOf VertexIx polygon -i(Indexed (VertexIx polygon) point (Const (VertexIx polygon) point) +i(Indexed (VertexIx polygon) point (Const (VertexIx polygon) point) -> polygon -> Const (VertexIx polygon) polygon) -> ((VertexIx polygon -> Const (VertexIx polygon) (VertexIx polygon)) @@ -349,17 +349,17 @@ _1) -- | Assigns a vertex type to the given vertex -classify :: ( Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) - => polygon -> VertexIx polygon -> point -> VertexType +classify :: ( Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) + => polygon -> VertexIx polygon -> point -> VertexType classify :: forall polygon point r. (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> VertexIx polygon -> point -> VertexType -classify polygon -pg VertexIx polygon -i point -c = let p :: point -p = polygon -pgpolygon -> Getting point polygon point -> point +classify polygon +pg VertexIx polygon +i point +c = let p :: point +p = polygon +pgpolygon -> Getting point polygon point -> point forall s a. s -> Getting a s a -> a ^.VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) @@ -368,10 +368,10 @@ VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwPredecessorOf VertexIx polygon -i - n :: point -n = polygon -pgpolygon -> Getting point polygon point -> point +i + n :: point +n = polygon +pgpolygon -> Getting point polygon point -> point forall s a. s -> Getting a s a -> a ^.VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) @@ -380,23 +380,23 @@ VertexIx polygon -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwSuccessorOf VertexIx polygon -i +i in case (point -p point -> point -> Ordering +p point -> point -> Ordering forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering `cmpSweep` point -c, point -n point -> point -> Ordering +c, point +n point -> point -> Ordering forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering `cmpSweep` point -c, point -> point -> Bool -largeInteriorAngle point -p point -n) of +c, point -> point -> Bool +largeInteriorAngle point +p point +n) of (Ordering LT, Ordering LT, Bool @@ -422,18 +422,18 @@ Regular where -- is the angle larger than > 180 degrees - largeInteriorAngle :: point -> point -> Bool -largeInteriorAngle point -p point -n = case point -> point -> point -> CCW + largeInteriorAngle :: point -> point -> Bool +largeInteriorAngle point +p point +n = case point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw point -p point -c point -n of +p point +c point +n of CCW CCW -> Bool False @@ -448,13 +448,13 @@ -- | comparison used to order the events w.r.t the sweep line: -- p < q = p.y < q.y || p.y == q.y && p.x > q.y -cmpSweep :: (Point_ point 2 r, Ord r) => point -> point -> Ordering -point -p cmpSweep :: forall point r. +cmpSweep :: (Point_ point 2 r, Ord r) => point -> point -> Ordering +point +p cmpSweep :: forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering -`cmpSweep` point -q = (point -> r) -> point -> point -> Ordering +`cmpSweep` point +q = (point -> r) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (point -> Getting r point r -> r forall s a. s -> Getting a s a -> a @@ -464,8 +464,8 @@ IndexedLens' Int point r IndexedLens' Int point r yCoord) point -p point -q Ordering -> Ordering -> Ordering +p point +q Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> (point -> Down r) -> point -> point -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering @@ -481,18 +481,18 @@ IndexedLens' Int point r IndexedLens' Int point r xCoord)) point -p point -q +p point +q -- | Handle an event -handle :: forall polygon point r. ( Polygon_ polygon point r - , Point_ point 2 r, Num r, Ord r - , Ord (VertexIx polygon) +handle :: forall polygon point r. ( Polygon_ polygon point r + , Point_ point 2 r, Num r, Ord r + , Ord (VertexIx polygon) ) - => polygon - -> (StatusSruct polygon, [Diagonal polygon]) -> Event polygon - -> (StatusSruct polygon, [Diagonal polygon]) + => polygon + -> (StatusSruct polygon, [Diagonal polygon]) -> Event polygon + -> (StatusSruct polygon, [Diagonal polygon]) handle :: forall polygon point r. (Polygon_ polygon point r, Point_ point 2 r, Num r, Ord r, Ord (VertexIx polygon)) => @@ -500,56 +500,56 @@ -> (StatusSruct polygon, [Diagonal polygon]) -> Event polygon -> (StatusSruct polygon, [Diagonal polygon]) -handle polygon -pg (StatusSruct polygon -status, [Diagonal polygon] -diags) (Event VertexType -et VertexIx polygon -i Vertex polygon -v VertexIx polygon -p VertexIx polygon -s) = case VertexType -et of +handle polygon +pg (StatusSruct polygon +status, [Diagonal polygon] +diags) (Event VertexType +et VertexIx polygon +i Vertex polygon +v VertexIx polygon +p VertexIx polygon +s) = case VertexType +et of VertexType Start -> (point -> Edge' polygon -> VertexIx polygon -> StatusSruct polygon -> StatusSruct polygon -insertAt point +insertAt point Vertex polygon -v ClosedLineSegment point :+ VertexIx polygon +v ClosedLineSegment point :+ VertexIx polygon Edge' polygon -nextEdge VertexIx polygon -i StatusSruct polygon -status, [Diagonal polygon] -diags) +nextEdge VertexIx polygon +i StatusSruct polygon +status, [Diagonal polygon] +diags) VertexType End -> (point -> Edge' polygon -> StatusSruct polygon -> StatusSruct polygon -deleteAt point +deleteAt point Vertex polygon -v ClosedLineSegment point :+ VertexIx polygon +v ClosedLineSegment point :+ VertexIx polygon Edge' polygon -prevEdge StatusSruct polygon -status, VertexIx polygon +prevEdge StatusSruct polygon +status, VertexIx polygon -> StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -> Maybe (Diagonal polygon) -diagFromHelper VertexIx polygon -p StatusStructure +diagFromHelper VertexIx polygon +p StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -status Maybe (Diagonal polygon) +status Maybe (Diagonal polygon) -> [Diagonal polygon] -> [Diagonal polygon] forall a. Maybe a -> [a] -> [a] <? [Diagonal polygon] -diags) +diags) VertexType Split -> ( (point @@ -557,13 +557,13 @@ -> VertexIx polygon -> StatusSruct polygon -> StatusSruct polygon -insertAt point +insertAt point Vertex polygon -v ClosedLineSegment point :+ VertexIx polygon +v ClosedLineSegment point :+ VertexIx polygon Edge' polygon -nextEdge VertexIx polygon -i StatusSruct polygon -status)StatusStructure +nextEdge VertexIx polygon +i StatusSruct polygon +status)StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) @@ -624,23 +624,23 @@ -> Map (VertexIx polygon) (VertexIx polygon) forall k a. Ord k => k -> a -> Map k a -> Map k a Map.insert VertexIx polygon -j VertexIx polygon -i +j VertexIx polygon +i , Diagonal polygon -diag Diagonal polygon -> [Diagonal polygon] -> [Diagonal polygon] +diag Diagonal polygon -> [Diagonal polygon] -> [Diagonal polygon] forall a. a -> [a] -> [a] : [Diagonal polygon] -diags) +diags) VertexType Merge -> ( (point -> Edge' polygon -> StatusSruct polygon -> StatusSruct polygon -deleteAt point +deleteAt point Vertex polygon -v ClosedLineSegment point :+ VertexIx polygon +v ClosedLineSegment point :+ VertexIx polygon Edge' polygon -prevEdge StatusSruct polygon -status)StatusStructure +prevEdge StatusSruct polygon +status)StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) @@ -701,21 +701,21 @@ -> Map (VertexIx polygon) (VertexIx polygon) forall k a. Ord k => k -> a -> Map k a -> Map k a Map.insert VertexIx polygon -j VertexIx polygon -i +j VertexIx polygon +i , VertexIx polygon -> StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -> Maybe (Diagonal polygon) -diagFromHelper VertexIx polygon -j StatusStructure +diagFromHelper VertexIx polygon +j StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -status Maybe (Diagonal polygon) +status Maybe (Diagonal polygon) -> [Diagonal polygon] -> [Diagonal polygon] forall a. Maybe a -> [a] -> [a] <? VertexIx polygon @@ -724,66 +724,66 @@ (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -> Maybe (Diagonal polygon) -diagFromHelper VertexIx polygon -p StatusStructure +diagFromHelper VertexIx polygon +p StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -status Maybe (Diagonal polygon) +status Maybe (Diagonal polygon) -> [Diagonal polygon] -> [Diagonal polygon] forall a. Maybe a -> [a] -> [a] <? [Diagonal polygon] -diags) +diags) VertexType Regular | Bool -isLeftVertex -> ( point +isLeftVertex -> ( point -> Edge' polygon -> VertexIx polygon -> StatusSruct polygon -> StatusSruct polygon -insertAt point +insertAt point Vertex polygon -v ClosedLineSegment point :+ VertexIx polygon +v ClosedLineSegment point :+ VertexIx polygon Edge' polygon -nextEdge VertexIx polygon -i (StatusSruct polygon -> StatusSruct polygon) +nextEdge VertexIx polygon +i (StatusSruct polygon -> StatusSruct polygon) -> StatusSruct polygon -> StatusSruct polygon forall a b. (a -> b) -> a -> b $ point -> Edge' polygon -> StatusSruct polygon -> StatusSruct polygon -deleteAt point +deleteAt point Vertex polygon -v ClosedLineSegment point :+ VertexIx polygon +v ClosedLineSegment point :+ VertexIx polygon Edge' polygon -prevEdge StatusSruct polygon -status +prevEdge StatusSruct polygon +status , VertexIx polygon -> StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -> Maybe (Diagonal polygon) -diagFromHelper VertexIx polygon -p StatusStructure +diagFromHelper VertexIx polygon +p StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -status Maybe (Diagonal polygon) +status Maybe (Diagonal polygon) -> [Diagonal polygon] -> [Diagonal polygon] forall a. Maybe a -> [a] -> [a] <? [Diagonal polygon] -diags ) +diags ) | Bool otherwise -> ( StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -statusStatusStructure +statusStatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) @@ -844,31 +844,31 @@ -> Map (VertexIx polygon) (VertexIx polygon) forall k a. Ord k => k -> a -> Map k a -> Map k a Map.insert VertexIx polygon -j VertexIx polygon -i, VertexIx polygon +j VertexIx polygon +i, VertexIx polygon -> StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -> Maybe (Diagonal polygon) -diagFromHelper VertexIx polygon -j StatusStructure +diagFromHelper VertexIx polygon +j StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -status Maybe (Diagonal polygon) +status Maybe (Diagonal polygon) -> [Diagonal polygon] -> [Diagonal polygon] forall a. Maybe a -> [a] -> [a] <? [Diagonal polygon] -diags) +diags) where -- edges incident to v = v_i - prevEdge :: ClosedLineSegment point :+ VertexIx polygon -prevEdge = point -> point -> ClosedLineSegment point + prevEdge :: ClosedLineSegment point :+ VertexIx polygon +prevEdge = point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment (polygon -pgpolygon -> Getting (Endo point) polygon point -> point +pgpolygon -> Getting (Endo point) polygon point -> point forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!VertexIx polygon -> IndexedTraversal' (VertexIx polygon) polygon (Vertex polygon) @@ -877,20 +877,20 @@ VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx polygon -p) point +p) point Vertex polygon -v ClosedLineSegment point +v ClosedLineSegment point -> VertexIx polygon -> ClosedLineSegment point :+ VertexIx polygon forall core extra. core -> extra -> core :+ extra :+ VertexIx polygon -p - nextEdge :: ClosedLineSegment point :+ VertexIx polygon -nextEdge = point -> point -> ClosedLineSegment point +p + nextEdge :: ClosedLineSegment point :+ VertexIx polygon +nextEdge = point -> point -> ClosedLineSegment point forall point. point -> point -> ClosedLineSegment point ClosedLineSegment point Vertex polygon -v (polygon -pgpolygon -> Getting (Endo point) polygon point -> point +v (polygon +pgpolygon -> Getting (Endo point) polygon point -> point forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!VertexIx polygon -> IndexedTraversal' (VertexIx polygon) polygon (Vertex polygon) @@ -899,24 +899,24 @@ VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx polygon -s) ClosedLineSegment point +s) ClosedLineSegment point -> VertexIx polygon -> ClosedLineSegment point :+ VertexIx polygon forall core extra. core -> extra -> core :+ extra :+ VertexIx polygon -i +i -- j is the EdgeId of the edge directly left of v (j may not exist when v is a start, -- end, or left-regular vertex; we use it only when we know it exists.) - j :: VertexIx polygon -j = case point -> StatusSruct polygon -> Maybe (Edge' polygon) -lookupLT point + j :: VertexIx polygon +j = case point -> StatusSruct polygon -> Maybe (Edge' polygon) +lookupLT point Vertex polygon -v StatusSruct polygon -status of - Just (ClosedLineSegment (Vertex polygon) -_leftEdge :+ VertexIx polygon -j') -> VertexIx polygon -j' +v StatusSruct polygon +status of + Just (ClosedLineSegment (Vertex polygon) +_leftEdge :+ VertexIx polygon +j') -> VertexIx polygon +j' Maybe (Edge' polygon) _ -> [Char] -> VertexIx polygon forall a. HasCallStack => [Char] -> a @@ -925,8 +925,8 @@ $ [Char] "MakeMonotone.handleSplit: absurd. no j" -- the diagonal between the current vertex v and the helper - diag :: Diagonal polygon -diag = case VertexIx polygon + diag :: Diagonal polygon +diag = case VertexIx polygon -> StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) @@ -936,18 +936,18 @@ Ord edgeId => edgeId -> StatusStructure edgeId edge vtx -> Maybe vtx helper VertexIx polygon -j StatusStructure +j StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -status of - Just VertexIx polygon -h -> VertexIx polygon -> VertexIx polygon -> Diagonal polygon +status of + Just VertexIx polygon +h -> VertexIx polygon -> VertexIx polygon -> Diagonal polygon forall r. r -> r -> Vector 2 r Vector2 VertexIx polygon -i VertexIx polygon -h +i VertexIx polygon +h Maybe (VertexIx polygon) _ -> [Char] -> Diagonal polygon forall a. HasCallStack => [Char] -> a @@ -956,18 +956,18 @@ -- figure out what the helper of edgeIx is, and if its a merge vertex connect it to -- the current vertex v - diagFromHelper :: VertexIx polygon + diagFromHelper :: VertexIx polygon -> StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -> Maybe (Diagonal polygon) -diagFromHelper VertexIx polygon -edgeIx StatusStructure +diagFromHelper VertexIx polygon +edgeIx StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -status' = case VertexIx polygon +status' = case VertexIx polygon -> StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) @@ -977,15 +977,15 @@ Ord edgeId => edgeId -> StatusStructure edgeId edge vtx -> Maybe vtx helper VertexIx polygon -edgeIx StatusStructure +edgeIx StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) -status' of - Just VertexIx polygon -h | VertexIx polygon -> Bool -isMerge VertexIx polygon -h -> Diagonal polygon -> Maybe (Diagonal polygon) +status' of + Just VertexIx polygon +h | VertexIx polygon -> Bool +isMerge VertexIx polygon +h -> Diagonal polygon -> Maybe (Diagonal polygon) forall a. a -> Maybe a Just (Diagonal polygon -> Maybe (Diagonal polygon)) -> Diagonal polygon -> Maybe (Diagonal polygon) @@ -993,23 +993,23 @@ $ VertexIx polygon -> VertexIx polygon -> Diagonal polygon forall r. r -> r -> Vector 2 r Vector2 VertexIx polygon -i VertexIx polygon -h +i VertexIx polygon +h Maybe (VertexIx polygon) _ -> Maybe (Diagonal polygon) forall a. Maybe a Nothing where - isMerge :: VertexIx polygon -> Bool -isMerge VertexIx polygon -h = polygon -> VertexIx polygon -> point -> VertexType + isMerge :: VertexIx polygon -> Bool +isMerge VertexIx polygon +h = polygon -> VertexIx polygon -> point -> VertexType forall polygon point r. (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> VertexIx polygon -> point -> VertexType classify polygon -pg VertexIx polygon -h (polygon -pgpolygon -> Getting (Endo point) polygon point -> point +pg VertexIx polygon +h (polygon +pgpolygon -> Getting (Endo point) polygon point -> point forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!VertexIx polygon -> IndexedTraversal' (VertexIx polygon) polygon (Vertex polygon) @@ -1018,15 +1018,15 @@ VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx polygon -h) VertexType -> VertexType -> Bool +h) VertexType -> VertexType -> Bool forall a. Eq a => a -> a -> Bool == VertexType Merge -- | returns True if v the interior of the polygon is to the right of v - isLeftVertex :: Bool -isLeftVertex = case (polygon -pgpolygon -> Getting (Endo point) polygon point -> point + isLeftVertex :: Bool +isLeftVertex = case (polygon +pgpolygon -> Getting (Endo point) polygon point -> point forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!VertexIx polygon -> IndexedTraversal' (VertexIx polygon) polygon (Vertex polygon) @@ -1035,13 +1035,13 @@ VertexIx graph -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt VertexIx polygon -p) point -> point -> Ordering +p) point -> point -> Ordering forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering `cmpSweep` point Vertex polygon -v of +v of Ordering GT -> Bool True @@ -1051,25 +1051,25 @@ -- given a vertex that determines the time, and an edge and its helper, insert it -- into the status structure - insertAt :: point - -> Edge' polygon - -> VertexIx polygon -- ^ the helper of the edge - -> StatusSruct polygon -> StatusSruct polygon - insertAt :: point + insertAt :: point + -> Edge' polygon + -> VertexIx polygon -- ^ the helper of the edge + -> StatusSruct polygon -> StatusSruct polygon + insertAt :: point -> Edge' polygon -> VertexIx polygon -> StatusSruct polygon -> StatusSruct polygon -insertAt point -u Edge' polygon -seg VertexIx polygon -h StatusSruct polygon -status' = StatusStructure +insertAt point +u Edge' polygon +seg VertexIx polygon +h StatusSruct polygon +status' = StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -status'StatusStructure +status'StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) @@ -1147,7 +1147,7 @@ -> Ordering forall a b. (a -> b) -> a -> b $ point -upoint -> Getting r point r -> r +upoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -1156,7 +1156,7 @@ IndexedLens' Int point r yCoord) ClosedLineSegment point :+ VertexIx polygon Edge' polygon -seg +seg StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) @@ -1219,7 +1219,7 @@ forall k a. Ord k => k -> a -> Map k a -> Map k a Map.insert (ClosedLineSegment point :+ VertexIx polygon Edge' polygon -seg(ClosedLineSegment point :+ VertexIx polygon) +seg(ClosedLineSegment point :+ VertexIx polygon) -> Getting (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) @@ -1234,16 +1234,16 @@ Functor f => (extra -> f extra') -> (core :+ extra) -> f (core :+ extra') extra) VertexIx polygon -h +h -- given a vertex that determines the dtime, and an edge. Delete the edge from the status -- structure. - deleteAt :: point -> Edge' polygon -> StatusSruct polygon -> StatusSruct polygon - deleteAt :: point + deleteAt :: point -> Edge' polygon -> StatusSruct polygon -> StatusSruct polygon + deleteAt :: point -> Edge' polygon -> StatusSruct polygon -> StatusSruct polygon -deleteAt point -u Edge' polygon -seg = ASetter +deleteAt point +u Edge' polygon +seg = ASetter (StatusSruct polygon) (StatusSruct polygon) (Set (ClosedLineSegment point :+ VertexIx polygon)) @@ -1305,7 +1305,7 @@ -> Ordering forall a b. (a -> b) -> a -> b $ point -upoint -> Getting r point r -> r +upoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -1314,15 +1314,15 @@ IndexedLens' Int point r yCoord) ClosedLineSegment point :+ VertexIx polygon Edge' polygon -seg +seg -- Look up the edge directly to the left of the query point q. - lookupLT :: point -> StatusSruct polygon -> Maybe (Edge' polygon) - lookupLT :: point -> StatusSruct polygon -> Maybe (Edge' polygon) -lookupLT point -q StatusSruct polygon -s' = let (Set (ClosedLineSegment point :+ VertexIx polygon) -l,Set (ClosedLineSegment point :+ VertexIx polygon) + lookupLT :: point -> StatusSruct polygon -> Maybe (Edge' polygon) + lookupLT :: point -> StatusSruct polygon -> Maybe (Edge' polygon) +lookupLT point +q StatusSruct polygon +s' = let (Set (ClosedLineSegment point :+ VertexIx polygon) +l,Set (ClosedLineSegment point :+ VertexIx polygon) _,Set (ClosedLineSegment point :+ VertexIx polygon) _) = ((ClosedLineSegment point :+ VertexIx polygon) -> Ordering) -> Set (ClosedLineSegment point :+ VertexIx polygon) @@ -1336,12 +1336,12 @@ Point_ point' 2 r, Ord r, Num r) => point -> lineSegment -> Ordering cmpX point -q) (StatusStructure +q) (StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) StatusSruct polygon -s'StatusStructure +s'StatusStructure (VertexIx polygon) (ClosedLineSegment point :+ VertexIx polygon) (VertexIx polygon) @@ -1371,28 +1371,28 @@ -> Maybe (ClosedLineSegment point :+ VertexIx polygon) forall a. Set a -> Maybe a Set.lookupMax Set (ClosedLineSegment point :+ VertexIx polygon) -l +l -- | compare the point and the segment horizontally. I.e. returs LT if the segment lies -- left of the point, EQ if the point is on the segment, and GT if the segment lies right -- of the point. -cmpX :: ( Point_ point 2 r, LineSegment_ lineSegment point' - , Point_ point' 2 r, Ord r, Num r - ) => point -> lineSegment -> Ordering +cmpX :: ( Point_ point 2 r, LineSegment_ lineSegment point' + , Point_ point' 2 r, Ord r, Num r + ) => point -> lineSegment -> Ordering cmpX :: forall point r lineSegment point'. (Point_ point 2 r, LineSegment_ lineSegment point', Point_ point' 2 r, Ord r, Num r) => point -> lineSegment -> Ordering -cmpX point -q (lineSegment -> lineSegment +cmpX point +q (lineSegment -> lineSegment forall lineSegment point (d :: Nat) r. (LineSegment_ lineSegment point, Point_ point d r, 1 <= d, Ord r) => lineSegment -> lineSegment -orientLR -> lineSegment -seg) +orientLR -> lineSegment +seg) | lineSegment -seglineSegment -> Getting r lineSegment r -> r +seglineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point' -> Const r point') -> lineSegment -> Const r lineSegment forall seg p. HasStart seg p => Lens' seg p @@ -1409,7 +1409,7 @@ yCoord r -> r -> Bool forall a. Ord a => a -> a -> Bool <= lineSegment -seglineSegment -> Getting r lineSegment r -> r +seglineSegment -> Getting r lineSegment r -> r forall s a. s -> Getting a s a -> a ^.(point' -> Const r point') -> lineSegment -> Const r lineSegment forall seg p. HasEnd seg p => Lens' seg p @@ -1424,25 +1424,25 @@ IndexedLens' Int point r IndexedLens' Int point' r yCoord = Ordering -> Ordering -> Ordering -f Ordering +f Ordering GT Ordering LT | Bool otherwise = Ordering -> Ordering -> Ordering -f Ordering +f Ordering LT Ordering GT where - f :: Ordering -> Ordering -> Ordering -f Ordering -lt Ordering -gt = case Point 2 r -> Point 2 r -> Point 2 r -> CCW + f :: Ordering -> Ordering -> Ordering +f Ordering +lt Ordering +gt = case Point 2 r -> Point 2 r -> Point 2 r -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw (lineSegment -seglineSegment +seglineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point' -> Const (Point 2 r) point') @@ -1462,7 +1462,7 @@ Lens' point (Point d r) Lens' point' (Point 2 r) asPoint) (point -qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r +qpoint -> Getting (Point 2 r) point (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.Getting (Point 2 r) point (Point 2 r) forall point (d :: Nat) r. @@ -1470,7 +1470,7 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint) (lineSegment -seglineSegment +seglineSegment -> Getting (Point 2 r) lineSegment (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point' -> Const (Point 2 r) point') @@ -1492,32 +1492,32 @@ asPoint) of CCW CW -> Ordering -lt +lt CCW CoLinear -> Ordering EQ CCW CCW -> Ordering -gt +gt -------------------------------------------------------------------------------- -- * An Event; essentially just a vertex. -- | Events during the sweepline algorithm ; the vertices -type Event polygon = Event' (VertexIx polygon) (Vertex polygon) -data Event' idx point = +type Event polygon = Event' (VertexIx polygon) (Vertex polygon) +data Event' idx point = Event { forall idx point. Event' idx point -> VertexType _eventType :: {-# UNPACK #-}!VertexType , forall idx point. Event' idx point -> idx -_vtxId :: !idx +_vtxId :: !idx , forall idx point. Event' idx point -> point -eventPoint :: !point +eventPoint :: !point , forall idx point. Event' idx point -> idx -_predecessorVtx :: !idx +_predecessorVtx :: !idx , forall idx point. Event' idx point -> idx -_successorVtx :: !idx - } deriving (Int -> Event' idx point -> ShowS +_successorVtx :: !idx + } deriving (Int -> Event' idx point -> ShowS [Event' idx point] -> ShowS Event' idx point -> [Char] (Int -> Event' idx point -> ShowS) @@ -1547,7 +1547,7 @@ (Show point, Show idx) => [Event' idx point] -> ShowS showList :: [Event' idx point] -> ShowS -Show,Event' idx point -> Event' idx point -> Bool +Show,Event' idx point -> Event' idx point -> Bool (Event' idx point -> Event' idx point -> Bool) -> (Event' idx point -> Event' idx point -> Bool) -> Eq (Event' idx point) @@ -1566,47 +1566,47 @@ Eq) -- | how to compare events -compareEvent :: (Point_ point 2 r, Ord r) => Event' i point -> Event' i point -> Ordering +compareEvent :: (Point_ point 2 r, Ord r) => Event' i point -> Event' i point -> Ordering compareEvent :: forall point r i. (Point_ point 2 r, Ord r) => Event' i point -> Event' i point -> Ordering -compareEvent Event' i point -p Event' i point -q = Event' i point -> point +compareEvent Event' i point +p Event' i point +q = Event' i point -> point forall idx point. Event' idx point -> point eventPoint Event' i point -q point -> point -> Ordering +q point -> point -> Ordering forall point r. (Point_ point 2 r, Ord r) => point -> point -> Ordering `cmpSweep` Event' i point -> point forall idx point. Event' idx point -> point eventPoint Event' i point -p +p -- note that the order of p and q has switched. -------------------------------------------------------------------------------- -- * The Status Structure -- | edges are identified using their first vertex -type Edge' polygon = ClosedLineSegment (Vertex polygon) :+ VertexIx polygon +type Edge' polygon = ClosedLineSegment (Vertex polygon) :+ VertexIx polygon -- | The status structure during the sweep -type StatusSruct polygon = StatusStructure (VertexIx polygon) - (Edge' polygon) - (VertexIx polygon) +type StatusSruct polygon = StatusStructure (VertexIx polygon) + (Edge' polygon) + (VertexIx polygon) -- | The status structure consists of a BST of edges intersected by the sweep line (in -- left to right order), and, for each edge currently intersected by the sweep line its -- helper vertex. -data StatusStructure edgeId edge vtx = +data StatusStructure edgeId edge vtx = StatusStructure { forall edgeId edge vtx. StatusStructure edgeId edge vtx -> Set edge -_tree :: Set.Set edge -- ^ the BST with edges ordered along sweep +_tree :: Set.Set edge -- ^ the BST with edges ordered along sweep , forall edgeId edge vtx. StatusStructure edgeId edge vtx -> Map edgeId vtx -_helpers :: Map.Map edgeId vtx -- ^ for each edge its helper - } deriving (Int -> StatusStructure edgeId edge vtx -> ShowS +_helpers :: Map.Map edgeId vtx -- ^ for each edge its helper + } deriving (Int -> StatusStructure edgeId edge vtx -> ShowS [StatusStructure edgeId edge vtx] -> ShowS StatusStructure edgeId edge vtx -> [Char] (Int -> StatusStructure edgeId edge vtx -> ShowS) @@ -1636,7 +1636,7 @@ (Show edge, Show edgeId, Show vtx) => [StatusStructure edgeId edge vtx] -> ShowS showList :: [StatusStructure edgeId edge vtx] -> ShowS -Show,StatusStructure edgeId edge vtx +Show,StatusStructure edgeId edge vtx -> StatusStructure edgeId edge vtx -> Bool (StatusStructure edgeId edge vtx -> StatusStructure edgeId edge vtx -> Bool) @@ -1662,7 +1662,7 @@ -> StatusStructure edgeId edge vtx -> Bool Eq) -tree :: Lens' (StatusStructure edgeId edge vtx) (Set.Set edge) +tree :: Lens' (StatusStructure edgeId edge vtx) (Set.Set edge) tree :: forall edgeId edge vtx (f :: * -> *). Functor f => (Set edge -> f (Set edge)) @@ -1679,12 +1679,12 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens StatusStructure edgeId edge vtx -> Set edge forall edgeId edge vtx. StatusStructure edgeId edge vtx -> Set edge -_tree (\StatusStructure edgeId edge vtx -ss Set edge -t -> StatusStructure edgeId edge vtx -ss { _tree = t }) +_tree (\StatusStructure edgeId edge vtx +ss Set edge +t -> StatusStructure edgeId edge vtx +ss { _tree = t }) -helpers :: Lens' (StatusStructure edgeId edge vtx) (Map.Map edgeId vtx) +helpers :: Lens' (StatusStructure edgeId edge vtx) (Map.Map edgeId vtx) helpers :: forall edgeId edge vtx (f :: * -> *). Functor f => (Map edgeId vtx -> f (Map edgeId vtx)) @@ -1702,20 +1702,20 @@ lens StatusStructure edgeId edge vtx -> Map edgeId vtx forall edgeId edge vtx. StatusStructure edgeId edge vtx -> Map edgeId vtx -_helpers (\StatusStructure edgeId edge vtx -ss Map edgeId vtx -h -> StatusStructure edgeId edge vtx -ss { _helpers = h }) +_helpers (\StatusStructure edgeId edge vtx +ss Map edgeId vtx +h -> StatusStructure edgeId edge vtx +ss { _helpers = h }) -- | Get the helper of the given edge -helper :: Ord edgeId => edgeId -> StatusStructure edgeId edge vtx -> Maybe vtx +helper :: Ord edgeId => edgeId -> StatusStructure edgeId edge vtx -> Maybe vtx helper :: forall edgeId edge vtx. Ord edgeId => edgeId -> StatusStructure edgeId edge vtx -> Maybe vtx -helper edgeId -i StatusStructure edgeId edge vtx -status = StatusStructure edgeId edge vtx -statusStatusStructure edgeId edge vtx +helper edgeId +i StatusStructure edgeId edge vtx +status = StatusStructure edgeId edge vtx +statusStatusStructure edgeId edge vtx -> Getting (Maybe vtx) (StatusStructure edgeId edge vtx) (Maybe vtx) -> Maybe vtx @@ -1741,12 +1741,12 @@ forall m. At m => Index m -> Lens' m (Maybe (IxValue m)) at edgeId Index (Map edgeId vtx) -i +i -------------------------------------------------------------------------------- -- | The various vertex types -data VertexType = Start | Merge | Split | End | Regular deriving (Int -> VertexType -> ShowS +data VertexType = Start | Merge | Split | End | Regular deriving (Int -> VertexType -> ShowS [VertexType] -> ShowS VertexType -> [Char] (Int -> VertexType -> ShowS) @@ -1761,7 +1761,7 @@ show :: VertexType -> [Char] $cshowList :: [VertexType] -> ShowS showList :: [VertexType] -> ShowS -Show,ReadPrec [VertexType] +Show,ReadPrec [VertexType] ReadPrec VertexType Int -> ReadS VertexType ReadS [VertexType] @@ -1781,7 +1781,7 @@ readPrec :: ReadPrec VertexType $creadListPrec :: ReadPrec [VertexType] readListPrec :: ReadPrec [VertexType] -Read,VertexType -> VertexType -> Bool +Read,VertexType -> VertexType -> Bool (VertexType -> VertexType -> Bool) -> (VertexType -> VertexType -> Bool) -> Eq VertexType forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -1792,27 +1792,27 @@ Eq) -- | Classify all vertices of the polygon; i.e. compute their vertex types. -classifyVertices :: ( Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) - => polygon -> [(VertexIx polygon, VertexType)] +classifyVertices :: ( Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) + => polygon -> [(VertexIx polygon, VertexType)] classifyVertices :: forall polygon point r. (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> [(VertexIx polygon, VertexType)] -classifyVertices polygon -pg = (\(VertexIx polygon -i,point -v) -> (VertexIx polygon -i, polygon -> VertexIx polygon -> point -> VertexType +classifyVertices polygon +pg = (\(VertexIx polygon +i,point +v) -> (VertexIx polygon +i, polygon -> VertexIx polygon -> point -> VertexType forall polygon point r. (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => polygon -> VertexIx polygon -> point -> VertexType classify polygon -pg VertexIx polygon -i point -v)) ((VertexIx polygon, point) -> (VertexIx polygon, VertexType)) +pg VertexIx polygon +i point +v)) ((VertexIx polygon, point) -> (VertexIx polygon, VertexType)) -> [(VertexIx polygon, point)] -> [(VertexIx polygon, VertexType)] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> polygon -pgpolygon +pgpolygon -> IndexedGetting (VertexIx polygon) (Endo [(VertexIx polygon, point)]) polygon point -> [(VertexIx polygon, point)] @@ -1841,17 +1841,17 @@ infixr 5 <? -- | Cons the item onto the list (if the item actually exists) -(<?) :: Maybe a -> [a] -> [a] +(<?) :: Maybe a -> [a] -> [a] Maybe a Nothing <? :: forall a. Maybe a -> [a] -> [a] -<? [a] -xs = [a] -xs -(Just a -x) <? [a] -xs = a -xa -> [a] -> [a] +<? [a] +xs = [a] +xs +(Just a +x) <? [a] +xs = a +xa -> [a] -> [a] forall a. a -> [a] -> [a] :[a] -xs +xs \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.TriangulateMonotone.html b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.TriangulateMonotone.html index b51b1d118..90138ccc9 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.TriangulateMonotone.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.TriangulateMonotone.html @@ -46,7 +46,7 @@ -- no more than twice. type YMonotonePolygon_ = SimplePolygon_ -data LR = L | R deriving (Int -> LR -> ShowS +data LR = L | R deriving (Int -> LR -> ShowS [LR] -> ShowS LR -> String (Int -> LR -> ShowS) @@ -59,7 +59,7 @@ show :: LR -> String $cshowList :: [LR] -> ShowS showList :: [LR] -> ShowS -Show,LR -> LR -> Bool +Show,LR -> LR -> Bool (LR -> LR -> Bool) -> (LR -> LR -> Bool) -> Eq LR forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: LR -> LR -> Bool @@ -71,17 +71,17 @@ -- | Triangulates a polygon of \(n\) vertices -- -- running time: \(O(n \log n)\) -triangulate :: forall s yMonotonePolygon point r. - (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r +triangulate :: forall s yMonotonePolygon point r. + (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r ) - => yMonotonePolygon - -> PlaneGraph s point PolygonEdgeType PolygonFaceData + => yMonotonePolygon + -> PlaneGraph s point PolygonEdgeType PolygonFaceData triangulate :: forall {k} (s :: k) yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData -triangulate yMonotonePolygon -pg = yMonotonePolygon +triangulate yMonotonePolygon +pg = yMonotonePolygon -> [Diagonal yMonotonePolygon] -> PlaneGraph s point PolygonEdgeType PolygonFaceData forall {k} (s :: k) polygon point r (f :: * -> *). @@ -91,12 +91,12 @@ -> f (Diagonal polygon) -> PlaneGraph s point PolygonEdgeType PolygonFaceData constructGraph yMonotonePolygon -pg (yMonotonePolygon -> [Diagonal yMonotonePolygon] +pg (yMonotonePolygon -> [Diagonal yMonotonePolygon] forall yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> [Diagonal yMonotonePolygon] computeDiagonals yMonotonePolygon -pg) +pg) -- TODO: Find a way to construct the graph in O(n) time. -- | Given a y-monotone polygon in counter clockwise order computes the diagonals @@ -105,22 +105,22 @@ -- pre: the input polygon is y-monotone and has \(n \geq 3\) vertices -- -- running time: \(O(n)\) -computeDiagonals :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) - => yMonotonePolygon -> [Diagonal yMonotonePolygon] +computeDiagonals :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) + => yMonotonePolygon -> [Diagonal yMonotonePolygon] computeDiagonals :: forall yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r, Num r) => yMonotonePolygon -> [Diagonal yMonotonePolygon] -computeDiagonals yMonotonePolygon -pg = case [point :+ (Int, LR)] +computeDiagonals yMonotonePolygon +pg = case [point :+ (Int, LR)] -> Maybe ([point :+ (Int, LR)], point :+ (Int, LR)) forall s a. Snoc s s a a => s -> Maybe (s, a) unsnoc [point :+ (Int, LR)] -vs of - Just (point :+ (Int, LR) -u:point :+ (Int, LR) -v:[point :+ (Int, LR)] -vs',point :+ (Int, LR) -w) -> (point :+ (Int, LR)) +vs of + Just (point :+ (Int, LR) +u:point :+ (Int, LR) +v:[point :+ (Int, LR)] +vs',point :+ (Int, LR) +w) -> (point :+ (Int, LR)) -> (point :+ (Int, LR)) -> [point :+ (Int, LR)] -> (point :+ (Int, LR)) @@ -133,11 +133,11 @@ -> t (P i point (NumType point)) -> P i point (NumType point) -> [Vector 2 i] -go point :+ (Int, LR) -u point :+ (Int, LR) -v [point :+ (Int, LR)] -vs' point :+ (Int, LR) -w +go point :+ (Int, LR) +u point :+ (Int, LR) +v [point :+ (Int, LR)] +vs' point :+ (Int, LR) +w Maybe ([point :+ (Int, LR)], point :+ (Int, LR)) _ -> String -> [Vector 2 Int] forall a. HasCallStack => String -> a @@ -146,8 +146,8 @@ where -- split the polygon into two chains of vertices (with the vertices in decreasing order) -- tag them with left and right, and merge the resulting list into one big decreasing list - vs :: [point :+ (Int, LR)] -vs = ([point :+ (Int, LR)] + vs :: [point :+ (Int, LR)] +vs = ([point :+ (Int, LR)] -> [point :+ (Int, LR)] -> [point :+ (Int, LR)]) -> ([point :+ (Int, LR)], [point :+ (Int, LR)]) -> [point :+ (Int, LR)] @@ -169,14 +169,14 @@ $ ((point :+ (Int, LR)) -> (Down (NumType point), NumType point)) -> (point :+ (Int, LR)) -> (point :+ (Int, LR)) -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering -comparing (\((Point2_ NumType point -x NumType point -y) :+ (Int, LR) +comparing (\((Point2_ NumType point +x NumType point +y) :+ (Int, LR) _) -> (NumType point -> Down (NumType point) forall a. a -> Down a Down NumType point -y, NumType point -x))) +y, NumType point +x))) (([point :+ (Int, LR)], [point :+ (Int, LR)]) -> [point :+ (Int, LR)]) -> ([point :+ (Int, LR)], [point :+ (Int, LR)]) @@ -191,28 +191,28 @@ -> ([point :+ (VertexIx yMonotonePolygon, LR)], [point :+ (VertexIx yMonotonePolygon, LR)]) splitPolygon yMonotonePolygon -pg +pg -- run the stack computation that actually triangulates the polygon. - go :: P i point (NumType point) + go :: P i point (NumType point) -> P i point (NumType point) -> t (P i point (NumType point)) -> P i point (NumType point) -> [Vector 2 i] -go P i point (NumType point) -u P i point (NumType point) -v t (P i point (NumType point)) -vs' P i point (NumType point) -w = [Vector 2 i] -diags'' [Vector 2 i] -> [Vector 2 i] -> [Vector 2 i] +go P i point (NumType point) +u P i point (NumType point) +v t (P i point (NumType point)) +vs' P i point (NumType point) +w = [Vector 2 i] +diags'' [Vector 2 i] -> [Vector 2 i] -> [Vector 2 i] forall a. Semigroup a => a -> a -> a <> [Vector 2 i] -diags' +diags' where SP (P i point (NumType point) -_:|[P i point (NumType point)] -stack') [Vector 2 i] -diags' = (SP (Stack (P i point (NumType point))) [Vector 2 i] +_:|[P i point (NumType point)] +stack') [Vector 2 i] +diags' = (SP (Stack (P i point (NumType point))) [Vector 2 i] -> P i point (NumType point) -> SP (Stack (P i point (NumType point))) [Vector 2 i]) -> SP (Stack (P i point (NumType point))) [Vector 2 i] @@ -222,13 +222,13 @@ forall (t :: * -> *) b a. Foldable t => (b -> a -> b) -> b -> t a -> b -List.foldl' (\(SP Stack (P i point (NumType point)) -stack [Vector 2 i] -acc) P i point (NumType point) -v' -> ([Vector 2 i] -> [Vector 2 i] -> [Vector 2 i] +List.foldl' (\(SP Stack (P i point (NumType point)) +stack [Vector 2 i] +acc) P i point (NumType point) +v' -> ([Vector 2 i] -> [Vector 2 i] -> [Vector 2 i] forall a. Semigroup a => a -> a -> a <> [Vector 2 i] -acc) ([Vector 2 i] -> [Vector 2 i]) +acc) ([Vector 2 i] -> [Vector 2 i]) -> SP (Stack (P i point (NumType point))) [Vector 2 i] -> SP (Stack (P i point (NumType point))) [Vector 2 i] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -240,22 +240,22 @@ P i point r -> Stack (P i point r) -> SP (Stack (P i point r)) [Vector 2 i] process P i point (NumType point) -v' Stack (P i point (NumType point)) -stack) +v' Stack (P i point (NumType point)) +stack) (Stack (P i point (NumType point)) -> [Vector 2 i] -> SP (Stack (P i point (NumType point))) [Vector 2 i] forall a b. a -> b -> SP a b SP (P i point (NumType point) -v P i point (NumType point) +v P i point (NumType point) -> [P i point (NumType point)] -> Stack (P i point (NumType point)) forall a. a -> [a] -> NonEmpty a :| [P i point (NumType point) -u]) []) t (P i point (NumType point)) -vs' +u]) []) t (P i point (NumType point)) +vs' -- add vertices from the last guy w to all 'middle' guys of the final stack - diags'' :: [Vector 2 i] -diags'' = (P i point (NumType point) -> Vector 2 i) + diags'' :: [Vector 2 i] +diags'' = (P i point (NumType point) -> Vector 2 i) -> [P i point (NumType point)] -> [Vector 2 i] forall a b. (a -> b) -> [a] -> [b] map (P i point (NumType point) @@ -263,18 +263,18 @@ forall {k} i point (r :: k). P i point r -> P i point r -> Vector 2 i seg P i point (NumType point) -w) ([P i point (NumType point)] -> [Vector 2 i]) +w) ([P i point (NumType point)] -> [Vector 2 i]) -> [P i point (NumType point)] -> [Vector 2 i] forall a b. (a -> b) -> a -> b $ [P i point (NumType point)] -> [P i point (NumType point)] forall a. HasCallStack => [a] -> [a] init [P i point (NumType point)] -stack' +stack' -type P i point r = point :+ (i,LR) +type P i point r = point :+ (i,LR) -- | Get the chain of a particular point -chainOf :: P i point r -> LR +chainOf :: P i point r -> LR chainOf :: forall {k} i point (r :: k). P i point r -> LR chainOf = Getting LR (point :+ (i, LR)) LR -> (point :+ (i, LR)) -> LR forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a @@ -294,21 +294,21 @@ _2) -- | Produce a diagional -seg :: P i point r -> P i point r -> Vector 2 i +seg :: P i point r -> P i point r -> Vector 2 i seg :: forall {k} i point (r :: k). P i point r -> P i point r -> Vector 2 i -seg P i point r -u P i point r -v = i -> i -> Vector 2 i +seg P i point r +u P i point r +v = i -> i -> Vector 2 i forall r. r -> r -> Vector 2 r Vector2 (P i point r -> i -toVtx P i point r -u) (P i point r -> i -toVtx P i point r -v) +toVtx P i point r +u) (P i point r -> i +toVtx P i point r +v) where - toVtx :: P i point r -> i -toVtx = Getting i (P i point r) i -> P i point r -> i + toVtx :: P i point r -> i +toVtx = Getting i (P i point r) i -> P i point r -> i forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view (((i, LR) -> Const i (i, LR)) -> P i point r -> Const i (P i point r) @@ -325,44 +325,44 @@ Lens (i, LR) (i, LR) i i _1) -type Stack a = NonEmpty a +type Stack a = NonEmpty a -- | The real triangulation procedure -process :: (Point_ point 2 r, Ord r, Num r) - => P i point r - -> Stack (P i point r) - -> SP (Stack (P i point r)) [Vector 2 i] +process :: (Point_ point 2 r, Ord r, Num r) + => P i point r + -> Stack (P i point r) + -> SP (Stack (P i point r)) [Vector 2 i] process :: forall point r i. (Point_ point 2 r, Ord r, Num r) => P i point r -> Stack (P i point r) -> SP (Stack (P i point r)) [Vector 2 i] -process P i point r -v stack :: Stack (P i point r) -stack@(P i point r -u:|[P i point r] -ws) +process P i point r +v stack :: Stack (P i point r) +stack@(P i point r +u:|[P i point r] +ws) | P i point r -> LR forall {k} i point (r :: k). P i point r -> LR chainOf P i point r -v LR -> LR -> Bool +v LR -> LR -> Bool forall a. Eq a => a -> a -> Bool /= P i point r -> LR forall {k} i point (r :: k). P i point r -> LR chainOf P i point r -u = Stack (P i point r) +u = Stack (P i point r) -> [Vector 2 i] -> SP (Stack (P i point r)) [Vector 2 i] forall a b. a -> b -> SP a b SP (P i point r -vP i point r -> [P i point r] -> Stack (P i point r) +vP i point r -> [P i point r] -> Stack (P i point r) forall a. a -> [a] -> NonEmpty a :|[P i point r -u]) ((P i point r -> Vector 2 i) -> [P i point r] -> [Vector 2 i] +u]) ((P i point r -> Vector 2 i) -> [P i point r] -> [Vector 2 i] forall a b. (a -> b) -> [a] -> [b] map (P i point r -> P i point r -> Vector 2 i forall {k} i point (r :: k). P i point r -> P i point r -> Vector 2 i seg P i point r -v) ([P i point r] -> [Vector 2 i]) +v) ([P i point r] -> [Vector 2 i]) -> (Stack (P i point r) -> [P i point r]) -> Stack (P i point r) -> [Vector 2 i] @@ -373,30 +373,30 @@ -> Stack (P i point r) -> [Vector 2 i] forall a b. (a -> b) -> a -> b $ Stack (P i point r) -stack) +stack) | Bool otherwise = Stack (P i point r) -> [Vector 2 i] -> SP (Stack (P i point r)) [Vector 2 i] forall a b. a -> b -> SP a b SP (P i point r -vP i point r -> [P i point r] -> Stack (P i point r) +vP i point r -> [P i point r] -> Stack (P i point r) forall a. a -> [a] -> NonEmpty a :|P i point r -wP i point r -> [P i point r] -> [P i point r] +wP i point r -> [P i point r] -> [P i point r] forall a. a -> [a] -> [a] :[P i point r] -rest) ((P i point r -> Vector 2 i) -> [P i point r] -> [Vector 2 i] +rest) ((P i point r -> Vector 2 i) -> [P i point r] -> [Vector 2 i] forall a b. (a -> b) -> [a] -> [b] map (P i point r -> P i point r -> Vector 2 i forall {k} i point (r :: k). P i point r -> P i point r -> Vector 2 i seg P i point r -v) [P i point r] -popped) +v) [P i point r] +popped) where - ([P i point r] -popped,[P i point r] -rest) = ASetter + ([P i point r] +popped,[P i point r] +rest) = ASetter ([(P i point r, P i point r)], [(P i point r, P i point r)]) ([P i point r], [P i point r]) [(P i point r, P i point r)] @@ -439,60 +439,60 @@ (Point_ point 2 r, Ord r, Num r) => P i point r -> (P i point r, P i point r) -> Bool isInside P i point r -v) +v) ([(P i point r, P i point r)] -> ([P i point r], [P i point r])) -> [(P i point r, P i point r)] -> ([P i point r], [P i point r]) forall a b. (a -> b) -> a -> b $ [P i point r] -> [P i point r] -> [(P i point r, P i point r)] forall a b. [a] -> [b] -> [(a, b)] zip [P i point r] -ws (Stack (P i point r) -> [P i point r] +ws (Stack (P i point r) -> [P i point r] forall a. NonEmpty a -> [a] NonEmpty.toList Stack (P i point r) -stack) - w :: P i point r -w = Stack (P i point r) -> P i point r +stack) + w :: P i point r +w = Stack (P i point r) -> P i point r forall a. NonEmpty a -> a NonEmpty.last (Stack (P i point r) -> P i point r) -> Stack (P i point r) -> P i point r forall a b. (a -> b) -> a -> b $ P i point r -uP i point r -> [P i point r] -> Stack (P i point r) +uP i point r -> [P i point r] -> Stack (P i point r) forall a. a -> [a] -> NonEmpty a :|[P i point r] -popped +popped -- | test if m does not block the line segment from v to u -isInside :: (Point_ point 2 r, Ord r, Num r) - => P i point r - -> (P i point r, P i point r) -> Bool +isInside :: (Point_ point 2 r, Ord r, Num r) + => P i point r + -> (P i point r, P i point r) -> Bool isInside :: forall point r i. (Point_ point 2 r, Ord r, Num r) => P i point r -> (P i point r, P i point r) -> Bool -isInside P i point r -v (P i point r -u, P i point r -m) = case point -> point -> point -> CCW +isInside P i point r +v (P i point r +u, P i point r +m) = case point -> point -> point -> CCW forall point r point' point''. (Point_ point 2 r, Point_ point' 2 r, Point_ point'' 2 r, Num r, Ord r) => point -> point' -> point'' -> CCW ccw (P i point r -vP i point r -> Getting point (P i point r) point -> point +vP i point r -> Getting point (P i point r) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (P i point r) point forall core extra core' (f :: * -> *). Functor f => (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core) (P i point r -mP i point r -> Getting point (P i point r) point -> point +mP i point r -> Getting point (P i point r) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (P i point r) point forall core extra core' (f :: * -> *). Functor f => (core -> f core') -> (core :+ extra) -> f (core' :+ extra) core) (P i point r -uP i point r -> Getting point (P i point r) point -> point +uP i point r -> Getting point (P i point r) point -> point forall s a. s -> Getting a s a -> a ^.Getting point (P i point r) point forall core extra core' (f :: * -> *). @@ -506,7 +506,7 @@ CCW -> P i point r -> LR forall {k} i point (r :: k). P i point r -> LR chainOf P i point r -v LR -> LR -> Bool +v LR -> LR -> Bool forall a. Eq a => a -> a -> Bool == LR R @@ -514,7 +514,7 @@ CW -> P i point r -> LR forall {k} i point (r :: k). P i point r -> LR chainOf P i point r -v LR -> LR -> Bool +v LR -> LR -> Bool forall a. Eq a => a -> a -> Bool == LR L @@ -526,18 +526,18 @@ -- if there are multiple point with the minimum yCoord we pick the leftmost one. -- -- running time: \(O(n)\) -splitPolygon :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r) - => yMonotonePolygon - -> ( [point :+ (VertexIx yMonotonePolygon, LR)] - , [point :+ (VertexIx yMonotonePolygon, LR)] +splitPolygon :: (YMonotonePolygon_ yMonotonePolygon point r, Ord r) + => yMonotonePolygon + -> ( [point :+ (VertexIx yMonotonePolygon, LR)] + , [point :+ (VertexIx yMonotonePolygon, LR)] ) splitPolygon :: forall yMonotonePolygon point r. (YMonotonePolygon_ yMonotonePolygon point r, Ord r) => yMonotonePolygon -> ([point :+ (VertexIx yMonotonePolygon, LR)], [point :+ (VertexIx yMonotonePolygon, LR)]) -splitPolygon yMonotonePolygon -pg = ([(Int, point)] -> [point :+ (Int, LR)]) +splitPolygon yMonotonePolygon +pg = ([(Int, point)] -> [point :+ (Int, LR)]) -> ([(Int, point)] -> [point :+ (Int, LR)]) -> ([(Int, point)], [(Int, point)]) -> ([point :+ (Int, LR)], [point :+ (Int, LR)]) @@ -547,10 +547,10 @@ (a -> b) -> (c -> d) -> p a c -> p b d bimap (LR -> [(Int, point)] -> [point :+ (Int, LR)] forall {b} {a} {core}. b -> [(a, core)] -> [core :+ (a, b)] -f LR +f LR L) (LR -> [(Int, point)] -> [point :+ (Int, LR)] forall {b} {a} {core}. b -> [(a, core)] -> [core :+ (a, b)] -f LR +f LR R ([(Int, point)] -> [point :+ (Int, LR)]) -> ([(Int, point)] -> [(Int, point)]) -> [(Int, point)] @@ -573,7 +573,7 @@ NonEmpty.break ((Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -vMinY) (Int -> Bool) -> ((Int, point) -> Int) -> (Int, point) -> Bool +vMinY) (Int -> Bool) -> ((Int, point) -> Int) -> (Int, point) -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . (Int, point) -> Int forall a b. (a, b) -> a @@ -601,26 +601,26 @@ -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) ccwOuterBoundaryFrom Int VertexIx yMonotonePolygon -vMaxY) yMonotonePolygon -pg +vMaxY) yMonotonePolygon +pg -- rotates the list to the vtx with max ycoord, producing a -- non-empty list of elements, which we break at the point with -- minimum y,x coordinate. where - f :: b -> [(a, core)] -> [core :+ (a, b)] -f b -x = ((a, core) -> core :+ (a, b)) -> [(a, core)] -> [core :+ (a, b)] + f :: b -> [(a, core)] -> [core :+ (a, b)] +f b +x = ((a, core) -> core :+ (a, b)) -> [(a, core)] -> [core :+ (a, b)] forall a b. (a -> b) -> [a] -> [b] -map (\(a -i,core -p) -> core -p core -> (a, b) -> core :+ (a, b) +map (\(a +i,core +p) -> core +p core -> (a, b) -> core :+ (a, b) forall core extra. core -> extra -> core :+ extra :+ (a -i,b -x)) - vMaxY :: Int -vMaxY = Getting (First Int) yMonotonePolygon Int -> yMonotonePolygon -> Int +i,b +x)) + vMaxY :: Int +vMaxY = Getting (First Int) yMonotonePolygon Int -> yMonotonePolygon -> Int forall a s. Getting (First a) s a -> s -> a first1Of ((Vertex yMonotonePolygon -> Vertex yMonotonePolygon -> Ordering) -> IndexedFold1 @@ -642,7 +642,7 @@ (TypeError ...), Ord (NumType b), Point_ b (Dimension b) (NumType b)) => b -> b -> Ordering -incYincX(Indexed Int point (Const (First Int) point) +incYincX(Indexed Int point (Const (First Int) point) -> yMonotonePolygon -> Const (First Int) yMonotonePolygon) -> ((Int -> Const (First Int) Int) -> Indexed Int point (Const (First Int) point)) @@ -665,9 +665,9 @@ forall s t a b. Field1 s t a b => Lens s t a b Lens (Int, point) (Int, point) Int Int _1) yMonotonePolygon -pg - vMinY :: Int -vMinY = Getting (First Int) yMonotonePolygon Int -> yMonotonePolygon -> Int +pg + vMinY :: Int +vMinY = Getting (First Int) yMonotonePolygon Int -> yMonotonePolygon -> Int forall a s. Getting (First a) s a -> s -> a first1Of ((Vertex yMonotonePolygon -> Vertex yMonotonePolygon -> Ordering) -> IndexedFold1 @@ -689,7 +689,7 @@ (TypeError ...), Ord (NumType b), Point_ b (Dimension b) (NumType b)) => b -> b -> Ordering -incYincX(Indexed Int point (Const (First Int) point) +incYincX(Indexed Int point (Const (First Int) point) -> yMonotonePolygon -> Const (First Int) yMonotonePolygon) -> ((Int -> Const (First Int) Int) -> Indexed Int point (Const (First Int) point)) @@ -712,12 +712,12 @@ forall s t a b. Field1 s t a b => Lens s t a b Lens (Int, point) (Int, point) Int Int _1) yMonotonePolygon -pg +pg - incYincX :: b -> b -> Ordering -incYincX b -p b -q = (b -> NumType b) -> b -> b -> Ordering + incYincX :: b -> b -> Ordering +incYincX b +p b +q = (b -> NumType b) -> b -> b -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering comparing (b -> Getting (NumType b) b (NumType b) -> NumType b forall s a. s -> Getting a s a -> a @@ -727,8 +727,8 @@ IndexedLens' Int point r IndexedLens' Int b (NumType b) yCoord) b -p b -q Ordering -> Ordering -> Ordering +p b +q Ordering -> Ordering -> Ordering forall a. Semigroup a => a -> a -> a <> (b -> NumType b) -> b -> b -> Ordering forall a b. Ord a => (b -> a) -> b -> b -> Ordering @@ -740,8 +740,8 @@ IndexedLens' Int point r IndexedLens' Int b (NumType b) xCoord) b -p b -q +p b +q -- Just vs' = CV.findRotateTo (\v -> v^.core == vMaxY) -- $ pg^.outerBoundaryVector diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.Types.html b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.Types.html index 0a8fe4937..e3fc5ba04 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.Types.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.Types.html @@ -26,7 +26,7 @@ -- | After triangulation, edges are either from the original polygon or a new diagonal. data PolygonEdgeType = Original | Diagonal - deriving (Int -> PolygonEdgeType -> ShowS + deriving (Int -> PolygonEdgeType -> ShowS [PolygonEdgeType] -> ShowS PolygonEdgeType -> String (Int -> PolygonEdgeType -> ShowS) @@ -41,7 +41,7 @@ show :: PolygonEdgeType -> String $cshowList :: [PolygonEdgeType] -> ShowS showList :: [PolygonEdgeType] -> ShowS -Show,ReadPrec [PolygonEdgeType] +Show,ReadPrec [PolygonEdgeType] ReadPrec PolygonEdgeType Int -> ReadS PolygonEdgeType ReadS [PolygonEdgeType] @@ -61,7 +61,7 @@ readPrec :: ReadPrec PolygonEdgeType $creadListPrec :: ReadPrec [PolygonEdgeType] readListPrec :: ReadPrec [PolygonEdgeType] -Read,PolygonEdgeType -> PolygonEdgeType -> Bool +Read,PolygonEdgeType -> PolygonEdgeType -> Bool (PolygonEdgeType -> PolygonEdgeType -> Bool) -> (PolygonEdgeType -> PolygonEdgeType -> Bool) -> Eq PolygonEdgeType @@ -74,7 +74,7 @@ -- | Data type that expresses whether or not we are inside or outside the -- polygon. -data PolygonFaceData = Inside | Outside deriving (Int -> PolygonFaceData -> ShowS +data PolygonFaceData = Inside | Outside deriving (Int -> PolygonFaceData -> ShowS [PolygonFaceData] -> ShowS PolygonFaceData -> String (Int -> PolygonFaceData -> ShowS) @@ -89,7 +89,7 @@ show :: PolygonFaceData -> String $cshowList :: [PolygonFaceData] -> ShowS showList :: [PolygonFaceData] -> ShowS -Show,ReadPrec [PolygonFaceData] +Show,ReadPrec [PolygonFaceData] ReadPrec PolygonFaceData Int -> ReadS PolygonFaceData ReadS [PolygonFaceData] @@ -109,7 +109,7 @@ readPrec :: ReadPrec PolygonFaceData $creadListPrec :: ReadPrec [PolygonFaceData] readListPrec :: ReadPrec [PolygonFaceData] -Read,PolygonFaceData -> PolygonFaceData -> Bool +Read,PolygonFaceData -> PolygonFaceData -> Bool (PolygonFaceData -> PolygonFaceData -> Bool) -> (PolygonFaceData -> PolygonFaceData -> Bool) -> Eq PolygonFaceData @@ -120,7 +120,7 @@ /= :: PolygonFaceData -> PolygonFaceData -> Bool Eq) -type Diagonal polygon = Vector 2 (VertexIx polygon) +type Diagonal polygon = Vector 2 (VertexIx polygon) {- @@ -217,23 +217,23 @@ -- -- -- running time: \(O(n\log n)\) -constructGraph :: forall s polygon point r f. - ( SimplePolygon_ polygon point r, Point_ point 2 r - , Foldable f, Ord r, Num r +constructGraph :: forall s polygon point r f. + ( SimplePolygon_ polygon point r, Point_ point 2 r + , Foldable f, Ord r, Num r ) - => polygon - -> f (Diagonal polygon) - -> PlaneGraph s point PolygonEdgeType PolygonFaceData + => polygon + -> f (Diagonal polygon) + -> PlaneGraph s point PolygonEdgeType PolygonFaceData constructGraph :: forall {k} (s :: k) polygon point r (f :: * -> *). (SimplePolygon_ polygon point r, Point_ point 2 r, Foldable f, Ord r, Num r) => polygon -> f (Diagonal polygon) -> PlaneGraph s point PolygonEdgeType PolygonFaceData -constructGraph polygon -pg f (Diagonal polygon) -diags = PlaneGraph s point PolygonEdgeType () -grPlaneGraph s point PolygonEdgeType () +constructGraph polygon +pg f (Diagonal polygon) +diags = PlaneGraph s point PolygonEdgeType () +grPlaneGraph s point PolygonEdgeType () -> (PlaneGraph s point PolygonEdgeType () -> PlaneGraph s point PolygonEdgeType PolygonFaceData) -> PlaneGraph s point PolygonEdgeType PolygonFaceData @@ -267,12 +267,12 @@ forall i s t a b. AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t %@~ FaceId s -> () -> PolygonFaceData -computeFaceLabel +computeFaceLabel -- constructGraph pg diags = gr&faces %@~ computeFaceLabel where -- | Note that we use fromAdjacencyLists - gr :: PlaneGraph s point PolygonEdgeType () -gr = NonEmpty + gr :: PlaneGraph s point PolygonEdgeType () +gr = NonEmpty (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType)) -> PlaneGraph s point PolygonEdgeType () @@ -292,12 +292,12 @@ fromAdjacencyLists NonEmpty (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType)) -adjLists :: PlaneGraph s point PolygonEdgeType () +adjLists :: PlaneGraph s point PolygonEdgeType () - adjLists :: NonEmpty + adjLists :: NonEmpty (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType)) -adjLists = ((Int, (Int, Int)) +adjLists = ((Int, (Int, Int)) -> (point, (point, point)) -> (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType))) @@ -313,7 +313,7 @@ -> (point, (point, point)) -> (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType)) -collectDiags (((Int, (Int, Int)), (point, (point, point))) +collectDiags (((Int, (Int, Int)), (point, (point, point))) -> (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType))) -> NonEmpty ((Int, (Int, Int)), (point, (point, point))) @@ -355,50 +355,50 @@ polygon (Vertex polygon, (Vertex polygon, Vertex polygon)) outerBoundaryWithNeighbours polygon -pg +pg - collectDiags :: (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) - -> (point, (point, point)) - -> ( VertexIdIn Primal s - , point, NonEmpty (VertexIdIn Primal s,PolygonEdgeType) + collectDiags :: (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) + -> (point, (point, point)) + -> ( VertexIdIn Primal s + , point, NonEmpty (VertexIdIn Primal s,PolygonEdgeType) ) - collectDiags :: (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) + collectDiags :: (VertexIx polygon, (VertexIx polygon, VertexIx polygon)) -> (point, (point, point)) -> (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType)) -collectDiags (VertexIx polygon -u, (VertexIx polygon -v,VertexIx polygon -w)) (point -p,(point, point) +collectDiags (VertexIx polygon +u, (VertexIx polygon +v,VertexIx polygon +w)) (point +p,(point, point) _) = (Int, point, NonEmpty (Int, PolygonEdgeType)) -> (VertexIdIn 'Primal s, point, NonEmpty (VertexIdIn 'Primal s, PolygonEdgeType)) forall a b. Coercible a b => a -> b coerce (Int VertexIx polygon -u,point -p, (Int +u,point +p, (Int VertexIx polygon -v, PolygonEdgeType +v, PolygonEdgeType Original) (Int, PolygonEdgeType) -> [(Int, PolygonEdgeType)] -> NonEmpty (Int, PolygonEdgeType) forall a. a -> [a] -> NonEmpty a :| (Int VertexIx polygon -w, PolygonEdgeType +w, PolygonEdgeType Original) (Int, PolygonEdgeType) -> [(Int, PolygonEdgeType)] -> [(Int, PolygonEdgeType)] forall a. a -> [a] -> [a] : Int -> [(Int, PolygonEdgeType)] -diagonalsOf Int +diagonalsOf Int VertexIx polygon -u) +u) -- get the diagonals incident to vertex u - diagonalsOf :: Int -> [(Int, PolygonEdgeType)] -diagonalsOf Int -u = [(Int, PolygonEdgeType)] + diagonalsOf :: Int -> [(Int, PolygonEdgeType)] +diagonalsOf Int +u = [(Int, PolygonEdgeType)] -> Maybe [(Int, PolygonEdgeType)] -> [(Int, PolygonEdgeType)] forall a. a -> Maybe a -> a fromMaybe [] (Maybe [(Int, PolygonEdgeType)] -> [(Int, PolygonEdgeType)]) @@ -409,13 +409,13 @@ -> Maybe [(Int, PolygonEdgeType)] forall k a. Ord k => k -> Map k a -> Maybe a Map.lookup Int -u Map Int [(Int, PolygonEdgeType)] +u Map Int [(Int, PolygonEdgeType)] Map (VertexIx polygon) [(VertexIx polygon, PolygonEdgeType)] -diags' +diags' -- associate every diagonal with its endpoints - diags' :: Map.Map (VertexIx polygon) [(VertexIx polygon, PolygonEdgeType)] - diags' :: Map (VertexIx polygon) [(VertexIx polygon, PolygonEdgeType)] -diags' = (Vector 2 Int + diags' :: Map.Map (VertexIx polygon) [(VertexIx polygon, PolygonEdgeType)] + diags' :: Map (VertexIx polygon) [(VertexIx polygon, PolygonEdgeType)] +diags' = (Vector 2 Int -> Map Int [(Int, PolygonEdgeType)] -> Map Int [(Int, PolygonEdgeType)]) -> Map Int [(Int, PolygonEdgeType)] @@ -425,9 +425,9 @@ forall (t :: * -> *) a b. Foldable t => (a -> b -> b) -> b -> t a -> b -foldr (\(Vector2 Int -u Int -v) -> ([(Int, PolygonEdgeType)] +foldr (\(Vector2 Int +u Int +v) -> ([(Int, PolygonEdgeType)] -> [(Int, PolygonEdgeType)] -> [(Int, PolygonEdgeType)]) -> Int -> [(Int, PolygonEdgeType)] @@ -438,8 +438,8 @@ -> [(Int, PolygonEdgeType)] -> [(Int, PolygonEdgeType)] forall a. Semigroup a => a -> a -> a (<>) Int -u [(Int -v, PolygonEdgeType +u [(Int +v, PolygonEdgeType Diagonal)] (Map Int [(Int, PolygonEdgeType)] -> Map Int [(Int, PolygonEdgeType)]) @@ -459,33 +459,33 @@ -> [(Int, PolygonEdgeType)] -> [(Int, PolygonEdgeType)] forall a. Semigroup a => a -> a -> a (<>) Int -v [(Int -u, PolygonEdgeType +v [(Int +u, PolygonEdgeType Diagonal)] ) Map Int [(Int, PolygonEdgeType)] forall k a. Map k a Map.empty f (Vector 2 Int) f (Diagonal polygon) -diags +diags - theOuterFaceId :: FaceIx (PlaneGraph s point PolygonEdgeType ()) -theOuterFaceId = PlaneGraph s point PolygonEdgeType () + theOuterFaceId :: FaceIx (PlaneGraph s point PolygonEdgeType ()) +theOuterFaceId = PlaneGraph s point PolygonEdgeType () -> FaceIx (PlaneGraph s point PolygonEdgeType ()) forall planeGraph vertex. PlaneGraph_ planeGraph vertex => planeGraph -> FaceIx planeGraph outerFaceId PlaneGraph s point PolygonEdgeType () -gr - computeFaceLabel :: FaceId s -> () -> PolygonFaceData -computeFaceLabel FaceId s -fi () +gr + computeFaceLabel :: FaceId s -> () -> PolygonFaceData +computeFaceLabel FaceId s +fi () _ | FaceId s -fi FaceId s -> FaceId s -> Bool +fi FaceId s -> FaceId s -> Bool forall a. Eq a => a -> a -> Bool == FaceIx (PlaneGraph s point PolygonEdgeType ()) FaceId s -theOuterFaceId = PolygonFaceData +theOuterFaceId = PolygonFaceData Outside | Bool otherwise = PolygonFaceData diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.html b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.html index f1ca45088..f1aa626ce 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Triangulation.html @@ -31,15 +31,15 @@ -- | Triangulates a polygon of \(n\) vertices -- -- running time: \(O(n \log n)\) -triangulate :: forall s polygon point r. - (SimplePolygon_ polygon point r, Ord r, Num r) - => polygon - -> PlaneGraph s point PolygonEdgeType PolygonFaceData +triangulate :: forall s polygon point r. + (SimplePolygon_ polygon point r, Ord r, Num r) + => polygon + -> PlaneGraph s point PolygonEdgeType PolygonFaceData triangulate :: forall {k} (s :: k) polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData -triangulate polygon -pg = polygon +triangulate polygon +pg = polygon -> [Diagonal polygon] -> PlaneGraph s point PolygonEdgeType PolygonFaceData forall {k} (s :: k) polygon point r (f :: * -> *). @@ -49,56 +49,56 @@ -> f (Diagonal polygon) -> PlaneGraph s point PolygonEdgeType PolygonFaceData constructGraph polygon -pg (polygon -> [Diagonal polygon] +pg (polygon -> [Diagonal polygon] forall polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> [Diagonal polygon] computeDiagonals polygon -pg) +pg) -- | Computes a set of diagaonals that together triangulate the input polygon -- of \(n\) vertices. -- -- running time: \(O(n \log n)\) -computeDiagonals :: forall polygon point r. - (SimplePolygon_ polygon point r, Ord r, Num r) - => polygon -> [Diagonal polygon] +computeDiagonals :: forall polygon point r. + (SimplePolygon_ polygon point r, Ord r, Num r) + => polygon -> [Diagonal polygon] computeDiagonals :: forall polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> [Diagonal polygon] -computeDiagonals polygon -pg = [Vector 2 Int] +computeDiagonals polygon +pg = [Vector 2 Int] [Diagonal polygon] -monotoneDiags [Vector 2 Int] -> [Vector 2 Int] -> [Vector 2 Int] +monotoneDiags [Vector 2 Int] -> [Vector 2 Int] -> [Vector 2 Int] forall a. Semigroup a => a -> a -> a <> [Vector 2 Int] [Diagonal polygon] -extraDiags +extraDiags where - monotoneSubdiv :: PlaneGraph () point PolygonEdgeType PolygonFaceData - monotoneSubdiv :: PlaneGraph () point PolygonEdgeType PolygonFaceData -monotoneSubdiv = forall {k} (s :: k) polygon point r. + monotoneSubdiv :: PlaneGraph () point PolygonEdgeType PolygonFaceData + monotoneSubdiv :: PlaneGraph () point PolygonEdgeType PolygonFaceData +monotoneSubdiv = forall {k} (s :: k) polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData forall s polygon point r. (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> PlaneGraph s point PolygonEdgeType PolygonFaceData MM.makeMonotone @() polygon -pg +pg -- use some arbitrary proxy type -- get the existing diagonals - monotoneDiags :: [Diagonal polygon] - monotoneDiags :: [Diagonal polygon] -monotoneDiags = ((DartId (), PolygonEdgeType) -> Vector 2 Int) + monotoneDiags :: [Diagonal polygon] + monotoneDiags :: [Diagonal polygon] +monotoneDiags = ((DartId (), PolygonEdgeType) -> Vector 2 Int) -> [(DartId (), PolygonEdgeType)] -> [Vector 2 Int] forall a b. (a -> b) -> [a] -> [b] -map (\(DartId () -d,PolygonEdgeType -_) -> let (VertexId () -u,VertexId () -v) = PlaneGraph () point PolygonEdgeType PolygonFaceData -monotoneSubdiv PlaneGraph () point PolygonEdgeType PolygonFaceData +map (\(DartId () +d,PolygonEdgeType +_) -> let (VertexId () +u,VertexId () +v) = PlaneGraph () point PolygonEdgeType PolygonFaceData +monotoneSubdiv PlaneGraph () point PolygonEdgeType PolygonFaceData -> Getting (VertexId (), VertexId ()) (PlaneGraph () point PolygonEdgeType PolygonFaceData) @@ -119,7 +119,7 @@ (VertexIx graph, VertexIx graph) graph (Vertex graph, Vertex graph) endPointsOf DartIx (PlaneGraph () point PolygonEdgeType PolygonFaceData) DartId () -d(Indexed +d(Indexed (VertexId (), VertexId ()) (point, point) (Const (VertexId (), VertexId ()) (point, point)) @@ -156,8 +156,8 @@ $ VertexId () -> VertexId () -> Vector 2 (VertexId ()) forall r. r -> r -> Vector 2 r Vector2 VertexId () -u VertexId () -v +u VertexId () +v ) ([(DartId (), PolygonEdgeType)] -> [Diagonal polygon]) -> ([(DartId (), PolygonEdgeType)] @@ -183,7 +183,7 @@ -> [(DartId (), PolygonEdgeType)] -> [Diagonal polygon] forall a b. (a -> b) -> a -> b $ PlaneGraph () point PolygonEdgeType PolygonFaceData -monotoneSubdiv PlaneGraph () point PolygonEdgeType PolygonFaceData +monotoneSubdiv PlaneGraph () point PolygonEdgeType PolygonFaceData -> Getting (Endo [(DartId (), PolygonEdgeType)]) (PlaneGraph () point PolygonEdgeType PolygonFaceData) @@ -251,16 +251,16 @@ withIndex -- and compute the diagonals in each interior y-monotone polygon - extraDiags :: [Diagonal polygon] - extraDiags :: [Diagonal polygon] -extraDiags = ((FaceId (), PolygonFaceData) -> [Diagonal polygon]) + extraDiags :: [Diagonal polygon] + extraDiags :: [Diagonal polygon] +extraDiags = ((FaceId (), PolygonFaceData) -> [Diagonal polygon]) -> [(FaceId (), PolygonFaceData)] -> [Diagonal polygon] forall m a. Monoid m => (a -> m) -> [a] -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap (FaceId () -> [Vector 2 Int] -collectDiags (FaceId () -> [Vector 2 Int]) +collectDiags (FaceId () -> [Vector 2 Int]) -> ((FaceId (), PolygonFaceData) -> FaceId ()) -> (FaceId (), PolygonFaceData) -> [Vector 2 Int] @@ -289,7 +289,7 @@ -> [(FaceId (), PolygonFaceData)] -> [(FaceId (), PolygonFaceData)] forall a b. (a -> b) -> a -> b $ PlaneGraph () point PolygonEdgeType PolygonFaceData -monotoneSubdivPlaneGraph () point PolygonEdgeType PolygonFaceData +monotoneSubdivPlaneGraph () point PolygonEdgeType PolygonFaceData -> Getting (Endo [(FaceId (), PolygonFaceData)]) (PlaneGraph () point PolygonEdgeType PolygonFaceData) @@ -354,11 +354,11 @@ withIndex -- collectDiags :: FaceIx planeGraph -> [Diagonal polygon] - collectDiags :: FaceId () -> [Vector 2 Int] -collectDiags FaceId () -i = let yMonotonePoly :: SimplePolygon (point :+ VertexId ()) -yMonotonePoly = PlaneGraph () point PolygonEdgeType PolygonFaceData -monotoneSubdiv PlaneGraph () point PolygonEdgeType PolygonFaceData + collectDiags :: FaceId () -> [Vector 2 Int] +collectDiags FaceId () +i = let yMonotonePoly :: SimplePolygon (point :+ VertexId ()) +yMonotonePoly = PlaneGraph () point PolygonEdgeType PolygonFaceData +monotoneSubdiv PlaneGraph () point PolygonEdgeType PolygonFaceData -> Getting (Endo (SimplePolygon (point :+ VertexId ()))) (PlaneGraph () point PolygonEdgeType PolygonFaceData) @@ -382,7 +382,7 @@ (SimplePolygon (vertex :+ VertexIx planeGraph)) interiorFacePolygonAt FaceIx (PlaneGraph () point PolygonEdgeType PolygonFaceData) FaceId () -i +i in (Vector 2 Int -> Vector 2 Int) -> [Vector 2 Int] -> [Vector 2 Int] forall a b. (a -> b) -> [a] -> [b] map (Vector 2 (VertexId ()) -> Vector 2 Int @@ -399,7 +399,7 @@ YMonotonePolygon_ yMonotonePolygon (point :+ i) r => yMonotonePolygon -> Diagonal yMonotonePolygon -> Vector 2 i withOriginalId SimplePolygon (point :+ VertexId ()) -yMonotonePoly) ([Vector 2 Int] -> [Vector 2 Int]) +yMonotonePoly) ([Vector 2 Int] -> [Vector 2 Int]) -> [Vector 2 Int] -> [Vector 2 Int] forall a b. (a -> b) -> a -> b $ @@ -409,20 +409,20 @@ (SimplePolygon_ polygon point r, Ord r, Num r) => polygon -> [Diagonal polygon] TM.computeDiagonals SimplePolygon (point :+ VertexId ()) -yMonotonePoly +yMonotonePoly -withOriginalId :: ( TM.YMonotonePolygon_ yMonotonePolygon (point :+ i) r - ) => yMonotonePolygon -> Diagonal yMonotonePolygon -> Vector 2 i +withOriginalId :: ( TM.YMonotonePolygon_ yMonotonePolygon (point :+ i) r + ) => yMonotonePolygon -> Diagonal yMonotonePolygon -> Vector 2 i withOriginalId :: forall yMonotonePolygon point i r. YMonotonePolygon_ yMonotonePolygon (point :+ i) r => yMonotonePolygon -> Diagonal yMonotonePolygon -> Vector 2 i -withOriginalId yMonotonePolygon -yMonotonePoly = (Int -> i) -> Vector 2 Int -> Vector 2 i +withOriginalId yMonotonePolygon +yMonotonePoly = (Int -> i) -> Vector 2 Int -> Vector 2 i forall a b. (a -> b) -> Vector 2 a -> Vector 2 b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\Int -j -> yMonotonePolygon -yMonotonePolyyMonotonePolygon -> Getting (Endo i) yMonotonePolygon i -> i +fmap (\Int +j -> yMonotonePolygon +yMonotonePolyyMonotonePolygon -> Getting (Endo i) yMonotonePolygon i -> i forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!VertexIx yMonotonePolygon -> IndexedTraversal' @@ -435,7 +435,7 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt Int VertexIx yMonotonePolygon -j(((point :+ i) -> Const (Endo i) (point :+ i)) +j(((point :+ i) -> Const (Endo i) (point :+ i)) -> yMonotonePolygon -> Const (Endo i) yMonotonePolygon) -> ((i -> Const (Endo i) i) -> (point :+ i) -> Const (Endo i) (point :+ i)) diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.Visibility.Naive.html b/haddocks/hgeometry/src/HGeometry.Polygon.Visibility.Naive.html index cc9d9caad..3d11cf5d7 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.Visibility.Naive.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.Visibility.Naive.html @@ -30,17 +30,17 @@ -- | Naive algorithm to compute the visibilityGraph of a simple polygon. -- -- \(O(n^3)\) -visibilityGraph :: ( SimplePolygon_ simplePolygon point r - , HasIntersectionWith point simplePolygon - , Ord r, Num r +visibilityGraph :: ( SimplePolygon_ simplePolygon point r + , HasIntersectionWith point simplePolygon + , Ord r, Num r ) - => simplePolygon -> [Vector 2 (VertexIx simplePolygon)] + => simplePolygon -> [Vector 2 (VertexIx simplePolygon)] visibilityGraph :: forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (VertexIx simplePolygon)] -visibilityGraph simplePolygon -pg = simplePolygon +visibilityGraph simplePolygon +pg = simplePolygon -> [Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)] forall simplePolygon point r. @@ -50,7 +50,7 @@ -> [Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)] visibilityGraphWith simplePolygon -pg +pg ([Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)]) -> [Vector 2 (point :+ VertexIx simplePolygon)] @@ -63,7 +63,7 @@ HasIntersectionWith (OpenLineSegment vertex) obstacleEdge) => f obstacleEdge -> g vertex -> [Vector 2 vertex] visibilityGraphWrtObstacles (simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [ClosedLineSegment point]) simplePolygon @@ -87,7 +87,7 @@ (ClosedLineSegment point) outerBoundaryEdgeSegments) (simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [point :+ Int]) simplePolygon (point :+ Int) -> [point :+ Int] forall s a. s -> Getting (Endo [a]) s a -> [a] @@ -126,24 +126,24 @@ -- actual polygon edges as visible). -- -- \(O(n + m)\), where m is the number of candidate edges. -visibilityGraphWith :: ( SimplePolygon_ simplePolygon point r - , HasIntersectionWith point simplePolygon - , Ord r, Num r +visibilityGraphWith :: ( SimplePolygon_ simplePolygon point r + , HasIntersectionWith point simplePolygon + , Ord r, Num r ) - => simplePolygon - -> [Vector 2 (point :+ VertexIx simplePolygon)] -- ^ candidate edges - -> [Vector 2 (VertexIx simplePolygon)] + => simplePolygon + -> [Vector 2 (point :+ VertexIx simplePolygon)] -- ^ candidate edges + -> [Vector 2 (VertexIx simplePolygon)] visibilityGraphWith :: forall simplePolygon point r. (SimplePolygon_ simplePolygon point r, HasIntersectionWith point simplePolygon, Ord r, Num r) => simplePolygon -> [Vector 2 (point :+ VertexIx simplePolygon)] -> [Vector 2 (VertexIx simplePolygon)] -visibilityGraphWith simplePolygon -pg [Vector 2 (point :+ VertexIx simplePolygon)] -candidateEdges = +visibilityGraphWith simplePolygon +pg [Vector 2 (point :+ VertexIx simplePolygon)] +candidateEdges = (simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [Vector 2 Int]) simplePolygon (Vector 2 Int) -> [Vector 2 Int] forall s a. s -> Getting (Endo [a]) s a -> [a] @@ -219,45 +219,45 @@ -> [Vector 2 (point :+ Int)] -> [Vector 2 Int] forall a b. (a -> Maybe b) -> [a] -> [b] mapMaybe Vector 2 (point :+ Int) -> Maybe (Vector 2 Int) -liesInsidePolygon [Vector 2 (point :+ Int)] +liesInsidePolygon [Vector 2 (point :+ Int)] [Vector 2 (point :+ VertexIx simplePolygon)] -candidateEdges +candidateEdges where - liesInsidePolygon :: Vector 2 (point :+ Int) -> Maybe (Vector 2 Int) -liesInsidePolygon (Vector2 (point -u :+ Int -i) (point -v :+ Int -j)) = case Vector 2 r -> point -> point -> point -> Ordering + liesInsidePolygon :: Vector 2 (point :+ Int) -> Maybe (Vector 2 Int) +liesInsidePolygon (Vector2 (point +u :+ Int +i) (point +v :+ Int +j)) = case Vector 2 r -> point -> point -> point -> Ordering forall center r point. (Point_ center 2 r, Point_ point 2 r, Ord r, Num r) => Vector 2 r -> center -> point -> point -> Ordering cwCmpAroundWith (point -p point -> point -> Vector 2 r +p point -> point -> Vector 2 r forall point (d :: Nat) r. (Affine_ point d r, Num r) => point -> point -> Vector d r .-. point -u) point -u point -v point -s of +u) point +u point +v point +s of Ordering LT -> Vector 2 Int -> Maybe (Vector 2 Int) forall a. a -> Maybe a Just (Int -> Int -> Vector 2 Int forall r. r -> r -> Vector 2 r Vector2 Int -i Int -j) +i Int +j) Ordering _ -> Maybe (Vector 2 Int) forall a. Maybe a Nothing where - p :: point -p = simplePolygon -pgsimplePolygon -> Getting point simplePolygon point -> point + p :: point +p = simplePolygon +pgsimplePolygon -> Getting point simplePolygon point -> point forall s a. s -> Getting a s a -> a ^.VertexIx simplePolygon -> IndexedLens' @@ -268,10 +268,10 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwPredecessorOf Int VertexIx simplePolygon -i - s :: point -s = simplePolygon -pgsimplePolygon -> Getting point simplePolygon point -> point +i + s :: point +s = simplePolygon +pgsimplePolygon -> Getting point simplePolygon point -> point forall s a. s -> Getting a s a -> a ^.VertexIx simplePolygon -> IndexedLens' @@ -282,7 +282,7 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwSuccessorOf Int VertexIx simplePolygon -i +i -- we check whether v is in between the angular interval defined by the neighbours -- of u. -- note: this uses the originetation of the simple polygon boundary @@ -291,17 +291,17 @@ -- | computes the edges of the visibility graph among the points -- -- O(n^2m), where n is the number of vertices, m is the number of obstacle edges. -visibilityGraphWrtObstacles :: ( Foldable f, Foldable g - , Point_ vertex 2 r - , OpenLineSegment vertex - `HasIntersectionWith` obstacleEdge - ) => f obstacleEdge -> g vertex -> [Vector 2 vertex] +visibilityGraphWrtObstacles :: ( Foldable f, Foldable g + , Point_ vertex 2 r + , OpenLineSegment vertex + `HasIntersectionWith` obstacleEdge + ) => f obstacleEdge -> g vertex -> [Vector 2 vertex] visibilityGraphWrtObstacles :: forall (f :: * -> *) (g :: * -> *) vertex r obstacleEdge. (Foldable f, Foldable g, Point_ vertex 2 r, HasIntersectionWith (OpenLineSegment vertex) obstacleEdge) => f obstacleEdge -> g vertex -> [Vector 2 vertex] -visibilityGraphWrtObstacles f obstacleEdge -obstacles = [Two vertex] -> [Vector 2 vertex] +visibilityGraphWrtObstacles f obstacleEdge +obstacles = [Two vertex] -> [Vector 2 vertex] forall a b. Coercible a b => a -> b coerce ([Two vertex] -> [Vector 2 vertex]) -> (g vertex -> [Two vertex]) -> g vertex -> [Vector 2 vertex] @@ -309,17 +309,17 @@ . (Two vertex -> Bool) -> [Two vertex] -> [Two vertex] forall a. (a -> Bool) -> [a] -> [a] filter Two vertex -> Bool -areMutuallyVisible ([Two vertex] -> [Two vertex]) +areMutuallyVisible ([Two vertex] -> [Two vertex]) -> (g vertex -> [Two vertex]) -> g vertex -> [Two vertex] forall b c a. (b -> c) -> (a -> b) -> a -> c . g vertex -> [Two vertex] forall (f :: * -> *) a. Foldable f => f a -> [Two a] uniquePairs where - areMutuallyVisible :: Two vertex -> Bool -areMutuallyVisible (Two vertex -u vertex -v) = + areMutuallyVisible :: Two vertex -> Bool +areMutuallyVisible (Two vertex +u vertex +v) = (obstacleEdge -> Bool) -> f obstacleEdge -> Bool forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool all (Bool -> Bool @@ -330,7 +330,7 @@ intersects (vertex -> vertex -> OpenLineSegment vertex forall point. point -> point -> OpenLineSegment point OpenLineSegment vertex -u vertex -v))) f obstacleEdge -obstacles +u vertex +v))) f obstacleEdge +obstacles \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.WithHoles.html b/haddocks/hgeometry/src/HGeometry.Polygon.WithHoles.html index da4515cde..b93ae08f0 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.WithHoles.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.WithHoles.html @@ -53,12 +53,12 @@ -------------------------------------------------------------------------------- -- | Simple data type modelling polygons with holes -data PolygonalDomainF (h :: Type -> Type) - (f :: Type -> Type) - (point :: Type) = - PolygonalDomain (SimplePolygonF f point) -- ^ the outer boundary - (h (SimplePolygonF f point)) -- ^ the holes - deriving stock ((forall x. +data PolygonalDomainF (h :: Type -> Type) + (f :: Type -> Type) + (point :: Type) = + PolygonalDomain (SimplePolygonF f point) -- ^ the outer boundary + (h (SimplePolygonF f point)) -- ^ the holes + deriving stock ((forall x. PolygonalDomainF h f point -> Rep (PolygonalDomainF h f point) x) -> (forall x. Rep (PolygonalDomainF h f point) x -> PolygonalDomainF h f point) @@ -83,22 +83,22 @@ Rep (PolygonalDomainF h f point) x -> PolygonalDomainF h f point Generic) -instance ( NFData (SimplePolygonF f point) - , NFData (h (SimplePolygonF f point)) - ) => NFData (PolygonalDomainF h f point) +instance ( NFData (SimplePolygonF f point) + , NFData (h (SimplePolygonF f point)) + ) => NFData (PolygonalDomainF h f point) -deriving instance ( Show (SimplePolygonF f point) - , Show (h (SimplePolygonF f point)) - ) => Show (PolygonalDomainF h f point) -deriving instance ( Read (SimplePolygonF f point) - , Read (h (SimplePolygonF f point)) - ) => Read (PolygonalDomainF h f point) -deriving instance ( Eq (SimplePolygonF f point) - , Eq (h (SimplePolygonF f point)) - ) => Eq (PolygonalDomainF h f point) +deriving instance ( Show (SimplePolygonF f point) + , Show (h (SimplePolygonF f point)) + ) => Show (PolygonalDomainF h f point) +deriving instance ( Read (SimplePolygonF f point) + , Read (h (SimplePolygonF f point)) + ) => Read (PolygonalDomainF h f point) +deriving instance ( Eq (SimplePolygonF f point) + , Eq (h (SimplePolygonF f point)) + ) => Eq (PolygonalDomainF h f point) -- | The simple polygon representing the outer boundary -outerBoundaryPolygon :: Lens' (PolygonalDomainF h f point) (SimplePolygonF f point) +outerBoundaryPolygon :: Lens' (PolygonalDomainF h f point) (SimplePolygonF f point) outerBoundaryPolygon :: forall (h :: * -> *) (f :: * -> *) point (f :: * -> *). Functor f => (SimplePolygonF f point -> f (SimplePolygonF f point)) @@ -112,25 +112,25 @@ (SimplePolygonF f point) (SimplePolygonF f point) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b -lens (\(PolygonalDomain SimplePolygonF f point -outer h (SimplePolygonF f point) +lens (\(PolygonalDomain SimplePolygonF f point +outer h (SimplePolygonF f point) _) -> SimplePolygonF f point -outer) +outer) (\(PolygonalDomain SimplePolygonF f point -_ h (SimplePolygonF f point) -hs) SimplePolygonF f point -outer -> SimplePolygonF f point +_ h (SimplePolygonF f point) +hs) SimplePolygonF f point +outer -> SimplePolygonF f point -> h (SimplePolygonF f point) -> PolygonalDomainF h f point forall (h :: * -> *) (f :: * -> *) point. SimplePolygonF f point -> h (SimplePolygonF f point) -> PolygonalDomainF h f point PolygonalDomain SimplePolygonF f point -outer h (SimplePolygonF f point) -hs) +outer h (SimplePolygonF f point) +hs) -- | Lens to access the holes -theHoles :: Lens (PolygonalDomainF h f point) (PolygonalDomainF h' f point) - (h (SimplePolygonF f point)) (h' (SimplePolygonF f point)) +theHoles :: Lens (PolygonalDomainF h f point) (PolygonalDomainF h' f point) + (h (SimplePolygonF f point)) (h' (SimplePolygonF f point)) theHoles :: forall (h :: * -> *) (f :: * -> *) point (h' :: * -> *) (f :: * -> *). Functor f => @@ -146,34 +146,34 @@ (h' (SimplePolygonF f point)) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (\(PolygonalDomain SimplePolygonF f point -_ h (SimplePolygonF f point) -hs) -> h (SimplePolygonF f point) -hs) - (\(PolygonalDomain SimplePolygonF f point -outer h (SimplePolygonF f point) -_) h' (SimplePolygonF f point) -hs -> SimplePolygonF f point +_ h (SimplePolygonF f point) +hs) -> h (SimplePolygonF f point) +hs) + (\(PolygonalDomain SimplePolygonF f point +outer h (SimplePolygonF f point) +_) h' (SimplePolygonF f point) +hs -> SimplePolygonF f point -> h' (SimplePolygonF f point) -> PolygonalDomainF h' f point forall (h :: * -> *) (f :: * -> *) point. SimplePolygonF f point -> h (SimplePolygonF f point) -> PolygonalDomainF h f point PolygonalDomain SimplePolygonF f point -outer h' (SimplePolygonF f point) -hs) +outer h' (SimplePolygonF f point) +hs) -- | Polygonal domain implemented using Vectors -type PolygonalDomain point = PolygonalDomainF Vector (Cyclic NonEmptyVector) point +type PolygonalDomain point = PolygonalDomainF Vector (Cyclic NonEmptyVector) point -type instance Dimension (PolygonalDomainF h f point) = 2 -type instance NumType (PolygonalDomainF h f point) = NumType point +type instance Dimension (PolygonalDomainF h f point) = 2 +type instance NumType (PolygonalDomainF h f point) = NumType point -instance (Functor h, Functor f) => Functor (PolygonalDomainF h f) where - fmap :: forall a b. +instance (Functor h, Functor f) => Functor (PolygonalDomainF h f) where + fmap :: forall a b. (a -> b) -> PolygonalDomainF h f a -> PolygonalDomainF h f b -fmap a -> b -f (PolygonalDomain SimplePolygonF f a -outer h (SimplePolygonF f a) -hs) = +fmap a -> b +f (PolygonalDomain SimplePolygonF f a +outer h (SimplePolygonF f a) +hs) = SimplePolygonF f b -> h (SimplePolygonF f b) -> PolygonalDomainF h f b forall (h :: * -> *) (f :: * -> *) point. @@ -183,8 +183,8 @@ forall a b. (a -> b) -> SimplePolygonF f a -> SimplePolygonF f b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f SimplePolygonF f a -outer) ((SimplePolygonF f a -> SimplePolygonF f b) +f SimplePolygonF f a +outer) ((SimplePolygonF f a -> SimplePolygonF f b) -> h (SimplePolygonF f a) -> h (SimplePolygonF f b) forall a b. (a -> b) -> h a -> h b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -192,22 +192,22 @@ forall a b. (a -> b) -> SimplePolygonF f a -> SimplePolygonF f b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b fmap a -> b -f) h (SimplePolygonF f a) -hs) +f) h (SimplePolygonF f a) +hs) -instance (Foldable h, Foldable f) => Foldable (PolygonalDomainF h f) where - foldMap :: forall m a. Monoid m => (a -> m) -> PolygonalDomainF h f a -> m -foldMap a -> m -f (PolygonalDomain SimplePolygonF f a -outer h (SimplePolygonF f a) -hs) = (a -> m) -> SimplePolygonF f a -> m +instance (Foldable h, Foldable f) => Foldable (PolygonalDomainF h f) where + foldMap :: forall m a. Monoid m => (a -> m) -> PolygonalDomainF h f a -> m +foldMap a -> m +f (PolygonalDomain SimplePolygonF f a +outer h (SimplePolygonF f a) +hs) = (a -> m) -> SimplePolygonF f a -> m forall m a. Monoid m => (a -> m) -> SimplePolygonF f a -> m forall (t :: * -> *) m a. (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f SimplePolygonF f a -outer m -> m -> m +f SimplePolygonF f a +outer m -> m -> m forall a. Semigroup a => a -> a -> a <> (SimplePolygonF f a -> m) -> h (SimplePolygonF f a) -> m forall m a. Monoid m => (a -> m) -> h a -> m @@ -220,17 +220,17 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap a -> m -f) h (SimplePolygonF f a) -hs +f) h (SimplePolygonF f a) +hs -instance (Traversable h, Traversable f) => Traversable (PolygonalDomainF h f) where - traverse :: forall (f :: * -> *) a b. +instance (Traversable h, Traversable f) => Traversable (PolygonalDomainF h f) where + traverse :: forall (f :: * -> *) a b. Applicative f => (a -> f b) -> PolygonalDomainF h f a -> f (PolygonalDomainF h f b) -traverse a -> f b -f (PolygonalDomain SimplePolygonF f a -outer h (SimplePolygonF f a) -hs) = +traverse a -> f b +f (PolygonalDomain SimplePolygonF f a +outer h (SimplePolygonF f a) +hs) = SimplePolygonF f b -> h (SimplePolygonF f b) -> PolygonalDomainF h f b forall (h :: * -> *) (f :: * -> *) point. @@ -249,8 +249,8 @@ Applicative f => (a -> f b) -> SimplePolygonF f a -> f (SimplePolygonF f b) traverse a -> f b -f SimplePolygonF f a -outer f (h (SimplePolygonF f b) -> PolygonalDomainF h f b) +f SimplePolygonF f a +outer f (h (SimplePolygonF f b) -> PolygonalDomainF h f b) -> f (h (SimplePolygonF f b)) -> f (PolygonalDomainF h f b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b @@ -270,25 +270,25 @@ Applicative f => (a -> f b) -> SimplePolygonF f a -> f (SimplePolygonF f b) traverse a -> f b -f) h (SimplePolygonF f a) -hs +f) h (SimplePolygonF f a) +hs -instance (Foldable h, Foldable1 f) => Foldable1 (PolygonalDomainF h f) where - foldMap1 :: forall m a. Semigroup m => (a -> m) -> PolygonalDomainF h f a -> m -foldMap1 a -> m -f (PolygonalDomain SimplePolygonF f a -outer h (SimplePolygonF f a) -hs) = +instance (Foldable h, Foldable1 f) => Foldable1 (PolygonalDomainF h f) where + foldMap1 :: forall m a. Semigroup m => (a -> m) -> PolygonalDomainF h f a -> m +foldMap1 a -> m +f (PolygonalDomain SimplePolygonF f a +outer h (SimplePolygonF f a) +hs) = (a -> m) -> SimplePolygonF f a -> m forall m a. Semigroup m => (a -> m) -> SimplePolygonF f a -> m forall (t :: * -> *) m a. (Foldable1 t, Semigroup m) => (a -> m) -> t a -> m foldMap1 a -> m -f SimplePolygonF f a -outer m -> Maybe m -> m +f SimplePolygonF f a +outer m -> Maybe m -> m forall {b}. Semigroup b => b -> Maybe b -> b -`combine` (SimplePolygonF f a -> Maybe m) +`combine` (SimplePolygonF f a -> Maybe m) -> h (SimplePolygonF f a) -> Maybe m forall m a. Monoid m => (a -> m) -> h a -> m forall (t :: * -> *) m a. @@ -305,25 +305,25 @@ (Foldable1 t, Semigroup m) => (a -> m) -> t a -> m foldMap1 a -> m -f) h (SimplePolygonF f a) -hs +f) h (SimplePolygonF f a) +hs where - combine :: b -> Maybe b -> b -combine b -x0 = b -> (b -> b) -> Maybe b -> b + combine :: b -> Maybe b -> b +combine b +x0 = b -> (b -> b) -> Maybe b -> b forall b a. b -> (a -> b) -> Maybe a -> b maybe b -x0 (b -x0 <>) +x0 (b +x0 <>) -instance (Traversable h, Traversable1 f) => Traversable1 (PolygonalDomainF h f) where - traverse1 :: forall (f :: * -> *) a b. +instance (Traversable h, Traversable1 f) => Traversable1 (PolygonalDomainF h f) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> PolygonalDomainF h f a -> f (PolygonalDomainF h f b) -traverse1 a -> f b -f (PolygonalDomain SimplePolygonF f a -outer h (SimplePolygonF f a) -hs) = +traverse1 a -> f b +f (PolygonalDomain SimplePolygonF f a +outer h (SimplePolygonF f a) +hs) = SimplePolygonF f b -> h (SimplePolygonF f b) -> PolygonalDomainF h f b forall (h :: * -> *) (f :: * -> *) point. @@ -342,8 +342,8 @@ Apply f => (a -> f b) -> SimplePolygonF f a -> f (SimplePolygonF f b) traverse1 a -> f b -f SimplePolygonF f a -outer f (h (SimplePolygonF f b) -> PolygonalDomainF h f b) +f SimplePolygonF f a +outer f (h (SimplePolygonF f b) -> PolygonalDomainF h f b) -> MaybeApply f (h (SimplePolygonF f b)) -> f (PolygonalDomainF h f b) forall (f :: * -> *) a b. @@ -362,13 +362,13 @@ Apply f => (a -> f b) -> SimplePolygonF f a -> f (SimplePolygonF f b) traverse1 a -> f b -f) h (SimplePolygonF f a) -hs +f) h (SimplePolygonF f a) +hs -instance ( VertexContainer f point, Traversable h - ) => HasPoints (PolygonalDomainF h f point) - (PolygonalDomainF h f point') point point' where - allPoints :: forall (d :: Nat) r r'. +instance ( VertexContainer f point, Traversable h + ) => HasPoints (PolygonalDomainF h f point) + (PolygonalDomainF h f point') point point' where + allPoints :: forall (d :: Nat) r r'. (Point_ point d r, Point_ point' d r', NumType (PolygonalDomainF h f point) ~ r, NumType (PolygonalDomainF h f point') ~ r', @@ -379,7 +379,7 @@ (PolygonalDomainF h f point') point point' -allPoints = (point -> f point') +allPoints = (point -> f point') -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point') forall (f :: * -> *) a b. Traversable1 f => @@ -392,19 +392,19 @@ point' traversed1 -instance ( VertexContainer f point, Traversable h - , DefaultTransformByConstraints (PolygonalDomainF h f point) 2 r - , Point_ point 2 r - ) => IsTransformable (PolygonalDomainF h f point) +instance ( VertexContainer f point, Traversable h + , DefaultTransformByConstraints (PolygonalDomainF h f point) 2 r + , Point_ point 2 r + ) => IsTransformable (PolygonalDomainF h f point) -instance ( VertexContainer f point - , Point_ point 2 r - ) => IsBoxable (PolygonalDomainF h f point) where - boundingBox :: forall (d :: Nat) r. +instance ( VertexContainer f point + , Point_ point 2 r + ) => IsBoxable (PolygonalDomainF h f point) where + boundingBox :: forall (d :: Nat) r. (d ~ Dimension (PolygonalDomainF h f point), r ~ NumType (PolygonalDomainF h f point), Ord r) => PolygonalDomainF h f point -> Box (Point d r) -boundingBox = SimplePolygonF f point -> Box (Point d r) +boundingBox = SimplePolygonF f point -> Box (Point d r) forall (d :: Nat) r. (d ~ Dimension (SimplePolygonF f point), r ~ NumType (SimplePolygonF f point), Ord r) => @@ -434,15 +434,15 @@ outerBoundaryPolygon -instance ( HoleContainer h f point, VertexContainer f point - ) => HasVertices (PolygonalDomainF h f point) (PolygonalDomainF h f point') where - vertices :: IndexedTraversal1 +instance ( HoleContainer h f point, VertexContainer f point + ) => HasVertices (PolygonalDomainF h f point) (PolygonalDomainF h f point') where + vertices :: IndexedTraversal1 (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (PolygonalDomainF h f point') (Vertex (PolygonalDomainF h f point)) (Vertex (PolygonalDomainF h f point')) -vertices = ((p ~ (->)) => +vertices = ((p ~ (->)) => (point -> f point') -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point')) -> (p point (f point') @@ -476,7 +476,7 @@ Traversable1 f, Ixed (f a), HasDirectedTraversals f) => (VtxIx -> a -> f b) -> PolygonalDomainF h f a -> f (PolygonalDomainF h f b) -itraverse1 ((VtxIx -> point -> f point') +itraverse1 ((VtxIx -> point -> f point') -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point')) -> (p point (f point') -> VtxIx -> point -> f point') -> p point (f point') @@ -490,12 +490,12 @@ p a b -> i -> a -> b indexed) where - itraverse1 :: (VtxIx -> a -> f b) + itraverse1 :: (VtxIx -> a -> f b) -> PolygonalDomainF h f a -> f (PolygonalDomainF h f b) -itraverse1 VtxIx -> a -> f b -f (PolygonalDomain SimplePolygonF f a -outer h (SimplePolygonF f a) -hs) = +itraverse1 VtxIx -> a -> f b +f (PolygonalDomain SimplePolygonF f a +outer h (SimplePolygonF f a) +hs) = SimplePolygonF f b -> h (SimplePolygonF f b) -> PolygonalDomainF h f b forall (h :: * -> *) (f :: * -> *) point. @@ -538,8 +538,8 @@ (Vertex (SimplePolygonF f a)) (Vertex (SimplePolygonF f b)) vertices) VtxIx -> a -> f b -f SimplePolygonF f a -outer +f SimplePolygonF f a +outer f (h (SimplePolygonF f b) -> PolygonalDomainF h f b) -> MaybeApply f (h (SimplePolygonF f b)) -> f (PolygonalDomainF h f b) @@ -615,8 +615,8 @@ (Vertex (SimplePolygonF f a)) (Vertex (SimplePolygonF f b)) vertices) - (\VtxIx -i -> Either (f b) b -> MaybeApply f b + (\VtxIx +i -> Either (f b) b -> MaybeApply f b forall (f :: * -> *) a. Either (f a) a -> MaybeApply f a MaybeApply (Either (f b) b -> MaybeApply f b) -> (a -> Either (f b) b) -> a -> MaybeApply f b @@ -626,30 +626,30 @@ Left (f b -> Either (f b) b) -> (a -> f b) -> a -> Either (f b) b forall b c a. (b -> c) -> (a -> b) -> a -> c . VtxIx -> a -> f b -f VtxIx -i) +f VtxIx +i) h (SimplePolygonF f a) -hs +hs -- | Containers that stores holes must satisfy the following constraints: -type HoleContainer h f point = - ( TraversableWithIndex Int h - , Index (h (SimplePolygonF f point)) ~ Int - , IxValue (h (SimplePolygonF f point)) ~ SimplePolygonF f point - , Ixed (h (SimplePolygonF f point)) - , VertexContainer f point +type HoleContainer h f point = + ( TraversableWithIndex Int h + , Index (h (SimplePolygonF f point)) ~ Int + , IxValue (h (SimplePolygonF f point)) ~ SimplePolygonF f point + , Ixed (h (SimplePolygonF f point)) + , VertexContainer f point ) -instance ( HoleContainer h f point - ) => HasHoles (PolygonalDomainF h f point) where - type HoleIx (PolygonalDomainF h f point) = Int - type HoleF (PolygonalDomainF h f point) = f +instance ( HoleContainer h f point + ) => HasHoles (PolygonalDomainF h f point) where + type HoleIx (PolygonalDomainF h f point) = Int + type HoleF (PolygonalDomainF h f point) = f - holes :: IndexedTraversal' + holes :: IndexedTraversal' (HoleIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Hole (PolygonalDomainF h f point)) -holes = (h (SimplePolygonF f point) -> f (h (SimplePolygonF f point))) +holes = (h (SimplePolygonF f point) -> f (h (SimplePolygonF f point))) -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point) forall (h :: * -> *) (f :: * -> *) point (h' :: * -> *) (f :: * -> *). @@ -676,13 +676,13 @@ (SimplePolygonF f point) (SimplePolygonF f point) itraversed - holeAt :: HoleIx (PolygonalDomainF h f point) + holeAt :: HoleIx (PolygonalDomainF h f point) -> IndexedTraversal' (HoleIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Hole (PolygonalDomainF h f point)) -holeAt HoleIx (PolygonalDomainF h f point) -i = (h (SimplePolygonF f point) -> f (h (SimplePolygonF f point))) +holeAt HoleIx (PolygonalDomainF h f point) +i = (h (SimplePolygonF f point) -> f (h (SimplePolygonF f point))) -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point) forall (h :: * -> *) (f :: * -> *) point (h' :: * -> *) (f :: * -> *). @@ -707,12 +707,12 @@ Index m -> IndexedTraversal' (Index m) m (IxValue m) iix Index (h (SimplePolygonF f point)) HoleIx (PolygonalDomainF h f point) -i +i -- | The indices we use to identify vertices data VtxIx = Outer {-#UNPACK#-}!Int | Inner {-#UNPACK#-}!Int {-#UNPACK#-}!Int - deriving (Int -> VtxIx -> ShowS + deriving (Int -> VtxIx -> ShowS [VtxIx] -> ShowS VtxIx -> String (Int -> VtxIx -> ShowS) @@ -725,7 +725,7 @@ show :: VtxIx -> String $cshowList :: [VtxIx] -> ShowS showList :: [VtxIx] -> ShowS -Show,ReadPrec [VtxIx] +Show,ReadPrec [VtxIx] ReadPrec VtxIx Int -> ReadS VtxIx ReadS [VtxIx] @@ -745,14 +745,14 @@ readPrec :: ReadPrec VtxIx $creadListPrec :: ReadPrec [VtxIx] readListPrec :: ReadPrec [VtxIx] -Read,VtxIx -> VtxIx -> Bool +Read,VtxIx -> VtxIx -> Bool (VtxIx -> VtxIx -> Bool) -> (VtxIx -> VtxIx -> Bool) -> Eq VtxIx forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: VtxIx -> VtxIx -> Bool == :: VtxIx -> VtxIx -> Bool $c/= :: VtxIx -> VtxIx -> Bool /= :: VtxIx -> VtxIx -> Bool -Eq,Eq VtxIx +Eq,Eq VtxIx Eq VtxIx => (VtxIx -> VtxIx -> Ordering) -> (VtxIx -> VtxIx -> Bool) @@ -799,18 +799,18 @@ uncurry Int -> Int -> VtxIx Inner -instance HoleContainer h f point => HasVertices' (PolygonalDomainF h f point) where - type Vertex (PolygonalDomainF h f point) = point - type VertexIx (PolygonalDomainF h f point) = VtxIx +instance HoleContainer h f point => HasVertices' (PolygonalDomainF h f point) where + type Vertex (PolygonalDomainF h f point) = point + type VertexIx (PolygonalDomainF h f point) = VtxIx - vertexAt :: VertexIx (PolygonalDomainF h f point) + vertexAt :: VertexIx (PolygonalDomainF h f point) -> IndexedTraversal' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) -vertexAt = \case - Outer Int -j -> (Int -> VtxIx) +vertexAt = \case + Outer Int +j -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -868,10 +868,10 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt Int VertexIx (SimplePolygonF f point) -j - Inner Int -i Int -j -> ((Int, Int) -> VtxIx) +j + Inner Int +i Int +j -> ((Int, Int) -> VtxIx) -> (Indexed (Int, Int) (Vertex (PolygonalDomainF h f point)) @@ -915,7 +915,7 @@ -> IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) holeAt Int HoleIx (PolygonalDomainF h f point) -i (Indexed Int (SimplePolygonF f point) (f (SimplePolygonF f point)) +i (Indexed Int (SimplePolygonF f point) (f (SimplePolygonF f point)) -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point)) -> (Indexed Int point (f point) -> SimplePolygonF f point -> f (SimplePolygonF f point)) @@ -936,14 +936,14 @@ -> IndexedTraversal' (VertexIx graph) graph (Vertex graph) vertexAt Int VertexIx (SimplePolygonF f point) -j +j - numVertices :: PolygonalDomainF h f point -> Int -numVertices PolygonalDomainF h f point -pg = SimplePolygonF f point -> Int + numVertices :: PolygonalDomainF h f point -> Int +numVertices PolygonalDomainF h f point +pg = SimplePolygonF f point -> Int forall graph. HasVertices' graph => graph -> Int numVertices (PolygonalDomainF h f point -pgPolygonalDomainF h f point +pgPolygonalDomainF h f point -> Getting (SimplePolygonF f point) (PolygonalDomainF h f point) @@ -997,15 +997,15 @@ to SimplePolygonF f point -> Int forall graph. HasVertices' graph => graph -> Int numVertices) PolygonalDomainF h f point -pg +pg -instance ( HoleContainer h f point - ) => HasOuterBoundary (PolygonalDomainF h f point) where - outerBoundary :: IndexedTraversal1' +instance ( HoleContainer h f point + ) => HasOuterBoundary (PolygonalDomainF h f point) where + outerBoundary :: IndexedTraversal1' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) -outerBoundary = (Int -> VtxIx) +outerBoundary = (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1067,14 +1067,14 @@ (SimplePolygonF f point) (Vertex (SimplePolygonF f point)) outerBoundary - ccwOuterBoundaryFrom :: VertexIx (PolygonalDomainF h f point) + ccwOuterBoundaryFrom :: VertexIx (PolygonalDomainF h f point) -> IndexedTraversal1' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) -ccwOuterBoundaryFrom = \case - Outer Int -u -> (Int -> VtxIx) +ccwOuterBoundaryFrom = \case + Outer Int +u -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1132,9 +1132,9 @@ -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) ccwOuterBoundaryFrom Int VertexIx (SimplePolygonF f point) -u - VertexIx (PolygonalDomainF h f point) -u -> String +u + VertexIx (PolygonalDomainF h f point) +u -> String -> VtxIx -> p point (f point) -> PolygonalDomainF h f point @@ -1143,16 +1143,16 @@ error' String "ccwOuterBoundaryFrom" VertexIx (PolygonalDomainF h f point) VtxIx -u +u - cwOuterBoundaryFrom :: VertexIx (PolygonalDomainF h f point) + cwOuterBoundaryFrom :: VertexIx (PolygonalDomainF h f point) -> IndexedTraversal1' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) -cwOuterBoundaryFrom = \case - Outer Int -u -> (Int -> VtxIx) +cwOuterBoundaryFrom = \case + Outer Int +u -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1210,9 +1210,9 @@ -> IndexedTraversal1' (VertexIx polygon) polygon (Vertex polygon) cwOuterBoundaryFrom Int VertexIx (SimplePolygonF f point) -u - VertexIx (PolygonalDomainF h f point) -u -> String +u + VertexIx (PolygonalDomainF h f point) +u -> String -> VtxIx -> p point (f point) -> PolygonalDomainF h f point @@ -1221,16 +1221,16 @@ error' String "cwOuterBoundaryFrom" VertexIx (PolygonalDomainF h f point) VtxIx -u +u - outerBoundaryVertexAt :: VertexIx (PolygonalDomainF h f point) + outerBoundaryVertexAt :: VertexIx (PolygonalDomainF h f point) -> IndexedGetter (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) -outerBoundaryVertexAt = \case - Outer Int -u -> (Int -> VtxIx) +outerBoundaryVertexAt = \case + Outer Int +u -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1288,9 +1288,9 @@ -> IndexedGetter (VertexIx polygon) polygon (Vertex polygon) outerBoundaryVertexAt Int VertexIx (SimplePolygonF f point) -u - VertexIx (PolygonalDomainF h f point) -u -> String +u + VertexIx (PolygonalDomainF h f point) +u -> String -> VtxIx -> p point (f point) -> PolygonalDomainF h f point @@ -1299,15 +1299,15 @@ error' String "outerBoundaryVertexAt" VertexIx (PolygonalDomainF h f point) VtxIx -u +u - outerBoundaryEdges :: IndexedFold1 + outerBoundaryEdges :: IndexedFold1 (VertexIx (PolygonalDomainF h f point), VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point), Vertex (PolygonalDomainF h f point)) -outerBoundaryEdges = ((Int, Int) -> (VtxIx, VtxIx)) +outerBoundaryEdges = ((Int, Int) -> (VtxIx, VtxIx)) -> (Indexed (Int, Int) (Vertex (PolygonalDomainF h f point), @@ -1386,16 +1386,16 @@ (SimplePolygonF f point) (Vertex (SimplePolygonF f point), Vertex (SimplePolygonF f point)) outerBoundaryEdges - outerBoundaryEdgeAt :: VertexIx (PolygonalDomainF h f point) + outerBoundaryEdgeAt :: VertexIx (PolygonalDomainF h f point) -> IndexedGetter (VertexIx (PolygonalDomainF h f point), VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point), Vertex (PolygonalDomainF h f point)) -outerBoundaryEdgeAt = \case - Outer Int -u -> ((Int, Int) -> (VtxIx, VtxIx)) +outerBoundaryEdgeAt = \case + Outer Int +u -> ((Int, Int) -> (VtxIx, VtxIx)) -> (Indexed (Int, Int) (Vertex (PolygonalDomainF h f point), @@ -1469,9 +1469,9 @@ (Vertex polygon, Vertex polygon) outerBoundaryEdgeAt Int VertexIx (SimplePolygonF f point) -u - VertexIx (PolygonalDomainF h f point) -u -> String +u + VertexIx (PolygonalDomainF h f point) +u -> String -> VtxIx -> p (point, point) (f (point, point)) -> PolygonalDomainF h f point @@ -1480,19 +1480,19 @@ error' String "outerBoundaryVertexAt" VertexIx (PolygonalDomainF h f point) VtxIx -u +u -- | Helper to produce a more useful error message -error' :: String -> VtxIx -> a +error' :: String -> VtxIx -> a error' :: forall a. String -> VtxIx -> a -error' String -s VtxIx -u = String -> a +error' String +s VtxIx +u = String -> a forall a. HasCallStack => String -> a error (String -> a) -> String -> a forall a b. (a -> b) -> a -> b $ String -s String -> ShowS +s String -> ShowS forall a. Semigroup a => a -> a -> a <> String ", vertex " String -> ShowS @@ -1500,7 +1500,7 @@ <> VtxIx -> String forall a. Show a => a -> String show VtxIx -u String -> ShowS +u String -> ShowS forall a. Semigroup a => a -> a -> a <> String " not on outer boundary" @@ -1508,27 +1508,27 @@ -- | remap an edge on the outer boundary mapEdge :: (Int,Int) -> (VtxIx,VtxIx) mapEdge :: (Int, Int) -> (VtxIx, VtxIx) -mapEdge (Int -u,Int -v) = (Int -> VtxIx +mapEdge (Int +u,Int +v) = (Int -> VtxIx Outer Int -u, Int -> VtxIx +u, Int -> VtxIx Outer Int -v) +v) -instance ( Point_ point 2 r - , HasFromFoldable1 f - , HoleContainer h f point - ) => Polygon_ (PolygonalDomainF h f point) point r where - extremes :: (Num r, Ord r, Point_ point 2 r) => +instance ( Point_ point 2 r + , HasFromFoldable1 f + , HoleContainer h f point + ) => Polygon_ (PolygonalDomainF h f point) point r where + extremes :: (Num r, Ord r, Point_ point 2 r) => Vector 2 r -> PolygonalDomainF h f point -> (point, point) -extremes Vector 2 r -u = Vector 2 r -> SimplePolygonF f point -> (point, point) +extremes Vector 2 r +u = Vector 2 r -> SimplePolygonF f point -> (point, point) forall polygon point r. (Polygon_ polygon point r, Num r, Ord r, Point_ point 2 r) => Vector 2 r -> polygon -> (point, point) extremes Vector 2 r -u (SimplePolygonF f point -> (point, point)) +u (SimplePolygonF f point -> (point, point)) -> (PolygonalDomainF h f point -> SimplePolygonF f point) -> PolygonalDomainF h f point -> (point, point) @@ -1548,14 +1548,14 @@ (SimplePolygonF f point -> f (SimplePolygonF f point)) -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point) outerBoundaryPolygon - ccwPredecessorOf :: VertexIx (PolygonalDomainF h f point) + ccwPredecessorOf :: VertexIx (PolygonalDomainF h f point) -> IndexedLens' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) -ccwPredecessorOf = \case - Outer Int -u -> (Int -> VtxIx) +ccwPredecessorOf = \case + Outer Int +u -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1613,10 +1613,10 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwPredecessorOf Int VertexIx (SimplePolygonF f point) -u - Inner Int -i Int -j -> (Int -> VtxIx) +u + Inner Int +i Int +j -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1631,7 +1631,7 @@ (i -> j) -> (Indexed i a b -> r) -> p a b -> r reindexed (Int -> Int -> VtxIx Inner Int -i) ((Indexed +i) ((Indexed Int (Vertex (PolygonalDomainF h f point)) (f (Vertex (PolygonalDomainF h f point))) @@ -1674,7 +1674,7 @@ -> IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) holeAt Int HoleIx (PolygonalDomainF h f point) -i) ((SimplePolygonF f point -> f (SimplePolygonF f point)) +i) ((SimplePolygonF f point -> f (SimplePolygonF f point)) -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point)) -> (Indexed Int point (f point) -> SimplePolygonF f point -> f (SimplePolygonF f point)) @@ -1693,15 +1693,15 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwPredecessorOf Int VertexIx (SimplePolygonF f point) -j - ccwSuccessorOf :: VertexIx (PolygonalDomainF h f point) +j + ccwSuccessorOf :: VertexIx (PolygonalDomainF h f point) -> IndexedLens' (VertexIx (PolygonalDomainF h f point)) (PolygonalDomainF h f point) (Vertex (PolygonalDomainF h f point)) -ccwSuccessorOf = \case - Outer Int -u -> (Int -> VtxIx) +ccwSuccessorOf = \case + Outer Int +u -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1759,10 +1759,10 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwSuccessorOf Int VertexIx (SimplePolygonF f point) -u - Inner Int -i Int -j -> (Int -> VtxIx) +u + Inner Int +i Int +j -> (Int -> VtxIx) -> (Indexed Int (Vertex (PolygonalDomainF h f point)) @@ -1777,7 +1777,7 @@ (i -> j) -> (Indexed i a b -> r) -> p a b -> r reindexed (Int -> Int -> VtxIx Inner Int -i) ((Indexed +i) ((Indexed Int (Vertex (PolygonalDomainF h f point)) (f (Vertex (PolygonalDomainF h f point))) @@ -1820,7 +1820,7 @@ -> IndexedTraversal' (HoleIx polygon) polygon (Hole polygon) holeAt Int HoleIx (PolygonalDomainF h f point) -i) ((SimplePolygonF f point -> f (SimplePolygonF f point)) +i) ((SimplePolygonF f point -> f (SimplePolygonF f point)) -> PolygonalDomainF h f point -> f (PolygonalDomainF h f point)) -> (Indexed Int point (f point) -> SimplePolygonF f point -> f (SimplePolygonF f point)) @@ -1839,7 +1839,7 @@ -> IndexedLens' (VertexIx polygon) polygon (Vertex polygon) ccwSuccessorOf Int VertexIx (SimplePolygonF f point) -j +j {- @@ -1872,8 +1872,8 @@ -- | interpret a simple polygon as a Polygonal domain. -asSimplePolygon :: (HasFromFoldable h, HoleContainer h f point) - => Prism' (PolygonalDomainF h f point) (SimplePolygonF f point) +asSimplePolygon :: (HasFromFoldable h, HoleContainer h f point) + => Prism' (PolygonalDomainF h f point) (SimplePolygonF f point) asSimplePolygon :: forall (h :: * -> *) (f :: * -> *) point. (HasFromFoldable h, HoleContainer h f point) => Prism' (PolygonalDomainF h f point) (SimplePolygonF f point) @@ -1900,8 +1900,8 @@ forall a. [a] -> h a forall (f :: * -> *) a. HasFromFoldable f => [a] -> f a fromList [])) - (\PolygonalDomainF h f point -pd -> if Getting All (PolygonalDomainF h f point) (SimplePolygonF f point) + (\PolygonalDomainF h f point +pd -> if Getting All (PolygonalDomainF h f point) (SimplePolygonF f point) -> PolygonalDomainF h f point -> Bool forall s a. Getting All s a -> s -> Bool nullOf Getting All (PolygonalDomainF h f point) (SimplePolygonF f point) @@ -1917,10 +1917,10 @@ (PolygonalDomainF h f point) (Hole (PolygonalDomainF h f point)) holes PolygonalDomainF h f point -pd then SimplePolygonF f point -> Maybe (SimplePolygonF f point) +pd then SimplePolygonF f point -> Maybe (SimplePolygonF f point) forall a. a -> Maybe a Just (PolygonalDomainF h f point -pdPolygonalDomainF h f point +pdPolygonalDomainF h f point -> Getting (SimplePolygonF f point) (PolygonalDomainF h f point) diff --git a/haddocks/hgeometry/src/HGeometry.Polygon.html b/haddocks/hgeometry/src/HGeometry.Polygon.html index 8cacff449..53260a255 100644 --- a/haddocks/hgeometry/src/HGeometry.Polygon.html +++ b/haddocks/hgeometry/src/HGeometry.Polygon.html @@ -24,13 +24,13 @@ -------------------------------------------------------------------------------- -- | Try to convert the polygon into a triangle (whose vertices are given in CCW order). -asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point) +asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point) asTriangle :: forall polygon point r. Polygon_ polygon point r => polygon -> Maybe (Triangle point) -asTriangle polygon -pg = case polygon -pgpolygon -> Getting (Endo [point]) polygon point -> [point] +asTriangle polygon +pg = case polygon +pgpolygon -> Getting (Endo [point]) polygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) polygon point (Vertex polygon -> Const (Endo [point]) (Vertex polygon)) @@ -46,10 +46,10 @@ (Vertex polygon) (Vertex polygon) vertices of - [point -u,point -v,point -w] -> Triangle point -> Maybe (Triangle point) + [point +u,point +v,point +w] -> Triangle point -> Maybe (Triangle point) forall a. a -> Maybe a Just (Triangle point -> Maybe (Triangle point)) -> Triangle point -> Maybe (Triangle point) @@ -57,9 +57,9 @@ $ point -> point -> point -> Triangle point forall point. point -> point -> point -> Triangle point Triangle point -u point -v point -w +u point +v point +w [point] _ -> Maybe (Triangle point) forall a. Maybe a @@ -68,9 +68,9 @@ -- | The area of a polygon -- -- running time: \(O(n)\) -area :: ( Polygon_ polygon point r - , SimplePolygon_ (Hole polygon) point r - , Fractional r) => polygon -> r +area :: ( Polygon_ polygon point r + , SimplePolygon_ (Hole polygon) point r + , Fractional r) => polygon -> r area :: forall polygon point r. (Polygon_ polygon point r, SimplePolygon_ (Hole polygon) point r, Fractional r) => @@ -88,23 +88,23 @@ area2X -- | Computes the double area of a polygon -area2X :: ( Polygon_ polygon point r - , Num r - , Point_ point 2 r - , SimplePolygon_ (Hole polygon) point r - ) => polygon -> r +area2X :: ( Polygon_ polygon point r + , Num r + , Point_ point 2 r + , SimplePolygon_ (Hole polygon) point r + ) => polygon -> r area2X :: forall polygon point r. (Polygon_ polygon point r, Num r, Point_ point 2 r, SimplePolygon_ (Hole polygon) point r) => polygon -> r -area2X polygon -poly = polygon -> r +area2X polygon +poly = polygon -> r forall r simplePolygon point. (Num r, HasOuterBoundary simplePolygon, Point_ point 2 r, Vertex simplePolygon ~ point) => simplePolygon -> r signedArea2X polygon -poly r -> r -> r +poly r -> r -> r forall a. Num a => a -> a -> a - Getting (Endo (Endo r)) polygon r -> polygon -> r forall a s. Num a => Getting (Endo (Endo a)) s a -> s -> a @@ -138,5 +138,5 @@ Vertex simplePolygon ~ point) => simplePolygon -> r signedArea2X) polygon -poly +poly \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.RangeTree.Base.html b/haddocks/hgeometry/src/HGeometry.RangeTree.Base.html index dcdab9da7..359e8f98d 100644 --- a/haddocks/hgeometry/src/HGeometry.RangeTree.Base.html +++ b/haddocks/hgeometry/src/HGeometry.RangeTree.Base.html @@ -38,24 +38,24 @@ -------------------------------------------------------------------------------- -- | Type Representing a generic (1D) range-tree. -newtype RangeTree f point = RangeTree (SubTree f point (NumType point)) +newtype RangeTree f point = RangeTree (SubTree f point (NumType point)) -deriving instance (Show (f point), Show (NumType point)) => Show (RangeTree f point) -deriving instance (Eq (f point), Eq (NumType point)) => Eq (RangeTree f point) +deriving instance (Show (f point), Show (NumType point)) => Show (RangeTree f point) +deriving instance (Eq (f point), Eq (NumType point)) => Eq (RangeTree f point) -- | The actual tree type -type SubTree f point r = BinLeafTree (NodeData f point r) - (LeafData f point r) +type SubTree f point r = BinLeafTree (NodeData f point r) + (LeafData f point r) -- | Data stored at a leaf -data LeafData f point r = LeafData { forall {k} (f :: k -> *) (point :: k) r. LeafData f point r -> r -_thePoint :: !r +data LeafData f point r = LeafData { forall {k} (f :: k -> *) (point :: k) r. LeafData f point r -> r +_thePoint :: !r , forall {k} (f :: k -> *) (point :: k) r. LeafData f point r -> f point -_leafCanonical :: !(f point) - } deriving (Int -> LeafData f point r -> ShowS +_leafCanonical :: !(f point) + } deriving (Int -> LeafData f point r -> ShowS [LeafData f point r] -> ShowS LeafData f point r -> String (Int -> LeafData f point r -> ShowS) @@ -85,7 +85,7 @@ (Show r, Show (f point)) => [LeafData f point r] -> ShowS showList :: [LeafData f point r] -> ShowS -Show,LeafData f point r -> LeafData f point r -> Bool +Show,LeafData f point r -> LeafData f point r -> Bool (LeafData f point r -> LeafData f point r -> Bool) -> (LeafData f point r -> LeafData f point r -> Bool) -> Eq (LeafData f point r) @@ -101,7 +101,7 @@ (Eq r, Eq (f point)) => LeafData f point r -> LeafData f point r -> Bool /= :: LeafData f point r -> LeafData f point r -> Bool -Eq,Eq (LeafData f point r) +Eq,Eq (LeafData f point r) Eq (LeafData f point r) => (LeafData f point r -> LeafData f point r -> Ordering) -> (LeafData f point r -> LeafData f point r -> Bool) @@ -164,7 +164,7 @@ (Ord r, Ord (f point)) => LeafData f point r -> LeafData f point r -> LeafData f point r min :: LeafData f point r -> LeafData f point r -> LeafData f point r -Ord,(forall a b. (a -> b) -> LeafData f point a -> LeafData f point b) +Ord,(forall a b. (a -> b) -> LeafData f point a -> LeafData f point b) -> (forall a b. a -> LeafData f point b -> LeafData f point a) -> Functor (LeafData f point) forall a b. a -> LeafData f point b -> LeafData f point a @@ -182,7 +182,7 @@ $c<$ :: forall k (f :: k -> *) (point :: k) a b. a -> LeafData f point b -> LeafData f point a <$ :: forall a b. a -> LeafData f point b -> LeafData f point a -Functor,(forall m. Monoid m => LeafData f point m -> m) +Functor,(forall m. Monoid m => LeafData f point m -> m) -> (forall m a. Monoid m => (a -> m) -> LeafData f point a -> m) -> (forall m a. Monoid m => (a -> m) -> LeafData f point a -> m) -> (forall a b. (a -> b -> b) -> b -> LeafData f point a -> b) @@ -310,7 +310,7 @@ Num a => LeafData f point a -> a product :: forall a. Num a => LeafData f point a -> a -Foldable,Functor (LeafData f point) +Foldable,Functor (LeafData f point) Foldable (LeafData f point) (Functor (LeafData f point), Foldable (LeafData f point)) => (forall (f :: * -> *) a b. @@ -390,7 +390,7 @@ Traversable) -- | Access the point stored in this leaf. -thePoint :: Lens (LeafData f point r) (LeafData f point s) r s +thePoint :: Lens (LeafData f point r) (LeafData f point s) r s thePoint :: forall {k} (f :: k -> *) (point :: k) r s (f :: * -> *). Functor f => (r -> f s) -> LeafData f point r -> f (LeafData f point s) @@ -400,14 +400,14 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens LeafData f point r -> r forall {k} (f :: k -> *) (point :: k) r. LeafData f point r -> r -_thePoint (\LeafData f point r -ld s -p -> LeafData f point r -ld { _thePoint = p}) +_thePoint (\LeafData f point r +ld s +p -> LeafData f point r +ld { _thePoint = p}) -instance HasCanonicalSubSet (LeafData f point r) (LeafData g point r) point f g where - canonicalSubSet :: Lens (LeafData f point r) (LeafData g point r) (f point) (g point) -canonicalSubSet = (LeafData f point r -> f point) +instance HasCanonicalSubSet (LeafData f point r) (LeafData g point r) point f g where + canonicalSubSet :: Lens (LeafData f point r) (LeafData g point r) (f point) (g point) +canonicalSubSet = (LeafData f point r -> f point) -> (LeafData f point r -> g point -> LeafData g point r) -> Lens (LeafData f point r) (LeafData g point r) (f point) (g point) @@ -415,23 +415,23 @@ lens LeafData f point r -> f point forall {k} (f :: k -> *) (point :: k) r. LeafData f point r -> f point -_leafCanonical (\(LeafData r -p f point -_) g point -cs -> r -> g point -> LeafData g point r +_leafCanonical (\(LeafData r +p f point +_) g point +cs -> r -> g point -> LeafData g point r forall {k} (f :: k -> *) (point :: k) r. r -> f point -> LeafData f point r LeafData r -p g point -cs) +p g point +cs) -- | The data stored at an internal node. -data NodeData f point r = NodeData { forall {k} (f :: k -> *) (point :: k) r. NodeData f point r -> r -_split :: !r +data NodeData f point r = NodeData { forall {k} (f :: k -> *) (point :: k) r. NodeData f point r -> r +_split :: !r , forall {k} (f :: k -> *) (point :: k) r. NodeData f point r -> f point -_canonicalSubSet :: !(f point) - } deriving (Int -> NodeData f point r -> ShowS +_canonicalSubSet :: !(f point) + } deriving (Int -> NodeData f point r -> ShowS [NodeData f point r] -> ShowS NodeData f point r -> String (Int -> NodeData f point r -> ShowS) @@ -461,7 +461,7 @@ (Show r, Show (f point)) => [NodeData f point r] -> ShowS showList :: [NodeData f point r] -> ShowS -Show,NodeData f point r -> NodeData f point r -> Bool +Show,NodeData f point r -> NodeData f point r -> Bool (NodeData f point r -> NodeData f point r -> Bool) -> (NodeData f point r -> NodeData f point r -> Bool) -> Eq (NodeData f point r) @@ -477,7 +477,7 @@ (Eq r, Eq (f point)) => NodeData f point r -> NodeData f point r -> Bool /= :: NodeData f point r -> NodeData f point r -> Bool -Eq,Eq (NodeData f point r) +Eq,Eq (NodeData f point r) Eq (NodeData f point r) => (NodeData f point r -> NodeData f point r -> Ordering) -> (NodeData f point r -> NodeData f point r -> Bool) @@ -540,7 +540,7 @@ (Ord r, Ord (f point)) => NodeData f point r -> NodeData f point r -> NodeData f point r min :: NodeData f point r -> NodeData f point r -> NodeData f point r -Ord,(forall a b. (a -> b) -> NodeData f point a -> NodeData f point b) +Ord,(forall a b. (a -> b) -> NodeData f point a -> NodeData f point b) -> (forall a b. a -> NodeData f point b -> NodeData f point a) -> Functor (NodeData f point) forall a b. a -> NodeData f point b -> NodeData f point a @@ -558,7 +558,7 @@ $c<$ :: forall k (f :: k -> *) (point :: k) a b. a -> NodeData f point b -> NodeData f point a <$ :: forall a b. a -> NodeData f point b -> NodeData f point a -Functor,(forall m. Monoid m => NodeData f point m -> m) +Functor,(forall m. Monoid m => NodeData f point m -> m) -> (forall m a. Monoid m => (a -> m) -> NodeData f point a -> m) -> (forall m a. Monoid m => (a -> m) -> NodeData f point a -> m) -> (forall a b. (a -> b -> b) -> b -> NodeData f point a -> b) @@ -686,7 +686,7 @@ Num a => NodeData f point a -> a product :: forall a. Num a => NodeData f point a -> a -Foldable,Functor (NodeData f point) +Foldable,Functor (NodeData f point) Foldable (NodeData f point) (Functor (NodeData f point), Foldable (NodeData f point)) => (forall (f :: * -> *) a b. @@ -766,7 +766,7 @@ Traversable) -- | Access the split value of a NodeData -split :: Lens (NodeData f point r) (NodeData f point s) r s +split :: Lens (NodeData f point r) (NodeData f point s) r s split :: forall {k} (f :: k -> *) (point :: k) r s (f :: * -> *). Functor f => (r -> f s) -> NodeData f point r -> f (NodeData f point s) @@ -776,13 +776,13 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens NodeData f point r -> r forall {k} (f :: k -> *) (point :: k) r. NodeData f point r -> r -_split (\NodeData f point r -nd s -x -> NodeData f point r -nd { _split = x }) +_split (\NodeData f point r +nd s +x -> NodeData f point r +nd { _split = x }) -instance HasCanonicalSubSet (NodeData f point r) (NodeData g point r) point f g where - canonicalSubSet :: Lens (NodeData f point r) (NodeData g point r) (f point) (g point) +instance HasCanonicalSubSet (NodeData f point r) (NodeData g point r) point f g where + canonicalSubSet :: Lens (NodeData f point r) (NodeData g point r) (f point) (g point) canonicalSubSet = (NodeData f point r -> f point) -> (NodeData f point r -> g point -> NodeData g point r) -> Lens @@ -791,25 +791,25 @@ lens NodeData f point r -> f point forall {k} (f :: k -> *) (point :: k) r. NodeData f point r -> f point -_canonicalSubSet (\(NodeData r -x f point -_) g point -cs -> r -> g point -> NodeData g point r +_canonicalSubSet (\(NodeData r +x f point +_) g point +cs -> r -> g point -> NodeData g point r forall {k} (f :: k -> *) (point :: k) r. r -> f point -> NodeData f point r NodeData r -x g point -cs) +x g point +cs) -instance HasCanonicalSubSet (SubTree f point r) (SubTree f point r) point f f where +instance HasCanonicalSubSet (SubTree f point r) (SubTree f point r) point f f where -- | Sets the node data of the root - canonicalSubSet :: Lens (SubTree f point r) (SubTree f point r) (f point) (f point) + canonicalSubSet :: Lens (SubTree f point r) (SubTree f point r) (f point) (f point) canonicalSubSet = (SubTree f point r -> f point) -> (SubTree f point r -> f point -> SubTree f point r) -> Lens (SubTree f point r) (SubTree f point r) (f point) (f point) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens SubTree f point r -> f point -get'' ((f point -> SubTree f point r -> SubTree f point r) +get'' ((f point -> SubTree f point r -> SubTree f point r) -> SubTree f point r -> f point -> SubTree f point r forall a b c. (a -> b -> c) -> b -> a -> c flip f point -> SubTree f point r -> SubTree f point r @@ -817,13 +817,13 @@ {f :: k -> *}. (HasCanonicalSubSet a a a f g, HasCanonicalSubSet a a a f g) => g a -> BinLeafTree a a -> BinLeafTree a a -set'') +set'') where - get'' :: SubTree f point r -> f point -get'' = \case - Leaf LeafData f point r -ld -> LeafData f point r -ldLeafData f point r + get'' :: SubTree f point r -> f point +get'' = \case + Leaf LeafData f point r +ld -> LeafData f point r +ldLeafData f point r -> Getting (f point) (LeafData f point r) (f point) -> f point forall s a. s -> Getting a s a -> a ^.Getting (f point) (LeafData f point r) (f point) @@ -833,10 +833,10 @@ Lens (LeafData f point r) (LeafData f point r) (f point) (f point) canonicalSubSet Node SubTree f point r -_ NodeData f point r -nd SubTree f point r +_ NodeData f point r +nd SubTree f point r _ -> NodeData f point r -ndNodeData f point r +ndNodeData f point r -> Getting (f point) (NodeData f point r) (f point) -> f point forall s a. s -> Getting a s a -> a ^.Getting (f point) (NodeData f point r) (f point) @@ -845,16 +845,16 @@ Lens s t (f a) (g a) Lens (NodeData f point r) (NodeData f point r) (f point) (f point) canonicalSubSet - set'' :: g a -> BinLeafTree a a -> BinLeafTree a a -set'' g a -cs = \case - Leaf a -ld -> a -> BinLeafTree a a + set'' :: g a -> BinLeafTree a a -> BinLeafTree a a +set'' g a +cs = \case + Leaf a +ld -> a -> BinLeafTree a a forall v a. a -> BinLeafTree v a Leaf (a -> BinLeafTree a a) -> a -> BinLeafTree a a forall a b. (a -> b) -> a -> b $ a -lda -> (a -> a) -> a +lda -> (a -> a) -> a forall a b. a -> (a -> b) -> b &(f a -> Identity (g a)) -> a -> Identity a forall {k} s t (a :: k) (f :: k -> *) (g :: k -> *). @@ -864,16 +864,16 @@ canonicalSubSet ((f a -> Identity (g a)) -> a -> Identity a) -> g a -> a -> a forall s t a b. ASetter s t a b -> b -> s -> t .~ g a -cs - Node BinLeafTree a a -l a -nd BinLeafTree a a -r -> BinLeafTree a a -> a -> BinLeafTree a a -> BinLeafTree a a +cs + Node BinLeafTree a a +l a +nd BinLeafTree a a +r -> BinLeafTree a a -> a -> BinLeafTree a a -> BinLeafTree a a forall v a. BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a Node BinLeafTree a a -l (a -nda -> (a -> a) -> a +l (a +nda -> (a -> a) -> a forall a b. a -> (a -> b) -> b &(f a -> Identity (g a)) -> a -> Identity a forall {k} s t (a :: k) (f :: k -> *) (g :: k -> *). @@ -883,16 +883,16 @@ canonicalSubSet ((f a -> Identity (g a)) -> a -> Identity a) -> g a -> a -> a forall s t a b. ASetter s t a b -> b -> s -> t .~ g a -cs) BinLeafTree a a -r +cs) BinLeafTree a a +r -- | Construct a rangetree on n points. -- -- \(O(n\log n)\) -buildRangeTree :: ( Foldable1 g, Point_ point d r, Ord r, 1 <= d - , Semigroup (f point), Measured f point - ) => g point -> RangeTree f point +buildRangeTree :: ( Foldable1 g, Point_ point d r, Ord r, 1 <= d + , Semigroup (f point), Measured f point + ) => g point -> RangeTree f point buildRangeTree :: forall (g :: * -> *) point (d :: Nat) r (f :: * -> *). (Foldable1 g, Point_ point d r, Ord r, 1 <= d, Semigroup (f point), Measured f point) => @@ -952,9 +952,9 @@ -- -- The running time and space depends on the monoid used. In particlar, we use (<>) at -- every internal node. -fromAscList :: ( Foldable1 g, Functor g, Point_ point d r, 1 <= d - , Semigroup (f point), Measured f point - ) => g point -> RangeTree f point +fromAscList :: ( Foldable1 g, Functor g, Point_ point d r, 1 <= d + , Semigroup (f point), Measured f point + ) => g point -> RangeTree f point fromAscList :: forall (g :: * -> *) point (d :: Nat) r (f :: * -> *). (Foldable1 g, Functor g, Point_ point d r, 1 <= d, Semigroup (f point), Measured f point) => @@ -976,9 +976,9 @@ :| []) -- | Given the points in groups per x-coordinate, in increasing order of x-coordinate -fromGroupedAscList :: ( Foldable1 g, Foldable1 h, Point_ point d r, 1 <= d - , Semigroup (f point), Measured f point - ) => g (h point) -> RangeTree f point +fromGroupedAscList :: ( Foldable1 g, Foldable1 h, Point_ point d r, 1 <= d + , Semigroup (f point), Measured f point + ) => g (h point) -> RangeTree f point fromGroupedAscList :: forall (g :: * -> *) (h :: * -> *) point (d :: Nat) r (f :: * -> *). (Foldable1 g, Foldable1 h, Point_ point d r, 1 <= d, @@ -1032,7 +1032,7 @@ -> p -> (BinLeafTree (NodeData f point r) a, b) -> (BinLeafTree (NodeData f point r) a, b) -node' h point +node' h point -> (BinLeafTree (NodeData f point r) (LeafData f point r), r) h point -> (BinLeafTree @@ -1047,7 +1047,7 @@ t point -> (BinLeafTree v (LeafData f point (NumType point)), NumType point) -leaf' (BinLeafTree (Count (h point)) (h point) +leaf' (BinLeafTree (Count (h point)) (h point) -> (BinLeafTree (NodeData f point r) (LeafData f point r), r)) -> (g (h point) -> BinLeafTree (Count (h point)) (h point)) -> g (h point) @@ -1059,12 +1059,12 @@ f a -> BinLeafTree (Count a) a asBalancedBinLeafTree where - leaf' :: t point + leaf' :: t point -> (BinLeafTree v (LeafData f point (NumType point)), NumType point) -leaf' t point -pts = let p :: point -p = NonEmpty point -> point +leaf' t point +pts = let p :: point +p = NonEmpty point -> point forall a. NonEmpty a -> a NonEmpty.head (NonEmpty point -> point) -> NonEmpty point -> point forall a b. (a -> b) -> a -> b @@ -1072,10 +1072,10 @@ forall a. t a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty t point -pts - x :: NumType point -x = point -ppoint +pts + x :: NumType point +x = point +ppoint -> Getting (NumType point) point (NumType point) -> NumType point forall s a. s -> Getting a s a -> a ^.Getting (NumType point) point (NumType point) @@ -1084,8 +1084,8 @@ IndexedLens' Int point r IndexedLens' Int point (NumType point) xCoord - m :: f point -m = (point -> f point) -> t point -> f point + m :: f point +m = (point -> f point) -> t point -> f point forall m a. Semigroup m => (a -> m) -> t a -> m forall (t :: * -> *) m a. (Foldable1 t, Semigroup m) => @@ -1093,7 +1093,7 @@ foldMap1 point -> f point forall (f :: * -> *) a. Measured f a => a -> f a measure t point -pts +pts in (LeafData f point (NumType point) -> BinLeafTree v (LeafData f point (NumType point)) forall v a. a -> BinLeafTree v a @@ -1106,33 +1106,33 @@ forall {k} (f :: k -> *) (point :: k) r. r -> f point -> LeafData f point r LeafData NumType point -x f point -m, NumType point -x) - node' :: (BinLeafTree (NodeData f point r) a, r) +x f point +m, NumType point +x) + node' :: (BinLeafTree (NodeData f point r) a, r) -> p -> (BinLeafTree (NodeData f point r) a, b) -> (BinLeafTree (NodeData f point r) a, b) -node' (BinLeafTree (NodeData f point r) a -l,r -m) p -_ (BinLeafTree (NodeData f point r) a -r,b -m') = ( BinLeafTree (NodeData f point r) a +node' (BinLeafTree (NodeData f point r) a +l,r +m) p +_ (BinLeafTree (NodeData f point r) a +r,b +m') = ( BinLeafTree (NodeData f point r) a -> NodeData f point r -> BinLeafTree (NodeData f point r) a -> BinLeafTree (NodeData f point r) a forall v a. BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a Node BinLeafTree (NodeData f point r) a -l (r -> f point -> NodeData f point r +l (r -> f point -> NodeData f point r forall {k} (f :: k -> *) (point :: k) r. r -> f point -> NodeData f point r NodeData r -m (f point -> NodeData f point r) -> f point -> NodeData f point r +m (f point -> NodeData f point r) -> f point -> NodeData f point r forall a b. (a -> b) -> a -> b $ BinLeafTree (NodeData f point r) a -lBinLeafTree (NodeData f point r) a +lBinLeafTree (NodeData f point r) a -> Getting (f point) (BinLeafTree (NodeData f point r) a) (f point) -> f point forall s a. s -> Getting a s a -> a @@ -1148,7 +1148,7 @@ canonicalSubSet f point -> f point -> f point forall a. Semigroup a => a -> a -> a <> BinLeafTree (NodeData f point r) a -rBinLeafTree (NodeData f point r) a +rBinLeafTree (NodeData f point r) a -> Getting (f point) (BinLeafTree (NodeData f point r) a) (f point) -> f point forall s a. s -> Getting a s a -> a @@ -1162,40 +1162,40 @@ (f point) (f point) canonicalSubSet) BinLeafTree (NodeData f point r) a -r +r , b -m' +m' ) -- | Report the canonical subsets of the nodes that together represent the query interval. -- -- \(O(\log n)\) -rangeQuery :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) - => interval -> RangeTree f point -> [f point] +rangeQuery :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) + => interval -> RangeTree f point -> [f point] rangeQuery :: forall interval r point (d :: Nat) (f :: * -> *). (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) => interval -> RangeTree f point -> [f point] -rangeQuery interval -q (RangeTree SubTree f point (NumType point) -t0) = BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) +rangeQuery interval +q (RangeTree SubTree f point (NumType point) +t0) = BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] +findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) SubTree f point (NumType point) -t0 +t0 where -- - findSplitNode :: BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) -t = case BinLeafTree (NodeData f point r) (LeafData f point r) -t of - Leaf LeafData f point r -ld -> LeafData f point r -> [f point] -goReport LeafData f point r -ld - Node BinLeafTree (NodeData f point r) (LeafData f point r) -l NodeData f point r -nd BinLeafTree (NodeData f point r) (LeafData f point r) -r -> case (NodeData f point r -ndNodeData f point r -> Getting r (NodeData f point r) r -> r + findSplitNode :: BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] +findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) +t = case BinLeafTree (NodeData f point r) (LeafData f point r) +t of + Leaf LeafData f point r +ld -> LeafData f point r -> [f point] +goReport LeafData f point r +ld + Node BinLeafTree (NodeData f point r) (LeafData f point r) +l NodeData f point r +nd BinLeafTree (NodeData f point r) (LeafData f point r) +r -> case (NodeData f point r +ndNodeData f point r -> Getting r (NodeData f point r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (NodeData f point r) r forall {k} (f :: k -> *) (point :: k) r s (f :: * -> *). @@ -1206,30 +1206,30 @@ (Ord r, Interval_ interval r) => r -> interval -> Ordering `compareInterval` interval -q of +q of Ordering LT -> BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) -r +findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) +r Ordering EQ -> BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportRightSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) -l [f point] -> [f point] -> [f point] +reportRightSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) +l [f point] -> [f point] -> [f point] forall a. Semigroup a => a -> a -> a <> BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportLeftSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) -r +reportLeftSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) +r Ordering GT -> BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) -l +findSplitNode BinLeafTree (NodeData f point r) (LeafData f point r) +l -- | Report a leaf (if needed) - goReport :: LeafData f point r -> [f point] -goReport LeafData f point r -ld + goReport :: LeafData f point r -> [f point] +goReport LeafData f point r +ld | (LeafData f point r -ldLeafData f point r -> Getting r (LeafData f point r) r -> r +ldLeafData f point r -> Getting r (LeafData f point r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (LeafData f point r) r forall {k} (f :: k -> *) (point :: k) r s (f :: * -> *). @@ -1240,8 +1240,8 @@ (Ord r, Interval_ interval r) => r -> interval -> Bool `stabsInterval` interval -q = [LeafData f point r -ldLeafData f point r +q = [LeafData f point r +ldLeafData f point r -> Getting (f point) (LeafData f point r) (f point) -> f point forall s a. s -> Getting a s a -> a ^.Getting (f point) (LeafData f point r) (f point) @@ -1254,17 +1254,17 @@ otherwise = [] -- | walk the left-path reporting the right subtrees - reportRightSubtrees :: BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportRightSubtrees = \case - Leaf LeafData f point r -ld -> LeafData f point r -> [f point] -goReport LeafData f point r -ld - Node BinLeafTree (NodeData f point r) (LeafData f point r) -l NodeData f point r -nd BinLeafTree (NodeData f point r) (LeafData f point r) -r -> case (NodeData f point r -ndNodeData f point r -> Getting r (NodeData f point r) r -> r + reportRightSubtrees :: BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] +reportRightSubtrees = \case + Leaf LeafData f point r +ld -> LeafData f point r -> [f point] +goReport LeafData f point r +ld + Node BinLeafTree (NodeData f point r) (LeafData f point r) +l NodeData f point r +nd BinLeafTree (NodeData f point r) (LeafData f point r) +r -> case (NodeData f point r +ndNodeData f point r -> Getting r (NodeData f point r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (NodeData f point r) r forall {k} (f :: k -> *) (point :: k) r s (f :: * -> *). @@ -1275,19 +1275,19 @@ (Ord r, Interval_ interval r) => r -> interval -> Ordering `compareInterval` interval -q of +q of Ordering LT -> BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportRightSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) -r +reportRightSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) +r Ordering EQ -> BinLeafTree (NodeData f point r) (LeafData f point r) -> f point -reportSubTree BinLeafTree (NodeData f point r) (LeafData f point r) -r f point -> [f point] -> [f point] +reportSubTree BinLeafTree (NodeData f point r) (LeafData f point r) +r f point -> [f point] -> [f point] forall a. a -> [a] -> [a] : BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportRightSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) -l +reportRightSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) +l Ordering GT -> String -> [f point] forall a. HasCallStack => String -> a @@ -1295,17 +1295,17 @@ "RangeTree.rangeQuery, reportRightSubtrees absurd" -- | walk the right-path reporting left subtrees - reportLeftSubtrees :: BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportLeftSubtrees = \case - Leaf LeafData f point r -ld -> LeafData f point r -> [f point] -goReport LeafData f point r -ld - Node BinLeafTree (NodeData f point r) (LeafData f point r) -l NodeData f point r -nd BinLeafTree (NodeData f point r) (LeafData f point r) -r -> case (NodeData f point r -ndNodeData f point r -> Getting r (NodeData f point r) r -> r + reportLeftSubtrees :: BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] +reportLeftSubtrees = \case + Leaf LeafData f point r +ld -> LeafData f point r -> [f point] +goReport LeafData f point r +ld + Node BinLeafTree (NodeData f point r) (LeafData f point r) +l NodeData f point r +nd BinLeafTree (NodeData f point r) (LeafData f point r) +r -> case (NodeData f point r +ndNodeData f point r -> Getting r (NodeData f point r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (NodeData f point r) r forall {k} (f :: k -> *) (point :: k) r s (f :: * -> *). @@ -1316,7 +1316,7 @@ (Ord r, Interval_ interval r) => r -> interval -> Ordering `compareInterval` interval -q of +q of Ordering LT -> String -> [f point] forall a. HasCallStack => String -> a @@ -1324,23 +1324,23 @@ "RangeTree.rangeQuery, reportLeftSubtrees absurd" Ordering EQ -> BinLeafTree (NodeData f point r) (LeafData f point r) -> f point -reportSubTree BinLeafTree (NodeData f point r) (LeafData f point r) -l f point -> [f point] -> [f point] +reportSubTree BinLeafTree (NodeData f point r) (LeafData f point r) +l f point -> [f point] -> [f point] forall a. a -> [a] -> [a] : BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportLeftSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) -r +reportLeftSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) +r Ordering GT -> BinLeafTree (NodeData f point r) (LeafData f point r) -> [f point] -reportLeftSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) -l +reportLeftSubtrees BinLeafTree (NodeData f point r) (LeafData f point r) +l -- | report the canonical subset of the node - reportSubTree :: BinLeafTree (NodeData f point r) (LeafData f point r) -> f point -reportSubTree = \case - Leaf LeafData f point r -ld -> LeafData f point r -ldLeafData f point r + reportSubTree :: BinLeafTree (NodeData f point r) (LeafData f point r) -> f point +reportSubTree = \case + Leaf LeafData f point r +ld -> LeafData f point r +ldLeafData f point r -> Getting (f point) (LeafData f point r) (f point) -> f point forall s a. s -> Getting a s a -> a ^.Getting (f point) (LeafData f point r) (f point) @@ -1350,10 +1350,10 @@ Lens (LeafData f point r) (LeafData f point r) (f point) (f point) canonicalSubSet Node BinLeafTree (NodeData f point r) (LeafData f point r) -_ NodeData f point r -nd BinLeafTree (NodeData f point r) (LeafData f point r) +_ NodeData f point r +nd BinLeafTree (NodeData f point r) (LeafData f point r) _ -> NodeData f point r -ndNodeData f point r +ndNodeData f point r -> Getting (f point) (NodeData f point r) (f point) -> f point forall s a. s -> Getting a s a -> a ^.Getting (f point) (NodeData f point r) (f point) @@ -1368,14 +1368,14 @@ -- -- \(O(\log n + k)\), where \(k\) is somehow depends on the output size (and the monoid -- used). -query :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r, Monoid (f point)) - => interval -> RangeTree f point -> f point +query :: (Interval_ interval r, Point_ point d r, 1 <= d, Ord r, Monoid (f point)) + => interval -> RangeTree f point -> f point query :: forall interval r point (d :: Nat) (f :: * -> *). (Interval_ interval r, Point_ point d r, 1 <= d, Ord r, Monoid (f point)) => interval -> RangeTree f point -> f point -query interval -q = [f point] -> f point +query interval +q = [f point] -> f point forall a. Monoid a => [a] -> a mconcat ([f point] -> f point) -> (RangeTree f point -> [f point]) -> RangeTree f point -> f point @@ -1385,5 +1385,5 @@ (Interval_ interval r, Point_ point d r, 1 <= d, Ord r) => interval -> RangeTree f point -> [f point] rangeQuery interval -q +q \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.SegmentTree.Base.html b/haddocks/hgeometry/src/HGeometry.SegmentTree.Base.html index ae72e7a79..97f83925f 100644 --- a/haddocks/hgeometry/src/HGeometry.SegmentTree.Base.html +++ b/haddocks/hgeometry/src/HGeometry.SegmentTree.Base.html @@ -42,25 +42,25 @@ -------------------------------------------------------------------------------- -- | A Segment tree -newtype SegmentTree f interval = SegmentTree (SubTree f interval) +newtype SegmentTree f interval = SegmentTree (SubTree f interval) -type instance NumType (SegmentTree f interval) = NumType interval -type instance Dimension (SegmentTree f interval) = 1 +type instance NumType (SegmentTree f interval) = NumType interval +type instance Dimension (SegmentTree f interval) = 1 -- | The actual segment tree immplementation -type SubTree f interval = BinLeafTree (NodeData f interval) - (ElementaryInterval (NumType interval) (f interval)) +type SubTree f interval = BinLeafTree (NodeData f interval) + (ElementaryInterval (NumType interval) (f interval)) -deriving stock instance ( Show (NumType interval), Show (f interval) - ) => Show (SegmentTree f interval) +deriving stock instance ( Show (NumType interval), Show (f interval) + ) => Show (SegmentTree f interval) -deriving stock instance ( Eq (NumType interval), Eq (f interval) - ) => Eq (SegmentTree f interval) +deriving stock instance ( Eq (NumType interval), Eq (f interval) + ) => Eq (SegmentTree f interval) -- | Get the interval of a subtree -interval :: Getter (SubTree f interval) (Interval AnEndPoint (NumType interval)) +interval :: Getter (SubTree f interval) (Interval AnEndPoint (NumType interval)) interval :: forall (f :: * -> *) interval (f :: * -> *). (Contravariant f, Functor f) => (Interval AnEndPoint (NumType interval) @@ -107,14 +107,14 @@ (ElementaryInterval (NumType interval) (f interval))) forall a b. (a -> b) -> a -> b $ \case - Leaf ElementaryInterval (NumType interval) (f interval) -atomic -> AnEndPoint (NumType interval) + Leaf ElementaryInterval (NumType interval) (f interval) +atomic -> AnEndPoint (NumType interval) -> AnEndPoint (NumType interval) -> Interval AnEndPoint (NumType interval) forall {k} (endPoint :: k -> *) (r :: k). endPoint r -> endPoint r -> Interval endPoint r Interval (ElementaryInterval (NumType interval) (f interval) -atomicElementaryInterval (NumType interval) (f interval) +atomicElementaryInterval (NumType interval) (f interval) -> Getting (AnEndPoint (NumType interval)) (ElementaryInterval (NumType interval) (f interval)) @@ -130,7 +130,7 @@ (ElementaryInterval (NumType interval) (f interval)) (AnEndPoint (NumType interval)) startPoint) (ElementaryInterval (NumType interval) (f interval) -atomicElementaryInterval (NumType interval) (f interval) +atomicElementaryInterval (NumType interval) (f interval) -> Getting (AnEndPoint (NumType interval)) (ElementaryInterval (NumType interval) (f interval)) @@ -149,12 +149,12 @@ Node BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -_ NodeData f interval -nd BinLeafTree +_ NodeData f interval +nd BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) _ -> NodeData f interval -ndNodeData f interval +ndNodeData f interval -> Getting (Interval AnEndPoint (NumType interval)) (NodeData f interval) @@ -182,9 +182,9 @@ -- | An Elementary interval is either a singleton closed interval, or an open interval. -data ElementaryInterval r set = EndPoint' !r !set - | ElemInterval !(OpenInterval r) !set - deriving (Int -> ElementaryInterval r set -> ShowS +data ElementaryInterval r set = EndPoint' !r !set + | ElemInterval !(OpenInterval r) !set + deriving (Int -> ElementaryInterval r set -> ShowS [ElementaryInterval r set] -> ShowS ElementaryInterval r set -> String (Int -> ElementaryInterval r set -> ShowS) @@ -214,7 +214,7 @@ (Show r, Show set) => [ElementaryInterval r set] -> ShowS showList :: [ElementaryInterval r set] -> ShowS -Show,ElementaryInterval r set -> ElementaryInterval r set -> Bool +Show,ElementaryInterval r set -> ElementaryInterval r set -> Bool (ElementaryInterval r set -> ElementaryInterval r set -> Bool) -> (ElementaryInterval r set -> ElementaryInterval r set -> Bool) -> Eq (ElementaryInterval r set) @@ -230,7 +230,7 @@ (Eq r, Eq set) => ElementaryInterval r set -> ElementaryInterval r set -> Bool /= :: ElementaryInterval r set -> ElementaryInterval r set -> Bool -Eq,Eq (ElementaryInterval r set) +Eq,Eq (ElementaryInterval r set) Eq (ElementaryInterval r set) => (ElementaryInterval r set -> ElementaryInterval r set -> Ordering) -> (ElementaryInterval r set -> ElementaryInterval r set -> Bool) @@ -299,7 +299,7 @@ -> ElementaryInterval r set -> ElementaryInterval r set min :: ElementaryInterval r set -> ElementaryInterval r set -> ElementaryInterval r set -Ord,(forall a b. +Ord,(forall a b. (a -> b) -> ElementaryInterval r a -> ElementaryInterval r b) -> (forall a b. a -> ElementaryInterval r b -> ElementaryInterval r a) @@ -319,7 +319,7 @@ (a -> b) -> ElementaryInterval r a -> ElementaryInterval r b $c<$ :: forall r a b. a -> ElementaryInterval r b -> ElementaryInterval r a <$ :: forall a b. a -> ElementaryInterval r b -> ElementaryInterval r a -Functor,(forall m. Monoid m => ElementaryInterval r m -> m) +Functor,(forall m. Monoid m => ElementaryInterval r m -> m) -> (forall m a. Monoid m => (a -> m) -> ElementaryInterval r a -> m) @@ -416,7 +416,7 @@ sum :: forall a. Num a => ElementaryInterval r a -> a $cproduct :: forall r a. Num a => ElementaryInterval r a -> a product :: forall a. Num a => ElementaryInterval r a -> a -Foldable,Functor (ElementaryInterval r) +Foldable,Functor (ElementaryInterval r) Foldable (ElementaryInterval r) (Functor (ElementaryInterval r), Foldable (ElementaryInterval r)) => @@ -496,56 +496,56 @@ ElementaryInterval r (m a) -> m (ElementaryInterval r a) Traversable) -type instance NumType (ElementaryInterval r set) = r +type instance NumType (ElementaryInterval r set) = r -instance HasStart (ElementaryInterval r set) r where - start :: Lens' (ElementaryInterval r set) r -start = (ElementaryInterval r set -> r) +instance HasStart (ElementaryInterval r set) r where + start :: Lens' (ElementaryInterval r set) r +start = (ElementaryInterval r set -> r) -> (ElementaryInterval r set -> r -> ElementaryInterval r set) -> Lens' (ElementaryInterval r set) r forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens ElementaryInterval r set -> r forall {r} {set}. ElementaryInterval r set -> r -get'' ((r -> ElementaryInterval r set -> ElementaryInterval r set) +get'' ((r -> ElementaryInterval r set -> ElementaryInterval r set) -> ElementaryInterval r set -> r -> ElementaryInterval r set forall a b c. (a -> b -> c) -> b -> a -> c flip r -> ElementaryInterval r set -> ElementaryInterval r set forall {b} {set}. b -> ElementaryInterval b set -> ElementaryInterval b set -set'') +set'') where - get'' :: ElementaryInterval r set -> r -get'' = \case - EndPoint' r -s set + get'' :: ElementaryInterval r set -> r +get'' = \case + EndPoint' r +s set _ -> r -s - ElemInterval OpenInterval r -i set +s + ElemInterval OpenInterval r +i set _ -> OpenInterval r -iOpenInterval r -> Getting r (OpenInterval r) r -> r +iOpenInterval r -> Getting r (OpenInterval r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (OpenInterval r) r forall seg p. HasStart seg p => Lens' seg p Lens' (OpenInterval r) r start - set'' :: b -> ElementaryInterval b set -> ElementaryInterval b set -set'' b -s = \case + set'' :: b -> ElementaryInterval b set -> ElementaryInterval b set +set'' b +s = \case EndPoint' b -_ set -cs -> b -> set -> ElementaryInterval b set +_ set +cs -> b -> set -> ElementaryInterval b set forall r set. r -> set -> ElementaryInterval r set EndPoint' b -s set -cs - ElemInterval OpenInterval b -i set -cs -> OpenInterval b -> set -> ElementaryInterval b set +s set +cs + ElemInterval OpenInterval b +i set +cs -> OpenInterval b -> set -> ElementaryInterval b set forall r set. OpenInterval r -> set -> ElementaryInterval r set ElemInterval (OpenInterval b -iOpenInterval b +iOpenInterval b -> (OpenInterval b -> OpenInterval b) -> OpenInterval b forall a b. a -> (a -> b) -> b &(b -> Identity b) -> OpenInterval b -> Identity (OpenInterval b) @@ -555,56 +555,56 @@ -> b -> OpenInterval b -> OpenInterval b forall s t a b. ASetter s t a b -> b -> s -> t .~ b -s) set -cs +s) set +cs -instance HasEnd (ElementaryInterval r set) r where - end :: Lens' (ElementaryInterval r set) r -end = (ElementaryInterval r set -> r) +instance HasEnd (ElementaryInterval r set) r where + end :: Lens' (ElementaryInterval r set) r +end = (ElementaryInterval r set -> r) -> (ElementaryInterval r set -> r -> ElementaryInterval r set) -> Lens' (ElementaryInterval r set) r forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens ElementaryInterval r set -> r forall {r} {set}. ElementaryInterval r set -> r -get'' ((r -> ElementaryInterval r set -> ElementaryInterval r set) +get'' ((r -> ElementaryInterval r set -> ElementaryInterval r set) -> ElementaryInterval r set -> r -> ElementaryInterval r set forall a b c. (a -> b -> c) -> b -> a -> c flip r -> ElementaryInterval r set -> ElementaryInterval r set forall {b} {set}. b -> ElementaryInterval b set -> ElementaryInterval b set -set'') +set'') where - get'' :: ElementaryInterval r set -> r -get'' = \case - EndPoint' r -s set + get'' :: ElementaryInterval r set -> r +get'' = \case + EndPoint' r +s set _ -> r -s - ElemInterval OpenInterval r -i set +s + ElemInterval OpenInterval r +i set _ -> OpenInterval r -iOpenInterval r -> Getting r (OpenInterval r) r -> r +iOpenInterval r -> Getting r (OpenInterval r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (OpenInterval r) r forall seg p. HasEnd seg p => Lens' seg p Lens' (OpenInterval r) r end - set'' :: b -> ElementaryInterval b set -> ElementaryInterval b set -set'' b -s = \case + set'' :: b -> ElementaryInterval b set -> ElementaryInterval b set +set'' b +s = \case EndPoint' b -_ set -cs -> b -> set -> ElementaryInterval b set +_ set +cs -> b -> set -> ElementaryInterval b set forall r set. r -> set -> ElementaryInterval r set EndPoint' b -s set -cs - ElemInterval OpenInterval b -i set -cs -> OpenInterval b -> set -> ElementaryInterval b set +s set +cs + ElemInterval OpenInterval b +i set +cs -> OpenInterval b -> set -> ElementaryInterval b set forall r set. OpenInterval r -> set -> ElementaryInterval r set ElemInterval (OpenInterval b -iOpenInterval b +iOpenInterval b -> (OpenInterval b -> OpenInterval b) -> OpenInterval b forall a b. a -> (a -> b) -> b &(b -> Identity b) -> OpenInterval b -> Identity (OpenInterval b) @@ -614,11 +614,11 @@ -> b -> OpenInterval b -> OpenInterval b forall s t a b. ASetter s t a b -> b -> s -> t .~ b -s) set -cs +s) set +cs -instance HasStartPoint (ElementaryInterval r set) (AnEndPoint r) where - startPoint :: Lens' (ElementaryInterval r set) (AnEndPoint r) +instance HasStartPoint (ElementaryInterval r set) (AnEndPoint r) where + startPoint :: Lens' (ElementaryInterval r set) (AnEndPoint r) startPoint = (ElementaryInterval r set -> AnEndPoint r) -> (ElementaryInterval r set -> AnEndPoint r -> ElementaryInterval r set) @@ -626,7 +626,7 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens ElementaryInterval r set -> AnEndPoint r forall {r} {set}. ElementaryInterval r set -> AnEndPoint r -get'' ((AnEndPoint r +get'' ((AnEndPoint r -> ElementaryInterval r set -> ElementaryInterval r set) -> ElementaryInterval r set -> AnEndPoint r @@ -635,31 +635,31 @@ flip AnEndPoint r -> ElementaryInterval r set -> ElementaryInterval r set forall {a}. a -set'') +set'') where - get'' :: ElementaryInterval r set -> AnEndPoint r -get'' = \case - EndPoint' r -s set + get'' :: ElementaryInterval r set -> AnEndPoint r +get'' = \case + EndPoint' r +s set _ -> r -> AnEndPoint r forall r. r -> AnEndPoint r AnClosedE r -s - ElemInterval OpenInterval r -i set +s + ElemInterval OpenInterval r +i set _ -> r -> AnEndPoint r forall r. r -> AnEndPoint r AnOpenE (r -> AnEndPoint r) -> r -> AnEndPoint r forall a b. (a -> b) -> a -> b $ OpenInterval r -iOpenInterval r -> Getting r (OpenInterval r) r -> r +iOpenInterval r -> Getting r (OpenInterval r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (OpenInterval r) r forall seg p. HasStart seg p => Lens' seg p Lens' (OpenInterval r) r start - set'' :: a -set'' = String -> a + set'' :: a +set'' = String -> a forall a. HasCallStack => String -> a error String "ElementaryInterva.startPoint set not implemented" @@ -667,8 +667,8 @@ -- EndPoint' _ cs -> EndPoint s cs -- ElemInterval i cs -> ElemInterval (i&start .~ s) cs -instance HasEndPoint (ElementaryInterval r set) (AnEndPoint r) where - endPoint :: Lens' (ElementaryInterval r set) (AnEndPoint r) +instance HasEndPoint (ElementaryInterval r set) (AnEndPoint r) where + endPoint :: Lens' (ElementaryInterval r set) (AnEndPoint r) endPoint = (ElementaryInterval r set -> AnEndPoint r) -> (ElementaryInterval r set -> AnEndPoint r -> ElementaryInterval r set) @@ -676,7 +676,7 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens ElementaryInterval r set -> AnEndPoint r forall {r} {set}. ElementaryInterval r set -> AnEndPoint r -get'' ((AnEndPoint r +get'' ((AnEndPoint r -> ElementaryInterval r set -> ElementaryInterval r set) -> ElementaryInterval r set -> AnEndPoint r @@ -685,44 +685,44 @@ flip AnEndPoint r -> ElementaryInterval r set -> ElementaryInterval r set forall {a}. a -set'') +set'') where - get'' :: ElementaryInterval r set -> AnEndPoint r -get'' = \case - EndPoint' r -s set + get'' :: ElementaryInterval r set -> AnEndPoint r +get'' = \case + EndPoint' r +s set _ -> r -> AnEndPoint r forall r. r -> AnEndPoint r AnClosedE r -s - ElemInterval OpenInterval r -i set +s + ElemInterval OpenInterval r +i set _ -> r -> AnEndPoint r forall r. r -> AnEndPoint r AnOpenE (r -> AnEndPoint r) -> r -> AnEndPoint r forall a b. (a -> b) -> a -> b $ OpenInterval r -iOpenInterval r -> Getting r (OpenInterval r) r -> r +iOpenInterval r -> Getting r (OpenInterval r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (OpenInterval r) r forall seg p. HasEnd seg p => Lens' seg p Lens' (OpenInterval r) r end - set'' :: a -set'' = String -> a + set'' :: a +set'' = String -> a forall a. HasCallStack => String -> a error String "ElementaryInterva.endPoint set not implemented" -instance HasCanonicalSubSet (ElementaryInterval r (f interval)) - (ElementaryInterval r (g interval)) interval f g where - canonicalSubSet :: Lens +instance HasCanonicalSubSet (ElementaryInterval r (f interval)) + (ElementaryInterval r (g interval)) interval f g where + canonicalSubSet :: Lens (ElementaryInterval r (f interval)) (ElementaryInterval r (g interval)) (f interval) (g interval) -canonicalSubSet = (ElementaryInterval r (f interval) -> f interval) +canonicalSubSet = (ElementaryInterval r (f interval) -> f interval) -> (ElementaryInterval r (f interval) -> g interval -> ElementaryInterval r (g interval)) -> Lens @@ -733,7 +733,7 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens ElementaryInterval r (f interval) -> f interval forall {r} {set}. ElementaryInterval r set -> set -get'' ((g interval +get'' ((g interval -> ElementaryInterval r (f interval) -> ElementaryInterval r (g interval)) -> ElementaryInterval r (f interval) @@ -745,54 +745,54 @@ -> ElementaryInterval r (g interval) forall {set} {r} {set}. set -> ElementaryInterval r set -> ElementaryInterval r set -set'') +set'') where - get'' :: ElementaryInterval r set -> set -get'' = \case + get'' :: ElementaryInterval r set -> set +get'' = \case EndPoint' r -_ set -cs -> set -cs +_ set +cs -> set +cs ElemInterval OpenInterval r -_ set -cs -> set -cs - set'' :: set -> ElementaryInterval r set -> ElementaryInterval r set -set'' set -cs = \case - EndPoint' r -x set +_ set +cs -> set +cs + set'' :: set -> ElementaryInterval r set -> ElementaryInterval r set +set'' set +cs = \case + EndPoint' r +x set _ -> r -> set -> ElementaryInterval r set forall r set. r -> set -> ElementaryInterval r set EndPoint' r -x set -cs - ElemInterval OpenInterval r -i set +x set +cs + ElemInterval OpenInterval r +i set _ -> OpenInterval r -> set -> ElementaryInterval r set forall r set. OpenInterval r -> set -> ElementaryInterval r set ElemInterval OpenInterval r -i set -cs +i set +cs -- | The data that we store at each node; essentially the interval and a canonical subset. -data NodeData f interval = +data NodeData f interval = NodeData { forall (f :: * -> *) interval. NodeData f interval -> Interval AnEndPoint (NumType interval) -_nodeInterval :: !(Interval AnEndPoint (NumType interval)) +_nodeInterval :: !(Interval AnEndPoint (NumType interval)) , forall (f :: * -> *) interval. NodeData f interval -> f interval -_canonicalSubSet :: !(f interval) +_canonicalSubSet :: !(f interval) } -deriving stock instance ( Show (NumType interval), Show (f interval) - ) => Show (NodeData f interval) +deriving stock instance ( Show (NumType interval), Show (f interval) + ) => Show (NodeData f interval) -deriving stock instance ( Eq (NumType interval), Eq (f interval) - ) => Eq (NodeData f interval) +deriving stock instance ( Eq (NumType interval), Eq (f interval) + ) => Eq (NodeData f interval) -- | Lens to access the node interval -nodeInterval :: Lens' (NodeData f interval) (Interval AnEndPoint (NumType interval)) +nodeInterval :: Lens' (NodeData f interval) (Interval AnEndPoint (NumType interval)) nodeInterval :: forall (f :: * -> *) interval (f :: * -> *). Functor f => (Interval AnEndPoint (NumType interval) @@ -810,13 +810,13 @@ lens NodeData f interval -> Interval AnEndPoint (NumType interval) forall (f :: * -> *) interval. NodeData f interval -> Interval AnEndPoint (NumType interval) -_nodeInterval (\NodeData f interval -nd Interval AnEndPoint (NumType interval) -x -> NodeData f interval -nd { _nodeInterval = x }) +_nodeInterval (\NodeData f interval +nd Interval AnEndPoint (NumType interval) +x -> NodeData f interval +nd { _nodeInterval = x }) -instance HasCanonicalSubSet (NodeData f interval) (NodeData g interval) interval f g where - canonicalSubSet :: Lens +instance HasCanonicalSubSet (NodeData f interval) (NodeData g interval) interval f g where + canonicalSubSet :: Lens (NodeData f interval) (NodeData g interval) (f interval) @@ -831,10 +831,10 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens NodeData f interval -> f interval forall (f :: * -> *) interval. NodeData f interval -> f interval -_canonicalSubSet (\NodeData f interval -nd g interval -x -> NodeData f interval -nd { _canonicalSubSet = x }) +_canonicalSubSet (\NodeData f interval +nd g interval +x -> NodeData f interval +nd { _canonicalSubSet = x }) @@ -844,17 +844,17 @@ -- | Given a set of intervals, build a segment tree -- -- \(O(n\log n)\) -buildSegmentTree :: forall f interval r g. - ( ClosedInterval_ interval r, Ord r - , Monoid (f interval), CanInsert f interval, Foldable1 g +buildSegmentTree :: forall f interval r g. + ( ClosedInterval_ interval r, Ord r + , Monoid (f interval), CanInsert f interval, Foldable1 g ) - => g interval -> SegmentTree f interval + => g interval -> SegmentTree f interval buildSegmentTree :: forall (f :: * -> *) interval r (g :: * -> *). (ClosedInterval_ interval r, Ord r, Monoid (f interval), CanInsert f interval, Foldable1 g) => g interval -> SegmentTree f interval -buildSegmentTree g interval -ints = (interval -> SegmentTree f interval -> SegmentTree f interval) +buildSegmentTree g interval +ints = (interval -> SegmentTree f interval -> SegmentTree f interval) -> SegmentTree f interval -> g interval -> SegmentTree f interval forall a b. (a -> b -> b) -> b -> g a -> b forall (t :: * -> *) a b. @@ -865,11 +865,11 @@ (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval insert SegmentTree f interval -t g interval -ints +t g interval +ints where - t :: SegmentTree f interval -t = NonEmptyVector r -> SegmentTree f interval + t :: SegmentTree f interval +t = NonEmptyVector r -> SegmentTree f interval forall (f :: * -> *) interval r (g :: * -> *). (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => @@ -902,9 +902,9 @@ forall (t :: * -> *) m a. (Foldable1 t, Semigroup m) => (a -> m) -> t a -> m -foldMap1 (\interval -i -> (interval -iinterval -> Getting r interval r -> r +foldMap1 (\interval +i -> (interval +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p @@ -912,7 +912,7 @@ start) r -> [r] -> NonEmpty r forall a. a -> [a] -> NonEmpty a :| [interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -921,16 +921,16 @@ -> g interval -> SegmentTree f interval forall a b. (a -> b) -> a -> b $ g interval -ints +ints -- | Given te endpoints in ascending order, build an empty segment-tree -- -- \(O(n)\) -buildSkeleton :: forall f interval r g. - ( ClosedInterval_ interval r, Ord r - , Monoid (f interval), Foldable1 g +buildSkeleton :: forall f interval r g. + ( ClosedInterval_ interval r, Ord r + , Monoid (f interval), Foldable1 g ) - => g r -> SegmentTree f interval + => g r -> SegmentTree f interval buildSkeleton :: forall (f :: * -> *) interval r (g :: * -> *). (ClosedInterval_ interval r, Ord r, Monoid (f interval), Foldable1 g) => @@ -991,11 +991,11 @@ -> BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -node' ElementaryInterval r (f interval) +node' ElementaryInterval r (f interval) -> BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) forall {a} {v}. a -> BinLeafTree v a -leaf' +leaf' (BinLeafTree (Count (ElementaryInterval r (f interval))) (ElementaryInterval r (f interval)) @@ -1032,13 +1032,13 @@ g r -> NonEmpty (ElementaryInterval r (f interval)) toAtomicIntervals where - leaf' :: a -> BinLeafTree v a -leaf' a -elemInt = a -> BinLeafTree v a + leaf' :: a -> BinLeafTree v a +leaf' a +elemInt = a -> BinLeafTree v a forall v a. a -> BinLeafTree v a Leaf a -elemInt - node' :: BinLeafTree +elemInt + node' :: BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -> p @@ -1048,15 +1048,15 @@ -> BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -node' BinLeafTree +node' BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -l p -_ BinLeafTree +l p +_ BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -r = let int :: Interval AnEndPoint (NumType interval) -int = AnEndPoint (NumType interval) +r = let int :: Interval AnEndPoint (NumType interval) +int = AnEndPoint (NumType interval) -> AnEndPoint (NumType interval) -> Interval AnEndPoint (NumType interval) forall {k} (endPoint :: k -> *) (r :: k). @@ -1064,7 +1064,7 @@ Interval (BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -lBinLeafTree +lBinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -> Getting @@ -1132,7 +1132,7 @@ startPoint) (BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -rBinLeafTree +rBinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -> Getting @@ -1213,38 +1213,38 @@ Node BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -l (Interval AnEndPoint (NumType interval) +l (Interval AnEndPoint (NumType interval) -> f interval -> NodeData f interval forall (f :: * -> *) interval. Interval AnEndPoint (NumType interval) -> f interval -> NodeData f interval NodeData Interval AnEndPoint (NumType interval) -int f interval +int f interval forall a. Monoid a => a mempty) BinLeafTree (NodeData f interval) (ElementaryInterval (NumType interval) (f interval)) -r +r -- | Given a set of endpoints, in ascendin order, construct the atomic intervals defined -- by them. -toAtomicIntervals :: ( Foldable1 g - , Monoid (f interval) - ) => g r -> NonEmpty (ElementaryInterval r (f interval)) +toAtomicIntervals :: ( Foldable1 g + , Monoid (f interval) + ) => g r -> NonEmpty (ElementaryInterval r (f interval)) toAtomicIntervals :: forall {k} (g :: * -> *) (f :: k -> *) (interval :: k) r. (Foldable1 g, Monoid (f interval)) => g r -> NonEmpty (ElementaryInterval r (f interval)) toAtomicIntervals (g r -> NonEmpty r forall a. g a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a -toNonEmpty -> (r -x0 :| [r] -endPts)) = +toNonEmpty -> (r +x0 :| [r] +endPts)) = r -> f interval -> ElementaryInterval r (f interval) forall r set. r -> set -> ElementaryInterval r set EndPoint' r -x0 f interval +x0 f interval forall a. Monoid a => a mempty ElementaryInterval r (f interval) -> [ElementaryInterval r (f interval)] @@ -1260,28 +1260,28 @@ forall {set} {r}. Monoid set => r -> r -> [ElementaryInterval r set] -mkInterval' (r -x0 r -> [r] -> [r] +mkInterval' (r +x0 r -> [r] -> [r] forall a. a -> [a] -> [a] : [r] -endPts) [r] -endPts) +endPts) [r] +endPts) where - mkInterval' :: r -> r -> [ElementaryInterval r set] -mkInterval' r -l r -r = [OpenInterval r -> set -> ElementaryInterval r set + mkInterval' :: r -> r -> [ElementaryInterval r set] +mkInterval' r +l r +r = [OpenInterval r -> set -> ElementaryInterval r set forall r set. OpenInterval r -> set -> ElementaryInterval r set ElemInterval (r -> r -> OpenInterval r forall r. r -> r -> OpenInterval r OpenInterval r -l r -r) set +l r +r) set forall a. Monoid a => a mempty, r -> set -> ElementaryInterval r set forall r set. r -> set -> ElementaryInterval r set EndPoint' r -r set +r set forall a. Monoid a => a mempty] @@ -1290,15 +1290,15 @@ -- | Insert a segment into the segment tree, whose endpoints are already in the tree -- -- \(O(\log n)\) -insert :: ( ClosedInterval_ interval r, Ord r, CanInsert f interval +insert :: ( ClosedInterval_ interval r, Ord r, CanInsert f interval ) - => interval -> SegmentTree f interval -> SegmentTree f interval + => interval -> SegmentTree f interval -> SegmentTree f interval insert :: forall interval r (f :: * -> *). (ClosedInterval_ interval r, Ord r, CanInsert f interval) => interval -> SegmentTree f interval -> SegmentTree f interval -insert interval -i (SegmentTree SubTree f interval -t) = SubTree f interval -> SegmentTree f interval +insert interval +i (SegmentTree SubTree f interval +t) = SubTree f interval -> SegmentTree f interval forall (f :: * -> *) interval. SubTree f interval -> SegmentTree f interval SegmentTree (SubTree f interval -> SegmentTree f interval) @@ -1308,34 +1308,34 @@ (NodeData f interval) (ElementaryInterval r (f interval)) -> BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -go BinLeafTree +go BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) SubTree f interval -t +t where - ic :: ClosedInterval r -ic = r -> r -> ClosedInterval r + ic :: ClosedInterval r +ic = r -> r -> ClosedInterval r forall r. r -> r -> ClosedInterval r ClosedInterval (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p Lens' interval r start) (interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p Lens' interval r end) - go :: BinLeafTree + go :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -go (Leaf ElementaryInterval r (f interval) -atomic) = ElementaryInterval r (f interval) +go (Leaf ElementaryInterval r (f interval) +atomic) = ElementaryInterval r (f interval) -> BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) forall v a. a -> BinLeafTree v a @@ -1347,7 +1347,7 @@ (NodeData f interval) (ElementaryInterval r (f interval)) forall a b. (a -> b) -> a -> b $ ElementaryInterval r (f interval) -atomicElementaryInterval r (f interval) +atomicElementaryInterval r (f interval) -> (ElementaryInterval r (f interval) -> ElementaryInterval r (f interval)) -> ElementaryInterval r (f interval) @@ -1373,20 +1373,20 @@ %~ interval -> f interval -> f interval forall (f :: * -> *) a. CanInsert f a => a -> f a -> f a insertMeasure interval -i - go (Node BinLeafTree +i + go (Node BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l NodeData f interval -nd BinLeafTree +l NodeData f interval +nd BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r) +r) | interval -i interval -> Interval AnEndPoint r -> Bool +i interval -> Interval AnEndPoint r -> Bool forall interval r interval'. (ClosedInterval_ interval r, Interval_ interval' r, Ord r) => interval -> interval' -> Bool `covers` (NodeData f interval -ndNodeData f interval +ndNodeData f interval -> Getting (Interval AnEndPoint r) (NodeData f interval) @@ -1418,8 +1418,8 @@ BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a Node BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l (NodeData f interval -ndNodeData f interval +l (NodeData f interval +ndNodeData f interval -> (NodeData f interval -> NodeData f interval) -> NodeData f interval forall a b. a -> (a -> b) -> b @@ -1442,44 +1442,44 @@ %~ interval -> f interval -> f interval forall (f :: * -> *) a. CanInsert f a => a -> f a -> f a insertMeasure interval -i) BinLeafTree +i) BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r +r | Bool -otherwise = let l' :: BinLeafTree +otherwise = let l' :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l' = if BinLeafTree +l' = if BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> NodeData f interval -> Bool -intersectsLeft BinLeafTree +intersectsLeft BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l NodeData f interval -nd then BinLeafTree +l NodeData f interval +nd then BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -go BinLeafTree +go BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l else BinLeafTree +l else BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l - r' :: BinLeafTree +l + r' :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r' = if BinLeafTree +r' = if BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> NodeData f interval -> Bool -intersectsRight BinLeafTree +intersectsRight BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r NodeData f interval -nd then BinLeafTree +r NodeData f interval +nd then BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -go BinLeafTree +go BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r else BinLeafTree +r else BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r +r in BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> NodeData f interval @@ -1491,23 +1491,23 @@ BinLeafTree v a -> v -> BinLeafTree v a -> BinLeafTree v a Node BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l' NodeData f interval -nd BinLeafTree +l' NodeData f interval +nd BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r' +r' - intersectsLeft :: BinLeafTree + intersectsLeft :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> NodeData f interval -> Bool -intersectsLeft BinLeafTree +intersectsLeft BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l NodeData f interval -_nd = ClosedInterval r -ic ClosedInterval r -> Interval AnEndPoint (NumType interval) -> Bool +l NodeData f interval +_nd = ClosedInterval r +ic ClosedInterval r -> Interval AnEndPoint (NumType interval) -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` (BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -lBinLeafTree +lBinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> Getting (Interval AnEndPoint (NumType interval)) @@ -1534,18 +1534,18 @@ -> f (Interval AnEndPoint (NumType interval))) -> SubTree f interval -> f (SubTree f interval) interval) - intersectsRight :: BinLeafTree + intersectsRight :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> NodeData f interval -> Bool -intersectsRight BinLeafTree +intersectsRight BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r NodeData f interval -_nd = ClosedInterval r -ic ClosedInterval r -> Interval AnEndPoint (NumType interval) -> Bool +r NodeData f interval +_nd = ClosedInterval r +ic ClosedInterval r -> Interval AnEndPoint (NumType interval) -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` (BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -rBinLeafTree +rBinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> Getting (Interval AnEndPoint (NumType interval)) @@ -1575,15 +1575,15 @@ -- | Test if the first interval covers the second interval. -covers :: (ClosedInterval_ interval r, Interval_ interval' r, Ord r) - => interval -> interval' -> Bool -interval -i covers :: forall interval r interval'. +covers :: (ClosedInterval_ interval r, Interval_ interval' r, Ord r) + => interval -> interval' -> Bool +interval +i covers :: forall interval r interval'. (ClosedInterval_ interval r, Interval_ interval' r, Ord r) => interval -> interval' -> Bool -`covers` interval' -j = interval -iinterval -> Getting r interval r -> r +`covers` interval' +j = interval +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasStart seg p => Lens' seg p @@ -1591,14 +1591,14 @@ start r -> r -> Bool forall a. Ord a => a -> a -> Bool <= interval' -jinterval' -> Getting r interval' r -> r +jinterval' -> Getting r interval' r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval' r forall seg p. HasStart seg p => Lens' seg p Lens' interval' r start Bool -> Bool -> Bool && interval' -jinterval' -> Getting r interval' r -> r +jinterval' -> Getting r interval' r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval' r forall seg p. HasEnd seg p => Lens' seg p @@ -1606,7 +1606,7 @@ end r -> r -> Bool forall a. Ord a => a -> a -> Bool <= interval -iinterval -> Getting r interval r -> r +iinterval -> Getting r interval r -> r forall s a. s -> Getting a s a -> a ^.Getting r interval r forall seg p. HasEnd seg p => Lens' seg p @@ -1644,49 +1644,49 @@ -- that are stabbed by q. -- -- \(O(\log n)\) -stab :: ( Ord r - , ClosedInterval_ interval r - ) => r -> SegmentTree f interval -> [f interval] +stab :: ( Ord r + , ClosedInterval_ interval r + ) => r -> SegmentTree f interval -> [f interval] stab :: forall r interval (f :: * -> *). (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval] -stab r -q (SegmentTree SubTree f interval -t) = BinLeafTree +stab r +q (SegmentTree SubTree f interval +t) = BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> [f interval] -go0 BinLeafTree +go0 BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) SubTree f interval -t +t where - go0 :: BinLeafTree + go0 :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> [f interval] -go0 n :: BinLeafTree +go0 n :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -n@(Leaf ElementaryInterval r (f interval) +n@(Leaf ElementaryInterval r (f interval) _) = BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> [f interval] -go BinLeafTree +go BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -n - go0 n :: BinLeafTree +n + go0 n :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -n@(Node BinLeafTree +n@(Node BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -_ NodeData f interval -nd BinLeafTree +_ NodeData f interval +nd BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) _) | r -q r -> Interval AnEndPoint r -> Bool +q r -> Interval AnEndPoint r -> Bool forall interval r. (Ord r, Interval_ interval r) => r -> interval -> Bool `stabsInterval` (NodeData f interval -ndNodeData f interval +ndNodeData f interval -> Getting (Interval AnEndPoint r) (NodeData f interval) @@ -1710,18 +1710,18 @@ nodeInterval) = BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> [f interval] -go BinLeafTree +go BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -n +n | Bool otherwise = [] - go :: BinLeafTree + go :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> [f interval] -go (Leaf ElementaryInterval r (f interval) -atomic) = [ElementaryInterval r (f interval) -atomicElementaryInterval r (f interval) +go (Leaf ElementaryInterval r (f interval) +atomic) = [ElementaryInterval r (f interval) +atomicElementaryInterval r (f interval) -> Getting (f interval) (ElementaryInterval r (f interval)) (f interval) -> f interval @@ -1737,21 +1737,21 @@ (f interval) (f interval) canonicalSubSet] - go (Node BinLeafTree + go (Node BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l NodeData f interval -nd BinLeafTree +l NodeData f interval +nd BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r) = let ch :: BinLeafTree +r) = let ch :: BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -ch = if r -> Point 1 r +ch = if r -> Point 1 r forall r. r -> Point 1 r Point1 r -q Point 1 r -> Interval AnEndPoint r -> Bool +q Point 1 r -> Interval AnEndPoint r -> Bool forall g h. HasIntersectionWith g h => g -> h -> Bool `intersects` (BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -lBinLeafTree +lBinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> Getting (Interval AnEndPoint r) @@ -1777,11 +1777,11 @@ -> SubTree f interval -> f (SubTree f interval) interval) then BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -l else BinLeafTree +l else BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -r +r in NodeData f interval -ndNodeData f interval +ndNodeData f interval -> Getting (f interval) (NodeData f interval) (f interval) -> f interval forall s a. s -> Getting a s a -> a @@ -1799,21 +1799,21 @@ : BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -> [f interval] -go BinLeafTree +go BinLeafTree (NodeData f interval) (ElementaryInterval r (f interval)) -ch +ch -- | Query the segment tree -- -- \(O(\log n + k)\), where \(k\) is somehow depends on the output size (and the monoid -- used). -query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) - => r -> SegmentTree f interval -> f interval +query :: (Ord r, ClosedInterval_ interval r, Monoid (f interval)) + => r -> SegmentTree f interval -> f interval query :: forall r interval (f :: * -> *). (Ord r, ClosedInterval_ interval r, Monoid (f interval)) => r -> SegmentTree f interval -> f interval -query r -q = [f interval] -> f interval +query r +q = [f interval] -> f interval forall a. Monoid a => [a] -> a mconcat ([f interval] -> f interval) -> (SegmentTree f interval -> [f interval]) @@ -1825,12 +1825,12 @@ (Ord r, ClosedInterval_ interval r) => r -> SegmentTree f interval -> [f interval] stab r -q +q -------------------------------------------------------------------------------- -- | Report te list of endpoints that the segment tree is built on in left to right order. -ascEndPoints :: SegmentTree f interval -> [NumType interval] +ascEndPoints :: SegmentTree f interval -> [NumType interval] ascEndPoints :: forall (f :: * -> *) interval. SegmentTree f interval -> [NumType interval] ascEndPoints = (ElementaryInterval (NumType interval) (f interval) @@ -1842,10 +1842,10 @@ (Foldable t, Monoid m) => (a -> m) -> t a -> m foldMap (\case - EndPoint' NumType interval -x f interval + EndPoint' NumType interval +x f interval _ -> [NumType interval -x] +x] ElementaryInterval (NumType interval) (f interval) _ -> [] ) (NonEmpty (ElementaryInterval (NumType interval) (f interval)) @@ -1864,18 +1864,18 @@ -- | Report the atomic intervals in left-to-right order -elementaryIntervals :: SegmentTree f interval - -> NonEmpty (ElementaryInterval(NumType interval) (f interval)) +elementaryIntervals :: SegmentTree f interval + -> NonEmpty (ElementaryInterval(NumType interval) (f interval)) elementaryIntervals :: forall (f :: * -> *) interval. SegmentTree f interval -> NonEmpty (ElementaryInterval (NumType interval) (f interval)) -elementaryIntervals (SegmentTree SubTree f interval -t) = SubTree f interval +elementaryIntervals (SegmentTree SubTree f interval +t) = SubTree f interval -> NonEmpty (ElementaryInterval (NumType interval) (f interval)) forall a. BinLeafTree (NodeData f interval) a -> NonEmpty a forall (t :: * -> *) a. Foldable1 t => t a -> NonEmpty a toNonEmpty SubTree f interval -t +t -------------------------------------------------------------------------------- \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.SegmentTree.CanonicalSubSet.html b/haddocks/hgeometry/src/HGeometry.SegmentTree.CanonicalSubSet.html index 626d87415..c25407faa 100644 --- a/haddocks/hgeometry/src/HGeometry.SegmentTree.CanonicalSubSet.html +++ b/haddocks/hgeometry/src/HGeometry.SegmentTree.CanonicalSubSet.html @@ -7,8 +7,8 @@ -------------------------------------------------------------------------------- -- | Types that store canonical subsets -class HasCanonicalSubSet s t a f g | s -> f - , t -> g where +class HasCanonicalSubSet s t a f g | s -> f + , t -> g where -- | Lens to access the canonical subset of a node or leaf - canonicalSubSet :: Lens s t (f a) (g a) + canonicalSubSet :: Lens s t (f a) (g a) \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.VerticalRayShooting.PersistentSweep.html b/haddocks/hgeometry/src/HGeometry.VerticalRayShooting.PersistentSweep.html index 77df3d338..f5bd00dab 100644 --- a/haddocks/hgeometry/src/HGeometry.VerticalRayShooting.PersistentSweep.html +++ b/haddocks/hgeometry/src/HGeometry.VerticalRayShooting.PersistentSweep.html @@ -38,22 +38,22 @@ -------------------------------------------------------------------------------- -- | The vertical ray shooting data structure -type VerticalRayShootingStructure lineSegment = - VerticalRayShootingStructure' (NumType lineSegment) lineSegment +type VerticalRayShootingStructure lineSegment = + VerticalRayShootingStructure' (NumType lineSegment) lineSegment -- | The implementatyion of the vertical ray shooting data structure -data VerticalRayShootingStructure' r lineSegment = +data VerticalRayShootingStructure' r lineSegment = VerticalRayShootingStructure { forall r lineSegment. VerticalRayShootingStructure' r lineSegment -> r -_leftMost :: !r +_leftMost :: !r -- ^ x-coordinate of the leftmost vertex/endpoint , forall r lineSegment. VerticalRayShootingStructure' r lineSegment -> Vector (r :+ StatusStructure lineSegment) -_sweepStruct :: V.Vector (r :+ StatusStructure lineSegment) +_sweepStruct :: V.Vector (r :+ StatusStructure lineSegment) -- ^ entry (r :+ s) means that "just" left of "r" the -- status structure is 's', i.e up to 'r' - } deriving (Int -> VerticalRayShootingStructure' r lineSegment -> ShowS + } deriving (Int -> VerticalRayShootingStructure' r lineSegment -> ShowS [VerticalRayShootingStructure' r lineSegment] -> ShowS VerticalRayShootingStructure' r lineSegment -> String (Int -> VerticalRayShootingStructure' r lineSegment -> ShowS) @@ -83,7 +83,7 @@ (Show r, Show lineSegment) => [VerticalRayShootingStructure' r lineSegment] -> ShowS showList :: [VerticalRayShootingStructure' r lineSegment] -> ShowS -Show,VerticalRayShootingStructure' r lineSegment +Show,VerticalRayShootingStructure' r lineSegment -> VerticalRayShootingStructure' r lineSegment -> Bool (VerticalRayShootingStructure' r lineSegment -> VerticalRayShootingStructure' r lineSegment -> Bool) @@ -110,9 +110,9 @@ Eq) -- | The status structure -type StatusStructure lineSegment = SS.Set lineSegment +type StatusStructure lineSegment = SS.Set lineSegment -makeLensesWith (lensRules&generateUpdateableOptics .~ False) ''VerticalRayShootingStructure' +makeLensesWith (lensRules&generateUpdateableOptics .~ False) ''VerticalRayShootingStructure' -------------------------------------------------------------------------------- -- * Building the DS @@ -125,17 +125,17 @@ -- -- running time: \(O(n\log n)\). -- space: \(O(n\log n)\). -verticalRayShootingStructure :: ( LineSegment_ lineSegment point - , Point_ point 2 r - , Ord r, Fractional r, Foldable1 f) - => f lineSegment - -> VerticalRayShootingStructure lineSegment +verticalRayShootingStructure :: ( LineSegment_ lineSegment point + , Point_ point 2 r + , Ord r, Fractional r, Foldable1 f) + => f lineSegment + -> VerticalRayShootingStructure lineSegment verticalRayShootingStructure :: forall lineSegment point r (f :: * -> *). (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r, Foldable1 f) => f lineSegment -> VerticalRayShootingStructure lineSegment -verticalRayShootingStructure f lineSegment -ss = NumType point +verticalRayShootingStructure f lineSegment +ss = NumType point -> Vector (NumType point :+ StatusStructure lineSegment) -> VerticalRayShootingStructure' (NumType point) lineSegment forall r lineSegment. @@ -145,19 +145,19 @@ VerticalRayShootingStructure (Event (NumType point) lineSegment -> NumType point forall r lineSegment. Event r lineSegment -> r eventX Event (NumType point) lineSegment -e) (NonEmpty +e) (NonEmpty (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment) -> Vector (NumType (IxValue (EndPointOf lineSegment)) :+ StatusStructure lineSegment) -sweep' NonEmpty (Event (NumType point) lineSegment) +sweep' NonEmpty (Event (NumType point) lineSegment) NonEmpty (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment) -events) +events) where - events :: NonEmpty (Event (NumType point) lineSegment) -events@(Event (NumType point) lineSegment -e :| [Event (NumType point) lineSegment] + events :: NonEmpty (Event (NumType point) lineSegment) +events@(Event (NumType point) lineSegment +e :| [Event (NumType point) lineSegment] _) = (NonEmpty (Event (NumType point) lineSegment) -> Event (NumType point) lineSegment) -> NonEmpty (NonEmpty (Event (NumType point) lineSegment)) @@ -209,7 +209,7 @@ HasStart s p, HasEnd s p, Point_ p (Dimension p) (NumType p), Point_ p (Dimension p) (NumType p)) => s -> NonEmpty (NumType p :+ NonEmpty (Action s)) -toEvents (lineSegment -> NonEmpty (Event (NumType point) lineSegment)) +toEvents (lineSegment -> NonEmpty (Event (NumType point) lineSegment)) -> (lineSegment -> lineSegment) -> lineSegment -> NonEmpty (Event (NumType point) lineSegment) @@ -224,13 +224,13 @@ -> f lineSegment -> NonEmpty (Event (NumType point) lineSegment) forall a b. (a -> b) -> a -> b $ f lineSegment -ss - sweep' :: NonEmpty +ss + sweep' :: NonEmpty (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment) -> Vector (NumType (IxValue (EndPointOf lineSegment)) :+ StatusStructure lineSegment) -sweep' = [NumType (IxValue (EndPointOf lineSegment)) +sweep' = [NumType (IxValue (EndPointOf lineSegment)) :+ StatusStructure lineSegment] -> Vector (NumType (IxValue (EndPointOf lineSegment)) @@ -285,13 +285,13 @@ -> NonEmpty (r :+ StatusStructure lineSegment) sweep - toEvents :: s -> NonEmpty (NumType p :+ NonEmpty (Action s)) -toEvents s -seg = [NumType p :+ NonEmpty (Action s)] + toEvents :: s -> NonEmpty (NumType p :+ NonEmpty (Action s)) +toEvents s +seg = [NumType p :+ NonEmpty (Action s)] -> NonEmpty (NumType p :+ NonEmpty (Action s)) forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList [ (s -segs -> Getting (NumType p) s (NumType p) -> NumType p +segs -> Getting (NumType p) s (NumType p) -> NumType p forall s a. s -> Getting a s a -> a ^.(p -> Const (NumType p) p) -> s -> Const (NumType p) s forall seg p. HasStart seg p => Lens' seg p @@ -313,11 +313,11 @@ :+ s -> Action s forall a. a -> Action a Insert s -seg Action s -> [Action s] -> NonEmpty (Action s) +seg Action s -> [Action s] -> NonEmpty (Action s) forall a. a -> [a] -> NonEmpty a :| [] , (s -segs -> Getting (NumType p) s (NumType p) -> NumType p +segs -> Getting (NumType p) s (NumType p) -> NumType p forall s a. s -> Getting a s a -> a ^.(p -> Const (NumType p) p) -> s -> Const (NumType p) s forall seg p. HasEnd seg p => Lens' seg p @@ -339,7 +339,7 @@ :+ s -> Action s forall a. a -> Action a Delete s -seg Action s -> [Action s] -> NonEmpty (Action s) +seg Action s -> [Action s] -> NonEmpty (Action s) forall a. a -> [a] -> NonEmpty a :| [] ] @@ -347,15 +347,15 @@ -- | Given a bunch of events happening at the same time, merge them into a single event -- where we apply all actions. -combine :: NonEmpty (Event r lineSegment) -> Event r lineSegment +combine :: NonEmpty (Event r lineSegment) -> Event r lineSegment combine :: forall r lineSegment. NonEmpty (Event r lineSegment) -> Event r lineSegment -combine es :: NonEmpty (Event r lineSegment) -es@((r -x :+ NonEmpty (Action lineSegment) +combine es :: NonEmpty (Event r lineSegment) +es@((r +x :+ NonEmpty (Action lineSegment) _) :| [Event r lineSegment] _) = r -x r -> NonEmpty (Action lineSegment) -> Event r lineSegment +x r -> NonEmpty (Action lineSegment) -> Event r lineSegment forall core extra. core -> extra -> core :+ extra :+ (Event r lineSegment -> NonEmpty (Action lineSegment)) -> NonEmpty (Event r lineSegment) -> NonEmpty (Action lineSegment) @@ -367,11 +367,11 @@ forall r lineSegment. Event r lineSegment -> NonEmpty (Action lineSegment) eventActions NonEmpty (Event r lineSegment) -es +es ---------------------------------------- -data Action a = Insert a | Delete a deriving (Int -> Action a -> ShowS +data Action a = Insert a | Delete a deriving (Int -> Action a -> ShowS [Action a] -> ShowS Action a -> String (Int -> Action a -> ShowS) @@ -387,7 +387,7 @@ show :: Action a -> String $cshowList :: forall a. Show a => [Action a] -> ShowS showList :: [Action a] -> ShowS -Show,Action a -> Action a -> Bool +Show,Action a -> Action a -> Bool (Action a -> Action a -> Bool) -> (Action a -> Action a -> Bool) -> Eq (Action a) forall a. Eq a => Action a -> Action a -> Bool @@ -399,30 +399,30 @@ Eq) {- HLINT ignore "Avoid lambda using `infix`" -} -interpret :: Action a -> (a -> a -> Ordering) -> SS.Set a -> SS.Set a +interpret :: Action a -> (a -> a -> Ordering) -> SS.Set a -> SS.Set a interpret :: forall a. Action a -> (a -> a -> Ordering) -> Set a -> Set a interpret = \case - Insert a -s -> \a -> a -> Ordering -cmp -> (a -> a -> Ordering) -> a -> Set a -> Set a + Insert a +s -> \a -> a -> Ordering +cmp -> (a -> a -> Ordering) -> a -> Set a -> Set a forall a. (a -> a -> Ordering) -> a -> Set a -> Set a SS.insertBy a -> a -> Ordering -cmp a -s - Delete a -s -> \a -> a -> Ordering -cmp -> (a -> a -> Ordering) -> a -> Set a -> Set a +cmp a +s + Delete a +s -> \a -> a -> Ordering +cmp -> (a -> a -> Ordering) -> a -> Set a -> Set a forall a. (a -> a -> Ordering) -> a -> Set a -> Set a SS.deleteAllBy a -> a -> Ordering -cmp a -s +cmp a +s -- | An event; i.e. an x coordinate together with a bunch of actions. -type Event r lineSegment = r :+ NonEmpty (Action lineSegment) +type Event r lineSegment = r :+ NonEmpty (Action lineSegment) -- | The x-coordinate at which an event happens -eventX :: Event r lineSegment -> r +eventX :: Event r lineSegment -> r eventX :: forall r lineSegment. Event r lineSegment -> r eventX = Getting r (r :+ NonEmpty (Action lineSegment)) r -> (r :+ NonEmpty (Action lineSegment)) -> r @@ -434,7 +434,7 @@ core -- | The actions at a particular event -eventActions :: Event r lineSegment -> NonEmpty (Action lineSegment) +eventActions :: Event r lineSegment -> NonEmpty (Action lineSegment) eventActions :: forall r lineSegment. Event r lineSegment -> NonEmpty (Action lineSegment) eventActions = Getting @@ -456,17 +456,17 @@ ---------------------------------------- -- | Runs the sweep building the data structure from left to right. -sweep :: ( LineSegment_ lineSegment point, Point_ point 2 r - , Ord r, Fractional r +sweep :: ( LineSegment_ lineSegment point, Point_ point 2 r + , Ord r, Fractional r ) - => NonEmpty (Event r lineSegment) -> NonEmpty (r :+ StatusStructure lineSegment) + => NonEmpty (Event r lineSegment) -> NonEmpty (r :+ StatusStructure lineSegment) sweep :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, Ord r, Fractional r) => NonEmpty (Event r lineSegment) -> NonEmpty (r :+ StatusStructure lineSegment) -sweep NonEmpty (Event r lineSegment) -es = [r :+ StatusStructure lineSegment] +sweep NonEmpty (Event r lineSegment) +es = [r :+ StatusStructure lineSegment] -> NonEmpty (r :+ StatusStructure lineSegment) forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList @@ -523,7 +523,7 @@ -> (StatusStructure lineSegment, NumType (IxValue (EndPointOf lineSegment)) :+ StatusStructure lineSegment) -h StatusStructure lineSegment +h StatusStructure lineSegment forall a. Set a SS.empty ([(Event r lineSegment, Event r lineSegment)] @@ -539,23 +539,23 @@ forall a. NonEmpty a -> [a] forall (t :: * -> *) a. Foldable t => t a -> [a] toList NonEmpty (Event r lineSegment) -es) (NonEmpty (Event r lineSegment) -> [Event r lineSegment] +es) (NonEmpty (Event r lineSegment) -> [Event r lineSegment] forall a. NonEmpty a -> [a] NonEmpty.tail NonEmpty (Event r lineSegment) -es) +es) where - h :: StatusStructure lineSegment + h :: StatusStructure lineSegment -> (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment, Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment) -> (StatusStructure lineSegment, NumType (IxValue (EndPointOf lineSegment)) :+ StatusStructure lineSegment) -h StatusStructure lineSegment -ss (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment, +h StatusStructure lineSegment +ss (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment, Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment) -evts = let NumType (IxValue (EndPointOf lineSegment)) -x :+ StatusStructure lineSegment -ss' = StatusStructure lineSegment +evts = let NumType (IxValue (EndPointOf lineSegment)) +x :+ StatusStructure lineSegment +ss' = StatusStructure lineSegment -> (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment, Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment) -> NumType (IxValue (EndPointOf lineSegment)) @@ -567,61 +567,61 @@ -> (Event r lineSegment, Event r lineSegment) -> r :+ StatusStructure lineSegment handle StatusStructure lineSegment -ss (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment, +ss (Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment, Event (NumType (IxValue (EndPointOf lineSegment))) lineSegment) -evts in (StatusStructure lineSegment -ss',NumType (IxValue (EndPointOf lineSegment)) -x NumType (IxValue (EndPointOf lineSegment)) +evts in (StatusStructure lineSegment +ss',NumType (IxValue (EndPointOf lineSegment)) +x NumType (IxValue (EndPointOf lineSegment)) -> StatusStructure lineSegment -> NumType (IxValue (EndPointOf lineSegment)) :+ StatusStructure lineSegment forall core extra. core -> extra -> core :+ extra :+ StatusStructure lineSegment -ss') +ss') -- | Given the current status structure (for left of the next event -- 'l'), and the next two events (l,r); essentially defining the slab -- between l and r, we construct the status structure for in the slab (l,r). -- returns the right boundary and this status structure. -handle :: (Ord r, Fractional r, LineSegment_ lineSegment point, Point_ point 2 r) - => StatusStructure lineSegment - -> (Event r lineSegment, Event r lineSegment) - -> r :+ StatusStructure lineSegment +handle :: (Ord r, Fractional r, LineSegment_ lineSegment point, Point_ point 2 r) + => StatusStructure lineSegment + -> (Event r lineSegment, Event r lineSegment) + -> r :+ StatusStructure lineSegment handle :: forall r lineSegment point. (Ord r, Fractional r, LineSegment_ lineSegment point, Point_ point 2 r) => StatusStructure lineSegment -> (Event r lineSegment, Event r lineSegment) -> r :+ StatusStructure lineSegment -handle StatusStructure lineSegment -ss ( r -l :+ NonEmpty (Action lineSegment) -acts - , r -r :+ NonEmpty (Action lineSegment) -_) = let mid :: r -mid = (r -lr -> r -> r +handle StatusStructure lineSegment +ss ( r +l :+ NonEmpty (Action lineSegment) +acts + , r +r :+ NonEmpty (Action lineSegment) +_) = let mid :: r +mid = (r +lr -> r -> r forall a. Num a => a -> a -> a +r -r)r -> r -> r +r)r -> r -> r forall a. Fractional a => a -> a -> a /r 2 - runActionAt :: NumType (IxValue (EndPointOf a)) -> Action a -> Set a -> Set a -runActionAt NumType (IxValue (EndPointOf a)) -x Action a -act = Action a -> (a -> a -> Ordering) -> Set a -> Set a + runActionAt :: NumType (IxValue (EndPointOf a)) -> Action a -> Set a -> Set a +runActionAt NumType (IxValue (EndPointOf a)) +x Action a +act = Action a -> (a -> a -> Ordering) -> Set a -> Set a forall a. Action a -> (a -> a -> Ordering) -> Set a -> Set a interpret Action a -act (NumType (IxValue (EndPointOf a)) -> a -> a -> Ordering +act (NumType (IxValue (EndPointOf a)) -> a -> a -> Ordering forall r lineSegment point. (Num r, Ord r, LineSegment_ lineSegment point, Point_ point 2 r) => r -> lineSegment -> lineSegment -> Ordering ordAtX NumType (IxValue (EndPointOf a)) -x) +x) in r -r r +r r -> StatusStructure lineSegment -> r :+ StatusStructure lineSegment forall core extra. core -> extra -> core :+ extra :+ (Action lineSegment @@ -645,22 +645,22 @@ Point_ (IxValue (EndPointOf a)) 2 (NumType (IxValue (EndPointOf a)))) => NumType (IxValue (EndPointOf a)) -> Action a -> Set a -> Set a -runActionAt r +runActionAt r NumType (IxValue (EndPointOf lineSegment)) -mid) StatusStructure lineSegment -ss (NonEmpty (Action lineSegment) -> NonEmpty (Action lineSegment) +mid) StatusStructure lineSegment +ss (NonEmpty (Action lineSegment) -> NonEmpty (Action lineSegment) forall a. NonEmpty (Action a) -> NonEmpty (Action a) orderActs NonEmpty (Action lineSegment) -acts) +acts) -- run deletions first -- | orders the actions to put insertions first and then all deletions -orderActs :: NonEmpty (Action a) -> NonEmpty (Action a) +orderActs :: NonEmpty (Action a) -> NonEmpty (Action a) orderActs :: forall a. NonEmpty (Action a) -> NonEmpty (Action a) -orderActs NonEmpty (Action a) -acts = let ([Action a] -dels,[Action a] -ins) = (Action a -> Bool) +orderActs NonEmpty (Action a) +acts = let ([Action a] +dels,[Action a] +ins) = (Action a -> Bool) -> NonEmpty (Action a) -> ([Action a], [Action a]) forall a. (a -> Bool) -> NonEmpty a -> ([a], [a]) NonEmpty.partition (\case @@ -671,17 +671,17 @@ _ -> Bool False ) NonEmpty (Action a) -acts +acts in [Action a] -> NonEmpty (Action a) forall a. HasCallStack => [a] -> NonEmpty a NonEmpty.fromList ([Action a] -> NonEmpty (Action a)) -> [Action a] -> NonEmpty (Action a) forall a b. (a -> b) -> a -> b $ [Action a] -ins [Action a] -> [Action a] -> [Action a] +ins [Action a] -> [Action a] -> [Action a] forall a. Semigroup a => a -> a -> a <> [Action a] -dels +dels -------------------------------------------------------------------------------- @@ -691,20 +691,20 @@ -- exists. -- -- \(O(\log n)\) -segmentAbove :: ( LineSegment_ lineSegment point, Point_ point 2 r - , Point_ queryPoint 2 r - , Ord r, Num r, HasSupportingLine lineSegment - ) => queryPoint -> VerticalRayShootingStructure lineSegment - -> Maybe lineSegment +segmentAbove :: ( LineSegment_ lineSegment point, Point_ point 2 r + , Point_ queryPoint 2 r + , Ord r, Num r, HasSupportingLine lineSegment + ) => queryPoint -> VerticalRayShootingStructure lineSegment + -> Maybe lineSegment segmentAbove :: forall lineSegment point r queryPoint. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment -segmentAbove queryPoint -q VerticalRayShootingStructure lineSegment -ds = queryPoint +segmentAbove queryPoint +q VerticalRayShootingStructure lineSegment +ds = queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment) forall lineSegment point r queryPoint. @@ -715,8 +715,8 @@ -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment) findSlab queryPoint -q VerticalRayShootingStructure lineSegment -ds Maybe (StatusStructure lineSegment) +q VerticalRayShootingStructure lineSegment +ds Maybe (StatusStructure lineSegment) -> (StatusStructure lineSegment -> Maybe lineSegment) -> Maybe lineSegment forall a b. Maybe a -> (a -> Maybe b) -> Maybe b @@ -728,25 +728,25 @@ HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment lookupAbove queryPoint -q +q -- | Find the segment vertically query point q, if it exists. -- -- \(O(\log n)\) -segmentAboveOrOn :: ( LineSegment_ lineSegment point, Point_ point 2 r - , Point_ queryPoint 2 r - , Ord r, Num r, HasSupportingLine lineSegment - ) => queryPoint -> VerticalRayShootingStructure lineSegment - -> Maybe lineSegment +segmentAboveOrOn :: ( LineSegment_ lineSegment point, Point_ point 2 r + , Point_ queryPoint 2 r + , Ord r, Num r, HasSupportingLine lineSegment + ) => queryPoint -> VerticalRayShootingStructure lineSegment + -> Maybe lineSegment segmentAboveOrOn :: forall lineSegment point r queryPoint. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe lineSegment -segmentAboveOrOn queryPoint -q VerticalRayShootingStructure lineSegment -ds = queryPoint +segmentAboveOrOn queryPoint +q VerticalRayShootingStructure lineSegment +ds = queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment) forall lineSegment point r queryPoint. @@ -757,8 +757,8 @@ -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment) findSlab queryPoint -q VerticalRayShootingStructure lineSegment -ds Maybe (StatusStructure lineSegment) +q VerticalRayShootingStructure lineSegment +ds Maybe (StatusStructure lineSegment) -> (StatusStructure lineSegment -> Maybe lineSegment) -> Maybe lineSegment forall a b. Maybe a -> (a -> Maybe b) -> Maybe b @@ -770,19 +770,19 @@ HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment lookupAboveOrOn queryPoint -q +q -- | Given a query point, find the (data structure of the) slab containing the query point -- -- \(O(\log n)\) -findSlab :: ( LineSegment_ lineSegment point, Point_ point 2 r - , Point_ queryPoint 2 r - , Ord r, Num r, HasSupportingLine lineSegment +findSlab :: ( LineSegment_ lineSegment point, Point_ point 2 r + , Point_ queryPoint 2 r + , Ord r, Num r, HasSupportingLine lineSegment ) - => queryPoint -> VerticalRayShootingStructure lineSegment - -> Maybe (StatusStructure lineSegment) + => queryPoint -> VerticalRayShootingStructure lineSegment + -> Maybe (StatusStructure lineSegment) findSlab :: forall lineSegment point r queryPoint. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, @@ -790,10 +790,10 @@ queryPoint -> VerticalRayShootingStructure lineSegment -> Maybe (StatusStructure lineSegment) -findSlab queryPoint -q VerticalRayShootingStructure lineSegment -ds | queryPoint -qqueryPoint -> Getting r queryPoint r -> r +findSlab queryPoint +q VerticalRayShootingStructure lineSegment +ds | queryPoint +qqueryPoint -> Getting r queryPoint r -> r forall s a. s -> Getting a s a -> a ^.Getting r queryPoint r forall (d :: Natural) point r. @@ -804,7 +804,7 @@ forall a. Ord a => a -> a -> Bool < VerticalRayShootingStructure' r lineSegment VerticalRayShootingStructure lineSegment -dsVerticalRayShootingStructure' r lineSegment +dsVerticalRayShootingStructure' r lineSegment -> Getting r (VerticalRayShootingStructure' r lineSegment) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (VerticalRayShootingStructure' r lineSegment) r @@ -841,9 +841,9 @@ -> Maybe (Elem (Vector (r :+ StatusStructure lineSegment))) forall v. BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) binarySearchFirstIn (queryPoint -q `leftOf `) (VerticalRayShootingStructure' r lineSegment +q `leftOf `) (VerticalRayShootingStructure' r lineSegment VerticalRayShootingStructure lineSegment -dsVerticalRayShootingStructure' r lineSegment +dsVerticalRayShootingStructure' r lineSegment -> Getting (Vector (r :+ StatusStructure lineSegment)) (VerticalRayShootingStructure' r lineSegment) @@ -862,12 +862,12 @@ -> f (VerticalRayShootingStructure' r lineSegment) sweepStruct) where - s -q' leftOf :: s -> (NumType s :+ extra) -> Bool -`leftOf` (NumType s -r :+ extra + s +q' leftOf :: s -> (NumType s :+ extra) -> Bool +`leftOf` (NumType s +r :+ extra _) = s -q's -> Getting (NumType s) s (NumType s) -> NumType s +q's -> Getting (NumType s) s (NumType s) -> NumType s forall s a. s -> Getting a s a -> a ^.Getting (NumType s) s (NumType s) forall (d :: Natural) point r. @@ -877,7 +877,7 @@ xCoord NumType s -> NumType s -> Bool forall a. Ord a => a -> a -> Bool <= NumType s -r +r -------------------------------------------------------------------------------- -- * Querying in a single slab @@ -885,18 +885,18 @@ -- | Finds the segment containing or above the query point 'q' -- -- \(O(\log n)\) -lookupAboveOrOn :: ( LineSegment_ lineSegment point, Point_ point 2 r - , Point_ queryPoint 2 r - , Ord r, Num r, HasSupportingLine lineSegment +lookupAboveOrOn :: ( LineSegment_ lineSegment point, Point_ point 2 r + , Point_ queryPoint 2 r + , Ord r, Num r, HasSupportingLine lineSegment ) - => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment + => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment lookupAboveOrOn :: forall lineSegment point r queryPoint. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment -lookupAboveOrOn queryPoint -q = (LinePV 2 r -> Bool) +lookupAboveOrOn queryPoint +q = (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, @@ -907,23 +907,23 @@ not (Bool -> Bool) -> (LinePV 2 r -> Bool) -> LinePV 2 r -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . (queryPoint -q `liesAbove`)) +q `liesAbove`)) -- | Finds the first segment strictly above q -- -- \(O(\log n)\) -lookupAbove :: ( LineSegment_ lineSegment point, Point_ point 2 r - , Point_ queryPoint 2 r - , Ord r, Num r, HasSupportingLine lineSegment +lookupAbove :: ( LineSegment_ lineSegment point, Point_ point 2 r + , Point_ queryPoint 2 r + , Ord r, Num r, HasSupportingLine lineSegment ) - => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment + => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment lookupAbove :: forall lineSegment point r queryPoint. (LineSegment_ lineSegment point, Point_ point 2 r, Point_ queryPoint 2 r, Ord r, Num r, HasSupportingLine lineSegment) => queryPoint -> StatusStructure lineSegment -> Maybe lineSegment -lookupAbove queryPoint -q = (LinePV 2 r -> Bool) +lookupAbove queryPoint +q = (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, @@ -931,25 +931,25 @@ (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment searchInSlab (queryPoint -q `liesBelow`) +q `liesBelow`) -- | generic searching function -searchInSlab :: (LineSegment_ lineSegment point, Point_ point 2 r - , HasSupportingLine lineSegment, Num r) - => (LinePV 2 r -> Bool) - -> StatusStructure lineSegment -> Maybe lineSegment +searchInSlab :: (LineSegment_ lineSegment point, Point_ point 2 r + , HasSupportingLine lineSegment, Num r) + => (LinePV 2 r -> Bool) + -> StatusStructure lineSegment -> Maybe lineSegment searchInSlab :: forall lineSegment point r. (LineSegment_ lineSegment point, Point_ point 2 r, HasSupportingLine lineSegment, Num r) => (LinePV 2 r -> Bool) -> StatusStructure lineSegment -> Maybe lineSegment -searchInSlab LinePV 2 r -> Bool -p = (Elem (StatusStructure lineSegment) -> Bool) +searchInSlab LinePV 2 r -> Bool +p = (Elem (StatusStructure lineSegment) -> Bool) -> StatusStructure lineSegment -> Maybe (Elem (StatusStructure lineSegment)) forall v. BinarySearch v => (Elem v -> Bool) -> v -> Maybe (Elem v) binarySearchFirstIn (LinePV 2 r -> Bool -p (LinePV 2 r -> Bool) +p (LinePV 2 r -> Bool) -> (lineSegment -> LinePV 2 r) -> lineSegment -> Bool forall b c a. (b -> c) -> (a -> b) -> a -> c . lineSegment -> LinePV 2 r diff --git a/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.ViaLowerEnvelope.html b/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.ViaLowerEnvelope.html index e5556b326..b719da86c 100644 --- a/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.ViaLowerEnvelope.html +++ b/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.ViaLowerEnvelope.html @@ -13,563 +13,372 @@ module HGeometry.VoronoiDiagram.ViaLowerEnvelope ( VoronoiDiagram(..) , VoronoiDiagram'(..) - , ColinearPoint + , asMap , voronoiDiagram , voronoiVertices - , edgeGeometries + -- , edgeGeometries ) where import Control.Lens -import Data.Foldable1 -import qualified Data.Set as Set -import HGeometry.Box -import HGeometry.Duality -import HGeometry.Ext -import HGeometry.HyperPlane.Class -import HGeometry.HyperPlane.NonVertical -import HGeometry.Plane.LowerEnvelope.AdjListForm -import HGeometry.Plane.LowerEnvelope.Naive (lowerEnvelopeVertexForm) -import HGeometry.Plane.LowerEnvelope.VertexForm (VertexForm, vertices') -import HGeometry.Point -import HGeometry.Properties - --------------------------------------------------------------------------------- - --- | A Voronoi diagram -data VoronoiDiagram point = AllColinear !(Set.Set (ColinearPoint point)) - | ConnectedVD !(VoronoiDiagram' point) - -deriving instance (Show point, Show (NumType point)) => Show (VoronoiDiagram point) -deriving instance (Eq point, Eq (NumType point)) => Eq (VoronoiDiagram point) +import Control.Subcategory.Functor +import Data.Foldable1 +import qualified Data.List.NonEmpty as NonEmpty +import qualified Data.Map as Map +import Data.Set (Set) +import qualified Data.Set as Set +import qualified Data.Vector as Vector +import HGeometry.Duality +import HGeometry.Ext +import HGeometry.HyperPlane.Class +import HGeometry.HyperPlane.NonVertical +import HGeometry.Line.General +import HGeometry.Plane.LowerEnvelope ( MinimizationDiagram, Region(..) + , lowerEnvelope, LowerEnvelope(..) + ) +import qualified HGeometry.Plane.LowerEnvelope as LowerEnvelope +import HGeometry.Point +import HGeometry.Properties +import HGeometry.Sequence.Alternating (Alternating(..)) + +-------------------------------------------------------------------------------- -type instance NumType (VoronoiDiagram point) = NumType point -type instance Dimension (VoronoiDiagram point) = 2 -- Dimension point - --- | Just a newtype around point; used to model a set of points that are all colinear in --- the Vornoi diagram. -newtype ColinearPoint point = ColinearPoint point - deriving (Int -> ColinearPoint point -> ShowS -[ColinearPoint point] -> ShowS -ColinearPoint point -> String -(Int -> ColinearPoint point -> ShowS) --> (ColinearPoint point -> String) --> ([ColinearPoint point] -> ShowS) --> Show (ColinearPoint point) -forall point. Show point => Int -> ColinearPoint point -> ShowS -forall point. Show point => [ColinearPoint point] -> ShowS -forall point. Show point => ColinearPoint point -> String -forall a. -(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a -$cshowsPrec :: forall point. Show point => Int -> ColinearPoint point -> ShowS -showsPrec :: Int -> ColinearPoint point -> ShowS -$cshow :: forall point. Show point => ColinearPoint point -> String -show :: ColinearPoint point -> String -$cshowList :: forall point. Show point => [ColinearPoint point] -> ShowS -showList :: [ColinearPoint point] -> ShowS -Show,ColinearPoint point -> ColinearPoint point -> Bool -(ColinearPoint point -> ColinearPoint point -> Bool) --> (ColinearPoint point -> ColinearPoint point -> Bool) --> Eq (ColinearPoint point) -forall point. -Eq point => -ColinearPoint point -> ColinearPoint point -> Bool -forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a -$c== :: forall point. -Eq point => -ColinearPoint point -> ColinearPoint point -> Bool -== :: ColinearPoint point -> ColinearPoint point -> Bool -$c/= :: forall point. -Eq point => -ColinearPoint point -> ColinearPoint point -> Bool -/= :: ColinearPoint point -> ColinearPoint point -> Bool -Eq) +-- | A Voronoi diagram +data VoronoiDiagram point = + AllColinear !(Alternating Vector.Vector (VerticalOrLineEQ (NumType point)) point) + | ConnectedVD !(VoronoiDiagram' point) + +deriving instance (Show point, Show (NumType point)) => Show (VoronoiDiagram point) +deriving instance (Eq point, Eq (NumType point)) => Eq (VoronoiDiagram point) -instance Wrapped (ColinearPoint point) where - type Unwrapped (ColinearPoint point) = point - _Wrapped' :: Iso' (ColinearPoint point) (Unwrapped (ColinearPoint point)) -_Wrapped' = p point (f point) --> p (ColinearPoint point) (f (ColinearPoint point)) -p (Unwrapped (ColinearPoint point)) - (f (Unwrapped (ColinearPoint point))) --> p (ColinearPoint point) (f (ColinearPoint point)) -forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b -Iso (ColinearPoint point) (ColinearPoint point) point point -coerced +type instance NumType (VoronoiDiagram point) = NumType point +type instance Dimension (VoronoiDiagram point) = 2 -- Dimension point + --- instance Rewrapped (ColinearPoint point) point +-------------------------------------------------------------------------------- --------------------------------------------------------------------------------- - --- | A connected VoronoiDiagram -newtype VoronoiDiagram' point = - VoronoiDiagram (LowerEnvelope' (Plane (NumType point) :+ point)) +-- | A connected VoronoiDiagram +newtype VoronoiDiagram' point = VoronoiDiagram (MinimizationDiagram (NumType point) point) + +deriving instance (Show point, Show (NumType point)) => Show (VoronoiDiagram' point) +deriving instance (Eq point, Eq (NumType point)) => Eq (VoronoiDiagram' point) -deriving instance (Show point, Show (NumType point)) => Show (VoronoiDiagram' point) -deriving instance (Eq point, Eq (NumType point)) => Eq (VoronoiDiagram' point) +type instance NumType (VoronoiDiagram' point) = NumType point +type instance Dimension (VoronoiDiagram' point) = 2 -- Dimension point -type instance NumType (VoronoiDiagram' point) = NumType point -type instance Dimension (VoronoiDiagram' point) = 2 -- Dimension point - --- | Iso to Access the underlying LowerEnvelope -_VoronoiDiagramLowerEnvelope :: Iso (VoronoiDiagram' point) (VoronoiDiagram' point') - (LowerEnvelope' (Plane (NumType point) :+ point)) - (LowerEnvelope' (Plane (NumType point') :+ point')) -_VoronoiDiagramLowerEnvelope :: forall point point' (p :: * -> * -> *) (f :: * -> *). +-- | Iso to Access the underlying LowerEnvelope +_VoronoiDiagramLowerEnvelope :: Iso (VoronoiDiagram' point) (VoronoiDiagram' point') + (MinimizationDiagram (NumType point) point) + (MinimizationDiagram (NumType point') point') +_VoronoiDiagramLowerEnvelope :: forall point point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => -p (LowerEnvelope' (Plane (NumType point) :+ point)) - (f (LowerEnvelope' (Plane (NumType point') :+ point'))) +p (MinimizationDiagram (NumType point) point) + (f (MinimizationDiagram (NumType point') point')) -> p (VoronoiDiagram' point) (f (VoronoiDiagram' point')) -_VoronoiDiagramLowerEnvelope = p (LowerEnvelope' (Plane (NumType point) :+ point)) - (f (LowerEnvelope' (Plane (NumType point') :+ point'))) +_VoronoiDiagramLowerEnvelope = p (MinimizationDiagram (NumType point) point) + (f (MinimizationDiagram (NumType point') point')) -> p (VoronoiDiagram' point) (f (VoronoiDiagram' point')) forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Iso (VoronoiDiagram' point) (VoronoiDiagram' point') - (LowerEnvelope' (Plane (NumType point) :+ point)) - (LowerEnvelope' (Plane (NumType point') :+ point')) + (MinimizationDiagram (NumType point) point) + (MinimizationDiagram (NumType point') point') coerced - --------------------------------------------------------------------------------- - -instance (Ord (NumType point), Num (NumType point)) => IsBoxable (VoronoiDiagram' point) where - boundingBox :: forall (d :: Nat) r. -(d ~ Dimension (VoronoiDiagram' point), - r ~ NumType (VoronoiDiagram' point), Ord r) => -VoronoiDiagram' point -> Box (Point d r) -boundingBox VoronoiDiagram' point -vd = Point - (Dimension (LowerEnvelope' (Plane (NumType point) :+ point))) - (NumType (LowerEnvelope' (Plane (NumType point) :+ point))) --> Point d r -forall (i :: Nat) point (d :: Nat) r. -(Point_ point d r, i <= d, Has_ Vector_ i r) => -point -> Point i r -projectPoint (Point - (Dimension (LowerEnvelope' (Plane (NumType point) :+ point))) - (NumType (LowerEnvelope' (Plane (NumType point) :+ point))) - -> Point d r) --> Box - (Point - (Dimension (LowerEnvelope' (Plane (NumType point) :+ point))) - (NumType (LowerEnvelope' (Plane (NumType point) :+ point)))) --> Box (Point d r) -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -<$> LowerEnvelope' (Plane (NumType point) :+ point) --> Box - (Point - (Dimension (LowerEnvelope' (Plane (NumType point) :+ point))) - (NumType (LowerEnvelope' (Plane (NumType point) :+ point)))) -forall (d :: Nat) r. -(d ~ Dimension (LowerEnvelope' (Plane (NumType point) :+ point)), - r ~ NumType (LowerEnvelope' (Plane (NumType point) :+ point)), - Ord r) => -LowerEnvelope' (Plane (NumType point) :+ point) -> Box (Point d r) -forall g (d :: Nat) r. -(IsBoxable g, d ~ Dimension g, r ~ NumType g, Ord r) => -g -> Box (Point d r) -boundingBox (VoronoiDiagram' point -vdVoronoiDiagram' point --> Getting - (LowerEnvelope' (Plane (NumType point) :+ point)) - (VoronoiDiagram' point) - (LowerEnvelope' (Plane (NumType point) :+ point)) --> LowerEnvelope' (Plane (NumType point) :+ point) -forall s a. s -> Getting a s a -> a -^.Getting - (LowerEnvelope' (Plane (NumType point) :+ point)) + +-- | Get, for each point, its Voronoi region +asMap :: (Point_ point 2 r, Ord point) + => VoronoiDiagram' point -> Map.Map point (Region r (Point 2 r)) +asMap :: forall point r. +(Point_ point 2 r, Ord point) => +VoronoiDiagram' point -> Map point (Region r (Point 2 r)) +asMap = MinimizationDiagram r point -> Map point (Region r (Point 2 r)) +forall r plane. +MinimizationDiagram r plane -> Map plane (Region r (Point 2 r)) +LowerEnvelope.asMap (MinimizationDiagram r point -> Map point (Region r (Point 2 r))) +-> (VoronoiDiagram' point -> MinimizationDiagram r point) +-> VoronoiDiagram' point +-> Map point (Region r (Point 2 r)) +forall b c a. (b -> c) -> (a -> b) -> a -> c +. Getting + (MinimizationDiagram r point) (VoronoiDiagram' point) - (LowerEnvelope' (Plane (NumType point) :+ point)) + (MinimizationDiagram r point) +-> VoronoiDiagram' point -> MinimizationDiagram r point +forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a +view Getting + (MinimizationDiagram r point) + (VoronoiDiagram' point) + (MinimizationDiagram r point) +(MinimizationDiagram (NumType point) point + -> Const + (MinimizationDiagram r point) + (MinimizationDiagram (NumType point) point)) +-> VoronoiDiagram' point +-> Const (MinimizationDiagram r point) (VoronoiDiagram' point) forall point point' (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => -p (LowerEnvelope' (Plane (NumType point) :+ point)) - (f (LowerEnvelope' (Plane (NumType point') :+ point'))) +p (MinimizationDiagram (NumType point) point) + (f (MinimizationDiagram (NumType point') point')) -> p (VoronoiDiagram' point) (f (VoronoiDiagram' point')) -_VoronoiDiagramLowerEnvelope) - --------------------------------------------------------------------------------- - --- | Computes the Voronoi Diagram, by lifting the points to planes, and computing --- the lower envelope of these planes. --- --- \(O(n\log n)\) -voronoiDiagram :: ( Point_ point 2 r, Functor f, Ord point - , Ord r, Fractional r, Foldable1 f - , Show point, Show r - ) => f point -> VoronoiDiagram point -voronoiDiagram :: forall point r (f :: * -> *). +_VoronoiDiagramLowerEnvelope + +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- + +-- | Computes the Voronoi Diagram, by lifting the points to planes, and computing +-- the lower envelope of these planes. +-- +-- O(n^4) ( we currently use the brute force implentation...) TODO: switch to something faster + +-- \(O(n\log n)\) +voronoiDiagram :: ( Point_ point 2 r, Functor f, Ord point + , Ord r, Fractional r, Foldable1 f + , Show point, Show r + ) => f point -> VoronoiDiagram point +voronoiDiagram :: forall point r (f :: * -> *). (Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, Foldable1 f, Show point, Show r) => f point -> VoronoiDiagram point -voronoiDiagram f point -pts = case f (NonVerticalHyperPlane 3 r :+ point) --> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point) -forall {plane} {f :: * -> *}. -(Show plane, Show (NumType plane), Foldable1 f, - NonVerticalHyperPlane_ plane 3 (NumType plane), Ord plane, - Ord (NumType plane), Fractional (NumType plane), Functor f) => +voronoiDiagram = (f (Plane r :+ point) -> LowerEnvelope (Plane r :+ point)) +-> f point -> VoronoiDiagram point +forall point r (nonEmpty :: * -> *). +(Point_ point 2 r, Functor nonEmpty, Ord point, Ord r, + Fractional r, Foldable1 nonEmpty) => +(nonEmpty (Plane r :+ point) -> LowerEnvelope (Plane r :+ point)) +-> nonEmpty point -> VoronoiDiagram point +voronoiDiagramWith f (Plane r :+ point) -> LowerEnvelope (Plane r :+ point) +forall plane r (f :: * -> *). +(Plane_ plane r, Ord r, Fractional r, Foldable1 f, Functor f, + Ord plane, Show plane, Show r) => f plane -> LowerEnvelope plane -lowerEnvelope' (f (NonVerticalHyperPlane 3 r :+ point) - -> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point)) --> (f point -> f (NonVerticalHyperPlane 3 r :+ point)) --> f point --> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point) +lowerEnvelope + +-- | Given a function to compute a lower envelope; construct use it to construct the +-- Voronoi diagram. +voronoiDiagramWith :: ( Point_ point 2 r, Functor nonEmpty, Ord point + , Ord r, Fractional r, Foldable1 nonEmpty + ) + => (nonEmpty (Plane r :+ point) -> LowerEnvelope (Plane r :+ point)) + + -> nonEmpty point + -> VoronoiDiagram point +voronoiDiagramWith :: forall point r (nonEmpty :: * -> *). +(Point_ point 2 r, Functor nonEmpty, Ord point, Ord r, + Fractional r, Foldable1 nonEmpty) => +(nonEmpty (Plane r :+ point) -> LowerEnvelope (Plane r :+ point)) +-> nonEmpty point -> VoronoiDiagram point +voronoiDiagramWith nonEmpty (Plane r :+ point) -> LowerEnvelope (Plane r :+ point) +lowerEnv nonEmpty point +pts = case nonEmpty (Plane r :+ point) -> LowerEnvelope (Plane r :+ point) +lowerEnv (nonEmpty (Plane r :+ point) -> LowerEnvelope (Plane r :+ point)) +-> (nonEmpty point -> nonEmpty (Plane r :+ point)) +-> nonEmpty point +-> LowerEnvelope (Plane r :+ point) forall b c a. (b -> c) -> (a -> b) -> a -> c -. (point -> NonVerticalHyperPlane 3 r :+ point) --> f point -> f (NonVerticalHyperPlane 3 r :+ point) -forall a b. (a -> b) -> f a -> f b +. (point -> Plane r :+ point) +-> nonEmpty point -> nonEmpty (Plane r :+ point) +forall a b. (a -> b) -> nonEmpty a -> nonEmpty b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\point -p -> point -> NonVerticalHyperPlane 3 r -forall point r. -(Point_ point 2 r, Num r) => -point -> NonVerticalHyperPlane 3 r -liftPointToPlane point -p NonVerticalHyperPlane 3 r --> point -> NonVerticalHyperPlane 3 r :+ point +fmap (\point +p -> point -> Plane r +pointToPlane point +p Plane r -> point -> Plane r :+ point forall core extra. core -> extra -> core :+ extra :+ point -p) (f point -> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point)) --> f point -> LowerEnvelope (NonVerticalHyperPlane 3 r :+ point) +p) (nonEmpty point -> LowerEnvelope (Plane r :+ point)) +-> nonEmpty point -> LowerEnvelope (Plane r :+ point) forall a b. (a -> b) -> a -> b -$ f point -pts of - ParallelStrips Set (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) -strips -> Set (ColinearPoint point) -> VoronoiDiagram point -forall point. Set (ColinearPoint point) -> VoronoiDiagram point -AllColinear (Set (ColinearPoint point) -> VoronoiDiagram point) --> Set (ColinearPoint point) -> VoronoiDiagram point +$ nonEmpty point +pts of + ParallelStrips Alternating + Vector + (VerticalOrLineEQ (NumType (Plane r :+ point))) + (Plane r :+ point) +strips -> Alternating Vector (VerticalOrLineEQ (NumType point)) point +-> VoronoiDiagram point +forall point. +Alternating Vector (VerticalOrLineEQ (NumType point)) point +-> VoronoiDiagram point +AllColinear (Alternating Vector (VerticalOrLineEQ (NumType point)) point + -> VoronoiDiagram point) +-> Alternating Vector (VerticalOrLineEQ (NumType point)) point +-> VoronoiDiagram point forall a b. (a -> b) -> a -> b -$ (ParallelPlane (NonVerticalHyperPlane 3 r :+ point) - -> ColinearPoint point) --> Set (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) --> Set (ColinearPoint point) -forall a b. (a -> b) -> Set a -> Set b -Set.mapMonotonic ParallelPlane (NonVerticalHyperPlane 3 r :+ point) --> ColinearPoint point -getPoint Set (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) -strips - ConnectedEnvelope LowerEnvelope' (NonVerticalHyperPlane 3 r :+ point) -env -> VoronoiDiagram' point -> VoronoiDiagram point +$ ((Plane r :+ point) -> point) +-> Alternating Vector (VerticalOrLineEQ r) (Plane r :+ point) +-> Alternating Vector (VerticalOrLineEQ r) point +forall a b. +(a -> b) +-> Alternating Vector (VerticalOrLineEQ r) a +-> Alternating Vector (VerticalOrLineEQ r) b +forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b +fmap ((Plane r :+ point) +-> Getting point (Plane r :+ point) point -> point +forall s a. s -> Getting a s a -> a +^.Getting point (Plane r :+ point) point +forall core extra extra' (f :: * -> *). +Functor f => +(extra -> f extra') -> (core :+ extra) -> f (core :+ extra') +extra) Alternating Vector (VerticalOrLineEQ r) (Plane r :+ point) +Alternating + Vector + (VerticalOrLineEQ (NumType (Plane r :+ point))) + (Plane r :+ point) +strips + ConnectedEnvelope MinimizationDiagram (NumType (Plane r :+ point)) (Plane r :+ point) +env -> VoronoiDiagram' point -> VoronoiDiagram point forall point. VoronoiDiagram' point -> VoronoiDiagram point ConnectedVD (VoronoiDiagram' point -> VoronoiDiagram point) --> VoronoiDiagram' point -> VoronoiDiagram point -forall a b. (a -> b) -> a -> b -$ LowerEnvelope' (Plane (NumType point) :+ point) --> VoronoiDiagram' point +-> (MinimizationDiagram + (NumType (Plane r :+ point)) (Plane r :+ point) + -> VoronoiDiagram' point) +-> MinimizationDiagram + (NumType (Plane r :+ point)) (Plane r :+ point) +-> VoronoiDiagram point +forall b c a. (b -> c) -> (a -> b) -> a -> c +. MinimizationDiagram r point -> VoronoiDiagram' point +MinimizationDiagram (NumType point) point -> VoronoiDiagram' point forall point. -LowerEnvelope' (Plane (NumType point) :+ point) +MinimizationDiagram (NumType point) point -> VoronoiDiagram' point +VoronoiDiagram (MinimizationDiagram r point -> VoronoiDiagram' point) +-> (MinimizationDiagram r (Plane r :+ point) + -> MinimizationDiagram r point) +-> MinimizationDiagram r (Plane r :+ point) -> VoronoiDiagram' point -VoronoiDiagram LowerEnvelope' (NonVerticalHyperPlane 3 r :+ point) -LowerEnvelope' (Plane (NumType point) :+ point) -env - where - lowerEnvelope' :: f plane -> LowerEnvelope plane -lowerEnvelope' f plane -hs = f plane -> VertexForm plane -> LowerEnvelope plane -forall (f :: * -> *) plane r. -(Plane_ plane r, Ord plane, Ord r, Fractional r, Show plane, - Show r, Foldable1 f) => -f plane -> VertexForm plane -> LowerEnvelope plane -fromVertexForm f plane -hs (VertexForm plane -> LowerEnvelope plane) --> VertexForm plane -> LowerEnvelope plane -forall a b. (a -> b) -> a -> b -$ f plane -> VertexForm plane -forall plane r (f :: * -> *). -(Plane_ plane r, Ord r, Fractional r, Foldable f, Functor f, - Ord plane) => -f plane -> VertexForm plane -upperEnvelopeVertexForm f plane -hs - getPoint :: ParallelPlane (NonVerticalHyperPlane 3 r :+ point) --> ColinearPoint point -getPoint = Getting - (ColinearPoint point) - (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) - (ColinearPoint point) --> ParallelPlane (NonVerticalHyperPlane 3 r :+ point) --> ColinearPoint point -forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a -view (((NonVerticalHyperPlane 3 r :+ point) - -> Const - (ColinearPoint point) (NonVerticalHyperPlane 3 r :+ point)) --> ParallelPlane (NonVerticalHyperPlane 3 r :+ point) --> Const - (ColinearPoint point) - (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) -(Unwrapped (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) - -> Const - (ColinearPoint point) - (Unwrapped (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)))) --> ParallelPlane (NonVerticalHyperPlane 3 r :+ point) --> Const - (ColinearPoint point) - (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) -forall s. Wrapped s => Iso' s (Unwrapped s) -Iso' - (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) - (Unwrapped (ParallelPlane (NonVerticalHyperPlane 3 r :+ point))) -_Wrapped'(((NonVerticalHyperPlane 3 r :+ point) - -> Const - (ColinearPoint point) (NonVerticalHyperPlane 3 r :+ point)) - -> ParallelPlane (NonVerticalHyperPlane 3 r :+ point) - -> Const - (ColinearPoint point) - (ParallelPlane (NonVerticalHyperPlane 3 r :+ point))) --> ((ColinearPoint point - -> Const (ColinearPoint point) (ColinearPoint point)) - -> (NonVerticalHyperPlane 3 r :+ point) - -> Const - (ColinearPoint point) (NonVerticalHyperPlane 3 r :+ point)) --> Getting - (ColinearPoint point) - (ParallelPlane (NonVerticalHyperPlane 3 r :+ point)) - (ColinearPoint point) forall b c a. (b -> c) -> (a -> b) -> a -> c -.(point -> Const (ColinearPoint point) point) --> (NonVerticalHyperPlane 3 r :+ point) --> Const (ColinearPoint point) (NonVerticalHyperPlane 3 r :+ point) +. ((Plane r :+ point) -> point) +-> MinimizationDiagram r (Plane r :+ point) +-> MinimizationDiagram r point +forall a b. +(Dom (MinimizationDiagram r) a, Dom (MinimizationDiagram r) b) => +(a -> b) -> MinimizationDiagram r a -> MinimizationDiagram r b +forall (f :: * -> *) a b. +(CFunctor f, Dom f a, Dom f b) => +(a -> b) -> f a -> f b +cmap ((Plane r :+ point) +-> Getting point (Plane r :+ point) point -> point +forall s a. s -> Getting a s a -> a +^.Getting point (Plane r :+ point) point forall core extra extra' (f :: * -> *). Functor f => (extra -> f extra') -> (core :+ extra) -> f (core :+ extra') -extra((point -> Const (ColinearPoint point) point) - -> (NonVerticalHyperPlane 3 r :+ point) - -> Const - (ColinearPoint point) (NonVerticalHyperPlane 3 r :+ point)) --> ((ColinearPoint point - -> Const (ColinearPoint point) (ColinearPoint point)) - -> point -> Const (ColinearPoint point) point) --> (ColinearPoint point - -> Const (ColinearPoint point) (ColinearPoint point)) --> (NonVerticalHyperPlane 3 r :+ point) --> Const (ColinearPoint point) (NonVerticalHyperPlane 3 r :+ point) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(point -> ColinearPoint point) --> (ColinearPoint point - -> Const (ColinearPoint point) (ColinearPoint point)) --> point --> Const (ColinearPoint point) point -forall (p :: * -> * -> *) (f :: * -> *) s a. -(Profunctor p, Contravariant f) => -(s -> a) -> Optic' p f s a -to point -> ColinearPoint point -forall point. point -> ColinearPoint point -ColinearPoint) - --- | Computes all voronoi vertices -voronoiVertices :: ( Point_ point 2 r, Functor f, Ord point - , Ord r, Fractional r, Foldable f - ) => f point -> [Point 2 r] -voronoiVertices :: forall point r (f :: * -> *). -(Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, - Foldable f) => -f point -> [Point 2 r] -voronoiVertices = ((PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point)) - -> Point 2 r) --> [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))] --> [Point 2 r] -forall a b. (a -> b) -> [a] -> [b] -map (PointF (Vector 3 r) -> Point 2 r -forall (i :: Nat) point (d :: Nat) r. -(Point_ point d r, i <= d, Has_ Vector_ i r) => -point -> Point i r -projectPoint (PointF (Vector 3 r) -> Point 2 r) --> ((PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point)) - -> PointF (Vector 3 r)) --> (PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point)) --> Point 2 r -forall b c a. (b -> c) -> (a -> b) -> a -> c -. (PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point)) --> PointF (Vector 3 r) -forall a b. (a, b) -> a -fst) - ([(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))] - -> [Point 2 r]) --> (f point - -> [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))]) --> f point --> [Point 2 r] -forall b c a. (b -> c) -> (a -> b) -> a -> c -. IndexedGetting - (PointF (Vector 3 r)) - (Endo - [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))]) - (VertexForm (NonVerticalHyperPlane 3 r :+ point)) - (Definers (NonVerticalHyperPlane 3 r :+ point)) --> VertexForm (NonVerticalHyperPlane 3 r :+ point) --> [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))] -forall i a s. IndexedGetting i (Endo [(i, a)]) s a -> s -> [(i, a)] -itoListOf IndexedGetting - (PointF (Vector 3 r)) - (Endo - [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))]) - (VertexForm (NonVerticalHyperPlane 3 r :+ point)) - (Definers (NonVerticalHyperPlane 3 r :+ point)) -Indexed - (PointF (Vector 3 r)) - (Vertex (VertexForm (NonVerticalHyperPlane 3 r :+ point))) - (Const - (Endo - [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))]) - (Vertex (VertexForm (NonVerticalHyperPlane 3 r :+ point)))) --> VertexForm (NonVerticalHyperPlane 3 r :+ point) --> Const - (Endo - [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))]) - (VertexForm (NonVerticalHyperPlane 3 r :+ point)) -forall plane (p :: * -> * -> *) (f :: * -> *). -(Indexable (VertexIx (VertexForm plane)) p, Applicative f) => -p (Vertex (VertexForm plane)) (f (Vertex (VertexForm plane))) --> VertexForm plane -> f (VertexForm plane) -vertices' - (VertexForm (NonVerticalHyperPlane 3 r :+ point) - -> [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))]) --> (f point -> VertexForm (NonVerticalHyperPlane 3 r :+ point)) --> f point --> [(PointF (Vector 3 r), - Definers (NonVerticalHyperPlane 3 r :+ point))] -forall b c a. (b -> c) -> (a -> b) -> a -> c -. f (NonVerticalHyperPlane 3 r :+ point) --> VertexForm (NonVerticalHyperPlane 3 r :+ point) -forall plane r (f :: * -> *). -(Plane_ plane r, Ord r, Fractional r, Foldable f, Functor f, - Ord plane) => -f plane -> VertexForm plane -upperEnvelopeVertexForm - (f (NonVerticalHyperPlane 3 r :+ point) - -> VertexForm (NonVerticalHyperPlane 3 r :+ point)) --> (f point -> f (NonVerticalHyperPlane 3 r :+ point)) --> f point --> VertexForm (NonVerticalHyperPlane 3 r :+ point) +extra) (MinimizationDiagram + (NumType (Plane r :+ point)) (Plane r :+ point) + -> VoronoiDiagram point) +-> MinimizationDiagram + (NumType (Plane r :+ point)) (Plane r :+ point) +-> VoronoiDiagram point +forall a b. (a -> b) -> a -> b +$ MinimizationDiagram (NumType (Plane r :+ point)) (Plane r :+ point) +env + where + -- lifts the point to a plane; so that the lower envelope corresponds to the VD + pointToPlane :: point -> Plane r +pointToPlane = Plane r -> Plane r +flipZ (Plane r -> Plane r) -> (point -> Plane r) -> point -> Plane r forall b c a. (b -> c) -> (a -> b) -> a -> c -. (point -> NonVerticalHyperPlane 3 r :+ point) --> f point -> f (NonVerticalHyperPlane 3 r :+ point) -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap (\point -p -> point -> NonVerticalHyperPlane 3 r +. point -> Plane r forall point r. (Point_ point 2 r, Num r) => point -> NonVerticalHyperPlane 3 r -liftPointToPlane point -p NonVerticalHyperPlane 3 r --> point -> NonVerticalHyperPlane 3 r :+ point -forall core extra. core -> extra -> core :+ extra -:+ point -p) --- FIXME: get rid of the ord point constraint - --- | Computes the vertex form of the upper envelope. The z-coordinates are still flipped. -upperEnvelopeVertexForm :: ( Plane_ plane r - , Ord r, Fractional r, Foldable f, Functor f, Ord plane - ) => f plane -> VertexForm plane -upperEnvelopeVertexForm :: forall plane r (f :: * -> *). -(Plane_ plane r, Ord r, Fractional r, Foldable f, Functor f, - Ord plane) => -f plane -> VertexForm plane -upperEnvelopeVertexForm = f plane -> VertexForm plane -forall plane r (f :: * -> *). -(Plane_ plane r, Ord r, Fractional r, Foldable f, Ord plane) => -f plane -> VertexForm plane -lowerEnvelopeVertexForm (f plane -> VertexForm plane) --> (f plane -> f plane) -> f plane -> VertexForm plane -forall b c a. (b -> c) -> (a -> b) -> a -> c -. (plane -> plane) -> f plane -> f plane -forall a b. (a -> b) -> f a -> f b -forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b -fmap plane -> plane -flipZ - where - flipZ :: plane -> plane -flipZ = ASetter plane plane (NumType plane) (NumType plane) --> (NumType plane -> NumType plane) -> plane -> plane +liftPointToPlane + flipZ :: Plane r -> Plane r +flipZ = ASetter (Plane r) (Plane r) (NumType (Plane r)) (NumType (Plane r)) +-> (NumType (Plane r) -> NumType (Plane r)) -> Plane r -> Plane r forall s t a b. ASetter s t a b -> (a -> b) -> s -> t -over ((Vector (Dimension plane) (NumType plane) - -> Identity (Vector (Dimension plane) (NumType plane))) --> plane -> Identity plane +over ((Vector (Dimension (Plane r)) (NumType (Plane r)) + -> Identity (Vector (Dimension (Plane r)) (NumType (Plane r)))) +-> Plane r -> Identity (Plane r) forall hyperPlane (d :: Nat) r. NonVerticalHyperPlane_ hyperPlane d r => Lens' hyperPlane (Vector d r) -Lens' plane (Vector (Dimension plane) (NumType plane)) -hyperPlaneCoefficients((Vector (Dimension plane) (NumType plane) - -> Identity (Vector (Dimension plane) (NumType plane))) - -> plane -> Identity plane) --> ((NumType plane -> Identity (NumType plane)) - -> Vector (Dimension plane) (NumType plane) - -> Identity (Vector (Dimension plane) (NumType plane))) --> ASetter plane plane (NumType plane) (NumType plane) +Lens' (Plane r) (Vector (Dimension (Plane r)) (NumType (Plane r))) +hyperPlaneCoefficients((Vector (Dimension (Plane r)) (NumType (Plane r)) + -> Identity (Vector (Dimension (Plane r)) (NumType (Plane r)))) + -> Plane r -> Identity (Plane r)) +-> ((NumType (Plane r) -> Identity (NumType (Plane r))) + -> Vector (Dimension (Plane r)) (NumType (Plane r)) + -> Identity (Vector (Dimension (Plane r)) (NumType (Plane r)))) +-> ASetter + (Plane r) (Plane r) (NumType (Plane r)) (NumType (Plane r)) forall b c a. (b -> c) -> (a -> b) -> a -> c -.(NumType plane -> Identity (NumType plane)) --> Vector (Dimension plane) (NumType plane) --> Identity (Vector (Dimension plane) (NumType plane)) +.(NumType (Plane r) -> Identity (NumType (Plane r))) +-> Vector (Dimension (Plane r)) (NumType (Plane r)) +-> Identity (Vector (Dimension (Plane r)) (NumType (Plane r))) forall (t :: * -> *) (f :: * -> *) a b. (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) forall (f :: * -> *) a b. Applicative f => (a -> f b) --> Vector (Dimension plane) a -> f (Vector (Dimension plane) b) -traverse) NumType plane -> NumType plane +-> Vector (Dimension (Plane r)) a +-> f (Vector (Dimension (Plane r)) b) +traverse) NumType (Plane r) -> NumType (Plane r) forall a. Num a => a -> a negate - - --------------------------------------------------------------------------------- - --- | Get the halflines and line segments representing the VoronoiDiagram -edgeGeometries :: (Point_ point 2 r, Ord r, Fractional r - - , Show point, Show r - ) - => Fold (VoronoiDiagram' point) (EdgeGeometry (Point 2 r)) -edgeGeometries :: forall point r. -(Point_ point 2 r, Ord r, Fractional r, Show point, Show r) => -Fold (VoronoiDiagram' point) (EdgeGeometry (Point 2 r)) -edgeGeometries = (LowerEnvelope' (Plane (NumType point) :+ point) - -> f (LowerEnvelope' (Plane (NumType point) :+ point))) --> VoronoiDiagram' point -> f (VoronoiDiagram' point) -forall point point' (p :: * -> * -> *) (f :: * -> *). -(Profunctor p, Functor f) => -p (LowerEnvelope' (Plane (NumType point) :+ point)) - (f (LowerEnvelope' (Plane (NumType point') :+ point'))) --> p (VoronoiDiagram' point) (f (VoronoiDiagram' point')) -_VoronoiDiagramLowerEnvelope((LowerEnvelope' (Plane (NumType point) :+ point) - -> f (LowerEnvelope' (Plane (NumType point) :+ point))) - -> VoronoiDiagram' point -> f (VoronoiDiagram' point)) --> ((EdgeGeometry (Point 2 r) -> f (EdgeGeometry (Point 2 r))) - -> LowerEnvelope' (Plane (NumType point) :+ point) - -> f (LowerEnvelope' (Plane (NumType point) :+ point))) --> (EdgeGeometry (Point 2 r) -> f (EdgeGeometry (Point 2 r))) --> VoronoiDiagram' point --> f (VoronoiDiagram' point) -forall b c a. (b -> c) -> (a -> b) -> a -> c -.(EdgeGeometry (Point 2 r) -> f (EdgeGeometry (Point 2 r))) --> LowerEnvelope' (Plane (NumType point) :+ point) --> f (LowerEnvelope' (Plane (NumType point) :+ point)) -forall plane r. -(Plane_ plane r, Ord r, Fractional r, Show plane, Show r) => -IndexedFold - (EdgeIx (LowerEnvelope' plane)) - (LowerEnvelope' plane) - (EdgeGeometry (Point 2 r)) -IndexedFold - (EdgeIx (LowerEnvelope' (Plane (NumType point) :+ point))) - (LowerEnvelope' (Plane (NumType point) :+ point)) - (EdgeGeometry (Point 2 r)) -projectedEdgeGeometries --- TODO: figure out if this can be an indexed fold - \ No newline at end of file + + + +-- | Compute the vertices of the Voronoi diagram +voronoiVertices :: ( Point_ point 2 r, Functor f, Ord point + , Ord r, Fractional r, Foldable1 f + , Show point, Show r + , Ord point + ) => f point -> Set (Point 2 r) +voronoiVertices :: forall point r (f :: * -> *). +(Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, + Foldable1 f, Show point, Show r, Ord point) => +f point -> Set (Point 2 r) +voronoiVertices f point +pts = case f point -> VoronoiDiagram point +forall point r (f :: * -> *). +(Point_ point 2 r, Functor f, Ord point, Ord r, Fractional r, + Foldable1 f, Show point, Show r) => +f point -> VoronoiDiagram point +voronoiDiagram f point +pts of + AllColinear Alternating Vector (VerticalOrLineEQ (NumType point)) point +_ -> Set (Point 2 r) +forall a. Monoid a => a +mempty + ConnectedVD VoronoiDiagram' point +vd -> (Region r (Point 2 r) -> Set (Point 2 r)) +-> Map point (Region r (Point 2 r)) -> Set (Point 2 r) +forall m a. Monoid m => (a -> m) -> Map point a -> m +forall (t :: * -> *) m a. +(Foldable t, Monoid m) => +(a -> m) -> t a -> m +foldMap (\case + Bounded CircularList (Point 2 r) +vs -> CircularList (Point 2 r) -> Set (Point 2 r) +forall a. Ord a => [a] -> Set a +Set.fromList CircularList (Point 2 r) +vs + Unbounded Vector 2 r +_ NonEmpty (Point 2 r) +vs Vector 2 r +_ -> CircularList (Point 2 r) -> Set (Point 2 r) +forall a. Ord a => [a] -> Set a +Set.fromList (NonEmpty (Point 2 r) -> CircularList (Point 2 r) +forall a. NonEmpty a -> [a] +NonEmpty.toList NonEmpty (Point 2 r) +vs) + ) (VoronoiDiagram' point -> Map point (Region r (Point 2 r)) +forall point r. +(Point_ point 2 r, Ord point) => +VoronoiDiagram' point -> Map point (Region r (Point 2 r)) +asMap VoronoiDiagram' point +vd) + +-------------------------------------------------------------------------------- + +-- -- | Get the halflines and line segments representing the VoronoiDiagram +-- edgeGeometries :: (Point_ point 2 r, Ord r, Fractional r + +-- , Show point, Show r +-- ) +-- => Fold (VoronoiDiagram' point) (EdgeGeometry (Point 2 r)) +-- edgeGeometries = _VoronoiDiagramLowerEnvelope.projectedEdgeGeometries +-- -- TODO: figure out if this can be an indexed fold + \ No newline at end of file diff --git a/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.html b/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.html index 74a699639..beaeb7bfe 100644 --- a/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.html +++ b/haddocks/hgeometry/src/HGeometry.VoronoiDiagram.html @@ -13,7 +13,7 @@ , VoronoiDiagram'(..) , voronoiDiagram , voronoiVertices - , edgeGeometries + , asMap ) where import HGeometry.VoronoiDiagram.ViaLowerEnvelope diff --git a/haddocks/hgeometry/svg/src/HGeometry.Miso.Canvas.Zoom.html b/haddocks/hgeometry/svg/src/HGeometry.Miso.Canvas.Zoom.html index bfdea5d1d..068a1d7e0 100644 --- a/haddocks/hgeometry/svg/src/HGeometry.Miso.Canvas.Zoom.html +++ b/haddocks/hgeometry/svg/src/HGeometry.Miso.Canvas.Zoom.html @@ -13,7 +13,7 @@ -------------------------------------------------------------------------------- -- * Model -data ZoomDirection = ZoomIn | ZoomOut deriving (Int -> ZoomDirection -> ShowS +data ZoomDirection = ZoomIn | ZoomOut deriving (Int -> ZoomDirection -> ShowS [ZoomDirection] -> ShowS ZoomDirection -> String (Int -> ZoomDirection -> ShowS) @@ -28,7 +28,7 @@ show :: ZoomDirection -> String $cshowList :: [ZoomDirection] -> ShowS showList :: [ZoomDirection] -> ShowS -Show,ReadPrec [ZoomDirection] +Show,ReadPrec [ZoomDirection] ReadPrec ZoomDirection Int -> ReadS ZoomDirection ReadS [ZoomDirection] @@ -48,7 +48,7 @@ readPrec :: ReadPrec ZoomDirection $creadListPrec :: ReadPrec [ZoomDirection] readListPrec :: ReadPrec [ZoomDirection] -Read,ZoomDirection -> ZoomDirection -> Bool +Read,ZoomDirection -> ZoomDirection -> Bool (ZoomDirection -> ZoomDirection -> Bool) -> (ZoomDirection -> ZoomDirection -> Bool) -> Eq ZoomDirection forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -59,14 +59,14 @@ Eq) -- | Types that have a zoom-level -class HasZoomLevel canvas r | canvas -> r where +class HasZoomLevel canvas r | canvas -> r where -- | Lens to access the current zoom-level of the canvas - zoomLevel :: Lens' canvas r + zoomLevel :: Lens' canvas r -------------------------------------------------------------------------------- -- * Controller -newtype ZoomAction = ZoomAction ZoomDirection deriving (Int -> ZoomAction -> ShowS +newtype ZoomAction = ZoomAction ZoomDirection deriving (Int -> ZoomAction -> ShowS [ZoomAction] -> ShowS ZoomAction -> String (Int -> ZoomAction -> ShowS) @@ -81,7 +81,7 @@ show :: ZoomAction -> String $cshowList :: [ZoomAction] -> ShowS showList :: [ZoomAction] -> ShowS -Show,ZoomAction -> ZoomAction -> Bool +Show,ZoomAction -> ZoomAction -> Bool (ZoomAction -> ZoomAction -> Bool) -> (ZoomAction -> ZoomAction -> Bool) -> Eq ZoomAction forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a @@ -92,17 +92,17 @@ Eq) -- | Update the zoom-level -update :: ( Fractional r, Ord r - , HasZoomLevel canvas r +update :: ( Fractional r, Ord r + , HasZoomLevel canvas r ) - => canvas -> ZoomAction -> Effect action canvas + => canvas -> ZoomAction -> Effect action canvas update :: forall r canvas action. (Fractional r, Ord r, HasZoomLevel canvas r) => canvas -> ZoomAction -> Effect action canvas -update canvas -m ZoomAction -za = canvas -mcanvas -> (canvas -> Effect action canvas) -> Effect action canvas +update canvas +m ZoomAction +za = canvas +mcanvas -> (canvas -> Effect action canvas) -> Effect action canvas forall a b. a -> (a -> b) -> b &(r -> Effect action r) -> canvas -> Effect action canvas forall canvas r. HasZoomLevel canvas r => Lens' canvas r @@ -119,35 +119,35 @@ (Fractional r, Ord r) => r -> ZoomAction -> Effect action r updateZoom' ZoomAction -za +za -updateZoom' :: (Fractional r, Ord r) - => r -> ZoomAction -> Effect action r +updateZoom' :: (Fractional r, Ord r) + => r -> ZoomAction -> Effect action r updateZoom' :: forall r action. (Fractional r, Ord r) => r -> ZoomAction -> Effect action r -updateZoom' r -z = \case - ZoomAction ZoomDirection -dir -> r -> Effect action r +updateZoom' r +z = \case + ZoomAction ZoomDirection +dir -> r -> Effect action r forall model action. model -> Effect action model noEff (r -> Effect action r) -> r -> Effect action r forall a b. (a -> b) -> a -> b $ ZoomDirection -> r -> r forall r. (Fractional r, Ord r) => ZoomDirection -> r -> r applyZoom ZoomDirection -dir r -z +dir r +z -applyZoom :: forall r.(Fractional r, Ord r) => ZoomDirection -> r -> r +applyZoom :: forall r.(Fractional r, Ord r) => ZoomDirection -> r -> r applyZoom :: forall r. (Fractional r, Ord r) => ZoomDirection -> r -> r -applyZoom ZoomDirection -dir r -z = let delta :: r -delta = case ZoomDirection -dir of +applyZoom ZoomDirection +dir r +z = let delta :: r +delta = case ZoomDirection +dir of ZoomDirection ZoomIn -> r 0.1 @@ -162,15 +162,15 @@ (ClosedInterval_ interval r, Ord r) => interval -> r -> r clampTo ClosedInterval r -rng (r -z r -> r -> r +rng (r +z r -> r -> r forall a. Num a => a -> a -> a + r -delta) +delta) where - rng :: ClosedInterval r -rng = forall r. r -> r -> ClosedInterval r -ClosedInterval @r r + rng :: ClosedInterval r +rng = forall r. r -> r -> ClosedInterval r +ClosedInterval @r r 0.5 r 10 \ No newline at end of file diff --git a/haddocks/hgeometry/svg/src/HGeometry.Miso.OrphanInstances.html b/haddocks/hgeometry/svg/src/HGeometry.Miso.OrphanInstances.html index e2b989eb3..77196ae0a 100644 --- a/haddocks/hgeometry/svg/src/HGeometry.Miso.OrphanInstances.html +++ b/haddocks/hgeometry/svg/src/HGeometry.Miso.OrphanInstances.html @@ -28,9 +28,9 @@ -------------------------------------------------------------------------------- -instance HasResolution p => ToMisoString (Fixed p) where - toMisoString :: Fixed p -> MisoString -toMisoString = String -> MisoString +instance HasResolution p => ToMisoString (Fixed p) where + toMisoString :: Fixed p -> MisoString +toMisoString = String -> MisoString forall str. ToMisoString str => str -> MisoString toMisoString (String -> MisoString) -> (Fixed p -> String) -> Fixed p -> MisoString @@ -40,9 +40,9 @@ showFixed Bool True -instance HasResolution p => FromMisoString (Fixed p) where - fromMisoStringEither :: MisoString -> Either String (Fixed p) -fromMisoStringEither = (Double -> Fixed p) +instance HasResolution p => FromMisoString (Fixed p) where + fromMisoStringEither :: MisoString -> Either String (Fixed p) +fromMisoStringEither = (Double -> Fixed p) -> Either String Double -> Either String (Fixed p) forall a b. (a -> b) -> Either String a -> Either String b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -57,7 +57,7 @@ fromMisoStringEither @Double instance ToMisoString Rational where - toMisoString :: Rational -> MisoString + toMisoString :: Rational -> MisoString toMisoString = forall str. ToMisoString str => str -> MisoString toMisoString @Pico (Pico -> MisoString) -> (Rational -> Pico) -> Rational -> MisoString @@ -67,7 +67,7 @@ realToFrac instance FromMisoString Rational where - fromMisoStringEither :: MisoString -> Either String Rational + fromMisoStringEither :: MisoString -> Either String Rational fromMisoStringEither = (Pico -> Rational) -> Either String Pico -> Either String Rational forall a b. (a -> b) -> Either String a -> Either String b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -81,12 +81,12 @@ . forall t. FromMisoString t => MisoString -> Either String t fromMisoStringEither @Pico -instance ToMisoString r => ToMisoString (RGB r) where - toMisoString :: RGB r -> MisoString -toMisoString (RGB r -r r -g r -b) = [MisoString] -> MisoString +instance ToMisoString r => ToMisoString (RGB r) where + toMisoString :: RGB r -> MisoString +toMisoString (RGB r +r r +g r +b) = [MisoString] -> MisoString forall a. Monoid a => [a] -> a mconcat [ MisoString "rgb(" @@ -108,9 +108,9 @@ toMisoString ([r] -> MisoString) -> [r] -> MisoString forall a b. (a -> b) -> a -> b $ [r -r,r -g,r -b] +r,r +g,r +b] , MisoString ")" ] @@ -118,10 +118,10 @@ -------------------------------------------------------------------------------- -- * Dealing with attributes -instance ToMisoString (Apply f at) => ToMisoString (IA.Attr f at) where - toMisoString :: Attr f at -> MisoString -toMisoString Attr f at -att = MisoString +instance ToMisoString (Apply f at) => ToMisoString (IA.Attr f at) where + toMisoString :: Attr f at -> MisoString +toMisoString Attr f at +att = MisoString -> (Apply f at -> MisoString) -> Maybe (Apply f at) -> MisoString forall b a. b -> (a -> b) -> Maybe a -> b maybe MisoString @@ -134,10 +134,10 @@ forall u (f :: TyFun u (*) -> *) (label :: u). Attr f label -> Maybe (Apply f label) IA._getAttr Attr f at -att +att -instance FromMisoString (Apply f at) => FromMisoString (IA.Attr f at) where - fromMisoStringEither :: MisoString -> Either String (Attr f at) +instance FromMisoString (Apply f at) => FromMisoString (IA.Attr f at) where + fromMisoStringEither :: MisoString -> Either String (Attr f at) fromMisoStringEither = (Apply f at -> Attr f at) -> Either String (Apply f at) -> Either String (Attr f at) forall a b. (a -> b) -> Either String a -> Either String b @@ -154,86 +154,86 @@ forall t. FromMisoString t => MisoString -> Either String t fromMisoStringEither -instance ToMisoString r => ToMisoString (IpeValue r) where - toMisoString :: IpeValue r -> MisoString +instance ToMisoString r => ToMisoString (IpeValue r) where + toMisoString :: IpeValue r -> MisoString toMisoString = \case - Named MisoString -t -> MisoString -> MisoString + Named MisoString +t -> MisoString -> MisoString forall str. ToMisoString str => str -> MisoString toMisoString MisoString -t - Valued r -v -> r -> MisoString +t + Valued r +v -> r -> MisoString forall str. ToMisoString str => str -> MisoString toMisoString r -v +v -instance ToMisoString r => ToMisoString (IA.IpePen r) where - toMisoString :: IpePen r -> MisoString +instance ToMisoString r => ToMisoString (IA.IpePen r) where + toMisoString :: IpePen r -> MisoString toMisoString IpePen r _ = MisoString forall a. Monoid a => a mempty -instance ToMisoString r => ToMisoString (IA.IpeSize r) where - toMisoString :: IpeSize r -> MisoString +instance ToMisoString r => ToMisoString (IA.IpeSize r) where + toMisoString :: IpeSize r -> MisoString toMisoString IpeSize r _ = MisoString forall a. Monoid a => a mempty -instance ToMisoString r => ToMisoString (IA.IpeArrow r) where - toMisoString :: IpeArrow r -> MisoString +instance ToMisoString r => ToMisoString (IA.IpeArrow r) where + toMisoString :: IpeArrow r -> MisoString toMisoString IpeArrow r _ = MisoString forall a. Monoid a => a mempty -instance ToMisoString r => ToMisoString (IA.IpeDash r) where - toMisoString :: IpeDash r -> MisoString +instance ToMisoString r => ToMisoString (IA.IpeDash r) where + toMisoString :: IpeDash r -> MisoString toMisoString IpeDash r _ = MisoString forall a. Monoid a => a mempty -instance ToMisoString r => ToMisoString (Matrix 3 3 r) where - toMisoString :: Matrix 3 3 r -> MisoString +instance ToMisoString r => ToMisoString (Matrix 3 3 r) where + toMisoString :: Matrix 3 3 r -> MisoString toMisoString Matrix 3 3 r _ = MisoString forall a. Monoid a => a mempty instance ToMisoString IA.FillType where - toMisoString :: FillType -> MisoString + toMisoString :: FillType -> MisoString toMisoString FillType _ = MisoString forall a. Monoid a => a mempty instance ToMisoString IA.PinType where - toMisoString :: PinType -> MisoString + toMisoString :: PinType -> MisoString toMisoString PinType _ = MisoString forall a. Monoid a => a mempty instance ToMisoString IA.TransformationTypes where - toMisoString :: TransformationTypes -> MisoString + toMisoString :: TransformationTypes -> MisoString toMisoString TransformationTypes _ = MisoString forall a. Monoid a => a mempty -instance ToMisoString r => ToMisoString (IpeColor r) where - toMisoString :: IpeColor r -> MisoString -toMisoString (IpeColor IpeValue (RGB r) -c) = IpeValue (RGB r) -> MisoString +instance ToMisoString r => ToMisoString (IpeColor r) where + toMisoString :: IpeColor r -> MisoString +toMisoString (IpeColor IpeValue (RGB r) +c) = IpeValue (RGB r) -> MisoString forall str. ToMisoString str => str -> MisoString toMisoString IpeValue (RGB r) -c +c -instance ToMisoString r => ToMisoString (Ipe.Path r) where - toMisoString :: Path r -> MisoString +instance ToMisoString r => ToMisoString (Ipe.Path r) where + toMisoString :: Path r -> MisoString toMisoString Path r _ = MisoString forall a. Monoid a => a @@ -241,15 +241,15 @@ -- FIXME: This does not actually show the path instance ToMisoString Ipe.LayerName where - toMisoString :: LayerName -> MisoString -toMisoString (Ipe.LayerName MisoString -t) = MisoString -> MisoString + toMisoString :: LayerName -> MisoString +toMisoString (Ipe.LayerName MisoString +t) = MisoString -> MisoString forall str. ToMisoString str => str -> MisoString toMisoString MisoString -t +t instance FromMisoString Ipe.LayerName where - fromMisoStringEither :: MisoString -> Either String LayerName + fromMisoStringEither :: MisoString -> Either String LayerName fromMisoStringEither = (MisoString -> LayerName) -> Either String MisoString -> Either String LayerName forall a b. (a -> b) -> Either String a -> Either String b diff --git a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Canvas.html b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Canvas.html index c58f25a10..b2e58e3e1 100644 --- a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Canvas.html +++ b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Canvas.html @@ -31,9 +31,9 @@ -- *A Canvas -- | Svg Canvas that has a "proper" Coordinate system whose origin is in the bottom left. -data Canvas r = +data Canvas r = Canvas { forall r. Canvas r -> Viewport r -_theViewport :: !(Viewport r) +_theViewport :: !(Viewport r) -- ^ the viewport , forall r. Canvas r -> Vector 2 Int _dimensions :: !(Vector 2 Int) @@ -42,7 +42,7 @@ _mousePosition :: Maybe (Point 2 Int) -- ^ the mouse position, in raw pixel coordinates } - deriving stock (Canvas r -> Canvas r -> Bool + deriving stock (Canvas r -> Canvas r -> Bool (Canvas r -> Canvas r -> Bool) -> (Canvas r -> Canvas r -> Bool) -> Eq (Canvas r) forall r. Eq r => Canvas r -> Canvas r -> Bool @@ -51,7 +51,7 @@ == :: Canvas r -> Canvas r -> Bool $c/= :: forall r. Eq r => Canvas r -> Canvas r -> Bool /= :: Canvas r -> Canvas r -> Bool -Eq,Int -> Canvas r -> ShowS +Eq,Int -> Canvas r -> ShowS [Canvas r] -> ShowS Canvas r -> String (Int -> Canvas r -> ShowS) @@ -70,7 +70,7 @@ Show) -- | Lens to access the viewport -theViewport :: Lens (Canvas r) (Canvas s) (Viewport r) (Viewport s) +theViewport :: Lens (Canvas r) (Canvas s) (Viewport r) (Viewport s) theViewport :: forall r s (f :: * -> *). Functor f => (Viewport r -> f (Viewport s)) -> Canvas r -> f (Canvas s) @@ -80,47 +80,47 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Canvas r -> Viewport r forall r. Canvas r -> Viewport r -_theViewport (\Canvas r -c Viewport s -vp -> Canvas r -c { _theViewport = vp }) +_theViewport (\Canvas r +c Viewport s +vp -> Canvas r +c { _theViewport = vp }) -instance HasDimensions (Canvas r) (Vector 2 Int) where - dimensions :: Lens' (Canvas r) (Vector 2 Int) -dimensions = (Canvas r -> Vector 2 Int) +instance HasDimensions (Canvas r) (Vector 2 Int) where + dimensions :: Lens' (Canvas r) (Vector 2 Int) +dimensions = (Canvas r -> Vector 2 Int) -> (Canvas r -> Vector 2 Int -> Canvas r) -> Lens' (Canvas r) (Vector 2 Int) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Canvas r -> Vector 2 Int forall r. Canvas r -> Vector 2 Int -_dimensions (\Canvas r -c Vector 2 Int -d -> Canvas r -c { _dimensions = d }) +_dimensions (\Canvas r +c Vector 2 Int +d -> Canvas r +c { _dimensions = d }) {-# INLINE dimensions #-} -- | Class for types that have a mouse position -class HasMousePosition s a | s -> a where +class HasMousePosition s a | s -> a where -- | Lens to access the raw mouse position - mousePosition :: Lens' s a + mousePosition :: Lens' s a -instance HasMousePosition (Canvas r) (Maybe (Point 2 Int)) where - mousePosition :: Lens' (Canvas r) (Maybe (Point 2 Int)) +instance HasMousePosition (Canvas r) (Maybe (Point 2 Int)) where + mousePosition :: Lens' (Canvas r) (Maybe (Point 2 Int)) mousePosition = (Canvas r -> Maybe (Point 2 Int)) -> (Canvas r -> Maybe (Point 2 Int) -> Canvas r) -> Lens' (Canvas r) (Maybe (Point 2 Int)) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens Canvas r -> Maybe (Point 2 Int) forall r. Canvas r -> Maybe (Point 2 Int) -_mousePosition (\Canvas r -c Maybe (Point 2 Int) -m -> Canvas r -c { _mousePosition = m }) +_mousePosition (\Canvas r +c Maybe (Point 2 Int) +m -> Canvas r +c { _mousePosition = m }) {-# INLINE mousePosition #-} -- | Getter to access the mouse coordinates (in terms of the coordinate system as used by -- the canvas). Returns a Nothing if the mouse is not currently on/over the canvas. -mouseCoordinates :: Fractional r => Getter (Canvas r) (Maybe (Point 2 r)) +mouseCoordinates :: Fractional r => Getter (Canvas r) (Maybe (Point 2 r)) mouseCoordinates :: forall r. Fractional r => Getter (Canvas r) (Maybe (Point 2 r)) mouseCoordinates = (Canvas r -> Maybe (Point 2 r)) -> (Maybe (Point 2 r) -> f (Maybe (Point 2 r))) @@ -138,15 +138,15 @@ -> Canvas r -> f (Canvas r) forall a b. (a -> b) -> a -> b -$ \Canvas r -m -> Viewport (NumType (Point 2 r)) -> Point 2 Int -> Point 2 r +$ \Canvas r +m -> Viewport (NumType (Point 2 r)) -> Point 2 Int -> Point 2 r forall {a} {g}. (Dimension a ~ 2, Dimension g ~ 2, IsTransformable g, Fractional (NumType g), HasCoordinates a g, Integral (NumType a)) => Viewport (NumType g) -> a -> g -toWorldIn' (Canvas r -mCanvas r +toWorldIn' (Canvas r +mCanvas r -> Getting (Viewport r) (Canvas r) (Viewport r) -> Viewport r forall s a. s -> Getting a s a -> a ^.Getting (Viewport r) (Canvas r) (Viewport r) @@ -157,7 +157,7 @@ -> Maybe (Point 2 Int) -> Maybe (Point 2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Canvas r -mCanvas r +mCanvas r -> Getting (Maybe (Point 2 Int)) (Canvas r) (Maybe (Point 2 Int)) -> Maybe (Point 2 Int) forall s a. s -> Getting a s a -> a @@ -166,17 +166,17 @@ Lens' (Canvas r) (Maybe (Point 2 Int)) mousePosition where - toWorldIn' :: Viewport (NumType g) -> a -> g -toWorldIn' Viewport (NumType g) -vp a -p = Viewport (NumType g) -> g -> g + toWorldIn' :: Viewport (NumType g) -> a -> g +toWorldIn' Viewport (NumType g) +vp a +p = Viewport (NumType g) -> g -> g forall g r. (IsTransformable g, NumType g ~ r, Dimension g ~ 2, Fractional r) => Viewport r -> g -> g toWorldIn Viewport (NumType g) -vp (a -pa -> (a -> g) -> g +vp (a +pa -> (a -> g) -> g forall a b. a -> (a -> b) -> b &(NumType a -> Identity (NumType g)) -> a -> Identity g forall point point'. @@ -199,17 +199,17 @@ -------------------------------------------------------------------------------- -- | Crate a blank canvas, that has the origin in the bottom-left. -blankCanvas :: (Num r) - => Int -> Int -> Canvas r +blankCanvas :: (Num r) + => Int -> Int -> Canvas r blankCanvas :: forall r. Num r => Int -> Int -> Canvas r -blankCanvas Int -w Int -h = let v :: Vector 2 Int -v = Int -> Int -> Vector 2 Int +blankCanvas Int +w Int +h = let v :: Vector 2 Int +v = Int -> Int -> Vector 2 Int forall r. r -> r -> Vector 2 r Vector2 Int -w Int -h +w Int +h in Viewport r -> Vector 2 Int -> Maybe (Point 2 Int) -> Canvas r forall r. Viewport r -> Vector 2 Int -> Maybe (Point 2 Int) -> Canvas r @@ -222,8 +222,8 @@ fromIntegral (Int -> r) -> Vector 2 Int -> Vector 2 r forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Vector 2 Int -v)) Vector 2 Int -v Maybe (Point 2 Int) +v)) Vector 2 Int +v Maybe (Point 2 Int) forall a. Maybe a Nothing @@ -237,7 +237,7 @@ | TouchStart !(Point 2 Int) | TouchMove !(Point 2 Int) | TouchEnd - deriving (Int -> InternalCanvasAction -> ShowS + deriving (Int -> InternalCanvasAction -> ShowS [InternalCanvasAction] -> ShowS InternalCanvasAction -> String (Int -> InternalCanvasAction -> ShowS) @@ -252,7 +252,7 @@ show :: InternalCanvasAction -> String $cshowList :: [InternalCanvasAction] -> ShowS showList :: [InternalCanvasAction] -> ShowS -Show,InternalCanvasAction -> InternalCanvasAction -> Bool +Show,InternalCanvasAction -> InternalCanvasAction -> Bool (InternalCanvasAction -> InternalCanvasAction -> Bool) -> (InternalCanvasAction -> InternalCanvasAction -> Bool) -> Eq InternalCanvasAction @@ -264,11 +264,11 @@ Eq) -- | Handles InternalCanvas Actions -handleInternalCanvasAction :: Canvas r -> InternalCanvasAction -> Effect action (Canvas r) +handleInternalCanvasAction :: Canvas r -> InternalCanvasAction -> Effect action (Canvas r) handleInternalCanvasAction :: forall r action. Canvas r -> InternalCanvasAction -> Effect action (Canvas r) -handleInternalCanvasAction Canvas r -canvas = Canvas r -> Effect action (Canvas r) +handleInternalCanvasAction Canvas r +canvas = Canvas r -> Effect action (Canvas r) forall model action. model -> Effect action model noEff (Canvas r -> Effect action (Canvas r)) -> (InternalCanvasAction -> Canvas r) @@ -276,9 +276,9 @@ -> Effect action (Canvas r) forall b c a. (b -> c) -> (a -> b) -> a -> c . \case - MouseEnter Point 2 Int -p -> Canvas r -canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r + MouseEnter Point 2 Int +p -> Canvas r +canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r forall a b. a -> (a -> b) -> b &(Maybe (Point 2 Int) -> Identity (Maybe (Point 2 Int))) -> Canvas r -> Identity (Canvas r) @@ -289,10 +289,10 @@ -> Point 2 Int -> Canvas r -> Canvas r forall s t a b. ASetter s t a (Maybe b) -> b -> s -> t ?~ Point 2 Int -p - MouseMove Point 2 Int -p -> Canvas r -canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r +p + MouseMove Point 2 Int +p -> Canvas r +canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r forall a b. a -> (a -> b) -> b &(Maybe (Point 2 Int) -> Identity (Maybe (Point 2 Int))) -> Canvas r -> Identity (Canvas r) @@ -303,10 +303,10 @@ -> Point 2 Int -> Canvas r -> Canvas r forall s t a b. ASetter s t a (Maybe b) -> b -> s -> t ?~ Point 2 Int -p +p InternalCanvasAction MouseLeave -> Canvas r -canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r +canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r forall a b. a -> (a -> b) -> b &(Maybe (Point 2 Int) -> Identity (Maybe (Point 2 Int))) -> Canvas r -> Identity (Canvas r) @@ -319,9 +319,9 @@ .~ Maybe (Point 2 Int) forall a. Maybe a Nothing - TouchStart Point 2 Int -p -> Canvas r -canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r + TouchStart Point 2 Int +p -> Canvas r +canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r forall a b. a -> (a -> b) -> b &(Maybe (Point 2 Int) -> Identity (Maybe (Point 2 Int))) -> Canvas r -> Identity (Canvas r) @@ -332,10 +332,10 @@ -> Point 2 Int -> Canvas r -> Canvas r forall s t a b. ASetter s t a (Maybe b) -> b -> s -> t ?~ Point 2 Int -p - TouchMove Point 2 Int -p -> Canvas r -canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r +p + TouchMove Point 2 Int +p -> Canvas r +canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r forall a b. a -> (a -> b) -> b &(Maybe (Point 2 Int) -> Identity (Maybe (Point 2 Int))) -> Canvas r -> Identity (Canvas r) @@ -346,10 +346,10 @@ -> Point 2 Int -> Canvas r -> Canvas r forall s t a b. ASetter s t a (Maybe b) -> b -> s -> t ?~ Point 2 Int -p +p InternalCanvasAction TouchEnd -> Canvas r -canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r +canvasCanvas r -> (Canvas r -> Canvas r) -> Canvas r forall a b. a -> (a -> b) -> b &(Maybe (Point 2 Int) -> Identity (Maybe (Point 2 Int))) -> Canvas r -> Identity (Canvas r) @@ -367,20 +367,20 @@ -- * The View -- | Draws the actual canvas using an svg tag -svgCanvas_ :: (RealFrac r, ToSvgCoordinate r) - => Canvas r - -> [Attribute action] -> [View action] - -> View (Either InternalCanvasAction action) +svgCanvas_ :: (RealFrac r, ToSvgCoordinate r) + => Canvas r + -> [Attribute action] -> [View action] + -> View (Either InternalCanvasAction action) svgCanvas_ :: forall r action. (RealFrac r, ToSvgCoordinate r) => Canvas r -> [Attribute action] -> [View action] -> View (Either InternalCanvasAction action) -svgCanvas_ Canvas r -canvas [Attribute action] -ats [View action] -vs = +svgCanvas_ Canvas r +canvas [Attribute action] +ats [View action] +vs = [Attribute (Either InternalCanvasAction action)] -> [View (Either InternalCanvasAction action)] -> View (Either InternalCanvasAction action) @@ -398,7 +398,7 @@ -> Int -> Attribute (Either InternalCanvasAction action) forall a b. (a -> b) -> a -> b $ Int -w +w , MisoString -> Attribute (Either InternalCanvasAction action) forall action. MisoString -> Attribute action height_ (MisoString -> Attribute (Either InternalCanvasAction action)) @@ -412,7 +412,7 @@ -> Int -> Attribute (Either InternalCanvasAction action) forall a b. (a -> b) -> a -> b $ Int -h +h , MisoString -> Attribute (Either InternalCanvasAction action) forall action. MisoString -> Attribute action pointerEvents_ MisoString @@ -434,7 +434,7 @@ -> [Attribute (Either InternalCanvasAction action)] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> [Attribute action] -ats)) +ats)) [ [Attribute (Either InternalCanvasAction action)] -> [View (Either InternalCanvasAction action)] -> View (Either InternalCanvasAction action) @@ -557,7 +557,7 @@ g_ [MisoString -> Attribute (Either InternalCanvasAction action) forall action. MisoString -> Attribute action transform_ MisoString -ts] ((action -> Either InternalCanvasAction action) +ts] ((action -> Either InternalCanvasAction action) -> View action -> View (Either InternalCanvasAction action) forall a b. (a -> b) -> View a -> View b forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b @@ -567,7 +567,7 @@ -> [View action] -> [View (Either InternalCanvasAction action)] forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> [View action] -vs) +vs) ] ] -- note; we use the two nested svgs so that we can handle additional mouseMove, Enter, @@ -575,23 +575,23 @@ -- so that we can also capture the mousemove etc events in the inner svg. The rect -- is so that the inner svg is actually forced to be the full size. where - (Vector2 Int -w Int -h) = Canvas r -canvasCanvas r + (Vector2 Int +w Int +h) = Canvas r +canvasCanvas r -> Getting (Vector 2 Int) (Canvas r) (Vector 2 Int) -> Vector 2 Int forall s a. s -> Getting a s a -> a ^.Getting (Vector 2 Int) (Canvas r) (Vector 2 Int) forall s a. HasDimensions s a => Lens' s a Lens' (Canvas r) (Vector 2 Int) dimensions - ts :: MisoString -ts = Matrix 3 3 r -> MisoString + ts :: MisoString +ts = Matrix 3 3 r -> MisoString forall r. ToSvgCoordinate r => Matrix 3 3 r -> MisoString matrixToMisoString (Matrix 3 3 r -> MisoString) -> Matrix 3 3 r -> MisoString forall a b. (a -> b) -> a -> b $ Canvas r -canvasCanvas r +canvasCanvas r -> Getting (Matrix 3 3 r) (Canvas r) (Matrix 3 3 r) -> Matrix 3 3 r forall s a. s -> Getting a s a -> a ^.(Viewport r -> Const (Matrix 3 3 r) (Viewport r)) diff --git a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.StaticCanvas.html b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.StaticCanvas.html index 51b5d1605..9321afa4e 100644 --- a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.StaticCanvas.html +++ b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.StaticCanvas.html @@ -37,15 +37,15 @@ -- *A Canvas -- | Static Canvas that has a "proper" Coordinate system whose origin is in the bottom left. -data StaticCanvas r = +data StaticCanvas r = Canvas { forall r. StaticCanvas r -> Viewport r -_theViewport :: !(Viewport r) +_theViewport :: !(Viewport r) -- ^ the viewport , forall r. StaticCanvas r -> Vector 2 Int _dimensions :: !(Vector 2 Int) -- ^ dimensions (width,height) in pixels, of the canvas } - deriving stock (StaticCanvas r -> StaticCanvas r -> Bool + deriving stock (StaticCanvas r -> StaticCanvas r -> Bool (StaticCanvas r -> StaticCanvas r -> Bool) -> (StaticCanvas r -> StaticCanvas r -> Bool) -> Eq (StaticCanvas r) @@ -58,7 +58,7 @@ Eq) -- | Lens to access the viewport of a Canvas -theViewport :: Lens (StaticCanvas r) (StaticCanvas s) (Viewport r) (Viewport s) +theViewport :: Lens (StaticCanvas r) (StaticCanvas s) (Viewport r) (Viewport s) theViewport :: forall r s (f :: * -> *). Functor f => (Viewport r -> f (Viewport s)) @@ -69,28 +69,28 @@ forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens StaticCanvas r -> Viewport r forall r. StaticCanvas r -> Viewport r -_theViewport (\StaticCanvas r -c Viewport s -vp -> StaticCanvas r -c { _theViewport = vp }) +_theViewport (\StaticCanvas r +c Viewport s +vp -> StaticCanvas r +c { _theViewport = vp }) -- | Class for types that have a 'dimensions' field -class HasDimensions s a | s -> a where +class HasDimensions s a | s -> a where -- | Lens to access the Dimensions field - dimensions :: Lens' s a + dimensions :: Lens' s a -instance HasDimensions (StaticCanvas r) (Vector 2 Int) where - dimensions :: Lens' (StaticCanvas r) (Vector 2 Int) +instance HasDimensions (StaticCanvas r) (Vector 2 Int) where + dimensions :: Lens' (StaticCanvas r) (Vector 2 Int) dimensions = (StaticCanvas r -> Vector 2 Int) -> (StaticCanvas r -> Vector 2 Int -> StaticCanvas r) -> Lens' (StaticCanvas r) (Vector 2 Int) forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens StaticCanvas r -> Vector 2 Int forall r. StaticCanvas r -> Vector 2 Int -_dimensions (\StaticCanvas r -c Vector 2 Int -d -> StaticCanvas r -c { _dimensions = d}) +_dimensions (\StaticCanvas r +c Vector 2 Int +d -> StaticCanvas r +c { _dimensions = d}) {-# INLINE dimensions #-} @@ -112,17 +112,17 @@ -------------------------------------------------------------------------------- -- | Create a canvas -staticCanvas :: Num r - => Int -> Int -> StaticCanvas r +staticCanvas :: Num r + => Int -> Int -> StaticCanvas r staticCanvas :: forall r. Num r => Int -> Int -> StaticCanvas r -staticCanvas Int -w Int -h = let v :: Vector 2 Int -v = Int -> Int -> Vector 2 Int +staticCanvas Int +w Int +h = let v :: Vector 2 Int +v = Int -> Int -> Vector 2 Int forall r. r -> r -> Vector 2 r Vector2 Int -w Int -h +w Int +h in Viewport r -> Vector 2 Int -> StaticCanvas r forall r. Viewport r -> Vector 2 Int -> StaticCanvas r Canvas (Vector 2 r -> Viewport r @@ -134,8 +134,8 @@ fromIntegral (Int -> r) -> Vector 2 Int -> Vector 2 r forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Vector 2 Int -v)) Vector 2 Int -v +v)) Vector 2 Int +v -------------------------------------------------------------------------------- -- * The Controller @@ -149,17 +149,17 @@ -- | Draws the actual canvas -staticCanvas_ :: (RealFrac r, ToSvgCoordinate r) - => StaticCanvas r - -> [Attribute action] -> [View action] -> View action +staticCanvas_ :: (RealFrac r, ToSvgCoordinate r) + => StaticCanvas r + -> [Attribute action] -> [View action] -> View action staticCanvas_ :: forall r action. (RealFrac r, ToSvgCoordinate r) => StaticCanvas r -> [Attribute action] -> [View action] -> View action -staticCanvas_ StaticCanvas r -canvas [Attribute action] -ats [View action] -vs = +staticCanvas_ StaticCanvas r +canvas [Attribute action] +ats [View action] +vs = [Attribute action] -> [View action] -> View action forall action. [Attribute action] -> [View action] -> View action svg_ ([ MisoString -> Attribute action @@ -172,7 +172,7 @@ ms (Int -> Attribute action) -> Int -> Attribute action forall a b. (a -> b) -> a -> b $ Int -w +w , MisoString -> Attribute action forall action. MisoString -> Attribute action height_ (MisoString -> Attribute action) @@ -183,25 +183,25 @@ ms (Int -> Attribute action) -> Int -> Attribute action forall a b. (a -> b) -> a -> b $ Int -h +h -- , viewBox_ $ outerVB ] [Attribute action] -> [Attribute action] -> [Attribute action] forall a. Semigroup a => a -> a -> a <> [Attribute action] -ats) +ats) [ [Attribute action] -> [View action] -> View action forall action. [Attribute action] -> [View action] -> View action g_ [ MisoString -> Attribute action forall action. MisoString -> Attribute action transform_ MisoString -ts ] [View action] -vs +ts ] [View action] +vs ] where - (Vector2 Int -w Int -h) = StaticCanvas r -canvasStaticCanvas r + (Vector2 Int +w Int +h) = StaticCanvas r +canvasStaticCanvas r -> Getting (Vector 2 Int) (StaticCanvas r) (Vector 2 Int) -> Vector 2 Int forall s a. s -> Getting a s a -> a @@ -209,13 +209,13 @@ forall s a. HasDimensions s a => Lens' s a Lens' (StaticCanvas r) (Vector 2 Int) dimensions - ts :: MisoString -ts = Matrix 3 3 r -> MisoString + ts :: MisoString +ts = Matrix 3 3 r -> MisoString forall r. ToSvgCoordinate r => Matrix 3 3 r -> MisoString matrixToMisoString (Matrix 3 3 r -> MisoString) -> Matrix 3 3 r -> MisoString forall a b. (a -> b) -> a -> b $ StaticCanvas r -canvasStaticCanvas r +canvasStaticCanvas r -> Getting (Matrix 3 3 r) (StaticCanvas r) (Matrix 3 3 r) -> Matrix 3 3 r forall s a. s -> Getting a s a -> a @@ -257,35 +257,35 @@ transformationMatrix -- | Renders a matrix as a MisoString -matrixToMisoString :: ToSvgCoordinate r => Matrix 3 3 r -> MisoString +matrixToMisoString :: ToSvgCoordinate r => Matrix 3 3 r -> MisoString matrixToMisoString :: forall r. ToSvgCoordinate r => Matrix 3 3 r -> MisoString -matrixToMisoString Matrix 3 3 r -m = MisoString +matrixToMisoString Matrix 3 3 r +m = MisoString "matrix(" MisoString -> MisoString -> MisoString forall a. Semigroup a => a -> a -> a <> [MisoString] -> MisoString MisoString.unwords [MisoString -a,MisoString -b,MisoString -c,MisoString -e,MisoString -d,MisoString -f] MisoString -> MisoString -> MisoString +a,MisoString +b,MisoString +c,MisoString +e,MisoString +d,MisoString +f] MisoString -> MisoString -> MisoString forall a. Semigroup a => a -> a -> a <> MisoString ")" where - (Vector3 (Vector3 MisoString -a MisoString -b MisoString -c) - (Vector3 MisoString -d MisoString -e MisoString -f) + (Vector3 (Vector3 MisoString +a MisoString +b MisoString +c) + (Vector3 MisoString +d MisoString +e MisoString +f) Vector 3 MisoString _ ) = (Matrix 3 3 r -mMatrix 3 3 r +mMatrix 3 3 r -> (Matrix 3 3 r -> Matrix 3 3 MisoString) -> Matrix 3 3 MisoString forall a b. a -> (a -> b) -> b &(r -> Identity MisoString) diff --git a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Writer.html b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Writer.html index ff5f2c3ec..99fda7a31 100644 --- a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Writer.html +++ b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.Writer.html @@ -54,15 +54,15 @@ -- | Helper function to construct drawing functions. I..e it allows -- you do pre-specify a bunch of attributes that should be drawn -- (ats1) yet allow more attributes to be added by the user later. -withAts :: ([Attribute action] -> [View action] -> View action) - -> [Attribute action] -> [Attribute action] -> View action +withAts :: ([Attribute action] -> [View action] -> View action) + -> [Attribute action] -> [Attribute action] -> View action withAts :: forall action. ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action -withAts [Attribute action] -> [View action] -> View action -f [Attribute action] -ats1 [Attribute action] -ats2 = ([Attribute action] -> [View action] -> View action) +withAts [Attribute action] -> [View action] -> View action +f [Attribute action] +ats1 [Attribute action] +ats2 = ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> [View action] @@ -74,68 +74,68 @@ -> [View action] -> View action withAts' [Attribute action] -> [View action] -> View action -f [Attribute action] -ats1 [Attribute action] -ats2 [] +f [Attribute action] +ats1 [Attribute action] +ats2 [] -- | Helper function to construct a View. See 'withAts' for its usage. -withAts' :: ([Attribute action] -> [View action] -> View action) - -> [Attribute action] - -> [Attribute action] - -> [View action] - -> View action +withAts' :: ([Attribute action] -> [View action] -> View action) + -> [Attribute action] + -> [Attribute action] + -> [View action] + -> View action withAts' :: forall action. ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> [View action] -> View action -withAts' [Attribute action] -> [View action] -> View action -f [Attribute action] -ats1 [Attribute action] -ats2 = [Attribute action] -> [View action] -> View action -f ([Attribute action] -ats1 [Attribute action] -> [Attribute action] -> [Attribute action] +withAts' [Attribute action] -> [View action] -> View action +f [Attribute action] +ats1 [Attribute action] +ats2 = [Attribute action] -> [View action] -> View action +f ([Attribute action] +ats1 [Attribute action] -> [Attribute action] -> [Attribute action] forall a. Semigroup a => a -> a -> a <> [Attribute action] -ats2) +ats2) -------------------------------------------------------------------------------- -- * Default implementations for drawing geometric objects -- | Default implementation for drawing geometric objects -class Drawable t where +class Drawable t where {-# MINIMAL draw | drawWith #-} -- | Draws the given object with the given attributes - draw :: t -> [Attribute action] -> View action - draw t -x [Attribute action] -ats = t -> [Attribute action] -> [View action] -> View action + draw :: t -> [Attribute action] -> View action + draw t +x [Attribute action] +ats = t -> [Attribute action] -> [View action] -> View action forall action. t -> [Attribute action] -> [View action] -> View action forall t action. Drawable t => t -> [Attribute action] -> [View action] -> View action drawWith t -x [Attribute action] -ats [] +x [Attribute action] +ats [] -- | draw the given object, as well as the given "children" - drawWith :: t -> [Attribute action] -> [View action] -> View action - drawWith t -x [Attribute action] -ats [View action] -_b = t -> [Attribute action] -> View action + drawWith :: t -> [Attribute action] -> [View action] -> View action + drawWith t +x [Attribute action] +ats [View action] +_b = t -> [Attribute action] -> View action forall action. t -> [Attribute action] -> View action forall t action. Drawable t => t -> [Attribute action] -> View action draw t -x [Attribute action] -ats +x [Attribute action] +ats -instance (Drawable l, Drawable r) => Drawable (Either l r) where - draw :: forall action. Either l r -> [Attribute action] -> View action +instance (Drawable l, Drawable r) => Drawable (Either l r) where + draw :: forall action. Either l r -> [Attribute action] -> View action draw = (l -> [Attribute action] -> View action) -> (r -> [Attribute action] -> View action) -> Either l r @@ -154,16 +154,16 @@ t -> [Attribute action] -> View action draw -instance ToMisoString r => Drawable (Point 2 r) where - draw :: forall action. Point 2 r -> [Attribute action] -> View action +instance ToMisoString r => Drawable (Point 2 r) where + draw :: forall action. Point 2 r -> [Attribute action] -> View action draw = Point 2 r -> [Attribute action] -> View action forall point r action. (Point_ point 2 r, ToMisoString r) => point -> [Attribute action] -> View action dPoint -instance (Point_ point 2 r, ToMisoString r, Num r) => Drawable (Rectangle point) where - draw :: forall action. Rectangle point -> [Attribute action] -> View action +instance (Point_ point 2 r, ToMisoString r, Num r) => Drawable (Rectangle point) where + draw :: forall action. Rectangle point -> [Attribute action] -> View action draw = Rectangle point -> [Attribute action] -> View action forall rectangle point r action. (Rectangle_ rectangle point, Point_ point 2 r, ToMisoString r, @@ -171,9 +171,9 @@ rectangle -> [Attribute action] -> View action dRectangle -instance ( Point_ point 2 r, EndPoint_ (endPoint point), IxValue (endPoint point) ~ point - , ToMisoString r) => Drawable (LineSegment endPoint point) where - draw :: forall action. +instance ( Point_ point 2 r, EndPoint_ (endPoint point), IxValue (endPoint point) ~ point + , ToMisoString r) => Drawable (LineSegment endPoint point) where + draw :: forall action. LineSegment endPoint point -> [Attribute action] -> View action draw = LineSegment endPoint point -> [Attribute action] -> View action forall lineSegment point r action. @@ -182,13 +182,13 @@ lineSegment -> [Attribute action] -> View action dLineSegment -instance ( Point_ point 2 r, ToMisoString r - , Traversable1 f - , Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int - , HasFromFoldable1 f - , TraversableWithIndex Int f - ) => Drawable (PolyLineF f point) where - draw :: forall action. +instance ( Point_ point 2 r, ToMisoString r + , Traversable1 f + , Ixed (f point), IxValue (f point) ~ point, Index (f point) ~ Int + , HasFromFoldable1 f + , TraversableWithIndex Int f + ) => Drawable (PolyLineF f point) where + draw :: forall action. PolyLineF f point -> [Attribute action] -> View action draw = PolyLineF f point -> [Attribute action] -> View action forall polyLine point r action. @@ -196,9 +196,9 @@ polyLine -> [Attribute action] -> View action dPolyLine -instance ( Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f - , ToMisoString r) => Drawable (SimplePolygonF f point) where - draw :: forall action. +instance ( Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f + , ToMisoString r) => Drawable (SimplePolygonF f point) where + draw :: forall action. SimplePolygonF f point -> [Attribute action] -> View action draw = SimplePolygonF f point -> [Attribute action] -> View action forall simplePolygon point r action. @@ -206,9 +206,9 @@ simplePolygon -> [Attribute action] -> View action dSimplePolygon -instance ( Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f - , ToMisoString r) => Drawable (ConvexPolygonF f point) where - draw :: forall action. +instance ( Point_ point 2 r, VertexContainer f point, HasFromFoldable1 f + , ToMisoString r) => Drawable (ConvexPolygonF f point) where + draw :: forall action. ConvexPolygonF f point -> [Attribute action] -> View action draw = SimplePolygonF f point -> [Attribute action] -> View action forall simplePolygon point r action. @@ -225,16 +225,16 @@ ConvexPolygonF f point -> SimplePolygonF f point toSimplePolygon -instance (Point_ point 2 r, ToMisoString r, Floating r) => Drawable (Circle point) where - draw :: forall action. Circle point -> [Attribute action] -> View action +instance (Point_ point 2 r, ToMisoString r, Floating r) => Drawable (Circle point) where + draw :: forall action. Circle point -> [Attribute action] -> View action draw = Circle point -> [Attribute action] -> View action forall point r action. (Point_ point 2 r, ToMisoString r) => Circle point -> [Attribute action] -> View action dCircle -instance (Point_ point 2 r, ToMisoString r, Floating r) => Drawable (Disk point) where - draw :: forall action. Disk point -> [Attribute action] -> View action +instance (Point_ point 2 r, ToMisoString r, Floating r) => Drawable (Disk point) where + draw :: forall action. Disk point -> [Attribute action] -> View action draw = Disk point -> [Attribute action] -> View action forall disk point r action. (Disk_ disk point, Point_ point 2 r, ToMisoString r, Floating r) => @@ -269,12 +269,12 @@ -- * Functions to draw geometric objects -- | Draw a point -dPoint :: (Point_ point 2 r, ToMisoString r) => point -> [Attribute action] -> View action +dPoint :: (Point_ point 2 r, ToMisoString r) => point -> [Attribute action] -> View action dPoint :: forall point r action. (Point_ point 2 r, ToMisoString r) => point -> [Attribute action] -> View action -dPoint point -p = ([Attribute action] -> [View action] -> View action) +dPoint point +p = ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action forall action. ([Attribute action] -> [View action] -> View action) @@ -288,7 +288,7 @@ ms (r -> MisoString) -> r -> MisoString forall a b. (a -> b) -> a -> b $ point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -302,7 +302,7 @@ ms (r -> MisoString) -> r -> MisoString forall a b. (a -> b) -> a -> b $ point -ppoint -> Getting r point r -> r +ppoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -320,16 +320,16 @@ ] -- | Draw a rectangle -dRectangle :: ( Rectangle_ rectangle point, Point_ point 2 r, ToMisoString r, Num r) - => rectangle -> [Attribute action] -> View action +dRectangle :: ( Rectangle_ rectangle point, Point_ point 2 r, ToMisoString r, Num r) + => rectangle -> [Attribute action] -> View action dRectangle :: forall rectangle point r action. (Rectangle_ rectangle point, Point_ point 2 r, ToMisoString r, Num r) => rectangle -> [Attribute action] -> View action -dRectangle rectangle -b = let Point2 MisoString -x MisoString -y = ASetter (Point 2 r) (Point 2 MisoString) r MisoString +dRectangle rectangle +b = let Point2 MisoString +x MisoString +y = ASetter (Point 2 r) (Point 2 MisoString) r MisoString -> (r -> MisoString) -> Point 2 r -> Point 2 MisoString forall s t a b. ASetter s t a b -> (a -> b) -> s -> t over ASetter (Point 2 r) (Point 2 MisoString) r MisoString @@ -350,7 +350,7 @@ -> Point 2 r -> Point 2 MisoString forall a b. (a -> b) -> a -> b $ rectangle -brectangle -> Getting (Point 2 r) rectangle (Point 2 r) -> Point 2 r +brectangle -> Getting (Point 2 r) rectangle (Point 2 r) -> Point 2 r forall s a. s -> Getting a s a -> a ^.(point -> Const (Point 2 r) point) -> rectangle -> Const (Point 2 r) rectangle @@ -369,14 +369,14 @@ Lens' point (Point d r) Lens' point (Point 2 r) asPoint - Vector2 MisoString -w MisoString -h = r -> MisoString + Vector2 MisoString +w MisoString +h = r -> MisoString forall str. ToMisoString str => str -> MisoString ms (r -> MisoString) -> Vector 2 r -> Vector 2 MisoString forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> rectangle -brectangle +brectangle -> Getting (Vector 2 r) rectangle (Vector 2 r) -> Vector 2 r forall s a. s -> Getting a s a -> a ^.(rectangle -> Vector 2 r) @@ -399,28 +399,28 @@ rect_ [ MisoString -> Attribute action forall action. MisoString -> Attribute action x_ MisoString -x, MisoString -> Attribute action +x, MisoString -> Attribute action forall action. MisoString -> Attribute action y_ MisoString -y, MisoString -> Attribute action +y, MisoString -> Attribute action forall action. MisoString -> Attribute action width_ MisoString -w, MisoString -> Attribute action +w, MisoString -> Attribute action forall action. MisoString -> Attribute action height_ MisoString -h, MisoString -> Attribute action +h, MisoString -> Attribute action forall action. MisoString -> Attribute action fill_ MisoString "none"] -- | Draw a simple polygon -dSimplePolygon :: (SimplePolygon_ simplePolygon point r, ToMisoString r) - => simplePolygon -> [Attribute action] -> View action +dSimplePolygon :: (SimplePolygon_ simplePolygon point r, ToMisoString r) + => simplePolygon -> [Attribute action] -> View action dSimplePolygon :: forall simplePolygon point r action. (SimplePolygon_ simplePolygon point r, ToMisoString r) => simplePolygon -> [Attribute action] -> View action -dSimplePolygon simplePolygon -pg = ([Attribute action] -> [View action] -> View action) +dSimplePolygon simplePolygon +pg = ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action forall action. ([Attribute action] -> [View action] -> View action) @@ -438,7 +438,7 @@ toPointsString ([point] -> MisoString) -> [point] -> MisoString forall a b. (a -> b) -> a -> b $ simplePolygon -pgsimplePolygon +pgsimplePolygon -> Getting (Endo [point]) simplePolygon point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) simplePolygon point @@ -476,13 +476,13 @@ -- | Draw a polyline -dPolyLine :: (PolyLine_ polyLine point, Point_ point 2 r, ToMisoString r) - => polyLine -> [Attribute action] -> View action +dPolyLine :: (PolyLine_ polyLine point, Point_ point 2 r, ToMisoString r) + => polyLine -> [Attribute action] -> View action dPolyLine :: forall polyLine point r action. (PolyLine_ polyLine point, Point_ point 2 r, ToMisoString r) => polyLine -> [Attribute action] -> View action -dPolyLine polyLine -pl = ([Attribute action] -> [View action] -> View action) +dPolyLine polyLine +pl = ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action forall action. ([Attribute action] -> [View action] -> View action) @@ -501,7 +501,7 @@ toPointsString ([point] -> Attribute action) -> [point] -> Attribute action forall a b. (a -> b) -> a -> b $ polyLine -plpolyLine -> Getting (Endo [point]) polyLine point -> [point] +plpolyLine -> Getting (Endo [point]) polyLine point -> [point] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [point]) polyLine point (Vertex polyLine -> Const (Endo [point]) (Vertex polyLine)) @@ -524,14 +524,14 @@ ] -- | Draw a line segment -dLineSegment :: ( LineSegment_ lineSegment point, Point_ point 2 r, ToMisoString r) - => lineSegment -> [Attribute action] -> View action +dLineSegment :: ( LineSegment_ lineSegment point, Point_ point 2 r, ToMisoString r) + => lineSegment -> [Attribute action] -> View action dLineSegment :: forall lineSegment point r action. (LineSegment_ lineSegment point, Point_ point 2 r, ToMisoString r) => lineSegment -> [Attribute action] -> View action -dLineSegment lineSegment -s = ([Attribute action] -> [View action] -> View action) +dLineSegment lineSegment +s = ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action forall action. ([Attribute action] -> [View action] -> View action) @@ -547,13 +547,13 @@ (Point_ point 2 r, ToMisoString r, Foldable f) => f point -> MisoString toPointsString [lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasStart seg p => Lens' seg p Lens' lineSegment point start, lineSegment -slineSegment -> Getting point lineSegment point -> point +slineSegment -> Getting point lineSegment point -> point forall s a. s -> Getting a s a -> a ^.Getting point lineSegment point forall seg p. HasEnd seg p => Lens' seg p @@ -561,7 +561,7 @@ end] ] -- | constructs a list of points to be used in the 'points' svg attribute. -toPointsString :: (Point_ point 2 r, ToMisoString r, Foldable f) => f point -> MisoString +toPointsString :: (Point_ point 2 r, ToMisoString r, Foldable f) => f point -> MisoString toPointsString :: forall point r (f :: * -> *). (Point_ point 2 r, ToMisoString r, Foldable f) => f point -> MisoString @@ -572,18 +572,18 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . (point -> MisoString) -> [point] -> [MisoString] forall a b. (a -> b) -> [a] -> [b] -map (\(Point2_ r -x r -y) -> [MisoString] -> MisoString +map (\(Point2_ r +x r +y) -> [MisoString] -> MisoString forall a. Monoid a => [a] -> a mconcat [r -> MisoString forall str. ToMisoString str => str -> MisoString ms r -x, MisoString +x, MisoString ",", r -> MisoString forall str. ToMisoString str => str -> MisoString ms r -y]) ([point] -> [MisoString]) +y]) ([point] -> [MisoString]) -> (f point -> [point]) -> f point -> [MisoString] forall b c a. (b -> c) -> (a -> b) -> a -> c . f point -> [point] @@ -593,14 +593,14 @@ -- | Draw a circle -dCircle :: (Point_ point 2 r, ToMisoString r) - => Circle point -> [Attribute action] -> View action +dCircle :: (Point_ point 2 r, ToMisoString r) + => Circle point -> [Attribute action] -> View action dCircle :: forall point r action. (Point_ point 2 r, ToMisoString r) => Circle point -> [Attribute action] -> View action -dCircle (Circle point -c NumType point -r) = ([Attribute action] -> [View action] -> View action) +dCircle (Circle point +c NumType point +r) = ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action forall action. ([Attribute action] -> [View action] -> View action) @@ -621,7 +621,7 @@ -> NumType point -> Attribute action forall a b. (a -> b) -> a -> b $ NumType point -r +r , MisoString -> Attribute action forall action. MisoString -> Attribute action ry_ (MisoString -> Attribute action) @@ -636,7 +636,7 @@ -> NumType point -> Attribute action forall a b. (a -> b) -> a -> b $ NumType point -r +r , MisoString -> Attribute action forall action. MisoString -> Attribute action cx_ (MisoString -> Attribute action) @@ -647,7 +647,7 @@ ms (r -> Attribute action) -> r -> Attribute action forall a b. (a -> b) -> a -> b $ point -cpoint -> Getting r point r -> r +cpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -665,7 +665,7 @@ ms (r -> Attribute action) -> r -> Attribute action forall a b. (a -> b) -> a -> b $ point -cpoint -> Getting r point r -> r +cpoint -> Getting r point r -> r forall s a. s -> Getting a s a -> a ^.Getting r point r forall (d :: Nat) point r. @@ -680,23 +680,23 @@ ] -- | Draw a disk -dDisk :: (Disk_ disk point, Point_ point 2 r, ToMisoString r, Floating r) - => disk -> [Attribute action] -> View action +dDisk :: (Disk_ disk point, Point_ point 2 r, ToMisoString r, Floating r) + => disk -> [Attribute action] -> View action dDisk :: forall disk point r action. (Disk_ disk point, Point_ point 2 r, ToMisoString r, Floating r) => disk -> [Attribute action] -> View action -dDisk (Disk_ point -c NumType disk -r) = Circle point -> [Attribute action] -> View action +dDisk (Disk_ point +c NumType disk +r) = Circle point -> [Attribute action] -> View action forall point r action. (Point_ point 2 r, ToMisoString r) => Circle point -> [Attribute action] -> View action dCircle (point -> NumType point -> Circle point forall point. point -> NumType point -> Circle point Circle point -c NumType disk +c NumType disk NumType point -r) +r) -- instance (ToMisoString r, Drawable v, Drawable => Drawable (PlanarSubdivision s v e f r) @@ -740,11 +740,11 @@ -------------------------------------------------------------------------------- -- * Functions to draw ipe objects -instance ToMisoString r => Drawable (Ipe.IpeObject r) where - draw :: forall action. IpeObject r -> [Attribute action] -> View action +instance ToMisoString r => Drawable (Ipe.IpeObject r) where + draw :: forall action. IpeObject r -> [Attribute action] -> View action draw = \case - Ipe.IpeGroup IpeObject' Group r -g -> (Group r + Ipe.IpeGroup IpeObject' Group r +g -> (Group r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip]) -> [Attribute action] -> View action @@ -759,9 +759,9 @@ draw Group r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Clip] IpeObject' Group r -g - Ipe.IpeImage IpeObject' Image r -i -> (Image r :+ Attributes' r CommonAttributes) +g + Ipe.IpeImage IpeObject' Image r +i -> (Image r :+ Attributes' r CommonAttributes) -> [Attribute action] -> View action forall action. (Image r :+ Attributes' r CommonAttributes) @@ -771,9 +771,9 @@ t -> [Attribute action] -> View action draw Image r :+ Attributes' r CommonAttributes IpeObject' Image r -i - Ipe.IpeTextLabel IpeObject' TextLabel r -t -> (TextLabel r :+ Attributes' r CommonAttributes) +i + Ipe.IpeTextLabel IpeObject' TextLabel r +t -> (TextLabel r :+ Attributes' r CommonAttributes) -> [Attribute action] -> View action forall action. (TextLabel r :+ Attributes' r CommonAttributes) @@ -783,9 +783,9 @@ t -> [Attribute action] -> View action draw TextLabel r :+ Attributes' r CommonAttributes IpeObject' TextLabel r -t - Ipe.IpeMiniPage IpeObject' MiniPage r -m -> (MiniPage r :+ Attributes' r CommonAttributes) +t + Ipe.IpeMiniPage IpeObject' MiniPage r +m -> (MiniPage r :+ Attributes' r CommonAttributes) -> [Attribute action] -> View action forall action. (MiniPage r :+ Attributes' r CommonAttributes) @@ -795,9 +795,9 @@ t -> [Attribute action] -> View action draw MiniPage r :+ Attributes' r CommonAttributes IpeObject' MiniPage r -m - Ipe.IpeUse IpeObject' IpeSymbol r -u -> (IpeSymbol r +m + Ipe.IpeUse IpeObject' IpeSymbol r +u -> (IpeSymbol r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen, @@ -819,9 +819,9 @@ '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Pen, 'Size] IpeObject' IpeSymbol r -u - Ipe.IpePath IpeObject' Path r -p -> (Path r +u + Ipe.IpePath IpeObject' Path r +p -> (Path r :+ Attributes' r '[ 'Layer, 'Matrix, 'Pin, 'Transformations, 'Stroke, 'Fill, 'Dash, @@ -846,26 +846,26 @@ 'Pen, 'LineCap, 'LineJoin, 'FillRule, 'Arrow, 'RArrow, 'StrokeOpacity, 'Opacity, 'Tiling, 'Gradient] IpeObject' Path r -p +p -instance ( Drawable g - , AllConstrained IpeToMisoAttr rs - , ReifyConstraint ToMisoString (IA.Attr f) rs - , RMap rs, RecordToList rs - , RecAll (IA.Attr f) rs ToMisoString - ) => Drawable (g :+ IA.Attributes f rs) where - draw :: forall action. +instance ( Drawable g + , AllConstrained IpeToMisoAttr rs + , ReifyConstraint ToMisoString (IA.Attr f) rs + , RMap rs, RecordToList rs + , RecAll (IA.Attr f) rs ToMisoString + ) => Drawable (g :+ IA.Attributes f rs) where + draw :: forall action. (g :+ Attributes f rs) -> [Attribute action] -> View action -draw (g -i :+ Attributes f rs -iAts) [Attribute action] -ats = g -> [Attribute action] -> View action +draw (g +i :+ Attributes f rs +iAts) [Attribute action] +ats = g -> [Attribute action] -> View action forall action. g -> [Attribute action] -> View action forall t action. Drawable t => t -> [Attribute action] -> View action draw g -i (Attributes f rs -> [Attribute action] +i (Attributes f rs -> [Attribute action] forall (rs :: [AttributeUniverse]) (f :: TyFun AttributeUniverse (*) -> *) action. (AllConstrained IpeToMisoAttr rs, RMap rs, RecordToList rs, @@ -873,19 +873,19 @@ RecAll (Attr f) rs ToMisoString) => Attributes f rs -> [Attribute action] svgWriteAttrs Attributes f rs -iAts [Attribute action] -> [Attribute action] -> [Attribute action] +iAts [Attribute action] -> [Attribute action] -> [Attribute action] forall a. Semigroup a => a -> a -> a <> [Attribute action] -ats) +ats) -instance ToMisoString r => Drawable (Ipe.Group r) where - draw :: forall action. Group r -> [Attribute action] -> View action -draw (Ipe.Group [IpeObject r] -os) [Attribute action] -ats = [Attribute action] -> [View action] -> View action +instance ToMisoString r => Drawable (Ipe.Group r) where + draw :: forall action. Group r -> [Attribute action] -> View action +draw (Ipe.Group [IpeObject r] +os) [Attribute action] +ats = [Attribute action] -> [View action] -> View action forall action. [Attribute action] -> [View action] -> View action g_ [Attribute action] -ats ((IpeObject r -> View action) -> [IpeObject r] -> [View action] +ats ((IpeObject r -> View action) -> [IpeObject r] -> [View action] forall a b. (a -> b) -> [a] -> [b] map ((IpeObject r -> [Attribute action] -> View action) -> [Attribute action] -> IpeObject r -> View action @@ -896,25 +896,25 @@ Drawable t => t -> [Attribute action] -> View action draw []) [IpeObject r] -os) +os) -instance ToMisoString r => Drawable (Ipe.Image r) where - draw :: forall action. Image r -> [Attribute action] -> View action +instance ToMisoString r => Drawable (Ipe.Image r) where + draw :: forall action. Image r -> [Attribute action] -> View action draw Image r -_ [Attribute action] -ats = [Attribute action] -> [View action] -> View action +_ [Attribute action] +ats = [Attribute action] -> [View action] -> View action forall action. [Attribute action] -> [View action] -> View action text_ [Attribute action] -ats [MisoString -> View action +ats [MisoString -> View action forall action. MisoString -> View action text MisoString "image"] -instance ToMisoString r => Drawable (Ipe.TextLabel r) where - draw :: forall action. TextLabel r -> [Attribute action] -> View action -draw (Ipe.Label MisoString -t Point 2 r -p) [Attribute action] -ats = [Attribute action] -> [View action] -> View action +instance ToMisoString r => Drawable (Ipe.TextLabel r) where + draw :: forall action. TextLabel r -> [Attribute action] -> View action +draw (Ipe.Label MisoString +t Point 2 r +p) [Attribute action] +ats = [Attribute action] -> [View action] -> View action forall action. [Attribute action] -> [View action] -> View action text_ ([ MisoString -> Attribute action forall action. MisoString -> Attribute action @@ -923,24 +923,24 @@ $ Point 2 r -> MisoString forall r. ToMisoString r => Point 2 r -> MisoString moveTo Point 2 r -p ] [Attribute action] -> [Attribute action] -> [Attribute action] +p ] [Attribute action] -> [Attribute action] -> [Attribute action] forall a. Semigroup a => a -> a -> a <> [Attribute action] -ats) [MisoString -> View action +ats) [MisoString -> View action forall action. MisoString -> View action text (MisoString -> View action) -> MisoString -> View action forall a b. (a -> b) -> a -> b $ MisoString -> MisoString forall str. ToMisoString str => str -> MisoString ms MisoString -t ] -instance ToMisoString r => Drawable (Ipe.MiniPage r) where - draw :: forall action. MiniPage r -> [Attribute action] -> View action -draw (Ipe.MiniPage MisoString -t Point 2 r -p r -w) [Attribute action] -ats = [Attribute action] -> [View action] -> View action +t ] +instance ToMisoString r => Drawable (Ipe.MiniPage r) where + draw :: forall action. MiniPage r -> [Attribute action] -> View action +draw (Ipe.MiniPage MisoString +t Point 2 r +p r +w) [Attribute action] +ats = [Attribute action] -> [View action] -> View action forall action. [Attribute action] -> [View action] -> View action text_ ([ MisoString -> Attribute action forall action. MisoString -> Attribute action @@ -949,7 +949,7 @@ $ Point 2 r -> MisoString forall r. ToMisoString r => Point 2 r -> MisoString moveTo Point 2 r -p +p , MisoString -> Attribute action forall action. MisoString -> Attribute action width_ (MisoString -> Attribute action) -> MisoString -> Attribute action @@ -957,11 +957,11 @@ $ r -> MisoString forall str. ToMisoString str => str -> MisoString ms r -w +w ] [Attribute action] -> [Attribute action] -> [Attribute action] forall a. Semigroup a => a -> a -> a <> [Attribute action] -ats) +ats) [MisoString -> View action forall action. MisoString -> View action text (MisoString -> View action) -> MisoString -> View action @@ -969,10 +969,10 @@ $ MisoString -> MisoString forall str. ToMisoString str => str -> MisoString ms MisoString -t] +t] -- | renders a translation matrix -moveTo :: ToMisoString r => Point 2 r -> MisoString +moveTo :: ToMisoString r => Point 2 r -> MisoString moveTo :: forall r. ToMisoString r => Point 2 r -> MisoString moveTo (ASetter (Point 2 r) (Point 2 MisoString) r MisoString -> (r -> MisoString) -> Point 2 r -> Point 2 MisoString @@ -991,27 +991,27 @@ (NumType (Point 2 MisoString)) coordinates r -> MisoString forall str. ToMisoString str => str -> MisoString -ms -> Point2 MisoString -x MisoString -y) = MisoString +ms -> Point2 MisoString +x MisoString +y) = MisoString "translate(" MisoString -> MisoString -> MisoString forall a. Semigroup a => a -> a -> a <> MisoString -x MisoString -> MisoString -> MisoString +x MisoString -> MisoString -> MisoString forall a. Semigroup a => a -> a -> a <> MisoString " " MisoString -> MisoString -> MisoString forall a. Semigroup a => a -> a -> a <> MisoString -y MisoString -> MisoString -> MisoString +y MisoString -> MisoString -> MisoString forall a. Semigroup a => a -> a -> a <> MisoString ")" -instance ToMisoString r => Drawable (Ipe.IpeSymbol r) where - draw :: forall action. IpeSymbol r -> [Attribute action] -> View action -draw (Ipe.Symbol Point 2 r -p MisoString +instance ToMisoString r => Drawable (Ipe.IpeSymbol r) where + draw :: forall action. IpeSymbol r -> [Attribute action] -> View action +draw (Ipe.Symbol Point 2 r +p MisoString _ ) = ([Attribute action] -> [View action] -> View action) -> [Attribute action] -> [Attribute action] -> View action forall action. @@ -1022,11 +1022,11 @@ ellipse_ [ MisoString -> Attribute action forall action. MisoString -> Attribute action rx_ MisoString -r +r , MisoString -> Attribute action forall action. MisoString -> Attribute action ry_ MisoString -r +r , MisoString -> Attribute action forall action. MisoString -> Attribute action cx_ (MisoString -> Attribute action) @@ -1037,7 +1037,7 @@ ms (r -> Attribute action) -> r -> Attribute action forall a b. (a -> b) -> a -> b $ Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1055,7 +1055,7 @@ ms (r -> Attribute action) -> r -> Attribute action forall a b. (a -> b) -> a -> b $ Point 2 r -pPoint 2 r -> Getting r (Point 2 r) r -> r +pPoint 2 r -> Getting r (Point 2 r) r -> r forall s a. s -> Getting a s a -> a ^.Getting r (Point 2 r) r forall (d :: Nat) point r. @@ -1065,15 +1065,15 @@ yCoord ] where - r :: MisoString -r = MisoString + r :: MisoString +r = MisoString "5" -instance ToMisoString r => Drawable (Ipe.Path r) where - draw :: forall action. Path r -> [Attribute action] -> View action -draw (Ipe.Path Seq (PathSegment r) -s) [Attribute action] -ats = [Attribute action] -> [View action] -> View action +instance ToMisoString r => Drawable (Ipe.Path r) where + draw :: forall action. Path r -> [Attribute action] -> View action +draw (Ipe.Path Seq (PathSegment r) +s) [Attribute action] +ats = [Attribute action] -> [View action] -> View action forall action. [Attribute action] -> [View action] -> View action g_ [] ((PathSegment r -> View action) -> [PathSegment r] -> [View action] forall a b. (a -> b) -> [a] -> [b] @@ -1091,7 +1091,7 @@ "none"Attribute action -> [Attribute action] -> [Attribute action] forall a. a -> [a] -> [a] :[Attribute action] -ats)) ([PathSegment r] -> [View action]) +ats)) ([PathSegment r] -> [View action]) -> (Seq (PathSegment r) -> [PathSegment r]) -> Seq (PathSegment r) -> [View action] @@ -1103,26 +1103,26 @@ -> Seq (PathSegment r) -> [View action] forall a b. (a -> b) -> a -> b $ Seq (PathSegment r) -s) +s) -- svg fills paths by default; don't do that unless specified otherwise -instance ToMisoString r => Drawable (Ipe.PathSegment r) where - draw :: forall action. PathSegment r -> [Attribute action] -> View action +instance ToMisoString r => Drawable (Ipe.PathSegment r) where + draw :: forall action. PathSegment r -> [Attribute action] -> View action draw = \case - Ipe.PolyLineSegment PolyLine (Point 2 r) -pl -> PolyLine (Point 2 r) -> [Attribute action] -> View action + Ipe.PolyLineSegment PolyLine (Point 2 r) +pl -> PolyLine (Point 2 r) -> [Attribute action] -> View action forall polyLine point r action. (PolyLine_ polyLine point, Point_ point 2 r, ToMisoString r) => polyLine -> [Attribute action] -> View action dPolyLine PolyLine (Point 2 r) -pl - Ipe.PolygonPath SimplePolygon (Point 2 r) -pg -> SimplePolygon (Point 2 r) -> [Attribute action] -> View action +pl + Ipe.PolygonPath SimplePolygon (Point 2 r) +pg -> SimplePolygon (Point 2 r) -> [Attribute action] -> View action forall simplePolygon point r action. (SimplePolygon_ simplePolygon point r, ToMisoString r) => simplePolygon -> [Attribute action] -> View action dSimplePolygon SimplePolygon (Point 2 r) -pg +pg PathSegment r _ -> [Char] -> [Attribute action] -> View action forall a. HasCallStack => [Char] -> a @@ -1136,32 +1136,32 @@ -------------------------------------------------------------------------------- -type SvgF action = MisoString -> Attribute action +type SvgF action = MisoString -> Attribute action -- | Functon to write all attributes in a Rec -svgWriteAttrs :: ( AllConstrained IpeToMisoAttr rs - , RMap rs, RecordToList rs - , ReifyConstraint ToMisoString (IA.Attr f) rs - , RecAll (IA.Attr f) rs ToMisoString +svgWriteAttrs :: ( AllConstrained IpeToMisoAttr rs + , RMap rs, RecordToList rs + , ReifyConstraint ToMisoString (IA.Attr f) rs + , RecAll (IA.Attr f) rs ToMisoString ) - => IA.Attributes f rs - -> [Attribute action] + => IA.Attributes f rs + -> [Attribute action] svgWriteAttrs :: forall (rs :: [AttributeUniverse]) (f :: TyFun AttributeUniverse (*) -> *) action. (AllConstrained IpeToMisoAttr rs, RMap rs, RecordToList rs, ReifyConstraint ToMisoString (Attr f) rs, RecAll (Attr f) rs ToMisoString) => Attributes f rs -> [Attribute action] -svgWriteAttrs (IA.Attrs Rec (Attr f) rs -r) = ((MisoString -> Attribute action, MisoString) -> Attribute action) +svgWriteAttrs (IA.Attrs Rec (Attr f) rs +r) = ((MisoString -> Attribute action, MisoString) -> Attribute action) -> [(MisoString -> Attribute action, MisoString)] -> [Attribute action] forall a b. (a -> b) -> [a] -> [b] -map (\(MisoString -> Attribute action -g,MisoString -x) -> MisoString -> Attribute action -g MisoString -x) ([(MisoString -> Attribute action, MisoString)] +map (\(MisoString -> Attribute action +g,MisoString +x) -> MisoString -> Attribute action +g MisoString +x) ([(MisoString -> Attribute action, MisoString)] -> [Attribute action]) -> (Rec (Const (Maybe (MisoString -> Attribute action, MisoString))) rs @@ -1218,42 +1218,42 @@ Const (Maybe (MisoString -> Attribute action)) a -> Const (Maybe MisoString) a -> Const (Maybe (MisoString -> Attribute action, MisoString)) a -f (Rec (Attr f) rs +f (Rec (Attr f) rs -> Rec (Const (Maybe (MisoString -> Attribute action))) rs forall (rs :: [AttributeUniverse]) (f :: AttributeUniverse -> *) action. AllConstrained IpeToMisoAttr rs => Rec f rs -> Rec (Const (Maybe (SvgF action))) rs writeAttrFunctions Rec (Attr f) rs -r) +r) (Rec (Attr f) rs -> Rec (Const (Maybe MisoString)) rs forall {u} (f :: TyFun u (*) -> *) (rs :: [u]). (ReifyConstraint ToMisoString (Attr f) rs, RMap rs, RecAll (Attr f) rs ToMisoString) => Rec (Attr f) rs -> Rec (Const (Maybe MisoString)) rs writeAttrValues Rec (Attr f) rs -r) +r) where - f :: Const (f a) b -> Const (f a) b -> Const (f (a, a)) b -f (Const f a -mn) (Const f a -mv) = f (a, a) -> Const (f (a, a)) b + f :: Const (f a) b -> Const (f a) b -> Const (f (a, a)) b +f (Const f a +mn) (Const f a +mv) = f (a, a) -> Const (f (a, a)) b forall k a (b :: k). a -> Const a b Const (f (a, a) -> Const (f (a, a)) b) -> f (a, a) -> Const (f (a, a)) b forall a b. (a -> b) -> a -> b $ (,) (a -> a -> (a, a)) -> f a -> f (a -> (a, a)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> f a -mn f (a -> (a, a)) -> f a -> f (a, a) +mn f (a -> (a, a)) -> f a -> f (a, a) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> f a -mv +mv -- | Writing Attribute names -writeAttrFunctions :: AllConstrained IpeToMisoAttr rs - => Rec f rs - -> Rec (Const (Maybe (SvgF action))) rs +writeAttrFunctions :: AllConstrained IpeToMisoAttr rs + => Rec f rs + -> Rec (Const (Maybe (SvgF action))) rs writeAttrFunctions :: forall (rs :: [AttributeUniverse]) (f :: AttributeUniverse -> *) action. AllConstrained IpeToMisoAttr rs => @@ -1263,17 +1263,17 @@ Rec (Const (Maybe (SvgF action))) '[] forall {u} (a :: u -> *). Rec a '[] RNil -writeAttrFunctions (f r -x :& Rec f rs -xs) = Maybe (SvgF action) -> Const (Maybe (SvgF action)) r +writeAttrFunctions (f r +x :& Rec f rs +xs) = Maybe (SvgF action) -> Const (Maybe (SvgF action)) r forall k a (b :: k). a -> Const a b Const (f r -> Maybe (SvgF action) forall (f :: AttributeUniverse -> *) (s :: AttributeUniverse) action. IpeToMisoAttr s => f s -> Maybe (SvgF action) -write'' f r -x) Const (Maybe (SvgF action)) r +write'' f r +x) Const (Maybe (SvgF action)) r -> Rec (Const (Maybe (SvgF action))) rs -> Rec (Const (Maybe (SvgF action))) (r : rs) forall {u} (a :: u -> *) (r :: u) (rs :: [u]). @@ -1284,14 +1284,14 @@ AllConstrained IpeToMisoAttr rs => Rec f rs -> Rec (Const (Maybe (SvgF action))) rs writeAttrFunctions Rec f rs -xs +xs where - write'' :: forall f s action. IpeToMisoAttr s => f s -> Maybe (SvgF action) - write'' :: forall (f :: AttributeUniverse -> *) (s :: AttributeUniverse) + write'' :: forall f s action. IpeToMisoAttr s => f s -> Maybe (SvgF action) + write'' :: forall (f :: AttributeUniverse -> *) (s :: AttributeUniverse) action. IpeToMisoAttr s => f s -> Maybe (SvgF action) -write'' f s +write'' f s _ = Proxy s -> Maybe (SvgF action) forall (a :: AttributeUniverse) (proxy :: AttributeUniverse -> *) action. @@ -1301,13 +1301,13 @@ proxy s -> Maybe (SvgF action) attrSvg (Proxy s forall {k} (t :: k). Proxy t -Proxy :: Proxy s) +Proxy :: Proxy s) -- | Writing the attribute values -writeAttrValues :: ( ReifyConstraint ToMisoString (IA.Attr f) rs, RMap rs - , RecAll (IA.Attr f) rs ToMisoString) - => Rec (IA.Attr f) rs -> Rec (Const (Maybe MisoString)) rs +writeAttrValues :: ( ReifyConstraint ToMisoString (IA.Attr f) rs, RMap rs + , RecAll (IA.Attr f) rs ToMisoString) + => Rec (IA.Attr f) rs -> Rec (Const (Maybe MisoString)) rs writeAttrValues :: forall {u} (f :: TyFun u (*) -> *) (rs :: [u]). (ReifyConstraint ToMisoString (Attr f) rs, RMap rs, RecAll (Attr f) rs ToMisoString) => @@ -1321,8 +1321,8 @@ (forall (x :: u). f x -> g x) -> Rec f rs -> Rec g rs forall (f :: u -> *) (g :: u -> *). (forall (x :: u). f x -> g x) -> Rec f rs -> Rec g rs -rmap (\(Compose (Dict Attr f x -x)) -> Maybe MisoString -> Const (Maybe MisoString) x +rmap (\(Compose (Dict Attr f x +x)) -> Maybe MisoString -> Const (Maybe MisoString) x forall k a (b :: k). a -> Const a b Const (Maybe MisoString -> Const (Maybe MisoString) x) -> Maybe MisoString -> Const (Maybe MisoString) x @@ -1332,7 +1332,7 @@ ToMisoString (Attr f at) => Attr f at -> Maybe MisoString toMaybeValue Attr f x -x) +x) (Rec (Dict ToMisoString :. Attr f) rs -> Rec (Const (Maybe MisoString)) rs) -> (Rec (Attr f) rs -> Rec (Dict ToMisoString :. Attr f) rs) @@ -1347,13 +1347,13 @@ Rec f rs -> Rec (Dict c :. f) rs reifyConstraint @ToMisoString -toMaybeValue :: ToMisoString (IA.Attr f at) => IA.Attr f at -> Maybe MisoString +toMaybeValue :: ToMisoString (IA.Attr f at) => IA.Attr f at -> Maybe MisoString toMaybeValue :: forall {u} (f :: TyFun u (*) -> *) (at :: u). ToMisoString (Attr f at) => Attr f at -> Maybe MisoString -toMaybeValue Attr f at -a = case Attr f at -a of +toMaybeValue Attr f at +a = case Attr f at +a of Attr f at IA.NoAttr -> Maybe MisoString forall a. Maybe a @@ -1366,33 +1366,33 @@ $ Attr f at -> MisoString forall str. ToMisoString str => str -> MisoString toMisoString Attr f at -a +a -- | For the types representing attribute values we can get the name/key to use -- when serializing to ipe. -class IpeToMisoAttr (a :: IA.AttributeUniverse) where - attrSvg :: proxy a -> Maybe (SvgF action) +class IpeToMisoAttr (a :: IA.AttributeUniverse) where + attrSvg :: proxy a -> Maybe (SvgF action) -- CommonAttributeUnivers -instance IpeToMisoAttr IA.Layer where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Layer where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Layer -> Maybe (SvgF action) attrSvg proxy 'Layer _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.Matrix where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Matrix where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Matrix -> Maybe (SvgF action) attrSvg proxy 'Matrix _ = Maybe (SvgF action) forall a. Maybe a Nothing -- TODO -instance IpeToMisoAttr IA.Pin where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Pin where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Pin -> Maybe (SvgF action) attrSvg proxy 'Pin _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.Transformations where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Transformations where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Transformations -> Maybe (SvgF action) attrSvg proxy 'Transformations _ = Maybe (SvgF action) @@ -1400,7 +1400,7 @@ Nothing -- IpeSymbolAttributeUniversre -instance IpeToMisoAttr IA.Stroke where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Stroke where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Stroke -> Maybe (SvgF action) attrSvg proxy 'Stroke _ = SvgF action -> Maybe (SvgF action) @@ -1408,7 +1408,7 @@ Just SvgF action forall action. MisoString -> Attribute action stroke_ -instance IpeToMisoAttr IA.Fill where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Fill where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Fill -> Maybe (SvgF action) attrSvg proxy 'Fill _ = SvgF action -> Maybe (SvgF action) @@ -1416,13 +1416,13 @@ Just SvgF action forall action. MisoString -> Attribute action fill_ -instance IpeToMisoAttr IA.Pen where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Pen where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Pen -> Maybe (SvgF action) attrSvg proxy 'Pen _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.Size where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Size where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Size -> Maybe (SvgF action) attrSvg proxy 'Size _ = Maybe (SvgF action) @@ -1430,13 +1430,13 @@ Nothing -- PathAttributeUniverse -instance IpeToMisoAttr IA.Dash where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Dash where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Dash -> Maybe (SvgF action) attrSvg proxy 'Dash _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.LineCap where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.LineCap where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'LineCap -> Maybe (SvgF action) attrSvg proxy 'LineCap _ = SvgF action -> Maybe (SvgF action) @@ -1444,31 +1444,31 @@ Just SvgF action forall action. MisoString -> Attribute action strokeLinecap_ -instance IpeToMisoAttr IA.LineJoin where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.LineJoin where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'LineJoin -> Maybe (SvgF action) attrSvg proxy 'LineJoin _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.FillRule where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.FillRule where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'FillRule -> Maybe (SvgF action) attrSvg proxy 'FillRule _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.Arrow where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Arrow where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Arrow -> Maybe (SvgF action) attrSvg proxy 'Arrow _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.RArrow where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.RArrow where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'RArrow -> Maybe (SvgF action) attrSvg proxy 'RArrow _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.StrokeOpacity where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.StrokeOpacity where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'StrokeOpacity -> Maybe (SvgF action) attrSvg proxy 'StrokeOpacity _ = SvgF action -> Maybe (SvgF action) @@ -1476,7 +1476,7 @@ Just SvgF action forall action. MisoString -> Attribute action strokeOpacity_ -instance IpeToMisoAttr IA.Opacity where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Opacity where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Opacity -> Maybe (SvgF action) attrSvg proxy 'Opacity _ = SvgF action -> Maybe (SvgF action) @@ -1484,13 +1484,13 @@ Just SvgF action forall action. MisoString -> Attribute action fillOpacity_ -instance IpeToMisoAttr IA.Tiling where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Tiling where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Tiling -> Maybe (SvgF action) attrSvg proxy 'Tiling _ = Maybe (SvgF action) forall a. Maybe a Nothing -instance IpeToMisoAttr IA.Gradient where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Gradient where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Gradient -> Maybe (SvgF action) attrSvg proxy 'Gradient _ = Maybe (SvgF action) @@ -1498,7 +1498,7 @@ Nothing -- GroupAttributeUniverse -instance IpeToMisoAttr IA.Clip where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. +instance IpeToMisoAttr IA.Clip where attrSvg :: forall (proxy :: AttributeUniverse -> *) action. proxy 'Clip -> Maybe (SvgF action) attrSvg proxy 'Clip _ = Maybe (SvgF action) diff --git a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.html b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.html index ba2330601..d75e9cf2b 100644 --- a/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.html +++ b/haddocks/hgeometry/svg/src/HGeometry.Miso.Svg.html @@ -39,12 +39,12 @@ -- | Given an file path, and a view whose root is an svg element, -- render the output to the given file. -renderSvgToFile :: OsPath -> Miso.View action -> IO () +renderSvgToFile :: OsPath -> Miso.View action -> IO () renderSvgToFile :: forall action. OsPath -> View action -> IO () -renderSvgToFile OsPath -fp = OsPath -> ByteString -> IO () +renderSvgToFile OsPath +fp = OsPath -> ByteString -> IO () File.writeFile OsPath -fp (ByteString -> IO ()) +fp (ByteString -> IO ()) -> (View action -> ByteString) -> View action -> IO () forall b c a. (b -> c) -> (a -> b) -> a -> c . View action -> ByteString @@ -52,17 +52,17 @@ renderAsSvgByteString -- | Add the doctype -withDocType :: Svg.Svg a -> Svg.Svg a +withDocType :: Svg.Svg a -> Svg.Svg a withDocType :: forall a. Svg a -> Svg a -withDocType HtmlT Identity a -content = do +withDocType HtmlT Identity a +content = do SvgT Identity () forall (m :: * -> *). Monad m => SvgT m () Svg.doctype_ HtmlT Identity a -> [Attribute] -> HtmlT Identity a forall a. With a => a -> [Attribute] -> a Svg.with HtmlT Identity a -content +content [ Text -> Text -> Attribute Lucid.makeAttribute Text "xmlns" Text @@ -79,7 +79,7 @@ -- | Given an View whose root is an svg element, renders the view to a -- lazy Text -- -renderAsSvgText :: Miso.View action -> Text.Text +renderAsSvgText :: Miso.View action -> Text.Text renderAsSvgText :: forall action. View action -> Text renderAsSvgText = SvgT Identity () -> Text forall a. Html a -> Text @@ -101,7 +101,7 @@ -- | Given an View whose root is an svg element, renders the view to a -- lazy ByteString. -- -renderAsSvgByteString :: Miso.View action -> ByteString.ByteString +renderAsSvgByteString :: Miso.View action -> ByteString.ByteString renderAsSvgByteString :: forall action. View action -> ByteString renderAsSvgByteString = SvgT Identity () -> ByteString forall a. Html a -> ByteString diff --git a/haddocks/hgeometry/vector-quickcheck/src/HGeometry.Vector.Instances.html b/haddocks/hgeometry/vector-quickcheck/src/HGeometry.Vector.Instances.html index 0544b569d..fd8fce807 100644 --- a/haddocks/hgeometry/vector-quickcheck/src/HGeometry.Vector.Instances.html +++ b/haddocks/hgeometry/vector-quickcheck/src/HGeometry.Vector.Instances.html @@ -19,9 +19,9 @@ -------------------------------------------------------------------------------- -instance (Arbitrary r, Vector_ (Vector d r) d r) => Arbitrary (Vector d r) where - arbitrary :: Gen (Vector d r) -arbitrary = (Int -> Gen r) -> Gen (Vector d r) +instance (Arbitrary r, Vector_ (Vector d r) d r) => Arbitrary (Vector d r) where + arbitrary :: Gen (Vector d r) +arbitrary = (Int -> Gen r) -> Gen (Vector d r) forall vector (d :: Nat) r (f :: * -> *). (Vector_ vector d r, Applicative f) => (Int -> f r) -> f vector @@ -33,25 +33,25 @@ const Gen r forall a. Arbitrary a => Gen a arbitrary) - shrink :: Vector d r -> [Vector d r] -shrink Vector d r -v = [ Vector d r -vVector d r -> (Vector d r -> Vector d r) -> Vector d r + shrink :: Vector d r -> [Vector d r] +shrink Vector d r +v = [ Vector d r +vVector d r -> (Vector d r -> Vector d r) -> Vector d r forall a b. a -> (a -> b) -> b &Int -> IndexedTraversal' Int (Vector d r) r forall vector (d :: Nat) r. Vector_ vector d r => Int -> IndexedTraversal' Int vector r component' Int -i ((r -> Identity r) -> Vector d r -> Identity (Vector d r)) +i ((r -> Identity r) -> Vector d r -> Identity (Vector d r)) -> r -> Vector d r -> Vector d r forall s t a b. ASetter s t a b -> b -> s -> t .~ r -x' - | (Int -i,r -x) <- Vector d r -vVector d r +x' + | (Int +i,r +x) <- Vector d r +vVector d r -> Getting (Endo [(Int, r)]) (Vector d r) (Int, r) -> [(Int, r)] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Indexed Int r (Const (Endo [(Int, r)]) r) @@ -83,11 +83,11 @@ (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t) withIndex - , r -x' <- r -> [r] + , r +x' <- r -> [r] forall a. Arbitrary a => a -> [a] shrink r -x +x ] -- instance ( forall r. VectorLike_ (Vector d r) diff --git a/haddocks/hgeometry/vector/HGeometry-Vector.html b/haddocks/hgeometry/vector/HGeometry-Vector.html index a685d7df9..674863bce 100644 --- a/haddocks/hgeometry/vector/HGeometry-Vector.html +++ b/haddocks/hgeometry/vector/HGeometry-Vector.html @@ -1,4 +1,4 @@ -HGeometry.Vector
hgeometry:vector
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Vector

Description

D-dimensional Vectors

Synopsis

Documentation

data family Vector (d :: Nat) (r :: Type) Source #

Data type representing d-dimensional vectors storing elements of type r.

Instances

Instances details
FoldableWithIndex Int (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 1 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 1 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 1 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 1 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 1 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 1 a -> b Source #

FoldableWithIndex Int (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 2 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 2 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 2 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 2 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 2 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 2 a -> b Source #

FoldableWithIndex Int (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 3 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 3 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 3 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 3 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 3 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 3 a -> b Source #

FoldableWithIndex Int (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 4 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 4 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 4 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 4 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 4 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 4 a -> b Source #

FunctorWithIndex Int (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 1 a -> Vector 1 b Source #

FunctorWithIndex Int (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 2 a -> Vector 2 b Source #

FunctorWithIndex Int (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 3 a -> Vector 3 b Source #

FunctorWithIndex Int (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 4 a -> Vector 4 b Source #

TraversableWithIndex Int (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 1 a -> f (Vector 1 b) Source #

TraversableWithIndex Int (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 2 a -> f (Vector 2 b) Source #

TraversableWithIndex Int (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 3 a -> f (Vector 3 b) Source #

TraversableWithIndex Int (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 4 a -> f (Vector 4 b) Source #

(Vector Vector r, Vector_ (Vector d r) d r) => Vector Vector (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

(MVector MVector r, Vector_ (Vector d r) d r) => MVector MVector (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

Methods

basicLength :: MVector s (Vector d r) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (Vector d r) -> MVector s (Vector d r) Source #

basicOverlaps :: MVector s (Vector d r) -> MVector s (Vector d r) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (Vector d r)) Source #

basicInitialize :: MVector s (Vector d r) -> ST s () Source #

basicUnsafeReplicate :: Int -> Vector d r -> ST s (MVector s (Vector d r)) Source #

basicUnsafeRead :: MVector s (Vector d r) -> Int -> ST s (Vector d r) Source #

basicUnsafeWrite :: MVector s (Vector d r) -> Int -> Vector d r -> ST s () Source #

basicClear :: MVector s (Vector d r) -> ST s () Source #

basicSet :: MVector s (Vector d r) -> Vector d r -> ST s () Source #

basicUnsafeCopy :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeMove :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeGrow :: MVector s (Vector d r) -> Int -> ST s (MVector s (Vector d r)) Source #

Foldable (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 1 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 1 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 1 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 1 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 1 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 1 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 1 a -> b #

foldr1 :: (a -> a -> a) -> Vector 1 a -> a #

foldl1 :: (a -> a -> a) -> Vector 1 a -> a #

toList :: Vector 1 a -> [a] #

null :: Vector 1 a -> Bool #

length :: Vector 1 a -> Int #

elem :: Eq a => a -> Vector 1 a -> Bool #

maximum :: Ord a => Vector 1 a -> a #

minimum :: Ord a => Vector 1 a -> a #

sum :: Num a => Vector 1 a -> a #

product :: Num a => Vector 1 a -> a #

Foldable (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 2 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 2 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 2 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 2 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 2 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 2 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 2 a -> b #

foldr1 :: (a -> a -> a) -> Vector 2 a -> a #

foldl1 :: (a -> a -> a) -> Vector 2 a -> a #

toList :: Vector 2 a -> [a] #

null :: Vector 2 a -> Bool #

length :: Vector 2 a -> Int #

elem :: Eq a => a -> Vector 2 a -> Bool #

maximum :: Ord a => Vector 2 a -> a #

minimum :: Ord a => Vector 2 a -> a #

sum :: Num a => Vector 2 a -> a #

product :: Num a => Vector 2 a -> a #

Foldable (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 3 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 3 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 3 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 3 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 3 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 3 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 3 a -> b #

foldr1 :: (a -> a -> a) -> Vector 3 a -> a #

foldl1 :: (a -> a -> a) -> Vector 3 a -> a #

toList :: Vector 3 a -> [a] #

null :: Vector 3 a -> Bool #

length :: Vector 3 a -> Int #

elem :: Eq a => a -> Vector 3 a -> Bool #

maximum :: Ord a => Vector 3 a -> a #

minimum :: Ord a => Vector 3 a -> a #

sum :: Num a => Vector 3 a -> a #

product :: Num a => Vector 3 a -> a #

Foldable (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 4 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 4 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 4 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 4 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 4 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 4 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 4 a -> b #

foldr1 :: (a -> a -> a) -> Vector 4 a -> a #

foldl1 :: (a -> a -> a) -> Vector 4 a -> a #

toList :: Vector 4 a -> [a] #

null :: Vector 4 a -> Bool #

length :: Vector 4 a -> Int #

elem :: Eq a => a -> Vector 4 a -> Bool #

maximum :: Ord a => Vector 4 a -> a #

minimum :: Ord a => Vector 4 a -> a #

sum :: Num a => Vector 4 a -> a #

product :: Num a => Vector 4 a -> a #

Foldable1 (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 1 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 1 a -> m #

toNonEmpty :: Vector 1 a -> NonEmpty a #

maximum :: Ord a => Vector 1 a -> a #

minimum :: Ord a => Vector 1 a -> a #

head :: Vector 1 a -> a #

last :: Vector 1 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 1 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 1 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 1 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 1 a -> b #

Foldable1 (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 2 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 2 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 2 a -> m #

toNonEmpty :: Vector 2 a -> NonEmpty a #

maximum :: Ord a => Vector 2 a -> a #

minimum :: Ord a => Vector 2 a -> a #

head :: Vector 2 a -> a #

last :: Vector 2 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 2 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 2 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 2 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 2 a -> b #

Foldable1 (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 3 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 3 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 3 a -> m #

toNonEmpty :: Vector 3 a -> NonEmpty a #

maximum :: Ord a => Vector 3 a -> a #

minimum :: Ord a => Vector 3 a -> a #

head :: Vector 3 a -> a #

last :: Vector 3 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 3 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 3 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 3 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 3 a -> b #

Foldable1 (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 4 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 4 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 4 a -> m #

toNonEmpty :: Vector 4 a -> NonEmpty a #

maximum :: Ord a => Vector 4 a -> a #

minimum :: Ord a => Vector 4 a -> a #

head :: Vector 4 a -> a #

last :: Vector 4 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 4 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 4 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 4 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 4 a -> b #

Traversable (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 1 a -> f (Vector 1 b) #

sequenceA :: Applicative f => Vector 1 (f a) -> f (Vector 1 a) #

mapM :: Monad m => (a -> m b) -> Vector 1 a -> m (Vector 1 b) #

sequence :: Monad m => Vector 1 (m a) -> m (Vector 1 a) #

Traversable (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 2 a -> f (Vector 2 b) #

sequenceA :: Applicative f => Vector 2 (f a) -> f (Vector 2 a) #

mapM :: Monad m => (a -> m b) -> Vector 2 a -> m (Vector 2 b) #

sequence :: Monad m => Vector 2 (m a) -> m (Vector 2 a) #

Traversable (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 3 a -> f (Vector 3 b) #

sequenceA :: Applicative f => Vector 3 (f a) -> f (Vector 3 a) #

mapM :: Monad m => (a -> m b) -> Vector 3 a -> m (Vector 3 b) #

sequence :: Monad m => Vector 3 (m a) -> m (Vector 3 a) #

Traversable (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 4 a -> f (Vector 4 b) #

sequenceA :: Applicative f => Vector 4 (f a) -> f (Vector 4 a) #

mapM :: Monad m => (a -> m b) -> Vector 4 a -> m (Vector 4 b) #

sequence :: Monad m => Vector 4 (m a) -> m (Vector 4 a) #

Functor (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 1 a -> Vector 1 b #

(<$) :: a -> Vector 1 b -> Vector 1 a #

Functor (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 2 a -> Vector 2 b #

(<$) :: a -> Vector 2 b -> Vector 2 a #

Functor (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 3 a -> Vector 3 b #

(<$) :: a -> Vector 3 b -> Vector 3 a #

Functor (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 4 a -> Vector 4 b #

(<$) :: a -> Vector 4 b -> Vector 4 a #

Semialign (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 1 a -> Vector 1 b -> Vector 1 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 1 a -> Vector 1 b -> Vector 1 c Source #

Semialign (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 2 a -> Vector 2 b -> Vector 2 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 2 a -> Vector 2 b -> Vector 2 c Source #

Semialign (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 3 a -> Vector 3 b -> Vector 3 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 3 a -> Vector 3 b -> Vector 3 c Source #

Semialign (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 4 a -> Vector 4 b -> Vector 4 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 4 a -> Vector 4 b -> Vector 4 c Source #

Zip (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 1 a -> Vector 1 b -> Vector 1 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 1 a -> Vector 1 b -> Vector 1 c Source #

Zip (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 2 a -> Vector 2 b -> Vector 2 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 2 a -> Vector 2 b -> Vector 2 c Source #

Zip (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 3 a -> Vector 3 b -> Vector 3 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 3 a -> Vector 3 b -> Vector 3 c Source #

Zip (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 4 a -> Vector 4 b -> Vector 4 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 4 a -> Vector 4 b -> Vector 4 c Source #

Traversable1 (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 1 a -> f (Vector 1 b) Source #

sequence1 :: Apply f => Vector 1 (f b) -> f (Vector 1 b) Source #

Traversable1 (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 2 a -> f (Vector 2 b) Source #

sequence1 :: Apply f => Vector 2 (f b) -> f (Vector 2 b) Source #

Traversable1 (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 3 a -> f (Vector 3 b) Source #

sequence1 :: Apply f => Vector 3 (f b) -> f (Vector 3 b) Source #

Traversable1 (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 4 a -> f (Vector 4 b) Source #

sequence1 :: Apply f => Vector 4 (f b) -> f (Vector 4 b) Source #

FromYAML r => FromYAML (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 1 r) Source #

FromYAML r => FromYAML (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 2 r) Source #

FromYAML r => FromYAML (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 3 r) Source #

FromYAML r => FromYAML (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 4 r) Source #

(ToYAML r, HasComponents (Vector d r) (Vector d r)) => ToYAML (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

toYAML :: Vector d r -> Node () Source #

FromJSON r => FromJSON (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

FromJSON r => FromJSON (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

FromJSON r => FromJSON (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

FromJSON r => FromJSON (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

(ToJSON r, HasComponents (Vector d r) (Vector d r)) => ToJSON (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Generic (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 1 r) :: Type -> Type #

Methods

from :: Vector 1 r -> Rep (Vector 1 r) x #

to :: Rep (Vector 1 r) x -> Vector 1 r #

Generic (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 2 r) :: Type -> Type #

Methods

from :: Vector 2 r -> Rep (Vector 2 r) x #

to :: Rep (Vector 2 r) x -> Vector 2 r #

Generic (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 3 r) :: Type -> Type #

Methods

from :: Vector 3 r -> Rep (Vector 3 r) x #

to :: Rep (Vector 3 r) x -> Vector 3 r #

Generic (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 4 r) :: Type -> Type #

Methods

from :: Vector 4 r -> Rep (Vector 4 r) x #

to :: Rep (Vector 4 r) x -> Vector 4 r #

(Vector_ (Vector d r) d r, Read r, KnownNat d) => Read (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

(HasComponents (Vector d r) (Vector d r), Show r, KnownNat d) => Show (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

showsPrec :: Int -> Vector d r -> ShowS #

show :: Vector d r -> String #

showList :: [Vector d r] -> ShowS #

NFData r => NFData (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 1 r -> () #

NFData r => NFData (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 2 r -> () #

NFData r => NFData (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 3 r -> () #

NFData r => NFData (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 4 r -> () #

Eq r => Eq (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 1 r -> Vector 1 r -> Bool #

(/=) :: Vector 1 r -> Vector 1 r -> Bool #

Eq r => Eq (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 2 r -> Vector 2 r -> Bool #

(/=) :: Vector 2 r -> Vector 2 r -> Bool #

Eq r => Eq (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 3 r -> Vector 3 r -> Bool #

(/=) :: Vector 3 r -> Vector 3 r -> Bool #

Eq r => Eq (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 4 r -> Vector 4 r -> Bool #

(/=) :: Vector 4 r -> Vector 4 r -> Bool #

Ord r => Ord (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 1 r -> Vector 1 r -> Ordering #

(<) :: Vector 1 r -> Vector 1 r -> Bool #

(<=) :: Vector 1 r -> Vector 1 r -> Bool #

(>) :: Vector 1 r -> Vector 1 r -> Bool #

(>=) :: Vector 1 r -> Vector 1 r -> Bool #

max :: Vector 1 r -> Vector 1 r -> Vector 1 r #

min :: Vector 1 r -> Vector 1 r -> Vector 1 r #

Ord r => Ord (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 2 r -> Vector 2 r -> Ordering #

(<) :: Vector 2 r -> Vector 2 r -> Bool #

(<=) :: Vector 2 r -> Vector 2 r -> Bool #

(>) :: Vector 2 r -> Vector 2 r -> Bool #

(>=) :: Vector 2 r -> Vector 2 r -> Bool #

max :: Vector 2 r -> Vector 2 r -> Vector 2 r #

min :: Vector 2 r -> Vector 2 r -> Vector 2 r #

Ord r => Ord (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 3 r -> Vector 3 r -> Ordering #

(<) :: Vector 3 r -> Vector 3 r -> Bool #

(<=) :: Vector 3 r -> Vector 3 r -> Bool #

(>) :: Vector 3 r -> Vector 3 r -> Bool #

(>=) :: Vector 3 r -> Vector 3 r -> Bool #

max :: Vector 3 r -> Vector 3 r -> Vector 3 r #

min :: Vector 3 r -> Vector 3 r -> Vector 3 r #

Ord r => Ord (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 4 r -> Vector 4 r -> Ordering #

(<) :: Vector 4 r -> Vector 4 r -> Bool #

(<=) :: Vector 4 r -> Vector 4 r -> Bool #

(>) :: Vector 4 r -> Vector 4 r -> Bool #

(>=) :: Vector 4 r -> Vector 4 r -> Bool #

max :: Vector 4 r -> Vector 4 r -> Vector 4 r #

min :: Vector 4 r -> Vector 4 r -> Vector 4 r #

Ixed (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 1 r) -> Traversal' (Vector 1 r) (IxValue (Vector 1 r)) Source #

Ixed (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 2 r) -> Traversal' (Vector 2 r) (IxValue (Vector 2 r)) Source #

Ixed (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 3 r) -> Traversal' (Vector 3 r) (IxValue (Vector 3 r)) Source #

Ixed (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 4 r) -> Traversal' (Vector 4 r) (IxValue (Vector 4 r)) Source #

(Additive_ (Vector d r) d r, Uniform r, UniformRange r) => Random (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

randomR :: RandomGen g => (Vector d r, Vector d r) -> g -> (Vector d r, g) Source #

random :: RandomGen g => g -> (Vector d r, g) Source #

randomRs :: RandomGen g => (Vector d r, Vector d r) -> g -> [Vector d r] Source #

randoms :: RandomGen g => g -> [Vector d r] Source #

(Vector_ (Vector d r) d r, Uniform r) => Uniform (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

uniformM :: StatefulGen g m => g -> m (Vector d r) Source #

(Additive_ (Vector d r) d r, UniformRange r) => UniformRange (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

uniformRM :: StatefulGen g m => (Vector d r, Vector d r) -> g -> m (Vector d r) Source #

(Unbox r, Vector_ (Vector d r) d r) => Unbox (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

Additive_ (Vector 1 r) 1 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 1 r -> Vector 1 r -> Vector 1 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 1 r -> Vector 1 r -> f (Vector 1 r) Source #

Additive_ (Vector 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 2 r -> Vector 2 r -> Vector 2 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 2 r -> Vector 2 r -> f (Vector 2 r) Source #

Additive_ (Vector 3 r) 3 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 3 r -> Vector 3 r -> Vector 3 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 3 r -> Vector 3 r -> f (Vector 3 r) Source #

Additive_ (Vector 4 r) 4 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 4 r -> Vector 4 r -> Vector 4 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 4 r -> Vector 4 r -> f (Vector 4 r) Source #

Metric_ (Vector 1 r) 1 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 1 r -> Vector 1 r -> r Source #

quadrance :: Vector 1 r -> r Source #

qd :: Vector 1 r -> Vector 1 r -> r Source #

norm :: Vector 1 r -> r Source #

signorm :: Vector 1 r -> Vector 1 r Source #

Metric_ (Vector 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 2 r -> Vector 2 r -> r Source #

quadrance :: Vector 2 r -> r Source #

qd :: Vector 2 r -> Vector 2 r -> r Source #

norm :: Vector 2 r -> r Source #

signorm :: Vector 2 r -> Vector 2 r Source #

Metric_ (Vector 3 r) 3 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 3 r -> Vector 3 r -> r Source #

quadrance :: Vector 3 r -> r Source #

qd :: Vector 3 r -> Vector 3 r -> r Source #

norm :: Vector 3 r -> r Source #

signorm :: Vector 3 r -> Vector 3 r Source #

Metric_ (Vector 4 r) 4 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 4 r -> Vector 4 r -> r Source #

quadrance :: Vector 4 r -> r Source #

qd :: Vector 4 r -> Vector 4 r -> r Source #

norm :: Vector 4 r -> r Source #

signorm :: Vector 4 r -> Vector 4 r Source #

Vector_ (Vector 1 r) 1 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 1 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 1 r) r Source #

Vector_ (Vector 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 2 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 2 r) r Source #

Vector_ (Vector 3 r) 3 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 3 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 3 r) r Source #

Vector_ (Vector 4 r) 4 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 4 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 4 r) r Source #

HasComponents (Vector 1 r) (Vector 1 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

HasComponents (Vector 2 r) (Vector 2 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

HasComponents (Vector 3 r) (Vector 3 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

HasComponents (Vector 4 r) (Vector 4 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

AsVector_ (Vector d r) (Vector d s) d r s Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

_Vector :: Iso (Vector d r) (Vector d s) (Vector d r) (Vector d s) Source #

newtype Vector 1 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 1 r = MkVector1 (V1 r)
newtype Vector 2 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 2 r = MkVector2 (V2 r)
newtype Vector 3 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 3 r = MkVector3 (V3 r)
newtype Vector 4 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 4 r = MkVector4 (V4 r)
newtype MVector s (Vector d r) Source #

elements of the vector are stored consecutively

Instance details

Defined in HGeometry.Vector

newtype MVector s (Vector d r) = MV_VectorD (MVector s r)
type Rep (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 1 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V1 r))))
type Rep (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 2 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V2 r))))
type Rep (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 3 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V3 r))))
type Rep (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 4 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector4" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V4 r))))
type Dimension (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Dimension (Vector d r) = d
type NumType (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type NumType (Vector d r) = r
type Index (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Index (Vector d r) = Int
type IxValue (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type IxValue (Vector d r) = r
newtype Vector (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

newtype Vector (Vector d r) = V_VectorD (Vector r)

class HasComponents vector vector' where Source #

Types that have a components indexed traversal

Methods

components :: IndexedTraversal1 Int vector vector' (IxValue vector) (IxValue vector') Source #

An Indexed Traversal over the components of a vector

>>> myVec3 ^.. components
+HGeometry.Vector
hgeometry:vector
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellSafe-Inferred
LanguageGHC2021

HGeometry.Vector

Description

D-dimensional Vectors

Synopsis

Documentation

data family Vector (d :: Nat) (r :: Type) Source #

Data type representing d-dimensional vectors storing elements of type r.

Instances

Instances details
FoldableWithIndex Int (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 1 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 1 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 1 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 1 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 1 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 1 a -> b Source #

FoldableWithIndex Int (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 2 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 2 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 2 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 2 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 2 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 2 a -> b Source #

FoldableWithIndex Int (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 3 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 3 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 3 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 3 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 3 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 3 a -> b Source #

FoldableWithIndex Int (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector 4 a -> m Source #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector 4 a -> m Source #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector 4 a -> b Source #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector 4 a -> b Source #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector 4 a -> b Source #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector 4 a -> b Source #

FunctorWithIndex Int (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 1 a -> Vector 1 b Source #

FunctorWithIndex Int (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 2 a -> Vector 2 b Source #

FunctorWithIndex Int (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 3 a -> Vector 3 b Source #

FunctorWithIndex Int (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

imap :: (Int -> a -> b) -> Vector 4 a -> Vector 4 b Source #

TraversableWithIndex Int (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 1 a -> f (Vector 1 b) Source #

TraversableWithIndex Int (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 2 a -> f (Vector 2 b) Source #

TraversableWithIndex Int (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 3 a -> f (Vector 3 b) Source #

TraversableWithIndex Int (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector 4 a -> f (Vector 4 b) Source #

(Vector Vector r, Vector_ (Vector d r) d r) => Vector Vector (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

(MVector MVector r, Vector_ (Vector d r) d r) => MVector MVector (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

Methods

basicLength :: MVector s (Vector d r) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (Vector d r) -> MVector s (Vector d r) Source #

basicOverlaps :: MVector s (Vector d r) -> MVector s (Vector d r) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (Vector d r)) Source #

basicInitialize :: MVector s (Vector d r) -> ST s () Source #

basicUnsafeReplicate :: Int -> Vector d r -> ST s (MVector s (Vector d r)) Source #

basicUnsafeRead :: MVector s (Vector d r) -> Int -> ST s (Vector d r) Source #

basicUnsafeWrite :: MVector s (Vector d r) -> Int -> Vector d r -> ST s () Source #

basicClear :: MVector s (Vector d r) -> ST s () Source #

basicSet :: MVector s (Vector d r) -> Vector d r -> ST s () Source #

basicUnsafeCopy :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeMove :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeGrow :: MVector s (Vector d r) -> Int -> ST s (MVector s (Vector d r)) Source #

Foldable (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 1 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 1 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 1 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 1 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 1 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 1 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 1 a -> b #

foldr1 :: (a -> a -> a) -> Vector 1 a -> a #

foldl1 :: (a -> a -> a) -> Vector 1 a -> a #

toList :: Vector 1 a -> [a] #

null :: Vector 1 a -> Bool #

length :: Vector 1 a -> Int #

elem :: Eq a => a -> Vector 1 a -> Bool #

maximum :: Ord a => Vector 1 a -> a #

minimum :: Ord a => Vector 1 a -> a #

sum :: Num a => Vector 1 a -> a #

product :: Num a => Vector 1 a -> a #

Foldable (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 2 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 2 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 2 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 2 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 2 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 2 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 2 a -> b #

foldr1 :: (a -> a -> a) -> Vector 2 a -> a #

foldl1 :: (a -> a -> a) -> Vector 2 a -> a #

toList :: Vector 2 a -> [a] #

null :: Vector 2 a -> Bool #

length :: Vector 2 a -> Int #

elem :: Eq a => a -> Vector 2 a -> Bool #

maximum :: Ord a => Vector 2 a -> a #

minimum :: Ord a => Vector 2 a -> a #

sum :: Num a => Vector 2 a -> a #

product :: Num a => Vector 2 a -> a #

Foldable (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 3 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 3 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 3 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 3 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 3 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 3 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 3 a -> b #

foldr1 :: (a -> a -> a) -> Vector 3 a -> a #

foldl1 :: (a -> a -> a) -> Vector 3 a -> a #

toList :: Vector 3 a -> [a] #

null :: Vector 3 a -> Bool #

length :: Vector 3 a -> Int #

elem :: Eq a => a -> Vector 3 a -> Bool #

maximum :: Ord a => Vector 3 a -> a #

minimum :: Ord a => Vector 3 a -> a #

sum :: Num a => Vector 3 a -> a #

product :: Num a => Vector 3 a -> a #

Foldable (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold :: Monoid m => Vector 4 m -> m #

foldMap :: Monoid m => (a -> m) -> Vector 4 a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector 4 a -> m #

foldr :: (a -> b -> b) -> b -> Vector 4 a -> b #

foldr' :: (a -> b -> b) -> b -> Vector 4 a -> b #

foldl :: (b -> a -> b) -> b -> Vector 4 a -> b #

foldl' :: (b -> a -> b) -> b -> Vector 4 a -> b #

foldr1 :: (a -> a -> a) -> Vector 4 a -> a #

foldl1 :: (a -> a -> a) -> Vector 4 a -> a #

toList :: Vector 4 a -> [a] #

null :: Vector 4 a -> Bool #

length :: Vector 4 a -> Int #

elem :: Eq a => a -> Vector 4 a -> Bool #

maximum :: Ord a => Vector 4 a -> a #

minimum :: Ord a => Vector 4 a -> a #

sum :: Num a => Vector 4 a -> a #

product :: Num a => Vector 4 a -> a #

Foldable1 (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 1 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 1 a -> m #

toNonEmpty :: Vector 1 a -> NonEmpty a #

maximum :: Ord a => Vector 1 a -> a #

minimum :: Ord a => Vector 1 a -> a #

head :: Vector 1 a -> a #

last :: Vector 1 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 1 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 1 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 1 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 1 a -> b #

Foldable1 (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 2 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 2 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 2 a -> m #

toNonEmpty :: Vector 2 a -> NonEmpty a #

maximum :: Ord a => Vector 2 a -> a #

minimum :: Ord a => Vector 2 a -> a #

head :: Vector 2 a -> a #

last :: Vector 2 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 2 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 2 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 2 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 2 a -> b #

Foldable1 (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 3 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 3 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 3 a -> m #

toNonEmpty :: Vector 3 a -> NonEmpty a #

maximum :: Ord a => Vector 3 a -> a #

minimum :: Ord a => Vector 3 a -> a #

head :: Vector 3 a -> a #

last :: Vector 3 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 3 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 3 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 3 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 3 a -> b #

Foldable1 (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fold1 :: Semigroup m => Vector 4 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Vector 4 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Vector 4 a -> m #

toNonEmpty :: Vector 4 a -> NonEmpty a #

maximum :: Ord a => Vector 4 a -> a #

minimum :: Ord a => Vector 4 a -> a #

head :: Vector 4 a -> a #

last :: Vector 4 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Vector 4 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Vector 4 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Vector 4 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Vector 4 a -> b #

Traversable (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 1 a -> f (Vector 1 b) #

sequenceA :: Applicative f => Vector 1 (f a) -> f (Vector 1 a) #

mapM :: Monad m => (a -> m b) -> Vector 1 a -> m (Vector 1 b) #

sequence :: Monad m => Vector 1 (m a) -> m (Vector 1 a) #

Traversable (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 2 a -> f (Vector 2 b) #

sequenceA :: Applicative f => Vector 2 (f a) -> f (Vector 2 a) #

mapM :: Monad m => (a -> m b) -> Vector 2 a -> m (Vector 2 b) #

sequence :: Monad m => Vector 2 (m a) -> m (Vector 2 a) #

Traversable (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 3 a -> f (Vector 3 b) #

sequenceA :: Applicative f => Vector 3 (f a) -> f (Vector 3 a) #

mapM :: Monad m => (a -> m b) -> Vector 3 a -> m (Vector 3 b) #

sequence :: Monad m => Vector 3 (m a) -> m (Vector 3 a) #

Traversable (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse :: Applicative f => (a -> f b) -> Vector 4 a -> f (Vector 4 b) #

sequenceA :: Applicative f => Vector 4 (f a) -> f (Vector 4 a) #

mapM :: Monad m => (a -> m b) -> Vector 4 a -> m (Vector 4 b) #

sequence :: Monad m => Vector 4 (m a) -> m (Vector 4 a) #

Functor (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 1 a -> Vector 1 b #

(<$) :: a -> Vector 1 b -> Vector 1 a #

Functor (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 2 a -> Vector 2 b #

(<$) :: a -> Vector 2 b -> Vector 2 a #

Functor (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 3 a -> Vector 3 b #

(<$) :: a -> Vector 3 b -> Vector 3 a #

Functor (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

fmap :: (a -> b) -> Vector 4 a -> Vector 4 b #

(<$) :: a -> Vector 4 b -> Vector 4 a #

Semialign (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 1 a -> Vector 1 b -> Vector 1 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 1 a -> Vector 1 b -> Vector 1 c Source #

Semialign (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 2 a -> Vector 2 b -> Vector 2 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 2 a -> Vector 2 b -> Vector 2 c Source #

Semialign (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 3 a -> Vector 3 b -> Vector 3 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 3 a -> Vector 3 b -> Vector 3 c Source #

Semialign (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

align :: Vector 4 a -> Vector 4 b -> Vector 4 (These a b) Source #

alignWith :: (These a b -> c) -> Vector 4 a -> Vector 4 b -> Vector 4 c Source #

Zip (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 1 a -> Vector 1 b -> Vector 1 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 1 a -> Vector 1 b -> Vector 1 c Source #

Zip (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 2 a -> Vector 2 b -> Vector 2 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 2 a -> Vector 2 b -> Vector 2 c Source #

Zip (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 3 a -> Vector 3 b -> Vector 3 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 3 a -> Vector 3 b -> Vector 3 c Source #

Zip (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

zip :: Vector 4 a -> Vector 4 b -> Vector 4 (a, b) Source #

zipWith :: (a -> b -> c) -> Vector 4 a -> Vector 4 b -> Vector 4 c Source #

Traversable1 (Vector 1) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 1 a -> f (Vector 1 b) Source #

sequence1 :: Apply f => Vector 1 (f b) -> f (Vector 1 b) Source #

Traversable1 (Vector 2) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 2 a -> f (Vector 2 b) Source #

sequence1 :: Apply f => Vector 2 (f b) -> f (Vector 2 b) Source #

Traversable1 (Vector 3) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 3 a -> f (Vector 3 b) Source #

sequence1 :: Apply f => Vector 3 (f b) -> f (Vector 3 b) Source #

Traversable1 (Vector 4) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

traverse1 :: Apply f => (a -> f b) -> Vector 4 a -> f (Vector 4 b) Source #

sequence1 :: Apply f => Vector 4 (f b) -> f (Vector 4 b) Source #

FromYAML r => FromYAML (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 1 r) Source #

FromYAML r => FromYAML (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 2 r) Source #

FromYAML r => FromYAML (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 3 r) Source #

FromYAML r => FromYAML (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

parseYAML :: Node Pos -> Parser (Vector 4 r) Source #

(ToYAML r, HasComponents (Vector d r) (Vector d r)) => ToYAML (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

toYAML :: Vector d r -> Node () Source #

FromJSON r => FromJSON (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

FromJSON r => FromJSON (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

FromJSON r => FromJSON (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

FromJSON r => FromJSON (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

(ToJSON r, HasComponents (Vector d r) (Vector d r)) => ToJSON (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Generic (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 1 r) :: Type -> Type #

Methods

from :: Vector 1 r -> Rep (Vector 1 r) x #

to :: Rep (Vector 1 r) x -> Vector 1 r #

Generic (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 2 r) :: Type -> Type #

Methods

from :: Vector 2 r -> Rep (Vector 2 r) x #

to :: Rep (Vector 2 r) x -> Vector 2 r #

Generic (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 3 r) :: Type -> Type #

Methods

from :: Vector 3 r -> Rep (Vector 3 r) x #

to :: Rep (Vector 3 r) x -> Vector 3 r #

Generic (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Associated Types

type Rep (Vector 4 r) :: Type -> Type #

Methods

from :: Vector 4 r -> Rep (Vector 4 r) x #

to :: Rep (Vector 4 r) x -> Vector 4 r #

(Vector_ (Vector d r) d r, Read r, KnownNat d) => Read (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

(HasComponents (Vector d r) (Vector d r), Show r, KnownNat d) => Show (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

showsPrec :: Int -> Vector d r -> ShowS #

show :: Vector d r -> String #

showList :: [Vector d r] -> ShowS #

NFData r => NFData (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 1 r -> () #

NFData r => NFData (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 2 r -> () #

NFData r => NFData (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 3 r -> () #

NFData r => NFData (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

rnf :: Vector 4 r -> () #

Eq r => Eq (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 1 r -> Vector 1 r -> Bool #

(/=) :: Vector 1 r -> Vector 1 r -> Bool #

Eq r => Eq (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 2 r -> Vector 2 r -> Bool #

(/=) :: Vector 2 r -> Vector 2 r -> Bool #

Eq r => Eq (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 3 r -> Vector 3 r -> Bool #

(/=) :: Vector 3 r -> Vector 3 r -> Bool #

Eq r => Eq (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

(==) :: Vector 4 r -> Vector 4 r -> Bool #

(/=) :: Vector 4 r -> Vector 4 r -> Bool #

Ord r => Ord (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 1 r -> Vector 1 r -> Ordering #

(<) :: Vector 1 r -> Vector 1 r -> Bool #

(<=) :: Vector 1 r -> Vector 1 r -> Bool #

(>) :: Vector 1 r -> Vector 1 r -> Bool #

(>=) :: Vector 1 r -> Vector 1 r -> Bool #

max :: Vector 1 r -> Vector 1 r -> Vector 1 r #

min :: Vector 1 r -> Vector 1 r -> Vector 1 r #

Ord r => Ord (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 2 r -> Vector 2 r -> Ordering #

(<) :: Vector 2 r -> Vector 2 r -> Bool #

(<=) :: Vector 2 r -> Vector 2 r -> Bool #

(>) :: Vector 2 r -> Vector 2 r -> Bool #

(>=) :: Vector 2 r -> Vector 2 r -> Bool #

max :: Vector 2 r -> Vector 2 r -> Vector 2 r #

min :: Vector 2 r -> Vector 2 r -> Vector 2 r #

Ord r => Ord (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 3 r -> Vector 3 r -> Ordering #

(<) :: Vector 3 r -> Vector 3 r -> Bool #

(<=) :: Vector 3 r -> Vector 3 r -> Bool #

(>) :: Vector 3 r -> Vector 3 r -> Bool #

(>=) :: Vector 3 r -> Vector 3 r -> Bool #

max :: Vector 3 r -> Vector 3 r -> Vector 3 r #

min :: Vector 3 r -> Vector 3 r -> Vector 3 r #

Ord r => Ord (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

compare :: Vector 4 r -> Vector 4 r -> Ordering #

(<) :: Vector 4 r -> Vector 4 r -> Bool #

(<=) :: Vector 4 r -> Vector 4 r -> Bool #

(>) :: Vector 4 r -> Vector 4 r -> Bool #

(>=) :: Vector 4 r -> Vector 4 r -> Bool #

max :: Vector 4 r -> Vector 4 r -> Vector 4 r #

min :: Vector 4 r -> Vector 4 r -> Vector 4 r #

Ixed (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 1 r) -> Traversal' (Vector 1 r) (IxValue (Vector 1 r)) Source #

Ixed (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 2 r) -> Traversal' (Vector 2 r) (IxValue (Vector 2 r)) Source #

Ixed (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 3 r) -> Traversal' (Vector 3 r) (IxValue (Vector 3 r)) Source #

Ixed (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

Methods

ix :: Index (Vector 4 r) -> Traversal' (Vector 4 r) (IxValue (Vector 4 r)) Source #

(Additive_ (Vector d r) d r, Uniform r, UniformRange r) => Random (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

randomR :: RandomGen g => (Vector d r, Vector d r) -> g -> (Vector d r, g) Source #

random :: RandomGen g => g -> (Vector d r, g) Source #

randomRs :: RandomGen g => (Vector d r, Vector d r) -> g -> [Vector d r] Source #

randoms :: RandomGen g => g -> [Vector d r] Source #

(Vector_ (Vector d r) d r, Uniform r) => Uniform (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

uniformM :: StatefulGen g m => g -> m (Vector d r) Source #

(Additive_ (Vector d r) d r, UniformRange r) => UniformRange (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

uniformRM :: StatefulGen g m => (Vector d r, Vector d r) -> g -> m (Vector d r) Source #

(Unbox r, Vector_ (Vector d r) d r) => Unbox (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

Additive_ (Vector 1 r) 1 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 1 r -> Vector 1 r -> Vector 1 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 1 r -> Vector 1 r -> f (Vector 1 r) Source #

Additive_ (Vector 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 2 r -> Vector 2 r -> Vector 2 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 2 r -> Vector 2 r -> f (Vector 2 r) Source #

Additive_ (Vector 3 r) 3 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 3 r -> Vector 3 r -> Vector 3 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 3 r -> Vector 3 r -> f (Vector 3 r) Source #

Additive_ (Vector 4 r) 4 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

liftU2 :: (r -> r -> r) -> Vector 4 r -> Vector 4 r -> Vector 4 r Source #

liftI2A :: Apply f => (r -> r -> f r) -> Vector 4 r -> Vector 4 r -> f (Vector 4 r) Source #

Metric_ (Vector 1 r) 1 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 1 r -> Vector 1 r -> r Source #

quadrance :: Vector 1 r -> r Source #

qd :: Vector 1 r -> Vector 1 r -> r Source #

norm :: Vector 1 r -> r Source #

signorm :: Vector 1 r -> Vector 1 r Source #

Metric_ (Vector 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 2 r -> Vector 2 r -> r Source #

quadrance :: Vector 2 r -> r Source #

qd :: Vector 2 r -> Vector 2 r -> r Source #

norm :: Vector 2 r -> r Source #

signorm :: Vector 2 r -> Vector 2 r Source #

Metric_ (Vector 3 r) 3 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 3 r -> Vector 3 r -> r Source #

quadrance :: Vector 3 r -> r Source #

qd :: Vector 3 r -> Vector 3 r -> r Source #

norm :: Vector 3 r -> r Source #

signorm :: Vector 3 r -> Vector 3 r Source #

Metric_ (Vector 4 r) 4 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

dot :: Vector 4 r -> Vector 4 r -> r Source #

quadrance :: Vector 4 r -> r Source #

qd :: Vector 4 r -> Vector 4 r -> r Source #

norm :: Vector 4 r -> r Source #

signorm :: Vector 4 r -> Vector 4 r Source #

Vector_ (Vector 1 r) 1 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 1 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 1 r) r Source #

Vector_ (Vector 2 r) 2 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 2 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 2 r) r Source #

Vector_ (Vector 3 r) 3 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 3 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 3 r) r Source #

Vector_ (Vector 4 r) 4 r Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

generateA :: Applicative f => (Int -> f r) -> f (Vector 4 r) Source #

component' :: Int -> IndexedTraversal' Int (Vector 4 r) r Source #

HasComponents (Vector 1 r) (Vector 1 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

HasComponents (Vector 2 r) (Vector 2 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

HasComponents (Vector 3 r) (Vector 3 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

HasComponents (Vector 4 r) (Vector 4 s) Source # 
Instance details

Defined in HGeometry.Vector.Type

AsVector_ (Vector d r) (Vector d s) d r s Source # 
Instance details

Defined in HGeometry.Vector.Class

Methods

_Vector :: Iso (Vector d r) (Vector d s) (Vector d r) (Vector d s) Source #

newtype Vector 1 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 1 r = MkVector1 (V1 r)
newtype Vector 2 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 2 r = MkVector2 (V2 r)
newtype Vector 3 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 3 r = MkVector3 (V3 r)
newtype Vector 4 r Source # 
Instance details

Defined in HGeometry.Vector.Type

newtype Vector 4 r = MkVector4 (V4 r)
newtype MVector s (Vector d r) Source #

elements of the vector are stored consecutively

Instance details

Defined in HGeometry.Vector

newtype MVector s (Vector d r) = MV_VectorD (MVector s r)
type Rep (Vector 1 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 1 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V1 r))))
type Rep (Vector 2 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 2 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V2 r))))
type Rep (Vector 3 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 3 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V3 r))))
type Rep (Vector 4 r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Rep (Vector 4 r) = D1 ('MetaData "Vector" "HGeometry.Vector.Type" "hgeometry-1.0.0.0-inplace-vector" 'True) (C1 ('MetaCons "MkVector4" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (V4 r))))
type Dimension (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Dimension (Vector d r) = d
type NumType (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type NumType (Vector d r) = r
type Index (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type Index (Vector d r) = Int
type IxValue (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector.Type

type IxValue (Vector d r) = r
newtype Vector (Vector d r) Source # 
Instance details

Defined in HGeometry.Vector

newtype Vector (Vector d r) = V_VectorD (Vector r)

class HasComponents vector vector' where Source #

Types that have a components indexed traversal

Methods

components :: IndexedTraversal1 Int vector vector' (IxValue vector) (IxValue vector') Source #

An Indexed Traversal over the components of a vector

>>> myVec3 ^.. components
 [1,2,3]
 >>> myVec3 ^@.. components
 [(0,1),(1,2),(2,3)]
@@ -25,4 +25,4 @@
 >>> Vector3 0 0 0 `isScalarMultipleOf` Vector3 4 0 5
 True
 

scalarMultiple :: (Eq r, Fractional r, Additive_ vector d r) => vector -> vector -> Maybe r Source #

scalarMultiple u v computes the scalar labmda s.t. v = lambda * u (if it exists)

sameDirection :: (Additive_ vector d r, Num r, Eq r) => vector -> vector -> Bool Source #

Given two colinar vectors, u and v, test if they point in the same direction, i.e. - iff scalarMultiple' u v == Just lambda, with lambda > 0

pre: u and v are colinear, u and v are non-zero

Special vector operations

cross :: Num r => Vector 3 r -> Vector 3 r -> Vector 3 r Source #

cross product

Orphan instances

(Vector Vector r, Vector_ (Vector d r) d r) => Vector Vector (Vector d r) Source # 
Instance details

(MVector MVector r, Vector_ (Vector d r) d r) => MVector MVector (Vector d r) Source # 
Instance details

Methods

basicLength :: MVector s (Vector d r) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (Vector d r) -> MVector s (Vector d r) Source #

basicOverlaps :: MVector s (Vector d r) -> MVector s (Vector d r) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (Vector d r)) Source #

basicInitialize :: MVector s (Vector d r) -> ST s () Source #

basicUnsafeReplicate :: Int -> Vector d r -> ST s (MVector s (Vector d r)) Source #

basicUnsafeRead :: MVector s (Vector d r) -> Int -> ST s (Vector d r) Source #

basicUnsafeWrite :: MVector s (Vector d r) -> Int -> Vector d r -> ST s () Source #

basicClear :: MVector s (Vector d r) -> ST s () Source #

basicSet :: MVector s (Vector d r) -> Vector d r -> ST s () Source #

basicUnsafeCopy :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeMove :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeGrow :: MVector s (Vector d r) -> Int -> ST s (MVector s (Vector d r)) Source #

(Unbox r, Vector_ (Vector d r) d r) => Unbox (Vector d r) Source # 
Instance details

\ No newline at end of file + iff scalarMultiple' u v == Just lambda, with lambda > 0

pre: u and v are colinear, u and v are non-zero

Special vector operations

cross :: Num r => Vector 3 r -> Vector 3 r -> Vector 3 r Source #

cross product

Orphan instances

(Vector Vector r, Vector_ (Vector d r) d r) => Vector Vector (Vector d r) Source # 
Instance details

(MVector MVector r, Vector_ (Vector d r) d r) => MVector MVector (Vector d r) Source # 
Instance details

Methods

basicLength :: MVector s (Vector d r) -> Int Source #

basicUnsafeSlice :: Int -> Int -> MVector s (Vector d r) -> MVector s (Vector d r) Source #

basicOverlaps :: MVector s (Vector d r) -> MVector s (Vector d r) -> Bool Source #

basicUnsafeNew :: Int -> ST s (MVector s (Vector d r)) Source #

basicInitialize :: MVector s (Vector d r) -> ST s () Source #

basicUnsafeReplicate :: Int -> Vector d r -> ST s (MVector s (Vector d r)) Source #

basicUnsafeRead :: MVector s (Vector d r) -> Int -> ST s (Vector d r) Source #

basicUnsafeWrite :: MVector s (Vector d r) -> Int -> Vector d r -> ST s () Source #

basicClear :: MVector s (Vector d r) -> ST s () Source #

basicSet :: MVector s (Vector d r) -> Vector d r -> ST s () Source #

basicUnsafeCopy :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeMove :: MVector s (Vector d r) -> MVector s (Vector d r) -> ST s () Source #

basicUnsafeGrow :: MVector s (Vector d r) -> Int -> ST s (MVector s (Vector d r)) Source #

(Unbox r, Vector_ (Vector d r) d r) => Unbox (Vector d r) Source # 
Instance details

\ No newline at end of file diff --git a/haddocks/hgeometry/vector/src/HGeometry.Properties.html b/haddocks/hgeometry/vector/src/HGeometry.Properties.html index 010c4a403..3c21aa42c 100644 --- a/haddocks/hgeometry/vector/src/HGeometry.Properties.html +++ b/haddocks/hgeometry/vector/src/HGeometry.Properties.html @@ -25,26 +25,26 @@ -- | A type family for types that are associated with a dimension. The -- dimension is the dimension of the geometry they are embedded in. -type family Dimension t :: Nat +type family Dimension t :: Nat -- | A type family for types that have an associated numeric type. -type family NumType t :: Type +type family NumType t :: Type -------------------------------------------------------------------------------- -type instance NumType (core :+ extra) = NumType core -type instance Dimension (core :+ extra) = Dimension core +type instance NumType (core :+ extra) = NumType core +type instance Dimension (core :+ extra) = Dimension core -type instance NumType [t] = NumType t -type instance Dimension [t] = Dimension t +type instance NumType [t] = NumType t +type instance Dimension [t] = Dimension t -- type instance NumType (Range a) = a -type instance Dimension (NonEmpty g) = Dimension g -type instance NumType (NonEmpty g) = NumType g +type instance Dimension (NonEmpty g) = Dimension g +type instance NumType (NonEmpty g) = NumType g -type instance NumType (Maybe a) = NumType a -type instance Dimension (Maybe a) = Dimension a +type instance NumType (Maybe a) = NumType a +type instance Dimension (Maybe a) = Dimension a -type instance NumType (Either l r) = NumType r +type instance NumType (Either l r) = NumType r \ No newline at end of file diff --git a/haddocks/hgeometry/vector/src/HGeometry.Vector.Class.html b/haddocks/hgeometry/vector/src/HGeometry.Vector.Class.html index c88fc2f0e..a52a21780 100644 --- a/haddocks/hgeometry/vector/src/HGeometry.Vector.Class.html +++ b/haddocks/hgeometry/vector/src/HGeometry.Vector.Class.html @@ -92,18 +92,18 @@ -} -- | Types that can be converted to and from our canonical 'Vector d r' type -class ( r ~ IxValue vector - , s ~ IxValue vector' - , d ~ Dimension vector - , d ~ Dimension vector' - ) => AsVector_ vector vector' d r s | vector -> d - , vector -> r - , vector' -> s where +class ( r ~ IxValue vector + , s ~ IxValue vector' + , d ~ Dimension vector + , d ~ Dimension vector' + ) => AsVector_ vector vector' d r s | vector -> d + , vector -> r + , vector' -> s where -- | Convert from a 'Vector d r' and into a 'Vector d s' - _Vector :: Iso vector vector' (Vector d r) (Vector d s) + _Vector :: Iso vector vector' (Vector d r) (Vector d s) -instance AsVector_ (Vector d r) (Vector d s) d r s where - _Vector :: Iso (Vector d r) (Vector d s) (Vector d r) (Vector d s) +instance AsVector_ (Vector d r) (Vector d s) d r s where + _Vector :: Iso (Vector d r) (Vector d s) (Vector d r) (Vector d s) _Vector = p (Vector d r) (f (Vector d s)) -> p (Vector d r) (f (Vector d s)) forall a. a -> a id @@ -126,21 +126,21 @@ -- {-# INLINE _Vector' #-} -- | Class for representing d dimensional vectors. -class ( HasComponents vector vector - , AsVector_ vector vector d r r - , KnownNat d - ) => Vector_ vector d r where +class ( HasComponents vector vector + , AsVector_ vector vector d r r + , KnownNat d + ) => Vector_ vector d r where {-# MINIMAL generateA #-} -- | Generates a vector from an Applicative operation (that takes the -- index) - generateA :: Applicative f => (Int -> f r) -> f vector + generateA :: Applicative f => (Int -> f r) -> f vector -- | traversal to access the i^th coordinate. - component' :: Int -> IndexedTraversal' Int vector r - default component' :: (Index vector ~ Int, Ixed vector) - => Int -> IndexedTraversal' Int vector r - component' = Int -> IndexedTraversal' Int vector r + component' :: Int -> IndexedTraversal' Int vector r + default component' :: (Index vector ~ Int, Ixed vector) + => Int -> IndexedTraversal' Int vector r + component' = Int -> IndexedTraversal' Int vector r Index vector -> IndexedTraversal' (Index vector) vector (IxValue vector) forall m. @@ -150,17 +150,17 @@ {-# INLINE component' #-} -- | Specifies that we have an appropriate constraint for the vector implementation -type Has_ c d r = c (Vector d r) d r +type Has_ c d r = c (Vector d r) d r ---------------------------------------- -- | Generate a vector from a given function. -generate :: Vector_ vector d r => (Int -> r) -> vector +generate :: Vector_ vector d r => (Int -> r) -> vector generate :: forall vector (d :: Nat) r. Vector_ vector d r => (Int -> r) -> vector -generate Int -> r -f = Identity vector -> vector +generate Int -> r +f = Identity vector -> vector forall a. Identity a -> a runIdentity (Identity vector -> vector) -> Identity vector -> vector forall a b. (a -> b) -> a -> b @@ -174,7 +174,7 @@ Identity (r -> Identity r) -> (Int -> r) -> Int -> Identity r forall b c a. (b -> c) -> (a -> b) -> a -> c . Int -> r -f) +f) {-# INLINE generate #-} -- | Convert a list of exactly d elements into a vector with dimension d. @@ -185,7 +185,7 @@ -- Nothing -- >>> vectorFromList [10,2] :: Maybe (Vector 3 Int) -- Nothing -vectorFromList :: Vector_ vector d r => [r] -> Maybe vector +vectorFromList :: Vector_ vector d r => [r] -> Maybe vector vectorFromList :: forall vector (d :: Nat) r. Vector_ vector d r => [r] -> Maybe vector @@ -194,17 +194,17 @@ evalStateT (StateT [r] Maybe vector -> [r] -> Maybe vector) -> StateT [r] Maybe vector -> [r] -> Maybe vector forall a b. (a -> b) -> a -> b -$ do vector -v <- (Int -> StateT [r] Maybe r) -> StateT [r] Maybe vector +$ do vector +v <- (Int -> StateT [r] Maybe r) -> StateT [r] Maybe vector forall vector (d :: Nat) r (f :: * -> *). (Vector_ vector d r, Applicative f) => (Int -> f r) -> f vector forall (f :: * -> *). Applicative f => (Int -> f r) -> f vector generateA Int -> StateT [r] Maybe r forall r. Int -> StateT [r] Maybe r -next - [r] -rest <- StateT [r] Maybe [r] +next + [r] +rest <- StateT [r] Maybe [r] forall s (m :: * -> *). MonadState s m => m s get Bool -> StateT [r] Maybe () @@ -213,18 +213,18 @@ forall a. [a] -> Bool forall (t :: * -> *) a. Foldable t => t a -> Bool null [r] -rest) +rest) vector -> StateT [r] Maybe vector forall a. a -> StateT [r] Maybe a forall (f :: * -> *) a. Applicative f => a -> f a pure vector -v +v where -- Note that this depends on the specific order in which we evaluate -- elements in generateA, so arguably this is somewhat dangerous. - next :: Int -> StateT [r] Maybe r - next :: forall r. Int -> StateT [r] Maybe r -next Int + next :: Int -> StateT [r] Maybe r + next :: forall r. Int -> StateT [r] Maybe r +next Int _ = StateT [r] Maybe [r] forall s (m :: * -> *). MonadState s m => m s get StateT [r] Maybe [r] @@ -239,17 +239,17 @@ forall (m :: * -> *) a. MonadFail m => String -> m a fail String "vectorFromList: no next element" - r -x:[r] -xs -> do [r] -> StateT [r] Maybe () + r +x:[r] +xs -> do [r] -> StateT [r] Maybe () forall s (m :: * -> *). MonadState s m => s -> m () put [r] -xs +xs r -> StateT [r] Maybe r forall a. a -> StateT [r] Maybe a forall (f :: * -> *) a. Applicative f => a -> f a pure r -x +x {-# INLINE vectorFromList #-} -- -- | Construct a vector from a list of exactly d components. Crashes @@ -270,9 +270,9 @@ -- Vector3 1 10 3 -- >>> myVec2 & component @1 %~ (*5) -- Vector2 10 100 -component :: forall i vector r d. - (i <= d-1, KnownNat i, Vector_ vector d r) - => IndexedLens' Int vector r +component :: forall i vector r d. + (i <= d-1, KnownNat i, Vector_ vector d r) + => IndexedLens' Int vector r component :: forall (i :: Nat) vector r (d :: Nat). (i <= (d - 1), KnownNat i, Vector_ vector d r) => IndexedLens' Int vector r @@ -297,7 +297,7 @@ forall a b. (a -> b) -> a -> b $ forall (t :: Nat). Proxy t forall {k} (t :: k). Proxy t -Proxy @i) +Proxy @i) {-# INLINE component #-} -- | Shorthand for accessing the x-component @@ -306,8 +306,8 @@ -- 1 -- >>> Vector2 1 2 & xComponent .~ 10 -- Vector2 10 2 -xComponent :: (Vector_ vector d r, 1 <= d) - => IndexedLens' Int vector r +xComponent :: (Vector_ vector d r, 1 <= d) + => IndexedLens' Int vector r xComponent :: forall vector (d :: Nat) r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r @@ -323,8 +323,8 @@ -- 2 -- >>> Vector2 1 2 & yComponent .~ 10 -- Vector2 1 10 -yComponent :: (Vector_ vector d r, 2 <= d) - => IndexedLens' Int vector r +yComponent :: (Vector_ vector d r, 2 <= d) + => IndexedLens' Int vector r yComponent :: forall vector (d :: Nat) r. (Vector_ vector d r, 2 <= d) => IndexedLens' Int vector r @@ -340,8 +340,8 @@ -- 3 -- >>> Vector3 1 2 3 & zComponent .~ 10 -- Vector3 1 2 10 -zComponent :: (Vector_ vector d r, 3 <= d) - => IndexedLens' Int vector r +zComponent :: (Vector_ vector d r, 3 <= d) + => IndexedLens' Int vector r zComponent :: forall vector (d :: Nat) r. (Vector_ vector d r, 3 <= d) => IndexedLens' Int vector r @@ -357,8 +357,8 @@ -- 4 -- >>> Vector4 1 2 3 4 & wComponent .~ 10 -- Vector4 1 2 3 10 -wComponent :: (Vector_ vector d r, 4 <= d) - => IndexedLens' Int vector r +wComponent :: (Vector_ vector d r, 4 <= d) + => IndexedLens' Int vector r wComponent :: forall vector (d :: Nat) r. (Vector_ vector d r, 4 <= d) => IndexedLens' Int vector r @@ -369,7 +369,7 @@ {-# INLINE wComponent #-} -- | Lens to access the first element of the vector -head :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r +head :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r head :: forall vector (d :: Nat) r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r @@ -381,14 +381,14 @@ xComponent -- | Lens to access the last element of the vector -last :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r +last :: forall vector d r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r last :: forall vector (d :: Nat) r. (Vector_ vector d r, 1 <= d) => IndexedLens' Int vector r last = forall (i :: Nat) vector r (d :: Nat). (i <= (d - 1), KnownNat i, Vector_ vector d r) => IndexedLens' Int vector r -component @(d-1) +component @(d-1) -------------------------------------------------------------------------------- @@ -396,46 +396,46 @@ -- -- >>> prefix myVec3 :: Vector 2 Int -- Vector2 1 2 -prefix :: forall i d vector vector' r. ( i <= d - , Vector_ vector d r - , Vector_ vector' i r +prefix :: forall i d vector vector' r. ( i <= d + , Vector_ vector d r + , Vector_ vector' i r ) - => vector -> vector' + => vector -> vector' prefix :: forall (i :: Nat) (d :: Nat) vector vector' r. (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector' -prefix vector -v = (Int -> r) -> vector' +prefix vector +v = (Int -> r) -> vector' forall vector (d :: Nat) r. Vector_ vector d r => (Int -> r) -> vector -generate (\Int -i -> vector -vvector -> Getting (Endo r) vector r -> r +generate (\Int +i -> vector +vvector -> Getting (Endo r) vector r -> r forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!Int -> IndexedTraversal' Int vector r forall vector (d :: Nat) r. Vector_ vector d r => Int -> IndexedTraversal' Int vector r component' Int -i) +i) {-# INLINE prefix #-} -- | Take a suffix of length i of the vector -- -- >>> suffix @_ @_ @_ @(Vector 2 Int) myVec3 -- Vector2 2 3 -suffix :: forall i d vector vector' r. ( i <= d - , Vector_ vector d r - , Vector_ vector' i r +suffix :: forall i d vector vector' r. ( i <= d + , Vector_ vector d r + , Vector_ vector' i r ) - => vector -> vector' + => vector -> vector' suffix :: forall (i :: Nat) (d :: Nat) vector vector' r. (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector' -suffix vector -v = let d :: Int -d = Nat -> Int +suffix vector +v = let d :: Int +d = Nat -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral (Nat -> Int) -> (Proxy d -> Nat) -> Proxy d -> Int forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -445,10 +445,10 @@ forall a b. (a -> b) -> a -> b $ forall (t :: Nat). Proxy t forall {k} (t :: k). Proxy t -Proxy @d - s :: Int -s = Int -d Int -> Int -> Int +Proxy @d + s :: Int +s = Int +d Int -> Int -> Int forall a. Num a => a -> a -> a - (Nat -> Int forall a b. (Integral a, Num b) => a -> b @@ -460,45 +460,45 @@ forall a b. (a -> b) -> a -> b $ forall (t :: Nat). Proxy t forall {k} (t :: k). Proxy t -Proxy @i) +Proxy @i) in (Int -> r) -> vector' forall vector (d :: Nat) r. Vector_ vector d r => (Int -> r) -> vector generate ((Int -> r) -> vector') -> (Int -> r) -> vector' forall a b. (a -> b) -> a -> b -$ (\Int -j -> vector -vvector -> Getting (Endo r) vector r -> r +$ (\Int +j -> vector +vvector -> Getting (Endo r) vector r -> r forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!Int -> IndexedTraversal' Int vector r forall vector (d :: Nat) r. Vector_ vector d r => Int -> IndexedTraversal' Int vector r component' (Int -sInt -> Int -> Int +sInt -> Int -> Int forall a. Num a => a -> a -> a +Int -j)) +j)) {-# INLINE suffix #-} -------------------------------------------------------------------------------- -- | Class that supports additive opreations on vectors -class Vector_ vector d r => Additive_ vector d r where +class Vector_ vector d r => Additive_ vector d r where -- | Apply a function to merge the 'non-zero' components of two -- vectors, unioning the rest of the values. - liftU2 :: (r -> r -> r) -> vector -> vector -> vector + liftU2 :: (r -> r -> r) -> vector -> vector -> vector -- | Apply an Applicative function to the components of two vectors. - liftI2A :: Apply.Apply f => (r -> r -> f r) -> vector -> vector -> f vector + liftI2A :: Apply.Apply f => (r -> r -> f r) -> vector -> vector -> f vector ---------------------------------------- infixl 6 ^+^, ^-^ infixl 7 ^*, *^, ^/ -- | zero vector -zero :: (Num r, Additive_ vector d r) => vector +zero :: (Num r, Additive_ vector d r) => vector zero :: forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector zero = (Int -> r) -> vector forall vector (d :: Nat) r. @@ -511,32 +511,32 @@ {-# INLINE zero #-} -- | add two vectors -(^+^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector -vector -u ^+^ :: forall r vector (d :: Nat). +(^+^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector +vector +u ^+^ :: forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector -^+^ vector -v = (r -> r -> r) -> vector -> vector -> vector +^+^ vector +v = (r -> r -> r) -> vector -> vector -> vector forall vector (d :: Nat) r. Additive_ vector d r => (r -> r -> r) -> vector -> vector -> vector liftU2 r -> r -> r forall a. Num a => a -> a -> a (+) vector -u vector -v +u vector +v {-# INLINE (^+^) #-} -- | subtract vectors -(^-^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector -vector -u ^-^ :: forall r vector (d :: Nat). +(^-^) :: (Num r, Additive_ vector d r) => vector -> vector -> vector +vector +u ^-^ :: forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector -^-^ vector -v = vector -u vector -> vector -> vector +^-^ vector +v = vector +u vector -> vector -> vector forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector @@ -545,24 +545,24 @@ (Num r, Vector_ vector d r) => vector -> vector negated vector -v +v {-# INLINE (^-^) #-} -- | Linearly interpolate between the two vectors -lerp :: (Num r, Additive_ vector d r) => r -> vector -> vector -> vector +lerp :: (Num r, Additive_ vector d r) => r -> vector -> vector -> vector lerp :: forall r vector (d :: Nat). (Num r, Additive_ vector d r) => r -> vector -> vector -> vector -lerp r -alpha vector -u vector -v = r -alpha r -> vector -> vector +lerp r +alpha vector +u vector +v = r +alpha r -> vector -> vector forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ vector -u vector -> vector -> vector +u vector -> vector -> vector forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector @@ -570,23 +570,23 @@ 1r -> r -> r forall a. Num a => a -> a -> a -r -alpha) r -> vector -> vector +alpha) r -> vector -> vector forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ vector -v +v {-# INLINE lerp #-} -- | Apply a function to the components of two vectors. -liftI2 :: Additive_ vector d r => (r -> r -> r) -> vector -> vector -> vector +liftI2 :: Additive_ vector d r => (r -> r -> r) -> vector -> vector -> vector liftI2 :: forall vector (d :: Nat) r. Additive_ vector d r => (r -> r -> r) -> vector -> vector -> vector -liftI2 r -> r -> r -f vector -u vector -v = Identity vector -> vector +liftI2 r -> r -> r +f vector +u vector +v = Identity vector -> vector forall a. Identity a -> a runIdentity (Identity vector -> vector) -> Identity vector -> vector forall a b. (a -> b) -> a -> b @@ -597,18 +597,18 @@ forall (f :: * -> *). Apply f => (r -> r -> f r) -> vector -> vector -> f vector -liftI2A (\r -x r -x' -> r -> Identity r +liftI2A (\r +x r +x' -> r -> Identity r forall a. a -> Identity a Identity (r -> Identity r) -> r -> Identity r forall a b. (a -> b) -> a -> b $ r -> r -> r -f r -x r -x') vector -u vector -v +f r +x r +x') vector +u vector +v {-# INLINE liftI2 #-} -- | "zip through the two vectors", folding over the result. @@ -618,15 +618,15 @@ -- >>> let myDot u v = getSum $ foldMapZip (\x x' -> Sum $ x * x') u v -- >>> myDot (Vector3 1 2 3) (Vector3 10 20 30) -- 140 -foldMapZip :: (Additive_ vector d r, Semigroup m) - => (r -> r -> m) -> vector -> vector -> m +foldMapZip :: (Additive_ vector d r, Semigroup m) + => (r -> r -> m) -> vector -> vector -> m foldMapZip :: forall vector (d :: Nat) r m. (Additive_ vector d r, Semigroup m) => (r -> r -> m) -> vector -> vector -> m -foldMapZip r -> r -> m -f vector -u vector -v = Const m vector -> m +foldMapZip r -> r -> m +f vector +u vector +v = Const m vector -> m forall {k} a (b :: k). Const a b -> a getConst (Const m vector -> m) -> Const m vector -> m forall a b. (a -> b) -> a -> b @@ -637,22 +637,22 @@ forall (f :: * -> *). Apply f => (r -> r -> f r) -> vector -> vector -> f vector -liftI2A (\r -x r -x' -> m -> Const m r +liftI2A (\r +x r +x' -> m -> Const m r forall {k} a (b :: k). a -> Const a b Const (m -> Const m r) -> m -> Const m r forall a b. (a -> b) -> a -> b $ r -> r -> m -f r -x r -x') vector -u vector -v +f r +x r +x') vector +u vector +v {-# INLINE foldMapZip #-} -- | unit vector -unit :: forall vector d r. (Additive_ vector d r, Num r) => vector +unit :: forall vector d r. (Additive_ vector d r, Num r) => vector unit :: forall vector (d :: Nat) r. (Additive_ vector d r, Num r) => vector unit = ASetter vector vector r r -> (r -> r) -> vector -> vector forall s t a b. ASetter s t a b -> (a -> b) -> s -> t @@ -660,7 +660,7 @@ HasComponents vector vector' => IndexedTraversal1 Int vector vector' (IxValue vector) (IxValue vector') -components @vector @vector) (r -> r -> r +components @vector @vector) (r -> r -> r forall a b. a -> b -> a const r 1) vector @@ -669,7 +669,7 @@ {-# INLINE unit #-} -- | negate v -negated :: (Num r, Vector_ vector d r) => vector -> vector +negated :: (Num r, Vector_ vector d r) => vector -> vector negated :: forall r vector (d :: Nat). (Num r, Vector_ vector d r) => vector -> vector @@ -678,13 +678,13 @@ {-# INLINABLE negated #-} -- | left scalar multiplication -(*^) :: (Num r, Vector_ vector d r) => r -> vector -> vector -r -s *^ :: forall r vector (d :: Nat). +(*^) :: (Num r, Vector_ vector d r) => r -> vector -> vector +r +s *^ :: forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector -*^ vector -v = ASetter vector vector r r -> (r -> r) -> vector -> vector +*^ vector +v = ASetter vector vector r r -> (r -> r) -> vector -> vector forall s t a b. ASetter s t a b -> (a -> b) -> s -> t over ASetter vector vector r r (IxValue vector -> Identity (IxValue vector)) @@ -696,35 +696,35 @@ IndexedTraversal1 Int vector vector (IxValue vector) (IxValue vector) components (r -s*) vector -v +s*) vector +v {-# INLINABLE (*^) #-} -- | right scalar multiplication -(^*) :: (Num r, Vector_ vector d r) => vector -> r -> vector -vector -v ^* :: forall r vector (d :: Nat). +(^*) :: (Num r, Vector_ vector d r) => vector -> r -> vector +vector +v ^* :: forall r vector (d :: Nat). (Num r, Vector_ vector d r) => vector -> r -> vector -^* r -s = r -s r -> vector -> vector +^* r +s = r +s r -> vector -> vector forall r vector (d :: Nat). (Num r, Vector_ vector d r) => r -> vector -> vector *^ vector -v +v {-# INLINABLE (^*) #-} -- | scalar division -(^/) :: (Vector_ vector d r, Fractional r) => vector -> r -> vector -vector -v ^/ :: forall vector (d :: Nat) r. +(^/) :: (Vector_ vector d r, Fractional r) => vector -> r -> vector +vector +v ^/ :: forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector -^/ r -s = vector -v vector -> r -> vector +^/ r +s = vector +v vector -> r -> vector forall r vector (d :: Nat). (Num r, Vector_ vector d r) => vector -> r -> vector @@ -732,11 +732,11 @@ 1r -> r -> r forall a. Fractional a => a -> a -> a /r -s) +s) {-# INLINABLE (^/) #-} -- | sum a collection of vectors. -sumV :: (Foldable f, Additive_ vector d r, Num r) => f vector -> vector +sumV :: (Foldable f, Additive_ vector d r, Num r) => f vector -> vector sumV :: forall (f :: * -> *) vector (d :: Nat) r. (Foldable f, Additive_ vector d r, Num r) => f vector -> vector @@ -756,7 +756,7 @@ -- | Produce a default basis for a vector space. If the dimensionality -- of the vector space is not statically known, see 'basisFor'. -basis :: (Additive_ vector d r, Num r) => [vector] +basis :: (Additive_ vector d r, Num r) => [vector] basis :: forall vector (d :: Nat) r. (Additive_ vector d r, Num r) => [vector] @@ -771,12 +771,12 @@ -- | Produce a default basis for a vector space from which the -- argument is drawn. -basisFor :: (Additive_ vector d r, Num r) => vector -> [vector] +basisFor :: (Additive_ vector d r, Num r) => vector -> [vector] basisFor :: forall vector (d :: Nat) r. (Additive_ vector d r, Num r) => vector -> [vector] -basisFor = \vector -t -> +basisFor = \vector +t -> IndexedGetting Int [vector] vector r -> (Int -> r -> [vector]) -> vector -> [vector] forall i m s a. IndexedGetting i m s a -> (i -> a -> m) -> s -> m @@ -793,11 +793,11 @@ -> vector -> (Int -> r -> [vector]) -> [vector] forall (f :: * -> *) a b. Functor f => f (a -> b) -> a -> f b ?? vector -t ((Int -> r -> [vector]) -> [vector]) +t ((Int -> r -> [vector]) -> [vector]) -> (Int -> r -> [vector]) -> [vector] forall a b. (a -> b) -> a -> b -$ \Int -i r +$ \Int +i r _ -> vector -> [vector] forall a. a -> [a] @@ -822,16 +822,16 @@ -> vector -> (Int -> r -> r) -> vector forall (f :: * -> *) a b. Functor f => f (a -> b) -> a -> f b ?? vector -t ((Int -> r -> r) -> vector) -> (Int -> r -> r) -> vector +t ((Int -> r -> r) -> vector) -> (Int -> r -> r) -> vector forall a b. (a -> b) -> a -> b -$ \Int -j r +$ \Int +j r _ -> if Int -i Int -> Int -> Bool +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -j then r +j then r 1 else r 0 {-# INLINABLE basisFor #-} @@ -844,15 +844,15 @@ -- -- Note that we do not define a distance itself, and that norm and -- signorm have a Radical constraint rather than Floating. -class Additive_ vector d r => Metric_ vector d r where +class Additive_ vector d r => Metric_ vector d r where {-# MINIMAL #-} -- | Compute the inner product of two vectors or (equivalently) -- convert a vector f a into a covector f a -> a. - dot :: Num r => vector -> vector -> r - dot vector -u vector -v = Getting (Endo (Endo r)) vector r -> vector -> r + dot :: Num r => vector -> vector -> r + dot vector +u vector +v = Getting (Endo (Endo r)) vector r -> vector -> r forall a s. Num a => Getting (Endo (Endo a)) s a -> s -> a sumOf Getting (Endo (Endo r)) vector r (IxValue vector -> Const (Endo (Endo r)) (IxValue vector)) @@ -872,48 +872,48 @@ liftI2 r -> r -> r forall a. Num a => a -> a -> a (*) vector -u vector -v +u vector +v {-# INLINE dot #-} -- | Compute the squared norm. The name quadrance arises from Norman -- J. Wildberger's rational trigonometry. - quadrance :: Num r => vector -> r - quadrance vector -v = vector -> vector -> r + quadrance :: Num r => vector -> r + quadrance vector +v = vector -> vector -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> vector -> r dot vector -v vector -v +v vector +v {-# INLINE quadrance #-} -- | Compute the quadrance of the difference - qd :: Num r => vector -> vector -> r - qd vector -u vector -v = vector -> r + qd :: Num r => vector -> vector -> r + qd vector +u vector +v = vector -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> r quadrance (vector -> r) -> vector -> r forall a b. (a -> b) -> a -> b $ vector -u vector -> vector -> vector +u vector -> vector -> vector forall r vector (d :: Nat). (Num r, Additive_ vector d r) => vector -> vector -> vector ^-^ vector -v +v {-# INLINE qd #-} -- -- | Compute the distance between two vectors in a metric space -- distance :: Radical r => vector -> vector -> IxValue vector -- | Compute the norm of a vector in a metric space - norm :: Radical.Radical r => vector -> r - norm = r -> r + norm :: Radical.Radical r => vector -> r + norm = r -> r forall r. Radical r => r -> r Radical.sqrt (r -> r) -> (vector -> r) -> vector -> r forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -925,12 +925,12 @@ {-# INLINE norm #-} -- | Convert a non-zero vector to unit vector. - signorm :: ( Radical.Radical r - , Fractional r - ) => vector -> vector - signorm vector -v = vector -v vector -> r -> vector + signorm :: ( Radical.Radical r + , Fractional r + ) => vector -> vector + signorm vector +v = vector +v vector -> r -> vector forall vector (d :: Nat) r. (Vector_ vector d r, Fractional r) => vector -> r -> vector @@ -939,21 +939,21 @@ (Metric_ vector d r, Radical r) => vector -> r norm vector -v +v {-# INLINE signorm #-} -------------------------------------------------------------------------------- -instance ( Additive_ (Vector d r) d r - , UniformRange r - ) => UniformRange (Vector d r) where - uniformRM :: forall g (m :: * -> *). +instance ( Additive_ (Vector d r) d r + , UniformRange r + ) => UniformRange (Vector d r) where + uniformRM :: forall g (m :: * -> *). StatefulGen g m => (Vector d r, Vector d r) -> g -> m (Vector d r) -uniformRM (Vector d r -lows,Vector d r -highs) g -gen = WrappedApplicative m (Vector d r) -> m (Vector d r) +uniformRM (Vector d r +lows,Vector d r +highs) g +gen = WrappedApplicative m (Vector d r) -> m (Vector d r) forall (f :: * -> *) a. WrappedApplicative f a -> f a Apply.unwrapApplicative (WrappedApplicative m (Vector d r) -> m (Vector d r)) -> WrappedApplicative m (Vector d r) -> m (Vector d r) @@ -967,9 +967,9 @@ forall (f :: * -> *). Apply f => (r -> r -> f r) -> Vector d r -> Vector d r -> f (Vector d r) -liftI2A (\r -l r -h -> m r -> WrappedApplicative m r +liftI2A (\r +l r +h -> m r -> WrappedApplicative m r forall (f :: * -> *) a. f a -> WrappedApplicative f a Apply.WrapApplicative (m r -> WrappedApplicative m r) -> m r -> WrappedApplicative m r forall a b. (a -> b) -> a -> b @@ -979,16 +979,16 @@ (a, a) -> g -> m a forall g (m :: * -> *). StatefulGen g m => (r, r) -> g -> m r uniformRM (r -l,r -h) g -gen) Vector d r -lows Vector d r -highs +l,r +h) g +gen) Vector d r +lows Vector d r +highs -instance (Vector_ (Vector d r) d r, Uniform r) => Uniform (Vector d r) where - uniformM :: forall g (m :: * -> *). StatefulGen g m => g -> m (Vector d r) -uniformM g -gen = (Int -> m r) -> m (Vector d r) +instance (Vector_ (Vector d r) d r, Uniform r) => Uniform (Vector d r) where + uniformM :: forall g (m :: * -> *). StatefulGen g m => g -> m (Vector d r) +uniformM g +gen = (Int -> m r) -> m (Vector d r) forall vector (d :: Nat) r (f :: * -> *). (Vector_ vector d r, Applicative f) => (Int -> f r) -> f vector @@ -1003,42 +1003,42 @@ forall a g (m :: * -> *). (Uniform a, StatefulGen g m) => g -> m a forall g (m :: * -> *). StatefulGen g m => g -> m r uniformM g -gen) -instance (Additive_ (Vector d r) d r, Uniform r, UniformRange r) => Random (Vector d r) +gen) +instance (Additive_ (Vector d r) d r, Uniform r, UniformRange r) => Random (Vector d r) -------------------------------------------------------------------------------- -- * instances for Linear ---------------------------------------- -type instance Dimension (Linear.V1 r) = 1 +type instance Dimension (Linear.V1 r) = 1 -instance AsVector_ (Linear.V1 r) (Linear.V1 s) 1 r s where - _Vector :: Iso (V1 r) (V1 s) (Vector 1 r) (Vector 1 s) +instance AsVector_ (Linear.V1 r) (Linear.V1 s) 1 r s where + _Vector :: Iso (V1 r) (V1 s) (Vector 1 r) (Vector 1 s) _Vector = p (Vector 1 r) (f (Vector 1 s)) -> p (V1 r) (f (V1 s)) forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Iso (V1 r) (V1 s) (Vector 1 r) (Vector 1 s) coerced {-# INLINE _Vector #-} -instance Vector_ (Linear.V1 r) 1 r where - generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V1 r) -generateA Int -> f r -f = r -> V1 r +instance Vector_ (Linear.V1 r) 1 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V1 r) +generateA Int -> f r +f = r -> V1 r forall a. a -> V1 a Linear.V1 (r -> V1 r) -> f r -> f (V1 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 {-# INLINE generateA #-} - component' :: Int -> IndexedTraversal' Int (V1 r) r -component' Int -i p r (f r) -f v :: V1 r -v@(Linear.V1 r -x) = case Int -i of + component' :: Int -> IndexedTraversal' Int (V1 r) r +component' Int +i p r (f r) +f v :: V1 r +v@(Linear.V1 r +x) = case Int +i of Int 0 -> r -> V1 r forall a. a -> V1 a @@ -1050,95 +1050,95 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -x +f Int +i r +x Int _ -> V1 r -> f (V1 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure V1 r -v +v {-# INLINE component' #-} -instance Additive_ (Linear.V1 r) 1 r where - liftU2 :: (r -> r -> r) -> V1 r -> V1 r -> V1 r -liftU2 r -> r -> r -f (Linear.V1 r -x) (Linear.V1 r -x') = r -> V1 r +instance Additive_ (Linear.V1 r) 1 r where + liftU2 :: (r -> r -> r) -> V1 r -> V1 r -> V1 r +liftU2 r -> r -> r +f (Linear.V1 r +x) (Linear.V1 r +x') = r -> V1 r forall a. a -> V1 a Linear.V1 (r -> V1 r) -> r -> V1 r forall a b. (a -> b) -> a -> b $ r -> r -> r -f r -x r -x' +f r +x r +x' {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> V1 r -> V1 r -> f (V1 r) -liftI2A r -> r -> f r -f (Linear.V1 r -x) (Linear.V1 r -x') = r -> V1 r +liftI2A r -> r -> f r +f (Linear.V1 r +x) (Linear.V1 r +x') = r -> V1 r forall a. a -> V1 a Linear.V1 (r -> V1 r) -> f r -> f (V1 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' +f r +x r +x' {-# INLINE liftI2A #-} -instance Metric_ (Linear.V1 r) 1 r +instance Metric_ (Linear.V1 r) 1 r ---------------------------------------- ---------------------------------------- -type instance Dimension (Linear.V2 r) = 2 +type instance Dimension (Linear.V2 r) = 2 -instance AsVector_ (Linear.V2 r) (Linear.V2 s) 2 r s where - _Vector :: Iso (V2 r) (V2 s) (Vector 2 r) (Vector 2 s) +instance AsVector_ (Linear.V2 r) (Linear.V2 s) 2 r s where + _Vector :: Iso (V2 r) (V2 s) (Vector 2 r) (Vector 2 s) _Vector = p (Vector 2 r) (f (Vector 2 s)) -> p (V2 r) (f (V2 s)) forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Iso (V2 r) (V2 s) (Vector 2 r) (Vector 2 s) coerced {-# INLINE _Vector #-} -instance Vector_ (Linear.V2 r) 2 r where - generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V2 r) -generateA Int -> f r -f = r -> r -> V2 r +instance Vector_ (Linear.V2 r) 2 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V2 r) +generateA Int -> f r +f = r -> r -> V2 r forall a. a -> a -> V2 a Linear.V2 (r -> r -> V2 r) -> f r -> f (r -> V2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 f (r -> V2 r) -> f r -> f (V2 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 1 {-# INLINE generateA #-} - component' :: Int -> IndexedTraversal' Int (V2 r) r -component' Int -i p r (f r) -f v :: V2 r -v@(Linear.V2 r -x r -y) = case Int -i of + component' :: Int -> IndexedTraversal' Int (V2 r) r +component' Int +i p r (f r) +f v :: V2 r +v@(Linear.V2 r +x r +y) = case Int +i of Int 0 -> (r -> r -> V2 r) -> r -> r -> V2 r forall a b c. (a -> b -> c) -> b -> a -> c flip r -> r -> V2 r forall a. a -> a -> V2 a Linear.V2 r -y (r -> V2 r) -> f r -> f (V2 r) +y (r -> V2 r) -> f r -> f (V2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1146,14 +1146,14 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -x +f Int +i r +x Int 1 -> r -> r -> V2 r forall a. a -> a -> V2 a Linear.V2 r -x (r -> V2 r) -> f r -> f (V2 r) +x (r -> V2 r) -> f r -> f (V2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1161,111 +1161,111 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -y +f Int +i r +y Int _ -> V2 r -> f (V2 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure V2 r -v +v {-# INLINE component' #-} -instance Additive_ (Linear.V2 r) 2 r where - liftU2 :: (r -> r -> r) -> V2 r -> V2 r -> V2 r -liftU2 r -> r -> r -f (Linear.V2 r -x r -y) (Linear.V2 r -x' r -y') = r -> r -> V2 r +instance Additive_ (Linear.V2 r) 2 r where + liftU2 :: (r -> r -> r) -> V2 r -> V2 r -> V2 r +liftU2 r -> r -> r +f (Linear.V2 r +x r +y) (Linear.V2 r +x' r +y') = r -> r -> V2 r forall a. a -> a -> V2 a Linear.V2 (r -> r -> r -f r -x r -x') (r -> r -> r -f r -y r -y') +f r +x r +x') (r -> r -> r +f r +y r +y') {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> V2 r -> V2 r -> f (V2 r) -liftI2A r -> r -> f r -f (Linear.V2 r -x r -y) (Linear.V2 r -x' r -y') = r -> r -> V2 r +liftI2A r -> r -> f r +f (Linear.V2 r +x r +y) (Linear.V2 r +x' r +y') = r -> r -> V2 r forall a. a -> a -> V2 a Linear.V2 (r -> r -> V2 r) -> f r -> f (r -> V2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' f (r -> V2 r) -> f r -> f (V2 r) +f r +x r +x' f (r -> V2 r) -> f r -> f (V2 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -y r -y' +f r +y r +y' {-# INLINE liftI2A #-} -instance Metric_ (Linear.V2 r) 2 r +instance Metric_ (Linear.V2 r) 2 r -------------------------------------------------------------------------------- -type instance Dimension (Linear.V3 r) = 3 +type instance Dimension (Linear.V3 r) = 3 -instance AsVector_ (Linear.V3 r) (Linear.V3 s) 3 r s where - _Vector :: Iso (V3 r) (V3 s) (Vector 3 r) (Vector 3 s) +instance AsVector_ (Linear.V3 r) (Linear.V3 s) 3 r s where + _Vector :: Iso (V3 r) (V3 s) (Vector 3 r) (Vector 3 s) _Vector = p (Vector 3 r) (f (Vector 3 s)) -> p (V3 r) (f (V3 s)) forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Iso (V3 r) (V3 s) (Vector 3 r) (Vector 3 s) coerced {-# INLINE _Vector #-} -instance Vector_ (Linear.V3 r) 3 r where - generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V3 r) -generateA Int -> f r -f = r -> r -> r -> V3 r +instance Vector_ (Linear.V3 r) 3 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V3 r) +generateA Int -> f r +f = r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a Linear.V3 (r -> r -> r -> V3 r) -> f r -> f (r -> r -> V3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 f (r -> r -> V3 r) -> f r -> f (r -> V3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 1 f (r -> V3 r) -> f r -> f (V3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 2 {-# INLINE generateA #-} - component' :: Int -> IndexedTraversal' Int (V3 r) r -component' Int -i p r (f r) -f v :: V3 r -v@(Linear.V3 r -x r -y r -z) = case Int -i of + component' :: Int -> IndexedTraversal' Int (V3 r) r +component' Int +i p r (f r) +f v :: V3 r +v@(Linear.V3 r +x r +y r +z) = case Int +i of Int -0 -> (\r -x' -> r -> r -> r -> V3 r +0 -> (\r +x' -> r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a Linear.V3 r -x' r -y r -z) (r -> V3 r) -> f r -> f (V3 r) +x' r +y r +z) (r -> V3 r) -> f r -> f (V3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1273,17 +1273,17 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -x +f Int +i r +x Int -1 -> (\r -y' -> r -> r -> r -> V3 r +1 -> (\r +y' -> r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a Linear.V3 r -x r -y' r -z) (r -> V3 r) -> f r -> f (V3 r) +x r +y' r +z) (r -> V3 r) -> f r -> f (V3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1291,17 +1291,17 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -y +f Int +i r +y Int -2 -> (\r -z' -> r -> r -> r -> V3 r +2 -> (\r +z' -> r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a Linear.V3 r -x r -y r -z') (r -> V3 r) -> f r -> f (V3 r) +x r +y r +z') (r -> V3 r) -> f r -> f (V3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1309,131 +1309,131 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -z +f Int +i r +z Int _ -> V3 r -> f (V3 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure V3 r -v +v {-# INLINE component' #-} -instance Additive_ (Linear.V3 r) 3 r where - liftU2 :: (r -> r -> r) -> V3 r -> V3 r -> V3 r -liftU2 r -> r -> r -f (Linear.V3 r -x r -y r -z) (Linear.V3 r -x' r -y' r -z') = r -> r -> r -> V3 r +instance Additive_ (Linear.V3 r) 3 r where + liftU2 :: (r -> r -> r) -> V3 r -> V3 r -> V3 r +liftU2 r -> r -> r +f (Linear.V3 r +x r +y r +z) (Linear.V3 r +x' r +y' r +z') = r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a Linear.V3 (r -> r -> r -f r -x r -x') (r -> r -> r -f r -y r -y') (r -> r -> r -f r -z r -z') +f r +x r +x') (r -> r -> r +f r +y r +y') (r -> r -> r +f r +z r +z') {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> V3 r -> V3 r -> f (V3 r) -liftI2A r -> r -> f r -f (Linear.V3 r -x r -y r -z) (Linear.V3 r -x' r -y' r -z') = +liftI2A r -> r -> f r +f (Linear.V3 r +x r +y r +z) (Linear.V3 r +x' r +y' r +z') = r -> r -> r -> V3 r forall a. a -> a -> a -> V3 a Linear.V3 (r -> r -> r -> V3 r) -> f r -> f (r -> r -> V3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' f (r -> r -> V3 r) -> f r -> f (r -> V3 r) +f r +x r +x' f (r -> r -> V3 r) -> f r -> f (r -> V3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -y r -y' f (r -> V3 r) -> f r -> f (V3 r) +f r +y r +y' f (r -> V3 r) -> f r -> f (V3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -z r -z' +f r +z r +z' {-# INLINE liftI2A #-} -instance Metric_ (Linear.V3 r) 3 r +instance Metric_ (Linear.V3 r) 3 r -------------------------------------------------------------------------------- -type instance Dimension (Linear.V4 r) = 4 +type instance Dimension (Linear.V4 r) = 4 -instance AsVector_ (Linear.V4 r) (Linear.V4 s) 4 r s where - _Vector :: Iso (V4 r) (V4 s) (Vector 4 r) (Vector 4 s) +instance AsVector_ (Linear.V4 r) (Linear.V4 s) 4 r s where + _Vector :: Iso (V4 r) (V4 s) (Vector 4 r) (Vector 4 s) _Vector = p (Vector 4 r) (f (Vector 4 s)) -> p (V4 r) (f (V4 s)) forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Iso (V4 r) (V4 s) (Vector 4 r) (Vector 4 s) coerced {-# INLINE _Vector #-} -instance Vector_ (Linear.V4 r) 4 r where - generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V4 r) -generateA Int -> f r -f = r -> r -> r -> r -> V4 r +instance Vector_ (Linear.V4 r) 4 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (V4 r) +generateA Int -> f r +f = r -> r -> r -> r -> V4 r forall a. a -> a -> a -> a -> V4 a Linear.V4 (r -> r -> r -> r -> V4 r) -> f r -> f (r -> r -> r -> V4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 f (r -> r -> r -> V4 r) -> f r -> f (r -> r -> V4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 1 f (r -> r -> V4 r) -> f r -> f (r -> V4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 2 f (r -> V4 r) -> f r -> f (V4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 3 {-# INLINE generateA #-} - component' :: Int -> IndexedTraversal' Int (V4 r) r -component' Int -i p r (f r) -f v :: V4 r -v@(Linear.V4 r -x r -y r -z r -w) = case Int -i of + component' :: Int -> IndexedTraversal' Int (V4 r) r +component' Int +i p r (f r) +f v :: V4 r +v@(Linear.V4 r +x r +y r +z r +w) = case Int +i of Int -0 -> (\r -x' -> r -> r -> r -> r -> V4 r +0 -> (\r +x' -> r -> r -> r -> r -> V4 r forall a. a -> a -> a -> a -> V4 a Linear.V4 r -x' r -y r -z r -w) (r -> V4 r) -> f r -> f (V4 r) +x' r +y r +z r +w) (r -> V4 r) -> f r -> f (V4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1441,18 +1441,18 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -x +f Int +i r +x Int -1 -> (\r -y' -> r -> r -> r -> r -> V4 r +1 -> (\r +y' -> r -> r -> r -> r -> V4 r forall a. a -> a -> a -> a -> V4 a Linear.V4 r -x r -y' r -z r -w) (r -> V4 r) -> f r -> f (V4 r) +x r +y' r +z r +w) (r -> V4 r) -> f r -> f (V4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1460,18 +1460,18 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -y +f Int +i r +y Int -2 -> (\r -z' -> r -> r -> r -> r -> V4 r +2 -> (\r +z' -> r -> r -> r -> r -> V4 r forall a. a -> a -> a -> a -> V4 a Linear.V4 r -x r -y r -z' r -w) (r -> V4 r) -> f r -> f (V4 r) +x r +y r +z' r +w) (r -> V4 r) -> f r -> f (V4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1479,18 +1479,18 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -z +f Int +i r +z Int -3 -> (\r -w' -> r -> r -> r -> r -> V4 r +3 -> (\r +w' -> r -> r -> r -> r -> V4 r forall a. a -> a -> a -> a -> V4 a Linear.V4 r -x r -y r -z r -w') (r -> V4 r) -> f r -> f (V4 r) +x r +y r +z r +w') (r -> V4 r) -> f r -> f (V4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> p r (f r) -> Int -> r -> f r forall a b. p a b -> Int -> a -> b @@ -1498,383 +1498,383 @@ Indexable i p => p a b -> i -> a -> b indexed p r (f r) -f Int -i r -w +f Int +i r +w Int _ -> V4 r -> f (V4 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure V4 r -v +v {-# INLINE component' #-} -instance Additive_ (Linear.V4 r) 4 r where - liftU2 :: (r -> r -> r) -> V4 r -> V4 r -> V4 r -liftU2 r -> r -> r -f (Linear.V4 r -x r -y r -z r -w) (Linear.V4 r -x' r -y' r -z' r -w') = +instance Additive_ (Linear.V4 r) 4 r where + liftU2 :: (r -> r -> r) -> V4 r -> V4 r -> V4 r +liftU2 r -> r -> r +f (Linear.V4 r +x r +y r +z r +w) (Linear.V4 r +x' r +y' r +z' r +w') = r -> r -> r -> r -> V4 r forall a. a -> a -> a -> a -> V4 a Linear.V4 (r -> r -> r -f r -x r -x') (r -> r -> r -f r -y r -y') (r -> r -> r -f r -z r -z') (r -> r -> r -f r -w r -w') +f r +x r +x') (r -> r -> r +f r +y r +y') (r -> r -> r +f r +z r +z') (r -> r -> r +f r +w r +w') {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> V4 r -> V4 r -> f (V4 r) -liftI2A r -> r -> f r -f (Linear.V4 r -x r -y r -z r -w) (Linear.V4 r -x' r -y' r -z' r -w') = +liftI2A r -> r -> f r +f (Linear.V4 r +x r +y r +z r +w) (Linear.V4 r +x' r +y' r +z' r +w') = r -> r -> r -> r -> V4 r forall a. a -> a -> a -> a -> V4 a Linear.V4 (r -> r -> r -> r -> V4 r) -> f r -> f (r -> r -> r -> V4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' f (r -> r -> r -> V4 r) -> f r -> f (r -> r -> V4 r) +f r +x r +x' f (r -> r -> r -> V4 r) -> f r -> f (r -> r -> V4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -y r -y' f (r -> r -> V4 r) -> f r -> f (r -> V4 r) +f r +y r +y' f (r -> r -> V4 r) -> f r -> f (r -> V4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -z r -z' f (r -> V4 r) -> f r -> f (V4 r) +f r +z r +z' f (r -> V4 r) -> f r -> f (V4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -w r -w' +f r +w r +w' {-# INLINE liftI2A #-} -instance Metric_ (Linear.V4 r) 4 r +instance Metric_ (Linear.V4 r) 4 r -------------------------------------------------------------------------------- -instance Vector_ (Vector 1 r) 1 r where - generateA :: forall (f :: * -> *). +instance Vector_ (Vector 1 r) 1 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (Vector 1 r) -generateA Int -> f r -f = r -> Vector 1 r +generateA Int -> f r +f = r -> Vector 1 r forall r. r -> Vector 1 r Vector1 (r -> Vector 1 r) -> f r -> f (Vector 1 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 {-# INLINE generateA #-} -instance Vector_ (Vector 2 r) 2 r where - generateA :: forall (f :: * -> *). +instance Vector_ (Vector 2 r) 2 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (Vector 2 r) -generateA Int -> f r -f = r -> r -> Vector 2 r +generateA Int -> f r +f = r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (r -> r -> Vector 2 r) -> f r -> f (r -> Vector 2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 f (r -> Vector 2 r) -> f r -> f (Vector 2 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 1 {-# INLINE generateA #-} -instance Vector_ (Vector 3 r) 3 r where - generateA :: forall (f :: * -> *). +instance Vector_ (Vector 3 r) 3 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (Vector 3 r) -generateA Int -> f r -f = r -> r -> r -> Vector 3 r +generateA Int -> f r +f = r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (r -> r -> r -> Vector 3 r) -> f r -> f (r -> r -> Vector 3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 f (r -> r -> Vector 3 r) -> f r -> f (r -> Vector 3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 1 f (r -> Vector 3 r) -> f r -> f (Vector 3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 2 {-# INLINE generateA #-} -instance Vector_ (Vector 4 r) 4 r where - generateA :: forall (f :: * -> *). +instance Vector_ (Vector 4 r) 4 r where + generateA :: forall (f :: * -> *). Applicative f => (Int -> f r) -> f (Vector 4 r) -generateA Int -> f r -f = r -> r -> r -> r -> Vector 4 r +generateA Int -> f r +f = r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 (r -> r -> r -> r -> Vector 4 r) -> f r -> f (r -> r -> r -> Vector 4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> f r -f Int +f Int 0 f (r -> r -> r -> Vector 4 r) -> f r -> f (r -> r -> Vector 4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 1 f (r -> r -> Vector 4 r) -> f r -> f (r -> Vector 4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 2 f (r -> Vector 4 r) -> f r -> f (Vector 4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Int -> f r -f Int +f Int 3 {-# INLINE generateA #-} -instance Additive_ (Vector 1 r) 1 r where - liftU2 :: (r -> r -> r) -> Vector 1 r -> Vector 1 r -> Vector 1 r -liftU2 r -> r -> r -f (Vector1 r -x) (Vector1 r -x') = r -> Vector 1 r +instance Additive_ (Vector 1 r) 1 r where + liftU2 :: (r -> r -> r) -> Vector 1 r -> Vector 1 r -> Vector 1 r +liftU2 r -> r -> r +f (Vector1 r +x) (Vector1 r +x') = r -> Vector 1 r forall r. r -> Vector 1 r Vector1 (r -> Vector 1 r) -> r -> Vector 1 r forall a b. (a -> b) -> a -> b $ r -> r -> r -f r -x r -x' +f r +x r +x' {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> Vector 1 r -> Vector 1 r -> f (Vector 1 r) -liftI2A r -> r -> f r -f (Vector1 r -x) (Vector1 r -x') = r -> Vector 1 r +liftI2A r -> r -> f r +f (Vector1 r +x) (Vector1 r +x') = r -> Vector 1 r forall r. r -> Vector 1 r Vector1 (r -> Vector 1 r) -> f r -> f (Vector 1 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' +f r +x r +x' {-# INLINE liftI2A #-} -instance Additive_ (Vector 2 r) 2 r where - liftU2 :: (r -> r -> r) -> Vector 2 r -> Vector 2 r -> Vector 2 r -liftU2 r -> r -> r -f (Vector2 r -x r -y) (Vector2 r -x' r -y') = r -> r -> Vector 2 r +instance Additive_ (Vector 2 r) 2 r where + liftU2 :: (r -> r -> r) -> Vector 2 r -> Vector 2 r -> Vector 2 r +liftU2 r -> r -> r +f (Vector2 r +x r +y) (Vector2 r +x' r +y') = r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (r -> r -> r -f r -x r -x') (r -> r -> r -f r -y r -y') +f r +x r +x') (r -> r -> r +f r +y r +y') {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> Vector 2 r -> Vector 2 r -> f (Vector 2 r) -liftI2A r -> r -> f r -f (Vector2 r -x r -y) (Vector2 r -x' r -y') = r -> r -> Vector 2 r +liftI2A r -> r -> f r +f (Vector2 r +x r +y) (Vector2 r +x' r +y') = r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (r -> r -> Vector 2 r) -> f r -> f (r -> Vector 2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' f (r -> Vector 2 r) -> f r -> f (Vector 2 r) +f r +x r +x' f (r -> Vector 2 r) -> f r -> f (Vector 2 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -y r -y' +f r +y r +y' {-# INLINE liftI2A #-} -instance Additive_ (Vector 3 r) 3 r where - liftU2 :: (r -> r -> r) -> Vector 3 r -> Vector 3 r -> Vector 3 r -liftU2 r -> r -> r -f (Vector3 r -x r -y r -z) (Vector3 r -x' r -y' r -z') = r -> r -> r -> Vector 3 r +instance Additive_ (Vector 3 r) 3 r where + liftU2 :: (r -> r -> r) -> Vector 3 r -> Vector 3 r -> Vector 3 r +liftU2 r -> r -> r +f (Vector3 r +x r +y r +z) (Vector3 r +x' r +y' r +z') = r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (r -> r -> r -f r -x r -x') (r -> r -> r -f r -y r -y') (r -> r -> r -f r -z r -z') +f r +x r +x') (r -> r -> r +f r +y r +y') (r -> r -> r +f r +z r +z') {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> Vector 3 r -> Vector 3 r -> f (Vector 3 r) -liftI2A r -> r -> f r -f (Vector3 r -x r -y r -z) (Vector3 r -x' r -y' r -z') = +liftI2A r -> r -> f r +f (Vector3 r +x r +y r +z) (Vector3 r +x' r +y' r +z') = r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (r -> r -> r -> Vector 3 r) -> f r -> f (r -> r -> Vector 3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' f (r -> r -> Vector 3 r) -> f r -> f (r -> Vector 3 r) +f r +x r +x' f (r -> r -> Vector 3 r) -> f r -> f (r -> Vector 3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -y r -y' f (r -> Vector 3 r) -> f r -> f (Vector 3 r) +f r +y r +y' f (r -> Vector 3 r) -> f r -> f (Vector 3 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -z r -z' +f r +z r +z' {-# INLINE liftI2A #-} -instance Additive_ (Vector 4 r) 4 r where - liftU2 :: (r -> r -> r) -> Vector 4 r -> Vector 4 r -> Vector 4 r -liftU2 r -> r -> r -f (Vector4 r -x r -y r -z r -w) (Vector4 r -x' r -y' r -z' r -w') = +instance Additive_ (Vector 4 r) 4 r where + liftU2 :: (r -> r -> r) -> Vector 4 r -> Vector 4 r -> Vector 4 r +liftU2 r -> r -> r +f (Vector4 r +x r +y r +z r +w) (Vector4 r +x' r +y' r +z' r +w') = r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 (r -> r -> r -f r -x r -x') (r -> r -> r -f r -y r -y') (r -> r -> r -f r -z r -z') (r -> r -> r -f r -w r -w') +f r +x r +x') (r -> r -> r +f r +y r +y') (r -> r -> r +f r +z r +z') (r -> r -> r +f r +w r +w') {-# INLINE liftU2 #-} - liftI2A :: forall (f :: * -> *). + liftI2A :: forall (f :: * -> *). Apply f => (r -> r -> f r) -> Vector 4 r -> Vector 4 r -> f (Vector 4 r) -liftI2A r -> r -> f r -f (Vector4 r -x r -y r -z r -w) (Vector4 r -x' r -y' r -z' r -w') = +liftI2A r -> r -> f r +f (Vector4 r +x r +y r +z r +w) (Vector4 r +x' r +y' r +z' r +w') = r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 (r -> r -> r -> r -> Vector 4 r) -> f r -> f (r -> r -> r -> Vector 4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> r -> r -> f r -f r -x r -x' f (r -> r -> r -> Vector 4 r) -> f r -> f (r -> r -> Vector 4 r) +f r +x r +x' f (r -> r -> r -> Vector 4 r) -> f r -> f (r -> r -> Vector 4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -y r -y' f (r -> r -> Vector 4 r) -> f r -> f (r -> Vector 4 r) +f r +y r +y' f (r -> r -> Vector 4 r) -> f r -> f (r -> Vector 4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -z r -z' f (r -> Vector 4 r) -> f r -> f (Vector 4 r) +f r +z r +z' f (r -> Vector 4 r) -> f r -> f (Vector 4 r) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> r -> r -> f r -f r -w r -w' +f r +w r +w' {-# INLINE liftI2A #-} -instance Metric_ (Vector 1 r) 1 r -instance Metric_ (Vector 2 r) 2 r -instance Metric_ (Vector 3 r) 3 r -instance Metric_ (Vector 4 r) 4 r +instance Metric_ (Vector 1 r) 1 r +instance Metric_ (Vector 2 r) 2 r +instance Metric_ (Vector 3 r) 3 r +instance Metric_ (Vector 4 r) 4 r -------------------------------------------------------------------------------- -instance ( Vector_ (Vector d r) d r - , Read r - , KnownNat d - ) => Read (Vector d r) where - readPrec :: ReadPrec (Vector d r) -readPrec = ReadPrec (Vector d r) -> ReadPrec (Vector d r) +instance ( Vector_ (Vector d r) d r + , Read r + , KnownNat d + ) => Read (Vector d r) where + readPrec :: ReadPrec (Vector d r) +readPrec = ReadPrec (Vector d r) -> ReadPrec (Vector d r) forall a. ReadPrec a -> ReadPrec a readData (ReadPrec (Vector d r) -> ReadPrec (Vector d r)) -> ReadPrec (Vector d r) -> ReadPrec (Vector d r) @@ -1886,44 +1886,44 @@ readUnaryWith (Int -> ReadPrec r -> ReadPrec [r] forall (m :: * -> *) a. Applicative m => Int -> m a -> m [a] replicateM Int -d ReadPrec r +d ReadPrec r forall a. Read a => ReadPrec a readPrec) String -constr (([r] -> Vector d r) -> ReadPrec (Vector d r)) +constr (([r] -> Vector d r) -> ReadPrec (Vector d r)) -> ([r] -> Vector d r) -> ReadPrec (Vector d r) forall a b. (a -> b) -> a -> b -$ \[r] -rs -> +$ \[r] +rs -> case [r] -> Maybe (Vector d r) forall vector (d :: Nat) r. Vector_ vector d r => [r] -> Maybe vector vectorFromList [r] -rs of - Just Vector d r -p -> Vector d r -p +rs of + Just Vector d r +p -> Vector d r +p Maybe (Vector d r) _ -> String -> Vector d r forall a. HasCallStack => String -> a error String "internal error in HGeometry.Vector read instance." where - d :: Int -d = Nat -> Int + d :: Int +d = Nat -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral (forall (n :: Nat) (proxy :: Nat -> *). KnownNat n => proxy n -> Nat -natVal @d Proxy d +natVal @d Proxy d forall {k} (t :: k). Proxy t Proxy) - constr :: String -constr = String + constr :: String +constr = String "Vector" String -> String -> String forall a. Semigroup a => a -> a -> a <> Int -> String forall a. Show a => a -> String show Int -d +d -------------------------------------------------------------------------------- @@ -1931,15 +1931,15 @@ -- -- >>> cons 5 myVec2 :: Vector 3 Int -- Vector3 5 10 20 -cons :: forall vector' vector d r. - (Vector_ vector d r, Vector_ vector' (d+1) r) - => r -> vector -> vector' +cons :: forall vector' vector d r. + (Vector_ vector d r, Vector_ vector' (d+1) r) + => r -> vector -> vector' cons :: forall vector' vector (d :: Nat) r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => r -> vector -> vector' -cons r -x vector -v = (Int -> r) -> vector' +cons r +x vector +v = (Int -> r) -> vector' forall vector (d :: Nat) r. Vector_ vector d r => (Int -> r) -> vector @@ -1948,17 +1948,17 @@ $ \case Int 0 -> r -x - Int -i -> vector -vvector -> Getting (Endo r) vector r -> r +x + Int +i -> vector +vvector -> Getting (Endo r) vector r -> r forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!Int -> IndexedTraversal' Int vector r forall vector (d :: Nat) r. Vector_ vector d r => Int -> IndexedTraversal' Int vector r component' (Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a -Int 1) @@ -1968,16 +1968,16 @@ -- -- >>> snoc myVec2 5 :: Vector 3 Int -- Vector3 10 20 5 -snoc :: forall vector' vector d r. - ( Vector_ vector d r, Vector_ vector' (d+1) r) - => vector -> r -> vector' +snoc :: forall vector' vector d r. + ( Vector_ vector d r, Vector_ vector' (d+1) r) + => vector -> r -> vector' snoc :: forall vector' vector (d :: Nat) r. (Vector_ vector d r, Vector_ vector' (d + 1) r) => vector -> r -> vector' -snoc vector -v r -x = let d :: Int -d = Nat -> Int +snoc vector +v r +x = let d :: Int +d = Nat -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral (Nat -> Int) -> (Proxy d -> Nat) -> Proxy d -> Int forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -1987,45 +1987,45 @@ forall a b. (a -> b) -> a -> b $ forall (t :: Nat). Proxy t forall {k} (t :: k). Proxy t -Proxy @d +Proxy @d in (Int -> r) -> vector' forall vector (d :: Nat) r. Vector_ vector d r => (Int -> r) -> vector generate ((Int -> r) -> vector') -> (Int -> r) -> vector' forall a b. (a -> b) -> a -> b -$ \Int -i -> if Int -i Int -> Int -> Bool +$ \Int +i -> if Int +i Int -> Int -> Bool forall a. Eq a => a -> a -> Bool == Int -d then r -x else vector -vvector -> Getting (Endo r) vector r -> r +d then r +x else vector +vvector -> Getting (Endo r) vector r -> r forall s a. HasCallStack => s -> Getting (Endo a) s a -> a ^?!Int -> IndexedTraversal' Int vector r forall vector (d :: Nat) r. Vector_ vector d r => Int -> IndexedTraversal' Int vector r component' Int -i +i {-# INLINE snoc #-} -- | Extract the first element from the vector -- -- >>> uncons myVec3 :: (Int, Vector 2 Int) -- (1,Vector2 2 3) -uncons :: forall vector' vector d r. - ( Vector_ vector (d+1) r, Vector_ vector' d r - , 0 <= (d+1)-1, d <= Dimension vector -- these ones are silly - ) => vector -> (r, vector') +uncons :: forall vector' vector d r. + ( Vector_ vector (d+1) r, Vector_ vector' d r + , 0 <= (d+1)-1, d <= Dimension vector -- these ones are silly + ) => vector -> (r, vector') uncons :: forall vector' vector (d :: Nat) r. (Vector_ vector (d + 1) r, Vector_ vector' d r, 0 <= ((d + 1) - 1), d <= Dimension vector) => vector -> (r, vector') -uncons vector -v = ( vector -vvector -> Getting r vector r -> r +uncons vector +v = ( vector +vvector -> Getting r vector r -> r forall s a. s -> Getting a s a -> a ^.forall (i :: Nat) vector r (d :: Nat). (i <= (d - 1), KnownNat i, Vector_ vector d r) => @@ -2035,34 +2035,34 @@ (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector' suffix vector -v) +v) {-# INLINE uncons #-} -- | Extract the last element from the vector -- -- >>> unsnoc myVec3 :: (Vector 2 Int, Int) -- (Vector2 1 2,3) -unsnoc :: forall vector' vector d r. - (Vector_ vector (d+1) r, Vector_ vector' d r - , d <= d+1-1, d <= Dimension vector -- these are silly - ) => vector -> (vector',r) +unsnoc :: forall vector' vector d r. + (Vector_ vector (d+1) r, Vector_ vector' d r + , d <= d+1-1, d <= Dimension vector -- these are silly + ) => vector -> (vector',r) unsnoc :: forall vector' vector (d :: Nat) r. (Vector_ vector (d + 1) r, Vector_ vector' d r, d <= ((d + 1) - 1), d <= Dimension vector) => vector -> (vector', r) -unsnoc vector -v = ( vector -> vector' +unsnoc vector +v = ( vector -> vector' forall (i :: Nat) (d :: Nat) vector vector' r. (i <= d, Vector_ vector d r, Vector_ vector' i r) => vector -> vector' prefix vector -v, vector -vvector -> Getting r vector r -> r +v, vector +vvector -> Getting r vector r -> r forall s a. s -> Getting a s a -> a ^.forall (i :: Nat) vector r (d :: Nat). (i <= (d - 1), KnownNat i, Vector_ vector d r) => IndexedLens' Int vector r -component @d ) +component @d ) {-# INLINE unsnoc #-} {- diff --git a/haddocks/hgeometry/vector/src/HGeometry.Vector.Type.html b/haddocks/hgeometry/vector/src/HGeometry.Vector.Type.html index 468baa0d3..f30783e55 100644 --- a/haddocks/hgeometry/vector/src/HGeometry.Vector.Type.html +++ b/haddocks/hgeometry/vector/src/HGeometry.Vector.Type.html @@ -40,12 +40,12 @@ -------------------------------------------------------------------------------- -- | Data type representing d-dimensional vectors storing elements of type r. -data family Vector (d :: Nat) (r :: Type) +data family Vector (d :: Nat) (r :: Type) -type instance Dimension (Vector d r) = d -type instance NumType (Vector d r) = r -type instance IxValue (Vector d r) = r -type instance Index (Vector d r) = Int +type instance Dimension (Vector d r) = d +type instance NumType (Vector d r) = r +type instance IxValue (Vector d r) = r +type instance Index (Vector d r) = Int -------------------------------------------------------------------------------- @@ -58,19 +58,19 @@ -------------------------------------------------------------------------------- -- | Types that have a 'components' indexed traversal -class HasComponents vector vector' where +class HasComponents vector vector' where -- | An Indexed Traversal over the components of a vector -- -- >>> myVec3 ^.. components -- [1,2,3] -- >>> myVec3 ^@.. components -- [(0,1),(1,2),(2,3)] - components :: IndexedTraversal1 Int vector vector' (IxValue vector) (IxValue vector') + components :: IndexedTraversal1 Int vector vector' (IxValue vector) (IxValue vector') -------------------------------------------------------------------------------- -newtype instance Vector 1 r = MkVector1 (Linear.V1 r) - deriving newtype (Vector 1 r -> Vector 1 r -> Bool +newtype instance Vector 1 r = MkVector1 (Linear.V1 r) + deriving newtype (Vector 1 r -> Vector 1 r -> Bool (Vector 1 r -> Vector 1 r -> Bool) -> (Vector 1 r -> Vector 1 r -> Bool) -> Eq (Vector 1 r) forall r. Eq r => Vector 1 r -> Vector 1 r -> Bool @@ -79,7 +79,7 @@ == :: Vector 1 r -> Vector 1 r -> Bool $c/= :: forall r. Eq r => Vector 1 r -> Vector 1 r -> Bool /= :: Vector 1 r -> Vector 1 r -> Bool -Eq,Eq (Vector 1 r) +Eq,Eq (Vector 1 r) Eq (Vector 1 r) => (Vector 1 r -> Vector 1 r -> Ordering) -> (Vector 1 r -> Vector 1 r -> Bool) @@ -120,13 +120,13 @@ max :: Vector 1 r -> Vector 1 r -> Vector 1 r $cmin :: forall r. Ord r => Vector 1 r -> Vector 1 r -> Vector 1 r min :: Vector 1 r -> Vector 1 r -> Vector 1 r -Ord,Vector 1 r -> () +Ord,Vector 1 r -> () (Vector 1 r -> ()) -> NFData (Vector 1 r) forall r. NFData r => Vector 1 r -> () forall a. (a -> ()) -> NFData a $crnf :: forall r. NFData r => Vector 1 r -> () rnf :: Vector 1 r -> () -NFData,Foldable (Vector 1) +NFData,Foldable (Vector 1) Foldable (Vector 1) => (forall m. Semigroup m => Vector 1 m -> m) -> (forall m a. Semigroup m => (a -> m) -> Vector 1 a -> m) @@ -188,7 +188,7 @@ $cfoldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 1 a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 1 a -> b Foldable1) - deriving (Functor (Vector 1) + deriving (Functor (Vector 1) Functor (Vector 1) => (forall a b. Vector 1 a -> Vector 1 b -> Vector 1 (These a b)) -> (forall a b c. @@ -208,7 +208,7 @@ (These a b -> c) -> Vector 1 a -> Vector 1 b -> Vector 1 c alignWith :: forall a b c. (These a b -> c) -> Vector 1 a -> Vector 1 b -> Vector 1 c -Semialign,Semialign (Vector 1) +Semialign,Semialign (Vector 1) Semialign (Vector 1) => (forall a b. Vector 1 a -> Vector 1 b -> Vector 1 (a, b)) -> (forall a b c. @@ -228,7 +228,7 @@ zipWith :: forall a b c. (a -> b -> c) -> Vector 1 a -> Vector 1 b -> Vector 1 c Zip) via Identity - deriving stock ((forall x. Vector 1 r -> Rep (Vector 1 r) x) + deriving stock ((forall x. Vector 1 r -> Rep (Vector 1 r) x) -> (forall x. Rep (Vector 1 r) x -> Vector 1 r) -> Generic (Vector 1 r) forall x. Rep (Vector 1 r) x -> Vector 1 r @@ -241,7 +241,7 @@ from :: forall x. Vector 1 r -> Rep (Vector 1 r) x $cto :: forall r x. Rep (Vector 1 r) x -> Vector 1 r to :: forall x. Rep (Vector 1 r) x -> Vector 1 r -Generic,(forall a b. (a -> b) -> Vector 1 a -> Vector 1 b) +Generic,(forall a b. (a -> b) -> Vector 1 a -> Vector 1 b) -> (forall a b. a -> Vector 1 b -> Vector 1 a) -> Functor (Vector 1) forall a b. a -> Vector 1 b -> Vector 1 a @@ -253,7 +253,7 @@ fmap :: forall a b. (a -> b) -> Vector 1 a -> Vector 1 b $c<$ :: forall a b. a -> Vector 1 b -> Vector 1 a <$ :: forall a b. a -> Vector 1 b -> Vector 1 a -Functor,(forall m. Monoid m => Vector 1 m -> m) +Functor,(forall m. Monoid m => Vector 1 m -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 1 a -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 1 a -> m) -> (forall a b. (a -> b -> b) -> b -> Vector 1 a -> b) @@ -335,7 +335,7 @@ sum :: forall a. Num a => Vector 1 a -> a $cproduct :: forall a. Num a => Vector 1 a -> a product :: forall a. Num a => Vector 1 a -> a -Foldable,Functor (Vector 1) +Foldable,Functor (Vector 1) Foldable (Vector 1) (Functor (Vector 1), Foldable (Vector 1)) => (forall (f :: * -> *) a b. @@ -395,13 +395,13 @@ Traversable) -- | Construct a vector1 -pattern Vector1 :: r -> Vector 1 r +pattern Vector1 :: r -> Vector 1 r pattern $mVector1 :: forall {r} {r}. Vector 1 r -> (r -> r) -> ((# #) -> r) -> r $bVector1 :: forall r. r -> Vector 1 r -Vector1 x = MkVector1 (Linear.V1 x) +Vector1 x = MkVector1 (Linear.V1 x) {-# COMPLETE Vector1 #-} -asV1 :: forall r s. Iso (Vector 1 r) (Vector 1 s) (Linear.V1 r) (Linear.V1 s) +asV1 :: forall r s. Iso (Vector 1 r) (Vector 1 s) (Linear.V1 r) (Linear.V1 s) asV1 :: forall r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (V1 r) (f (V1 s)) -> p (Vector 1 r) (f (Vector 1 s)) @@ -411,59 +411,59 @@ forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b iso (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Vector 1 r) @(Linear.V1 r)) +coerce @(Vector 1 r) @(Linear.V1 r)) (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Linear.V1 s) @(Vector 1 s)) +coerce @(Linear.V1 s) @(Vector 1 s)) {-# INLINE asV1 #-} -instance Traversable1 (Vector 1) where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 (Vector 1) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Vector 1 a -> f (Vector 1 b) -traverse1 a -> f b -f (Vector1 a -x) = b -> Vector 1 b +traverse1 a -> f b +f (Vector1 a +x) = b -> Vector 1 b forall r. r -> Vector 1 r Vector1 (b -> Vector 1 b) -> f b -> f (Vector 1 b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -x +f a +x {-# INLINE traverse1 #-} -instance TraversableWithIndex Int (Vector 1) -instance FoldableWithIndex Int (Vector 1) -instance FunctorWithIndex Int (Vector 1) +instance TraversableWithIndex Int (Vector 1) +instance FoldableWithIndex Int (Vector 1) +instance FunctorWithIndex Int (Vector 1) -instance Ixed (Vector 1 r) where - ix :: Index (Vector 1 r) +instance Ixed (Vector 1 r) where + ix :: Index (Vector 1 r) -> Traversal' (Vector 1 r) (IxValue (Vector 1 r)) -ix Index (Vector 1 r) -i IxValue (Vector 1 r) -> f (IxValue (Vector 1 r)) -f v :: Vector 1 r -v@(Vector1 r -x) = case Index (Vector 1 r) -i of +ix Index (Vector 1 r) +i IxValue (Vector 1 r) -> f (IxValue (Vector 1 r)) +f v :: Vector 1 r +v@(Vector1 r +x) = case Index (Vector 1 r) +i of Index (Vector 1 r) 0 -> r -> Vector 1 r forall r. r -> Vector 1 r Vector1 (r -> Vector 1 r) -> f r -> f (Vector 1 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 1 r) -> f (IxValue (Vector 1 r)) -f r +f r IxValue (Vector 1 r) -x +x Index (Vector 1 r) _ -> Vector 1 r -> f (Vector 1 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure Vector 1 r -v +v {-# INLINE ix #-} -instance HasComponents (Vector 1 r) (Vector 1 s) where - components :: IndexedTraversal1 +instance HasComponents (Vector 1 r) (Vector 1 s) where + components :: IndexedTraversal1 Int (Vector 1 r) (Vector 1 s) @@ -491,11 +491,11 @@ {-# INLINE components #-} -instance FromYAML r => FromYAML (Vector 1 r) where +instance FromYAML r => FromYAML (Vector 1 r) where -- node pos -> Parser - parseYAML :: Node Pos -> Parser (Vector 1 r) -parseYAML Node Pos -node = String + parseYAML :: Node Pos -> Parser (Vector 1 r) +parseYAML Node Pos +node = String -> ([Node Pos] -> Parser (Vector 1 r)) -> Node Pos -> Parser (Vector 1 r) @@ -503,52 +503,52 @@ String -> ([Node Pos] -> Parser a) -> Node Pos -> Parser a withSeq String "Vector1" [Node Pos] -> Parser (Vector 1 r) -f Node Pos -node +f Node Pos +node where - f :: [Node Pos] -> Parser (Vector 1 r) -f = \case - [Node Pos -pos] -> r -> Vector 1 r + f :: [Node Pos] -> Parser (Vector 1 r) +f = \case + [Node Pos +pos] -> r -> Vector 1 r forall r. r -> Vector 1 r Vector1 (r -> Vector 1 r) -> Parser r -> Parser (Vector 1 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -pos +pos [Node Pos] _ -> Node Pos -> String -> Parser (Vector 1 r) forall a. Node Pos -> String -> Parser a failAtNode Node Pos -node String +node String "expected exactly 1 element" -instance FromJSON r => FromJSON (Vector 1 r) where - parseJSON :: Value -> Parser (Vector 1 r) -parseJSON = String +instance FromJSON r => FromJSON (Vector 1 r) where + parseJSON :: Value -> Parser (Vector 1 r) +parseJSON = String -> (Array -> Parser (Vector 1 r)) -> Value -> Parser (Vector 1 r) forall a. String -> (Array -> Parser a) -> Value -> Parser a withArray String "Vector1" ([Value] -> Parser (Vector 1 r) -f ([Value] -> Parser (Vector 1 r)) +f ([Value] -> Parser (Vector 1 r)) -> (Array -> [Value]) -> Array -> Parser (Vector 1 r) forall b c a. (b -> c) -> (a -> b) -> a -> c . Array -> [Value] forall a. Vector a -> [a] Array.toList) where - f :: [Value] -> Parser (Vector 1 r) -f = \case - [Value -x] -> r -> Vector 1 r + f :: [Value] -> Parser (Vector 1 r) +f = \case + [Value +x] -> r -> Vector 1 r forall r. r -> Vector 1 r Vector1 (r -> Vector 1 r) -> Parser r -> Parser (Vector 1 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -x +x [Value] _ -> String -> Parser (Vector 1 r) forall a. String -> Parser a @@ -558,8 +558,8 @@ -------------------------------------------------------------------------------- -newtype instance Vector 2 r = MkVector2 (Linear.V2 r) - deriving newtype (Vector 2 r -> Vector 2 r -> Bool +newtype instance Vector 2 r = MkVector2 (Linear.V2 r) + deriving newtype (Vector 2 r -> Vector 2 r -> Bool (Vector 2 r -> Vector 2 r -> Bool) -> (Vector 2 r -> Vector 2 r -> Bool) -> Eq (Vector 2 r) forall r. Eq r => Vector 2 r -> Vector 2 r -> Bool @@ -568,7 +568,7 @@ == :: Vector 2 r -> Vector 2 r -> Bool $c/= :: forall r. Eq r => Vector 2 r -> Vector 2 r -> Bool /= :: Vector 2 r -> Vector 2 r -> Bool -Eq,Eq (Vector 2 r) +Eq,Eq (Vector 2 r) Eq (Vector 2 r) => (Vector 2 r -> Vector 2 r -> Ordering) -> (Vector 2 r -> Vector 2 r -> Bool) @@ -609,13 +609,13 @@ max :: Vector 2 r -> Vector 2 r -> Vector 2 r $cmin :: forall r. Ord r => Vector 2 r -> Vector 2 r -> Vector 2 r min :: Vector 2 r -> Vector 2 r -> Vector 2 r -Ord,Vector 2 r -> () +Ord,Vector 2 r -> () (Vector 2 r -> ()) -> NFData (Vector 2 r) forall r. NFData r => Vector 2 r -> () forall a. (a -> ()) -> NFData a $crnf :: forall r. NFData r => Vector 2 r -> () rnf :: Vector 2 r -> () -NFData,Foldable (Vector 2) +NFData,Foldable (Vector 2) Foldable (Vector 2) => (forall m. Semigroup m => Vector 2 m -> m) -> (forall m a. Semigroup m => (a -> m) -> Vector 2 a -> m) @@ -677,7 +677,7 @@ $cfoldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 2 a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 2 a -> b Foldable1) - deriving stock ((forall x. Vector 2 r -> Rep (Vector 2 r) x) + deriving stock ((forall x. Vector 2 r -> Rep (Vector 2 r) x) -> (forall x. Rep (Vector 2 r) x -> Vector 2 r) -> Generic (Vector 2 r) forall x. Rep (Vector 2 r) x -> Vector 2 r @@ -690,7 +690,7 @@ from :: forall x. Vector 2 r -> Rep (Vector 2 r) x $cto :: forall r x. Rep (Vector 2 r) x -> Vector 2 r to :: forall x. Rep (Vector 2 r) x -> Vector 2 r -Generic,(forall a b. (a -> b) -> Vector 2 a -> Vector 2 b) +Generic,(forall a b. (a -> b) -> Vector 2 a -> Vector 2 b) -> (forall a b. a -> Vector 2 b -> Vector 2 a) -> Functor (Vector 2) forall a b. a -> Vector 2 b -> Vector 2 a @@ -702,7 +702,7 @@ fmap :: forall a b. (a -> b) -> Vector 2 a -> Vector 2 b $c<$ :: forall a b. a -> Vector 2 b -> Vector 2 a <$ :: forall a b. a -> Vector 2 b -> Vector 2 a -Functor,(forall m. Monoid m => Vector 2 m -> m) +Functor,(forall m. Monoid m => Vector 2 m -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 2 a -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 2 a -> m) -> (forall a b. (a -> b -> b) -> b -> Vector 2 a -> b) @@ -784,7 +784,7 @@ sum :: forall a. Num a => Vector 2 a -> a $cproduct :: forall a. Num a => Vector 2 a -> a product :: forall a. Num a => Vector 2 a -> a -Foldable,Functor (Vector 2) +Foldable,Functor (Vector 2) Foldable (Vector 2) (Functor (Vector 2), Foldable (Vector 2)) => (forall (f :: * -> *) a b. @@ -844,13 +844,13 @@ Traversable) -- | Construct a vector2 -pattern Vector2 :: r -> r -> Vector 2 r +pattern Vector2 :: r -> r -> Vector 2 r pattern $mVector2 :: forall {r} {r}. Vector 2 r -> (r -> r -> r) -> ((# #) -> r) -> r $bVector2 :: forall r. r -> r -> Vector 2 r -Vector2 x y = MkVector2 (Linear.V2 x y) +Vector2 x y = MkVector2 (Linear.V2 x y) {-# COMPLETE Vector2 #-} -asV2 :: forall r s. Iso (Vector 2 r) (Vector 2 s) (Linear.V2 r) (Linear.V2 s) +asV2 :: forall r s. Iso (Vector 2 r) (Vector 2 s) (Linear.V2 r) (Linear.V2 s) asV2 :: forall r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (V2 r) (f (V2 s)) -> p (Vector 2 r) (f (Vector 2 s)) @@ -860,79 +860,79 @@ forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b iso (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Vector 2 r) @(Linear.V2 r)) +coerce @(Vector 2 r) @(Linear.V2 r)) (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Linear.V2 s) @(Vector 2 s)) +coerce @(Linear.V2 s) @(Vector 2 s)) {-# INLINE asV2 #-} -instance Traversable1 (Vector 2) where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 (Vector 2) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Vector 2 a -> f (Vector 2 b) -traverse1 a -> f b -f (Vector2 a -x a -y) = b -> b -> Vector 2 b +traverse1 a -> f b +f (Vector2 a +x a +y) = b -> b -> Vector 2 b forall r. r -> r -> Vector 2 r Vector2 (b -> b -> Vector 2 b) -> f b -> f (b -> Vector 2 b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -x f (b -> Vector 2 b) -> f b -> f (Vector 2 b) +f a +x f (b -> Vector 2 b) -> f b -> f (Vector 2 b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> a -> f b -f a -y +f a +y {-# INLINE traverse1 #-} -instance TraversableWithIndex Int (Vector 2) -instance FoldableWithIndex Int (Vector 2) -instance FunctorWithIndex Int (Vector 2) +instance TraversableWithIndex Int (Vector 2) +instance FoldableWithIndex Int (Vector 2) +instance FunctorWithIndex Int (Vector 2) -instance Ixed (Vector 2 r) where - ix :: Index (Vector 2 r) +instance Ixed (Vector 2 r) where + ix :: Index (Vector 2 r) -> Traversal' (Vector 2 r) (IxValue (Vector 2 r)) -ix Index (Vector 2 r) -i IxValue (Vector 2 r) -> f (IxValue (Vector 2 r)) -f v :: Vector 2 r -v@(Vector2 r -x r -y) = case Index (Vector 2 r) -i of +ix Index (Vector 2 r) +i IxValue (Vector 2 r) -> f (IxValue (Vector 2 r)) +f v :: Vector 2 r +v@(Vector2 r +x r +y) = case Index (Vector 2 r) +i of Index (Vector 2 r) 0 -> (r -> r -> Vector 2 r) -> r -> r -> Vector 2 r forall a b c. (a -> b -> c) -> b -> a -> c flip r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r -y (r -> Vector 2 r) -> f r -> f (Vector 2 r) +y (r -> Vector 2 r) -> f r -> f (Vector 2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 2 r) -> f (IxValue (Vector 2 r)) -f r +f r IxValue (Vector 2 r) -x +x Index (Vector 2 r) 1 -> r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 r -x (r -> Vector 2 r) -> f r -> f (Vector 2 r) +x (r -> Vector 2 r) -> f r -> f (Vector 2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 2 r) -> f (IxValue (Vector 2 r)) -f r +f r IxValue (Vector 2 r) -y +y Index (Vector 2 r) _ -> Vector 2 r -> f (Vector 2 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure Vector 2 r -v +v {-# INLINE ix #-} -instance HasComponents (Vector 2 r) (Vector 2 s) where - components :: IndexedTraversal1 +instance HasComponents (Vector 2 r) (Vector 2 s) where + components :: IndexedTraversal1 Int (Vector 2 r) (Vector 2 s) @@ -959,9 +959,9 @@ components {-# INLINE components #-} -instance Semialign (Vector 2) where - align :: forall a b. Vector 2 a -> Vector 2 b -> Vector 2 (These a b) -align = (a -> b -> These a b) +instance Semialign (Vector 2) where + align :: forall a b. Vector 2 a -> Vector 2 b -> Vector 2 (These a b) +align = (a -> b -> These a b) -> Vector 2 a -> Vector 2 b -> Vector 2 (These a b) forall a b c. (a -> b -> c) -> Vector 2 a -> Vector 2 b -> Vector 2 c @@ -972,29 +972,29 @@ forall a b. a -> b -> These a b These {-# INLINE align #-} -instance Zip (Vector 2) where - zipWith :: forall a b c. +instance Zip (Vector 2) where + zipWith :: forall a b c. (a -> b -> c) -> Vector 2 a -> Vector 2 b -> Vector 2 c -zipWith a -> b -> c -f (Vector2 a -x a -y) (Vector2 b -x' b -y') = c -> c -> Vector 2 c +zipWith a -> b -> c +f (Vector2 a +x a +y) (Vector2 b +x' b +y') = c -> c -> Vector 2 c forall r. r -> r -> Vector 2 r Vector2 (a -> b -> c -f a -x b -x') (a -> b -> c -f a -y b -y') +f a +x b +x') (a -> b -> c +f a +y b +y') {-# INLINE zipWith #-} -instance FromYAML r => FromYAML (Vector 2 r) where - parseYAML :: Node Pos -> Parser (Vector 2 r) -parseYAML Node Pos -node = String +instance FromYAML r => FromYAML (Vector 2 r) where + parseYAML :: Node Pos -> Parser (Vector 2 r) +parseYAML Node Pos +node = String -> ([Node Pos] -> Parser (Vector 2 r)) -> Node Pos -> Parser (Vector 2 r) @@ -1002,66 +1002,66 @@ String -> ([Node Pos] -> Parser a) -> Node Pos -> Parser a withSeq String "Vector2" [Node Pos] -> Parser (Vector 2 r) -f Node Pos -node +f Node Pos +node where - f :: [Node Pos] -> Parser (Vector 2 r) -f = \case - [Node Pos -posX,Node Pos -posY] -> r -> r -> Vector 2 r + f :: [Node Pos] -> Parser (Vector 2 r) +f = \case + [Node Pos +posX,Node Pos +posY] -> r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (r -> r -> Vector 2 r) -> Parser r -> Parser (r -> Vector 2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posX Parser (r -> Vector 2 r) -> Parser r -> Parser (Vector 2 r) +posX Parser (r -> Vector 2 r) -> Parser r -> Parser (Vector 2 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posY +posY [Node Pos] _ -> Node Pos -> String -> Parser (Vector 2 r) forall a. Node Pos -> String -> Parser a failAtNode Node Pos -node String +node String "expected exactly 2 elements" -instance FromJSON r => FromJSON (Vector 2 r) where - parseJSON :: Value -> Parser (Vector 2 r) +instance FromJSON r => FromJSON (Vector 2 r) where + parseJSON :: Value -> Parser (Vector 2 r) parseJSON = String -> (Array -> Parser (Vector 2 r)) -> Value -> Parser (Vector 2 r) forall a. String -> (Array -> Parser a) -> Value -> Parser a withArray String "Vector2" ([Value] -> Parser (Vector 2 r) -f ([Value] -> Parser (Vector 2 r)) +f ([Value] -> Parser (Vector 2 r)) -> (Array -> [Value]) -> Array -> Parser (Vector 2 r) forall b c a. (b -> c) -> (a -> b) -> a -> c . Array -> [Value] forall a. Vector a -> [a] Array.toList) where - f :: [Value] -> Parser (Vector 2 r) -f = \case - [Value -x,Value -y] -> r -> r -> Vector 2 r + f :: [Value] -> Parser (Vector 2 r) +f = \case + [Value +x,Value +y] -> r -> r -> Vector 2 r forall r. r -> r -> Vector 2 r Vector2 (r -> r -> Vector 2 r) -> Parser r -> Parser (r -> Vector 2 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -x Parser (r -> Vector 2 r) -> Parser r -> Parser (Vector 2 r) +x Parser (r -> Vector 2 r) -> Parser r -> Parser (Vector 2 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -y +y [Value] _ -> String -> Parser (Vector 2 r) forall a. String -> Parser a @@ -1071,8 +1071,8 @@ -------------------------------------------------------------------------------- -newtype instance Vector 3 r = MkVector3 (Linear.V3 r) - deriving newtype (Vector 3 r -> Vector 3 r -> Bool +newtype instance Vector 3 r = MkVector3 (Linear.V3 r) + deriving newtype (Vector 3 r -> Vector 3 r -> Bool (Vector 3 r -> Vector 3 r -> Bool) -> (Vector 3 r -> Vector 3 r -> Bool) -> Eq (Vector 3 r) forall r. Eq r => Vector 3 r -> Vector 3 r -> Bool @@ -1081,7 +1081,7 @@ == :: Vector 3 r -> Vector 3 r -> Bool $c/= :: forall r. Eq r => Vector 3 r -> Vector 3 r -> Bool /= :: Vector 3 r -> Vector 3 r -> Bool -Eq,Eq (Vector 3 r) +Eq,Eq (Vector 3 r) Eq (Vector 3 r) => (Vector 3 r -> Vector 3 r -> Ordering) -> (Vector 3 r -> Vector 3 r -> Bool) @@ -1122,13 +1122,13 @@ max :: Vector 3 r -> Vector 3 r -> Vector 3 r $cmin :: forall r. Ord r => Vector 3 r -> Vector 3 r -> Vector 3 r min :: Vector 3 r -> Vector 3 r -> Vector 3 r -Ord,Vector 3 r -> () +Ord,Vector 3 r -> () (Vector 3 r -> ()) -> NFData (Vector 3 r) forall r. NFData r => Vector 3 r -> () forall a. (a -> ()) -> NFData a $crnf :: forall r. NFData r => Vector 3 r -> () rnf :: Vector 3 r -> () -NFData,Foldable (Vector 3) +NFData,Foldable (Vector 3) Foldable (Vector 3) => (forall m. Semigroup m => Vector 3 m -> m) -> (forall m a. Semigroup m => (a -> m) -> Vector 3 a -> m) @@ -1190,7 +1190,7 @@ $cfoldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 3 a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 3 a -> b Foldable1) - deriving stock ((forall x. Vector 3 r -> Rep (Vector 3 r) x) + deriving stock ((forall x. Vector 3 r -> Rep (Vector 3 r) x) -> (forall x. Rep (Vector 3 r) x -> Vector 3 r) -> Generic (Vector 3 r) forall x. Rep (Vector 3 r) x -> Vector 3 r @@ -1203,7 +1203,7 @@ from :: forall x. Vector 3 r -> Rep (Vector 3 r) x $cto :: forall r x. Rep (Vector 3 r) x -> Vector 3 r to :: forall x. Rep (Vector 3 r) x -> Vector 3 r -Generic,(forall a b. (a -> b) -> Vector 3 a -> Vector 3 b) +Generic,(forall a b. (a -> b) -> Vector 3 a -> Vector 3 b) -> (forall a b. a -> Vector 3 b -> Vector 3 a) -> Functor (Vector 3) forall a b. a -> Vector 3 b -> Vector 3 a @@ -1215,7 +1215,7 @@ fmap :: forall a b. (a -> b) -> Vector 3 a -> Vector 3 b $c<$ :: forall a b. a -> Vector 3 b -> Vector 3 a <$ :: forall a b. a -> Vector 3 b -> Vector 3 a -Functor,(forall m. Monoid m => Vector 3 m -> m) +Functor,(forall m. Monoid m => Vector 3 m -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 3 a -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 3 a -> m) -> (forall a b. (a -> b -> b) -> b -> Vector 3 a -> b) @@ -1297,7 +1297,7 @@ sum :: forall a. Num a => Vector 3 a -> a $cproduct :: forall a. Num a => Vector 3 a -> a product :: forall a. Num a => Vector 3 a -> a -Foldable,Functor (Vector 3) +Foldable,Functor (Vector 3) Foldable (Vector 3) (Functor (Vector 3), Foldable (Vector 3)) => (forall (f :: * -> *) a b. @@ -1357,14 +1357,14 @@ Traversable) -- | Construct a vector3 -pattern Vector3 :: r -> r -> r -> Vector 3 r +pattern Vector3 :: r -> r -> r -> Vector 3 r pattern $mVector3 :: forall {r} {r}. Vector 3 r -> (r -> r -> r -> r) -> ((# #) -> r) -> r $bVector3 :: forall r. r -> r -> r -> Vector 3 r -Vector3 x y z = MkVector3 (Linear.V3 x y z) +Vector3 x y z = MkVector3 (Linear.V3 x y z) {-# COMPLETE Vector3 #-} -asV3 :: forall r s. Iso (Vector 3 r) (Vector 3 s) (Linear.V3 r) (Linear.V3 s) +asV3 :: forall r s. Iso (Vector 3 r) (Vector 3 s) (Linear.V3 r) (Linear.V3 s) asV3 :: forall r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (V3 r) (f (V3 s)) -> p (Vector 3 r) (f (Vector 3 s)) @@ -1374,103 +1374,103 @@ forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b iso (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Vector 3 r) @(Linear.V3 r)) +coerce @(Vector 3 r) @(Linear.V3 r)) (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Linear.V3 s) @(Vector 3 s)) +coerce @(Linear.V3 s) @(Vector 3 s)) {-# INLINE asV3 #-} -instance Traversable1 (Vector 3) where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 (Vector 3) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Vector 3 a -> f (Vector 3 b) -traverse1 a -> f b -f (Vector3 a -x a -y a -z) = b -> b -> b -> Vector 3 b +traverse1 a -> f b +f (Vector3 a +x a +y a +z) = b -> b -> b -> Vector 3 b forall r. r -> r -> r -> Vector 3 r Vector3 (b -> b -> b -> Vector 3 b) -> f b -> f (b -> b -> Vector 3 b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -x f (b -> b -> Vector 3 b) -> f b -> f (b -> Vector 3 b) +f a +x f (b -> b -> Vector 3 b) -> f b -> f (b -> Vector 3 b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> a -> f b -f a -y f (b -> Vector 3 b) -> f b -> f (Vector 3 b) +f a +y f (b -> Vector 3 b) -> f b -> f (Vector 3 b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> a -> f b -f a -z +f a +z {-# INLINE traverse1 #-} -instance TraversableWithIndex Int (Vector 3) -instance FoldableWithIndex Int (Vector 3) -instance FunctorWithIndex Int (Vector 3) +instance TraversableWithIndex Int (Vector 3) +instance FoldableWithIndex Int (Vector 3) +instance FunctorWithIndex Int (Vector 3) -instance Ixed (Vector 3 r) where - ix :: Index (Vector 3 r) +instance Ixed (Vector 3 r) where + ix :: Index (Vector 3 r) -> Traversal' (Vector 3 r) (IxValue (Vector 3 r)) -ix Index (Vector 3 r) -i IxValue (Vector 3 r) -> f (IxValue (Vector 3 r)) -f v :: Vector 3 r -v@(Vector3 r -x r -y r -z) = case Index (Vector 3 r) -i of +ix Index (Vector 3 r) +i IxValue (Vector 3 r) -> f (IxValue (Vector 3 r)) +f v :: Vector 3 r +v@(Vector3 r +x r +y r +z) = case Index (Vector 3 r) +i of Index (Vector 3 r) -0 -> (\r -x' -> r -> r -> r -> Vector 3 r +0 -> (\r +x' -> r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -x' r -y r -z) (r -> Vector 3 r) -> f r -> f (Vector 3 r) +x' r +y r +z) (r -> Vector 3 r) -> f r -> f (Vector 3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 3 r) -> f (IxValue (Vector 3 r)) -f r +f r IxValue (Vector 3 r) -x +x Index (Vector 3 r) -1 -> (\r -y' -> r -> r -> r -> Vector 3 r +1 -> (\r +y' -> r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -x r -y' r -z) (r -> Vector 3 r) -> f r -> f (Vector 3 r) +x r +y' r +z) (r -> Vector 3 r) -> f r -> f (Vector 3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 3 r) -> f (IxValue (Vector 3 r)) -f r +f r IxValue (Vector 3 r) -y +y Index (Vector 3 r) -2 -> (\r -z' -> r -> r -> r -> Vector 3 r +2 -> (\r +z' -> r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 r -x r -y r -z') (r -> Vector 3 r) -> f r -> f (Vector 3 r) +x r +y r +z') (r -> Vector 3 r) -> f r -> f (Vector 3 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 3 r) -> f (IxValue (Vector 3 r)) -f r +f r IxValue (Vector 3 r) -z +z Index (Vector 3 r) _ -> Vector 3 r -> f (Vector 3 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure Vector 3 r -v +v {-# INLINE ix #-} -instance HasComponents (Vector 3 r) (Vector 3 s) where - components :: IndexedTraversal1 +instance HasComponents (Vector 3 r) (Vector 3 s) where + components :: IndexedTraversal1 Int (Vector 3 r) (Vector 3 s) @@ -1497,8 +1497,8 @@ components {-# INLINE components #-} -instance Semialign (Vector 3) where - align :: forall a b. Vector 3 a -> Vector 3 b -> Vector 3 (These a b) +instance Semialign (Vector 3) where + align :: forall a b. Vector 3 a -> Vector 3 b -> Vector 3 (These a b) align = (a -> b -> These a b) -> Vector 3 a -> Vector 3 b -> Vector 3 (These a b) forall a b c. @@ -1510,35 +1510,35 @@ forall a b. a -> b -> These a b These {-# INLINE align #-} -instance Zip (Vector 3) where - zipWith :: forall a b c. +instance Zip (Vector 3) where + zipWith :: forall a b c. (a -> b -> c) -> Vector 3 a -> Vector 3 b -> Vector 3 c -zipWith a -> b -> c -f (Vector3 a -x a -y a -z) (Vector3 b -x' b -y' b -z') = c -> c -> c -> Vector 3 c +zipWith a -> b -> c +f (Vector3 a +x a +y a +z) (Vector3 b +x' b +y' b +z') = c -> c -> c -> Vector 3 c forall r. r -> r -> r -> Vector 3 r Vector3 (a -> b -> c -f a -x b -x') (a -> b -> c -f a -y b -y') (a -> b -> c -f a -z b -z') +f a +x b +x') (a -> b -> c +f a +y b +y') (a -> b -> c +f a +z b +z') {-# INLINE zipWith #-} -instance FromYAML r => FromYAML (Vector 3 r) where +instance FromYAML r => FromYAML (Vector 3 r) where -- node pos -> Parser - parseYAML :: Node Pos -> Parser (Vector 3 r) -parseYAML Node Pos -node = String + parseYAML :: Node Pos -> Parser (Vector 3 r) +parseYAML Node Pos +node = String -> ([Node Pos] -> Parser (Vector 3 r)) -> Node Pos -> Parser (Vector 3 r) @@ -1546,15 +1546,15 @@ String -> ([Node Pos] -> Parser a) -> Node Pos -> Parser a withSeq String "Vector3" [Node Pos] -> Parser (Vector 3 r) -f Node Pos -node +f Node Pos +node where - f :: [Node Pos] -> Parser (Vector 3 r) -f = \case - [Node Pos -posX,Node Pos -posY,Node Pos -posZ] -> r -> r -> r -> Vector 3 r + f :: [Node Pos] -> Parser (Vector 3 r) +f = \case + [Node Pos +posX,Node Pos +posY,Node Pos +posZ] -> r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (r -> r -> r -> Vector 3 r) -> Parser r -> Parser (r -> r -> Vector 3 r) @@ -1562,47 +1562,47 @@ <$> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posX Parser (r -> r -> Vector 3 r) +posX Parser (r -> r -> Vector 3 r) -> Parser r -> Parser (r -> Vector 3 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posY Parser (r -> Vector 3 r) -> Parser r -> Parser (Vector 3 r) +posY Parser (r -> Vector 3 r) -> Parser r -> Parser (Vector 3 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posZ +posZ [Node Pos] _ -> Node Pos -> String -> Parser (Vector 3 r) forall a. Node Pos -> String -> Parser a failAtNode Node Pos -node String +node String "expected exactly 3 elements" -instance FromJSON r => FromJSON (Vector 3 r) where - parseJSON :: Value -> Parser (Vector 3 r) +instance FromJSON r => FromJSON (Vector 3 r) where + parseJSON :: Value -> Parser (Vector 3 r) parseJSON = String -> (Array -> Parser (Vector 3 r)) -> Value -> Parser (Vector 3 r) forall a. String -> (Array -> Parser a) -> Value -> Parser a withArray String "Vector3" ([Value] -> Parser (Vector 3 r) -f ([Value] -> Parser (Vector 3 r)) +f ([Value] -> Parser (Vector 3 r)) -> (Array -> [Value]) -> Array -> Parser (Vector 3 r) forall b c a. (b -> c) -> (a -> b) -> a -> c . Array -> [Value] forall a. Vector a -> [a] Array.toList) where - f :: [Value] -> Parser (Vector 3 r) -f = \case - [Value -x,Value -y,Value -z] -> r -> r -> r -> Vector 3 r + f :: [Value] -> Parser (Vector 3 r) +f = \case + [Value +x,Value +y,Value +z] -> r -> r -> r -> Vector 3 r forall r. r -> r -> r -> Vector 3 r Vector3 (r -> r -> r -> Vector 3 r) -> Parser r -> Parser (r -> r -> Vector 3 r) @@ -1610,20 +1610,20 @@ <$> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -x Parser (r -> r -> Vector 3 r) +x Parser (r -> r -> Vector 3 r) -> Parser r -> Parser (r -> Vector 3 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -y Parser (r -> Vector 3 r) -> Parser r -> Parser (Vector 3 r) +y Parser (r -> Vector 3 r) -> Parser r -> Parser (Vector 3 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -z +z [Value] _ -> String -> Parser (Vector 3 r) forall a. String -> Parser a @@ -1633,26 +1633,26 @@ -- | cross product -cross :: Num r - => Vector 3 r -> Vector 3 r -> Vector 3 r +cross :: Num r + => Vector 3 r -> Vector 3 r -> Vector 3 r cross :: forall r. Num r => Vector 3 r -> Vector 3 r -> Vector 3 r -cross (MkVector3 V3 r -u) (MkVector3 V3 r -v) = V3 r -> Vector 3 r +cross (MkVector3 V3 r +u) (MkVector3 V3 r +v) = V3 r -> Vector 3 r forall r. V3 r -> Vector 3 r MkVector3 (V3 r -> Vector 3 r) -> V3 r -> Vector 3 r forall a b. (a -> b) -> a -> b $ V3 r -> V3 r -> V3 r forall a. Num a => V3 a -> V3 a -> V3 a Linear.cross V3 r -u V3 r -v +u V3 r +v {-# INLINE cross #-} -------------------------------------------------------------------------------- -newtype instance Vector 4 r = MkVector4 (Linear.V4 r) - deriving newtype (Vector 4 r -> Vector 4 r -> Bool +newtype instance Vector 4 r = MkVector4 (Linear.V4 r) + deriving newtype (Vector 4 r -> Vector 4 r -> Bool (Vector 4 r -> Vector 4 r -> Bool) -> (Vector 4 r -> Vector 4 r -> Bool) -> Eq (Vector 4 r) forall r. Eq r => Vector 4 r -> Vector 4 r -> Bool @@ -1661,7 +1661,7 @@ == :: Vector 4 r -> Vector 4 r -> Bool $c/= :: forall r. Eq r => Vector 4 r -> Vector 4 r -> Bool /= :: Vector 4 r -> Vector 4 r -> Bool -Eq,Eq (Vector 4 r) +Eq,Eq (Vector 4 r) Eq (Vector 4 r) => (Vector 4 r -> Vector 4 r -> Ordering) -> (Vector 4 r -> Vector 4 r -> Bool) @@ -1702,13 +1702,13 @@ max :: Vector 4 r -> Vector 4 r -> Vector 4 r $cmin :: forall r. Ord r => Vector 4 r -> Vector 4 r -> Vector 4 r min :: Vector 4 r -> Vector 4 r -> Vector 4 r -Ord,Vector 4 r -> () +Ord,Vector 4 r -> () (Vector 4 r -> ()) -> NFData (Vector 4 r) forall r. NFData r => Vector 4 r -> () forall a. (a -> ()) -> NFData a $crnf :: forall r. NFData r => Vector 4 r -> () rnf :: Vector 4 r -> () -NFData,Foldable (Vector 4) +NFData,Foldable (Vector 4) Foldable (Vector 4) => (forall m. Semigroup m => Vector 4 m -> m) -> (forall m a. Semigroup m => (a -> m) -> Vector 4 a -> m) @@ -1770,7 +1770,7 @@ $cfoldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 4 a -> b foldrMap1' :: forall a b. (a -> b) -> (a -> b -> b) -> Vector 4 a -> b Foldable1) - deriving stock ((forall x. Vector 4 r -> Rep (Vector 4 r) x) + deriving stock ((forall x. Vector 4 r -> Rep (Vector 4 r) x) -> (forall x. Rep (Vector 4 r) x -> Vector 4 r) -> Generic (Vector 4 r) forall x. Rep (Vector 4 r) x -> Vector 4 r @@ -1783,7 +1783,7 @@ from :: forall x. Vector 4 r -> Rep (Vector 4 r) x $cto :: forall r x. Rep (Vector 4 r) x -> Vector 4 r to :: forall x. Rep (Vector 4 r) x -> Vector 4 r -Generic,(forall a b. (a -> b) -> Vector 4 a -> Vector 4 b) +Generic,(forall a b. (a -> b) -> Vector 4 a -> Vector 4 b) -> (forall a b. a -> Vector 4 b -> Vector 4 a) -> Functor (Vector 4) forall a b. a -> Vector 4 b -> Vector 4 a @@ -1795,7 +1795,7 @@ fmap :: forall a b. (a -> b) -> Vector 4 a -> Vector 4 b $c<$ :: forall a b. a -> Vector 4 b -> Vector 4 a <$ :: forall a b. a -> Vector 4 b -> Vector 4 a -Functor,(forall m. Monoid m => Vector 4 m -> m) +Functor,(forall m. Monoid m => Vector 4 m -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 4 a -> m) -> (forall m a. Monoid m => (a -> m) -> Vector 4 a -> m) -> (forall a b. (a -> b -> b) -> b -> Vector 4 a -> b) @@ -1877,7 +1877,7 @@ sum :: forall a. Num a => Vector 4 a -> a $cproduct :: forall a. Num a => Vector 4 a -> a product :: forall a. Num a => Vector 4 a -> a -Foldable,Functor (Vector 4) +Foldable,Functor (Vector 4) Foldable (Vector 4) (Functor (Vector 4), Foldable (Vector 4)) => (forall (f :: * -> *) a b. @@ -1937,14 +1937,14 @@ Traversable) -- | Construct a vector4 -pattern Vector4 :: r -> r -> r -> r -> Vector 4 r +pattern Vector4 :: r -> r -> r -> r -> Vector 4 r pattern $mVector4 :: forall {r} {r}. Vector 4 r -> (r -> r -> r -> r -> r) -> ((# #) -> r) -> r $bVector4 :: forall r. r -> r -> r -> r -> Vector 4 r -Vector4 x y z w = MkVector4 (Linear.V4 x y z w) +Vector4 x y z w = MkVector4 (Linear.V4 x y z w) {-# COMPLETE Vector4 #-} -asV4 :: forall r s. Iso (Vector 4 r) (Vector 4 s) (Linear.V4 r) (Linear.V4 s) +asV4 :: forall r s. Iso (Vector 4 r) (Vector 4 s) (Linear.V4 r) (Linear.V4 s) asV4 :: forall r s (p :: * -> * -> *) (f :: * -> *). (Profunctor p, Functor f) => p (V4 r) (f (V4 s)) -> p (Vector 4 r) (f (Vector 4 s)) @@ -1954,128 +1954,128 @@ forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b iso (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Vector 4 r) @(Linear.V4 r)) +coerce @(Vector 4 r) @(Linear.V4 r)) (forall a b. Coercible a b => a -> b forall a b. Coercible a b => a -> b -coerce @(Linear.V4 s) @(Vector 4 s)) +coerce @(Linear.V4 s) @(Vector 4 s)) {-# INLINE asV4 #-} -instance Traversable1 (Vector 4) where - traverse1 :: forall (f :: * -> *) a b. +instance Traversable1 (Vector 4) where + traverse1 :: forall (f :: * -> *) a b. Apply f => (a -> f b) -> Vector 4 a -> f (Vector 4 b) -traverse1 a -> f b -f (Vector4 a -x a -y a -z a -w) = b -> b -> b -> b -> Vector 4 b +traverse1 a -> f b +f (Vector4 a +x a +y a +z a +w) = b -> b -> b -> b -> Vector 4 b forall r. r -> r -> r -> r -> Vector 4 r Vector4 (b -> b -> b -> b -> Vector 4 b) -> f b -> f (b -> b -> b -> Vector 4 b) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> a -> f b -f a -x f (b -> b -> b -> Vector 4 b) -> f b -> f (b -> b -> Vector 4 b) +f a +x f (b -> b -> b -> Vector 4 b) -> f b -> f (b -> b -> Vector 4 b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> a -> f b -f a -y f (b -> b -> Vector 4 b) -> f b -> f (b -> Vector 4 b) +f a +y f (b -> b -> Vector 4 b) -> f b -> f (b -> Vector 4 b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> a -> f b -f a -z f (b -> Vector 4 b) -> f b -> f (Vector 4 b) +f a +z f (b -> Vector 4 b) -> f b -> f (Vector 4 b) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> a -> f b -f a -w +f a +w {-# INLINE traverse1 #-} -instance TraversableWithIndex Int (Vector 4) -instance FoldableWithIndex Int (Vector 4) -instance FunctorWithIndex Int (Vector 4) +instance TraversableWithIndex Int (Vector 4) +instance FoldableWithIndex Int (Vector 4) +instance FunctorWithIndex Int (Vector 4) -instance Ixed (Vector 4 r) where - ix :: Index (Vector 4 r) +instance Ixed (Vector 4 r) where + ix :: Index (Vector 4 r) -> Traversal' (Vector 4 r) (IxValue (Vector 4 r)) -ix Index (Vector 4 r) -i IxValue (Vector 4 r) -> f (IxValue (Vector 4 r)) -f v :: Vector 4 r -v@(Vector4 r -x r -y r -z r -w) = case Index (Vector 4 r) -i of +ix Index (Vector 4 r) +i IxValue (Vector 4 r) -> f (IxValue (Vector 4 r)) +f v :: Vector 4 r +v@(Vector4 r +x r +y r +z r +w) = case Index (Vector 4 r) +i of Index (Vector 4 r) -0 -> (\r -x' -> r -> r -> r -> r -> Vector 4 r +0 -> (\r +x' -> r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 r -x' r -y r -z r -w) (r -> Vector 4 r) -> f r -> f (Vector 4 r) +x' r +y r +z r +w) (r -> Vector 4 r) -> f r -> f (Vector 4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 4 r) -> f (IxValue (Vector 4 r)) -f r +f r IxValue (Vector 4 r) -x +x Index (Vector 4 r) -1 -> (\r -y' -> r -> r -> r -> r -> Vector 4 r +1 -> (\r +y' -> r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 r -x r -y' r -z r -w) (r -> Vector 4 r) -> f r -> f (Vector 4 r) +x r +y' r +z r +w) (r -> Vector 4 r) -> f r -> f (Vector 4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 4 r) -> f (IxValue (Vector 4 r)) -f r +f r IxValue (Vector 4 r) -y +y Index (Vector 4 r) -2 -> (\r -z' -> r -> r -> r -> r -> Vector 4 r +2 -> (\r +z' -> r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 r -x r -y r -z' r -w) (r -> Vector 4 r) -> f r -> f (Vector 4 r) +x r +y r +z' r +w) (r -> Vector 4 r) -> f r -> f (Vector 4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 4 r) -> f (IxValue (Vector 4 r)) -f r +f r IxValue (Vector 4 r) -z +z Index (Vector 4 r) -3 -> (\r -w' -> r -> r -> r -> r -> Vector 4 r +3 -> (\r +w' -> r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 r -x r -y r -z r -w') (r -> Vector 4 r) -> f r -> f (Vector 4 r) +x r +y r +z r +w') (r -> Vector 4 r) -> f r -> f (Vector 4 r) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> IxValue (Vector 4 r) -> f (IxValue (Vector 4 r)) -f r +f r IxValue (Vector 4 r) -w +w Index (Vector 4 r) _ -> Vector 4 r -> f (Vector 4 r) forall a. a -> f a forall (f :: * -> *) a. Applicative f => a -> f a pure Vector 4 r -v +v {-# INLINE ix #-} -instance HasComponents (Vector 4 r) (Vector 4 s) where - components :: IndexedTraversal1 +instance HasComponents (Vector 4 r) (Vector 4 s) where + components :: IndexedTraversal1 Int (Vector 4 r) (Vector 4 s) @@ -2102,8 +2102,8 @@ components {-# INLINE components #-} -instance Semialign (Vector 4) where - align :: forall a b. Vector 4 a -> Vector 4 b -> Vector 4 (These a b) +instance Semialign (Vector 4) where + align :: forall a b. Vector 4 a -> Vector 4 b -> Vector 4 (These a b) align = (a -> b -> These a b) -> Vector 4 a -> Vector 4 b -> Vector 4 (These a b) forall a b c. @@ -2115,40 +2115,40 @@ forall a b. a -> b -> These a b These {-# INLINE align #-} -instance Zip (Vector 4) where - zipWith :: forall a b c. +instance Zip (Vector 4) where + zipWith :: forall a b c. (a -> b -> c) -> Vector 4 a -> Vector 4 b -> Vector 4 c -zipWith a -> b -> c -f (Vector4 a -x a -y a -z a -w) (Vector4 b -x' b -y' b -z' b -w') = c -> c -> c -> c -> Vector 4 c +zipWith a -> b -> c +f (Vector4 a +x a +y a +z a +w) (Vector4 b +x' b +y' b +z' b +w') = c -> c -> c -> c -> Vector 4 c forall r. r -> r -> r -> r -> Vector 4 r Vector4 (a -> b -> c -f a -x b -x') (a -> b -> c -f a -y b -y') (a -> b -> c -f a -z b -z') (a -> b -> c -f a -w b -w') +f a +x b +x') (a -> b -> c +f a +y b +y') (a -> b -> c +f a +z b +z') (a -> b -> c +f a +w b +w') {-# INLINE zipWith #-} -instance FromYAML r => FromYAML (Vector 4 r) where +instance FromYAML r => FromYAML (Vector 4 r) where -- node pos -> Parser - parseYAML :: Node Pos -> Parser (Vector 4 r) -parseYAML Node Pos -node = String + parseYAML :: Node Pos -> Parser (Vector 4 r) +parseYAML Node Pos +node = String -> ([Node Pos] -> Parser (Vector 4 r)) -> Node Pos -> Parser (Vector 4 r) @@ -2156,16 +2156,16 @@ String -> ([Node Pos] -> Parser a) -> Node Pos -> Parser a withSeq String "Vector4" [Node Pos] -> Parser (Vector 4 r) -f Node Pos -node +f Node Pos +node where - f :: [Node Pos] -> Parser (Vector 4 r) -f = \case - [Node Pos -posX,Node Pos -posY,Node Pos -posZ,Node Pos -posW] -> + f :: [Node Pos] -> Parser (Vector 4 r) +f = \case + [Node Pos +posX,Node Pos +posY,Node Pos +posZ,Node Pos +posW] -> r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 (r -> r -> r -> r -> Vector 4 r) @@ -2174,55 +2174,55 @@ <$> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posX Parser (r -> r -> r -> Vector 4 r) +posX Parser (r -> r -> r -> Vector 4 r) -> Parser r -> Parser (r -> r -> Vector 4 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posY Parser (r -> r -> Vector 4 r) +posY Parser (r -> r -> Vector 4 r) -> Parser r -> Parser (r -> Vector 4 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posZ Parser (r -> Vector 4 r) -> Parser r -> Parser (Vector 4 r) +posZ Parser (r -> Vector 4 r) -> Parser r -> Parser (Vector 4 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Node Pos -> Parser r forall a. FromYAML a => Node Pos -> Parser a parseYAML Node Pos -posW +posW [Node Pos] _ -> Node Pos -> String -> Parser (Vector 4 r) forall a. Node Pos -> String -> Parser a failAtNode Node Pos -node String +node String "expected exactly 4 elements" -instance FromJSON r => FromJSON (Vector 4 r) where - parseJSON :: Value -> Parser (Vector 4 r) +instance FromJSON r => FromJSON (Vector 4 r) where + parseJSON :: Value -> Parser (Vector 4 r) parseJSON = String -> (Array -> Parser (Vector 4 r)) -> Value -> Parser (Vector 4 r) forall a. String -> (Array -> Parser a) -> Value -> Parser a withArray String "Vector4" ([Value] -> Parser (Vector 4 r) -f ([Value] -> Parser (Vector 4 r)) +f ([Value] -> Parser (Vector 4 r)) -> (Array -> [Value]) -> Array -> Parser (Vector 4 r) forall b c a. (b -> c) -> (a -> b) -> a -> c . Array -> [Value] forall a. Vector a -> [a] Array.toList) where - f :: [Value] -> Parser (Vector 4 r) -f = \case - [Value -x,Value -y,Value -z,Value -w] -> r -> r -> r -> r -> Vector 4 r + f :: [Value] -> Parser (Vector 4 r) +f = \case + [Value +x,Value +y,Value +z,Value +w] -> r -> r -> r -> r -> Vector 4 r forall r. r -> r -> r -> r -> Vector 4 r Vector4 (r -> r -> r -> r -> Vector 4 r) -> Parser r -> Parser (r -> r -> r -> Vector 4 r) @@ -2230,27 +2230,27 @@ <$> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -x Parser (r -> r -> r -> Vector 4 r) +x Parser (r -> r -> r -> Vector 4 r) -> Parser r -> Parser (r -> r -> Vector 4 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -y Parser (r -> r -> Vector 4 r) +y Parser (r -> r -> Vector 4 r) -> Parser r -> Parser (r -> Vector 4 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -z Parser (r -> Vector 4 r) -> Parser r -> Parser (Vector 4 r) +z Parser (r -> Vector 4 r) -> Parser r -> Parser (Vector 4 r) forall a b. Parser (a -> b) -> Parser a -> Parser b forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b <*> Value -> Parser r forall a. FromJSON a => Value -> Parser a parseJSON Value -w +w [Value] _ -> String -> Parser (Vector 4 r) forall a. String -> Parser a @@ -2261,8 +2261,8 @@ -------------------------------------------------------------------------------- -- * Linear Instances -instance HasComponents (Linear.V1 r) (Linear.V1 s) where - components :: IndexedTraversal1 +instance HasComponents (Linear.V1 r) (Linear.V1 s) where + components :: IndexedTraversal1 Int (V1 r) (V1 s) (IxValue (V1 r)) (IxValue (V1 s)) components = ((p ~ (->)) => (r -> f s) -> V1 r -> f (V1 s)) -> (p r (f s) -> V1 r -> f (V1 s)) -> p r (f s) -> V1 r -> f (V1 s) @@ -2281,7 +2281,7 @@ forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V1 r -> f (V1 s) -itraverse1 ((Int -> r -> f s) -> V1 r -> f (V1 s)) +itraverse1 ((Int -> r -> f s) -> V1 r -> f (V1 s)) -> (p r (f s) -> Int -> r -> f s) -> p r (f s) -> V1 r -> f (V1 s) forall b c a. (b -> c) -> (a -> b) -> a -> c . p r (f s) -> Int -> r -> f s @@ -2291,24 +2291,24 @@ p a b -> i -> a -> b indexed) where - itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V1 r -> f (Linear.V1 s) - itraverse1 :: forall (f :: * -> *). + itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V1 r -> f (Linear.V1 s) + itraverse1 :: forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V1 r -> f (V1 s) -itraverse1 Int -> r -> f s -f (Linear.V1 r -x) = s -> V1 s +itraverse1 Int -> r -> f s +f (Linear.V1 r +x) = s -> V1 s forall a. a -> V1 a Linear.V1 (s -> V1 s) -> f s -> f (V1 s) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> r -> f s -f Int +f Int 0 r -x +x {-# INLINE components #-} -instance HasComponents (Linear.V2 r) (Linear.V2 s) where - components :: IndexedTraversal1 +instance HasComponents (Linear.V2 r) (Linear.V2 s) where + components :: IndexedTraversal1 Int (V2 r) (V2 s) (IxValue (V2 r)) (IxValue (V2 s)) components = ((p ~ (->)) => (r -> f s) -> V2 r -> f (V2 s)) -> (p r (f s) -> V2 r -> f (V2 s)) -> p r (f s) -> V2 r -> f (V2 s) @@ -2327,7 +2327,7 @@ forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V2 r -> f (V2 s) -itraverse1 ((Int -> r -> f s) -> V2 r -> f (V2 s)) +itraverse1 ((Int -> r -> f s) -> V2 r -> f (V2 s)) -> (p r (f s) -> Int -> r -> f s) -> p r (f s) -> V2 r -> f (V2 s) forall b c a. (b -> c) -> (a -> b) -> a -> c . p r (f s) -> Int -> r -> f s @@ -2337,32 +2337,32 @@ p a b -> i -> a -> b indexed) where - itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V2 r -> f (Linear.V2 s) - itraverse1 :: forall (f :: * -> *). + itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V2 r -> f (Linear.V2 s) + itraverse1 :: forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V2 r -> f (V2 s) -itraverse1 Int -> r -> f s -f (Linear.V2 r -x r -y) = +itraverse1 Int -> r -> f s +f (Linear.V2 r +x r +y) = s -> s -> V2 s forall a. a -> a -> V2 a Linear.V2 (s -> s -> V2 s) -> f s -> f (s -> V2 s) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> r -> f s -f Int +f Int 0 r -x f (s -> V2 s) -> f s -> f (V2 s) +x f (s -> V2 s) -> f s -> f (V2 s) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> Int -> r -> f s -f Int +f Int 1 r -y +y {-# INLINE components #-} -instance HasComponents (Linear.V3 r) (Linear.V3 s) where - components :: IndexedTraversal1 +instance HasComponents (Linear.V3 r) (Linear.V3 s) where + components :: IndexedTraversal1 Int (V3 r) (V3 s) (IxValue (V3 r)) (IxValue (V3 s)) components = ((p ~ (->)) => (r -> f s) -> V3 r -> f (V3 s)) -> (p r (f s) -> V3 r -> f (V3 s)) -> p r (f s) -> V3 r -> f (V3 s) @@ -2381,7 +2381,7 @@ forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V3 r -> f (V3 s) -itraverse1 ((Int -> r -> f s) -> V3 r -> f (V3 s)) +itraverse1 ((Int -> r -> f s) -> V3 r -> f (V3 s)) -> (p r (f s) -> Int -> r -> f s) -> p r (f s) -> V3 r -> f (V3 s) forall b c a. (b -> c) -> (a -> b) -> a -> c . p r (f s) -> Int -> r -> f s @@ -2391,39 +2391,39 @@ p a b -> i -> a -> b indexed) where - itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V3 r -> f (Linear.V3 s) - itraverse1 :: forall (f :: * -> *). + itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V3 r -> f (Linear.V3 s) + itraverse1 :: forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V3 r -> f (V3 s) -itraverse1 Int -> r -> f s -f (Linear.V3 r -x r -y r -z) = +itraverse1 Int -> r -> f s +f (Linear.V3 r +x r +y r +z) = s -> s -> s -> V3 s forall a. a -> a -> a -> V3 a Linear.V3 (s -> s -> s -> V3 s) -> f s -> f (s -> s -> V3 s) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> r -> f s -f Int +f Int 0 r -x f (s -> s -> V3 s) -> f s -> f (s -> V3 s) +x f (s -> s -> V3 s) -> f s -> f (s -> V3 s) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> Int -> r -> f s -f Int +f Int 1 r -y f (s -> V3 s) -> f s -> f (V3 s) +y f (s -> V3 s) -> f s -> f (V3 s) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> Int -> r -> f s -f Int +f Int 2 r -z +z {-# INLINE components #-} -instance HasComponents (Linear.V4 r) (Linear.V4 s) where - components :: IndexedTraversal1 +instance HasComponents (Linear.V4 r) (Linear.V4 s) where + components :: IndexedTraversal1 Int (V4 r) (V4 s) (IxValue (V4 r)) (IxValue (V4 s)) components = ((p ~ (->)) => (r -> f s) -> V4 r -> f (V4 s)) -> (p r (f s) -> V4 r -> f (V4 s)) -> p r (f s) -> V4 r -> f (V4 s) @@ -2442,7 +2442,7 @@ forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V4 r -> f (V4 s) -itraverse1 ((Int -> r -> f s) -> V4 r -> f (V4 s)) +itraverse1 ((Int -> r -> f s) -> V4 r -> f (V4 s)) -> (p r (f s) -> Int -> r -> f s) -> p r (f s) -> V4 r -> f (V4 s) forall b c a. (b -> c) -> (a -> b) -> a -> c . p r (f s) -> Int -> r -> f s @@ -2452,66 +2452,66 @@ p a b -> i -> a -> b indexed) where - itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V4 r -> f (Linear.V4 s) - itraverse1 :: forall (f :: * -> *). + itraverse1 :: Apply.Apply f => (Int -> r -> f s) -> Linear.V4 r -> f (Linear.V4 s) + itraverse1 :: forall (f :: * -> *). Apply f => (Int -> r -> f s) -> V4 r -> f (V4 s) -itraverse1 Int -> r -> f s -f (Linear.V4 r -x r -y r -z r -w) = +itraverse1 Int -> r -> f s +f (Linear.V4 r +x r +y r +z r +w) = s -> s -> s -> s -> V4 s forall a. a -> a -> a -> a -> V4 a Linear.V4 (s -> s -> s -> s -> V4 s) -> f s -> f (s -> s -> s -> V4 s) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b <$> Int -> r -> f s -f Int +f Int 0 r -x f (s -> s -> s -> V4 s) -> f s -> f (s -> s -> V4 s) +x f (s -> s -> s -> V4 s) -> f s -> f (s -> s -> V4 s) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> Int -> r -> f s -f Int +f Int 1 r -y f (s -> s -> V4 s) -> f s -> f (s -> V4 s) +y f (s -> s -> V4 s) -> f s -> f (s -> V4 s) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> Int -> r -> f s -f Int +f Int 2 r -z f (s -> V4 s) -> f s -> f (V4 s) +z f (s -> V4 s) -> f s -> f (V4 s) forall a b. f (a -> b) -> f a -> f b forall (f :: * -> *) a b. Apply f => f (a -> b) -> f a -> f b Apply.<.> Int -> r -> f s -f Int +f Int 3 r -w +w {-# INLINE components #-} -------------------------------------------------------------------------------- -instance ( HasComponents (Vector d r) (Vector d r) - , Show r - , KnownNat d - ) => Show (Vector d r) where +instance ( HasComponents (Vector d r) (Vector d r) + , Show r + , KnownNat d + ) => Show (Vector d r) where -- | Show implementation for vectors - showsPrec :: Int -> Vector d r -> ShowS -showsPrec Int -k Vector d r -v = Bool -> ShowS -> ShowS + showsPrec :: Int -> Vector d r -> ShowS +showsPrec Int +k Vector d r +v = Bool -> ShowS -> ShowS showParen (Int -k Int -> Int -> Bool +k Int -> Int -> Bool forall a. Ord a => a -> a -> Bool > Int -app_prec) (ShowS -> ShowS) -> ShowS -> ShowS +app_prec) (ShowS -> ShowS) -> ShowS -> ShowS forall a b. (a -> b) -> a -> b $ String -> ShowS showString String -constr ShowS -> ShowS -> ShowS +constr ShowS -> ShowS -> ShowS forall b c a. (b -> c) -> (a -> b) -> a -> c . Char -> ShowS showChar Char @@ -2519,13 +2519,13 @@ forall b c a. (b -> c) -> (a -> b) -> a -> c . [ShowS] -> ShowS -unwordsS ((r -> ShowS) -> [r] -> [ShowS] +unwordsS ((r -> ShowS) -> [r] -> [ShowS] forall a b. (a -> b) -> [a] -> [b] map (Int -> r -> ShowS forall a. Show a => Int -> a -> ShowS showsPrec Int 11) (Vector d r -vVector d r -> Getting (Endo [r]) (Vector d r) r -> [r] +vVector d r -> Getting (Endo [r]) (Vector d r) r -> [r] forall s a. s -> Getting (Endo [a]) s a -> [a] ^..Getting (Endo [r]) (Vector d r) r (IxValue (Vector d r) -> Const (Endo [r]) (IxValue (Vector d r))) @@ -2542,11 +2542,11 @@ (IxValue (Vector d r)) components)) where - app_prec :: Int -app_prec = Int + app_prec :: Int +app_prec = Int 10 - constr :: String -constr = String + constr :: String +constr = String "Vector" String -> ShowS forall a. Semigroup a => a -> a -> a <> Integer -> String @@ -2554,11 +2554,11 @@ show (Nat -> Integer forall a b. (Integral a, Num b) => a -> b fromIntegral (forall (n :: Nat) (proxy :: Nat -> *). KnownNat n => proxy n -> Nat -natVal @d Proxy d +natVal @d Proxy d forall {k} (t :: k). Proxy t Proxy)) - unwordsS :: [ShowS] -> ShowS -unwordsS = (ShowS -> ShowS -> ShowS) -> ShowS -> [ShowS] -> ShowS + unwordsS :: [ShowS] -> ShowS +unwordsS = (ShowS -> ShowS -> ShowS) -> ShowS -> [ShowS] -> ShowS forall a b. (a -> b -> b) -> b -> [a] -> b forall (t :: * -> *) a b. Foldable t => @@ -2577,9 +2577,9 @@ -------------------------------------------------------------------------------- -instance (ToYAML r, HasComponents (Vector d r) (Vector d r)) => ToYAML (Vector d r) where - toYAML :: Vector d r -> Node () -toYAML = [r] -> Node () +instance (ToYAML r, HasComponents (Vector d r) (Vector d r)) => ToYAML (Vector d r) where + toYAML :: Vector d r -> Node () +toYAML = [r] -> Node () forall a. ToYAML a => a -> Node () toYAML ([r] -> Node ()) -> (Vector d r -> [r]) -> Vector d r -> Node () forall b c a. (b -> c) -> (a -> b) -> a -> c @@ -2600,9 +2600,9 @@ (IxValue (Vector d r)) components -instance (ToJSON r, HasComponents (Vector d r) (Vector d r)) => ToJSON (Vector d r) where - toJSON :: Vector d r -> Value -toJSON = [r] -> Value +instance (ToJSON r, HasComponents (Vector d r) (Vector d r)) => ToJSON (Vector d r) where + toJSON :: Vector d r -> Value +toJSON = [r] -> Value forall a. ToJSON a => a -> Value toJSON ([r] -> Value) -> (Vector d r -> [r]) -> Vector d r -> Value forall b c a. (b -> c) -> (a -> b) -> a -> c diff --git a/haddocks/hgeometry/vector/src/HGeometry.Vector.html b/haddocks/hgeometry/vector/src/HGeometry.Vector.html index 561057e58..adfa66ff7 100644 --- a/haddocks/hgeometry/vector/src/HGeometry.Vector.html +++ b/haddocks/hgeometry/vector/src/HGeometry.Vector.html @@ -40,37 +40,37 @@ -- iff scalarMultiple' u v == Just lambda, with lambda > 0 -- -- pre: u and v are colinear, u and v are non-zero -sameDirection :: ( Additive_ vector d r - , Num r, Eq r - ) => vector -> vector -> Bool +sameDirection :: ( Additive_ vector d r + , Num r, Eq r + ) => vector -> vector -> Bool sameDirection :: forall vector (d :: Nat) r. (Additive_ vector d r, Num r, Eq r) => vector -> vector -> Bool -sameDirection vector -u vector -v = All -> Bool +sameDirection vector +u vector +v = All -> Bool getAll (All -> Bool) -> All -> Bool forall a b. (a -> b) -> a -> b $ (r -> r -> All) -> vector -> vector -> All forall vector (d :: Nat) r m. (Additive_ vector d r, Semigroup m) => (r -> r -> m) -> vector -> vector -> m -foldMapZip (\r -ux r -vx -> Bool -> All +foldMapZip (\r +ux r +vx -> Bool -> All All (Bool -> All) -> Bool -> All forall a b. (a -> b) -> a -> b $ r -> r forall a. Num a => a -> a signum r -ux r -> r -> Bool +ux r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -> r forall a. Num a => a -> a signum r -vx) vector -u vector -v +vx) vector +u vector +v {-# INLINE sameDirection #-} -- | 'isScalarmultipleof u v' test if v is a scalar multiple of u. @@ -97,68 +97,68 @@ -- False -- >>> Vector3 0 0 0 `isScalarMultipleOf` Vector3 4 0 5 -- True -isScalarMultipleOf :: ( Eq r, Num r - , Metric_ vector d r +isScalarMultipleOf :: ( Eq r, Num r + , Metric_ vector d r ) - => vector -> vector -> Bool -vector -u isScalarMultipleOf :: forall r vector (d :: Nat). + => vector -> vector -> Bool +vector +u isScalarMultipleOf :: forall r vector (d :: Nat). (Eq r, Num r, Metric_ vector d r) => vector -> vector -> Bool -`isScalarMultipleOf` vector -v = let d :: r -d = vector -u vector -> vector -> r +`isScalarMultipleOf` vector +v = let d :: r +d = vector +u vector -> vector -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> vector -> r `dot` vector -v - num :: r -num = vector -> r +v + num :: r +num = vector -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> r quadrance vector -u r -> r -> r +u r -> r -> r forall a. Num a => a -> a -> a * vector -> r forall vector (d :: Nat) r. (Metric_ vector d r, Num r) => vector -> r quadrance vector -v +v in r -num r -> r -> Bool +num r -> r -> Bool forall a. Eq a => a -> a -> Bool == r 0 Bool -> Bool -> Bool || r -num r -> r -> Bool +num r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -dr -> r -> r +dr -> r -> r forall a. Num a => a -> a -> a *r -d +d -- u `isScalarMultipleOf` v = isJust $ scalarMultiple u v {-# INLINE isScalarMultipleOf #-} -- | scalarMultiple u v computes the scalar labmda s.t. v = lambda * u (if it exists) -scalarMultiple :: (Eq r, Fractional r, Additive_ vector d r) - => vector -> vector -> Maybe r +scalarMultiple :: (Eq r, Fractional r, Additive_ vector d r) + => vector -> vector -> Maybe r scalarMultiple :: forall r vector (d :: Nat). (Eq r, Fractional r, Additive_ vector d r) => vector -> vector -> Maybe r -scalarMultiple vector -u vector -v +scalarMultiple vector +u vector +v | vector -> Bool -allZero vector -u Bool -> Bool -> Bool +allZero vector +u Bool -> Bool -> Bool || vector -> Bool -allZero vector -v = r -> Maybe r +allZero vector +v = r -> Maybe r forall a. a -> Maybe a Just r 0 @@ -168,12 +168,12 @@ (Eq r, Fractional r, Additive_ vector d r) => vector -> vector -> Maybe r scalarMultiple' vector -u vector -v +u vector +v where -- allZero :: (Eq r, Num r, Vector_ vector d r) => vector -> Bool - allZero :: vector -> Bool -allZero = Getting All vector (IxValue vector) + allZero :: vector -> Bool +allZero = Getting All vector (IxValue vector) -> (IxValue vector -> Bool) -> vector -> Bool forall s a. Getting All s a -> (a -> Bool) -> s -> Bool allOf Getting All vector (IxValue vector) @@ -190,7 +190,7 @@ {-# INLINE scalarMultiple #-} -- | Helper type for implementing scalarMultiple -data ScalarMultiple r = No | Maybe | Yes r deriving (ScalarMultiple r -> ScalarMultiple r -> Bool +data ScalarMultiple r = No | Maybe | Yes r deriving (ScalarMultiple r -> ScalarMultiple r -> Bool (ScalarMultiple r -> ScalarMultiple r -> Bool) -> (ScalarMultiple r -> ScalarMultiple r -> Bool) -> Eq (ScalarMultiple r) @@ -200,7 +200,7 @@ == :: ScalarMultiple r -> ScalarMultiple r -> Bool $c/= :: forall r. Eq r => ScalarMultiple r -> ScalarMultiple r -> Bool /= :: ScalarMultiple r -> ScalarMultiple r -> Bool -Eq,Int -> ScalarMultiple r -> ShowS +Eq,Int -> ScalarMultiple r -> ShowS [ScalarMultiple r] -> ShowS ScalarMultiple r -> String (Int -> ScalarMultiple r -> ShowS) @@ -220,9 +220,9 @@ showList :: [ScalarMultiple r] -> ShowS Show) -instance Eq r => Semigroup (ScalarMultiple r) where +instance Eq r => Semigroup (ScalarMultiple r) where ScalarMultiple r -No <> :: ScalarMultiple r -> ScalarMultiple r -> ScalarMultiple r +No <> :: ScalarMultiple r -> ScalarMultiple r -> ScalarMultiple r <> ScalarMultiple r _ = ScalarMultiple r forall r. ScalarMultiple r @@ -233,51 +233,51 @@ forall r. ScalarMultiple r No ScalarMultiple r -Maybe <> ScalarMultiple r -x = ScalarMultiple r -x - ScalarMultiple r -x <> ScalarMultiple r +Maybe <> ScalarMultiple r +x = ScalarMultiple r +x + ScalarMultiple r +x <> ScalarMultiple r Maybe = ScalarMultiple r -x - (Yes r -x) <> (Yes r -y) +x + (Yes r +x) <> (Yes r +y) | r -x r -> r -> Bool +x r -> r -> Bool forall a. Eq a => a -> a -> Bool == r -y = r -> ScalarMultiple r +y = r -> ScalarMultiple r forall r. r -> ScalarMultiple r Yes r -x +x | Bool otherwise = ScalarMultiple r forall r. ScalarMultiple r No -instance Eq r => Monoid (ScalarMultiple r) where - mempty :: ScalarMultiple r +instance Eq r => Monoid (ScalarMultiple r) where + mempty :: ScalarMultiple r mempty = ScalarMultiple r forall r. ScalarMultiple r Maybe - mappend :: ScalarMultiple r -> ScalarMultiple r -> ScalarMultiple r + mappend :: ScalarMultiple r -> ScalarMultiple r -> ScalarMultiple r mappend = ScalarMultiple r -> ScalarMultiple r -> ScalarMultiple r forall a. Semigroup a => a -> a -> a (<>) -- | Actual implementation of scalarMultiple -scalarMultiple' :: (Eq r, Fractional r, Additive_ vector d r) - => vector -> vector -> Maybe r +scalarMultiple' :: (Eq r, Fractional r, Additive_ vector d r) + => vector -> vector -> Maybe r scalarMultiple' :: forall r vector (d :: Nat). (Eq r, Fractional r, Additive_ vector d r) => vector -> vector -> Maybe r -scalarMultiple' vector -u vector -v = ScalarMultiple r -> Maybe r +scalarMultiple' vector +u vector +v = ScalarMultiple r -> Maybe r forall {a}. ScalarMultiple a -> Maybe a -g (ScalarMultiple r -> Maybe r) -> ScalarMultiple r -> Maybe r +g (ScalarMultiple r -> Maybe r) -> ScalarMultiple r -> Maybe r forall a b. (a -> b) -> a -> b $ (r -> r -> ScalarMultiple r) -> vector -> vector -> ScalarMultiple r @@ -286,59 +286,59 @@ (r -> r -> m) -> vector -> vector -> m foldMapZip r -> r -> ScalarMultiple r forall {r}. (Eq r, Fractional r) => r -> r -> ScalarMultiple r -f vector -u vector -v +f vector +u vector +v where - f :: r -> r -> ScalarMultiple r -f r + f :: r -> r -> ScalarMultiple r +f r 0 r 0 = ScalarMultiple r forall r. ScalarMultiple r Maybe -- we don't know lambda yet, but it may still be a scalar mult. - f r + f r _ r 0 = ScalarMultiple r forall r. ScalarMultiple r No -- Not a scalar multiple - f r -ui r -vi = r -> ScalarMultiple r + f r +ui r +vi = r -> ScalarMultiple r forall r. r -> ScalarMultiple r Yes (r -> ScalarMultiple r) -> r -> ScalarMultiple r forall a b. (a -> b) -> a -> b $ r -ui r -> r -> r +ui r -> r -> r forall a. Fractional a => a -> a -> a / r -vi -- can still be a scalar multiple +vi -- can still be a scalar multiple - g :: ScalarMultiple a -> Maybe a -g ScalarMultiple a + g :: ScalarMultiple a -> Maybe a +g ScalarMultiple a No = Maybe a forall a. Maybe a Nothing - g ScalarMultiple a + g ScalarMultiple a Maybe = String -> Maybe a forall a. HasCallStack => String -> a error String "scalarMultiple': found a Maybe, which means the vectors either have length zero, or one of them is all Zero!" - g (Yes a -x) = a -> Maybe a + g (Yes a +x) = a -> Maybe a forall a. a -> Maybe a Just a -x +x -------------------------------------------------------------------------------- -- * unboxed vectors -- | elements of the vector are stored consecutively -newtype instance UMV.MVector s (Vector d r) = MV_VectorD (UMV.MVector s r) -newtype instance UV.Vector (Vector d r) = V_VectorD (UV.Vector r) +newtype instance UMV.MVector s (Vector d r) = MV_VectorD (UMV.MVector s r) +newtype instance UV.Vector (Vector d r) = V_VectorD (UV.Vector r) -- | get the dimension as an Int -natVal' :: forall d. KnownNat d => Int +natVal' :: forall d. KnownNat d => Int natVal' :: forall (d :: Nat). KnownNat d => Int natVal' = Nat -> Int forall a b. (Integral a, Num b) => a -> b @@ -348,34 +348,34 @@ forall (n :: Nat) (proxy :: Nat -> *). KnownNat n => proxy n -> Nat natVal (forall (t :: Nat). Proxy t forall {k} (t :: k). Proxy t -Proxy @d) +Proxy @d) -instance ( GMV.MVector UMV.MVector r - , Vector_ (Vector d r) d r - ) => GMV.MVector UMV.MVector (Vector d r) where +instance ( GMV.MVector UMV.MVector r + , Vector_ (Vector d r) d r + ) => GMV.MVector UMV.MVector (Vector d r) where - basicLength :: forall s. MVector s (Vector d r) -> Int -basicLength (MV_VectorD MVector s r -v) = let d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d + basicLength :: forall s. MVector s (Vector d r) -> Int +basicLength (MV_VectorD MVector s r +v) = let d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d in MVector s r -> Int forall s. MVector s r -> Int forall (v :: * -> * -> *) a s. MVector v a => v s a -> Int GMV.basicLength MVector s r -v Int -> Int -> Int +v Int -> Int -> Int forall a. Integral a => a -> a -> a `div` Int -d +d {-# INLINE basicLength #-} - basicUnsafeSlice :: forall s. + basicUnsafeSlice :: forall s. Int -> Int -> MVector s (Vector d r) -> MVector s (Vector d r) -basicUnsafeSlice Int -s Int -l (MV_VectorD MVector s r -v) = let d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d +basicUnsafeSlice Int +s Int +l (MV_VectorD MVector s r +v) = let d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d in MVector s r -> MVector s (Vector d r) forall s (d :: Nat) r. MVector s r -> MVector s (Vector d r) MV_VectorD (MVector s r -> MVector s (Vector d r)) @@ -387,33 +387,33 @@ MVector v a => Int -> Int -> v s a -> v s a GMV.basicUnsafeSlice (Int -dInt -> Int -> Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -s) (Int -dInt -> Int -> Int +s) (Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -l) MVector s r -v +l) MVector s r +v {-# INLINE basicUnsafeSlice #-} - basicOverlaps :: forall s. MVector s (Vector d r) -> MVector s (Vector d r) -> Bool -basicOverlaps (MV_VectorD MVector s r -v) (MV_VectorD MVector s r -v') = MVector s r -> MVector s r -> Bool + basicOverlaps :: forall s. MVector s (Vector d r) -> MVector s (Vector d r) -> Bool +basicOverlaps (MV_VectorD MVector s r +v) (MV_VectorD MVector s r +v') = MVector s r -> MVector s r -> Bool forall s. MVector s r -> MVector s r -> Bool forall (v :: * -> * -> *) a s. MVector v a => v s a -> v s a -> Bool GMV.basicOverlaps MVector s r -v MVector s r -v' +v MVector s r +v' {-# INLINE basicOverlaps #-} - basicUnsafeNew :: forall s. Int -> ST s (MVector s (Vector d r)) -basicUnsafeNew Int -n = let d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d + basicUnsafeNew :: forall s. Int -> ST s (MVector s (Vector d r)) +basicUnsafeNew Int +n = let d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d in MVector s r -> MVector s (Vector d r) forall s (d :: Nat) r. MVector s r -> MVector s (Vector d r) MV_VectorD (MVector s r -> MVector s (Vector d r)) @@ -423,25 +423,25 @@ forall s. Int -> ST s (MVector s r) forall (v :: * -> * -> *) a s. MVector v a => Int -> ST s (v s a) GMV.basicUnsafeNew (Int -dInt -> Int -> Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -n) +n) {-# INLINE basicUnsafeNew #-} - basicInitialize :: forall s. MVector s (Vector d r) -> ST s () -basicInitialize (MV_VectorD MVector s r -v) = MVector s r -> ST s () + basicInitialize :: forall s. MVector s (Vector d r) -> ST s () +basicInitialize (MV_VectorD MVector s r +v) = MVector s r -> ST s () forall s. MVector s r -> ST s () forall (v :: * -> * -> *) a s. MVector v a => v s a -> ST s () GMV.basicInitialize MVector s r -v +v {-# INLINE basicInitialize#-} - basicUnsafeRead :: forall s. MVector s (Vector d r) -> Int -> ST s (Vector d r) -basicUnsafeRead (MV_VectorD MVector s r -v) Int -i = let d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d + basicUnsafeRead :: forall s. MVector s (Vector d r) -> Int -> ST s (Vector d r) +basicUnsafeRead (MV_VectorD MVector s r +v) Int +i = let d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d in (Int -> ST s r) -> ST s (Vector d r) forall vector (d :: Nat) r (f :: * -> *). (Vector_ vector d r, Applicative f) => @@ -452,27 +452,27 @@ generateA ((Int -> ST s r) -> ST s (Vector d r)) -> (Int -> ST s r) -> ST s (Vector d r) forall a b. (a -> b) -> a -> b -$ \Int -j -> MVector s r -> Int -> ST s r +$ \Int +j -> MVector s r -> Int -> ST s r forall s. MVector s r -> Int -> ST s r forall (v :: * -> * -> *) a s. MVector v a => v s a -> Int -> ST s a GMV.basicUnsafeRead MVector s r -v (Int -dInt -> Int -> Int +v (Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int -j) +j) {-# INLINE basicUnsafeRead #-} - basicUnsafeWrite :: forall s. MVector s (Vector d r) -> Int -> Vector d r -> ST s () -basicUnsafeWrite (MV_VectorD MVector s r -v) Int -i Vector d r -w = IndexedGetting Int (Sequenced () (ST s)) (Vector d r) r + basicUnsafeWrite :: forall s. MVector s (Vector d r) -> Int -> Vector d r -> ST s () +basicUnsafeWrite (MV_VectorD MVector s r +v) Int +i Vector d r +w = IndexedGetting Int (Sequenced () (ST s)) (Vector d r) r -> (Int -> r -> ST s ()) -> Vector d r -> ST s () forall (m :: * -> *) i r s a. Monad m => @@ -495,41 +495,41 @@ (IxValue (Vector d r)) (IxValue (Vector d r)) components Int -> r -> ST s () -f Vector d r -w +f Vector d r +w where - f :: Int -> r -> ST s () -f Int -j r -x = MVector s r -> Int -> r -> ST s () + f :: Int -> r -> ST s () +f Int +j r +x = MVector s r -> Int -> r -> ST s () forall s. MVector s r -> Int -> r -> ST s () forall (v :: * -> * -> *) a s. MVector v a => v s a -> Int -> a -> ST s () GMV.basicUnsafeWrite MVector s r -v (Int -dInt -> Int -> Int +v (Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int -j) r -x - d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d +j) r +x + d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d {-# INLINE basicUnsafeWrite #-} -instance ( GV.Vector UV.Vector r - , Vector_ (Vector d r) d r - ) => GV.Vector UV.Vector (Vector d r) where +instance ( GV.Vector UV.Vector r + , Vector_ (Vector d r) d r + ) => GV.Vector UV.Vector (Vector d r) where - basicUnsafeFreeze :: forall s. + basicUnsafeFreeze :: forall s. Mutable Vector s (Vector d r) -> ST s (Vector (Vector d r)) -basicUnsafeFreeze (MV_VectorD MVector s r -mv) = Vector r -> Vector (Vector d r) +basicUnsafeFreeze (MV_VectorD MVector s r +mv) = Vector r -> Vector (Vector d r) forall (d :: Nat) r. Vector r -> Vector (Vector d r) V_VectorD (Vector r -> Vector (Vector d r)) -> ST s (Vector r) -> ST s (Vector (Vector d r)) @@ -539,12 +539,12 @@ forall (v :: * -> *) a s. Vector v a => Mutable v s a -> ST s (v a) GV.basicUnsafeFreeze MVector s r Mutable Vector s r -mv +mv {-# INLINE basicUnsafeFreeze #-} - basicUnsafeThaw :: forall s. + basicUnsafeThaw :: forall s. Vector (Vector d r) -> ST s (Mutable Vector s (Vector d r)) -basicUnsafeThaw (V_VectorD Vector r -v) = MVector s r -> MVector s (Vector d r) +basicUnsafeThaw (V_VectorD Vector r +v) = MVector s r -> MVector s (Vector d r) forall s (d :: Nat) r. MVector s r -> MVector s (Vector d r) MV_VectorD (MVector s r -> MVector s (Vector d r)) -> ST s (MVector s r) -> ST s (MVector s (Vector d r)) @@ -553,28 +553,28 @@ forall s. Vector r -> ST s (Mutable Vector s r) forall (v :: * -> *) a s. Vector v a => v a -> ST s (Mutable v s a) GV.basicUnsafeThaw Vector r -v +v {-# INLINE basicUnsafeThaw #-} - basicLength :: Vector (Vector d r) -> Int -basicLength (V_VectorD Vector r -v) = let d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d + basicLength :: Vector (Vector d r) -> Int +basicLength (V_VectorD Vector r +v) = let d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d in Vector r -> Int forall (v :: * -> *) a. Vector v a => v a -> Int GV.basicLength Vector r -v Int -> Int -> Int +v Int -> Int -> Int forall a. Integral a => a -> a -> a `div` Int -d +d {-# INLINE basicLength #-} - basicUnsafeSlice :: Int -> Int -> Vector (Vector d r) -> Vector (Vector d r) -basicUnsafeSlice Int -s Int -l (V_VectorD Vector r -v) = let d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d + basicUnsafeSlice :: Int -> Int -> Vector (Vector d r) -> Vector (Vector d r) +basicUnsafeSlice Int +s Int +l (V_VectorD Vector r +v) = let d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d in Vector r -> Vector (Vector d r) forall (d :: Nat) r. Vector r -> Vector (Vector d r) V_VectorD (Vector r -> Vector (Vector d r)) @@ -583,22 +583,22 @@ $ Int -> Int -> Vector r -> Vector r forall (v :: * -> *) a. Vector v a => Int -> Int -> v a -> v a GV.basicUnsafeSlice (Int -dInt -> Int -> Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -s) (Int -dInt -> Int -> Int +s) (Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -l) Vector r -v +l) Vector r +v {-# INLINE basicUnsafeSlice #-} - basicUnsafeIndexM :: Vector (Vector d r) -> Int -> Box (Vector d r) -basicUnsafeIndexM (V_VectorD Vector r -v) Int -i = let d :: Int -d = forall (d :: Nat). KnownNat d => Int -natVal' @d + basicUnsafeIndexM :: Vector (Vector d r) -> Int -> Box (Vector d r) +basicUnsafeIndexM (V_VectorD Vector r +v) Int +i = let d :: Int +d = forall (d :: Nat). KnownNat d => Int +natVal' @d in (Int -> Box r) -> Box (Vector d r) forall vector (d :: Nat) r (f :: * -> *). (Vector_ vector d r, Applicative f) => @@ -609,22 +609,22 @@ generateA ((Int -> Box r) -> Box (Vector d r)) -> (Int -> Box r) -> Box (Vector d r) forall a b. (a -> b) -> a -> b -$ \Int -j -> Vector r -> Int -> Box r +$ \Int +j -> Vector r -> Int -> Box r forall (v :: * -> *) a. Vector v a => v a -> Int -> Box a GV.basicUnsafeIndexM Vector r -v (Int -dInt -> Int -> Int +v (Int +dInt -> Int -> Int forall a. Num a => a -> a -> a *Int -iInt -> Int -> Int +iInt -> Int -> Int forall a. Num a => a -> a -> a +Int -j) +j) {-# INLINE basicUnsafeIndexM #-} -instance ( UV.Unbox r, Vector_ (Vector d r) d r - ) => UV.Unbox (Vector d r) where +instance ( UV.Unbox r, Vector_ (Vector d r) d r + ) => UV.Unbox (Vector d r) where -------------------------------------------------------------------------------- diff --git a/haddocks/index.html b/haddocks/index.html index 5aff24ee8..dd74e906b 100644 --- a/haddocks/index.html +++ b/haddocks/index.html @@ -1 +1 @@ -

Packages

hgeometry-1.0.0.0

hgeometry:geojson-1.0.0.0

hgeometry:ipe-1.0.0.0

hgeometry:kernel-1.0.0.0

hgeometry:kernel-quickcheck-1.0.0.0

hgeometry:miso-1.0.0.0

hgeometry:point-1.0.0.0

hgeometry:point-quickcheck-1.0.0.0

hgeometry:quickcheck-1.0.0.0

hgeometry:svg-1.0.0.0

hgeometry:vector-1.0.0.0

hgeometry:vector-quickcheck-1.0.0.0

hgeometry-combinatorial-1.0.0.0

hgeometry-combinatorial:quickcheck-1.0.0.0

\ No newline at end of file +

Packages

hgeometry-1.0.0.0

hgeometry:geojson-1.0.0.0

hgeometry:ipe-1.0.0.0

hgeometry:kernel-1.0.0.0

hgeometry:kernel-quickcheck-1.0.0.0

hgeometry:miso-1.0.0.0

hgeometry:point-1.0.0.0

hgeometry:point-quickcheck-1.0.0.0

hgeometry:quickcheck-1.0.0.0

hgeometry:svg-1.0.0.0

hgeometry:vector-1.0.0.0

hgeometry:vector-quickcheck-1.0.0.0

hgeometry-combinatorial-1.0.0.0

hgeometry-combinatorial:quickcheck-1.0.0.0

\ No newline at end of file