definitive-base-2.6.3: A small Prelude wrapper to simplify my own Haskell developments

Safe HaskellNone
LanguageHaskell2010

IO.Time

Contents

Synopsis

Unambiguous times

data Time t Source #

A type wrappers for timestamps that can be compared unambiguously

Instances

Unit Time Source # 

Methods

pure :: a -> Time a Source #

Bounded (Time t) Source # 

Methods

minBound :: Time t #

maxBound :: Time t #

Ord t => Eq (Time t) Source # 

Methods

(==) :: Time t -> Time t -> Bool #

(/=) :: Time t -> Time t -> Bool #

Ord t => Ord (Time t) Source # 

Methods

compare :: Time t -> Time t -> Ordering #

(<) :: Time t -> Time t -> Bool #

(<=) :: Time t -> Time t -> Bool #

(>) :: Time t -> Time t -> Bool #

(>=) :: Time t -> Time t -> Bool #

max :: Time t -> Time t -> Time t #

min :: Time t -> Time t -> Time t #

Show t => Show (Time t) Source # 

Methods

showsPrec :: Int -> Time t -> ShowS #

show :: Time t -> String #

showList :: [Time t] -> ShowS #

Ord t => Ring (Time t) Source # 

Methods

one :: Time t Source #

Ord t => Semiring (Time t) Source #

The Time ring where (*) == min and one == maxBound

Methods

(*) :: Time t -> Time t -> Time t Source #

Ord t => Monoid (Time t) Source #

The Time monoid where zero == minBound

Methods

zero :: Time t Source #

Ord t => Semigroup (Time t) Source #

The Time semigroup where ta + tb == max ta tb

Methods

(+) :: Time t -> Time t -> Time t Source #

timeVal :: Time t -> TimeVal t Source #

A Time's pure value. Reduction to normal form may block.

Time utilities

timeIO :: IO a -> IO (Time Seconds, a) Source #

Constructs a Time/value pair representing the delayed computation of the argument.

timeOrigin :: ((?birthTime :: Seconds) => IO a) -> IO a Source #

Conversion functions