Allow pattern-matching on 'XMonad.Layout.Choose' by exporting constructors

This commit is contained in:
Felix Springer
2020-03-31 22:21:57 +02:00
parent 78b967198b
commit fa9a3abe49
2 changed files with 5 additions and 2 deletions

View File

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

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)