Foundation.Time.Types

foundation-0.0.30: 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 #

An amount of nanoseconds

Constructors

NanoSeconds Word64 |

#### Instances

Instances details

Additive NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods azero :: NanoSeconds # (+) :: NanoSeconds -> NanoSeconds -> NanoSeconds # scale :: IsNatural n => n -> NanoSeconds -> NanoSeconds #
PrimType NanoSeconds # |
Instance details Defined in Foundation.Time.Types Associated Types
type PrimSize NanoSeconds |
Instance details Defined in Foundation.Time.Types type PrimSize NanoSeconds = 8
Methods primSizeInBytes :: Proxy NanoSeconds -> CountOf Word8 # primShiftToBytes :: Proxy NanoSeconds -> Int # primBaUIndex :: ByteArray# -> Offset NanoSeconds -> NanoSeconds # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> prim NanoSeconds # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> NanoSeconds -> prim () # primAddrIndex :: Addr# -> Offset NanoSeconds -> NanoSeconds # primAddrRead :: PrimMonad prim => Addr# -> Offset NanoSeconds -> prim NanoSeconds # primAddrWrite :: PrimMonad prim => Addr# -> Offset NanoSeconds -> NanoSeconds -> prim () #
Bounded NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods minBound :: NanoSeconds # maxBound :: NanoSeconds #
Enum NanoSeconds # |
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] #
Show NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods showsPrec :: Int -> NanoSeconds -> ShowS # show :: NanoSeconds -> String # showList :: [NanoSeconds] -> ShowS #
Eq NanoSeconds # |
Instance details Defined in Foundation.Time.Types Methods (==) :: NanoSeconds -> NanoSeconds -> Bool # (/=) :: NanoSeconds -> NanoSeconds -> Bool #
Ord NanoSeconds # |
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 #
type PrimSize NanoSeconds # |
Instance details Defined in Foundation.Time.Types type PrimSize NanoSeconds = 8

newtype Seconds #

An amount of seconds

Constructors

Seconds Word64 |

#### Instances

Instances details

Additive Seconds # |
Instance details Defined in Foundation.Time.Types Methods azero :: Seconds # (+) :: Seconds -> Seconds -> Seconds # scale :: IsNatural n => n -> Seconds -> Seconds #
PrimType Seconds # |
Instance details Defined in Foundation.Time.Types Associated Types
type PrimSize Seconds |
Instance details Defined in Foundation.Time.Types type PrimSize Seconds = 8
Methods primSizeInBytes :: Proxy Seconds -> CountOf Word8 # primShiftToBytes :: Proxy Seconds -> Int # primBaUIndex :: ByteArray# -> Offset Seconds -> Seconds # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> prim Seconds # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> Seconds -> prim () # primAddrIndex :: Addr# -> Offset Seconds -> Seconds # primAddrRead :: PrimMonad prim => Addr# -> Offset Seconds -> prim Seconds # primAddrWrite :: PrimMonad prim => Addr# -> Offset Seconds -> Seconds -> prim () #
Bounded Seconds # |
Instance details Defined in Foundation.Time.Types Methods minBound :: Seconds # maxBound :: Seconds #
Enum Seconds # |
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] #
Show Seconds # |
Instance details Defined in Foundation.Time.Types Methods showsPrec :: Int -> Seconds -> ShowS # show :: Seconds -> String # showList :: [Seconds] -> ShowS #
Eq Seconds # |
Instance details Defined in Foundation.Time.Types Methods (==) :: Seconds -> Seconds -> Bool # (/=) :: Seconds -> Seconds -> Bool #
Ord Seconds # |
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 #
type PrimSize Seconds # |
Instance details Defined in Foundation.Time.Types type PrimSize Seconds = 8