-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Terminal emulator configurable in Haskell
--   
--   Please see <a>README.md</a>.
@package termonad
@version 4.0.0.1

module Termonad.Pcre
pcre2Multiline :: CUInt
inline_c_ffi_6989586621679076973 :: IO CUInt

module Termonad.Prelude
seq :: a -> b -> b
fst :: (a, b) -> a
snd :: (a, b) -> b
otherwise :: Bool
assert :: Bool -> a -> a
($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
fromIntegral :: (Integral a, Num b) => a -> b
realToFrac :: (Real a, Fractional b) => a -> b
guard :: Alternative f => Bool -> f ()
join :: Monad m => m (m a) -> m a
class Bounded a
minBound :: Bounded a => a
maxBound :: Bounded a => a
class Enum a
succ :: Enum a => a -> a
pred :: Enum a => a -> a
toEnum :: Enum a => Int -> a
fromEnum :: Enum a => a -> Int
enumFrom :: Enum a => a -> [a]
enumFromThen :: Enum a => a -> a -> [a]
enumFromTo :: Enum a => a -> a -> [a]
enumFromThenTo :: Enum a => a -> a -> a -> [a]
class Eq a
(==) :: Eq a => a -> a -> Bool
(/=) :: Eq a => a -> a -> Bool
class Fractional a => Floating a
pi :: Floating a => a
exp :: Floating a => a -> a
log :: Floating a => a -> a
sqrt :: Floating a => a -> a
(**) :: Floating a => a -> a -> a
logBase :: Floating a => a -> a -> a
sin :: Floating a => a -> a
cos :: Floating a => a -> a
tan :: Floating a => a -> a
asin :: Floating a => a -> a
acos :: Floating a => a -> a
atan :: Floating a => a -> a
sinh :: Floating a => a -> a
cosh :: Floating a => a -> a
tanh :: Floating a => a -> a
asinh :: Floating a => a -> a
acosh :: Floating a => a -> a
atanh :: Floating a => a -> a
class Num a => Fractional a
(/) :: Fractional a => a -> a -> a
recip :: Fractional a => a -> a
fromRational :: Fractional a => Rational -> a
class (Real a, Enum a) => Integral a
quot :: Integral a => a -> a -> a
rem :: Integral a => a -> a -> a
div :: Integral a => a -> a -> a
mod :: Integral a => a -> a -> a
quotRem :: Integral a => a -> a -> (a, a)
divMod :: Integral a => a -> a -> (a, a)
toInteger :: Integral a => a -> Integer
class Applicative m => Monad (m :: Type -> Type)
(>>=) :: Monad m => m a -> (a -> m b) -> m b
(>>) :: Monad m => m a -> m b -> m b
return :: Monad m => a -> m a
class Functor (f :: Type -> Type)
fmap :: Functor f => (a -> b) -> f a -> f b
(<$) :: Functor f => a -> f b -> f a
class Num a
(+) :: Num a => a -> a -> a
(-) :: Num a => a -> a -> a
(*) :: Num a => a -> a -> a
negate :: Num a => a -> a
abs :: Num a => a -> a
signum :: Num a => a -> a
fromInteger :: Num a => Integer -> a
class Eq a => Ord a
compare :: Ord a => a -> a -> Ordering
(<) :: Ord a => a -> a -> Bool
(<=) :: Ord a => a -> a -> Bool
(>) :: Ord a => a -> a -> Bool
(>=) :: Ord a => a -> a -> Bool
max :: Ord a => a -> a -> a
min :: Ord a => a -> a -> a
class Read a
class (Num a, Ord a) => Real a
toRational :: Real a => a -> Rational
class (RealFrac a, Floating a) => RealFloat a
floatRadix :: RealFloat a => a -> Integer
floatDigits :: RealFloat a => a -> Int
floatRange :: RealFloat a => a -> (Int, Int)
decodeFloat :: RealFloat a => a -> (Integer, Int)
encodeFloat :: RealFloat a => Integer -> Int -> a
exponent :: RealFloat a => a -> Int
significand :: RealFloat a => a -> a
scaleFloat :: RealFloat a => Int -> a -> a
isNaN :: RealFloat a => a -> Bool
isInfinite :: RealFloat a => a -> Bool
isDenormalized :: RealFloat a => a -> Bool
isNegativeZero :: RealFloat a => a -> Bool
isIEEE :: RealFloat a => a -> Bool
atan2 :: RealFloat a => a -> a -> a
class (Real a, Fractional a) => RealFrac a
properFraction :: (RealFrac a, Integral b) => a -> (b, a)
truncate :: (RealFrac a, Integral b) => a -> b
round :: (RealFrac a, Integral b) => a -> b
ceiling :: (RealFrac a, Integral b) => a -> b
floor :: (RealFrac a, Integral b) => a -> b
class Show a
showsPrec :: Show a => Int -> a -> ShowS
show :: Show a => a -> String
showList :: Show a => [a] -> ShowS
class Typeable (a :: k)
class IsString a
fromString :: IsString a => String -> a
class Functor f => Applicative (f :: Type -> Type)
pure :: Applicative f => a -> f a
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
(*>) :: Applicative f => f a -> f b -> f b
(<*) :: Applicative f => f a -> f b -> f a
class Foldable (t :: Type -> Type)
class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
class Generic a
class Semigroup a
(<>) :: Semigroup a => a -> a -> a
sconcat :: Semigroup a => NonEmpty a -> a
stimes :: (Semigroup a, Integral b) => b -> a -> a
class Semigroup a => Monoid a
mempty :: Monoid a => a
mappend :: Monoid a => a -> a -> a
mconcat :: Monoid a => [a] -> a
data Bool
False :: Bool
True :: Bool
data Char
data Double
data Float
data Int
data Int32
data Int64
data Integer
data Maybe a
Nothing :: Maybe a
Just :: a -> Maybe a
data Ordering
LT :: Ordering
EQ :: Ordering
GT :: Ordering
type Rational = Ratio Integer
data RealWorld
data IO a
data Word
data Word8
data Word32
data Word64
data Either a b
Left :: a -> Either a b
Right :: b -> Either a b
type String = [Char]
liftM :: Monad m => (a1 -> r) -> m a1 -> m r
either :: (a -> c) -> (b -> c) -> Either a b -> c
class Monad m => MonadReader r (m :: Type -> Type) | m -> r
ask :: MonadReader r m => m r
(<&>) :: Functor f => f a -> (a -> b) -> f b
($>) :: Functor f => f a -> b -> f b
data SomeAsyncException
SomeAsyncException :: e -> SomeAsyncException
data Chan a
data MVar a
data STM a
newTVar :: a -> STM (TVar a)
readTVar :: TVar a -> STM a
writeTVar :: TVar a -> a -> STM ()
data TVar a
data BufferMode
NoBuffering :: BufferMode
LineBuffering :: BufferMode
BlockBuffering :: Maybe Int -> BufferMode
stderr :: Handle
stdin :: Handle
stdout :: Handle
data SeekMode
AbsoluteSeek :: SeekMode
RelativeSeek :: SeekMode
SeekFromEnd :: SeekMode
data IOMode
ReadMode :: IOMode
WriteMode :: IOMode
AppendMode :: IOMode
ReadWriteMode :: IOMode
isEmptyTBQueue :: TBQueue a -> STM Bool
isFullTBQueue :: TBQueue a -> STM Bool
newTBQueue :: Natural -> STM (TBQueue a)
peekTBQueue :: TBQueue a -> STM a
readTBQueue :: TBQueue a -> STM a
tryPeekTBQueue :: TBQueue a -> STM (Maybe a)
tryReadTBQueue :: TBQueue a -> STM (Maybe a)
unGetTBQueue :: TBQueue a -> a -> STM ()
writeTBQueue :: TBQueue a -> a -> STM ()
cloneTChan :: TChan a -> STM (TChan a)
dupTChan :: TChan a -> STM (TChan a)
isEmptyTChan :: TChan a -> STM Bool
newTChan :: STM (TChan a)
peekTChan :: TChan a -> STM a
readTChan :: TChan a -> STM a
tryPeekTChan :: TChan a -> STM (Maybe a)
tryReadTChan :: TChan a -> STM (Maybe a)
unGetTChan :: TChan a -> a -> STM ()
writeTChan :: TChan a -> a -> STM ()
isEmptyTMVar :: TMVar a -> STM Bool
newEmptyTMVar :: STM (TMVar a)
newTMVar :: a -> STM (TMVar a)
putTMVar :: TMVar a -> a -> STM ()
readTMVar :: TMVar a -> STM a
swapTMVar :: TMVar a -> a -> STM a
takeTMVar :: TMVar a -> STM a
tryPutTMVar :: TMVar a -> a -> STM Bool
tryReadTMVar :: TMVar a -> STM (Maybe a)
tryTakeTMVar :: TMVar a -> STM (Maybe a)
isEmptyTQueue :: TQueue a -> STM Bool
newTQueue :: STM (TQueue a)
peekTQueue :: TQueue a -> STM a
readTQueue :: TQueue a -> STM a
tryPeekTQueue :: TQueue a -> STM (Maybe a)
tryReadTQueue :: TQueue a -> STM (Maybe a)
unGetTQueue :: TQueue a -> a -> STM ()
writeTQueue :: TQueue a -> a -> STM ()
modifyTVar :: TVar a -> (a -> a) -> STM ()
modifyTVar' :: TVar a -> (a -> a) -> STM ()
swapTVar :: TVar a -> a -> STM a
data TBQueue a
data TChan a
data TMVar a
data TQueue a
wrappedWithRunInIO :: MonadUnliftIO n => (n b -> m b) -> (forall a. () => m a -> n a) -> ((forall a. () => m a -> IO a) -> IO b) -> m b
toIO :: MonadUnliftIO m => m a -> m (IO a)
withUnliftIO :: MonadUnliftIO m => (UnliftIO m -> IO a) -> m a
askRunInIO :: MonadUnliftIO m => m (m a -> IO a)
newtype UnliftIO (m :: Type -> Type)
UnliftIO :: (forall a. () => m a -> IO a) -> UnliftIO (m :: Type -> Type)
[unliftIO] :: UnliftIO (m :: Type -> Type) -> forall a. () => m a -> IO a
class MonadIO m => MonadUnliftIO (m :: Type -> Type)
askUnliftIO :: MonadUnliftIO m => m (UnliftIO m)
withRunInIO :: MonadUnliftIO m => ((forall a. () => m a -> IO a) -> IO b) -> m b
data TBChan a
newTBChan :: Int -> STM (TBChan a)
newTBChanIO :: Int -> IO (TBChan a)
readTBChan :: TBChan a -> STM a
tryReadTBChan :: TBChan a -> STM (Maybe a)
peekTBChan :: TBChan a -> STM a
tryPeekTBChan :: TBChan a -> STM (Maybe a)
writeTBChan :: TBChan a -> a -> STM ()
tryWriteTBChan :: TBChan a -> a -> STM Bool
unGetTBChan :: TBChan a -> a -> STM ()
isEmptyTBChan :: TBChan a -> STM Bool
isFullTBChan :: TBChan a -> STM Bool
estimateFreeSlotsTBChan :: TBChan a -> STM Int
freeSlotsTBChan :: TBChan a -> STM Int
data TBMChan a
newTBMChan :: Int -> STM (TBMChan a)
newTBMChanIO :: Int -> IO (TBMChan a)
readTBMChan :: TBMChan a -> STM (Maybe a)
tryReadTBMChan :: TBMChan a -> STM (Maybe (Maybe a))
peekTBMChan :: TBMChan a -> STM (Maybe a)
tryPeekTBMChan :: TBMChan a -> STM (Maybe (Maybe a))
writeTBMChan :: TBMChan a -> a -> STM ()
tryWriteTBMChan :: TBMChan a -> a -> STM (Maybe Bool)
unGetTBMChan :: TBMChan a -> a -> STM ()
closeTBMChan :: TBMChan a -> STM ()
isClosedTBMChan :: TBMChan a -> STM Bool
isEmptyTBMChan :: TBMChan a -> STM Bool
isFullTBMChan :: TBMChan a -> STM Bool
estimateFreeSlotsTBMChan :: TBMChan a -> STM Int
freeSlotsTBMChan :: TBMChan a -> STM Int
data TBMQueue a
newTBMQueue :: Int -> STM (TBMQueue a)
newTBMQueueIO :: Int -> IO (TBMQueue a)
readTBMQueue :: TBMQueue a -> STM (Maybe a)
tryReadTBMQueue :: TBMQueue a -> STM (Maybe (Maybe a))
peekTBMQueue :: TBMQueue a -> STM (Maybe a)
tryPeekTBMQueue :: TBMQueue a -> STM (Maybe (Maybe a))
writeTBMQueue :: TBMQueue a -> a -> STM ()
tryWriteTBMQueue :: TBMQueue a -> a -> STM (Maybe Bool)
unGetTBMQueue :: TBMQueue a -> a -> STM ()
closeTBMQueue :: TBMQueue a -> STM ()
isClosedTBMQueue :: TBMQueue a -> STM Bool
isEmptyTBMQueue :: TBMQueue a -> STM Bool
isFullTBMQueue :: TBMQueue a -> STM Bool
estimateFreeSlotsTBMQueue :: TBMQueue a -> STM Int
freeSlotsTBMQueue :: TBMQueue a -> STM Int
data TMChan a
newTMChan :: STM (TMChan a)
newTMChanIO :: IO (TMChan a)
newBroadcastTMChan :: STM (TMChan a)
newBroadcastTMChanIO :: IO (TMChan a)
dupTMChan :: TMChan a -> STM (TMChan a)
readTMChan :: TMChan a -> STM (Maybe a)
tryReadTMChan :: TMChan a -> STM (Maybe (Maybe a))
peekTMChan :: TMChan a -> STM (Maybe a)
tryPeekTMChan :: TMChan a -> STM (Maybe (Maybe a))
writeTMChan :: TMChan a -> a -> STM ()
unGetTMChan :: TMChan a -> a -> STM ()
closeTMChan :: TMChan a -> STM ()
isClosedTMChan :: TMChan a -> STM Bool
isEmptyTMChan :: TMChan a -> STM Bool
data TMQueue a
newTMQueue :: STM (TMQueue a)
newTMQueueIO :: IO (TMQueue a)
readTMQueue :: TMQueue a -> STM (Maybe a)
tryReadTMQueue :: TMQueue a -> STM (Maybe (Maybe a))
peekTMQueue :: TMQueue a -> STM (Maybe a)
tryPeekTMQueue :: TMQueue a -> STM (Maybe (Maybe a))
writeTMQueue :: TMQueue a -> a -> STM ()
unGetTMQueue :: TMQueue a -> a -> STM ()
closeTMQueue :: TMQueue a -> STM ()
isClosedTMQueue :: TMQueue a -> STM Bool
isEmptyTMQueue :: TMQueue a -> STM Bool
newBroadcastTChan :: STM (TChan a)
newMutVar :: PrimMonad m => a -> m (MutVar (PrimState m) a)
readMutVar :: PrimMonad m => MutVar (PrimState m) a -> m a
writeMutVar :: PrimMonad m => MutVar (PrimState m) a -> a -> m ()
atomicModifyMutVar :: PrimMonad m => MutVar (PrimState m) a -> (a -> (a, b)) -> m b
atomicModifyMutVar' :: PrimMonad m => MutVar (PrimState m) a -> (a -> (a, b)) -> m b
modifyMutVar :: PrimMonad m => MutVar (PrimState m) a -> (a -> a) -> m ()
modifyMutVar' :: PrimMonad m => MutVar (PrimState m) a -> (a -> a) -> m ()
class Prim a
data MutVar s a
MutVar :: MutVar# s a -> MutVar s a
type family PrimState (m :: Type -> Type)
class Monad m => PrimMonad (m :: Type -> Type) where {
    type family PrimState (m :: Type -> Type);
}
data IORef a
data STRef s a
class Bifunctor (p :: Type -> Type -> Type)
bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
first :: Bifunctor p => (a -> b) -> p a c -> p b c
second :: Bifunctor p => (b -> c) -> p a b -> p a c
data Handle
orElse :: STM a -> STM a -> STM a
type Reader r = ReaderT r Identity
asks :: MonadReader r m => (r -> a) -> m a
data UTCTime
UTCTime :: Day -> DiffTime -> UTCTime
[utctDay] :: UTCTime -> Day
[utctDayTime] :: UTCTime -> DiffTime
newtype Day
ModifiedJulianDay :: Integer -> Day
[toModifiedJulianDay] :: Day -> Integer
parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t
parseTime :: ParseTime t => TimeLocale -> String -> String -> Maybe t
defaultTimeLocale :: TimeLocale
formatTime :: FormatTime t => TimeLocale -> String -> t -> String
getCurrentTime :: IO UTCTime
toGregorian :: Day -> (Integer, Int, Int)
fromGregorian :: Integer -> Int -> Int -> Day
newtype ReaderT r (m :: Type -> Type) a
ReaderT :: (r -> m a) -> ReaderT r (m :: Type -> Type) a
[runReaderT] :: ReaderT r (m :: Type -> Type) a -> r -> m a
data WrappedMonoid m
force :: NFData a => a -> a
deepseq :: NFData a => a -> b -> b
($!!) :: NFData a => (a -> b) -> a -> b
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
liftA :: Applicative f => (a -> b) -> f a -> f b
(<**>) :: Applicative f => f a -> f (a -> b) -> f b
optional :: Alternative f => f a -> f (Maybe a)
class NFData a
rnf :: NFData a => a -> ()
class Applicative f => Alternative (f :: Type -> Type)
empty :: Alternative f => f a
(<|>) :: Alternative f => f a -> f a -> f a
some :: Alternative f => f a -> f [a]
many :: Alternative f => f a -> f [a]
primToPrim :: (PrimBase m1, PrimMonad m2, PrimState m1 ~ PrimState m2) => m1 a -> m2 a
primToIO :: (PrimBase m, PrimState m ~ RealWorld) => m a -> IO a
primToST :: PrimBase m => m a -> ST (PrimState m) a
newtype Identity a
Identity :: a -> Identity a
[runIdentity] :: Identity a -> a
data DList a
error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
class (Vector Vector a, MVector MVector a) => Unbox a
data Vector a
class Storable a
(<$>) :: Functor f => (a -> b) -> f a -> f b
maybe :: b -> (a -> b) -> Maybe a -> b
curry :: ((a, b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> (a, b) -> c
($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
(=<<) :: Monad m => (a -> m b) -> m a -> m b
asTypeOf :: a -> a -> a
const :: a -> b -> a
flip :: (a -> b -> c) -> b -> a -> c
until :: (a -> Bool) -> (a -> a) -> a -> a
repeat :: a -> [a]
subtract :: Num a => a -> a -> a
(^) :: (Num a, Integral b) => a -> b -> a
(^^) :: (Fractional a, Integral b) => a -> b -> a
even :: Integral a => a -> Bool
odd :: Integral a => a -> Bool
(&&) :: Bool -> Bool -> Bool
not :: Bool -> Bool
(||) :: Bool -> Bool -> Bool
type FilePath = String
class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type)
mzero :: MonadPlus m => m a
mplus :: MonadPlus m => m a -> m a -> m a
ap :: Monad m => m (a -> b) -> m a -> m b
liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
forever :: Applicative f => f a -> f b
replicateM_ :: Applicative m => Int -> m a -> m ()
unless :: Applicative f => Bool -> f () -> f ()
void :: Functor f => f a -> f ()
forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
when :: Applicative f => Bool -> f () -> f ()
class (Typeable e, Show e) => Exception e
toException :: Exception e => e -> SomeException
fromException :: Exception e => SomeException -> Maybe e
displayException :: Exception e => e -> String
data SomeException
SomeException :: e -> SomeException
data IOException
asum :: (Foldable t, Alternative f) => t (f a) -> f a
newtype Down a
Down :: a -> Down a
for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
data Text
fromMaybe :: a -> Maybe a -> a
isJust :: Maybe a -> Bool
isNothing :: Maybe a -> Bool
listToMaybe :: [a] -> Maybe a
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
maybeToList :: Maybe a -> [a]
lefts :: [Either a b] -> [a]
partitionEithers :: [Either a b] -> ([a], [b])
rights :: [Either a b] -> [b]
comparing :: Ord a => (b -> a) -> b -> b -> Ordering
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
swap :: (a, b) -> (b, a)
class Monad m => MonadIO (m :: Type -> Type)
liftIO :: MonadIO m => IO a -> m a
data Map k a
data Set a
data IntMap a
data IntSet
data Seq a
(<.>) :: FilePath -> String -> FilePath
(</>) :: FilePath -> FilePath -> FilePath
bool :: a -> a -> Bool -> a
ioError :: IOError -> IO a
userError :: String -> IOError
type IOError = IOException
data IOErrorType
alreadyExistsErrorType :: IOErrorType
alreadyInUseErrorType :: IOErrorType
annotateIOError :: IOError -> String -> Maybe Handle -> Maybe FilePath -> IOError
doesNotExistErrorType :: IOErrorType
eofErrorType :: IOErrorType
fullErrorType :: IOErrorType
illegalOperationErrorType :: IOErrorType
ioeGetErrorString :: IOError -> String
ioeGetErrorType :: IOError -> IOErrorType
ioeGetFileName :: IOError -> Maybe FilePath
ioeGetHandle :: IOError -> Maybe Handle
ioeGetLocation :: IOError -> String
ioeSetErrorString :: IOError -> String -> IOError
ioeSetErrorType :: IOError -> IOErrorType -> IOError
ioeSetFileName :: IOError -> FilePath -> IOError
ioeSetHandle :: IOError -> Handle -> IOError
ioeSetLocation :: IOError -> String -> IOError
isAlreadyExistsError :: IOError -> Bool
isAlreadyExistsErrorType :: IOErrorType -> Bool
isAlreadyInUseError :: IOError -> Bool
isAlreadyInUseErrorType :: IOErrorType -> Bool
isDoesNotExistError :: IOError -> Bool
isDoesNotExistErrorType :: IOErrorType -> Bool
isEOFError :: IOError -> Bool
isEOFErrorType :: IOErrorType -> Bool
isFullError :: IOError -> Bool
isFullErrorType :: IOErrorType -> Bool
isIllegalOperation :: IOError -> Bool
isIllegalOperationErrorType :: IOErrorType -> Bool
isPermissionError :: IOError -> Bool
isPermissionErrorType :: IOErrorType -> Bool
isUserError :: IOError -> Bool
isUserErrorType :: IOErrorType -> Bool
mkIOError :: IOErrorType -> String -> Maybe Handle -> Maybe FilePath -> IOError
modifyIOError :: (IOError -> IOError) -> IO a -> IO a
permissionErrorType :: IOErrorType
tryIOError :: IO a -> IO (Either IOError a)
userErrorType :: IOErrorType
data Proxy (t :: k)
Proxy :: Proxy (t :: k)
id :: forall (a :: k). Category cat => cat a a
(.) :: forall (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c
data ByteString
(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c')
(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
(&) :: a -> (a -> b) -> b
class Hashable a
hashWithSalt :: Hashable a => Int -> a -> Int
hash :: Hashable a => a -> Int
lift :: (MonadTrans t, Monad m) => m a -> t m a
newtype MaybeT (m :: Type -> Type) a
MaybeT :: m (Maybe a) -> MaybeT (m :: Type -> Type) a
[runMaybeT] :: MaybeT (m :: Type -> Type) a -> m (Maybe a)
pollSTM :: Async a -> STM (Maybe (Either SomeException a))
waitAnyCatchSTM :: [Async a] -> STM (Async a, Either SomeException a)
waitAnySTM :: [Async a] -> STM (Async a, a)
waitBothSTM :: Async a -> Async b -> STM (a, b)
waitCatchSTM :: Async a -> STM (Either SomeException a)
waitEitherCatchSTM :: Async a -> Async b -> STM (Either (Either SomeException a) (Either SomeException b))
waitEitherSTM :: Async a -> Async b -> STM (Either a b)
waitEitherSTM_ :: Async a -> Async b -> STM ()
waitSTM :: Async a -> STM a
equating :: Eq a => (b -> a) -> b -> b -> Bool
getArgs :: MonadIO m => m [Text]
terror :: HasCallStack => Text -> a
textToBuilder :: ToBuilder Text builder => Text -> builder
(++) :: Monoid m => m -> m -> m
(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool
(<||>) :: Applicative a => a Bool -> a Bool -> a Bool
(\\) :: SetContainer a => a -> a -> a
applyDList :: DList a -> [a] -> [a]
asByteString :: ByteString -> ByteString
asDList :: DList a -> DList a
asHashMap :: HashMap k v -> HashMap k v
asHashSet :: HashSet a -> HashSet a
asIntMap :: IntMap v -> IntMap v
asIntSet :: IntSet -> IntSet
asLByteString :: LByteString -> LByteString
asLText :: LText -> LText
asList :: [a] -> [a]
asMap :: Map k v -> Map k v
asMaybe :: Maybe a -> Maybe a
asSVector :: SVector a -> SVector a
asSet :: Set a -> Set a
asString :: [Char] -> [Char]
asText :: Text -> Text
asUVector :: UVector a -> UVector a
asVector :: Vector a -> Vector a
charToLower :: Char -> Char
charToUpper :: Char -> Char
fromByteVector :: SVector Word8 -> ByteString
getChar :: MonadIO m => m Char
getContents :: MonadIO m => m LText
getLine :: MonadIO m => m Text
hGetChunk :: MonadIO m => Handle -> m ByteString
hGetContents :: MonadIO m => Handle -> m ByteString
hPut :: MonadIO m => Handle -> ByteString -> m ()
hashNub :: (Hashable a, Eq a) => [a] -> [a]
interact :: MonadIO m => (LText -> LText) -> m ()
intersect :: SetContainer a => a -> a -> a
link2Async :: MonadIO m => Async a -> Async b -> m ()
linkAsync :: MonadIO m => Async a -> m ()
map :: Functor f => (a -> b) -> f a -> f b
orElseSTM :: STM a -> STM a -> STM a
ordNub :: Ord a => [a] -> [a]
ordNubBy :: Ord b => (a -> b) -> (a -> a -> Bool) -> [a] -> [a]
pollAsync :: MonadIO m => Async a -> m (Maybe (Either SomeException a))
print :: (Show a, MonadIO m) => a -> m ()
putChar :: MonadIO m => Char -> m ()
putStr :: MonadIO m => Text -> m ()
putStrLn :: MonadIO m => Text -> m ()
readFile :: MonadIO m => FilePath -> m ByteString
readFileUtf8 :: MonadIO m => FilePath -> m Text
readMay :: (Element c ~ Char, MonoFoldable c, Read a) => c -> Maybe a
sortWith :: (Ord a, IsSequence c) => (Element c -> a) -> c -> c
tlshow :: Show a => a -> LText
toByteVector :: ByteString -> SVector Word8
trace :: String -> a -> a
traceId :: String -> String
traceM :: Monad m => String -> m ()
traceShow :: Show a => a -> b -> b
traceShowId :: Show a => a -> a
traceShowM :: (Show a, Monad m) => a -> m ()
tshow :: Show a => a -> Text
undefined :: HasCallStack => a
unlessM :: Monad m => m Bool -> m () -> m ()
waitAsync :: MonadIO m => Async a -> m a
waitCatchAsync :: MonadIO m => Async a -> m (Either SomeException a)
whenM :: Monad m => m Bool -> m () -> m ()
writeFile :: MonadIO m => FilePath -> ByteString -> m ()
writeFileUtf8 :: MonadIO m => FilePath -> Text -> m ()
yieldThread :: MonadIO m => m ()
headMay :: MonoFoldable mono => mono -> Maybe (Element mono)
lastMay :: MonoFoldable mono => mono -> Maybe (Element mono)
maximumByMay :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Maybe (Element mono)
maximumEx :: (MonoFoldable mono, Ord (Element mono)) => mono -> Element mono
maximumMay :: (MonoFoldable mono, Ord (Element mono)) => mono -> Maybe (Element mono)
minimumByMay :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Maybe (Element mono)
minimumEx :: (MonoFoldable mono, Ord (Element mono)) => mono -> Element mono
minimumMay :: (MonoFoldable mono, Ord (Element mono)) => mono -> Maybe (Element mono)
oand :: (Element mono ~ Bool, MonoFoldable mono) => mono -> Bool
oconcat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono
oconcatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m
ofold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono
ofoldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a
ofoldMUnwrap :: (Monad m, MonoFoldable mono) => (x -> Element mono -> m x) -> m x -> (x -> m b) -> mono -> m b
ofoldlUnwrap :: MonoFoldable mono => (x -> Element mono -> x) -> x -> (x -> b) -> mono -> b
ofor :: (MonoTraversable mono, Applicative f) => mono -> (Element mono -> f (Element mono)) -> f mono
oforM :: (MonoTraversable mono, Applicative f) => mono -> (Element mono -> f (Element mono)) -> f mono
ointercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono
oor :: (Element mono ~ Bool, MonoFoldable mono) => mono -> Bool
oproduct :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono
osequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m ()
osum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono
replaceElem :: (MonoFunctor mono, Eq (Element mono)) => Element mono -> Element mono -> mono -> mono
replaceElemLazyText :: Char -> Char -> Text -> Text
replaceElemStrictText :: Char -> Char -> Text -> Text
unwrapMono :: WrappedMono mono a -> mono
all :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool
and :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool
any :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool
compareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering
concat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono
concatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m
elem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool
fold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono
foldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a
foldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m
foldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m
foldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a
foldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono
foldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a
foldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b
foldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono
forM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m ()
for_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f ()
intercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono
length :: MonoFoldable mono => mono -> Int
length64 :: MonoFoldable mono => mono -> Int64
mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()
notElem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool
null :: MonoFoldable mono => mono -> Bool
or :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool
point :: MonoPointed mono => Element mono -> mono
product :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono
sequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m ()
sum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono
toList :: MonoFoldable mono => mono -> [Element mono]
traverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f ()
(<|) :: SemiSequence seq => Element seq -> NonNull seq -> NonNull seq
fromNonEmpty :: IsSequence seq => NonEmpty (Element seq) -> NonNull seq
fromNullable :: MonoFoldable mono => mono -> Maybe (NonNull mono)
head :: MonoFoldable mono => NonNull mono -> Element mono
impureNonNull :: MonoFoldable mono => mono -> NonNull mono
init :: IsSequence seq => NonNull seq -> seq
last :: MonoFoldable mono => NonNull mono -> Element mono
mapNonNull :: (Functor f, MonoFoldable (f b)) => (a -> b) -> NonNull (f a) -> NonNull (f b)
maximum :: (MonoFoldable mono, Ord (Element mono)) => NonNull mono -> Element mono
maximumBy :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> NonNull mono -> Element mono
minimum :: (MonoFoldable mono, Ord (Element mono)) => NonNull mono -> Element mono
minimumBy :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> NonNull mono -> Element mono
nReplicate :: IsSequence seq => Index seq -> Element seq -> NonNull seq
ncons :: SemiSequence seq => Element seq -> seq -> NonNull seq
nfilter :: IsSequence seq => (Element seq -> Bool) -> NonNull seq -> seq
nfilterM :: (Monad m, IsSequence seq) => (Element seq -> m Bool) -> NonNull seq -> m seq
nonNull :: MonoFoldable mono => mono -> NonNull mono
nuncons :: IsSequence seq => NonNull seq -> (Element seq, Maybe (NonNull seq))
ofold1 :: (MonoFoldable mono, Semigroup (Element mono)) => NonNull mono -> Element mono
ofoldMap1 :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> NonNull mono -> m
ofoldl1' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> NonNull mono -> Element mono
ofoldr1 :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> NonNull mono -> Element mono
splitFirst :: IsSequence seq => NonNull seq -> (Element seq, seq)
tail :: IsSequence seq => NonNull seq -> seq
toMinList :: NonEmpty a -> NonNull [a]
toNonEmpty :: MonoFoldable mono => NonNull mono -> NonEmpty (Element mono)
catMaybes :: (IsSequence (f (Maybe t)), Functor f, Element (f (Maybe t)) ~ Maybe t) => f (Maybe t) -> f t
defaultCons :: IsSequence seq => Element seq -> seq -> seq
defaultFind :: MonoFoldable seq => (Element seq -> Bool) -> seq -> Maybe (Element seq)
defaultIntersperse :: IsSequence seq => Element seq -> seq -> seq
defaultReverse :: IsSequence seq => seq -> seq
defaultSnoc :: IsSequence seq => seq -> Element seq -> seq
defaultSortBy :: IsSequence seq => (Element seq -> Element seq -> Ordering) -> seq -> seq
defaultSplitWhen :: IsSequence seq => (Element seq -> Bool) -> seq -> [seq]
delete :: (IsSequence seq, Eq (Element seq)) => Element seq -> seq -> seq
deleteBy :: (IsSequence seq, Eq (Element seq)) => (Element seq -> Element seq -> Bool) -> Element seq -> seq -> seq
dropPrefix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq
dropSuffix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq
ensurePrefix :: (Eq (Element seq), IsSequence seq) => seq -> seq -> seq
ensureSuffix :: (Eq (Element seq), IsSequence seq) => seq -> seq -> seq
group :: (IsSequence seq, Eq (Element seq)) => seq -> [seq]
groupAll :: (IsSequence seq, Eq (Element seq)) => seq -> [seq]
initDef :: IsSequence seq => seq -> seq
isInfixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool
isPrefixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool
isSuffixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool
pack :: IsSequence seq => [Element seq] -> seq
repack :: (MonoFoldable a, IsSequence b, Element a ~ Element b) => a -> b
replaceSeq :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq -> seq
replaceSeqLazyText :: Text -> Text -> Text -> Text
replaceSeqStrictText :: Text -> Text -> Text -> Text
singleton :: MonoPointed seq => Element seq -> seq
sort :: (SemiSequence seq, Ord (Element seq)) => seq -> seq
sortOn :: (Ord o, SemiSequence seq) => (Element seq -> o) -> seq -> seq
splitElem :: (IsSequence seq, Eq (Element seq)) => Element seq -> seq -> [seq]
splitElemStrictBS :: Word8 -> ByteString -> [ByteString]
splitSeq :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> [seq]
splitSeqLazyBS :: Word8 -> ByteString -> [ByteString]
splitSeqLazyText :: Text -> Text -> [Text]
splitSeqStrictText :: Text -> Text -> [Text]
stripPrefix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Maybe seq
stripPrefixLazyBS :: ByteString -> ByteString -> Maybe ByteString
stripPrefixStrictBS :: ByteString -> ByteString -> Maybe ByteString
stripSuffix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Maybe seq
stripSuffixLazyBS :: ByteString -> ByteString -> Maybe ByteString
stripSuffixStrictBS :: ByteString -> ByteString -> Maybe ByteString
tailDef :: IsSequence seq => seq -> seq
unpack :: MonoFoldable mono => mono -> [Element mono]
vectorSort :: (Vector v e, Ord e) => v e -> v e
vectorSortBy :: Vector v e => (e -> e -> Ordering) -> v e -> v e
asBRef :: BRef s a -> BRef s a
asIORef :: IORef a -> IORef a
asMutVar :: MutVar s a -> MutVar s a
asSTRef :: STRef s a -> STRef s a
asDLList :: DLList s a -> DLList s a
asBDeque :: BDeque s a -> BDeque s a
asSDeque :: SDeque s a -> SDeque s a
asUDeque :: UDeque s a -> UDeque s a
asPRef :: PRef s a -> PRef s a
asSRef :: SRef s a -> SRef s a
asURef :: URef s a -> URef s a
hSay :: MonadIO m => Handle -> Text -> m ()
hSayShow :: (MonadIO m, Show a) => Handle -> a -> m ()
hSayString :: MonadIO m => Handle -> String -> m ()
say :: MonadIO m => Text -> m ()
sayErr :: MonadIO m => Text -> m ()
sayErrShow :: (MonadIO m, Show a) => a -> m ()
sayErrString :: MonadIO m => String -> m ()
sayShow :: (MonadIO m, Show a) => a -> m ()
sayString :: MonadIO m => String -> m ()
dupChan :: MonadIO m => Chan a -> m (Chan a)
getChanContents :: MonadIO m => Chan a -> m [a]
newChan :: MonadIO m => m (Chan a)
readChan :: MonadIO m => Chan a -> m a
writeChan :: MonadIO m => Chan a -> a -> m ()
writeList2Chan :: MonadIO m => Chan a -> [a] -> m ()
bracket :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
bracketOnError :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
bracketOnError_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
bracket_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
catch :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a
catchAny :: MonadUnliftIO m => m a -> (SomeException -> m a) -> m a
catchAnyDeep :: (NFData a, MonadUnliftIO m) => m a -> (SomeException -> m a) -> m a
catchDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> (e -> m a) -> m a
catchIO :: MonadUnliftIO m => m a -> (IOException -> m a) -> m a
catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a
catches :: MonadUnliftIO m => m a -> [Handler m a] -> m a
catchesDeep :: (MonadUnliftIO m, NFData a) => m a -> [Handler m a] -> m a
evaluate :: MonadIO m => a -> m a
evaluateDeep :: (MonadIO m, NFData a) => a -> m a
finally :: MonadUnliftIO m => m a -> m b -> m a
fromEither :: (Exception e, MonadIO m) => Either e a -> m a
fromEitherIO :: (Exception e, MonadIO m) => IO (Either e a) -> m a
fromEitherM :: (Exception e, MonadIO m) => m (Either e a) -> m a
handle :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a
handleAny :: MonadUnliftIO m => (SomeException -> m a) -> m a -> m a
handleAnyDeep :: (MonadUnliftIO m, NFData a) => (SomeException -> m a) -> m a -> m a
handleDeep :: (MonadUnliftIO m, Exception e, NFData a) => (e -> m a) -> m a -> m a
handleIO :: MonadUnliftIO m => (IOException -> m a) -> m a -> m a
handleJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a
impureThrow :: Exception e => e -> a
isAsyncException :: Exception e => e -> Bool
isSyncException :: Exception e => e -> Bool
mask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
mask_ :: MonadUnliftIO m => m a -> m a
onException :: MonadUnliftIO m => m a -> m b -> m a
pureTry :: a -> Either SomeException a
pureTryDeep :: NFData a => a -> Either SomeException a
stringException :: HasCallStack => String -> StringException
throwIO :: (MonadIO m, Exception e) => e -> m a
throwString :: (MonadIO m, HasCallStack) => String -> m a
throwTo :: (Exception e, MonadIO m) => ThreadId -> e -> m ()
toAsyncException :: Exception e => e -> SomeException
toSyncException :: Exception e => e -> SomeException
try :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a)
tryAny :: MonadUnliftIO m => m a -> m (Either SomeException a)
tryAnyDeep :: (MonadUnliftIO m, NFData a) => m a -> m (Either SomeException a)
tryDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> m (Either e a)
tryIO :: MonadUnliftIO m => m a -> m (Either IOException a)
tryJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)
uninterruptibleMask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
uninterruptibleMask_ :: MonadUnliftIO m => m a -> m a
withException :: (MonadUnliftIO m, Exception e) => m a -> (e -> m b) -> m a
getMonotonicTime :: MonadIO m => m Double
hClose :: MonadIO m => Handle -> m ()
hFileSize :: MonadIO m => Handle -> m Integer
hFlush :: MonadIO m => Handle -> m ()
hGetBuffering :: MonadIO m => Handle -> m BufferMode
hGetEcho :: MonadIO m => Handle -> m Bool
hIsClosed :: MonadIO m => Handle -> m Bool
hIsEOF :: MonadIO m => Handle -> m Bool
hIsOpen :: MonadIO m => Handle -> m Bool
hIsReadable :: MonadIO m => Handle -> m Bool
hIsSeekable :: MonadIO m => Handle -> m Bool
hIsTerminalDevice :: MonadIO m => Handle -> m Bool
hIsWritable :: MonadIO m => Handle -> m Bool
hReady :: MonadIO m => Handle -> m Bool
hSeek :: MonadIO m => Handle -> SeekMode -> Integer -> m ()
hSetBuffering :: MonadIO m => Handle -> BufferMode -> m ()
hSetEcho :: MonadIO m => Handle -> Bool -> m ()
hSetFileSize :: MonadIO m => Handle -> Integer -> m ()
hTell :: MonadIO m => Handle -> m Integer
hWaitForInput :: MonadIO m => Handle -> Int -> m Bool
withBinaryFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
withFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
atomicWriteIORef :: MonadIO m => IORef a -> a -> m ()
mkWeakIORef :: MonadUnliftIO m => IORef a -> m () -> m (Weak (IORef a))
modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m ()
modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m ()
newIORef :: MonadIO m => a -> m (IORef a)
readIORef :: MonadIO m => IORef a -> m a
writeIORef :: MonadIO m => IORef a -> a -> m ()
async :: MonadUnliftIO m => m a -> m (Async a)
asyncBound :: MonadUnliftIO m => m a -> m (Async a)
asyncOn :: MonadUnliftIO m => Int -> m a -> m (Async a)
asyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall b. () => m b -> m b) -> m a) -> m (Async a)
asyncWithUnmask :: MonadUnliftIO m => ((forall b. () => m b -> m b) -> m a) -> m (Async a)
cancel :: MonadIO m => Async a -> m ()
cancelWith :: (Exception e, MonadIO m) => Async a -> e -> m ()
conc :: m a -> Conc m a
concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)
concurrently_ :: MonadUnliftIO m => m a -> m b -> m ()
forConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
forConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
link :: MonadIO m => Async a -> m ()
link2 :: MonadIO m => Async a -> Async b -> m ()
mapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
mapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
poll :: MonadIO m => Async a -> m (Maybe (Either SomeException a))
pooledForConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
pooledForConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> t a -> (a -> m b) -> m (t b)
pooledForConcurrentlyN_ :: (MonadUnliftIO m, Foldable t) => Int -> t a -> (a -> m b) -> m ()
pooledForConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
pooledMapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
pooledMapConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> (a -> m b) -> t a -> m (t b)
pooledMapConcurrentlyN_ :: (MonadUnliftIO m, Foldable f) => Int -> (a -> m b) -> f a -> m ()
pooledMapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
pooledReplicateConcurrently :: MonadUnliftIO m => Int -> m a -> m [a]
pooledReplicateConcurrentlyN :: MonadUnliftIO m => Int -> Int -> m a -> m [a]
pooledReplicateConcurrentlyN_ :: MonadUnliftIO m => Int -> Int -> m a -> m ()
pooledReplicateConcurrently_ :: MonadUnliftIO m => Int -> m a -> m ()
race :: MonadUnliftIO m => m a -> m b -> m (Either a b)
race_ :: MonadUnliftIO m => m a -> m b -> m ()
replicateConcurrently :: MonadUnliftIO m => Int -> m b -> m [b]
replicateConcurrently_ :: (Applicative m, MonadUnliftIO m) => Int -> m a -> m ()
runConc :: MonadUnliftIO m => Conc m a -> m a
uninterruptibleCancel :: MonadIO m => Async a -> m ()
wait :: MonadIO m => Async a -> m a
waitAny :: MonadIO m => [Async a] -> m (Async a, a)
waitAnyCancel :: MonadIO m => [Async a] -> m (Async a, a)
waitAnyCatch :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
waitAnyCatchCancel :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
waitBoth :: MonadIO m => Async a -> Async b -> m (a, b)
waitCatch :: MonadIO m => Async a -> m (Either SomeException a)
waitEither :: MonadIO m => Async a -> Async b -> m (Either a b)
waitEitherCancel :: MonadIO m => Async a -> Async b -> m (Either a b)
waitEitherCatch :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
waitEitherCatchCancel :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
waitEither_ :: MonadIO m => Async a -> Async b -> m ()
withAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
withAsyncBound :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
withAsyncOn :: MonadUnliftIO m => Int -> m a -> (Async a -> m b) -> m b
withAsyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
withAsyncWithUnmask :: MonadUnliftIO m => ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
isEmptyMVar :: MonadIO m => MVar a -> m Bool
mkWeakMVar :: MonadUnliftIO m => MVar a -> m () -> m (Weak (MVar a))
modifyMVar :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
modifyMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
modifyMVarMasked_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
modifyMVar_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
newEmptyMVar :: MonadIO m => m (MVar a)
newMVar :: MonadIO m => a -> m (MVar a)
putMVar :: MonadIO m => MVar a -> a -> m ()
readMVar :: MonadIO m => MVar a -> m a
swapMVar :: MonadIO m => MVar a -> a -> m a
takeMVar :: MonadIO m => MVar a -> m a
tryPutMVar :: MonadIO m => MVar a -> a -> m Bool
tryReadMVar :: MonadIO m => MVar a -> m (Maybe a)
tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a)
withMVar :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
withMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
memoizeMVar :: MonadUnliftIO m => m a -> m (Memoized a)
memoizeRef :: MonadUnliftIO m => m a -> m (Memoized a)
runMemoized :: MonadIO m => Memoized a -> m a
atomically :: MonadIO m => STM a -> m a
checkSTM :: Bool -> STM ()
mkWeakTMVar :: MonadUnliftIO m => TMVar a -> m () -> m (Weak (TMVar a))
mkWeakTVar :: MonadUnliftIO m => TVar a -> m () -> m (Weak (TVar a))
newBroadcastTChanIO :: MonadIO m => m (TChan a)
newEmptyTMVarIO :: MonadIO m => m (TMVar a)
newTBQueueIO :: MonadIO m => Natural -> m (TBQueue a)
newTChanIO :: MonadIO m => m (TChan a)
newTMVarIO :: MonadIO m => a -> m (TMVar a)
newTQueueIO :: MonadIO m => m (TQueue a)
newTVarIO :: MonadIO m => a -> m (TVar a)
readTVarIO :: MonadIO m => TVar a -> m a
registerDelay :: MonadIO m => Int -> m (TVar Bool)
retrySTM :: STM a
withSystemTempDirectory :: MonadUnliftIO m => String -> (FilePath -> m a) -> m a
withSystemTempFile :: MonadUnliftIO m => String -> (FilePath -> Handle -> m a) -> m a
withTempDirectory :: MonadUnliftIO m => FilePath -> String -> (FilePath -> m a) -> m a
withTempFile :: MonadUnliftIO m => FilePath -> String -> (FilePath -> Handle -> m a) -> m a
timeout :: MonadUnliftIO m => Int -> m a -> m (Maybe a)
data Async a
type LByteString = ByteString
type LText = Text
type SVector = Vector
type UVector = Vector
type BlazeBuilder = Builder
class Monoid builder => Builder builder lazy | builder -> lazy, lazy -> builder
builderToLazy :: Builder builder lazy => builder -> lazy
flushBuilder :: Builder builder lazy => builder
type ByteStringBuilder = Builder
type TextBuilder = Builder
class ToBuilder value builder
toBuilder :: ToBuilder value builder => value -> builder
zip :: Zip f => f a -> f b -> f (a, b)
unzip :: Zip f => f (a, b) -> (f a, f b)
zipWith :: Zip f => (a -> b -> c) -> f a -> f b -> f c
unzip3 :: Zip3 f => f (a, b, c) -> (f a, f b, f c)
zip3 :: Zip3 f => f a -> f b -> f c -> f (a, b, c)
zipWith3 :: Zip3 f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
unzip4 :: Zip4 f => f (a, b, c, d) -> (f a, f b, f c, f d)
zip4 :: Zip4 f => f a -> f b -> f c -> f d -> f (a, b, c, d)
zipWith4 :: Zip4 f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e
unzip5 :: Zip5 f => f (a, b, c, d, e) -> (f a, f b, f c, f d, f e)
zip5 :: Zip5 f => f a -> f b -> f c -> f d -> f e -> f (a, b, c, d, e)
zipWith5 :: Zip5 f => (a -> b -> c -> d -> e -> g) -> f a -> f b -> f c -> f d -> f e -> f g
unzip6 :: Zip6 f => f (a, b, c, d, e, g) -> (f a, f b, f c, f d, f e, f g)
zip6 :: Zip6 f => f a -> f b -> f c -> f d -> f e -> f g -> f (a, b, c, d, e, g)
zipWith6 :: Zip6 f => (a -> b -> c -> d -> e -> g -> h) -> f a -> f b -> f c -> f d -> f e -> f g -> f h
unzip7 :: Zip7 f => f (a, b, c, d, e, g, h) -> (f a, f b, f c, f d, f e, f g, f h)
zip7 :: Zip7 f => f a -> f b -> f c -> f d -> f e -> f g -> f h -> f (a, b, c, d, e, g, h)
zipWith7 :: Zip7 f => (a -> b -> c -> d -> e -> g -> h -> i) -> f a -> f b -> f c -> f d -> f e -> f g -> f h -> f i
type family BPMKeyConstraint (map :: Type -> Type -> Type) key
class BiPolyMap (map :: Type -> Type -> Type) where {
    type family BPMKeyConstraint (map :: Type -> Type -> Type) key;
}
mapKeysWith :: (BiPolyMap map, BPMKeyConstraint map k1, BPMKeyConstraint map k2) => (v -> v -> v) -> (k1 -> k2) -> map k1 v -> map k2 v
type family ContainerKey set
class SetContainer set => HasKeysSet set where {
    type family KeySet set;
}
keysSet :: HasKeysSet set => set -> KeySet set
type family KeySet set
class (MonoTraversable map, SetContainer map) => IsMap map where {
    type family MapValue map;
}
lookup :: IsMap map => ContainerKey map -> map -> Maybe (MapValue map)
insertMap :: IsMap map => ContainerKey map -> MapValue map -> map -> map
deleteMap :: IsMap map => ContainerKey map -> map -> map
singletonMap :: IsMap map => ContainerKey map -> MapValue map -> map
mapFromList :: IsMap map => [(ContainerKey map, MapValue map)] -> map
mapToList :: IsMap map => map -> [(ContainerKey map, MapValue map)]
findWithDefault :: IsMap map => MapValue map -> ContainerKey map -> map -> MapValue map
insertWith :: IsMap map => (MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map
insertWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map
insertLookupWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> (Maybe (MapValue map), map)
adjustMap :: IsMap map => (MapValue map -> MapValue map) -> ContainerKey map -> map -> map
adjustWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map) -> ContainerKey map -> map -> map
updateMap :: IsMap map => (MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map
updateWithKey :: IsMap map => (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map
updateLookupWithKey :: IsMap map => (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> (Maybe (MapValue map), map)
alterMap :: IsMap map => (Maybe (MapValue map) -> Maybe (MapValue map)) -> ContainerKey map -> map -> map
unionWith :: IsMap map => (MapValue map -> MapValue map -> MapValue map) -> map -> map -> map
unionWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> map -> map -> map
unionsWith :: IsMap map => (MapValue map -> MapValue map -> MapValue map) -> [map] -> map
mapWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map) -> map -> map
omapKeysWith :: IsMap map => (MapValue map -> MapValue map -> MapValue map) -> (ContainerKey map -> ContainerKey map) -> map -> map
filterMap :: IsMap map => (MapValue map -> Bool) -> map -> map
type family MapValue map
class (SetContainer set, Element set ~ ContainerKey set) => IsSet set
insertSet :: IsSet set => Element set -> set -> set
deleteSet :: IsSet set => Element set -> set -> set
singletonSet :: IsSet set => Element set -> set
setFromList :: IsSet set => [Element set] -> set
setToList :: IsSet set => set -> [Element set]
filterSet :: IsSet set => (Element set -> Bool) -> set -> set
class MonoFunctor mono => MonoZip mono
ozipWith :: MonoZip mono => (Element mono -> Element mono -> Element mono) -> mono -> mono -> mono
ozip :: MonoZip mono => mono -> mono -> [(Element mono, Element mono)]
ounzip :: MonoZip mono => [(Element mono, Element mono)] -> (mono, mono)
class PolyMap (map :: Type -> Type)
differenceMap :: PolyMap map => map value1 -> map value2 -> map value1
intersectionMap :: PolyMap map => map value1 -> map value2 -> map value1
intersectionWithMap :: PolyMap map => (value1 -> value2 -> value3) -> map value1 -> map value2 -> map value3
class (Monoid set, Semigroup set, MonoFoldable set, Eq ContainerKey set, GrowingAppend set) => SetContainer set where {
    type family ContainerKey set;
}
member :: SetContainer set => ContainerKey set -> set -> Bool
notMember :: SetContainer set => ContainerKey set -> set -> Bool
union :: SetContainer set => set -> set -> set
unions :: (SetContainer set, MonoFoldable mono, Element mono ~ set) => mono -> set
difference :: SetContainer set => set -> set -> set
intersection :: SetContainer set => set -> set -> set
keys :: SetContainer set => set -> [ContainerKey set]
type family Element mono
class MonoFoldable mono => GrowingAppend mono
class MonoFunctor mono => MonoComonad mono
oextract :: MonoComonad mono => mono -> Element mono
oextend :: MonoComonad mono => (mono -> Element mono) -> mono -> mono
class MonoFoldable mono
ofoldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m
ofoldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b
ofoldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a
otoList :: MonoFoldable mono => mono -> [Element mono]
oall :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool
oany :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool
onull :: MonoFoldable mono => mono -> Bool
olength :: MonoFoldable mono => mono -> Int
olength64 :: MonoFoldable mono => mono -> Int64
ocompareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering
otraverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f ()
ofor_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f ()
omapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()
oforM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m ()
ofoldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a
ofoldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m
ofoldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono
ofoldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono
headEx :: MonoFoldable mono => mono -> Element mono
lastEx :: MonoFoldable mono => mono -> Element mono
unsafeHead :: MonoFoldable mono => mono -> Element mono
unsafeLast :: MonoFoldable mono => mono -> Element mono
maximumByEx :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Element mono
minimumByEx :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Element mono
oelem :: MonoFoldable mono => Element mono -> mono -> Bool
onotElem :: MonoFoldable mono => Element mono -> mono -> Bool
class MonoFunctor mono
omap :: MonoFunctor mono => (Element mono -> Element mono) -> mono -> mono
class MonoPointed mono
opoint :: MonoPointed mono => Element mono -> mono
class (MonoFunctor mono, MonoFoldable mono) => MonoTraversable mono
otraverse :: (MonoTraversable mono, Applicative f) => (Element mono -> f (Element mono)) -> mono -> f mono
omapM :: (MonoTraversable mono, Applicative m) => (Element mono -> m (Element mono)) -> mono -> m mono
data WrappedMono mono a
[WrappedMono] :: forall mono a. Element mono ~ a => mono -> WrappedMono mono a
newtype WrappedPoly (f :: Type -> Type) a
WrappedPoly :: f a -> WrappedPoly (f :: Type -> Type) a
[unwrapPoly] :: WrappedPoly (f :: Type -> Type) a -> f a
data NonNull mono
type family Index seq
class (Monoid seq, MonoTraversable seq, SemiSequence seq, MonoPointed seq) => IsSequence seq
fromList :: IsSequence seq => [Element seq] -> seq
lengthIndex :: IsSequence seq => seq -> Index seq
break :: IsSequence seq => (Element seq -> Bool) -> seq -> (seq, seq)
span :: IsSequence seq => (Element seq -> Bool) -> seq -> (seq, seq)
dropWhile :: IsSequence seq => (Element seq -> Bool) -> seq -> seq
takeWhile :: IsSequence seq => (Element seq -> Bool) -> seq -> seq
splitAt :: IsSequence seq => Index seq -> seq -> (seq, seq)
unsafeSplitAt :: IsSequence seq => Index seq -> seq -> (seq, seq)
take :: IsSequence seq => Index seq -> seq -> seq
unsafeTake :: IsSequence seq => Index seq -> seq -> seq
drop :: IsSequence seq => Index seq -> seq -> seq
unsafeDrop :: IsSequence seq => Index seq -> seq -> seq
dropEnd :: IsSequence seq => Index seq -> seq -> seq
partition :: IsSequence seq => (Element seq -> Bool) -> seq -> (seq, seq)
uncons :: IsSequence seq => seq -> Maybe (Element seq, seq)
unsnoc :: IsSequence seq => seq -> Maybe (seq, Element seq)
filter :: IsSequence seq => (Element seq -> Bool) -> seq -> seq
filterM :: (IsSequence seq, Monad m) => (Element seq -> m Bool) -> seq -> m seq
replicate :: IsSequence seq => Index seq -> Element seq -> seq
replicateM :: (IsSequence seq, Monad m) => Index seq -> m (Element seq) -> m seq
groupBy :: IsSequence seq => (Element seq -> Element seq -> Bool) -> seq -> [seq]
groupAllOn :: (IsSequence seq, Eq b) => (Element seq -> b) -> seq -> [seq]
subsequences :: IsSequence seq => seq -> [seq]
permutations :: IsSequence seq => seq -> [seq]
tailEx :: IsSequence seq => seq -> seq
tailMay :: IsSequence seq => seq -> Maybe seq
initEx :: IsSequence seq => seq -> seq
initMay :: IsSequence seq => seq -> Maybe seq
unsafeTail :: IsSequence seq => seq -> seq
unsafeInit :: IsSequence seq => seq -> seq
index :: IsSequence seq => seq -> Index seq -> Maybe (Element seq)
indexEx :: IsSequence seq => seq -> Index seq -> Element seq
unsafeIndex :: IsSequence seq => seq -> Index seq -> Element seq
splitWhen :: IsSequence seq => (Element seq -> Bool) -> seq -> [seq]
class (IsSequence lazy, IsSequence strict) => LazySequence lazy strict | lazy -> strict, strict -> lazy
toChunks :: LazySequence lazy strict => lazy -> [strict]
fromChunks :: LazySequence lazy strict => [strict] -> lazy
toStrict :: LazySequence lazy strict => lazy -> strict
fromStrict :: LazySequence lazy strict => strict -> lazy
class (Integral Index seq, GrowingAppend seq) => SemiSequence seq where {
    type family Index seq;
}
intersperse :: SemiSequence seq => Element seq -> seq -> seq
reverse :: SemiSequence seq => seq -> seq
find :: SemiSequence seq => (Element seq -> Bool) -> seq -> Maybe (Element seq)
sortBy :: SemiSequence seq => (Element seq -> Element seq -> Ordering) -> seq -> seq
cons :: SemiSequence seq => Element seq -> seq -> seq
snoc :: SemiSequence seq => seq -> Element seq -> seq
class (IsSequence t, IsString t, Element t ~ Char) => Textual t
words :: Textual t => t -> [t]
unwords :: (Textual t, Element seq ~ t, MonoFoldable seq) => seq -> t
lines :: Textual t => t -> [t]
unlines :: (Textual t, Element seq ~ t, MonoFoldable seq) => seq -> t
toLower :: Textual t => t -> t
toUpper :: Textual t => t -> t
toCaseFold :: Textual t => t -> t
breakWord :: Textual t => t -> (t, t)
breakLine :: Textual t => t -> (t, t)
class (Textual textual, IsSequence binary) => Utf8 textual binary | textual -> binary, binary -> textual
encodeUtf8 :: Utf8 textual binary => textual -> binary
decodeUtf8 :: Utf8 textual binary => binary -> textual
data BRef s a
type IOBRef = BRef PrimState IO
type family CollElement c
type family MCState c
class MutableRef c => MutableAtomicRef c
atomicModifyRef :: (MutableAtomicRef c, PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> (RefElement c, a)) -> m a
atomicModifyRef' :: (MutableAtomicRef c, PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> (RefElement c, a)) -> m a
class MutableContainer c => MutableCollection c where {
    type family CollElement c;
}
newColl :: (MutableCollection c, PrimMonad m, PrimState m ~ MCState c) => m c
class MutableContainer c where {
    type family MCState c;
}
type MutableDeque c = (MutableQueue c, MutablePushFront c, MutablePopBack c)
class MutableCollection c => MutablePopBack c
popBack :: (MutablePopBack c, PrimMonad m, PrimState m ~ MCState c) => c -> m (Maybe (CollElement c))
class MutableCollection c => MutablePopFront c
popFront :: (MutablePopFront c, PrimMonad m, PrimState m ~ MCState c) => c -> m (Maybe (CollElement c))
class MutableCollection c => MutablePushBack c
pushBack :: (MutablePushBack c, PrimMonad m, PrimState m ~ MCState c) => c -> CollElement c -> m ()
class MutableCollection c => MutablePushFront c
pushFront :: (MutablePushFront c, PrimMonad m, PrimState m ~ MCState c) => c -> CollElement c -> m ()
type MutableQueue c = (MutablePopFront c, MutablePushBack c)
class MutableContainer c => MutableRef c where {
    type family RefElement c;
}
newRef :: (MutableRef c, PrimMonad m, PrimState m ~ MCState c) => RefElement c -> m c
readRef :: (MutableRef c, PrimMonad m, PrimState m ~ MCState c) => c -> m (RefElement c)
writeRef :: (MutableRef c, PrimMonad m, PrimState m ~ MCState c) => c -> RefElement c -> m ()
modifyRef :: (MutableRef c, PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> RefElement c) -> m ()
modifyRef' :: (MutableRef c, PrimMonad m, PrimState m ~ MCState c) => c -> (RefElement c -> RefElement c) -> m ()
type family RefElement c
type MutableStack c = (MutablePopFront c, MutablePushFront c)
data DLList s a
type BDeque = Deque MVector
data Deque (v :: Type -> Type -> Type) s a
type SDeque = Deque MVector
type UDeque = Deque MVector
type IOPRef = PRef PrimState IO
data PRef s a
type IOSRef = SRef PrimState IO
data SRef s a
type IOURef = URef PrimState IO
data URef s a
data AsyncExceptionWrapper
AsyncExceptionWrapper :: e -> AsyncExceptionWrapper
data Handler (m :: Type -> Type) a
Handler :: (e -> m a) -> Handler (m :: Type -> Type) a
data StringException
StringException :: String -> CallStack -> StringException
data SyncExceptionWrapper
SyncExceptionWrapper :: e -> SyncExceptionWrapper
data Conc (m :: Type -> Type) a
data ConcException
EmptyWithNoAlternative :: ConcException
newtype Concurrently (m :: Type -> Type) a
Concurrently :: m a -> Concurrently (m :: Type -> Type) a
[runConcurrently] :: Concurrently (m :: Type -> Type) a -> m a
data Memoized a
data HashMap k v
data HashSet a
asProxyTypeOf :: a -> proxy a -> a
data KProxy t
KProxy :: KProxy t
hPutStrLn :: MonadIO m => Handle -> Text -> m ()
whenJust :: Monoid m => Maybe a -> (a -> m) -> m

module Termonad.Gtk
objFromBuildUnsafe :: GObject o => Builder -> Text -> (ManagedPtr o -> o) -> IO o

-- | Unsafely creates a new <a>Application</a>. This calls <a>fail</a> if
--   it cannot create the <a>Application</a> for some reason.
--   
--   This can fail for different reasons, one of which being that
--   application name does not have a period in it.
appNew :: (HasCallStack, MonadIO m, MonadFail m) => Maybe Text -> [ApplicationFlags] -> m Application

-- | Tests to see if two GTK widgets point to the same thing. This should
--   only happen if they are actually the same thing.
widgetEq :: (MonadIO m, IsWidget a, IsWidget b) => a -> b -> m Bool

module Termonad.Types

-- | A wrapper around a VTE <a>Terminal</a>. This also stores the process
--   ID of the process running on this terminal, as well as a <a>Unique</a>
--   that can be used for comparing terminals.
data TMTerm
TMTerm :: !Terminal -> !Int -> !Unique -> TMTerm

-- | The actual <a>Terminal</a>.
[term] :: TMTerm -> !Terminal

-- | The process ID of the process running in <a>term</a>.
[pid] :: TMTerm -> !Int

-- | A <a>Unique</a> for comparing different <a>TMTerm</a> for uniqueness.
[unique] :: TMTerm -> !Unique

-- | A container that holds everything in a given terminal window. The
--   <a>term</a> in the <a>TMTerm</a> is inside the
--   <a>tmNotebookTabTermContainer</a> <a>ScrolledWindow</a>. The notebook
--   tab <a>Label</a> is also available.
data TMNotebookTab
TMNotebookTab :: !ScrolledWindow -> !TMTerm -> !Label -> TMNotebookTab

-- | The <a>ScrolledWindow</a> holding the VTE <a>Terminal</a>.
[tmNotebookTabTermContainer] :: TMNotebookTab -> !ScrolledWindow

-- | The <a>Terminal</a> insidie the <a>ScrolledWindow</a>.
[tmNotebookTabTerm] :: TMNotebookTab -> !TMTerm

-- | The <a>Label</a> holding the title of the <a>Terminal</a> in the
--   <a>Notebook</a> tab.
[tmNotebookTabLabel] :: TMNotebookTab -> !Label

-- | This holds the GTK <a>Notebook</a> containing multiple tabs of
--   <a>Terminal</a>s. We keep a separate list of terminals in
--   <a>tmNotebookTabs</a>.
data TMNotebook
TMNotebook :: !Notebook -> !FocusList TMNotebookTab -> TMNotebook

-- | This is the GTK <a>Notebook</a> that holds multiple tabs of
--   <a>Terminal</a>s.
[tmNotebook] :: TMNotebook -> !Notebook

-- | A <a>FocusList</a> containing references to each individual
--   <a>TMNotebookTab</a>.
[tmNotebookTabs] :: TMNotebook -> !FocusList TMNotebookTab
data TMState'
TMState :: !Application -> !ApplicationWindow -> !TMNotebook -> !FontDescription -> !TMConfig -> TMState'
[tmStateApp] :: TMState' -> !Application
[tmStateAppWin] :: TMState' -> !ApplicationWindow
[tmStateNotebook] :: TMState' -> !TMNotebook
[tmStateFontDesc] :: TMState' -> !FontDescription
[tmStateConfig] :: TMState' -> !TMConfig
type TMState = MVar TMState'
createTMTerm :: Terminal -> Int -> Unique -> TMTerm
newTMTerm :: Terminal -> Int -> IO TMTerm
getFocusedTermFromState :: TMState -> IO (Maybe Terminal)
createTMNotebookTab :: Label -> ScrolledWindow -> TMTerm -> TMNotebookTab
createTMNotebook :: Notebook -> FocusList TMNotebookTab -> TMNotebook
createEmptyTMNotebook :: Notebook -> TMNotebook
notebookToList :: Notebook -> IO [Widget]
newTMState :: TMConfig -> Application -> ApplicationWindow -> TMNotebook -> FontDescription -> IO TMState
newEmptyTMState :: TMConfig -> Application -> ApplicationWindow -> Notebook -> FontDescription -> IO TMState
newTMStateSingleTerm :: TMConfig -> Application -> ApplicationWindow -> Notebook -> Label -> ScrolledWindow -> Terminal -> Int -> FontDescription -> IO TMState
traceShowMTMState :: TMState -> IO ()

-- | The font size for the Termonad terminal. There are two ways to set the
--   fontsize, corresponding to the two different ways to set the font size
--   in the Pango font rendering library.
--   
--   If you're not sure which to use, try <a>FontSizePoints</a> first and
--   see how it looks. It should generally correspond to font sizes you are
--   used to from other applications.
data FontSize

-- | This sets the font size based on "points". The conversion between a
--   point and an actual size depends on the system configuration and the
--   output device. The function <a>fontDescriptionSetSize</a> is used to
--   set the font size. See the documentation for that function for more
--   info.
FontSizePoints :: Int -> FontSize

-- | This sets the font size based on "device units". In general, this can
--   be thought of as one pixel. The function
--   <a>fontDescriptionSetAbsoluteSize</a> is used to set the font size.
--   See the documentation for that function for more info.
FontSizeUnits :: Double -> FontSize

-- | The default <a>FontSize</a> used if not specified.
--   
--   <pre>
--   &gt;&gt;&gt; defaultFontSize
--   FontSizePoints 12
--   </pre>
defaultFontSize :: FontSize

-- | Modify a <a>FontSize</a> by adding some value.
--   
--   <pre>
--   &gt;&gt;&gt; modFontSize 1 (FontSizePoints 13)
--   FontSizePoints 14
--   
--   &gt;&gt;&gt; modFontSize 1 (FontSizeUnits 9.0)
--   FontSizeUnits 10.0
--   </pre>
--   
--   You can reduce the font size by passing a negative value.
--   
--   <pre>
--   &gt;&gt;&gt; modFontSize (-2) (FontSizePoints 13)
--   FontSizePoints 11
--   </pre>
--   
--   If you try to create a font size less than 1, then the old font size
--   will be used.
--   
--   <pre>
--   &gt;&gt;&gt; modFontSize (-10) (FontSizePoints 5)
--   FontSizePoints 5
--   
--   &gt;&gt;&gt; modFontSize (-1) (FontSizeUnits 1.0)
--   FontSizeUnits 1.0
--   </pre>
modFontSize :: Int -> FontSize -> FontSize

-- | Settings for the font to be used in Termonad.
data FontConfig
FontConfig :: !Text -> !FontSize -> FontConfig

-- | The font family to use. Example: <tt>"DejaVu Sans Mono"</tt> or
--   <tt>"Source Code Pro"</tt>
[fontFamily] :: FontConfig -> !Text

-- | The font size.
[fontSize] :: FontConfig -> !FontSize

-- | The default <a>FontConfig</a> to use if not specified.
--   
--   <pre>
--   &gt;&gt;&gt; defaultFontConfig == FontConfig {fontFamily = "Monospace", fontSize = defaultFontSize}
--   True
--   </pre>
defaultFontConfig :: FontConfig

-- | This data type represents an option that can either be <a>Set</a> or
--   <a>Unset</a>.
--   
--   This data type is used in situations where leaving an option unset
--   results in a special state that is not representable by setting any
--   specific value.
--   
--   Examples of this include the <tt>cursorFgColour</tt> and
--   <tt>cursorBgColour</tt> options supplied by the <tt>ColourConfig</tt>
--   <tt>ConfigExtension</tt>. By default, <tt>cursorFgColour</tt> and
--   <tt>cursorBgColour</tt> are both <a>Unset</a>. However, when
--   <tt>cursorBgColour</tt> is <a>Set</a>, <tt>cursorFgColour</tt>
--   defaults to the color of the text underneath. There is no way to
--   represent this by setting <tt>cursorFgColour</tt>.
data Option a
Unset :: Option a
Set :: !a -> Option a

-- | Run a function over the value contained in an <a>Option</a>. Return
--   <a>mempty</a> when <a>Option</a> is <a>Unset</a>.
--   
--   <pre>
--   &gt;&gt;&gt; whenSet (Set [1,2,3]) (++ [4,5,6]) :: [Int]
--   [1,2,3,4,5,6]
--   
--   &gt;&gt;&gt; whenSet Unset (++ [4,5,6]) :: [Int]
--   []
--   </pre>
whenSet :: Monoid m => Option a -> (a -> m) -> m

-- | Whether or not to show the scroll bar in a terminal.
data ShowScrollbar

-- | Never show the scroll bar, even if there are too many lines on the
--   terminal to show all at once. You should still be able to scroll with
--   the mouse wheel.
ShowScrollbarNever :: ShowScrollbar

-- | Always show the scrollbar, even if it is not needed.
ShowScrollbarAlways :: ShowScrollbar

-- | Only show the scrollbar if there are too many lines on the terminal to
--   show all at once.
ShowScrollbarIfNeeded :: ShowScrollbar

-- | Whether or not to show the tab bar for switching tabs.
data ShowTabBar

-- | Never show the tab bar, even if there are multiple tabs open. This may
--   be confusing if you plan on using multiple tabs.
ShowTabBarNever :: ShowTabBar

-- | Always show the tab bar, even if you only have one tab open.
ShowTabBarAlways :: ShowTabBar

-- | Only show the tab bar if you have multiple tabs open.
ShowTabBarIfNeeded :: ShowTabBar

-- | Configuration options for Termonad.
--   
--   See <a>defaultConfigOptions</a> for the default values.
data ConfigOptions
ConfigOptions :: !FontConfig -> !ShowScrollbar -> !Integer -> !Bool -> !Text -> !Bool -> !ShowTabBar -> !CursorBlinkMode -> ConfigOptions

-- | Specific options for fonts.
[fontConfig] :: ConfigOptions -> !FontConfig

-- | When to show the scroll bar.
[showScrollbar] :: ConfigOptions -> !ShowScrollbar

-- | The number of lines to keep in the scroll back history for each
--   terminal.
[scrollbackLen] :: ConfigOptions -> !Integer

-- | Whether or not to ask you for confirmation when closing individual
--   terminals or Termonad itself. It is generally safer to keep this as
--   <a>True</a>.
[confirmExit] :: ConfigOptions -> !Bool

-- | When double-clicking on text in the terminal with the mouse, Termonad
--   will use this value to determine what to highlight. The individual
--   characters in this list will be counted as part of a word.
--   
--   For instance if <a>wordCharExceptions</a> is <tt>""</tt>, then when
--   you double-click on the text <tt>http://</tt>, only the <tt>http</tt>
--   portion will be highlighted. If <a>wordCharExceptions</a> is
--   <tt>":"</tt>, then the <tt>http:</tt> portion will be highlighted.
[wordCharExceptions] :: ConfigOptions -> !Text

-- | Whether or not to show the <tt>File</tt> <tt>Edit</tt> etc menu.
[showMenu] :: ConfigOptions -> !Bool

-- | When to show the tab bar.
[showTabBar] :: ConfigOptions -> !ShowTabBar

-- | How to handle cursor blink.
[cursorBlinkMode] :: ConfigOptions -> !CursorBlinkMode

-- | The default <a>ConfigOptions</a>.
--   
--   <pre>
--   &gt;&gt;&gt; :{
--     let defConfOpt =
--           ConfigOptions
--             { fontConfig = defaultFontConfig
--             , showScrollbar = ShowScrollbarIfNeeded
--             , scrollbackLen = 10000
--             , confirmExit = True
--             , wordCharExceptions = "-#%&amp;+,./=?@\\_~\183:"
--             , showMenu = True
--             , showTabBar = ShowTabBarIfNeeded
--             , cursorBlinkMode = CursorBlinkModeOn
--             }
--     in defaultConfigOptions == defConfOpt
--   :}
--   True
--   </pre>
defaultConfigOptions :: ConfigOptions

-- | The Termonad <a>ConfigOptions</a> along with the <a>ConfigHooks</a>.
data TMConfig
TMConfig :: !ConfigOptions -> !ConfigHooks -> TMConfig
[options] :: TMConfig -> !ConfigOptions
[hooks] :: TMConfig -> !ConfigHooks

-- | The default <a>TMConfig</a>.
--   
--   <a>options</a> is <a>defaultConfigOptions</a> and <a>hooks</a> is
--   <a>defaultConfigHooks</a>.
defaultTMConfig :: TMConfig

-- | Hooks into certain termonad operations and VTE events. Used to modify
--   termonad's behaviour in order to implement new functionality. Fields
--   should have sane <tt>Semigroup</tt> and <tt>Monoid</tt> instances so
--   that config extensions can be combined uniformly and new hooks can be
--   added without incident.
data ConfigHooks
ConfigHooks :: (TMState -> Terminal -> IO ()) -> ConfigHooks

-- | Produce an IO action to run on creation of new <tt>Terminal</tt>,
--   given <tt>TMState</tt> and the <tt>Terminal</tt> in question.
[createTermHook] :: ConfigHooks -> TMState -> Terminal -> IO ()

-- | Default values for the <a>ConfigHooks</a>.
--   
--   <ul>
--   <li>The default function for <a>createTermHook</a> is
--   <a>defaultCreateTermHook</a>.</li>
--   </ul>
defaultConfigHooks :: ConfigHooks

-- | Default value for <a>createTermHook</a>. Does nothing.
defaultCreateTermHook :: TMState -> Terminal -> IO ()
data FocusNotSameErr
FocusListFocusExistsButNoNotebookTabWidget :: FocusNotSameErr
NotebookTabWidgetDiffersFromFocusListFocus :: FocusNotSameErr
NotebookTabWidgetExistsButNoFocusListFocus :: FocusNotSameErr
data TabsDoNotMatch

-- | The first <a>Int</a> is the number of tabs in the actual GTK
--   <a>Notebook</a>. The second <a>Int</a> is the number of tabs in the
--   <a>FocusList</a>.
TabLengthsDifferent :: Int -> Int -> TabsDoNotMatch

-- | The tab at index <a>Int</a> is different between the actual GTK
--   <a>Notebook</a> and the <a>FocusList</a>.
TabAtIndexDifferent :: Int -> TabsDoNotMatch
data TMStateInvariantErr
FocusNotSame :: FocusNotSameErr -> Int -> TMStateInvariantErr
TabsDoNotMatch :: TabsDoNotMatch -> TMStateInvariantErr

-- | Gather up the invariants for <a>TMState</a> and return them as a list.
--   
--   If no invariants have been violated, then this function should return
--   an empty list.
invariantTMState' :: TMState' -> IO [TMStateInvariantErr]

-- | Check the invariants for <a>TMState</a>, and call <a>fail</a> if we
--   find that they have been violated.
assertInvariantTMState :: TMState -> IO ()
pPrintTMState :: TMState -> IO ()
instance GHC.Show.Show Termonad.Types.TMStateInvariantErr
instance GHC.Show.Show Termonad.Types.TabsDoNotMatch
instance GHC.Show.Show Termonad.Types.FocusNotSameErr
instance GHC.Show.Show Termonad.Types.TMConfig
instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.ConfigOptions
instance GHC.Show.Show Termonad.Types.ConfigOptions
instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.ConfigOptions
instance GHC.Generics.Generic Termonad.Types.ConfigOptions
instance GHC.Classes.Eq Termonad.Types.ConfigOptions
instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.ShowTabBar
instance GHC.Show.Show Termonad.Types.ShowTabBar
instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.ShowTabBar
instance GHC.Generics.Generic Termonad.Types.ShowTabBar
instance GHC.Classes.Eq Termonad.Types.ShowTabBar
instance GHC.Enum.Enum Termonad.Types.ShowTabBar
instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.ShowScrollbar
instance GHC.Show.Show Termonad.Types.ShowScrollbar
instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.ShowScrollbar
instance GHC.Generics.Generic Termonad.Types.ShowScrollbar
instance GHC.Classes.Eq Termonad.Types.ShowScrollbar
instance GHC.Enum.Enum Termonad.Types.ShowScrollbar
instance Data.Foldable.Foldable Termonad.Types.Option
instance GHC.Base.Functor Termonad.Types.Option
instance GHC.Classes.Ord a => GHC.Classes.Ord (Termonad.Types.Option a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Termonad.Types.Option a)
instance GHC.Read.Read a => GHC.Read.Read (Termonad.Types.Option a)
instance GHC.Show.Show a => GHC.Show.Show (Termonad.Types.Option a)
instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.FontConfig
instance GHC.Show.Show Termonad.Types.FontConfig
instance GHC.Generics.Generic Termonad.Types.FontConfig
instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.FontConfig
instance GHC.Classes.Eq Termonad.Types.FontConfig
instance Data.Aeson.Types.ToJSON.ToJSON Termonad.Types.FontSize
instance GHC.Show.Show Termonad.Types.FontSize
instance GHC.Generics.Generic Termonad.Types.FontSize
instance Data.Aeson.Types.FromJSON.FromJSON Termonad.Types.FontSize
instance GHC.Classes.Eq Termonad.Types.FontSize
instance GHC.Show.Show Termonad.Types.TMState'
instance GHC.Show.Show Termonad.Types.ConfigHooks
instance GHC.Show.Show Termonad.Types.TMNotebook
instance GHC.Show.Show Termonad.Types.TMNotebookTab
instance GHC.Classes.Eq Termonad.Types.TMNotebookTab
instance GHC.Show.Show Termonad.Types.TMTerm
instance GHC.Classes.Eq Termonad.Types.TMTerm
instance Data.Aeson.Types.FromJSON.FromJSON GI.Vte.Enums.CursorBlinkMode
instance Data.Aeson.Types.ToJSON.ToJSON GI.Vte.Enums.CursorBlinkMode

module Termonad.PreferencesFile

-- | Get the path to the preferences file
--   <tt>~/.config/termonad/termonad.yaml</tt>.
getPreferencesFile :: IO FilePath

-- | Read the configuration for the preferences file
--   <tt>~/.config/termonad/termonad.yaml</tt>. This file stores only the
--   <a>options</a> of <a>TMConfig</a> so <a>hooks</a> are initialized with
--   <a>defaultConfigHooks</a>. If the file doesn't exist, create it with
--   the default values.
tmConfigFromPreferencesFile :: IO TMConfig
writePreferencesFile :: FilePath -> ConfigOptions -> IO ()

-- | Save the configuration to the preferences file
--   <tt>~/.config/termonad/termonad.yaml</tt>
saveToPreferencesFile :: TMConfig -> IO ()

module Termonad.Lenses
lensUnique :: Lens' TMTerm Unique
lensTerm :: Lens' TMTerm Terminal
lensPid :: Lens' TMTerm Int
lensTMNotebookTabTermContainer :: Lens' TMNotebookTab ScrolledWindow
lensTMNotebookTabTerm :: Lens' TMNotebookTab TMTerm
lensTMNotebookTabLabel :: Lens' TMNotebookTab Label
lensTMNotebookTabs :: Lens' TMNotebook (FocusList TMNotebookTab)
lensTMNotebook :: Lens' TMNotebook Notebook
lensTMStateNotebook :: Lens' TMState' TMNotebook
lensTMStateFontDesc :: Lens' TMState' FontDescription
lensTMStateConfig :: Lens' TMState' TMConfig
lensTMStateAppWin :: Lens' TMState' ApplicationWindow
lensTMStateApp :: Lens' TMState' Application
_FontSizeUnits :: Prism' FontSize Double
_FontSizePoints :: Prism' FontSize Int
lensFontSize :: Lens' FontConfig FontSize
lensFontFamily :: Lens' FontConfig Text
lensWordCharExceptions :: Lens' ConfigOptions Text
lensShowTabBar :: Lens' ConfigOptions ShowTabBar
lensShowScrollbar :: Lens' ConfigOptions ShowScrollbar
lensShowMenu :: Lens' ConfigOptions Bool
lensScrollbackLen :: Lens' ConfigOptions Integer
lensFontConfig :: Lens' ConfigOptions FontConfig
lensCursorBlinkMode :: Lens' ConfigOptions CursorBlinkMode
lensConfirmExit :: Lens' ConfigOptions Bool
lensCreateTermHook :: Iso' ConfigHooks (TMState -> Terminal -> IO ())
lensOptions :: Lens' TMConfig ConfigOptions
lensHooks :: Lens' TMConfig ConfigHooks

module Termonad.Term
focusTerm :: Int -> TMState -> IO ()
altNumSwitchTerm :: Int -> TMState -> IO ()
termExitFocused :: TMState -> IO ()
termClose :: TMNotebookTab -> TMState -> IO ()
termExitWithConfirmation :: TMNotebookTab -> TMState -> IO ()
termExit :: TMNotebookTab -> TMState -> IO ()
relabelTabs :: TMState -> IO ()

-- | Compute the text for a <a>Label</a> for a GTK Notebook tab.
--   
--   <pre>
--   &gt;&gt;&gt; computeTabLabel 0 (Just "me@machine:~")
--   "1. me@machine:~"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; computeTabLabel 5 (Just "bash process")
--   "6. bash process"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; computeTabLabel 2 Nothing
--   "3. shell"
--   </pre>
computeTabLabel :: Int -> Maybe Text -> Text

-- | Update the given <a>Label</a> for a GTK Notebook tab.
--   
--   The new text for the label is determined by the <a>computeTabLabel</a>
--   function.
relabelTab :: Notebook -> Label -> ScrolledWindow -> Terminal -> IO ()
showScrollbarToPolicy :: ShowScrollbar -> PolicyType
createScrolledWin :: TMState -> IO ScrolledWindow
createNotebookTabLabel :: IO (Box, Label, Button)
setShowTabs :: TMConfig -> Notebook -> IO ()
toRGBA :: Colour Double -> IO RGBA

-- | TODO: This should probably be implemented in an external package,
--   since it is a generally useful utility.
--   
--   It should also be implemented for windows and osx.
cwdOfPid :: Int -> IO (Maybe Text)

-- | Get the current working directory from the shell in the focused tab of
--   a notebook.
--   
--   Returns <a>Nothing</a> if there is no focused tab of the notebook, or
--   the current working directory could not be detected for the shell.
getCWDFromFocusedTab :: TMNotebook -> IO (Maybe Text)

-- | Create the VTE <a>Terminal</a>, set the fonts and options
createAndInitVteTerm :: FontDescription -> ConfigOptions -> IO Terminal

-- | Starts a shell in a terminal and return a new TMTerm
launchShell :: Terminal -> Maybe Text -> IO Int

-- | Add a page to the notebook and switch to it.
addPage :: TMState -> TMNotebookTab -> Box -> IO ()

-- | Set the keyboard focus on a vte terminal
setFocusOn :: ApplicationWindow -> Terminal -> IO ()

-- | Create a new <a>TMTerm</a>, setting it up and adding it to the
--   GTKNotebook.
createTerm :: (TMState -> EventKey -> IO Bool) -> TMState -> IO TMTerm

-- | Popup the context menu on right click
handleMousePress :: Terminal -> EventButton -> IO Bool

module Termonad.Keys
showKeys :: EventKey -> IO Bool
data Key
Key :: Word32 -> Set ModifierType -> Key
[keyVal] :: Key -> Word32
[keyMods] :: Key -> Set ModifierType
toKey :: Word32 -> Set ModifierType -> Key
keyMap :: Map Key (TMState -> IO Bool)
stopProp :: (TMState -> IO a) -> TMState -> IO Bool
removeStrangeModifiers :: Key -> Key
handleKeyPress :: TMState -> EventKey -> IO Bool
instance GHC.Show.Show Termonad.Keys.Key
instance GHC.Classes.Ord Termonad.Keys.Key
instance GHC.Classes.Eq Termonad.Keys.Key


-- | To use this config extension in your
--   <tt>~/.config/termonad/termonad.hs</tt>, first import this module.
--   Create a new <a>ColourExtension</a> with the
--   <a>createColourExtension</a> function. Then add the
--   <a>ColourExtension</a> to your <a>TMConfig</a> with the
--   <a>addColourExtension</a> function.
--   
--   See <a>this code</a> for a simple example.
--   
--   When setting colors, you may find it convenient to use the
--   <a>print-console-colors</a> package, which provides an executable
--   called <tt>print-console-colors</tt> that prints all of the colors for
--   your terminal.
module Termonad.Config.Colour

-- | The configuration for the colors used by Termonad.
--   
--   <a>foregroundColour</a> and <a>backgroundColour</a> allow you to set
--   the color of the foreground text and background of the terminal.
--   
--   <a>palette</a> allows you to set the full color palette used by the
--   terminal. See <a>Palette</a> for more information.
--   
--   If you don't set <a>foregroundColour</a>, <a>backgroundColour</a>, or
--   <a>palette</a>, the defaults from VTE are used.
--   
--   If you want to use a terminal with a white (or light) background and a
--   black foreground, it may be a good idea to change some of the colors
--   in the <a>Palette</a> as well.
--   
--   VTE works as follows: if you don't explicitly set a background or
--   foreground color, it takes the 0th colour from the <a>palette</a> to
--   be the background color, and the 7th colour from the <a>palette</a> to
--   be the foreground color. If you notice oddities with colouring in
--   certain applications, it may be helpful to make sure that these
--   <a>palette</a> colours match up with the <a>backgroundColour</a> and
--   <a>foregroundColour</a> you have set.)
--   
--   <a>cursorFgColour</a> and <a>cursorBgColour</a> allow you to set the
--   foreground color of the text under the cursor, as well as the color of
--   the cursor itself.
--   
--   Termonad will behave differently depending on the combination
--   <a>cursorFgColour</a> and <a>cursorBgColour</a> being <a>Set</a> vs.
--   <a>Unset</a>. Here is the summary of the different possibilities:
--   
--   <ul>
--   <li><a>cursorFgColour</a> is <a>Set</a> and <a>cursorBgColour</a> is
--   <a>Set</a>The foreground and background colors of the cursor are as
--   you have set.</li>
--   <li><a>cursorFgColour</a> is <a>Set</a> and <a>cursorBgColour</a> is
--   <a>Unset</a>The cursor background color turns completely black so that
--   it is not visible. The foreground color of the cursor is the color
--   that you have <a>Set</a>. This ends up being mostly unusable, so you
--   are recommended to always <a>Set</a> <a>cursorBgColour</a> when you
--   have <a>Set</a> <a>cursorFgColour</a>.</li>
--   <li><a>cursorFgColour</a> is <a>Unset</a> and <a>cursorBgColour</a> is
--   <a>Set</a>The cursor background color becomes the color you
--   <a>Set</a>, while the cursor foreground color doesn't change from the
--   letter it is over. For instance, imagine there is a letter on the
--   screen with a black background and a green foreground. If you bring
--   the cursor overtop of it, the cursor background will be the color you
--   have <a>Set</a>, while the cursor foreground will be green.This is
--   completely usable, but is slightly annoying if you place the cursor
--   over a letter with the same foreground color as the cursor's
--   background color, because the letter will not be readable. For
--   instance, imagine you have set your cursor background color to red,
--   and somewhere on the screen there is a letter with a black background
--   and a red foreground. If you move your cursor over the letter, the
--   background of the cursor will be red (as you have set), and the cursor
--   foreground will be red (to match the original foreground color of the
--   letter). This will make it so you can't actually read the letter,
--   because the foreground and background are both red.</li>
--   <li><a>cursorFgColour</a> is <a>Unset</a> and <a>cursorBgColour</a> is
--   <a>Unset</a>This combination makes the cursor inverse of whatever text
--   it is over. If your cursor is over red text with a black background,
--   the cursor background will be red and the cursor foreground will be
--   black.This is the default.</li>
--   </ul>
--   
--   <a>cursorFgColour</a> is not supported in <tt>vte-2.91</tt> versions
--   older than 0.44. (This is somewhat confusing. Note that
--   <tt>vte-2.91</tt> is the name of the system library, and <tt>0.44</tt>
--   is its version number.)
--   
--   See <a>defaultColourConfig</a> for the defaults for
--   <a>ColourConfig</a> used in Termonad.
data ColourConfig c
ColourConfig :: !Option c -> !Option c -> !Option c -> !Option c -> !Palette c -> ColourConfig c

-- | Foreground color of the cursor. This is the color of the text that the
--   cursor is over. This is not supported on older versions of VTE.
[cursorFgColour] :: ColourConfig c -> !Option c

-- | Background color of the cursor. This is the color of the cursor
--   itself.
[cursorBgColour] :: ColourConfig c -> !Option c

-- | Color of the default foreground text in the terminal.
[foregroundColour] :: ColourConfig c -> !Option c

-- | Background color for the terminal
[backgroundColour] :: ColourConfig c -> !Option c

-- | Color palette for the terminal. See <a>Palette</a>.
[palette] :: ColourConfig c -> !Palette c

-- | Default setting for a <a>ColourConfig</a>. The cursor colors, font
--   foreground color, background color, and color palette are all left at
--   the defaults set by VTE.
--   
--   <pre>
--   &gt;&gt;&gt; defaultColourConfig
--   ColourConfig {cursorFgColour = Unset, cursorBgColour = Unset, foregroundColour = Unset, backgroundColour = Unset, palette = NoPalette}
--   </pre>
defaultColourConfig :: ColourConfig (AlphaColour Double)

-- | This newtype is for length 8 lists. Construct it with <a>mkList8</a>
--   or <a>unsafeMkList8</a>
data List8 a

-- | This newtype is for length 6 lists. Construct it with <a>mkList6</a>
--   or <a>unsafeMkList6</a>
data List6 a

-- | This newtype is for length 24 lists. Construct it with <a>mkList24</a>
--   or <a>unsafeMkList24</a>
data List24 a

-- | This newtype is for 6x6x6 matrices.. Construct it with <a>mkMatrix</a>
--   or <a>unsafeMkMatrix</a>
data Matrix a

-- | Typesafe smart constructor for length 8 lists.
mkList8 :: [a] -> Maybe (List8 a)

-- | Unsafe smart constructor for length 8 lists.
unsafeMkList8 :: [a] -> List8 a

-- | Set a given value in a <a>List8</a>.
--   
--   Internally uses <a>setAt</a>. See documentation on <a>setAt</a> for
--   some examples.
setAtList8 :: Int -> a -> List8 a -> List8 a

-- | Set a given value in a <a>List8</a>.
--   
--   Internally uses <a>overAt</a>. See documentation on <a>overAt</a> for
--   some examples.
overAtList8 :: Int -> (a -> a) -> List8 a -> List8 a

-- | Typesafe smart constructor for length 6 lists.
mkList6 :: [a] -> Maybe (List6 a)

-- | Unsafe smart constructor for length 6 lists.
unsafeMkList6 :: [a] -> List6 a

-- | Set a given value in a <a>List6</a>.
--   
--   Internally uses <a>setAt</a>. See documentation on <a>setAt</a> for
--   some examples.
setAtList6 :: Int -> a -> List6 a -> List6 a

-- | Set a given value in a <a>List6</a>.
--   
--   Internally uses <a>overAt</a>. See documentation on <a>overAt</a> for
--   some examples.
overAtList6 :: Int -> (a -> a) -> List6 a -> List6 a

-- | Typesafe smart constructor for length 24 lists.
mkList24 :: [a] -> Maybe (List24 a)

-- | Unsafe smart constructor for length 24 lists.
unsafeMkList24 :: [a] -> List24 a

-- | Set a given value in a <a>List24</a>.
--   
--   Internally uses <a>setAt</a>. See documentation on <a>setAt</a> for
--   some examples.
setAtList24 :: Int -> a -> List24 a -> List24 a

-- | Set a given value in a <a>List24</a>.
--   
--   Internally uses <a>overAt</a>. See documentation on <a>overAt</a> for
--   some examples.
overAtList24 :: Int -> (a -> a) -> List24 a -> List24 a

-- | Unsafe smart constructor for 6x6x6 Matrices.
mkMatrix :: [[[a]]] -> Maybe (Matrix a)

-- | Unsafe smart constructor for 6x6x6 Matrices.
unsafeMkMatrix :: [[[a]]] -> Matrix a

-- | Set a given value in a <a>Matrix</a>.
--   
--   Internally uses <a>setAt</a>. See documentation on <a>setAt</a> for
--   some examples.
setAtMatrix :: Int -> Int -> Int -> a -> Matrix a -> Matrix a

-- | Set a given value in a <a>Matrix</a>.
--   
--   Internally uses <a>overAt</a>. See documentation on <a>overAt</a> for
--   some examples.
overAtMatrix :: Int -> Int -> Int -> (a -> a) -> Matrix a -> Matrix a
lensCursorFgColour :: forall c_a28iB. Lens' (ColourConfig c_a28iB) (Option c_a28iB)
lensCursorBgColour :: forall c_a28iB. Lens' (ColourConfig c_a28iB) (Option c_a28iB)
lensForegroundColour :: forall c_a28iB. Lens' (ColourConfig c_a28iB) (Option c_a28iB)
lensBackgroundColour :: forall c_a28iB. Lens' (ColourConfig c_a28iB) (Option c_a28iB)
lensPalette :: forall c_a28iB. Lens' (ColourConfig c_a28iB) (Palette c_a28iB)

-- | Extension that allows setting colors for terminals in Termonad.
data ColourExtension
ColourExtension :: MVar (ColourConfig (AlphaColour Double)) -> (TMState -> Terminal -> IO ()) -> ColourExtension

-- | <a>MVar</a> holding the current <a>ColourConfig</a>. This could
--   potentially be passed to other extensions or user code. This would
--   allow changing the colors for new terminals in realtime.
[colourExtConf] :: ColourExtension -> MVar (ColourConfig (AlphaColour Double))

-- | The <tt>createTermHook</tt> used by the <a>ColourExtension</a>. This
--   sets the colors for a new terminal based on the <a>ColourConfig</a> in
--   <a>colourExtConf</a>.
[colourExtCreateTermHook] :: ColourExtension -> TMState -> Terminal -> IO ()

-- | Create a <a>ColourExtension</a> based on a given <a>ColourConfig</a>.
--   
--   Most users will want to use this.
createColourExtension :: ColourConfig (AlphaColour Double) -> IO ColourExtension

-- | Create a <a>ColourExtension</a> based on <a>defaultColourConfig</a>.
--   
--   Note that this is not needed if you just want to use the default
--   colors for Termonad. However, if you want to pass around the
--   <a>MVar</a> <a>ColourConfig</a> for extensions to use, then you may
--   need this function.
createDefColourExtension :: IO ColourExtension

-- | This is similar to <a>addColourConfig</a>, but can be used on a
--   <a>ColourExtension</a> created with <a>createColourExtension</a>.
addColourExtension :: TMConfig -> ColourExtension -> TMConfig

-- | Add a given <a>ColourConfig</a> to a <a>TMConfig</a>. This adds
--   <a>colourHook</a> to the <tt>createTermHook</tt> in <a>TMConfig</a>.
addColourConfig :: TMConfig -> ColourConfig (AlphaColour Double) -> IO TMConfig

-- | The default <tt>createTermHook</tt> for
--   <a>colourExtCreateTermHook</a>. Set the colors for a terminal based on
--   the given <a>ColourConfig</a>.
colourHook :: MVar (ColourConfig (AlphaColour Double)) -> TMState -> Terminal -> IO ()

-- | This function shows how to combine <tt>createTermHook</tt>s.
--   
--   This first runs the old hook, followed by the new hook.
--   
--   This is used internally by <a>addColourConfig</a> and
--   <a>addColourExtension</a>.
addColourHook :: (TMState -> Terminal -> IO ()) -> (TMState -> Terminal -> IO ()) -> TMState -> Terminal -> IO ()

-- | This is the color palette to use for the terminal. Each data
--   constructor lets you set progressively more colors. These colors are
--   used by the terminal to render <a>ANSI escape color codes</a>.
--   
--   There are 256 total terminal colors. <a>BasicPalette</a> lets you set
--   the first 8, <a>ExtendedPalette</a> lets you set the first 16,
--   <a>ColourCubePalette</a> lets you set the first 232, and
--   <a>FullPalette</a> lets you set all 256.
--   
--   The first 8 colors codes are the standard colors. The next 8 are the
--   extended (light) colors. The next 216 are a full color cube. The last
--   24 are a grey scale.
--   
--   The following image gives an idea of what each individual color looks
--   like:
--   
--   
--   This picture does not exactly match up with Termonad's default colors,
--   but it gives an idea of what each block of colors represents.
--   
--   You can use <a>defaultStandardColours</a>, <a>defaultLightColours</a>,
--   <a>defaultColourCube</a>, and <a>defaultGreyscale</a> as a starting
--   point to customize the colors. The only time you'd need to use a
--   constructor other than <a>NoPalette</a> is when you want to customize
--   the default colors. That is to say, using <a>FullPalette</a> with all
--   the defaults should give you the same result as using
--   <a>NoPalette</a>.
data Palette c

-- | Don't set any colors and just use the default from VTE. This is a
--   black background with light grey text.
NoPalette :: Palette c

-- | Set the colors from the standard colors.
BasicPalette :: !List8 c -> Palette c

-- | Set the colors from the extended (light) colors (as well as standard
--   colors).
ExtendedPalette :: !List8 c -> !List8 c -> Palette c

-- | Set the colors from the color cube (as well as the standard colors and
--   extended colors).
ColourCubePalette :: !List8 c -> !List8 c -> !Matrix c -> Palette c

-- | Set the colors from the grey scale (as well as the standard colors,
--   extended colors, and color cube).
FullPalette :: !List8 c -> !List8 c -> !Matrix c -> !List24 c -> Palette c

-- | A <tt>Vec</tt> of standard colors. Default value for
--   <a>BasicPalette</a>.
--   
--   <pre>
--   &gt;&gt;&gt; showColourVec defaultStandardColours
--   ["#000000ff","#c00000ff","#00c000ff","#c0c000ff","#0000c0ff","#c000c0ff","#00c0c0ff","#c0c0c0ff"]
--   </pre>
defaultStandardColours :: (Ord b, Floating b) => List8 (AlphaColour b)

-- | A <tt>Vec</tt> of extended (light) colors. Default value for
--   <a>ExtendedPalette</a>.
--   
--   <pre>
--   &gt;&gt;&gt; showColourVec defaultLightColours
--   ["#3f3f3fff","#ff3f3fff","#3fff3fff","#ffff3fff","#3f3fffff","#ff3fffff","#3fffffff","#ffffffff"]
--   </pre>
defaultLightColours :: (Ord b, Floating b) => List8 (AlphaColour b)

-- | A matrix of a 6 x 6 x 6 color cube. Default value for
--   <a>ColourCubePalette</a>.
--   
--   <pre>
--   &gt;&gt;&gt; putStrLn $ pack $ showColourCube defaultColourCube
--   [ [ #000000ff, #00005fff, #000087ff, #0000afff, #0000d7ff, #0000ffff
--     , #005f00ff, #005f5fff, #005f87ff, #005fafff, #005fd7ff, #005fffff
--     , #008700ff, #00875fff, #008787ff, #0087afff, #0087d7ff, #0087ffff
--     , #00af00ff, #00af5fff, #00af87ff, #00afafff, #00afd7ff, #00afffff
--     , #00d700ff, #00d75fff, #00d787ff, #00d7afff, #00d7d7ff, #00d7ffff
--     , #00ff00ff, #00ff5fff, #00ff87ff, #00ffafff, #00ffd7ff, #00ffffff
--     ]
--   , [ #5f0000ff, #5f005fff, #5f0087ff, #5f00afff, #5f00d7ff, #5f00ffff
--     , #5f5f00ff, #5f5f5fff, #5f5f87ff, #5f5fafff, #5f5fd7ff, #5f5fffff
--     , #5f8700ff, #5f875fff, #5f8787ff, #5f87afff, #5f87d7ff, #5f87ffff
--     , #5faf00ff, #5faf5fff, #5faf87ff, #5fafafff, #5fafd7ff, #5fafffff
--     , #5fd700ff, #5fd75fff, #5fd787ff, #5fd7afff, #5fd7d7ff, #5fd7ffff
--     , #5fff00ff, #5fff5fff, #5fff87ff, #5fffafff, #5fffd7ff, #5fffffff
--     ]
--   , [ #870000ff, #87005fff, #870087ff, #8700afff, #8700d7ff, #8700ffff
--     , #875f00ff, #875f5fff, #875f87ff, #875fafff, #875fd7ff, #875fffff
--     , #878700ff, #87875fff, #878787ff, #8787afff, #8787d7ff, #8787ffff
--     , #87af00ff, #87af5fff, #87af87ff, #87afafff, #87afd7ff, #87afffff
--     , #87d700ff, #87d75fff, #87d787ff, #87d7afff, #87d7d7ff, #87d7ffff
--     , #87ff00ff, #87ff5fff, #87ff87ff, #87ffafff, #87ffd7ff, #87ffffff
--     ]
--   , [ #af0000ff, #af005fff, #af0087ff, #af00afff, #af00d7ff, #af00ffff
--     , #af5f00ff, #af5f5fff, #af5f87ff, #af5fafff, #af5fd7ff, #af5fffff
--     , #af8700ff, #af875fff, #af8787ff, #af87afff, #af87d7ff, #af87ffff
--     , #afaf00ff, #afaf5fff, #afaf87ff, #afafafff, #afafd7ff, #afafffff
--     , #afd700ff, #afd75fff, #afd787ff, #afd7afff, #afd7d7ff, #afd7ffff
--     , #afff00ff, #afff5fff, #afff87ff, #afffafff, #afffd7ff, #afffffff
--     ]
--   , [ #d70000ff, #d7005fff, #d70087ff, #d700afff, #d700d7ff, #d700ffff
--     , #d75f00ff, #d75f5fff, #d75f87ff, #d75fafff, #d75fd7ff, #d75fffff
--     , #d78700ff, #d7875fff, #d78787ff, #d787afff, #d787d7ff, #d787ffff
--     , #d7af00ff, #d7af5fff, #d7af87ff, #d7afafff, #d7afd7ff, #d7afffff
--     , #d7d700ff, #d7d75fff, #d7d787ff, #d7d7afff, #d7d7d7ff, #d7d7ffff
--     , #d7ff00ff, #d7ff5fff, #d7ff87ff, #d7ffafff, #d7ffd7ff, #d7ffffff
--     ]
--   , [ #ff0000ff, #ff005fff, #ff0087ff, #ff00afff, #ff00d7ff, #ff00ffff
--     , #ff5f00ff, #ff5f5fff, #ff5f87ff, #ff5fafff, #ff5fd7ff, #ff5fffff
--     , #ff8700ff, #ff875fff, #ff8787ff, #ff87afff, #ff87d7ff, #ff87ffff
--     , #ffaf00ff, #ffaf5fff, #ffaf87ff, #ffafafff, #ffafd7ff, #ffafffff
--     , #ffd700ff, #ffd75fff, #ffd787ff, #ffd7afff, #ffd7d7ff, #ffd7ffff
--     , #ffff00ff, #ffff5fff, #ffff87ff, #ffffafff, #ffffd7ff, #ffffffff
--     ]
--   ]
--   </pre>
defaultColourCube :: (Ord b, Floating b) => Matrix (AlphaColour b)

-- | A List of a grey scale. Default value for <a>FullPalette</a>.
--   
--   <pre>
--   &gt;&gt;&gt; fmap sRGB32show defaultGreyscale
--   List24 {getList24 = ["#080808ff","#121212ff","#1c1c1cff","#262626ff","#303030ff","#3a3a3aff","#444444ff","#4e4e4eff","#585858ff","#626262ff","#6c6c6cff","#767676ff","#808080ff","#8a8a8aff","#949494ff","#9e9e9eff","#a8a8a8ff","#b2b2b2ff","#bcbcbcff","#c6c6c6ff","#d0d0d0ff","#dadadaff","#e4e4e4ff","#eeeeeeff"]}
--   </pre>
defaultGreyscale :: (Ord b, Floating b) => List24 (AlphaColour b)

-- | This type represents a <a>Colour</a> that may be semi-transparent.
--   
--   The <a>Monoid</a> instance allows you to composite colours.
--   
--   <pre>
--   x `mappend` y == x `over` y
--   </pre>
--   
--   To get the (pre-multiplied) colour channel of an <a>AlphaColour</a>
--   <tt>c</tt>, simply composite <tt>c</tt> over black.
--   
--   <pre>
--   c `over` black
--   </pre>
data AlphaColour a

-- | Create an <a>AlphaColour</a> that is fully <a>opaque</a>.
--   
--   <pre>
--   &gt;&gt;&gt; sRGB32show $ createColour 64 96 128
--   "#406080ff"
--   
--   &gt;&gt;&gt; sRGB32show $ createColour 0 0 0
--   "#000000ff"
--   </pre>
--   
--   Similar to <a>sRGB24</a> but for <a>AlphaColour</a>.
createColour :: Word8 -> Word8 -> Word8 -> AlphaColour Double

-- | Create an <a>AlphaColour</a> from a four <a>Word8</a>s.
--   
--   <pre>
--   &gt;&gt;&gt; sRGB32show $ sRGB32 64 96 128 255
--   "#406080ff"
--   
--   &gt;&gt;&gt; sRGB32show $ sRGB32 0x08 0x10 0x20 0x01
--   "#08102001"
--   </pre>
--   
--   Note that if you specify the alpha as 0 (which means completely
--   translucent), all the color channels will be set to 0 as well.
--   
--   <pre>
--   &gt;&gt;&gt; sRGB32show $ sRGB32 100 150 200 0
--   "#00000000"
--   </pre>
--   
--   Similar to <a>sRGB24</a> but also includes an alpha channel. Most
--   users will probably want to use <a>createColour</a> instead.
sRGB32 :: Word8 -> Word8 -> Word8 -> Word8 -> AlphaColour Double

-- | Show an <a>AlphaColour</a> in hex.
--   
--   <pre>
--   &gt;&gt;&gt; sRGB32show (opaque red)
--   "#ff0000ff"
--   </pre>
--   
--   Similar to <a>sRGB24show</a>.
sRGB32show :: AlphaColour Double -> String

-- | Creates an opaque <a>AlphaColour</a> from a <a>Colour</a>.
opaque :: Num a => Colour a -> AlphaColour a

-- | This <a>AlphaColour</a> is entirely transparent and has no associated
--   colour channel.
transparent :: Num a => AlphaColour a

-- | A helper function for showing all the colors in <tt>Vec</tt> of
--   colors.
showColourVec :: List8 (AlphaColour Double) -> [String]

-- | Helper function for showing all the colors in a color cube. This is
--   used for debugging.
showColourCube :: Matrix (AlphaColour Double) -> String

-- | Convert a <a>Palette</a> to a list of colors. This is helpful for
--   debugging.
paletteToList :: Palette c -> [c]

-- | Create a vector of colors based on input bits.
--   
--   This is used to derive <a>defaultStandardColours</a> and
--   <a>defaultLightColours</a>.
--   
--   <pre>
--   &gt;&gt;&gt; coloursFromBits 192 0 == defaultStandardColours
--   True
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; coloursFromBits 192 63 == defaultLightColours
--   True
--   </pre>
--   
--   In general, as an end-user, you shouldn't need to use this.
coloursFromBits :: forall b. (Ord b, Floating b) => Word8 -> Word8 -> List8 (AlphaColour b)

-- | Specify a colour cube with one colour vector for its displacement and
--   three colour vectors for its edges. Produces a uniform 6x6x6 grid
--   bounded by and orthognal to the faces.
cube :: forall b. Fractional b => AlphaColour b -> AlphaColour b -> AlphaColour b -> AlphaColour b -> Matrix (AlphaColour b)

-- | Set a given value in a list.
--   
--   <pre>
--   &gt;&gt;&gt; setAt 2 "hello" ["a","b","c","d"]
--   ["a","b","hello","d"]
--   </pre>
--   
--   You can set the first and last values in the list as well:
--   
--   <pre>
--   &gt;&gt;&gt; setAt 0 "hello" ["a","b","c","d"]
--   ["hello","b","c","d"]
--   
--   &gt;&gt;&gt; setAt 3 "hello" ["a","b","c","d"]
--   ["a","b","c","hello"]
--   </pre>
--   
--   If you try to set a value outside of the list, you'll get back the
--   same list:
--   
--   <pre>
--   &gt;&gt;&gt; setAt (-10) "hello" ["a","b","c","d"]
--   ["a","b","c","d"]
--   
--   &gt;&gt;&gt; setAt 100 "hello" ["a","b","c","d"]
--   ["a","b","c","d"]
--   </pre>
setAt :: forall a. Int -> a -> [a] -> [a]

-- | Update a given value in a list.
--   
--   <pre>
--   &gt;&gt;&gt; overAt 2 (\x -&gt; x ++ x) ["a","b","c","d"]
--   ["a","b","cc","d"]
--   </pre>
--   
--   You can update the first and last values in the list as well:
--   
--   <pre>
--   &gt;&gt;&gt; overAt 0 (\x -&gt; "bye") ["a","b","c","d"]
--   ["bye","b","c","d"]
--   
--   &gt;&gt;&gt; overAt 3 (\x -&gt; "") ["a","b","c","d"]
--   ["a","b","c",""]
--   </pre>
--   
--   If you try to set a value outside of the list, you'll get back the
--   same list:
--   
--   <pre>
--   &gt;&gt;&gt; overAt (-10) (\_ -&gt; "foobar") ["a","b","c","d"]
--   ["a","b","c","d"]
--   
--   &gt;&gt;&gt; overAt 100 (\_ -&gt; "baz") ["a","b","c","d"]
--   ["a","b","c","d"]
--   </pre>
overAt :: forall a. Int -> (a -> a) -> [a] -> [a]
instance GHC.Base.Functor Termonad.Config.Colour.ColourConfig
instance GHC.Show.Show c => GHC.Show.Show (Termonad.Config.Colour.ColourConfig c)
instance GHC.Classes.Eq c => GHC.Classes.Eq (Termonad.Config.Colour.ColourConfig c)
instance Data.Foldable.Foldable Termonad.Config.Colour.Palette
instance GHC.Base.Functor Termonad.Config.Colour.Palette
instance GHC.Show.Show c => GHC.Show.Show (Termonad.Config.Colour.Palette c)
instance GHC.Classes.Eq c => GHC.Classes.Eq (Termonad.Config.Colour.Palette c)
instance Data.Foldable.Foldable Termonad.Config.Colour.Matrix
instance GHC.Base.Functor Termonad.Config.Colour.Matrix
instance GHC.Classes.Eq a => GHC.Classes.Eq (Termonad.Config.Colour.Matrix a)
instance GHC.Show.Show a => GHC.Show.Show (Termonad.Config.Colour.Matrix a)
instance GHC.Base.Functor Termonad.Config.Colour.List24
instance Data.Foldable.Foldable Termonad.Config.Colour.List24
instance GHC.Classes.Eq a => GHC.Classes.Eq (Termonad.Config.Colour.List24 a)
instance GHC.Show.Show a => GHC.Show.Show (Termonad.Config.Colour.List24 a)
instance GHC.Base.Functor Termonad.Config.Colour.List6
instance Data.Foldable.Foldable Termonad.Config.Colour.List6
instance GHC.Classes.Eq a => GHC.Classes.Eq (Termonad.Config.Colour.List6 a)
instance GHC.Show.Show a => GHC.Show.Show (Termonad.Config.Colour.List6 a)
instance GHC.Base.Functor Termonad.Config.Colour.List8
instance Data.Foldable.Foldable Termonad.Config.Colour.List8
instance GHC.Classes.Eq a => GHC.Classes.Eq (Termonad.Config.Colour.List8 a)
instance GHC.Show.Show a => GHC.Show.Show (Termonad.Config.Colour.List8 a)


-- | This module exposes termonad's basic configuration options. To set
--   these options in your config, first ensure you've imported
--   <a>Termonad</a>.
--   
--   Then for your main, apply <a>start</a> or <a>defaultMain</a> to a
--   <a>TMConfig</a> value. We suggest you build such values by performing
--   record updates on the <a>defaultTMConfig</a> rather than using the
--   <a>TMConfig</a> constructor, as the latter is much more likely to
--   break when there are changes to the <a>TMConfig</a> type.
--   
--   E.g.
--   
--   <pre>
--   -- Re-exports this module.
--   import <a>Termonad</a>
--   
--   main :: IO ()
--   main = <tt>start</tt> $ <a>defaultTMConfig</a>
--     { <a>showScrollbar</a> = <a>ShowScrollbarNever</a>
--     , <a>confirmExit</a> = False
--     , <a>showMenu</a> = False
--     , <a>cursorBlinkMode</a> = <a>CursorBlinkModeOff</a>
--     }
--   </pre>
--   
--   Additional options can be found in the following modules.
--   
--   <ul>
--   <li><a>Termonad.Config.Colour</a></li>
--   </ul>
--   
--   If you want to see an example configuration file, as well as an
--   explanation for how to use Termonad, see the Termonad <a>README</a>.
module Termonad.Config

-- | The Termonad <a>ConfigOptions</a> along with the <a>ConfigHooks</a>.
data TMConfig
TMConfig :: !ConfigOptions -> !ConfigHooks -> TMConfig
[options] :: TMConfig -> !ConfigOptions
[hooks] :: TMConfig -> !ConfigHooks

-- | The default <a>TMConfig</a>.
--   
--   <a>options</a> is <a>defaultConfigOptions</a> and <a>hooks</a> is
--   <a>defaultConfigHooks</a>.
defaultTMConfig :: TMConfig

-- | Configuration options for Termonad.
--   
--   See <a>defaultConfigOptions</a> for the default values.
data ConfigOptions
ConfigOptions :: !FontConfig -> !ShowScrollbar -> !Integer -> !Bool -> !Text -> !Bool -> !ShowTabBar -> !CursorBlinkMode -> ConfigOptions

-- | Specific options for fonts.
[fontConfig] :: ConfigOptions -> !FontConfig

-- | When to show the scroll bar.
[showScrollbar] :: ConfigOptions -> !ShowScrollbar

-- | The number of lines to keep in the scroll back history for each
--   terminal.
[scrollbackLen] :: ConfigOptions -> !Integer

-- | Whether or not to ask you for confirmation when closing individual
--   terminals or Termonad itself. It is generally safer to keep this as
--   <a>True</a>.
[confirmExit] :: ConfigOptions -> !Bool

-- | When double-clicking on text in the terminal with the mouse, Termonad
--   will use this value to determine what to highlight. The individual
--   characters in this list will be counted as part of a word.
--   
--   For instance if <a>wordCharExceptions</a> is <tt>""</tt>, then when
--   you double-click on the text <tt>http://</tt>, only the <tt>http</tt>
--   portion will be highlighted. If <a>wordCharExceptions</a> is
--   <tt>":"</tt>, then the <tt>http:</tt> portion will be highlighted.
[wordCharExceptions] :: ConfigOptions -> !Text

-- | Whether or not to show the <tt>File</tt> <tt>Edit</tt> etc menu.
[showMenu] :: ConfigOptions -> !Bool

-- | When to show the tab bar.
[showTabBar] :: ConfigOptions -> !ShowTabBar

-- | How to handle cursor blink.
[cursorBlinkMode] :: ConfigOptions -> !CursorBlinkMode

-- | The default <a>ConfigOptions</a>.
--   
--   <pre>
--   &gt;&gt;&gt; :{
--     let defConfOpt =
--           ConfigOptions
--             { fontConfig = defaultFontConfig
--             , showScrollbar = ShowScrollbarIfNeeded
--             , scrollbackLen = 10000
--             , confirmExit = True
--             , wordCharExceptions = "-#%&amp;+,./=?@\\_~\183:"
--             , showMenu = True
--             , showTabBar = ShowTabBarIfNeeded
--             , cursorBlinkMode = CursorBlinkModeOn
--             }
--     in defaultConfigOptions == defConfOpt
--   :}
--   True
--   </pre>
defaultConfigOptions :: ConfigOptions

-- | Hooks into certain termonad operations and VTE events. Used to modify
--   termonad's behaviour in order to implement new functionality. Fields
--   should have sane <tt>Semigroup</tt> and <tt>Monoid</tt> instances so
--   that config extensions can be combined uniformly and new hooks can be
--   added without incident.
data ConfigHooks
ConfigHooks :: (TMState -> Terminal -> IO ()) -> ConfigHooks

-- | Produce an IO action to run on creation of new <tt>Terminal</tt>,
--   given <tt>TMState</tt> and the <tt>Terminal</tt> in question.
[createTermHook] :: ConfigHooks -> TMState -> Terminal -> IO ()

-- | Default values for the <a>ConfigHooks</a>.
--   
--   <ul>
--   <li>The default function for <a>createTermHook</a> is
--   <a>defaultCreateTermHook</a>.</li>
--   </ul>
defaultConfigHooks :: ConfigHooks

-- | The font size for the Termonad terminal. There are two ways to set the
--   fontsize, corresponding to the two different ways to set the font size
--   in the Pango font rendering library.
--   
--   If you're not sure which to use, try <a>FontSizePoints</a> first and
--   see how it looks. It should generally correspond to font sizes you are
--   used to from other applications.
data FontSize

-- | This sets the font size based on "points". The conversion between a
--   point and an actual size depends on the system configuration and the
--   output device. The function <a>fontDescriptionSetSize</a> is used to
--   set the font size. See the documentation for that function for more
--   info.
FontSizePoints :: Int -> FontSize

-- | This sets the font size based on "device units". In general, this can
--   be thought of as one pixel. The function
--   <a>fontDescriptionSetAbsoluteSize</a> is used to set the font size.
--   See the documentation for that function for more info.
FontSizeUnits :: Double -> FontSize

-- | The default <a>FontSize</a> used if not specified.
--   
--   <pre>
--   &gt;&gt;&gt; defaultFontSize
--   FontSizePoints 12
--   </pre>
defaultFontSize :: FontSize

-- | Settings for the font to be used in Termonad.
data FontConfig
FontConfig :: !Text -> !FontSize -> FontConfig

-- | The font family to use. Example: <tt>"DejaVu Sans Mono"</tt> or
--   <tt>"Source Code Pro"</tt>
[fontFamily] :: FontConfig -> !Text

-- | The font size.
[fontSize] :: FontConfig -> !FontSize

-- | The default <a>FontConfig</a> to use if not specified.
--   
--   <pre>
--   &gt;&gt;&gt; defaultFontConfig == FontConfig {fontFamily = "Monospace", fontSize = defaultFontSize}
--   True
--   </pre>
defaultFontConfig :: FontConfig

-- | This data type represents an option that can either be <a>Set</a> or
--   <a>Unset</a>.
--   
--   This data type is used in situations where leaving an option unset
--   results in a special state that is not representable by setting any
--   specific value.
--   
--   Examples of this include the <tt>cursorFgColour</tt> and
--   <tt>cursorBgColour</tt> options supplied by the <tt>ColourConfig</tt>
--   <tt>ConfigExtension</tt>. By default, <tt>cursorFgColour</tt> and
--   <tt>cursorBgColour</tt> are both <a>Unset</a>. However, when
--   <tt>cursorBgColour</tt> is <a>Set</a>, <tt>cursorFgColour</tt>
--   defaults to the color of the text underneath. There is no way to
--   represent this by setting <tt>cursorFgColour</tt>.
data Option a
Unset :: Option a
Set :: !a -> Option a

-- | Whether or not to show the scroll bar in a terminal.
data ShowScrollbar

-- | Never show the scroll bar, even if there are too many lines on the
--   terminal to show all at once. You should still be able to scroll with
--   the mouse wheel.
ShowScrollbarNever :: ShowScrollbar

-- | Always show the scrollbar, even if it is not needed.
ShowScrollbarAlways :: ShowScrollbar

-- | Only show the scrollbar if there are too many lines on the terminal to
--   show all at once.
ShowScrollbarIfNeeded :: ShowScrollbar

-- | Whether or not to show the tab bar for switching tabs.
data ShowTabBar

-- | Never show the tab bar, even if there are multiple tabs open. This may
--   be confusing if you plan on using multiple tabs.
ShowTabBarNever :: ShowTabBar

-- | Always show the tab bar, even if you only have one tab open.
ShowTabBarAlways :: ShowTabBar

-- | Only show the tab bar if you have multiple tabs open.
ShowTabBarIfNeeded :: ShowTabBar

-- | An enumerated type which can be used to indicate the cursor blink mode
--   for the terminal.
data CursorBlinkMode

-- | Follow GTK+ settings for cursor blinking.
CursorBlinkModeSystem :: CursorBlinkMode

-- | Cursor blinks.
CursorBlinkModeOn :: CursorBlinkMode

-- | Cursor does not blink.
CursorBlinkModeOff :: CursorBlinkMode

-- | Catch-all for unknown values
AnotherCursorBlinkMode :: Int -> CursorBlinkMode

-- | Read the configuration for the preferences file
--   <tt>~/.config/termonad/termonad.yaml</tt>. This file stores only the
--   <a>options</a> of <a>TMConfig</a> so <a>hooks</a> are initialized with
--   <a>defaultConfigHooks</a>. If the file doesn't exist, create it with
--   the default values.
tmConfigFromPreferencesFile :: IO TMConfig

module Termonad.XML
interfaceDoc :: Document
interfaceText :: Text
menuDoc :: Document
menuText :: Text
aboutDoc :: Document
aboutText :: Text
closeTabDoc :: Document
closeTabText :: Text
preferencesText :: Text

module Termonad.App
setupScreenStyle :: IO ()
createFontDescFromConfig :: TMConfig -> IO FontDescription
createFontDesc :: FontSize -> Text -> IO FontDescription
setFontDescSize :: FontDescription -> FontSize -> IO ()
adjustFontDescSize :: (FontSize -> FontSize) -> FontDescription -> IO ()
modifyFontSizeForAllTerms :: (FontSize -> FontSize) -> TMState -> IO ()
fontSizeFromFontDescription :: FontDescription -> IO FontSize
fontConfigFromFontDescription :: FontDescription -> IO (Maybe FontConfig)
compareScrolledWinAndTab :: ScrolledWindow -> TMNotebookTab -> Bool
updateFLTabPos :: TMState -> Int -> Int -> IO ()

-- | Try to figure out whether Termonad should exit. This also used to
--   figure out if Termonad should close a given terminal.
--   
--   This reads the <tt>confirmExit</tt> setting from
--   <tt>ConfigOptions</tt> to check whether the user wants to be notified
--   when either Termonad or a given terminal is about to be closed.
--   
--   If <tt>confirmExit</tt> is <a>True</a>, then a dialog is presented to
--   the user asking them if they really want to exit or close the
--   terminal. Their response is sent back as a <a>ResponseType</a>.
--   
--   If <tt>confirmExit</tt> is <a>False</a>, then this function always
--   returns <a>ResponseTypeYes</a>.
askShouldExit :: TMState -> IO ResponseType

-- | Force Termonad to exit without asking the user whether or not to do
--   so.
forceQuit :: TMState -> IO ()
setupTermonad :: TMConfig -> Application -> ApplicationWindow -> Builder -> IO ()
appActivate :: TMConfig -> Application -> IO ()
showAboutDialog :: Application -> IO ()
showFindDialog :: Application -> IO (Maybe Text)
doFind :: TMState -> IO ()
findAbove :: TMState -> IO ()
findBelow :: TMState -> IO ()
setShowMenuBar :: Application -> Bool -> IO ()

-- | Fill a combo box with ids and labels
--   
--   The ids are stored in the combobox as <a>Text</a>, so their type
--   should be an instance of the <a>Show</a> type class.
comboBoxFill :: forall a. Show a => ComboBoxText -> [(a, Text)] -> IO ()

-- | Set the current active item in a combobox given an input id.
comboBoxSetActive :: Show a => ComboBoxText -> a -> IO ()

-- | Get the current active item in a combobox
--   
--   The list of values to be searched in the combobox must be given as a
--   parameter. These values are converted to Text then compared to the
--   current id.
comboBoxGetActive :: forall a. (Show a, Enum a) => ComboBoxText -> [a] -> IO (Maybe a)
applyNewPreferences :: TMState -> IO ()
applyNewPreferencesToTab :: TMState -> TMNotebookTab -> IO ()

-- | Show the preferences dialog.
--   
--   When the user clicks on the Ok button, it copies the new settings to
--   TMState. Then apply them to the current terminals.
showPreferencesDialog :: TMState -> IO ()
appStartup :: Application -> IO ()

-- | Run Termonad with the given <a>TMConfig</a>.
--   
--   Do not perform any of the recompilation operations that the
--   <a>defaultMain</a> function does.
start :: TMConfig -> IO ()

-- | Run Termonad with the given <a>TMConfig</a>.
--   
--   This function will check if there is a
--   <tt>~/.config/termonad/termonad.hs</tt> file and a
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary. Termonad will
--   perform different actions based on whether or not these two files
--   exist.
--   
--   Here are the four different possible actions based on the existence of
--   these two files.
--   
--   <ul>
--   <li><tt>~/.config/termonad/termonad.hs</tt> exists,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> existsThe timestamps
--   of these two files are checked. If the
--   <tt>~/.config/termonad/termonad.hs</tt> file has been modified after
--   the <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary, then
--   Termonad will use GHC to recompile the
--   <tt>~/.config/termonad/termonad.hs</tt> file, producing a new binary
--   at <tt>~/.cache/termonad/termonad-linux-x86_64</tt>. This new binary
--   will be re-executed. The <a>TMConfig</a> passed to this
--   <a>defaultMain</a> will be effectively thrown away.If GHC fails to
--   recompile the <tt>~/.config/termonad/termonad.hs</tt> file, then
--   Termonad will just execute <a>start</a> with the <a>TMConfig</a>
--   passed in.If the <tt>~/.cache/termonad/termonad-linux-x86_64</tt>
--   binary has been modified after the
--   <tt>~/.config/termonad/termonad.hs</tt> file, then Termonad will
--   re-exec the <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary.
--   The <a>TMConfig</a> passed to this <a>defaultMain</a> will be
--   effectively thrown away.</li>
--   <li><tt>~/.config/termonad/termonad.hs</tt> exists,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> does not
--   existTermonad will use GHC to recompile the
--   <tt>~/.config/termonad/termonad.hs</tt> file, producing a new binary
--   at <tt>~/.cache/termonad/termonad-linux-x86_64</tt>. This new binary
--   will be re-executed. The <a>TMConfig</a> passed to this
--   <a>defaultMain</a> will be effectively thrown away.If GHC fails to
--   recompile the <tt>~/.config/termonad/termonad.hs</tt> file, then
--   Termonad will just execute <a>start</a> with the <a>TMConfig</a>
--   passed in.</li>
--   <li><tt>~/.config/termonad/termonad.hs</tt> does not exist,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> existsTermonad will
--   ignore the <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary and
--   just run <a>start</a> with the <a>TMConfig</a> passed to this
--   function.</li>
--   <li><tt>~/.config/termonad/termonad.hs</tt> does not exist,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> does not
--   existTermonad will run <a>start</a> with the <a>TMConfig</a> passed to
--   this function.</li>
--   </ul>
--   
--   Other notes:
--   
--   <ol>
--   <li>That the locations of <tt>~/.config/termonad/termonad.hs</tt> and
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> may differ depending
--   on your system.</li>
--   <li>In your own <tt>~/.config/termonad/termonad.hs</tt> file, you can
--   use either <a>defaultMain</a> or <a>start</a>. As long as you always
--   execute the system-wide <tt>termonad</tt> binary (instead of the
--   binary produced as <tt>~/.cache/termonad/termonad-linux-x86_64</tt>),
--   the effect should be the same.</li>
--   </ol>
defaultMain :: TMConfig -> IO ()


-- | This module exposes termonad's basic configuration options, as well as
--   <a>defaultMain</a>.
--   
--   If you want to configure Termonad, please take a look at
--   <a>Termonad.Config</a>.
module Termonad

-- | Run Termonad with the given <a>TMConfig</a>.
--   
--   This function will check if there is a
--   <tt>~/.config/termonad/termonad.hs</tt> file and a
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary. Termonad will
--   perform different actions based on whether or not these two files
--   exist.
--   
--   Here are the four different possible actions based on the existence of
--   these two files.
--   
--   <ul>
--   <li><tt>~/.config/termonad/termonad.hs</tt> exists,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> existsThe timestamps
--   of these two files are checked. If the
--   <tt>~/.config/termonad/termonad.hs</tt> file has been modified after
--   the <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary, then
--   Termonad will use GHC to recompile the
--   <tt>~/.config/termonad/termonad.hs</tt> file, producing a new binary
--   at <tt>~/.cache/termonad/termonad-linux-x86_64</tt>. This new binary
--   will be re-executed. The <a>TMConfig</a> passed to this
--   <a>defaultMain</a> will be effectively thrown away.If GHC fails to
--   recompile the <tt>~/.config/termonad/termonad.hs</tt> file, then
--   Termonad will just execute <a>start</a> with the <a>TMConfig</a>
--   passed in.If the <tt>~/.cache/termonad/termonad-linux-x86_64</tt>
--   binary has been modified after the
--   <tt>~/.config/termonad/termonad.hs</tt> file, then Termonad will
--   re-exec the <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary.
--   The <a>TMConfig</a> passed to this <a>defaultMain</a> will be
--   effectively thrown away.</li>
--   <li><tt>~/.config/termonad/termonad.hs</tt> exists,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> does not
--   existTermonad will use GHC to recompile the
--   <tt>~/.config/termonad/termonad.hs</tt> file, producing a new binary
--   at <tt>~/.cache/termonad/termonad-linux-x86_64</tt>. This new binary
--   will be re-executed. The <a>TMConfig</a> passed to this
--   <a>defaultMain</a> will be effectively thrown away.If GHC fails to
--   recompile the <tt>~/.config/termonad/termonad.hs</tt> file, then
--   Termonad will just execute <a>start</a> with the <a>TMConfig</a>
--   passed in.</li>
--   <li><tt>~/.config/termonad/termonad.hs</tt> does not exist,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> existsTermonad will
--   ignore the <tt>~/.cache/termonad/termonad-linux-x86_64</tt> binary and
--   just run <a>start</a> with the <a>TMConfig</a> passed to this
--   function.</li>
--   <li><tt>~/.config/termonad/termonad.hs</tt> does not exist,
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> does not
--   existTermonad will run <a>start</a> with the <a>TMConfig</a> passed to
--   this function.</li>
--   </ul>
--   
--   Other notes:
--   
--   <ol>
--   <li>That the locations of <tt>~/.config/termonad/termonad.hs</tt> and
--   <tt>~/.cache/termonad/termonad-linux-x86_64</tt> may differ depending
--   on your system.</li>
--   <li>In your own <tt>~/.config/termonad/termonad.hs</tt> file, you can
--   use either <a>defaultMain</a> or <a>start</a>. As long as you always
--   execute the system-wide <tt>termonad</tt> binary (instead of the
--   binary produced as <tt>~/.cache/termonad/termonad-linux-x86_64</tt>),
--   the effect should be the same.</li>
--   </ol>
defaultMain :: TMConfig -> IO ()

-- | Run Termonad with the given <a>TMConfig</a>.
--   
--   Do not perform any of the recompilation operations that the
--   <a>defaultMain</a> function does.
start :: TMConfig -> IO ()
