foundation-0.0.23: Alternative prelude with batteries and no dependencies

License | BSD-style
Maintainer | Foundation maintainers
Safe Haskell | None
Language | Haskell2010

Foundation.Time.Types

Description

An implementation of a timing framework

Synopsis

- newtype NanoSeconds = NanoSeconds Word64
- newtype Seconds = Seconds Word64

# Documentation

newtype NanoSeconds Source #

An amount of nanoseconds

Constructors

NanoSeconds Word64 |

Instances

Bounded NanoSeconds Source # |
Instance details Defined in Foundation.Time.Types Methods minBound :: NanoSeconds Source # maxBound :: NanoSeconds Source #
Enum NanoSeconds Source # |

Instance details

Defined in Foundation.Time.Types

Methods

succ :: NanoSeconds -> NanoSeconds Source #

pred :: NanoSeconds -> NanoSeconds Source #

toEnum :: Int -> NanoSeconds Source #

fromEnum :: NanoSeconds -> Int Source #

enumFrom :: NanoSeconds -> [NanoSeconds] Source #

enumFromThen :: NanoSeconds -> NanoSeconds -> [NanoSeconds] Source #

enumFromTo :: NanoSeconds -> NanoSeconds -> [NanoSeconds] Source #

enumFromThenTo :: NanoSeconds -> NanoSeconds -> NanoSeconds -> [NanoSeconds] Source #

Eq NanoSeconds Source # |
Instance details Defined in Foundation.Time.Types Methods (==) :: NanoSeconds -> NanoSeconds -> Bool Source # (/=) :: NanoSeconds -> NanoSeconds -> Bool Source #
Ord NanoSeconds Source # |

Instance details

Defined in Foundation.Time.Types

Methods

compare :: NanoSeconds -> NanoSeconds -> Ordering Source #

(<) :: NanoSeconds -> NanoSeconds -> Bool Source #

(<=) :: NanoSeconds -> NanoSeconds -> Bool Source #

(>) :: NanoSeconds -> NanoSeconds -> Bool Source #

(>=) :: NanoSeconds -> NanoSeconds -> Bool Source #

max :: NanoSeconds -> NanoSeconds -> NanoSeconds Source #

min :: NanoSeconds -> NanoSeconds -> NanoSeconds Source #

Show NanoSeconds Source # |
Instance details Defined in Foundation.Time.Types Methods showsPrec :: Int -> NanoSeconds -> ShowS Source # show :: NanoSeconds -> String Source # showList :: [NanoSeconds] -> ShowS Source #
PrimType NanoSeconds Source # |

Instance details

Defined in Foundation.Time.Types

Associated Types

type PrimSize NanoSeconds :: Nat Source #

Methods

primSizeInBytes :: Proxy NanoSeconds -> CountOf Word8 Source #

primShiftToBytes :: Proxy NanoSeconds -> Int Source #

primBaUIndex :: ByteArray# -> Offset NanoSeconds -> NanoSeconds Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> prim NanoSeconds Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> NanoSeconds -> prim () Source #

primAddrIndex :: Addr# -> Offset NanoSeconds -> NanoSeconds Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset NanoSeconds -> prim NanoSeconds Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset NanoSeconds -> NanoSeconds -> prim () Source #

Additive NanoSeconds Source # |
Instance details Defined in Foundation.Time.Types Methods azero :: NanoSeconds Source # (+) :: NanoSeconds -> NanoSeconds -> NanoSeconds Source # scale :: IsNatural n => n -> NanoSeconds -> NanoSeconds Source #
type PrimSize NanoSeconds Source # |
Instance details Defined in Foundation.Time.Types type PrimSize NanoSeconds = 8

newtype Seconds Source #

An amount of seconds

Constructors

Seconds Word64 |

Instances

Bounded Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods minBound :: Seconds Source # maxBound :: Seconds Source #
Enum Seconds Source # |

Instance details

Defined in Foundation.Time.Types

Methods

succ :: Seconds -> Seconds Source #

pred :: Seconds -> Seconds Source #

toEnum :: Int -> Seconds Source #

fromEnum :: Seconds -> Int Source #

enumFrom :: Seconds -> [Seconds] Source #

enumFromThen :: Seconds -> Seconds -> [Seconds] Source #

enumFromTo :: Seconds -> Seconds -> [Seconds] Source #

enumFromThenTo :: Seconds -> Seconds -> Seconds -> [Seconds] Source #

Eq Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods (==) :: Seconds -> Seconds -> Bool Source # (/=) :: Seconds -> Seconds -> Bool Source #
Ord Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods compare :: Seconds -> Seconds -> Ordering Source # (<) :: Seconds -> Seconds -> Bool Source # (<=) :: Seconds -> Seconds -> Bool Source # (>) :: Seconds -> Seconds -> Bool Source # (>=) :: Seconds -> Seconds -> Bool Source # max :: Seconds -> Seconds -> Seconds Source # min :: Seconds -> Seconds -> Seconds Source #
Show Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods showsPrec :: Int -> Seconds -> ShowS Source # show :: Seconds -> String Source # showList :: [Seconds] -> ShowS Source #
PrimType Seconds Source # |

Instance details

Defined in Foundation.Time.Types

Associated Types

type PrimSize Seconds :: Nat Source #

Methods

primSizeInBytes :: Proxy Seconds -> CountOf Word8 Source #

primShiftToBytes :: Proxy Seconds -> Int Source #

primBaUIndex :: ByteArray# -> Offset Seconds -> Seconds Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> prim Seconds Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> Seconds -> prim () Source #

primAddrIndex :: Addr# -> Offset Seconds -> Seconds Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Seconds -> prim Seconds Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Seconds -> Seconds -> prim () Source #

Additive Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods azero :: Seconds Source # (+) :: Seconds -> Seconds -> Seconds Source # scale :: IsNatural n => n -> Seconds -> Seconds Source #
type PrimSize Seconds Source # |
Instance details Defined in Foundation.Time.Types type PrimSize Seconds = 8