From 3160ceab080fca8fef0cf2cf196b46284d15c19f Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 4 Feb 2024 11:07:15 +0100 Subject: Create a Metrics module --- lib/Graphics/Fountainhead/Dumper.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Graphics/Fountainhead/Dumper.hs') diff --git a/lib/Graphics/Fountainhead/Dumper.hs b/lib/Graphics/Fountainhead/Dumper.hs index bbb17c2..c3ba277 100644 --- a/lib/Graphics/Fountainhead/Dumper.hs +++ b/lib/Graphics/Fountainhead/Dumper.hs @@ -114,6 +114,7 @@ import Graphics.Fountainhead.Type ( Fixed32(..) , succIntegral , ttfEpoch + , newlineBuilder , fixed2Double ) import Data.Foldable (Foldable(..), find) @@ -160,9 +161,6 @@ justifyNumber count = Text.Builder.fromLazyText . Text.Builder.toLazyText . Text.Builder.decimal -newlineBuilder :: Text.Builder.Builder -newlineBuilder = Text.Builder.singleton '\n' - dumpCaption :: String -> Text.Builder.Builder dumpCaption headline = Text.Builder.fromString headline <> newlineBuilder @@ -288,7 +286,7 @@ longDateTime localTime = Text.Builder.fromLazyText dumpCVTable :: CVTable -> Text.Builder.Builder dumpCVTable (CVTable cvTable) = dumpCaption "'cvt ' Table - Control Value Table" <> "Size = " <> Text.Builder.decimal (tableSize * 2) - <> " bytes, " <> Text.Builder.decimal tableSize <> " entries\n" + <> " bytes, " <> Text.Builder.decimal tableSize <> " entries" <> newlineBuilder <> foldMap (uncurry go) (zip [0..] cvTable) where tableSize = Prelude.length cvTable -- cgit v1.2.3