diff options
author | Daniel Wagner <daniel@wagner-home.com> | 2011-07-31 19:08:50 +0200 |
---|---|---|
committer | Daniel Wagner <daniel@wagner-home.com> | 2011-07-31 19:08:50 +0200 |
commit | 39f010d82d0292d9417a06abaf91dabb43ea3ef4 (patch) | |
tree | 1c701e3b4781a6460131c9e28e2705d8fb923f64 /XMonad/Util/Font.hs | |
parent | 3eae9324c087da3fae57f2dcd9181eb850f12c1a (diff) | |
download | XMonadContrib-39f010d82d0292d9417a06abaf91dabb43ea3ef4.tar.gz XMonadContrib-39f010d82d0292d9417a06abaf91dabb43ea3ef4.tar.xz XMonadContrib-39f010d82d0292d9417a06abaf91dabb43ea3ef4.zip |
GHC 7 compat
Ignore-this: 17a43a709e70ebccc925e016d7057399
* true error: more modules export foldl/foldl'/foldr, so explicitly use the Data.Foldable one
* -Werror error: transition from Control.OldException to Control.Exception, assuming everything was IOException
darcs-hash:20110731170850-76d51-71271524485f6d10f84521f271182bea5085d400.gz
Diffstat (limited to 'XMonad/Util/Font.hs')
-rw-r--r-- | XMonad/Util/Font.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/XMonad/Util/Font.hs b/XMonad/Util/Font.hs index d05b433..ed09a6d 100644 --- a/XMonad/Util/Font.hs +++ b/XMonad/Util/Font.hs @@ -32,9 +32,11 @@ module XMonad.Util.Font , fi ) where +import Prelude hiding (catch) import XMonad import Foreign import Control.Applicative +import Control.Exception import Data.Maybe #ifdef XFT @@ -60,6 +62,9 @@ stringToPixel d s = fromMaybe fallBack <$> io getIt where getIt = initColor d s fallBack = blackPixel d (defaultScreen d) +econst :: a -> IOException -> a +econst = const + -- | Given a fontname returns the font structure. If the font name is -- not valid the default font will be loaded and returned. initCoreFont :: String -> X FontStruct @@ -67,7 +72,7 @@ initCoreFont s = do d <- asks display io $ catch (getIt d) (fallBack d) where getIt d = loadQueryFont d s - fallBack d = const $ loadQueryFont d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" + fallBack d = econst $ loadQueryFont d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" releaseCoreFont :: FontStruct -> X () releaseCoreFont fs = do @@ -80,7 +85,7 @@ initUtf8Font s = do (_,_,fs) <- io $ catch (getIt d) (fallBack d) return fs where getIt d = createFontSet d s - fallBack d = const $ createFontSet d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" + fallBack d = econst $ createFontSet d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" releaseUtf8Font :: FontSet -> X () releaseUtf8Font fs = do |