darcs patch: Wrap log output in a configurable type.

Tue Jun 5 10:14:33 EDT 2007 glasser@mit.edu * Wrap log output in a configurable type.

glasser:
Tue Jun 5 10:14:33 EDT 2007 glasser@mit.edu * Wrap log output in a configurable type.
Content-Description: A darcs patch for your repository!
New patches:
[Wrap log output in a configurable type. glasser@mit.edu**20070605141433] { hunk ./Config.hs 109 +-- +-- If logging is enabled, xmonad prints out 'logWindowSet' applied to +-- the current window set. By default this is the identity; however, +-- if you'd like to be able to send other kinds of messages over +-- stdout, you can make this something else (perhaps something like +-- 'Either WindowSet CustomStatusBarCommand'). Note that you will +-- also need to adjust the LogRecord declaration in Config.hs-boot. + +type LogRecord = WindowSet +logWindowSet :: WindowSet -> LogRecord +logWindowSet = id + hunk ./Config.hs-boot 5 +type LogRecord = WindowSet +logWindowSet:: WindowSet -> LogRecord
How about we just set the logging function itself in Config.hs? logging :: WindowSet -> X () logging s = return () -- no logging logging s = hPrint stdout -- normal logging s = do e <- grabsomethingfun from XMonadContrib hPrint in my own format (e,s) ? -- Don

On 6/5/07, Donald Bruce Stewart
How about we just set the logging function itself in Config.hs?
logging :: WindowSet -> X () logging s = return () -- no logging
logging s = hPrint stdout -- normal
logging s = do e <- grabsomethingfun from XMonadContrib hPrint in my own format (e,s)
I like it! --dave -- David Glasser | glasser@mit.edu | http://www.davidglasser.net/
participants (3)
-
David Glasser
-
dons@cse.unsw.edu.au
-
glasser@mit.edu