Here’s what I coalesced on, so far:
abstract type AbstractPeriod end
abstract type Instantaneous <: AbstractPeriod end
abstract type Prolonged <: AbstractPeriod end
abstract type POIType{T <: AbstractPeriod} end
for i in (:Nest, :Feeder)
@eval struct $i <: POIType{Instantaneous} end
end
for i in (:Track, )
@eval struct $i <: POIType{Prolonged} end
end
abstract type DurationType{T <: AbstractPeriod} end
struct Interval <: DurationType{Prolonged}
anchor::Nanosecond
duration::Nanosecond
end
struct Instant <: DurationType{Instantaneous}
anchor::Nanosecond
end
struct POI{P <: POIType, D <: DurationType}
type::P
temporal::D
POI(type::P, temporal::D) where {T <: AbstractPeriod, P <: POIType{T}, D <: DurationType{T}} = new{P, D}(type, temporal)
end