polysemy-time-0.3.0.0: Polysemy Effect for Time
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Time.Data.TimeUnit

Description

TimeUnit Class and Data Types, Internal

Synopsis

Documentation

newtype FromSeconds a Source #

For deriving via.

Constructors

FromSeconds a 

Instances

Instances details
Num a => Num (FromSeconds a) Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

(Integral a, TimeUnit a) => Fractional (FromSeconds a) Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Show a => Show (FromSeconds a) Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Eq a => Eq (FromSeconds a) Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

class TimeUnit u where Source #

Types that represent an amount of time that can be converted to each other. The methods are internal, the API function is convert.

Minimal complete definition

nanos

Instances

Instances details
TimeUnit Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit DiffTime Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit NominalDiffTime Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Data types used to specify time spans, e.g. for sleeping.

newtype Years Source #

Years.

Constructors

Years 

Fields

Instances

Instances details
FromJSON Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep Years :: Type -> Type #

Methods

from :: Years -> Rep Years x #

to :: Rep Years x -> Years #

Num Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

toRational :: Years -> Rational #

Show Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

showsPrec :: Int -> Years -> ShowS #

show :: Years -> String #

showList :: [Years] -> ShowS #

Eq Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(==) :: Years -> Years -> Bool #

(/=) :: Years -> Years -> Bool #

Ord Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

compare :: Years -> Years -> Ordering #

(<) :: Years -> Years -> Bool #

(<=) :: Years -> Years -> Bool #

(>) :: Years -> Years -> Bool #

(>=) :: Years -> Years -> Bool #

max :: Years -> Years -> Years #

min :: Years -> Years -> Years #

Additive Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

zero :: Years #

invert :: Years -> Years #

plus :: Years -> Years -> Years #

minus :: Years -> Years -> Years #

