Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type family Dimension t :: Nat
- type family NumType t :: *
- data NoIntersection = NoIntersection
- type Intersection g h = CoRec Identity (IntersectionOf g h)
- type family IntersectionOf g h :: [*]
- coRec :: a ∈ as => a -> CoRec Identity as
- class IsIntersectableWith g h where
- type AlwaysTrueIntersection g h = RecApplicative (IntersectionOf g h)
- defaultNonEmptyIntersection :: forall g h proxy. (NoIntersection ∈ IntersectionOf g h, RecApplicative (IntersectionOf g h)) => proxy g -> proxy h -> Intersection g h -> Bool
- type family Union g h :: *
- class IsUnionableWith g h where
Documentation
type family Dimension t :: Nat Source #
A type family for types that are associated with a dimension. The dimension is the dimension of the geometry they are embedded in.
type Dimension (Boundary g) Source # | |
type Dimension (Image r) Source # | |
type Dimension (IpeSymbol r) Source # | |
type Dimension (MiniPage r) Source # | |
type Dimension (TextLabel r) Source # | |
type Dimension (PathSegment r) Source # | |
type Dimension (Path r) Source # | |
type Dimension (IpeObject r) Source # | |
type Dimension (Group r) Source # | |
type Dimension (Interval a r) Source # | |
type Dimension (Point d r) Source # | |
type Dimension (Line d r) Source # | |
type Dimension (HalfLine d r) Source # | |
type Dimension (ConvexPolygon p r) Source # | |
type Dimension (Triangle p r) Source # | |
type Dimension (SubLine d p r) Source # | |
type Dimension (Box d p r) Source # | |
type Dimension (LineSegment d p r) Source # | |
type Dimension (Ball d p r) Source # | |
type Dimension (PolyLine d p r) Source # | |
type Dimension (Polygon t p r) Source # | |
type family NumType t :: * Source #
A type family for types that have an associated numeric type.
type NumType (Range a) Source # | |
type NumType (Boundary g) Source # | |
type NumType (Image r) Source # | |
type NumType (IpeSymbol r) Source # | |
type NumType (MiniPage r) Source # | |
type NumType (TextLabel r) Source # | |
type NumType (PathSegment r) Source # | |
type NumType (Path r) Source # | |
type NumType (IpeObject r) Source # | |
type NumType (Group r) Source # | |
type NumType (I a) Source # | |
type NumType (Interval a r) Source # | |
type NumType (Point d r) Source # | |
type NumType (Line d r) Source # | |
type NumType (Transformation d r) Source # | |
type NumType (HalfLine d r) Source # | |
type NumType (ConvexPolygon p r) Source # | |
type NumType (Triangle p r) Source # | |
type NumType (SubLine d p r) Source # | |
type NumType (Box d p r) Source # | |
type NumType (LineSegment d p r) Source # | |
type NumType (Ball d p r) Source # | |
type NumType (PolyLine d p r) Source # | |
type NumType (Polygon t p r) Source # | |
type NumType (PlaneGraph k s w v e f r) Source # | |
data NoIntersection Source #
A simple data type expressing that there are no intersections
type Intersection g h = CoRec Identity (IntersectionOf g h) Source #
The result of interesecting two geometries is a CoRec,
type family IntersectionOf g h :: [*] Source #
The type family specifying the list of possible result types of an intersection.
class IsIntersectableWith g h where Source #
intersect :: g -> h -> Intersection g h Source #
intersects :: g -> h -> Bool Source #
g intersects
h = The intersection of g and h is non-empty.
The default implementation computes the intersection of g and h, and uses nonEmptyIntersection to determine if the intersection is non-empty.
nonEmptyIntersection :: proxy g -> proxy h -> Intersection g h -> Bool Source #
Helper to implement intersects
.
nonEmptyIntersection :: (NoIntersection ∈ IntersectionOf g h, RecApplicative (IntersectionOf g h)) => proxy g -> proxy h -> Intersection g h -> Bool Source #
Helper to implement intersects
.
type AlwaysTrueIntersection g h = RecApplicative (IntersectionOf g h) Source #
When using IntersectionOf we may need some constraints that are always true anyway.
defaultNonEmptyIntersection :: forall g h proxy. (NoIntersection ∈ IntersectionOf g h, RecApplicative (IntersectionOf g h)) => proxy g -> proxy h -> Intersection g h -> Bool Source #
Returns True iff the result is *not* a NoIntersection