\subsection{Cardano.BM.Data.Observable}
\label{code:Cardano.BM.Data.Observable}

%if style == newcode
\begin{code}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric  #-}

module Cardano.BM.Data.Observable
  (
    ObservableInstance (..)
  )
  where

import           Data.Aeson (FromJSON (..), ToJSON)

import           GHC.Generics (Generic)

\end{code}
%endif

\subsubsection{ObservableInstance}\label{code:ObservableInstance}\index{ObservableInstance}
\label{code:MonotonicClock}\index{ObservableInstance!MonotonicClock}
\label{code:MemoryStats}\index{ObservableInstance!MemoryStats}
\label{code:ProcessStats}\index{ObservableInstance!ProcessStats}
\label{code:NetStats}\index{ObservableInstance!NetStats}
\label{code:IOStats}\index{ObservableInstance!IOStats}
\label{code:SysStats}\index{ObservableInstance!SysStats}
\label{code:GhcRtsStats}\index{ObservableInstance!GhcRtsStats}
\begin{code}
data ObservableInstance = MonotonicClock
                        | MemoryStats
                        | ProcessStats
                        | NetStats
                        | IOStats
                        | SysStats
                        | GhcRtsStats
                          deriving ((forall x. ObservableInstance -> Rep ObservableInstance x)
-> (forall x. Rep ObservableInstance x -> ObservableInstance)
-> Generic ObservableInstance
forall x. Rep ObservableInstance x -> ObservableInstance
forall x. ObservableInstance -> Rep ObservableInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ObservableInstance x -> ObservableInstance
$cfrom :: forall x. ObservableInstance -> Rep ObservableInstance x
Generic, ObservableInstance -> ObservableInstance -> Bool
(ObservableInstance -> ObservableInstance -> Bool)
-> (ObservableInstance -> ObservableInstance -> Bool)
-> Eq ObservableInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ObservableInstance -> ObservableInstance -> Bool
$c/= :: ObservableInstance -> ObservableInstance -> Bool
== :: ObservableInstance -> ObservableInstance -> Bool
$c== :: ObservableInstance -> ObservableInstance -> Bool
Eq, Int -> ObservableInstance -> ShowS
[ObservableInstance] -> ShowS
ObservableInstance -> String
(Int -> ObservableInstance -> ShowS)
-> (ObservableInstance -> String)
-> ([ObservableInstance] -> ShowS)
-> Show ObservableInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ObservableInstance] -> ShowS
$cshowList :: [ObservableInstance] -> ShowS
show :: ObservableInstance -> String
$cshow :: ObservableInstance -> String
showsPrec :: Int -> ObservableInstance -> ShowS
$cshowsPrec :: Int -> ObservableInstance -> ShowS
Show, Value -> Parser [ObservableInstance]
Value -> Parser ObservableInstance
(Value -> Parser ObservableInstance)
-> (Value -> Parser [ObservableInstance])
-> FromJSON ObservableInstance
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [ObservableInstance]
$cparseJSONList :: Value -> Parser [ObservableInstance]
parseJSON :: Value -> Parser ObservableInstance
$cparseJSON :: Value -> Parser ObservableInstance
FromJSON, [ObservableInstance] -> Encoding
[ObservableInstance] -> Value
ObservableInstance -> Encoding
ObservableInstance -> Value
(ObservableInstance -> Value)
-> (ObservableInstance -> Encoding)
-> ([ObservableInstance] -> Value)
-> ([ObservableInstance] -> Encoding)
-> ToJSON ObservableInstance
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ObservableInstance] -> Encoding
$ctoEncodingList :: [ObservableInstance] -> Encoding
toJSONList :: [ObservableInstance] -> Value
$ctoJSONList :: [ObservableInstance] -> Value
toEncoding :: ObservableInstance -> Encoding
$ctoEncoding :: ObservableInstance -> Encoding
toJSON :: ObservableInstance -> Value
$ctoJSON :: ObservableInstance -> Value
ToJSON, ReadPrec [ObservableInstance]
ReadPrec ObservableInstance
Int -> ReadS ObservableInstance
ReadS [ObservableInstance]
(Int -> ReadS ObservableInstance)
-> ReadS [ObservableInstance]
-> ReadPrec ObservableInstance
-> ReadPrec [ObservableInstance]
-> Read ObservableInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ObservableInstance]
$creadListPrec :: ReadPrec [ObservableInstance]
readPrec :: ReadPrec ObservableInstance
$creadPrec :: ReadPrec ObservableInstance
readList :: ReadS [ObservableInstance]
$creadList :: ReadS [ObservableInstance]
readsPrec :: Int -> ReadS ObservableInstance
$creadsPrec :: Int -> ReadS ObservableInstance
Read)

\end{code}