Some strictness optimizations

This commit is contained in:
Matthias Schiffer 2011-08-12 03:18:46 +02:00
parent 180285af85
commit 15bccc001a
8 changed files with 25 additions and 25 deletions

View file

@ -11,9 +11,9 @@ import Control.Monad
import Graphics.Rendering.Cairo
data AlphaBoxState = AlphaBoxState [WidgetState] deriving Show
data AlphaBoxState = AlphaBoxState ![WidgetState] deriving Show
data AlphaBox = AlphaBox Double [Widget] deriving Show
data AlphaBox = AlphaBox !Double ![Widget] deriving Show
instance WidgetClass AlphaBox where

View file

@ -34,11 +34,11 @@ data ClockConfig = ClockConfig { clockFormat :: !String
defaultClockConfig :: ClockConfig
defaultClockConfig = ClockConfig "%R" (0, 0, 0, 1) 0 50
data Clock = Clock ClockConfig deriving Show
data Clock = Clock !ClockConfig deriving Show
data ClockState = ClockState ZonedTime deriving Show
data ClockState = ClockState !ZonedTime deriving Show
data ClockMessage = UpdateTime ZonedTime deriving (Show, Typeable)
data ClockMessage = UpdateTime !ZonedTime deriving (Show, Typeable)
instance WidgetClass Clock where
type WidgetData Clock = ClockState

View file

@ -45,13 +45,13 @@ instance Show (IORef a) where
show _ = "IORef <?>"
data SystrayIconState = SystrayIconState Window Window deriving Show
data SystrayIconState = SystrayIconState !Window !Window deriving Show
data SystrayState = SystrayState Phi Rectangle Int (IORef Int) [SystrayIconState] deriving Show
data SystrayState = SystrayState !Phi !Rectangle !Int !(IORef Int) ![SystrayIconState] deriving Show
data Systray = Systray deriving Show
data SystrayMessage = AddIcon Window Window | RemoveIcon Window | RenderIcon Window Window Int Int Int Int Bool
data SystrayMessage = AddIcon !Window !Window | RemoveIcon !Window | RenderIcon !Window !Window !Int !Int !Int !Int !Bool
deriving (Show, Typeable)

View file

@ -152,10 +152,10 @@ data WindowState = WindowState { windowTitle :: !String
, windowVisible :: !Bool
} deriving (Show, Eq)
data TaskbarMessage = WindowListUpdate [Xlib.Window] (M.Map Window WindowState) (M.Map Window [(Int, Surface)]) (M.Map Window (IORef (Maybe (Int, Surface)))) (M.Map Window Xlib.Rectangle)
| DesktopCountUpdate Int
| CurrentDesktopUpdate Int
| ActiveWindowUpdate Window
data TaskbarMessage = WindowListUpdate ![Xlib.Window] !(M.Map Window WindowState) !(M.Map Window [(Int, Surface)]) !(M.Map Window (IORef (Maybe (Int, Surface)))) !(M.Map Window Xlib.Rectangle)
| DesktopCountUpdate !Int
| CurrentDesktopUpdate !Int
| ActiveWindowUpdate !Window
deriving (Show, Typeable)
instance Show (IORef a) where