type Rep Years Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Years = D1 ('MetaData "Years" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "Years" 'PrefixI 'True) (S1 ('MetaSel ('Just "unYear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype Months Source #

Months.

Constructors

Months 

Fields

Instances

Instances details
FromJSON Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep Months :: Type -> Type #

Methods

from :: Months -> Rep Months x #

to :: Rep Months x -> Months #

Num Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Show Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Eq Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(==) :: Months -> Months -> Bool #

(/=) :: Months -> Months -> Bool #

Ord Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Months Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Months = D1 ('MetaData "Months" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "Months" 'PrefixI 'True) (S1 ('MetaSel ('Just "unMonths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype Weeks Source #

Weeks.

Constructors

Weeks 

Fields

Instances

Instances details
FromJSON Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep Weeks :: Type -> Type #

Methods

from :: Weeks -> Rep Weeks x #

to :: Rep Weeks x -> Weeks #

Num Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

toRational :: Weeks -> Rational #

Show Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

showsPrec :: Int -> Weeks -> ShowS #

show :: Weeks -> String #

showList :: [Weeks] -> ShowS #

Eq Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(==) :: Weeks -> Weeks -> Bool #

(/=) :: Weeks -> Weeks -> Bool #

Ord Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

compare :: Weeks -> Weeks -> Ordering #

(<) :: Weeks -> Weeks -> Bool #

(<=) :: Weeks -> Weeks -> Bool #

(>) :: Weeks -> Weeks -> Bool #

(>=) :: Weeks -> Weeks -> Bool #

max :: Weeks -> Weeks -> Weeks #

min :: Weeks -> Weeks -> Weeks #

TimeUnit Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

zero :: Weeks #

invert :: Weeks -> Weeks #

plus :: Weeks -> Weeks -> Weeks #

minus :: Weeks -> Weeks -> Weeks #

type Rep Weeks Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Weeks = D1 ('MetaData "Weeks" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "Weeks" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWeeks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype Days Source #

Days.

Constructors

Days 

Fields

Instances

Instances details
FromJSON Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

succ :: Days -> Days #

pred :: Days -> Days #

toEnum :: Int -> Days #

fromEnum :: Days -> Int #

enumFrom :: Days -> [Days] #

enumFromThen :: Days -> Days -> [Days] #

enumFromTo :: Days -> Days -> [Days] #

enumFromThenTo :: Days -> Days -> Days -> [Days] #

Generic Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep Days :: Type -> Type #

Methods

from :: Days -> Rep Days x #

to :: Rep Days x -> Days #

Num Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(+) :: Days -> Days -> Days #

(-) :: Days -> Days -> Days #

(*) :: Days -> Days -> Days #

negate :: Days -> Days #

abs :: Days -> Days #

signum :: Days -> Days #

fromInteger :: Integer -> Days #

Integral Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

quot :: Days -> Days -> Days #

rem :: Days -> Days -> Days #

div :: Days -> Days -> Days #

mod :: Days -> Days -> Days #

quotRem :: Days -> Days -> (Days, Days) #

divMod :: Days -> Days -> (Days, Days) #

toInteger :: Days -> Integer #

Real Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

toRational :: Days -> Rational #

Show Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

showsPrec :: Int -> Days -> ShowS #

show :: Days -> String #

showList :: [Days] -> ShowS #

Eq Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(==) :: Days -> Days -> Bool #

(/=) :: Days -> Days -> Bool #

Ord Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

compare :: Days -> Days -> Ordering #

(<) :: Days -> Days -> Bool #

(<=) :: Days -> Days -> Bool #

(>) :: Days -> Days -> Bool #

(>=) :: Days -> Days -> Bool #

max :: Days -> Days -> Days #

min :: Days -> Days -> Days #

TimeUnit Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

zero :: Days #

invert :: Days -> Days #

plus :: Days -> Days -> Days #

minus :: Days -> Days -> Days #

type Rep Days Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Days = D1 ('MetaData "Days" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "Days" 'PrefixI 'True) (S1 ('MetaSel ('Just "unDays") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype Hours Source #

Hours.

Constructors

Hours 

Fields

Instances

Instances details
FromJSON Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep Hours :: Type -> Type #

Methods

from :: Hours -> Rep Hours x #

to :: Rep Hours x -> Hours #

Num Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

toRational :: Hours -> Rational #

Show Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

showsPrec :: Int -> Hours -> ShowS #

show :: Hours -> String #

showList :: [Hours] -> ShowS #

Eq Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(==) :: Hours -> Hours -> Bool #

(/=) :: Hours -> Hours -> Bool #

Ord Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

compare :: Hours -> Hours -> Ordering #

(<) :: Hours -> Hours -> Bool #

(<=) :: Hours -> Hours -> Bool #

(>) :: Hours -> Hours -> Bool #

(>=) :: Hours -> Hours -> Bool #

max :: Hours -> Hours -> Hours #

min :: Hours -> Hours -> Hours #

TimeUnit Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

zero :: Hours #

invert :: Hours -> Hours #

plus :: Hours -> Hours -> Hours #

minus :: Hours -> Hours -> Hours #

type Rep Hours Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Hours = D1 ('MetaData "Hours" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "Hours" 'PrefixI 'True) (S1 ('MetaSel ('Just "unHours") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype Minutes Source #

Minutes.

Constructors

Minutes 

Fields

Instances

Instances details
FromJSON Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep Minutes :: Type -> Type #

Methods

from :: Minutes -> Rep Minutes x #

to :: Rep Minutes x -> Minutes #

Num Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Show Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Eq Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(==) :: Minutes -> Minutes -> Bool #

(/=) :: Minutes -> Minutes -> Bool #

Ord Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Minutes Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Minutes = D1 ('MetaData "Minutes" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "Minutes" 'PrefixI 'True) (S1 ('MetaSel ('Just "unMinutes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype Seconds Source #

Seconds.

Constructors

Seconds 

Fields

Instances

Instances details
FromJSON Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep Seconds :: Type -> Type #

Methods

from :: Seconds -> Rep Seconds x #

to :: Rep Seconds x -> Seconds #

Num Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Show Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Eq Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Methods

(==) :: Seconds -> Seconds -> Bool #

(/=) :: Seconds -> Seconds -> Bool #

Ord Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Seconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep Seconds = D1 ('MetaData "Seconds" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "Seconds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype MilliSeconds Source #

Milliseconds.

Constructors

MilliSeconds 

Instances

Instances details
FromJSON MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep MilliSeconds :: Type -> Type #

Num MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Fractional MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Show MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Eq MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Ord MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep MilliSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep MilliSeconds = D1 ('MetaData "MilliSeconds" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "MilliSeconds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unMilliSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype MicroSeconds Source #

Microseconds.

Constructors

MicroSeconds 

Instances

Instances details
FromJSON MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep MicroSeconds :: Type -> Type #

Num MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Fractional MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Show MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Eq MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Ord MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep MicroSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep MicroSeconds = D1 ('MetaData "MicroSeconds" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "MicroSeconds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unMicroSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype NanoSeconds Source #

Nanoseconds. This is the base unit for all conversions.

Constructors

NanoSeconds 

Fields

Instances

Instances details
FromJSON NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

ToJSON NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Enum NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Generic NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Associated Types

type Rep NanoSeconds :: Type -> Type #

Num NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Fractional NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Integral NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Real NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Show NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Eq NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Ord NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

TimeUnit NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Additive NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

Scaling NanoSeconds Int64 Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep NanoSeconds Source # 
Instance details

Defined in Polysemy.Time.Data.TimeUnit

type Rep NanoSeconds = D1 ('MetaData "NanoSeconds" "Polysemy.Time.Data.TimeUnit" "polysemy-time-0.3.0.0-CjyWCgXiKNOBwZbO33Cmmn" 'True) (C1 ('MetaCons "NanoSeconds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNanoSeconds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

safeDiv :: Real a => Integral a => a -> a -> Maybe a Source #

divOr0 :: Real a => Integral a => a -> a -> a Source #

convert :: TimeUnit a => TimeUnit b => a -> b Source #

Convert between different time spans.

>>> convert (picosecondsToDiffTime 50000000) :: MicroSeconds
MicroSeconds {unMicroSeconds = 50}
>>> convert (MilliSeconds 5) :: MicroSeconds
MicroSeconds 5000

type AddTimeUnit t u1 u2 = (TimeUnit u1, TimeUnit u2, Torsor t u2) Source #

Convenience alias for addTimeUnit.

addTimeUnit :: forall t u1 u2. AddTimeUnit t u1 u2 => u1 -> t -> t Source #

Add a time unit to an instant.

secondsFrac :: TimeUnit u => u -> Double Source #

Convert a unit into a number of seconds, keeping the subsecond part as fractional digits.