X.A.EasyMotion: Strictify records

There is no reason for these not to be strict.
This commit is contained in:
slotThe
2021-04-12 19:25:03 +02:00
parent 827ea89b6b
commit 78f3ad26ed

View File

@@ -149,23 +149,23 @@ import Data.List (sortOn)
-- | Associates a user window, an overlay window created by this module and a rectangle -- | Associates a user window, an overlay window created by this module and a rectangle
-- circumscribing these windows -- circumscribing these windows
data OverlayWindow = data OverlayWindow =
OverlayWindow { win :: Window -- ^ The window managed by xmonad OverlayWindow { win :: !Window -- ^ The window managed by xmonad
, attrs :: WindowAttributes -- ^ Window attributes for @win@ , attrs :: !WindowAttributes -- ^ Window attributes for @win@
, overlay :: Window -- ^ Our window used to display the overlay , overlay :: !Window -- ^ Our window used to display the overlay
, rect :: Rectangle -- ^ The rectangle of @overlay@ , rect :: !Rectangle -- ^ The rectangle of @overlay@
} }
-- | An overlay window and the chord used to select it -- | An overlay window and the chord used to select it
data Overlay = data Overlay =
Overlay { overlayWin :: OverlayWindow -- ^ The window managed by xmonad Overlay { overlayWin :: !OverlayWindow -- ^ The window managed by xmonad
, chord :: [KeySym] -- ^ The chord we'll display in the overlay , chord :: ![KeySym] -- ^ The chord we'll display in the overlay
} }
-- | Maps keys to windows. AnyKeys maps keys to windows regardless which screen they're on. -- | Maps keys to windows. AnyKeys maps keys to windows regardless which screen they're on.
-- PerScreenKeys maps keys to screens to windows. See $usage for more examples. -- PerScreenKeys maps keys to screens to windows. See $usage for more examples.
data ChordKeys = AnyKeys [KeySym] data ChordKeys = AnyKeys ![KeySym]
| PerScreenKeys (M.Map ScreenId [KeySym]) | PerScreenKeys !(M.Map ScreenId [KeySym])
-- | Configuration options for EasyMotion. -- | Configuration options for EasyMotion.
-- --
@@ -178,15 +178,15 @@ data ChordKeys = AnyKeys [KeySym]
-- @cancelKey@, @xK_BackSpace@ and any duplicates will be removed from @sKeys@ if included. -- @cancelKey@, @xK_BackSpace@ and any duplicates will be removed from @sKeys@ if included.
-- See usage for examples of @sKeys@. -- See usage for examples of @sKeys@.
data EasyMotionConfig = data EasyMotionConfig =
EMConf { txtCol :: String -- ^ Color of the text displayed EMConf { txtCol :: !String -- ^ Color of the text displayed
, bgCol :: String -- ^ Color of the window overlaid , bgCol :: !String -- ^ Color of the window overlaid
, overlayF :: Position -> Rectangle -> Rectangle -- ^ Function to generate overlay rectangle , overlayF :: !(Position -> Rectangle -> Rectangle) -- ^ Function to generate overlay rectangle
, borderCol :: String -- ^ Color of the overlay window borders , borderCol :: !String -- ^ Color of the overlay window borders
, sKeys :: ChordKeys -- ^ Keys to use for window selection , sKeys :: !ChordKeys -- ^ Keys to use for window selection
, cancelKey :: KeySym -- ^ Key to use to cancel selection , cancelKey :: !KeySym -- ^ Key to use to cancel selection
, emFont :: String -- ^ Font for selection characters (passed to initXMF) , emFont :: !String -- ^ Font for selection characters (passed to initXMF)
, borderPx :: Int -- ^ Width of border in pixels , borderPx :: !Int -- ^ Width of border in pixels
, maxChordLen :: Int -- ^ Maximum chord length. Use 0 for no maximum. , maxChordLen :: !Int -- ^ Maximum chord length. Use 0 for no maximum.
} }
instance Default EasyMotionConfig where instance Default EasyMotionConfig where