module Cardano.Logging.DocuGenerator.Result (DocuResult(..), unpackDocu, isTracer, isMetric, isDatapoint) where import Data.Text.Internal.Builder data DocuResult = DocuTracer Builder | DocuMetric Builder | DocuDatapoint Builder deriving (Int -> DocuResult -> ShowS [DocuResult] -> ShowS DocuResult -> String (Int -> DocuResult -> ShowS) -> (DocuResult -> String) -> ([DocuResult] -> ShowS) -> Show DocuResult forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> DocuResult -> ShowS showsPrec :: Int -> DocuResult -> ShowS $cshow :: DocuResult -> String show :: DocuResult -> String $cshowList :: [DocuResult] -> ShowS showList :: [DocuResult] -> ShowS Show) unpackDocu :: DocuResult -> Builder unpackDocu :: DocuResult -> Builder unpackDocu (DocuTracer Builder b) = Builder b unpackDocu (DocuMetric Builder b) = Builder b unpackDocu (DocuDatapoint Builder b) = Builder b isTracer :: DocuResult -> Bool isTracer :: DocuResult -> Bool isTracer DocuTracer {} = Bool True isTracer DocuResult _ = Bool False isMetric :: DocuResult -> Bool isMetric :: DocuResult -> Bool isMetric DocuMetric {} = Bool True isMetric DocuResult _ = Bool False isDatapoint :: DocuResult -> Bool isDatapoint :: DocuResult -> Bool isDatapoint DocuDatapoint {} = Bool True isDatapoint DocuResult _ = Bool False