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 Cube where | |
import Data.Functor.Const (Const(..)) | |
import Data.Functor.Product (Product(..)) | |
import Data.Functor.Sum (Sum(..)) | |
type (&&) = Product | |
type (||) = Sum |
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
#! /usr/bin/env sh | |
# Example usage: | |
# $ watchfile Test.idr idris2 --check | |
# $ watchfile test.sh shellcheck | |
# $ watchfile Main.hs -- cabal test | |
file=$1; shift | |
tmp="/tmp/watch.$(basename "$file")" |
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 DerivingVia, BlockArguments, LambdaCase #-} | |
module Control.Concurrent.Incremental ( | |
Adaptive, adaptively, | |
static, dynamic, | |
ICVar, newICVar, newICVarIO, | |
demand, propagate, | |
compute, await, |
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 Strutless where | |
import XMonad | |
import XMonad.StackSet (RationalRect) | |
import qualified XMonad.StackSet as W | |
import Data.Set (Set) | |
import XMonad.Util.Types (Direction2D) | |
import XMonad.Util.Rectangle (toRatio) | |
import XMonad.Util.NamedScratchpad (customFloating) |
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
#! /usr/bin/env sh | |
# Configuration: where PRs are written | |
prdir=$HOME/PRs | |
# Argument: the git rev or ref upon which the PR is based | |
base=$1 | |
repo=$(basename "$(git rev-parse --show-toplevel)") |
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 |