    {-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses, PatternGuards #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module       : XMonad.Layout.LayoutCombinators
    -- Copyright    : (c) David Roundy <droundy@darcs.net>
    -- License      : BSD
    --
    -- Maintainer   : none
    -- Stability    : unstable
    -- Portability  : portable
    --
    -- The "XMonad.Layout.LayoutCombinators" module provides combinators
    -- for easily combining multiple layouts into one composite layout, as
    -- well as a way to jump directly to any particular layout (say, with
    -- a keybinding) without having to cycle through other layouts to get
    -- to it.
    -----------------------------------------------------------------------------

    module XMonad.Layout.LayoutCombinators
        ( -- * Usage
          -- $usage

          -- * Layout combinators
          -- $combine

          -- ** Combinators using DragPane vertical
          -- $dpv
          (*||*), (**||*),(***||*),(****||*),(***||**),(****||***)
        , (***||****),(*||****),(**||***),(*||***),(*||**)

          -- ** Combinators using DragPane horizontal
          -- $dph
        , (*//*), (**//*),(***//*),(****//*),(***//**),(****//***)
        , (***//****),(*//****),(**//***),(*//***),(*//**)

          -- ** Combinators using Tall (vertical)
          -- $tv
        , (*|*), (**|*),(***|*),(****|*),(***|**),(****|***)
        , (***|****),(*|****),(**|***),(*|***),(*|**)

          -- ** Combinators using Mirror Tall (horizontal)
          -- $mth
        , (*/*), (**/*),(***/*),(****/*),(***/**),(****/***)
        , (***/****),(*/****),(**/***),(*/***),(*/**)

          -- * New layout choice combinator and 'JumpToLayout'
          -- $jtl
        , (|||)
        , JumpToLayout(..)

          -- * Types
        , NewSelect
        ) where

    import Data.Maybe ( isJust, isNothing )

    import XMonad hiding ((|||))
    import XMonad.StackSet (Workspace (..))
    import XMonad.Layout.Combo
    import XMonad.Layout.DragPane

    -- $usage
    -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:
    --
    -- > import XMonad.Layout.LayoutCombinators hiding ( (|||) )
    --
    -- Then edit your @layoutHook@ to use the new layout combinators. For
    -- example:
    --
    -- > myLayout = (Tall 1 (3/100) (1/2) *//* Full)  ||| (Tall 1 (3/100) (1/2) ***||** Full) ||| Full ||| etc..
    -- > main = xmonad def { layoutHook = myLayout }
    --
    -- For more detailed instructions on editing the @layoutHook@ see:
    --
    -- "XMonad.Doc.Extending#Editing_the_layout_hook"
    --
    -- To use the 'JumpToLayout' message, hide the normal @|||@ operator instead:
    --
    -- > import XMonad hiding ( (|||) )
    -- > import XMonad.Layout.LayoutCombinators
    --
    -- If you import XMonad.Layout, you will need to hide it from there as well.
    -- Then bind some keys to a 'JumpToLayout' message:
    --
    -- >   , ((modm .|. controlMask, xK_f), sendMessage $ JumpToLayout "Full")  -- jump directly to the Full layout
    --
    -- See below for more detailed documentation.

    -- $combine
    -- Each of the following combinators combines two layouts into a
    -- single composite layout by splitting the screen into two regions,
    -- one governed by each layout.  Asterisks in the combinator names
    -- denote the relative amount of screen space given to the respective
    -- layouts.  For example, the '***||*' combinator gives three times as
    -- much space to the left-hand layout as to the right-hand layout.

    infixr 6 *||*, **||*, ***||*, ****||*, ***||**, ****||***, ***||****, *||****, **||***, *||***, *||**,
             *//*, **//*, ***//*, ****//*, ***//**, ****//***, ***//****, *//****, **//***, *//***, *//**,
             *|* , **|* , ***|* , ****|* , ***|** , ****|*** , ***|**** , *|**** , **|*** , *|*** , *|** ,
             */* , **/* , ***/* , ****/* , ***/** , ****/*** , ***/**** , */**** , **/*** , */*** , */**

    -- $dpv
    -- These combinators combine two layouts using "XMonad.DragPane" in
    -- vertical mode.

    (*||*),(**||*),(***||*),(****||*), (***||**),(****||***),
           (***||****),(*||****),(**||***),(*||***),(*||**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a) =>
              l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a

    *||* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*||*)      = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /2))
    **||* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (**||*)     = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (2Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /3))
    ***||* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (***||*)    = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (3Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /4))
    ****||* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (****||*)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (4Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    ***||** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (***||**)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (3Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    ****||*** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (****||***) = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (4Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /7))
    ***||**** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (***||****) = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (3Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /7))
    *||**** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*||****)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    **||*** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (**||***)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (2Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    *||*** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*||***)    = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /4))
    *||** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*||**)     = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Vertical 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /3))

    -- $dph
    -- These combinators combine two layouts using "XMonad.DragPane" in
    -- horizontal mode.

    (*//*),(**//*),(***//*),(****//*), (***//**),(****//***),
           (***//****),(*//****),(**//***),(*//***),(*//**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a) =>
              l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a

    *//* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*//*)      = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /2))
    **//* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (**//*)     = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (2Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /3))
    ***//* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (***//*)    = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (3Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /4))
    ****//* :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (****//*)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (4Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    ***//** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (***//**)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (3Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    ****//*** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (****//***) = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (4Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /7))
    ***//**** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (***//****) = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (3Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /7))
    *//**** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*//****)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    **//*** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (**//***)   = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (2Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /5))
    *//*** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*//***)    = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /4))
    *//** :: l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    (*//**)     = DragPane () -> l1 a -> l2 a -> CombineTwo (DragPane ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (DragType -> Double -> Double -> DragPane ()
    forall a. DragType -> Double -> Double -> DragPane a
    dragPane DragType
    Horizontal 0.1 (1Double -> Double -> Double
    forall a. Fractional a => a -> a -> a
    /3))

    -- $tv
    -- These combinators combine two layouts vertically using @Tall@.

    (*|*),(**|*),(***|*),(****|*), (***|**),(****|***),
           (***|****),(*|****),(**|***),(*|***),(*|**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a)
              => l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    *|* :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (*|*)      = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /2))
    **|* :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (**|*)     = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (2Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /3))
    ***|* :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (***|*)    = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (3Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /4))
    ****|* :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (****|*)   = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (4Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    ***|** :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (***|**)   = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (3Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    ****|*** :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (****|***) = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (4Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /7))
    ***|**** :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (***|****) = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (3Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /7))
    *|**** :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (*|****)   = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    **|*** :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (**|***)   = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (2Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    *|*** :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (*|***)    = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /4))
    *|** :: l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    (*|**)     = Tall () -> l1 a -> l2 a -> CombineTwo (Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /3))

    -- $mth
    -- These combinators combine two layouts horizontally using @Mirror
    -- Tall@.

    (*/*),(**/*),(***/*),(****/*), (***/**),(****/***),
           (***/****),(*/****),(**/***),(*/***),(*/**) :: (Read a, Eq a, LayoutClass l1 a, LayoutClass l2 a)
              => l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    */* :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (*/*)      = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /2))
    **/* :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (**/*)     = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (2Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /3))
    ***/* :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (***/*)    = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (3Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /4))
    ****/* :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (****/*)   = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (4Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    ***/** :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (***/**)   = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (3Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    ****/*** :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (****/***) = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (4Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /7))
    ***/**** :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (***/****) = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (3Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /7))
    */**** :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (*/****)   = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    **/*** :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (**/***)   = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (2Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /5))
    */*** :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (*/***)    = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /4))
    */** :: l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    (*/**)     = Mirror Tall ()
    -> l1 a -> l2 a -> CombineTwo (Mirror Tall ()) l1 l2 a
    forall a (super :: * -> *) (l1 :: * -> *) (l2 :: * -> *).
    (Read a, Eq a, LayoutClass super (), LayoutClass l1 a,
     LayoutClass l2 a) =>
    super () -> l1 a -> l2 a -> CombineTwo (super ()) l1 l2 a
    combineTwo (Tall () -> Mirror Tall ()
    forall (l :: * -> *) a. l a -> Mirror l a
    Mirror (Tall () -> Mirror Tall ()) -> Tall () -> Mirror Tall ()
    forall a b. (a -> b) -> a -> b
    $ Int -> Rational -> Rational -> Tall ()
    forall a. Int -> Rational -> Rational -> Tall a
    Tall 1 0.1 (1Rational -> Rational -> Rational
    forall a. Fractional a => a -> a -> a
    /3))

    infixr 5 |||

    -- $jtl
    -- The standard xmonad core exports a layout combinator @|||@ which
    -- represents layout choice.  This is a reimplementation which also
    -- provides the capability to support 'JumpToLayout' messages.  To use
    -- it, be sure to hide the import of @|||@ from the xmonad core; if either of
    -- these two lines appear in your configuration:
    --
    -- > import XMonad
    -- > import XMonad.Layout
    --
    -- replace them with these instead, respectively:
    --
    -- > import XMonad hiding ( (|||) )
    -- > import XMonad.Layout hiding ( (|||) )
    --
    -- The argument given to a 'JumpToLayout' message should be the
    -- @description@ of the layout to be selected.  If you use
    -- "XMonad.Hooks.DynamicLog", this is the name of the layout displayed
    -- in your status bar.  Alternatively, you can use GHCi to determine
    -- the proper name to use.  For example:
    --
    -- > $ ghci
    -- > GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
    -- > Loading package base ... linking ... done.
    -- > :set prompt "> "    -- don't show loaded module names
    -- > > :m +XMonad.Core   -- load the xmonad core
    -- > > :m +XMonad.Layout.Grid  -- load whatever module you want to use
    -- > > description Grid  -- find out what it's called
    -- > "Grid"
    --
    -- As yet another (possibly easier) alternative, you can use the
    -- "XMonad.Layout.Named" modifier to give custom names to your
    -- layouts, and use those.
    --
    -- For the ability to select a layout from a prompt, see
    -- "XMonad.Prompt.Layout".

    -- | A reimplementation of the combinator of the same name from the
    --   xmonad core, providing layout choice, and the ability to support
    --   'JumpToLayout' messages.
    (|||) :: (LayoutClass l1 a, LayoutClass l2 a) => l1 a -> l2 a -> NewSelect l1 l2 a
    ||| :: l1 a -> l2 a -> NewSelect l1 l2 a
    (|||) = Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    NewSelect Bool
    True

    data NewSelect l1 l2 a = NewSelect Bool (l1 a) (l2 a) deriving ( ReadPrec [NewSelect l1 l2 a]
    ReadPrec (NewSelect l1 l2 a)
    Int -> ReadS (NewSelect l1 l2 a)
    ReadS [NewSelect l1 l2 a]
    (Int -> ReadS (NewSelect l1 l2 a))
    -> ReadS [NewSelect l1 l2 a]
    -> ReadPrec (NewSelect l1 l2 a)
    -> ReadPrec [NewSelect l1 l2 a]
    -> Read (NewSelect l1 l2 a)
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    ReadPrec [NewSelect l1 l2 a]
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    ReadPrec (NewSelect l1 l2 a)
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    Int -> ReadS (NewSelect l1 l2 a)
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    ReadS [NewSelect l1 l2 a]
    readListPrec :: ReadPrec [NewSelect l1 l2 a]
    $creadListPrec :: forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    ReadPrec [NewSelect l1 l2 a]
    readPrec :: ReadPrec (NewSelect l1 l2 a)
    $creadPrec :: forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    ReadPrec (NewSelect l1 l2 a)
    readList :: ReadS [NewSelect l1 l2 a]
    $creadList :: forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    ReadS [NewSelect l1 l2 a]
    readsPrec :: Int -> ReadS (NewSelect l1 l2 a)
    $creadsPrec :: forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Read (l1 a), Read (l2 a)) =>
    Int -> ReadS (NewSelect l1 l2 a)
    Read, Int -> NewSelect l1 l2 a -> ShowS
    [NewSelect l1 l2 a] -> ShowS
    NewSelect l1 l2 a -> String
    (Int -> NewSelect l1 l2 a -> ShowS)
    -> (NewSelect l1 l2 a -> String)
    -> ([NewSelect l1 l2 a] -> ShowS)
    -> Show (NewSelect l1 l2 a)
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Show (l1 a), Show (l2 a)) =>
    Int -> NewSelect l1 l2 a -> ShowS
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Show (l1 a), Show (l2 a)) =>
    [NewSelect l1 l2 a] -> ShowS
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Show (l1 a), Show (l2 a)) =>
    NewSelect l1 l2 a -> String
    showList :: [NewSelect l1 l2 a] -> ShowS
    $cshowList :: forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Show (l1 a), Show (l2 a)) =>
    [NewSelect l1 l2 a] -> ShowS
    show :: NewSelect l1 l2 a -> String
    $cshow :: forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Show (l1 a), Show (l2 a)) =>
    NewSelect l1 l2 a -> String
    showsPrec :: Int -> NewSelect l1 l2 a -> ShowS
    $cshowsPrec :: forall (l1 :: * -> *) (l2 :: * -> *) a.
    (Show (l1 a), Show (l2 a)) =>
    Int -> NewSelect l1 l2 a -> ShowS
    Show )

    -- |
    data JumpToLayout = JumpToLayout String -- ^ A message to jump to a particular layout
                                            -- , specified by its description string..
                      | NextLayoutNoWrap
                      | Wrap
                        deriving ( ReadPrec [JumpToLayout]
    ReadPrec JumpToLayout
    Int -> ReadS JumpToLayout
    ReadS [JumpToLayout]
    (Int -> ReadS JumpToLayout)
    -> ReadS [JumpToLayout]
    -> ReadPrec JumpToLayout
    -> ReadPrec [JumpToLayout]
    -> Read JumpToLayout
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    readListPrec :: ReadPrec [JumpToLayout]
    $creadListPrec :: ReadPrec [JumpToLayout]
    readPrec :: ReadPrec JumpToLayout
    $creadPrec :: ReadPrec JumpToLayout
    readList :: ReadS [JumpToLayout]
    $creadList :: ReadS [JumpToLayout]
    readsPrec :: Int -> ReadS JumpToLayout
    $creadsPrec :: Int -> ReadS JumpToLayout
    Read, Int -> JumpToLayout -> ShowS
    [JumpToLayout] -> ShowS
    JumpToLayout -> String
    (Int -> JumpToLayout -> ShowS)
    -> (JumpToLayout -> String)
    -> ([JumpToLayout] -> ShowS)
    -> Show JumpToLayout
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [JumpToLayout] -> ShowS
    $cshowList :: [JumpToLayout] -> ShowS
    show :: JumpToLayout -> String
    $cshow :: JumpToLayout -> String
    showsPrec :: Int -> JumpToLayout -> ShowS
    $cshowsPrec :: Int -> JumpToLayout -> ShowS
    Show, Typeable )
    instance Message JumpToLayout

    instance (LayoutClass l1 a, LayoutClass l2 a) => LayoutClass (NewSelect l1 l2) a where
        runLayout :: Workspace String (NewSelect l1 l2 a) a
    -> Rectangle -> X ([(a, Rectangle)], Maybe (NewSelect l1 l2 a))
    runLayout (Workspace i :: String
    i (NewSelect True l1 :: l1 a
    l1 l2 :: l2 a
    l2) ms :: Maybe (Stack a)
    ms) r :: Rectangle
    r = do (wrs :: [(a, Rectangle)]
    wrs, ml1' :: Maybe (l1 a)
    ml1') <- Workspace String (l1 a) a
    -> Rectangle -> X ([(a, Rectangle)], Maybe (l1 a))
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    Workspace String (layout a) a
    -> Rectangle -> X ([(a, Rectangle)], Maybe (layout a))
    runLayout (String -> l1 a -> Maybe (Stack a) -> Workspace String (l1 a) a
    forall i l a. i -> l -> Maybe (Stack a) -> Workspace i l a
    Workspace String
    i l1 a
    l1 Maybe (Stack a)
    ms) Rectangle
    r
                                                                 ([(a, Rectangle)], Maybe (NewSelect l1 l2 a))
    -> X ([(a, Rectangle)], Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => a -> m a
    return ([(a, Rectangle)]
    wrs, (\l1' :: l1 a
    l1' -> Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    NewSelect Bool
    True l1 a
    l1' l2 a
    l2) (l1 a -> NewSelect l1 l2 a)
    -> Maybe (l1 a) -> Maybe (NewSelect l1 l2 a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` Maybe (l1 a)
    ml1')

        runLayout (Workspace i :: String
    i (NewSelect False l1 :: l1 a
    l1 l2 :: l2 a
    l2) ms :: Maybe (Stack a)
    ms) r :: Rectangle
    r = do (wrs :: [(a, Rectangle)]
    wrs, ml2' :: Maybe (l2 a)
    ml2') <- Workspace String (l2 a) a
    -> Rectangle -> X ([(a, Rectangle)], Maybe (l2 a))
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    Workspace String (layout a) a
    -> Rectangle -> X ([(a, Rectangle)], Maybe (layout a))
    runLayout (String -> l2 a -> Maybe (Stack a) -> Workspace String (l2 a) a
    forall i l a. i -> l -> Maybe (Stack a) -> Workspace i l a
    Workspace String
    i l2 a
    l2 Maybe (Stack a)
    ms) Rectangle
    r
                                                                  ([(a, Rectangle)], Maybe (NewSelect l1 l2 a))
    -> X ([(a, Rectangle)], Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => a -> m a
    return ([(a, Rectangle)]
    wrs, (\l2' :: l2 a
    l2' -> Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    NewSelect Bool
    False l1 a
    l1 l2 a
    l2') (l2 a -> NewSelect l1 l2 a)
    -> Maybe (l2 a) -> Maybe (NewSelect l1 l2 a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` Maybe (l2 a)
    ml2')
        description :: NewSelect l1 l2 a -> String
    description (NewSelect True l1 :: l1 a
    l1 _) = l1 a -> String
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> String
    description l1 a
    l1
        description (NewSelect False _ l2 :: l2 a
    l2) = l2 a -> String
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> String
    description l2 a
    l2
        handleMessage :: NewSelect l1 l2 a -> SomeMessage -> X (Maybe (NewSelect l1 l2 a))
    handleMessage l :: NewSelect l1 l2 a
    l@(NewSelect False _ _) m :: SomeMessage
    m
            | Just Wrap <- SomeMessage -> Maybe JumpToLayout
    forall m. Message m => SomeMessage -> Maybe m
    fromMessage SomeMessage
    m = (NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a. a -> Maybe a
    Just (X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a)))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $ NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap NewSelect l1 l2 a
    l X (NewSelect l1 l2 a)
    -> (NewSelect l1 l2 a -> X (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a)
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    passOn SomeMessage
    m
        handleMessage l :: NewSelect l1 l2 a
    l@(NewSelect amfirst :: Bool
    amfirst _ _) m :: SomeMessage
    m
            | Just NextLayoutNoWrap <- SomeMessage -> Maybe JumpToLayout
    forall m. Message m => SomeMessage -> Maybe m
    fromMessage SomeMessage
    m =
                      if Bool
    amfirst then (Maybe (NewSelect l1 l2 a) -> Bool)
    -> X (Maybe (NewSelect l1 l2 a))
    -> X (Maybe (NewSelect l1 l2 a))
    -> X (Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => (a -> Bool) -> m a -> m a -> m a
    when' Maybe (NewSelect l1 l2 a) -> Bool
    forall a. Maybe a -> Bool
    isNothing (SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM SomeMessage
    m NewSelect l1 l2 a
    l) (X (Maybe (NewSelect l1 l2 a)) -> X (Maybe (NewSelect l1 l2 a)))
    -> X (Maybe (NewSelect l1 l2 a)) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $
                                      (NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a. a -> Maybe a
    Just (X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a)))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $ NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap NewSelect l1 l2 a
    l X (NewSelect l1 l2 a)
    -> (NewSelect l1 l2 a -> X (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a)
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    passOn (JumpToLayout -> SomeMessage
    forall a. Message a => a -> SomeMessage
    SomeMessage JumpToLayout
    Wrap)
                                 else SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM SomeMessage
    m NewSelect l1 l2 a
    l
        handleMessage l :: NewSelect l1 l2 a
    l m :: SomeMessage
    m
            | Just NextLayout <- SomeMessage -> Maybe ChangeLayout
    forall m. Message m => SomeMessage -> Maybe m
    fromMessage SomeMessage
    m = (Maybe (NewSelect l1 l2 a) -> Bool)
    -> X (Maybe (NewSelect l1 l2 a))
    -> X (Maybe (NewSelect l1 l2 a))
    -> X (Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => (a -> Bool) -> m a -> m a -> m a
    when' Maybe (NewSelect l1 l2 a) -> Bool
    forall a. Maybe a -> Bool
    isNothing (SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM (JumpToLayout -> SomeMessage
    forall a. Message a => a -> SomeMessage
    SomeMessage JumpToLayout
    NextLayoutNoWrap) NewSelect l1 l2 a
    l) (X (Maybe (NewSelect l1 l2 a)) -> X (Maybe (NewSelect l1 l2 a)))
    -> X (Maybe (NewSelect l1 l2 a)) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $
                                                 (NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a. a -> Maybe a
    Just (X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a)))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $ NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap NewSelect l1 l2 a
    l X (NewSelect l1 l2 a)
    -> (NewSelect l1 l2 a -> X (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a)
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    passOn (JumpToLayout -> SomeMessage
    forall a. Message a => a -> SomeMessage
    SomeMessage JumpToLayout
    Wrap)
        handleMessage l :: NewSelect l1 l2 a
    l@(NewSelect True _ l2 :: l2 a
    l2) m :: SomeMessage
    m
            | Just (JumpToLayout d :: String
    d) <- SomeMessage -> Maybe JumpToLayout
    forall m. Message m => SomeMessage -> Maybe m
    fromMessage SomeMessage
    m, String
    d String -> String -> Bool
    forall a. Eq a => a -> a -> Bool
    == l2 a -> String
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> String
    description l2 a
    l2 = NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a. a -> Maybe a
    Just (NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap NewSelect l1 l2 a
    l
        handleMessage l :: NewSelect l1 l2 a
    l@(NewSelect False l1 :: l1 a
    l1 _) m :: SomeMessage
    m
            | Just (JumpToLayout d :: String
    d) <- SomeMessage -> Maybe JumpToLayout
    forall m. Message m => SomeMessage -> Maybe m
    fromMessage SomeMessage
    m, String
    d String -> String -> Bool
    forall a. Eq a => a -> a -> Bool
    == l1 a -> String
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> String
    description l1 a
    l1 = NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a. a -> Maybe a
    Just (NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap NewSelect l1 l2 a
    l
        handleMessage l :: NewSelect l1 l2 a
    l m :: SomeMessage
    m
            | Just (JumpToLayout _) <- SomeMessage -> Maybe JumpToLayout
    forall m. Message m => SomeMessage -> Maybe m
    fromMessage SomeMessage
    m = (Maybe (NewSelect l1 l2 a) -> Bool)
    -> X (Maybe (NewSelect l1 l2 a))
    -> X (Maybe (NewSelect l1 l2 a))
    -> X (Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => (a -> Bool) -> m a -> m a -> m a
    when' Maybe (NewSelect l1 l2 a) -> Bool
    forall a. Maybe a -> Bool
    isNothing (SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM SomeMessage
    m NewSelect l1 l2 a
    l) (X (Maybe (NewSelect l1 l2 a)) -> X (Maybe (NewSelect l1 l2 a)))
    -> X (Maybe (NewSelect l1 l2 a)) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $
                                                       do Maybe (NewSelect l1 l2 a)
    ml' <- SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM SomeMessage
    m (NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a)))
    -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $ NewSelect l1 l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    NewSelect l1 l2 a -> NewSelect l1 l2 a
    sw NewSelect l1 l2 a
    l
                                                          case Maybe (NewSelect l1 l2 a)
    ml' of
                                                            Nothing -> Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe (NewSelect l1 l2 a)
    forall a. Maybe a
    Nothing
                                                            Just l' :: NewSelect l1 l2 a
    l' -> NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a. a -> Maybe a
    Just (NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a))
    -> X (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap (NewSelect l1 l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    NewSelect l1 l2 a -> NewSelect l1 l2 a
    sw NewSelect l1 l2 a
    l')
        handleMessage (NewSelect b :: Bool
    b l1 :: l1 a
    l1 l2 :: l2 a
    l2) m :: SomeMessage
    m
            | Just ReleaseResources  <- SomeMessage -> Maybe LayoutMessages
    forall m. Message m => SomeMessage -> Maybe m
    fromMessage SomeMessage
    m =
            do Maybe (l1 a)
    ml1' <- l1 a -> SomeMessage -> X (Maybe (l1 a))
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> SomeMessage -> X (Maybe (layout a))
    handleMessage l1 a
    l1 SomeMessage
    m
               Maybe (l2 a)
    ml2' <- l2 a -> SomeMessage -> X (Maybe (l2 a))
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> SomeMessage -> X (Maybe (layout a))
    handleMessage l2 a
    l2 SomeMessage
    m
               Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a)))
    -> Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $ if Maybe (l1 a) -> Bool
    forall a. Maybe a -> Bool
    isJust Maybe (l1 a)
    ml1' Bool -> Bool -> Bool
    || Maybe (l2 a) -> Bool
    forall a. Maybe a -> Bool
    isJust Maybe (l2 a)
    ml2'
                        then NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a. a -> Maybe a
    Just (NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a))
    -> NewSelect l1 l2 a -> Maybe (NewSelect l1 l2 a)
    forall a b. (a -> b) -> a -> b
    $ Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    NewSelect Bool
    b (l1 a -> (l1 a -> l1 a) -> Maybe (l1 a) -> l1 a
    forall b a. b -> (a -> b) -> Maybe a -> b
    maybe l1 a
    l1 l1 a -> l1 a
    forall a. a -> a
    id Maybe (l1 a)
    ml1') (l2 a -> (l2 a -> l2 a) -> Maybe (l2 a) -> l2 a
    forall b a. b -> (a -> b) -> Maybe a -> b
    maybe l2 a
    l2 l2 a -> l2 a
    forall a. a -> a
    id Maybe (l2 a)
    ml2')
                        else Maybe (NewSelect l1 l2 a)
    forall a. Maybe a
    Nothing
        handleMessage l :: NewSelect l1 l2 a
    l m :: SomeMessage
    m = SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM SomeMessage
    m NewSelect l1 l2 a
    l

    swap :: (LayoutClass l1 a, LayoutClass l2 a) => NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap :: NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    swap l :: NewSelect l1 l2 a
    l = NewSelect l1 l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    NewSelect l1 l2 a -> NewSelect l1 l2 a
    sw (NewSelect l1 l2 a -> NewSelect l1 l2 a)
    -> X (NewSelect l1 l2 a) -> X (NewSelect l1 l2 a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    passOn (LayoutMessages -> SomeMessage
    forall a. Message a => a -> SomeMessage
    SomeMessage LayoutMessages
    Hide) NewSelect l1 l2 a
    l

    sw :: NewSelect l1 l2 a -> NewSelect l1 l2 a
    sw :: NewSelect l1 l2 a -> NewSelect l1 l2 a
    sw (NewSelect b :: Bool
    b lt :: l1 a
    lt lf :: l2 a
    lf) = Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    NewSelect (Bool -> Bool
    not Bool
    b) l1 a
    lt l2 a
    lf

    passOn :: (LayoutClass l1 a, LayoutClass l2 a) =>
              SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    passOn :: SomeMessage -> NewSelect l1 l2 a -> X (NewSelect l1 l2 a)
    passOn m :: SomeMessage
    m l :: NewSelect l1 l2 a
    l = NewSelect l1 l2 a
    -> (NewSelect l1 l2 a -> NewSelect l1 l2 a)
    -> Maybe (NewSelect l1 l2 a)
    -> NewSelect l1 l2 a
    forall b a. b -> (a -> b) -> Maybe a -> b
    maybe NewSelect l1 l2 a
    l NewSelect l1 l2 a -> NewSelect l1 l2 a
    forall a. a -> a
    id (Maybe (NewSelect l1 l2 a) -> NewSelect l1 l2 a)
    -> X (Maybe (NewSelect l1 l2 a)) -> X (NewSelect l1 l2 a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    forall (l1 :: * -> *) a (l2 :: * -> *).
    (LayoutClass l1 a, LayoutClass l2 a) =>
    SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM SomeMessage
    m NewSelect l1 l2 a
    l

    passOnM :: (LayoutClass l1 a, LayoutClass l2 a) =>
               SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM :: SomeMessage -> NewSelect l1 l2 a -> X (Maybe (NewSelect l1 l2 a))
    passOnM m :: SomeMessage
    m (NewSelect True lt :: l1 a
    lt lf :: l2 a
    lf) = do Maybe (l1 a)
    mlt' <- l1 a -> SomeMessage -> X (Maybe (l1 a))
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> SomeMessage -> X (Maybe (layout a))
    handleMessage l1 a
    lt SomeMessage
    m
                                          Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a)))
    -> Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $ (\lt' :: l1 a
    lt' -> Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    NewSelect Bool
    True l1 a
    lt' l2 a
    lf) (l1 a -> NewSelect l1 l2 a)
    -> Maybe (l1 a) -> Maybe (NewSelect l1 l2 a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` Maybe (l1 a)
    mlt'
    passOnM m :: SomeMessage
    m (NewSelect False lt :: l1 a
    lt lf :: l2 a
    lf) = do Maybe (l2 a)
    mlf' <- l2 a -> SomeMessage -> X (Maybe (l2 a))
    forall (layout :: * -> *) a.
    LayoutClass layout a =>
    layout a -> SomeMessage -> X (Maybe (layout a))
    handleMessage l2 a
    lf SomeMessage
    m
                                           Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a)))
    -> Maybe (NewSelect l1 l2 a) -> X (Maybe (NewSelect l1 l2 a))
    forall a b. (a -> b) -> a -> b
    $ (\lf' :: l2 a
    lf' -> Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    forall (l1 :: * -> *) (l2 :: * -> *) a.
    Bool -> l1 a -> l2 a -> NewSelect l1 l2 a
    NewSelect Bool
    False l1 a
    lt l2 a
    lf') (l2 a -> NewSelect l1 l2 a)
    -> Maybe (l2 a) -> Maybe (NewSelect l1 l2 a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    `fmap` Maybe (l2 a)
    mlf'

    when' :: Monad m => (a -> Bool) -> m a -> m a -> m a
    when' :: (a -> Bool) -> m a -> m a -> m a
    when' f :: a -> Bool
    f a :: m a
    a b :: m a
    b = do a
    a1 <- m a
    a; if a -> Bool
    f a
    a1 then m a
    b else a -> m a
    forall (m :: * -> *) a. Monad m => a -> m a
    return a
    a1