From c23b7b5517d7ac5d0a6b2ff8a4f4914c2f392261 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 27 Oct 2020 13:12:58 +0100 Subject: Initial --- Prof.hs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Prof.hs (limited to 'Prof.hs') diff --git a/Prof.hs b/Prof.hs new file mode 100644 index 0000000..28bfaca --- /dev/null +++ b/Prof.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE DeriveFunctor #-} +module Prof where + +import Data.ByteString.Short (ShortByteString) + + +data Prof a + = Prof { pTree :: ProfTree a } + deriving (Show, Functor) + +data ProfTree a + = Leaf Entry + | Node Entry a [ProfTree a] + deriving (Show, Functor) + +data Entry + = Entry { eCS :: ShortByteString + , eModule :: ShortByteString + , eSrc :: ShortByteString + , eCount :: Int + , eIndividual :: TimeShare + , eInherited :: TimeShare } + deriving (Show) + +data TimeShare + = TimeShare { tsTime :: Double + , tsAlloc :: Double } + deriving (Show) -- cgit v1.2.3-70-g09d2