Idris2Doc : IotaTime.Interval

IotaTime.Interval

(source)

Reexports

importpublic Data.So
importpublic IotaTime.Duration
importpublic IotaTime.Instant

Definitions

recordIntervalRep : Type
  A half-open interval `[start, end)` on the global timeline.

Totality: total
Visibility: export
Constructor: 
MkInterval : (storedStart : Instant) -> (storedEnd : Instant) -> (0_ : So (toNanosecondsSinceEpochstoredStart<=toNanosecondsSinceEpochstoredEnd)) ->IntervalRep

Projections:
.storedEnd : IntervalRep->Instant
.storedStart : IntervalRep->Instant
0.valid : ({rec:0} : IntervalRep) ->So (toNanosecondsSinceEpoch (storedStart{rec:0}) <=toNanosecondsSinceEpoch (storedEnd{rec:0}))

Hints:
EqIntervalRep
OrdIntervalRep
ShowIntervalRep
Interval : Type
Totality: total
Visibility: public export
isValidInterval : Instant->Instant->Bool
  Decide whether two instants are ordered as a valid interval.

Totality: total
Visibility: public export
interval : (startNanoseconds : Integer) -> (endNanoseconds : Integer) -> {auto0_ : So (startNanoseconds<=endNanoseconds)} ->Interval
  Construct a statically validated half-open interval from nanosecond counts
relative to the library epoch.

Totality: total
Visibility: public export
dataIntervalError : Type
Totality: total
Visibility: public export
Constructor: 
ReversedInterval : Instant->Instant->IntervalError
refineInterval : Instant->Instant->EitherIntervalErrorInterval
  Validate arbitrary endpoints learned at runtime.

Totality: total
Visibility: public export
start : Interval->Instant
Totality: total
Visibility: public export
end : Interval->Instant
Totality: total
Visibility: public export
0intervalIsValid : (value : Interval) ->So (isValidInterval (startvalue) (endvalue))
  Every interval carries erased evidence that its endpoints are ordered.

Totality: total
Visibility: public export
contains : Interval->Instant->Bool
  Test membership in the half-open interval `[start, end)`.

Totality: total
Visibility: public export
isEmpty : Interval->Bool
  Whether the interval contains no instants.

Totality: total
Visibility: public export
overlaps : Interval->Interval->Bool
  Whether two half-open intervals share at least one instant.

Totality: total
Visibility: public export
isAdjacent : Interval->Interval->Bool
  Whether two non-overlapping intervals touch at one endpoint.

Totality: total
Visibility: public export
intersectionStart : Interval->Interval->Instant
  The later start bound selected for an intersection.

Totality: total
Visibility: public export
intersectionEnd : Interval->Interval->Instant
  The earlier end bound selected for an intersection.

Totality: total
Visibility: public export
hasNonEmptyIntersection : Interval->Interval->Bool
  Whether two intervals have a valid, non-empty intersection.

Totality: total
Visibility: public export
intersection : (left : Interval) -> (right : Interval) -> {auto0_ : So (hasNonEmptyIntersectionleftright)} ->Interval
  Return the non-empty intersection when its existence is statically known.

Totality: total
Visibility: public export
dataIntersectionError : Type
Totality: total
Visibility: public export
Constructor: 
NoNonEmptyIntersection : IntersectionError
refineIntersection : Interval->Interval->EitherIntersectionErrorInterval
  Return the non-empty intersection of intervals learned at runtime.

Totality: total
Visibility: public export
unionStart : Interval->Interval->Instant
  The start bound selected for a connected union.

Totality: total
Visibility: public export
unionEnd : Interval->Interval->Instant
  The end bound selected for a connected union.

Totality: total
Visibility: public export
isConnected : Interval->Interval->Bool
Totality: total
Visibility: public export
union : (left : Interval) -> (right : Interval) -> {auto0_ : So (isConnectedleftright)} ->Interval
  Return the smallest interval containing both inputs when their union is
statically known to be connected. Empty intervals are absorbed by the
other input.

Totality: total
Visibility: public export
dataUnionError : Type
Totality: total
Visibility: public export
Constructor: 
DisconnectedIntervals : UnionError
refineUnion : Interval->Interval->EitherUnionErrorInterval
  Return the connected union of intervals learned at runtime.

Totality: total
Visibility: public export
duration : Interval->Duration
  Return the nonnegative fixed duration between the endpoints.

Totality: total
Visibility: public export
isValidUnboundedInterval : MaybeInstant->MaybeInstant->Bool
  A half-open timeline interval whose start, end, or both may be unbounded.
`Nothing` denotes negative infinity for the start and positive infinity for
the end.
Decide whether optional endpoints are ordered as a valid interval.

Totality: total
Visibility: public export
isValidUnboundedNanosecondInterval : MaybeInteger->MaybeInteger->Bool
Totality: total
Visibility: public export
recordUnboundedIntervalRep : Type
Totality: total
Visibility: export
Constructor: 
MkUnboundedInterval : (storedUnboundedStart : MaybeInstant) -> (storedUnboundedEnd : MaybeInstant) -> (0_ : So (isValidUnboundedIntervalstoredUnboundedStartstoredUnboundedEnd)) ->UnboundedIntervalRep

