module OpenTelemetry.Common where

import Data.Word (Word8)
import System.Clock (TimeSpec)


newtype Timestamp = Timestamp TimeSpec
  deriving (ReadPrec [Timestamp]
ReadPrec Timestamp
Int -> ReadS Timestamp
ReadS [Timestamp]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Timestamp]
$creadListPrec :: ReadPrec [Timestamp]
readPrec :: ReadPrec Timestamp
$creadPrec :: ReadPrec Timestamp
readList :: ReadS [Timestamp]
$creadList :: ReadS [Timestamp]
readsPrec :: Int -> ReadS Timestamp
$creadsPrec :: Int -> ReadS Timestamp
Read, Int -> Timestamp -> ShowS
[Timestamp] -> ShowS
Timestamp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Timestamp] -> ShowS
$cshowList :: [Timestamp] -> ShowS
show :: Timestamp -> String
$cshow :: Timestamp -> String
showsPrec :: Int -> Timestamp -> ShowS
$cshowsPrec :: Int -> Timestamp -> ShowS
Show, Timestamp -> Timestamp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Timestamp -> Timestamp -> Bool
$c/= :: Timestamp -> Timestamp -> Bool
== :: Timestamp -> Timestamp -> Bool
$c== :: Timestamp -> Timestamp -> Bool
Eq, Eq Timestamp
Timestamp -> Timestamp -> Bool
Timestamp -> Timestamp -> Ordering
Timestamp -> Timestamp -> Timestamp
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Timestamp -> Timestamp -> Timestamp
$cmin :: Timestamp -> Timestamp -> Timestamp
max :: Timestamp -> Timestamp -> Timestamp
$cmax :: Timestamp -> Timestamp -> Timestamp
>= :: Timestamp -> Timestamp -> Bool
$c>= :: Timestamp -> Timestamp -> Bool
> :: Timestamp -> Timestamp -> Bool
$c> :: Timestamp -> Timestamp -> Bool
<= :: Timestamp -> Timestamp -> Bool
$c<= :: Timestamp -> Timestamp -> Bool
< :: Timestamp -> Timestamp -> Bool
$c< :: Timestamp -> Timestamp -> Bool
compare :: Timestamp -> Timestamp -> Ordering
$ccompare :: Timestamp -> Timestamp -> Ordering
Ord)


-- | Contain details about the trace. Unlike TraceState values, TraceFlags are present in all traces. The current version of the specification only supports a single flag called sampled.
newtype TraceFlags = TraceFlags Word8
  deriving (Int -> TraceFlags -> ShowS
[TraceFlags] -> ShowS
TraceFlags -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TraceFlags] -> ShowS
$cshowList :: [TraceFlags] -> ShowS
show :: TraceFlags -> String
$cshow :: TraceFlags -> String
showsPrec :: Int -> TraceFlags -> ShowS
$cshowsPrec :: Int -> TraceFlags -> ShowS
Show, TraceFlags -> TraceFlags -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TraceFlags -> TraceFlags -> Bool
$c/= :: TraceFlags -> TraceFlags -> Bool
== :: TraceFlags -> TraceFlags -> Bool
$c== :: TraceFlags -> TraceFlags -> Bool
Eq, Eq TraceFlags
TraceFlags -> TraceFlags -> Bool
TraceFlags -> TraceFlags -> Ordering
TraceFlags -> TraceFlags -> TraceFlags
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: TraceFlags -> TraceFlags -> TraceFlags
$cmin :: TraceFlags -> TraceFlags -> TraceFlags
max :: TraceFlags -> TraceFlags -> TraceFlags
$cmax :: TraceFlags -> TraceFlags -> TraceFlags
>= :: TraceFlags -> TraceFlags -> Bool
$c>= :: TraceFlags -> TraceFlags -> Bool
> :: TraceFlags -> TraceFlags -> Bool
$c> :: TraceFlags -> TraceFlags -> Bool
<= :: TraceFlags -> TraceFlags -> Bool
$c<= :: TraceFlags -> TraceFlags -> Bool
< :: TraceFlags -> TraceFlags -> Bool
$c< :: TraceFlags -> TraceFlags -> Bool
compare :: TraceFlags -> TraceFlags -> Ordering
$ccompare :: TraceFlags -> TraceFlags -> Ordering
Ord)