X.A.GridSelect: Use OVERLAPPABLE, seems to help with unnecessary recompiles

Without this, any change to tests triggers a recompile of GridSelect
when invoking "stack test", adding a couple seconds. This seems to help.
This commit is contained in:
Tomas Janousek
2021-01-26 12:17:36 +00:00
parent 245dac496b
commit 2691e3a490

View File

@@ -1,4 +1,4 @@
{-# LANGUAGE ScopedTypeVariables, GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances, OverlappingInstances #-}
{-# LANGUAGE ScopedTypeVariables, GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.GridSelect
@@ -220,7 +220,7 @@ instance HasColorizer Window where
instance HasColorizer String where
defaultColorizer = stringColorizer
instance HasColorizer a where
instance {-# OVERLAPPABLE #-} HasColorizer a where
defaultColorizer _ isFg =
let getColor = if isFg then focusedBorderColor else normalBorderColor
in asks $ flip (,) "black" . getColor . config