This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE QuantifiedConstraints, BlockArguments, LambdaCase #-} | |
module Rec where | |
import Data.Functor.Product (Product(..)) | |
import Data.Functor.Sum (Sum(..)) | |
import Data.Kind (Type, Constraint) | |
import Control.Arrow ((&&&), (|||)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds, GADTs #-} | |
module Zip where | |
import Data.Kind (Type) | |
data Zippy :: (k1 -> k2 -> Type) -> [k1] -> [k2] -> Type where | |
Nil :: Zippy f '[] '[] | |
(:~) :: f x y -> Zippy f xs ys -> Zippy f (x:xs) (y:ys) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} | |
{-# LANGUAGE ScopedTypeVariables, PatternSynonyms, MultiWayIf, RankNTypes #-} | |
{-# LANGUAGE MonoLocalBinds #-} | |
-------------------------------------------------------------------------------- | |
-- | | |
-- Module : XMonad.Layout.Quadrant.Internal | |
-- Description : The internals and core interface of the Quadrant layout. | |
-- Copyright : (c) 2018 L. S. Leary | |
-- License : BSD3-style (see LICENSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RoleAnnotations, DerivingVia #-} | |
module Roles where | |
import Control.Monad.Reader (MonadReader, ReaderT(..)) | |
-- | In the case of: | |
-- | |
-- > newtype ReaderT r m a = ReaderT (r -> m a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ThenRefocusAfter where | |
import XMonad | |
import XMonad.Hooks.RefocusLast (refocusWhen) | |
import XMonad.Util.NamedScratchpad | |
(NamedScratchpads, query, namedScratchpadAction) | |
import qualified XMonad.StackSet as W | |
thenRefocusAfter :: Query Bool -> X a -> X a | |
p `thenRefocusAfter` act = do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE StandaloneDeriving, DeriveFunctor, GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE LambdaCase #-} | |
-------------------------------------------------------------------------------- | |
-- Module : XMonad.Actions.ConditionalBindings | |
-- Description : A framework for producing conditional key bindings. | |
-- Copyright : (c) 2018 L. S. Leary | |
-- License : BSD3-style (see LICENSE) | |
-- | |
-- Maintainer : L. S. Leary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BlockArguments #-} | |
module Y where | |
newtype Y a = Y { ($$) :: Y a -> a } | |
{-# NOINLINE y #-} | |
y :: (a -> a) -> Y a | |
y f = Y \x -> f (x $$ x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeOperators, PatternSynonyms, ExplicitNamespaces #-} | |
{-# LANGUAGE LambdaCase, BlockArguments #-} | |
module Select | |
( type (-?)(Fun, Const, Lazy, unLazy), ($?) | |
, Selective(..) | |
, select, branch, whenS, ifS, whileS, fromMaybeS | |
, (<||>), (<&&>), anyS, allS | |
, Monad(..) | |
) where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Util.Types | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map.Strict as M | |
import Control.Monad (when) | |
-- | Shift a @RationalRect@ to an edge of the screen. | |
toScreenEdge :: Direction2D -> W.RationalRect -> W.RationalRect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE LambdaCase #-} | |
-------------------------------------------------------------------------------- | |
-- | | |
-- Module : XMonad.Util.Grab | |
-- Description : TODO | |
-- Copyright : (c) 2018 L. S. Leary -- TODO this is kinda wrong... | |
-- License : BSD3-style (see LICENSE) | |
-- |