little bit of strictness, based on -prof output

This commit is contained in:
Don Stewart
2007-03-09 06:34:49 +00:00
parent 914192cc70
commit f77f0ae32c
3 changed files with 5 additions and 4 deletions

View File

@@ -155,11 +155,11 @@ hide :: Window -> W ()
hide w = withDisplay $ \d -> do hide w = withDisplay $ \d -> do
sw <- gets screenWidth sw <- gets screenWidth
sh <- gets screenHeight 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. Expose a list of windows, moving them on screen
reveal :: Window -> W () 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. Modify the current window list with a pure function, and refresh
windows :: (WorkSpace -> WorkSpace) -> W () windows :: (WorkSpace -> WorkSpace) -> W ()

View File

@@ -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 -- | A 'trace' for the W monad. Logs a string to stderr. The result may
-- be found in your .xsession-errors file -- be found in your .xsession-errors file
trace :: String -> W () trace :: String -> W ()
trace msg = io $ do hPutStrLn stderr msg; hFlush stderr trace msg = io $! do hPutStrLn stderr msg; hFlush stderr

View File

@@ -11,5 +11,6 @@ build-depends: base==2.0, X11>=1.1, X11-extras==0.0, unix==1.0, mtl==1.0
executable: thunk executable: thunk
main-is: Main.hs 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 extensions: GeneralizedNewtypeDeriving