Use -funbox-strict-fields, rather than UNPACK pragmas. cleaner code.

This commit is contained in:
Don Stewart
2007-04-09 07:23:02 +00:00
parent 384a30b7ae
commit a0f7df2fa6
2 changed files with 14 additions and 12 deletions

View File

@@ -33,18 +33,20 @@ import qualified Data.Map as M
-- | XState, the window manager state.
-- Just the display, width, height and a window list
data XState = XState
{ display :: Display
, screen :: {-# UNPACK #-} !ScreenNumber
, xineScreens :: {-# UNPACK #-} ![Rectangle]
{ display :: Display
, screen :: !ScreenNumber
, xineScreens :: ![Rectangle]
-- a mapping of workspaces to xinerama screen numbers
, wsOnScreen :: {-# UNPACK #-} !(M.Map Int Int)
, theRoot :: {-# UNPACK #-} !Window
, wmdelete :: {-# UNPACK #-} !Atom
, wmprotocols :: {-# UNPACK #-} !Atom
, dimensions :: {-# UNPACK #-} !(Int,Int)
, workspace :: {-# UNPACK #-} !WorkSpace -- ^ workspace list
, defaultLayoutDesc :: {-# UNPACK #-} !LayoutDesc
, layoutDescs :: {-# UNPACK #-} !(M.Map Int LayoutDesc)
, wsOnScreen :: !(M.Map Int Int)
, theRoot :: !Window
, wmdelete :: !Atom
, wmprotocols :: !Atom
, dimensions :: !(Int,Int)
, workspace :: !WorkSpace -- ^ workspace list
, defaultLayoutDesc :: !LayoutDesc
, layoutDescs :: !(M.Map Int LayoutDesc)
-- ^ mapping of workspaces to descriptions of their layouts
}

View File

@@ -11,6 +11,6 @@ build-depends: base>=1.0, X11>=1.1, X11-extras==0.0, mtl==1.0, unix>=1.0
executable: xmonad
main-is: Main.hs
ghc-options: -O2 -Wall -optl-Wl,-s
ghc-options: -funbox-strict-fields -O2 -Wall -optl-Wl,-s
-- ghc-options: -O2 -Wall -optl-Wl,-s -prof -auto-all
extensions: GeneralizedNewtypeDeriving