diff --git a/CHANGES.md b/CHANGES.md index 954d1489..edf425db 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -39,6 +39,11 @@ The `Dir` constructor now takes an additional `ComplCaseSensitivity` argument to indicate whether directory completion is case sensitive. + * All modules still exporting a `defaultFoo` constructor + + All of these were now removed. You can use the re-exported `def` from + `Data.Default` instead. + ### New Modules * `XMonad.Actions.RotateSome` diff --git a/XMonad/Actions/GridSelect.hs b/XMonad/Actions/GridSelect.hs index d2d3b93b..6e2eb12d 100644 --- a/XMonad/Actions/GridSelect.hs +++ b/XMonad/Actions/GridSelect.hs @@ -28,7 +28,6 @@ module XMonad.Actions.GridSelect ( -- * Configuration GSConfig(..), def, - defaultGSConfig, TwoDPosition, buildDefaultGSConfig, @@ -107,13 +106,13 @@ import Data.Word (Word8) -- -- Then add a keybinding, e.g. -- --- > , ((modm, xK_g), goToSelected defaultGSConfig) +-- > , ((modm, xK_g), goToSelected def) -- -- This module also supports displaying arbitrary information in a grid and letting -- the user select from it. E.g. to spawn an application from a given list, you -- can use the following: -- --- > , ((modm, xK_s), spawnSelected defaultGSConfig ["xterm","gmplayer","gvim"]) +-- > , ((modm, xK_s), spawnSelected def ["xterm","gmplayer","gvim"]) -- $commonGSConfig -- @@ -123,7 +122,7 @@ import Data.Word (Word8) -- > {-# LANGUAGE NoMonomorphismRestriction #-} -- > import XMonad -- > ... --- > gsconfig1 = defaultGSConfig { gs_cellheight = 30, gs_cellwidth = 100 } +-- > gsconfig1 = def { gs_cellheight = 30, gs_cellwidth = 100 } -- -- An example where 'buildDefaultGSConfig' is used instead of 'defaultGSConfig' -- in order to specify a custom colorizer is @gsconfig2@ (found in @@ -230,10 +229,6 @@ instance HasColorizer a where instance HasColorizer a => Default (GSConfig a) where def = buildDefaultGSConfig defaultColorizer -{-# DEPRECATED defaultGSConfig "Use def (from Data.Default, and re-exported from XMonad.Actions.GridSelect) instead." #-} -defaultGSConfig :: HasColorizer a => GSConfig a -defaultGSConfig = def - type TwoDPosition = (Integer, Integer) type TwoDElementMap a = [(TwoDPosition,(String,a))] @@ -770,7 +765,7 @@ gridselectWorkspace' conf func = withWindowSet $ \ws -> do -- -- > import XMonad.Actions.DynamicWorkspaces (addWorkspace) -- > --- > gridselectWorkspace' defaultGSConfig +-- > gridselectWorkspace' def -- > { gs_navigate = navNSearch -- > , gs_rearranger = searchStringRearrangerGenerator id -- > } diff --git a/XMonad/Actions/Navigation2D.hs b/XMonad/Actions/Navigation2D.hs index b354507c..fc77a129 100644 --- a/XMonad/Actions/Navigation2D.hs +++ b/XMonad/Actions/Navigation2D.hs @@ -39,7 +39,6 @@ module XMonad.Actions.Navigation2D ( -- * Usage , withNavigation2DConfig , Navigation2DConfig(..) , def - , defaultNavigation2DConfig , Navigation2D , lineNavigation , centerNavigation @@ -451,10 +450,6 @@ withNavigation2DConfig conf2d xconf = xconf { startupHook = startupHook xconf >> XS.put conf2d } -{-# DEPRECATED defaultNavigation2DConfig "Use def (from Data.Default, and re-exported from XMonad.Actions.Navigation2D) instead." #-} -defaultNavigation2DConfig :: Navigation2DConfig -defaultNavigation2DConfig = def - instance Default Navigation2DConfig where def = Navigation2DConfig { defaultTiledNavigation = lineNavigation , floatNavigation = centerNavigation diff --git a/XMonad/Actions/ShowText.hs b/XMonad/Actions/ShowText.hs index 77d72444..8826479e 100644 --- a/XMonad/Actions/ShowText.hs +++ b/XMonad/Actions/ShowText.hs @@ -17,7 +17,6 @@ module XMonad.Actions.ShowText ( -- * Usage -- $usage def - , defaultSTConfig , handleTimerEvent , flashText , ShowTextConfig(..) @@ -80,10 +79,6 @@ instance Default ShowTextConfig where , st_fg = "white" } -{-# DEPRECATED defaultSTConfig "Use def (from Data.Default, and re-exported by XMonad.Actions.ShowText) instead." #-} -defaultSTConfig :: ShowTextConfig -defaultSTConfig = def - -- | Handles timer events that notify when a window should be removed handleTimerEvent :: Event -> X All handleTimerEvent (ClientMessageEvent _ _ _ dis _ mtyp d) = do diff --git a/XMonad/Actions/TopicSpace.hs b/XMonad/Actions/TopicSpace.hs index 4050c9c8..03333a95 100644 --- a/XMonad/Actions/TopicSpace.hs +++ b/XMonad/Actions/TopicSpace.hs @@ -23,7 +23,6 @@ module XMonad.Actions.TopicSpace , Dir , TopicConfig(..) , def - , defaultTopicConfig , getLastFocusedTopics , setLastFocusedTopic , reverseLastFocusedTopics @@ -216,10 +215,6 @@ instance Default TopicConfig where , maxTopicHistory = 10 } -{-# DEPRECATED defaultTopicConfig "Use def (from Data.Default, and re-exported by XMonad.Actions.TopicSpace) instead." #-} -defaultTopicConfig :: TopicConfig -defaultTopicConfig = def - newtype PrevTopics = PrevTopics { getPrevTopics :: [String] } deriving (Read,Show,Typeable) instance ExtensionClass PrevTopics where initialValue = PrevTopics [] diff --git a/XMonad/Hooks/DynamicLog.hs b/XMonad/Hooks/DynamicLog.hs index 830ba3d3..ec983f6d 100644 --- a/XMonad/Hooks/DynamicLog.hs +++ b/XMonad/Hooks/DynamicLog.hs @@ -37,7 +37,7 @@ module XMonad.Hooks.DynamicLog ( -- * Build your own formatter dynamicLogWithPP, dynamicLogString, - PP(..), defaultPP, def, + PP(..), def, -- * Example formatters dzenPP, xmobarPP, sjanssenPP, byorgeyPP, @@ -566,10 +566,6 @@ data PP = PP { ppCurrent :: WorkspaceId -> String } -- | The default pretty printing options, as seen in 'dynamicLog'. -{-# DEPRECATED defaultPP "Use def (from Data.Default, and re-exported by XMonad.Hooks.DynamicLog) instead." #-} -defaultPP :: PP -defaultPP = def - instance Default PP where def = PP { ppCurrent = wrap "[" "]" , ppVisible = wrap "<" ">" diff --git a/XMonad/Hooks/ScreenCorners.hs b/XMonad/Hooks/ScreenCorners.hs index f5fe6e05..5b0a7a9c 100644 --- a/XMonad/Hooks/ScreenCorners.hs +++ b/XMonad/Hooks/ScreenCorners.hs @@ -179,7 +179,7 @@ screenCornerLayoutHook = ModifiedLayout ScreenCornerLayout -- -- > myStartupHook = do -- > ... --- > addScreenCorner SCUpperRight (goToSelected defaultGSConfig { gs_cellwidth = 200}) +-- > addScreenCorner SCUpperRight (goToSelected def { gs_cellwidth = 200}) -- > addScreenCorners [ (SCLowerRight, nextWS) -- > , (SCLowerLeft, prevWS) -- > ] diff --git a/XMonad/Layout/Decoration.hs b/XMonad/Layout/Decoration.hs index 9f07314b..e299f39f 100644 --- a/XMonad/Layout/Decoration.hs +++ b/XMonad/Layout/Decoration.hs @@ -17,7 +17,7 @@ module XMonad.Layout.Decoration ( -- * Usage: -- $usage decoration - , Theme (..), defaultTheme, def + , Theme (..), def , Decoration , DecorationMsg (..) , DecorationStyle (..) @@ -89,6 +89,7 @@ data Theme = -- Inner @[Bool]@ is a row in a icon bitmap. } deriving (Show, Read) +-- | The default xmonad 'Theme'. instance Default Theme where def = Theme { activeColor = "#999999" @@ -110,11 +111,6 @@ instance Default Theme where , windowTitleIcons = [] } -{-# DEPRECATED defaultTheme "Use def (from Data.Default, and re-exported by XMonad.Layout.Decoration) instead." #-} --- | The default xmonad 'Theme'. -defaultTheme :: Theme -defaultTheme = def - -- | A 'Decoration' layout modifier will handle 'SetTheme', a message -- to dynamically change the decoration 'Theme'. data DecorationMsg = SetTheme Theme deriving ( Typeable ) diff --git a/XMonad/Layout/DecorationMadness.hs b/XMonad/Layout/DecorationMadness.hs index ec5a88dd..130ee160 100644 --- a/XMonad/Layout/DecorationMadness.hs +++ b/XMonad/Layout/DecorationMadness.hs @@ -82,7 +82,7 @@ module XMonad.Layout.DecorationMadness , floatDwmStyle , floatSimpleTabbed , floatTabbed - , def, defaultTheme, shrinkText + , def, shrinkText ) where import XMonad diff --git a/XMonad/Layout/DwmStyle.hs b/XMonad/Layout/DwmStyle.hs index a854d1bd..0dfb6ad5 100644 --- a/XMonad/Layout/DwmStyle.hs +++ b/XMonad/Layout/DwmStyle.hs @@ -18,7 +18,6 @@ module XMonad.Layout.DwmStyle dwmStyle , Theme (..) , def - , defaultTheme , DwmStyle (..) , shrinkText, CustomShrink(CustomShrink) , Shrinker(..) diff --git a/XMonad/Layout/Groups/Examples.hs b/XMonad/Layout/Groups/Examples.hs index 937d58f1..1b62c0ff 100644 --- a/XMonad/Layout/Groups/Examples.hs +++ b/XMonad/Layout/Groups/Examples.hs @@ -37,7 +37,6 @@ module XMonad.Layout.Groups.Examples ( -- * Usage , fullTabs , TiledTabsConfig(..) , def - , defaultTiledTabsConfig , increaseNMasterGroups , decreaseNMasterGroups , shrinkMasterGroups @@ -48,7 +47,6 @@ module XMonad.Layout.Groups.Examples ( -- * Usage -- * Useful re-exports and utils , module XMonad.Layout.Groups.Helpers , shrinkText - , defaultTheme , GroupEQ(..) , zoomRowG ) where @@ -205,10 +203,6 @@ data TiledTabsConfig s = TTC { vNMaster :: Int instance s ~ DefaultShrinker => Default (TiledTabsConfig s) where def = TTC 1 0.5 (3/100) 1 0.5 (3/100) shrinkText def -{-# DEPRECATED defaultTiledTabsConfig "Use def (from Data.Default, and re-exported by XMonad.Layout.Groups) instead." #-} -defaultTiledTabsConfig :: TiledTabsConfig DefaultShrinker -defaultTiledTabsConfig = def - fullTabs c = _tab c $ G.group _tabs $ Full ||| _vert c ||| _horiz c tallTabs c = _tab c $ G.group _tabs $ _vert c ||| _horiz c ||| Full diff --git a/XMonad/Layout/Groups/Wmii.hs b/XMonad/Layout/Groups/Wmii.hs index a42d6746..4c709e61 100644 --- a/XMonad/Layout/Groups/Wmii.hs +++ b/XMonad/Layout/Groups/Wmii.hs @@ -31,7 +31,6 @@ module XMonad.Layout.Groups.Wmii ( -- * Usage -- * Useful re-exports , shrinkText , def - , defaultTheme , module XMonad.Layout.Groups.Helpers ) where import XMonad hiding ((|||)) diff --git a/XMonad/Layout/ShowWName.hs b/XMonad/Layout/ShowWName.hs index 104daa53..475bdf54 100644 --- a/XMonad/Layout/ShowWName.hs +++ b/XMonad/Layout/ShowWName.hs @@ -18,7 +18,6 @@ module XMonad.Layout.ShowWName showWName , showWName' , def - , defaultSWNConfig , SWNConfig(..) , ShowWName ) where @@ -69,10 +68,6 @@ instance Default SWNConfig where , swn_fade = 1 } -{-# DEPRECATED defaultSWNConfig "Use def (from Data.Default, and re-exported from XMonad.Layout.ShowWName) instead." #-} -defaultSWNConfig :: SWNConfig -defaultSWNConfig = def - instance LayoutModifier ShowWName a where redoLayout sn r _ wrs = doShow sn r wrs diff --git a/XMonad/Layout/SimpleDecoration.hs b/XMonad/Layout/SimpleDecoration.hs index 052750ab..42930f00 100644 --- a/XMonad/Layout/SimpleDecoration.hs +++ b/XMonad/Layout/SimpleDecoration.hs @@ -21,7 +21,6 @@ module XMonad.Layout.SimpleDecoration simpleDeco , Theme (..) , def - , defaultTheme , SimpleDecoration (..) , shrinkText, CustomShrink(CustomShrink) , Shrinker(..) diff --git a/XMonad/Layout/TabBarDecoration.hs b/XMonad/Layout/TabBarDecoration.hs index 4ac808e5..010c53ee 100644 --- a/XMonad/Layout/TabBarDecoration.hs +++ b/XMonad/Layout/TabBarDecoration.hs @@ -16,7 +16,7 @@ module XMonad.Layout.TabBarDecoration ( -- * Usage -- $usage simpleTabBar, tabBar - , def, defaultTheme, shrinkText + , def, shrinkText , TabBarDecoration (..), XPPosition (..) , module XMonad.Layout.ResizeScreen ) where diff --git a/XMonad/Layout/Tabbed.hs b/XMonad/Layout/Tabbed.hs index 55515643..7326bd8f 100644 --- a/XMonad/Layout/Tabbed.hs +++ b/XMonad/Layout/Tabbed.hs @@ -27,7 +27,6 @@ module XMonad.Layout.Tabbed , simpleTabbedRightAlways, tabbedRightAlways, addTabsRightAlways , Theme (..) , def - , defaultTheme , TabbedDecoration (..) , shrinkText, CustomShrink(CustomShrink) , Shrinker(..) diff --git a/XMonad/Layout/WindowNavigation.hs b/XMonad/Layout/WindowNavigation.hs index 94b153cd..462da30a 100644 --- a/XMonad/Layout/WindowNavigation.hs +++ b/XMonad/Layout/WindowNavigation.hs @@ -21,8 +21,8 @@ module XMonad.Layout.WindowNavigation ( Navigate(..), Direction2D(..), MoveWindowToWindow(..), navigateColor, navigateBrightness, - noNavigateBorders, defaultWNConfig, def, - WNConfig, WindowNavigation, + noNavigateBorders, def, WNConfig, + WindowNavigation, ) where import Data.List ( nub, sortBy, (\\) ) @@ -93,10 +93,6 @@ navigateBrightness f = def { brightness = Just $ max 0 $ min 1 f } instance Default WNConfig where def = WNC (Just 0.4) "#0000FF" "#00FFFF" "#FF0000" "#FF00FF" -{-# DEPRECATED defaultWNConfig "Use def (from Data.Default, and re-exported by XMonad.Layout.WindowNavigation) instead." #-} -defaultWNConfig :: WNConfig -defaultWNConfig = def - data NavigationState a = NS Point [(a,Rectangle)] data WindowNavigation a = WindowNavigation WNConfig (Invisible Maybe (NavigationState a)) deriving ( Read, Show ) diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index ffcd4c7d..21db8140 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -34,7 +34,6 @@ module XMonad.Prompt , mkXPromptWithModes , def , amberXPConfig - , defaultXPConfig , greenXPConfig , XPMode , XPType (..) @@ -294,7 +293,7 @@ data XPColor = , border :: String -- ^ Border color } -amberXPConfig, defaultXPConfig, greenXPConfig :: XPConfig +amberXPConfig, greenXPConfig :: XPConfig instance Default XPColor where def = @@ -331,8 +330,6 @@ instance Default XPConfig where , defaultPrompter = id , sorter = const id } -{-# DEPRECATED defaultXPConfig "Use def (from Data.Default, and re-exported from XMonad.Prompt) instead." #-} -defaultXPConfig = def greenXPConfig = def { bgColor = "black" , fgColor = "green" , promptBorderWidth = 0 diff --git a/XMonad/Prompt/ConfirmPrompt.hs b/XMonad/Prompt/ConfirmPrompt.hs index 1fc258d1..465122af 100644 --- a/XMonad/Prompt/ConfirmPrompt.hs +++ b/XMonad/Prompt/ConfirmPrompt.hs @@ -35,7 +35,7 @@ will then run normally if the user confirms. This should be used something like this: > ... -> , ((modm , xK_l), confirmPrompt defaultXPConfig "exit" $ io (exitWith ExitSuccess)) +> , ((modm , xK_l), confirmPrompt def "exit" $ io (exitWith ExitSuccess)) > ... -} diff --git a/XMonad/Prompt/Input.hs b/XMonad/Prompt/Input.hs index 960de133..173fea73 100644 --- a/XMonad/Prompt/Input.hs +++ b/XMonad/Prompt/Input.hs @@ -49,12 +49,12 @@ import XMonad.Prompt -- @fireEmployee@ action, like so: -- -- > firingPrompt :: X () --- > firingPrompt = inputPrompt defaultXPConfig "Fire" ?+ fireEmployee +-- > firingPrompt = inputPrompt def "Fire" ?+ fireEmployee -- -- If @employees@ contains a list of all his employees, he could also -- create an autocompleting version, like this: -- --- > firingPrompt' = inputPromptWithCompl defaultXPConfig "Fire" +-- > firingPrompt' = inputPromptWithCompl def "Fire" -- > (mkComplFunFromList employees) ?+ fireEmployee -- -- Now all he has to do is add a keybinding to @firingPrompt@ (or diff --git a/XMonad/Util/SpawnNamedPipe.hs b/XMonad/Util/SpawnNamedPipe.hs index f19cf470..fc3e3d38 100644 --- a/XMonad/Util/SpawnNamedPipe.hs +++ b/XMonad/Util/SpawnNamedPipe.hs @@ -41,8 +41,8 @@ import qualified Data.Map as Map -- > -- > -- LogHook -- > logHook' = do --- > mh <- getNamedPipeHandle "dzenPipe" --- > dynamicLogWithPP $ defaultPP { +-- > mh <- getNamedPipeHandle "dzenPipe" +-- > dynamicLogWithPP $ def { -- > ppOutput = maybe (\s -> return ()) (hPutStrLn) mh} -- > -- > -- Main