Merge pull request #219 from jumper149/master

Allow pattern-matching on 'XMonad.Layout.Choose' by exporting constructors
This commit is contained in:
Sibi Prabakaran
2020-12-08 21:14:27 +05:30
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -10,6 +10,9 @@
cast `Layout` back into a concrete type and extract current layout state
from it.
* 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

View File

@@ -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)