diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2010-04-16 23:29:39 +0200 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2010-04-16 23:29:39 +0200 |
commit | c5b25d0fb00ff878886df89842c4a442819a0800 (patch) | |
tree | 983f531785953c66b51d71f0bbd132236961f257 /XMonad/Hooks | |
parent | 879a7a8dd2e0c9360ed9a90f8bab1f945b265211 (diff) | |
download | XMonadContrib-c5b25d0fb00ff878886df89842c4a442819a0800.tar.gz XMonadContrib-c5b25d0fb00ff878886df89842c4a442819a0800.tar.xz XMonadContrib-c5b25d0fb00ff878886df89842c4a442819a0800.zip |
Use imported `fi' alias for fromIntegral more often.
Ignore-this: 51040e693066fd7803cc1b108c1a13d5
Also moves `fi' into U.Image to avoid cyclic imports,
though XUtils sill exports that definition.
darcs-hash:20100416212939-1499c-a12428074d873b1eaea197e1b79c0ca07a96b05f.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Hooks/ManageDocks.hs | 4 | ||||
-rw-r--r-- | XMonad/Hooks/Place.hs | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/XMonad/Hooks/ManageDocks.hs b/XMonad/Hooks/ManageDocks.hs index 084b02c..5f7577b 100644 --- a/XMonad/Hooks/ManageDocks.hs +++ b/XMonad/Hooks/ManageDocks.hs @@ -33,6 +33,7 @@ import Foreign.C.Types (CLong) import XMonad.Layout.LayoutModifier import XMonad.Util.Types import XMonad.Util.WindowProperties (getProp32s) +import XMonad.Util.XUtils (fi) import qualified Data.Set as S @@ -211,9 +212,6 @@ type Strut = (Direction2D, CLong, CLong, CLong) type RectC = (CLong, CLong, CLong, CLong) -fi :: (Integral a, Num b) => a -> b -fi = fromIntegral - -- | Invertible conversion. r2c :: Rectangle -> RectC diff --git a/XMonad/Hooks/Place.hs b/XMonad/Hooks/Place.hs index b3b8ad2..98f7dc1 100644 --- a/XMonad/Hooks/Place.hs +++ b/XMonad/Hooks/Place.hs @@ -38,6 +38,7 @@ import qualified XMonad.StackSet as S import XMonad.Layout.WindowArranger import XMonad.Actions.FloatKeys +import XMonad.Util.XUtils import qualified Data.Map as M import Data.Ratio ((%)) @@ -262,8 +263,6 @@ checkBounds (Rectangle x1 y1 w1 h1) (Rectangle x2 y2 w2 h2) scale :: (RealFrac a, Integral b) => a -> b -> b -> b scale r n1 n2 = truncate $ r * fi n2 + (1 - r) * fi n1 -fi :: (Integral a, Num b) => a -> b -fi = fromIntegral r2rr :: Rectangle -> Rectangle -> S.RationalRect r2rr (Rectangle x0 y0 w0 h0) (Rectangle x y w h) |