summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-03-09 07:34:49 +0100
committerDon Stewart <dons@cse.unsw.edu.au>2007-03-09 07:34:49 +0100
commit2d5c5e0c13a354251d2872f922208ca0be432cb9 (patch)
tree54027f155992d8e0c0fd974bd1401db5ba1e2f78
parente4186f45bc51f593cb9d22d5b7b8edc15b30ede7 (diff)
downloadmetatile-2d5c5e0c13a354251d2872f922208ca0be432cb9.tar
metatile-2d5c5e0c13a354251d2872f922208ca0be432cb9.zip
little bit of strictness, based on -prof output
darcs-hash:20070309063449-9c5c1-664dc95c81b702211f3bc61f53aa31f5eb5bd81d
-rw-r--r--Main.hs4
-rw-r--r--WMonad.hs2
-rw-r--r--thunk.cabal3
3 files changed, 5 insertions, 4 deletions
diff --git a/Main.hs b/Main.hs
index 3d77aad..8804a8d 100644
--- a/Main.hs
+++ b/Main.hs
@@ -155,11 +155,11 @@ hide :: Window -> W ()
hide w = withDisplay $ \d -> do
sw <- gets screenWidth
sh <- gets screenHeight
- io $ moveWindow d w (2*fromIntegral sw) (2*fromIntegral sh)
+ io $! moveWindow d w (2*fromIntegral sw) (2*fromIntegral sh)
-- | reveal. Expose a list of windows, moving them on screen
reveal :: Window -> W ()
-reveal w = withDisplay $ \d -> io $ moveWindow d w 0 0
+reveal w = withDisplay $ \d -> io $! moveWindow d w 0 0
-- | windows. Modify the current window list with a pure function, and refresh
windows :: (WorkSpace -> WorkSpace) -> W ()
diff --git a/WMonad.hs b/WMonad.hs
index 322f1f7..0b48cac 100644
--- a/WMonad.hs
+++ b/WMonad.hs
@@ -68,4 +68,4 @@ whenJust mg f = maybe (return ()) f mg
-- | A 'trace' for the W monad. Logs a string to stderr. The result may
-- be found in your .xsession-errors file
trace :: String -> W ()
-trace msg = io $ do hPutStrLn stderr msg; hFlush stderr
+trace msg = io $! do hPutStrLn stderr msg; hFlush stderr
diff --git a/thunk.cabal b/thunk.cabal
index d009f7d..f8f773d 100644
--- a/thunk.cabal
+++ b/thunk.cabal
@@ -11,5 +11,6 @@ build-depends: base==2.0, X11>=1.1, X11-extras==0.0, unix==1.0, mtl==1.0
executable: thunk
main-is: Main.hs
-ghc-options: -O -Wall -optl-Wl,-s
+ghc-options: -O2 -Wall -optl-Wl,-s
+-- ghc-options: -O2 -Wall -optl-Wl,-s -prof -auto-all
extensions: GeneralizedNewtypeDeriving