From 58063dd47a7699e5c9af6480302e53fda3a92b64 Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Wed, 18 Dec 2024 17:31:38 +0000 Subject: [PATCH] simulation: Fix HLint warnings from 6dc82e9 --- simulation/src/LeiosProtocol/Short/VizSim.hs | 2 +- simulation/src/LeiosProtocol/Short/VizSimP2P.hs | 2 +- simulation/src/SimTCPLinks.hs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/simulation/src/LeiosProtocol/Short/VizSim.hs b/simulation/src/LeiosProtocol/Short/VizSim.hs index b04c64e..e54b021 100644 --- a/simulation/src/LeiosProtocol/Short/VizSim.hs +++ b/simulation/src/LeiosProtocol/Short/VizSim.hs @@ -229,7 +229,7 @@ accumDiffusionLatency' now _nid EnterState msgid _msg vs = vs accumDiffusionLatency' _now _nid _event _id _msg vs = vs -data LeiosModelConfig = LeiosModelConfig +newtype LeiosModelConfig = LeiosModelConfig { recentSpan :: DiffTime -- ^ length of time the Recent* maps should cover } diff --git a/simulation/src/LeiosProtocol/Short/VizSimP2P.hs b/simulation/src/LeiosProtocol/Short/VizSimP2P.hs index 13ba53b..afd376f 100644 --- a/simulation/src/LeiosProtocol/Short/VizSimP2P.hs +++ b/simulation/src/LeiosProtocol/Short/VizSimP2P.hs @@ -97,7 +97,7 @@ messageLegend = where textBox s = Dia.alignedText 0.7 0.5 s `Dia.atop` Dia.phantom (Dia.rect (fromIntegral $ length s * 20 + 10) 20 :: CairoDiagram) -- TODO: figure out why the width needs fudging. - addBG d = d `Dia.atop` (Dia.fc Dia.white $ Dia.lc Dia.white $ Dia.rect (Dia.width d + 20 * 12) (Dia.height d)) + addBG d = d `Dia.atop` Dia.fc Dia.white (Dia.lc Dia.white $ Dia.rect (Dia.width d + 20 * 12) (Dia.height d)) ------------------------------------------------------------------------------ -- The vizualisation rendering diff --git a/simulation/src/SimTCPLinks.hs b/simulation/src/SimTCPLinks.hs index 0bdb94d..6657ac0 100644 --- a/simulation/src/SimTCPLinks.hs +++ b/simulation/src/SimTCPLinks.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}