foundation-0.0.25: 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

Instances details

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

Instance details

Defined in Foundation.Time.Types

Methods

succ :: NanoSeconds -> NanoSeconds #

pred :: NanoSeconds -> NanoSeconds #

toEnum :: Int -> NanoSeconds #

fromEnum :: NanoSeconds -> Int #

enumFrom :: NanoSeconds -> [NanoSeconds] #

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

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

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

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

Instances details

Bounded Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods minBound :: Seconds # maxBound :: Seconds #
Enum Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods succ :: Seconds -> Seconds # pred :: Seconds -> Seconds # toEnum :: Int -> Seconds # fromEnum :: Seconds -> Int # enumFrom :: Seconds -> [Seconds] # enumFromThen :: Seconds -> Seconds -> [Seconds] # enumFromTo :: Seconds -> Seconds -> [Seconds] # enumFromThenTo :: Seconds -> Seconds -> Seconds -> [Seconds] #
Eq Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods (==) :: Seconds -> Seconds -> Bool # (/=) :: Seconds -> Seconds -> Bool #
Ord Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods compare :: Seconds -> Seconds -> Ordering # (<) :: Seconds -> Seconds -> Bool # (<=) :: Seconds -> Seconds -> Bool # (>) :: Seconds -> Seconds -> Bool # (>=) :: Seconds -> Seconds -> Bool # max :: Seconds -> Seconds -> Seconds # min :: Seconds -> Seconds -> Seconds #
Show Seconds Source # |
Instance details Defined in Foundation.Time.Types Methods showsPrec :: Int -> Seconds -> ShowS # show :: Seconds -> String # showList :: [Seconds] -> ShowS #
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