clean up some weird formatting/overboard strictness annotations

This commit is contained in:
Don Stewart 2007-11-05 01:14:00 +00:00
parent d1c29a40cf
commit 934fb2c368

View File

@ -62,19 +62,21 @@ data XConf = XConf
} }
-- todo, better name -- todo, better name
data XConfig = XConfig { normalBorderColor :: !String data XConfig = XConfig
{ normalBorderColor :: !String
, focusedBorderColor :: !String , focusedBorderColor :: !String
, terminal :: !String , terminal :: !String
, layoutHook :: !(Layout Window) , layoutHook :: !(Layout Window)
, manageHook :: !(Window -> String -> String -> String -> X (WindowSet -> WindowSet)) , manageHook :: Window -> String -> String -> String -> X (WindowSet -> WindowSet)
, workspaces :: ![String] , workspaces :: [String]
, defaultGaps :: ![(Int,Int,Int,Int)] , defaultGaps :: [(Int,Int,Int,Int)]
, numlockMask :: !KeyMask , numlockMask :: !KeyMask
, modMask :: !KeyMask , modMask :: !KeyMask
, keys :: !(XConfig -> M.Map (ButtonMask,KeySym) (X ())) , keys :: XConfig -> M.Map (ButtonMask,KeySym) (X ())
, mouseBindings :: !(XConfig -> M.Map (ButtonMask, Button) (Window -> X ())) , mouseBindings :: XConfig -> M.Map (ButtonMask, Button) (Window -> X ())
, borderWidth :: !Dimension , borderWidth :: !Dimension
, logHook :: !(X ()) } , logHook :: X ()
}
type WindowSet = StackSet WorkspaceId (Layout Window) Window ScreenId ScreenDetail type WindowSet = StackSet WorkspaceId (Layout Window) Window ScreenId ScreenDetail
type WindowSpace = Workspace WorkspaceId (Layout Window) Window type WindowSpace = Workspace WorkspaceId (Layout Window) Window
@ -113,8 +115,7 @@ catchX :: X a -> X a -> X a
catchX job errcase = do catchX job errcase = do
st <- get st <- get
c <- ask c <- ask
(a, s') <- io $ runX c st job `catch` (a, s') <- io $ runX c st job `catch` \e -> case e of
\e -> case e of
ExitException {} -> throw e ExitException {} -> throw e
_ -> do hPrint stderr e; runX c st errcase _ -> do hPrint stderr e; runX c st errcase
put s' put s'