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 GHC2021, BlockArguments, ExplicitNamespaces, DerivingVia #-} | |
| module Memo ( | |
| -- * Memoisation Functions | |
| memo, memoFix, | |
| -- * Memoised Function Type | |
| type (-->), | |
| toMemo, ($$), |
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
| bindIntegralS :: (Selective f, Integral a) => f a -> (a -> f b) -> f b | |
| bindIntegralS fn k = pivot 0 (findLB (-1) 0) (findUB 0 1) | |
| where | |
| pivot !m = ifS $ fn <&> (< m) | |
| findLB m ub = pivot m (findLB (m * 2) m) (bs m ub) | |
| findUB lb m = pivot m (bs lb m) (findUB m (m * 2)) | |
| bs lb ub | |
| | ub - lb <= 1 = k lb | |
| | otherwise = pivot mid (bs lb mid) (bs mid ub) | |
| where mid = (lb + ub) `div` 2 |
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
| {-# OPTIONS_GHC -Wno-inaccessible-code -Wno-overlapping-patterns #-} | |
| {-# LANGUAGE GHC2021, GADTs #-} | |
| module ArchWS (ArchWS(..), archWS) where | |
| -- base | |
| import Data.Coerce (Coercible, coerce) | |
| import Data.Type.Coercion (Coercion(..)) | |
| import Data.Word (Word32, Word64) | |
| import Data.Int (Int32, Int64) |
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 #-} | |
| module Atom ( | |
| Atom, atom, atom_, | |
| stm, io, embed, | |
| throwAtom, catchAtom, | |
| ) where | |
| -- base | |
| import Data.Monoid (Ap(..)) |
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 #-} | |
| module Par where | |
| -- GHC/base | |
| import GHC.Conc (par, pseq) | |
| -- base | |
| import Data.Monoid (Ap(..)) |
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 Help (helpAt) where | |
| -- containers | |
| import Data.Map.Strict (Map, (!)) | |
| import Data.Map.Strict qualified as M | |
| -- xmonad | |
| import XMonad hiding ((|||)) |
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 RankNTypes, TypeFamilies, LambdaCase, BlockArguments #-} | |
| module Enumeration ( | |
| Enumeration(..), | |
| fromFoldable, | |
| ) where | |
| -- GHC/base | |
| import GHC.Exts (build) | |
| import GHC.IsList (IsList(..)) |
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 PrevLayout (prevLayout) where | |
| import XMonad | |
| import qualified XMonad.StackSet as W | |
| prevLayout :: X () | |
| prevLayout = do | |
| ss@W.StackSet{ W.current = c@W.Screen{ W.workspace = ws }} <- gets windowset | |
| mp <- findPrev (description (W.layout ws)) (W.layout ws) | |
| case mp of |
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 RankNTypes, QuantifiedConstraints, BlockArguments, LambdaCase #-} | |
| module Free where | |
| -- base | |
| import Data.Coerce (coerce) | |
| type f ~> g = forall x. f x -> g 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 RoleAnnotations, DerivingStrategies, LambdaCase #-} | |
| module Heap ( | |
| Poset(..), Prefix(..), | |
| Heap, size, | |
| empty, singleton, | |
| insert, (<+>), fromList, | |
| pop, assocs, | |
| ) where |
NewerOlder