From fa9a3abe495b60aa95cdfefbc3af059bbe75397b Mon Sep 17 00:00:00 2001 From: Felix Springer Date: Tue, 31 Mar 2020 22:21:57 +0200 Subject: [PATCH] Allow pattern-matching on 'XMonad.Layout.Choose' by exporting constructors --- CHANGES.md | 3 +++ src/XMonad/Layout.hs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f922b9e..2479c87 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,9 @@ ## unknown (unknown) + * Export constructor for `Choose` and `LR` from `Module.Layout` to allow + pattern-matching on the left and right sub-layouts of `Choose l r a`. + ## 0.15 (September 30, 2018) * Reimplement `sendMessage` to deal properly with windowset changes made diff --git a/src/XMonad/Layout.hs b/src/XMonad/Layout.hs index 9c01a69..c519667 100644 --- a/src/XMonad/Layout.hs +++ b/src/XMonad/Layout.hs @@ -16,7 +16,7 @@ module XMonad.Layout ( Full(..), Tall(..), Mirror(..), - Resize(..), IncMasterN(..), Choose, (|||), ChangeLayout(..), + Resize(..), IncMasterN(..), Choose(..), (|||), LR(..), ChangeLayout(..), mirrorRect, splitVertically, splitHorizontally, splitHorizontallyBy, splitVerticallyBy, @@ -144,7 +144,7 @@ infixr 5 ||| -- | A layout that allows users to switch between various layout options. data Choose l r a = Choose LR (l a) (r a) deriving (Read, Show) --- | Are we on the left or right sub-layout? +-- | Sets the current sub-layout (left or right) in 'Choose'. data LR = L | R deriving (Read, Show, Eq) data NextNoWrap = NextNoWrap deriving (Eq, Show, Typeable)