Projections:
.storedUnboundedEnd : UnboundedIntervalRep->MaybeInstant
.storedUnboundedStart : UnboundedIntervalRep->MaybeInstant
0.valid : ({rec:0} : UnboundedIntervalRep) ->So (isValidUnboundedInterval (storedUnboundedStart{rec:0}) (storedUnboundedEnd{rec:0}))

Hints:
EqUnboundedIntervalRep
OrdUnboundedIntervalRep
ShowUnboundedIntervalRep
UnboundedInterval : Type
Totality: total
Visibility: public export
unboundedInterval : (startNanoseconds : MaybeInteger) -> (endNanoseconds : MaybeInteger) -> {auto0_ : So (isValidUnboundedNanosecondIntervalstartNanosecondsendNanoseconds)} ->UnboundedInterval
  Construct a statically validated interval with optional endpoints.

Totality: total
Visibility: public export
refineUnboundedInterval : MaybeInstant->MaybeInstant->EitherIntervalErrorUnboundedInterval
  Validate optional endpoints learned at runtime.

Totality: total
Visibility: public export
unboundedStart : UnboundedInterval->MaybeInstant
Totality: total
Visibility: public export
unboundedEnd : UnboundedInterval->MaybeInstant
Totality: total
Visibility: public export
0unboundedIntervalIsValid : (value : UnboundedInterval) ->So (isValidUnboundedInterval (unboundedStartvalue) (unboundedEndvalue))
  Every unbounded interval carries erased evidence that its finite endpoints
are ordered.

Totality: total
Visibility: public export
toUnboundedInterval : Interval->UnboundedInterval
  Treat a bounded interval as an interval with two finite bounds.

Totality: total
Visibility: public export
toBoundedInterval : UnboundedInterval->MaybeInterval
  Recover a bounded interval only when both endpoints are finite.

Totality: total
Visibility: public export
unboundedContains : UnboundedInterval->Instant->Bool
  Test membership using half-open endpoint semantics at every finite bound.

Totality: total
Visibility: public export
unboundedIsEmpty : UnboundedInterval->Bool
  Whether the interval contains no instants.

Totality: total
Visibility: public export
unboundedEndAfterStart : MaybeInstant->MaybeInstant->Bool
  Whether an optional end lies after an optional start, treating `Nothing`
as the appropriate infinity.

Totality: total
Visibility: public export
unboundedOverlaps : UnboundedInterval->UnboundedInterval->Bool
  Whether two unbounded intervals share at least one instant.

Totality: total
Visibility: public export
finiteUnboundedBoundsEqual : MaybeInstant->MaybeInstant->Bool
  Whether two optional bounds are finite and equal.

Totality: total
Visibility: public export
unboundedIsAdjacent : UnboundedInterval->UnboundedInterval->Bool
  Whether two non-overlapping intervals touch at one finite endpoint.

Totality: total
Visibility: public export
unboundedIntersectionStart : UnboundedInterval->UnboundedInterval->MaybeInstant
  The later optional start bound selected for an intersection.

Totality: total
Visibility: public export
unboundedIntersectionEnd : UnboundedInterval->UnboundedInterval->MaybeInstant
  The earlier optional end bound selected for an intersection.

Totality: total
Visibility: public export
hasNonEmptyUnboundedIntersection : UnboundedInterval->UnboundedInterval->Bool
  Whether two unbounded intervals have a valid, non-empty intersection.

Totality: total
Visibility: public export
unboundedIntersection : (left : UnboundedInterval) -> (right : UnboundedInterval) -> {auto0_ : So (hasNonEmptyUnboundedIntersectionleftright)} ->UnboundedInterval
  Return the non-empty intersection when its existence is statically known.

Totality: total
Visibility: public export
refineUnboundedIntersection : UnboundedInterval->UnboundedInterval->EitherIntersectionErrorUnboundedInterval
  Return the non-empty intersection of unbounded intervals learned at
runtime.

Totality: total
Visibility: public export
unboundedUnionStart : UnboundedInterval->UnboundedInterval->MaybeInstant
  The optional start bound selected for a connected union.

Totality: total
Visibility: public export
unboundedUnionEnd : UnboundedInterval->UnboundedInterval->MaybeInstant
  The optional end bound selected for a connected union.

Totality: total
Visibility: public export
unboundedIsConnected : UnboundedInterval->UnboundedInterval->Bool
Totality: total
Visibility: public export
unboundedUnion : (left : UnboundedInterval) -> (right : UnboundedInterval) -> {auto0_ : So (unboundedIsConnectedleftright)} ->UnboundedInterval
  Return the smallest interval containing both inputs when their union is
statically known to be connected. Empty intervals are absorbed by the
other input.

Totality: total
Visibility: public export
refineUnboundedUnion : UnboundedInterval->UnboundedInterval->EitherUnionErrorUnboundedInterval
  Return the connected union of unbounded intervals learned at runtime.

Totality: total
Visibility: public export
unboundedDuration : UnboundedInterval->MaybeDuration
  Return the duration when both endpoints are finite.

Totality: total
Visibility: public export