-- 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_6989586621679077125 :: 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
newChan :: MonadIO m => m (Chan a)
writeChan :: MonadIO m => Chan a -> a -> m ()
readChan :: MonadIO m => Chan a -> m a
dupChan :: MonadIO m => Chan a -> m (Chan a)
getChanContents :: MonadIO m => Chan a -> m [a]
writeList2Chan :: MonadIO m => Chan a -> [a] -> m ()
data STM a
data StringException
StringException :: String -> CallStack -> StringException
data AsyncExceptionWrapper
AsyncExceptionWrapper :: e -> AsyncExceptionWrapper
data SyncExceptionWrapper
SyncExceptionWrapper :: e -> SyncExceptionWrapper
data Handler (m :: Type -> Type) a
Handler :: (e -> m a) -> Handler (m :: Type -> Type) a
catch :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a
catchIO :: MonadUnliftIO m => m a -> (IOException -> m a) -> m a
catchAny :: MonadUnliftIO m => m a -> (SomeException -> m a) -> m a
catchDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> (e -> m a) -> m a
catchAnyDeep :: (NFData a, MonadUnliftIO m) => m a -> (SomeException -> m a) -> m a
catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a
handle :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a
handleIO :: MonadUnliftIO m => (IOException -> m a) -> m a -> m a
handleAny :: MonadUnliftIO m => (SomeException -> m a) -> m a -> m a
handleDeep :: (MonadUnliftIO m, Exception e, NFData a) => (e -> m a) -> m a -> m a
handleAnyDeep :: (MonadUnliftIO m, NFData a) => (SomeException -> m a) -> m a -> m a
handleJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a
try :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a)
tryIO :: MonadUnliftIO m => m a -> m (Either IOException a)
tryAny :: MonadUnliftIO m => m a -> m (Either SomeException a)
tryDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> m (Either e a)
tryAnyDeep :: (MonadUnliftIO m, NFData a) => m a -> m (Either SomeException a)
tryJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)
pureTry :: a -> Either SomeException a
pureTryDeep :: NFData a => a -> Either SomeException 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
bracket :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
bracket_ :: MonadUnliftIO m => m a -> m b -> 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
finally :: MonadUnliftIO m => m a -> m b -> m a
withException :: (MonadUnliftIO m, Exception e) => m a -> (e -> m b) -> m a
onException :: MonadUnliftIO m => m a -> m b -> m a
throwIO :: (MonadIO m, Exception e) => e -> m a
toSyncException :: Exception e => e -> SomeException
toAsyncException :: Exception e => e -> SomeException
isSyncException :: Exception e => e -> Bool
isAsyncException :: Exception e => e -> Bool
mask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
uninterruptibleMask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
mask_ :: MonadUnliftIO m => m a -> m a
uninterruptibleMask_ :: MonadUnliftIO m => m a -> m a
throwString :: (MonadIO m, HasCallStack) => String -> m a
stringException :: HasCallStack => String -> StringException
throwTo :: (Exception e, MonadIO m) => ThreadId -> e -> m ()
impureThrow :: Exception e => e -> 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
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
withFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
withBinaryFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
hClose :: MonadIO m => Handle -> m ()
hFlush :: MonadIO m => Handle -> m ()
hFileSize :: MonadIO m => Handle -> m Integer
hSetFileSize :: MonadIO m => Handle -> Integer -> m ()
hIsEOF :: MonadIO m => Handle -> m Bool
hSetBuffering :: MonadIO m => Handle -> BufferMode -> m ()
hGetBuffering :: MonadIO m => Handle -> m BufferMode
hSeek :: MonadIO m => Handle -> SeekMode -> Integer -> m ()
hTell :: MonadIO m => Handle -> m Integer
hIsOpen :: MonadIO m => Handle -> m Bool
hIsClosed :: MonadIO m => Handle -> m Bool
hIsReadable :: MonadIO m => Handle -> m Bool
hIsWritable :: MonadIO m => Handle -> m Bool
hIsSeekable :: MonadIO m => Handle -> m Bool
hIsTerminalDevice :: MonadIO m => Handle -> m Bool
hSetEcho :: MonadIO m => Handle -> Bool -> m ()
hGetEcho :: MonadIO m => Handle -> m Bool
hWaitForInput :: MonadIO m => Handle -> Int -> m Bool
hReady :: MonadIO m => Handle -> m Bool
getMonotonicTime :: MonadIO m => m Double
newIORef :: MonadIO m => a -> m (IORef a)
readIORef :: MonadIO m => IORef a -> m a
writeIORef :: MonadIO m => IORef a -> a -> m ()
modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m ()
modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m ()
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))
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
data ConcException
EmptyWithNoAlternative :: ConcException
data Conc (m :: Type -> Type) a
newtype Concurrently (m :: Type -> Type) a
Concurrently :: m a -> Concurrently (m :: Type -> Type) a
[runConcurrently] :: Concurrently (m :: Type -> Type) a -> m a
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)
asyncWithUnmask :: MonadUnliftIO m => ((forall b. () => m b -> m b) -> m a) -> m (Async a)
asyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall b. () => m b -> m b) -> m a) -> m (Async a)
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
withAsyncWithUnmask :: MonadUnliftIO m => ((forall c. () => m c -> m c) -> 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
wait :: MonadIO m => Async a -> m a
poll :: MonadIO m => Async a -> m (Maybe (Either SomeException a))
waitCatch :: MonadIO m => Async a -> m (Either SomeException a)
cancel :: MonadIO m => Async a -> m ()
uninterruptibleCancel :: MonadIO m => Async a -> m ()
cancelWith :: (Exception e, MonadIO m) => Async a -> e -> m ()
waitAny :: MonadIO m => [Async a] -> m (Async a, a)
waitAnyCatch :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
waitAnyCancel :: MonadIO m => [Async a] -> m (Async a, a)
waitAnyCatchCancel :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
waitEither :: 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))
waitEitherCancel :: MonadIO m => Async a -> Async b -> m (Either a b)
waitEitherCatchCancel :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
waitEither_ :: MonadIO m => Async a -> Async b -> m ()
waitBoth :: MonadIO m => Async a -> Async b -> m (a, b)
link :: MonadIO m => Async a -> m ()
link2 :: MonadIO m => Async a -> Async b -> m ()
race :: MonadUnliftIO m => m a -> m b -> m (Either a b)
race_ :: MonadUnliftIO m => m a -> m b -> m ()
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 ()
replicateConcurrently :: MonadUnliftIO m => Int -> m b -> m [b]
replicateConcurrently_ :: (Applicative m, MonadUnliftIO m) => Int -> m a -> 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 ()
conc :: m a -> Conc m a
runConc :: MonadUnliftIO m => Conc m a -> m a
pooledMapConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> (a -> m b) -> t a -> m (t b)
pooledMapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
pooledForConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> t a -> (a -> m b) -> m (t b)
pooledForConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> 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 ()
pooledForConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
pooledForConcurrentlyN_ :: (MonadUnliftIO m, Foldable t) => Int -> t a -> (a -> m b) -> m ()
pooledReplicateConcurrentlyN :: MonadUnliftIO m => Int -> Int -> m a -> m [a]
pooledReplicateConcurrently :: MonadUnliftIO m => Int -> m a -> m [a]
pooledReplicateConcurrentlyN_ :: MonadUnliftIO m => Int -> Int -> m a -> m ()
pooledReplicateConcurrently_ :: MonadUnliftIO m => Int -> m a -> m ()
newEmptyMVar :: MonadIO m => m (MVar a)
newMVar :: MonadIO m => a -> m (MVar a)
takeMVar :: MonadIO m => MVar a -> m a
putMVar :: MonadIO m => MVar a -> a -> m ()
readMVar :: MonadIO m => MVar a -> m a
swapMVar :: MonadIO m => MVar a -> a -> m a
tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a)
tryPutMVar :: MonadIO m => MVar a -> a -> m Bool
isEmptyMVar :: MonadIO m => MVar a -> m Bool
tryReadMVar :: 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
modifyMVar_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
modifyMVar :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
modifyMVarMasked_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
modifyMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
mkWeakMVar :: MonadUnliftIO m => MVar a -> m () -> m (Weak (MVar a))
data Memoized a
runMemoized :: MonadIO m => Memoized a -> m a
memoizeRef :: MonadUnliftIO m => m a -> m (Memoized a)
memoizeMVar :: MonadUnliftIO m => m a -> m (Memoized a)
atomically :: MonadIO m => STM a -> m a
retrySTM :: STM a
checkSTM :: Bool -> STM ()
newTVarIO :: MonadIO m => a -> m (TVar a)
readTVarIO :: MonadIO m => TVar a -> m a
registerDelay :: MonadIO m => Int -> m (TVar Bool)
mkWeakTVar :: MonadUnliftIO m => TVar a -> m () -> m (Weak (TVar a))
newTMVarIO :: MonadIO m => a -> m (TMVar a)
newEmptyTMVarIO :: MonadIO m => m (TMVar a)
mkWeakTMVar :: MonadUnliftIO m => TMVar a -> m () -> m (Weak (TMVar a))
newTChanIO :: MonadIO m => m (TChan a)
newBroadcastTChanIO :: MonadIO m => m (TChan a)
newTQueueIO :: MonadIO m => m (TQueue a)
newTBQueueIO :: MonadIO m => Natural -> m (TBQueue a)
withSystemTempFile :: MonadUnliftIO m => String -> (FilePath -> Handle -> m a) -> m a
withSystemTempDirectory :: MonadUnliftIO m => String -> (FilePath -> m a) -> m a
withTempFile :: MonadUnliftIO m => FilePath -> String -> (FilePath -> Handle -> m a) -> m a
withTempDirectory :: MonadUnliftIO m => FilePath -> String -> (FilePath -> m a) -> m a
timeout :: MonadUnliftIO m => Int -> m a -> m (Maybe 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)
say :: MonadIO m => Text -> m ()
sayString :: MonadIO m => String -> m ()
sayShow :: (MonadIO m, Show a) => a -> m ()
sayErr :: MonadIO m => Text -> m ()
sayErrString :: MonadIO m => String -> m ()
sayErrShow :: (MonadIO m, Show a) => a -> m ()
hSay :: MonadIO m => Handle -> Text -> m ()
hSayString :: MonadIO m => Handle -> String -> m ()
hSayShow :: (MonadIO m, Show a) => Handle -> a -> m ()
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
type MutableDeque c = (MutableQueue c, MutablePushFront c, MutablePopBack c)
type MutableStack c = (MutablePopFront c, MutablePushFront c)
type MutableQueue c = (MutablePopFront c, MutablePushBack c)
class MutableCollection c => MutablePushBack c
pushBack :: (MutablePushBack c, PrimMonad m, PrimState m ~ MCState c) => c -> CollElement c -> m ()
class MutableCollection c => MutablePopBack c
popBack :: (MutablePopBack c, PrimMonad m, PrimState m ~ MCState c) => c -> m (Maybe (CollElement c))
class MutableCollection c => MutablePushFront c
pushFront :: (MutablePushFront c, PrimMonad m, PrimState m ~ MCState c) => c -> CollElement c -> m ()
class MutableCollection c => MutablePopFront c
popFront :: (MutablePopFront c, PrimMonad m, PrimState m ~ MCState c) => c -> m (Maybe (CollElement c))
class MutableContainer c => MutableCollection c where {
    type family CollElement c;
}
newColl :: (MutableCollection c, PrimMonad m, PrimState m ~ MCState c) => m c
type family CollElement 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 => 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
class MutableContainer c where {
    type family MCState c;
}
type family MCState c
asIORef :: IORef a -> IORef a
asSTRef :: STRef s a -> STRef s a
asMutVar :: MutVar s a -> MutVar s a
type IOBRef = BRef PrimState IO
data BRef s a
asBRef :: BRef s a -> BRef s a
data DLList s a
asDLList :: DLList s a -> DLList s a
type BDeque = Deque MVector
type SDeque = Deque MVector
type UDeque = Deque MVector
data Deque (v :: Type -> Type -> Type) s a
asUDeque :: UDeque s a -> UDeque s a
asSDeque :: SDeque s a -> SDeque s a
asBDeque :: BDeque s a -> BDeque s a
type IOPRef = PRef PrimState IO
data PRef s a
asPRef :: PRef s a -> PRef s a
type IOSRef = SRef PrimState IO
data SRef s a
asSRef :: SRef s a -> SRef s a
type IOURef = URef PrimState IO
data URef s a
asURef :: URef s a -> URef s a

-- | Provides a <a>Foldable</a> for an arbitrary <a>MonoFoldable</a>.
data WrappedMono mono a
[WrappedMono] :: forall mono a. Element mono ~ a => mono -> WrappedMono mono a

-- | Provides a <a>MonoFoldable</a>, <a>MonoFunctor</a> or
--   <a>MonoPointed</a> for an arbitrary <a>Foldable</a>, <a>Functor</a> or
--   <a>Applicative</a>.
--   
--   Useful for, e.g., passing a <a>Foldable</a> type you don't own into a
--   function that expects a <a>MonoFoldable</a>.
--   
--   <pre>
--   // package A
--   data MyList a = MyList [a] deriving Foldable
--   
--   // package B
--   process :: MonoFoldable mono =&gt; mono -&gt; IO ()
--   
--   // package C
--   process (WrappedPoly (MyList []))
--   </pre>
newtype WrappedPoly (f :: Type -> Type) a
WrappedPoly :: f a -> WrappedPoly (f :: Type -> Type) a
[unwrapPoly] :: WrappedPoly (f :: Type -> Type) a -> f a

-- | Containers which, when two values are combined, the combined length is
--   no less than the larger of the two inputs. In code:
--   
--   <pre>
--   olength (x &lt;&gt; y) &gt;= max (olength x) (olength y)
--   </pre>
--   
--   This class has no methods, and is simply used to assert that this law
--   holds, in order to provide guarantees of correctness (see, for
--   instance, <a>Data.NonNull</a>).
--   
--   This should have a <tt>Semigroup</tt> superclass constraint, however,
--   due to <tt>Semigroup</tt> only recently moving to base, some packages
--   do not provide instances.
class MonoFoldable mono => GrowingAppend mono

-- | Typeclass for monomorphic containers where it is always okay to
--   "extract" a value from with <a>oextract</a>, and where you can
--   extrapolate any "extracting" function to be a function on the whole
--   part with <a>oextend</a>.
--   
--   <a>oextend</a> and <a>oextract</a> should work together following the
--   laws:
--   
--   <pre>
--   <a>oextend</a> <a>oextract</a>      = <a>id</a>
--   <a>oextract</a> . <a>oextend</a> f  = f
--   <a>oextend</a> f . <a>oextend</a> g = <a>oextend</a> (f . <a>oextend</a> g)
--   </pre>
--   
--   As an intuition, <tt><a>oextend</a> f</tt> uses <tt>f</tt> to "build
--   up" a new <tt>mono</tt> with pieces from the old one received by
--   <tt>f</tt>.
class MonoFunctor mono => MonoComonad mono

-- | Extract an element from <tt>mono</tt>. Can be thought of as a dual
--   concept to <tt>opoint</tt>.
oextract :: MonoComonad mono => mono -> Element mono

-- | <a>Extend</a> a <tt>mono -&gt; <a>Element</a> mono</tt> function to be
--   a <tt>mono -&gt; mono</tt>; that is, builds a new <tt>mono</tt> from
--   the old one by using pieces glimpsed from the given function.
oextend :: MonoComonad mono => (mono -> Element mono) -> mono -> mono

-- | Typeclass for monomorphic containers that an element can be lifted
--   into.
--   
--   For any <a>MonoFunctor</a>, the following law holds:
--   
--   <pre>
--   <a>omap</a> f . <a>opoint</a> = <a>opoint</a> . f
--   </pre>
class MonoPointed mono

-- | Lift an element into a monomorphic container.
--   
--   <a>opoint</a> is the same as <a>pure</a> for an <a>Applicative</a>
opoint :: MonoPointed mono => Element mono -> mono

-- | Monomorphic containers that can be traversed from left to right.
--   
--   NOTE: Due to limitations with the role system, GHC is yet unable to
--   provide newtype-derivation of <a>MonoTraversable</a>. See
--   <a>https://stackoverflow.com/questions/49776924/newtype-deriving-issequence</a>.
class (MonoFunctor mono, MonoFoldable mono) => MonoTraversable mono

-- | Map each element of a monomorphic container to an action, evaluate
--   these actions from left to right, and collect the results.
otraverse :: (MonoTraversable mono, Applicative f) => (Element mono -> f (Element mono)) -> mono -> f mono

-- | Map each element of a monomorphic container to a monadic action,
--   evaluate these actions from left to right, and collect the results.
omapM :: (MonoTraversable mono, Applicative m) => (Element mono -> m (Element mono)) -> mono -> m mono

-- | Monomorphic containers that can be folded.
class MonoFoldable mono

-- | Map each element of a monomorphic container to a <a>Monoid</a> and
--   combine the results.
ofoldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m

-- | Right-associative fold of a monomorphic container.
ofoldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b

-- | Strict left-associative fold of a monomorphic container.
ofoldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a

-- | Convert a monomorphic container to a list.
otoList :: MonoFoldable mono => mono -> [Element mono]

-- | Are <b>all</b> of the elements in a monomorphic container converted to
--   booleans <a>True</a>?
oall :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool

-- | Are <b>any</b> of the elements in a monomorphic container converted to
--   booleans <a>True</a>?
oany :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool

-- | Is the monomorphic container empty?
onull :: MonoFoldable mono => mono -> Bool

-- | Length of a monomorphic container, returns a <a>Int</a>.
olength :: MonoFoldable mono => mono -> Int

-- | Length of a monomorphic container, returns a <a>Int64</a>.
olength64 :: MonoFoldable mono => mono -> Int64

-- | Compare the length of a monomorphic container and a given number.
ocompareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering

-- | Map each element of a monomorphic container to an action, evaluate
--   these actions from left to right, and ignore the results.
otraverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f ()

-- | <a>ofor_</a> is <a>otraverse_</a> with its arguments flipped.
ofor_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f ()

-- | Map each element of a monomorphic container to a monadic action,
--   evaluate these actions from left to right, and ignore the results.
omapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()

-- | <a>oforM_</a> is <a>omapM_</a> with its arguments flipped.
oforM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m ()

-- | Monadic fold over the elements of a monomorphic container, associating
--   to the left.
ofoldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a

-- | Map each element of a monomorphic container to a semigroup, and
--   combine the results.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>ofoldMap1</a> from <a>Data.NonNull</a> for a total version
--   of this function.</i>
ofoldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m

-- | Right-associative fold of a monomorphic container with no base
--   element.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>ofoldr1</a> from <a>Data.NonNull</a> for a total version of
--   this function.</i>
ofoldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono

-- | Strict left-associative fold of a monomorphic container with no base
--   element.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>ofoldl1'</a> from <a>Data.NonNull</a> for a total version of
--   this function.</i>
ofoldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono

-- | Get the first element of a monomorphic container.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>head</a> from <a>Data.NonNull</a> for a total version of
--   this function.</i>
headEx :: MonoFoldable mono => mono -> Element mono

-- | Get the last element of a monomorphic container.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>last</a> from <a>Data.NonNull</a> for a total version of
--   this function.</i>
lastEx :: MonoFoldable mono => mono -> Element mono

-- | Equivalent to <a>headEx</a>.
unsafeHead :: MonoFoldable mono => mono -> Element mono

-- | Equivalent to <a>lastEx</a>.
unsafeLast :: MonoFoldable mono => mono -> Element mono

-- | Get the maximum element of a monomorphic container, using a supplied
--   element ordering function.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>maximiumBy</a> from <a>Data.NonNull</a> for a total version
--   of this function.</i>
maximumByEx :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Element mono

-- | Get the minimum element of a monomorphic container, using a supplied
--   element ordering function.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>minimumBy</a> from <a>Data.NonNull</a> for a total version
--   of this function.</i>
minimumByEx :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Element mono

-- | Checks if the monomorphic container includes the supplied element.
oelem :: MonoFoldable mono => Element mono -> mono -> Bool

-- | Checks if the monomorphic container does not include the supplied
--   element.
onotElem :: MonoFoldable mono => Element mono -> mono -> Bool

-- | Monomorphic containers that can be mapped over.
class MonoFunctor mono

-- | Map over a monomorphic container
omap :: MonoFunctor mono => (Element mono -> Element mono) -> mono -> mono

-- | Type family for getting the type of the elements of a monomorphic
--   container.
type family Element mono

-- | <tt><a>replaceElem</a> old new</tt> replaces all <tt>old</tt> elements
--   with <tt>new</tt>.
replaceElem :: (MonoFunctor mono, Eq (Element mono)) => Element mono -> Element mono -> mono -> mono
replaceElemStrictText :: Char -> Char -> Text -> Text
replaceElemLazyText :: Char -> Char -> Text -> Text

-- | Safe version of <a>headEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
headMay :: MonoFoldable mono => mono -> Maybe (Element mono)

-- | Safe version of <a>lastEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
lastMay :: MonoFoldable mono => mono -> Maybe (Element mono)

-- | <a>osum</a> computes the sum of the numbers of a monomorphic
--   container.
osum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono

-- | <a>oproduct</a> computes the product of the numbers of a monomorphic
--   container.
oproduct :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono

-- | Are <b>all</b> of the elements <a>True</a>?
oand :: (Element mono ~ Bool, MonoFoldable mono) => mono -> Bool

-- | Are <b>any</b> of the elements <a>True</a>?
oor :: (Element mono ~ Bool, MonoFoldable mono) => mono -> Bool

-- | Synonym for <a>ofoldMap</a>
oconcatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m

-- | Monoidally combine all values in the container
ofold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono

-- | Synonym for <a>ofold</a>
oconcat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono

-- | Synonym for <a>ofoldlM</a>
ofoldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a

-- | Perform all actions in the given container
osequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m ()

-- | Get the minimum element of a monomorphic container.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>maximum</a> from <a>Data.NonNull</a> for a total version of
--   this function.</i>
maximumEx :: (MonoFoldable mono, Ord (Element mono)) => mono -> Element mono

-- | Get the maximum element of a monomorphic container.
--   
--   Note: this is a partial function. On an empty <a>MonoFoldable</a>, it
--   will throw an exception.
--   
--   <i>See <a>minimum</a> from <a>Data.NonNull</a> for a total version of
--   this function.</i>
minimumEx :: (MonoFoldable mono, Ord (Element mono)) => mono -> Element mono

-- | Safe version of <a>maximumEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
maximumMay :: (MonoFoldable mono, Ord (Element mono)) => mono -> Maybe (Element mono)

-- | Safe version of <a>maximumByEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
maximumByMay :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Maybe (Element mono)

-- | Safe version of <a>minimumEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
minimumMay :: (MonoFoldable mono, Ord (Element mono)) => mono -> Maybe (Element mono)

-- | Safe version of <a>minimumByEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
minimumByMay :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> mono -> Maybe (Element mono)

-- | <a>ofor</a> is <a>otraverse</a> with its arguments flipped.
ofor :: (MonoTraversable mono, Applicative f) => mono -> (Element mono -> f (Element mono)) -> f mono

-- | <a>oforM</a> is <a>omapM</a> with its arguments flipped.
oforM :: (MonoTraversable mono, Applicative f) => mono -> (Element mono -> f (Element mono)) -> f mono

-- | A strict left fold, together with an unwrap function.
--   
--   This is convenient when the accumulator value is not the same as the
--   final expected type. It is provided mainly for integration with the
--   <tt>foldl</tt> package, to be used in conjunction with
--   <tt>purely</tt>.
ofoldlUnwrap :: MonoFoldable mono => (x -> Element mono -> x) -> x -> (x -> b) -> mono -> b

-- | A monadic strict left fold, together with an unwrap function.
--   
--   Similar to <tt>foldlUnwrap</tt>, but allows monadic actions. To be
--   used with <tt>impurely</tt> from <tt>foldl</tt>.
ofoldMUnwrap :: (Monad m, MonoFoldable mono) => (x -> Element mono -> m x) -> m x -> (x -> m b) -> mono -> m b

-- | <tt>intercalate</tt> <tt>seq seqs</tt> inserts <tt>seq</tt> in between
--   <tt>seqs</tt> and concatenates the result.
ointercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono

-- | Unwraps a <a>WrappedMono</a>.
unwrapMono :: WrappedMono mono a -> mono

-- | Type class for maps whose keys can be converted into sets.
class SetContainer set => HasKeysSet set where {
    
    -- | Type of the key set.
    type family KeySet set;
}

-- | Convert a map into a set of its keys.
keysSet :: HasKeysSet set => set -> KeySet set

-- | Type of the key set.
type family KeySet set

-- | Zip operations on <a>MonoFunctor</a>s.
class MonoFunctor mono => MonoZip mono

-- | Combine each element of two <a>MonoZip</a>s using a supplied function.
ozipWith :: MonoZip mono => (Element mono -> Element mono -> Element mono) -> mono -> mono -> mono

-- | Take two <a>MonoZip</a>s and return a list of the pairs of their
--   elements.
ozip :: MonoZip mono => mono -> mono -> [(Element mono, Element mono)]

-- | Take a list of pairs of elements and return a <a>MonoZip</a> of the
--   first components and a <a>MonoZip</a> of the second components.
ounzip :: MonoZip mono => [(Element mono, Element mono)] -> (mono, mono)

-- | Polymorphic typeclass for interacting with different set types
class (SetContainer set, Element set ~ ContainerKey set) => IsSet set

-- | Insert a value into a set.
insertSet :: IsSet set => Element set -> set -> set

-- | Delete a value from a set.
deleteSet :: IsSet set => Element set -> set -> set

-- | Create a set from a single element.
singletonSet :: IsSet set => Element set -> set

-- | Convert a list to a set.
setFromList :: IsSet set => [Element set] -> set

-- | Convert a set to a list.
setToList :: IsSet set => set -> [Element set]

-- | Filter values in a set.
filterSet :: IsSet set => (Element set -> Bool) -> set -> set

-- | Polymorphic typeclass for interacting with different map types
class (MonoTraversable map, SetContainer map) => IsMap map where {
    
    -- | In some cases, <a>MapValue</a> and <a>Element</a> will be different,
    --   e.g., the <a>IsMap</a> instance of associated lists.
    type family MapValue map;
}

-- | Look up a value in a map with a specified key.
lookup :: IsMap map => ContainerKey map -> map -> Maybe (MapValue map)

-- | Insert a key-value pair into a map.
insertMap :: IsMap map => ContainerKey map -> MapValue map -> map -> map

-- | Delete a key-value pair of a map using a specified key.
deleteMap :: IsMap map => ContainerKey map -> map -> map

-- | Create a map from a single key-value pair.
singletonMap :: IsMap map => ContainerKey map -> MapValue map -> map

-- | Convert a list of key-value pairs to a map
mapFromList :: IsMap map => [(ContainerKey map, MapValue map)] -> map

-- | Convert a map to a list of key-value pairs.
mapToList :: IsMap map => map -> [(ContainerKey map, MapValue map)]

-- | Like <a>lookup</a>, but uses a default value when the key does not
--   exist in the map.
findWithDefault :: IsMap map => MapValue map -> ContainerKey map -> map -> MapValue map

-- | Insert a key-value pair into a map.
--   
--   Inserts the value directly if the key does not exist in the map.
--   Otherwise, apply a supplied function that accepts the new value and
--   the previous value and insert that result into the map.
insertWith :: IsMap map => (MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map

-- | Insert a key-value pair into a map.
--   
--   Inserts the value directly if the key does not exist in the map.
--   Otherwise, apply a supplied function that accepts the key, the new
--   value, and the previous value and insert that result into the map.
insertWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map

-- | Insert a key-value pair into a map, return the previous key's value if
--   it existed.
--   
--   Inserts the value directly if the key does not exist in the map.
--   Otherwise, apply a supplied function that accepts the key, the new
--   value, and the previous value and insert that result into the map.
insertLookupWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> (Maybe (MapValue map), map)

-- | Apply a function to the value of a given key.
--   
--   Returns the input map when the key-value pair does not exist.
adjustMap :: IsMap map => (MapValue map -> MapValue map) -> ContainerKey map -> map -> map

-- | Equivalent to <a>adjustMap</a>, but the function accepts the key, as
--   well as the previous value.
adjustWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map) -> ContainerKey map -> map -> map

-- | Apply a function to the value of a given key.
--   
--   If the function returns <a>Nothing</a>, this deletes the key-value
--   pair.
--   
--   Returns the input map when the key-value pair does not exist.
updateMap :: IsMap map => (MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map

-- | Equivalent to <a>updateMap</a>, but the function accepts the key, as
--   well as the previous value.
updateWithKey :: IsMap map => (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map

-- | Apply a function to the value of a given key.
--   
--   If the map does not contain the key this returns <a>Nothing</a> and
--   the input map.
--   
--   If the map does contain the key but the function returns
--   <a>Nothing</a>, this returns the previous value and the map with the
--   key-value pair removed.
--   
--   If the map contains the key and the function returns a value, this
--   returns the new value and the map with the key-value pair with the new
--   value.
updateLookupWithKey :: IsMap map => (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> (Maybe (MapValue map), map)

-- | Update/Delete the value of a given key.
--   
--   Applies a function to previous value of a given key, if it results in
--   <a>Nothing</a> delete the key-value pair from the map, otherwise
--   replace the previous value with the new value.
alterMap :: IsMap map => (Maybe (MapValue map) -> Maybe (MapValue map)) -> ContainerKey map -> map -> map

-- | Combine two maps.
--   
--   When a key exists in both maps, apply a function to both of the values
--   and use the result of that as the value of the key in the resulting
--   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

-- | Combine a list of maps.
--   
--   When a key exists in two different maps, apply a function to both of
--   the values and use the result of that as the value of the key in the
--   resulting map.
unionsWith :: IsMap map => (MapValue map -> MapValue map -> MapValue map) -> [map] -> map

-- | Apply a function over every key-value pair of a map.
mapWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map) -> map -> map

-- | Apply a function over every key of a pair and run <a>unionsWith</a>
--   over the results.
omapKeysWith :: IsMap map => (MapValue map -> MapValue map -> MapValue map) -> (ContainerKey map -> ContainerKey map) -> map -> map

-- | Filter values in a map.
filterMap :: IsMap map => (MapValue map -> Bool) -> map -> map

-- | In some cases, <a>MapValue</a> and <a>Element</a> will be different,
--   e.g., the <a>IsMap</a> instance of associated lists.
type family MapValue map

-- | A <tt>Map</tt> type polymorphic in both its key and value.
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 BPMKeyConstraint (map :: Type -> Type -> Type) key

-- | A guaranteed-polymorphic <tt>Map</tt>, which allows for more
--   polymorphic versions of functions.
class PolyMap (map :: Type -> Type)

-- | Get the difference between two maps, using the left map's values.
differenceMap :: PolyMap map => map value1 -> map value2 -> map value1

-- | Get the intersection of two maps, using the left map's values.
intersectionMap :: PolyMap map => map value1 -> map value2 -> map value1

-- | Get the intersection of two maps with a supplied function that takes
--   in the left map's value and the right map's value.
intersectionWithMap :: PolyMap map => (value1 -> value2 -> value3) -> map value1 -> map value2 -> map value3

-- | A container whose values are stored in Key-Value pairs.
class (Monoid set, Semigroup set, MonoFoldable set, Eq ContainerKey set, GrowingAppend set) => SetContainer set where {
    
    -- | The type of the key
    type family ContainerKey set;
}

-- | Check if there is a value with the supplied key in the container.
member :: SetContainer set => ContainerKey set -> set -> Bool

-- | Check if there isn't a value with the supplied key in the container.
notMember :: SetContainer set => ContainerKey set -> set -> Bool

-- | Get the union of two containers.
union :: SetContainer set => set -> set -> set

-- | Combine a collection of <tt>SetContainer</tt>s, with left-most values
--   overriding when there are matching keys.
unions :: (SetContainer set, MonoFoldable mono, Element mono ~ set) => mono -> set

-- | Get the difference of two containers.
difference :: SetContainer set => set -> set -> set

-- | Get the intersection of two containers.
intersection :: SetContainer set => set -> set -> set

-- | Get a list of all of the keys in the container.
keys :: SetContainer set => set -> [ContainerKey set]

-- | The type of the key
type family ContainerKey set

-- | Synonym for <a>ofoldMap</a>
foldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m

-- | Synonym for <a>ofoldr</a>
foldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b

-- | Synonym for <a>ofoldl'</a>
foldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a

-- | Synonym for <a>otoList</a>
toList :: MonoFoldable mono => mono -> [Element mono]

-- | Synonym for <a>oall</a>
all :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool

-- | Synonym for <a>oany</a>
any :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool

-- | Synonym for <a>onull</a>
null :: MonoFoldable mono => mono -> Bool

-- | Synonym for <a>olength</a>
length :: MonoFoldable mono => mono -> Int

-- | Synonym for <a>olength64</a>
length64 :: MonoFoldable mono => mono -> Int64

-- | Synonym for <a>ocompareLength</a>
compareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering

-- | Synonym for <a>otraverse_</a>
traverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f ()

-- | Synonym for <a>ofor_</a>
for_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f ()

-- | Synonym for <a>omapM_</a>
mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()

-- | Synonym for <a>oforM_</a>
forM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m ()

-- | Synonym for <a>ofoldlM</a>
foldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a

-- | Synonym for <a>ofoldMap1Ex</a>
foldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m

-- | Synonym for <a>ofoldr1Ex</a>
foldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono

-- | Synonym for <a>ofoldl1Ex'</a>
foldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono

-- | Synonym for <a>osum</a>
sum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono

-- | Synonym for <a>oproduct</a>
product :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono

-- | Synonym for <a>oand</a>
and :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool

-- | Synonym for <a>oor</a>
or :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool

-- | Synonym for <a>oconcatMap</a>
concatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m

-- | Synonym for <a>oelem</a>
elem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool

-- | Synonym for <a>onotElem</a>
notElem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool

-- | Synonym for <a>opoint</a>
point :: MonoPointed mono => Element mono -> mono

-- | Synonym for <a>ointercalate</a>
intercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono

-- | Synonym for <a>ofold</a>
fold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono

-- | Synonym for <a>oconcat</a>
concat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono

-- | Synonym for <a>ofoldM</a>
foldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a

-- | Synonym for <a>osequence_</a>
sequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m ()

-- | Textual data which can be encoded to and decoded from UTF8.
class (Textual textual, IsSequence binary) => Utf8 textual binary | textual -> binary, binary -> textual

-- | Encode from textual to binary using UTF-8 encoding
encodeUtf8 :: Utf8 textual binary => textual -> binary

-- | Note that this function is required to be pure. In the case of a
--   decoding error, Unicode replacement characters must be used.
decodeUtf8 :: Utf8 textual binary => binary -> textual

-- | Lazy sequences containing strict chunks of data.
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

-- | A typeclass for sequences whose elements are <a>Char</a>s.
class (IsSequence t, IsString t, Element t ~ Char) => Textual t

-- | Break up a textual sequence into a list of words, which were delimited
--   by white space.
--   
--   <pre>
--   &gt; <a>words</a> "abc  def ghi"
--   ["abc","def","ghi"]
--   </pre>
words :: Textual t => t -> [t]

-- | Join a list of textual sequences using seperating spaces.
--   
--   <pre>
--   &gt; <a>unwords</a> ["abc","def","ghi"]
--   "abc def ghi"
--   </pre>
unwords :: (Textual t, Element seq ~ t, MonoFoldable seq) => seq -> t

-- | Break up a textual sequence at newline characters.
--   
--   <pre>
--   &gt; <a>lines</a> "hello\nworld"
--   ["hello","world"]
--   </pre>
lines :: Textual t => t -> [t]

-- | Join a list of textual sequences using newlines.
--   
--   <pre>
--   &gt; <a>unlines</a> ["abc","def","ghi"]
--   "abc\ndef\nghi"
--   </pre>
unlines :: (Textual t, Element seq ~ t, MonoFoldable seq) => seq -> t

-- | Convert a textual sequence to lower-case.
--   
--   <pre>
--   &gt; <a>toLower</a> "HELLO WORLD"
--   "hello world"
--   </pre>
toLower :: Textual t => t -> t

-- | Convert a textual sequence to upper-case.
--   
--   <pre>
--   &gt; <a>toUpper</a> "hello world"
--   "HELLO WORLD"
--   </pre>
toUpper :: Textual t => t -> t

-- | Convert a textual sequence to folded-case.
--   
--   Slightly different from <a>toLower</a>, see
--   <tt><a>Data.Text</a>.<a>toCaseFold</a></tt>
toCaseFold :: Textual t => t -> t

-- | Split a textual sequence into two parts, split at the first space.
--   
--   <pre>
--   &gt; <a>breakWord</a> "hello world"
--   ("hello","world")
--   </pre>
breakWord :: Textual t => t -> (t, t)

-- | Split a textual sequence into two parts, split at the newline.
--   
--   <pre>
--   &gt; <a>breakLine</a> "abc\ndef"
--   ("abc","def")
--   </pre>
breakLine :: Textual t => t -> (t, t)

-- | Sequence Laws:
--   
--   <pre>
--   <a>fromList</a> . <a>otoList</a> = <a>id</a>
--   <a>fromList</a> (x &lt;&gt; y) = <a>fromList</a> x &lt;&gt; <a>fromList</a> y
--   <a>otoList</a> (<a>fromList</a> x &lt;&gt; <a>fromList</a> y) = x &lt;&gt; y
--   </pre>
class (Monoid seq, MonoTraversable seq, SemiSequence seq, MonoPointed seq) => IsSequence seq

-- | Convert a list to a sequence.
--   
--   <pre>
--   &gt; <a>fromList</a> [<tt>a</tt>, <tt>b</tt>, <tt>c</tt>] :: Text
--   "abc"
--   </pre>
fromList :: IsSequence seq => [Element seq] -> seq

-- | <a>lengthIndex</a> returns the length of a sequence as
--   <tt><a>Index</a> seq</tt>.
lengthIndex :: IsSequence seq => seq -> Index seq

-- | <a>break</a> applies a predicate to a sequence, and returns a tuple
--   where the first element is the longest prefix (possibly empty) of
--   elements that <i>do not satisfy</i> the predicate. The second element
--   of the tuple is the remainder of the sequence.
--   
--   <tt><a>break</a> p</tt> is equivalent to <tt><a>span</a> (<tt>not</tt>
--   . p)</tt>
--   
--   <pre>
--   &gt; <a>break</a> (&gt; 3) (<a>fromList</a> [1,2,3,4,1,2,3,4] :: <tt>Vector</tt> <a>Int</a>)
--   (fromList [1,2,3],fromList [4,1,2,3,4])
--   
--   &gt; <a>break</a> (&lt; <tt>z</tt>) (<a>fromList</a> "abc" :: <tt>Text</tt>)
--   ("","abc")
--   
--   &gt; <a>break</a> (&gt; <tt>z</tt>) (<a>fromList</a> "abc" :: <tt>Text</tt>)
--   ("abc","")
--   </pre>
break :: IsSequence seq => (Element seq -> Bool) -> seq -> (seq, seq)

-- | <a>span</a> applies a predicate to a sequence, and returns a tuple
--   where the first element is the longest prefix (possibly empty) that
--   <i>does satisfy</i> the predicate. The second element of the tuple is
--   the remainder of the sequence.
--   
--   <tt><a>span</a> p xs</tt> is equivalent to <tt>(<a>takeWhile</a> p xs,
--   <a>dropWhile</a> p xs)</tt>
--   
--   <pre>
--   &gt; <a>span</a> (&lt; 3) (<a>fromList</a> [1,2,3,4,1,2,3,4] :: <tt>Vector</tt> <a>Int</a>)
--   (fromList [1,2],fromList [3,4,1,2,3,4])
--   
--   &gt; <a>span</a> (&lt; <tt>z</tt>) (<a>fromList</a> "abc" :: <tt>Text</tt>)
--   ("abc","")
--   
--   &gt; <a>span</a> (&lt; 0) <a>1,2,3</a>
--   </pre>
span :: IsSequence seq => (Element seq -> Bool) -> seq -> (seq, seq)

-- | <a>dropWhile</a> returns the suffix remaining after <a>takeWhile</a>.
--   
--   <pre>
--   &gt; <a>dropWhile</a> (&lt; 3) [1,2,3,4,5,1,2,3]
--   [3,4,5,1,2,3]
--   
--   &gt; <a>dropWhile</a> (&lt; <tt>z</tt>) (<a>fromList</a> "abc" :: <tt>Text</tt>)
--   ""
--   </pre>
dropWhile :: IsSequence seq => (Element seq -> Bool) -> seq -> seq

-- | <a>takeWhile</a> applies a predicate to a sequence, and returns the
--   longest prefix (possibly empty) of the sequence of elements that
--   <i>satisfy</i> the predicate.
--   
--   <pre>
--   &gt; <a>takeWhile</a> (&lt; 3) [1,2,3,4,5,1,2,3]
--   [1,2]
--   
--   &gt; <a>takeWhile</a> (&lt; <tt>z</tt>) (<a>fromList</a> "abc" :: <tt>Text</tt>)
--   "abc"
--   </pre>
takeWhile :: IsSequence seq => (Element seq -> Bool) -> seq -> seq

-- | <tt><a>splitAt</a> n se</tt> returns a tuple where the first element
--   is the prefix of the sequence <tt>se</tt> with length <tt>n</tt>, and
--   the second element is the remainder of the sequence.
--   
--   <pre>
--   &gt; <a>splitAt</a> 6 "Hello world!"
--   ("Hello ","world!")
--   
--   &gt; <a>splitAt</a> 3 (<a>fromList</a> [1,2,3,4,5] :: <tt>Vector</tt> <a>Int</a>)
--   (fromList [1,2,3],fromList [4,5])
--   </pre>
splitAt :: IsSequence seq => Index seq -> seq -> (seq, seq)

-- | Equivalent to <a>splitAt</a>.
unsafeSplitAt :: IsSequence seq => Index seq -> seq -> (seq, seq)

-- | <tt><a>take</a> n</tt> returns the prefix of a sequence of length
--   <tt>n</tt>, or the sequence itself if <tt>n &gt; <a>olength</a>
--   seq</tt>.
--   
--   <pre>
--   &gt; <a>take</a> 3 "abcdefg"
--   "abc"
--   &gt; <a>take</a> 4 (<a>fromList</a> [1,2,3,4,5,6] :: <tt>Vector</tt> <a>Int</a>)
--   fromList [1,2,3,4]
--   </pre>
take :: IsSequence seq => Index seq -> seq -> seq

-- | Equivalent to <a>take</a>.
unsafeTake :: IsSequence seq => Index seq -> seq -> seq

-- | <tt><a>drop</a> n</tt> returns the suffix of a sequence after the
--   first <tt>n</tt> elements, or an empty sequence if <tt>n &gt;
--   <a>olength</a> seq</tt>.
--   
--   <pre>
--   &gt; <a>drop</a> 3 "abcdefg"
--   "defg"
--   &gt; <a>drop</a> 4 (<a>fromList</a> [1,2,3,4,5,6] :: <tt>Vector</tt> <a>Int</a>)
--   fromList [5,6]
--   </pre>
drop :: IsSequence seq => Index seq -> seq -> seq

-- | Equivalent to <a>drop</a>
unsafeDrop :: IsSequence seq => Index seq -> seq -> seq

-- | Same as <a>drop</a> but drops from the end of the sequence instead.
--   
--   <pre>
--   &gt; <a>dropEnd</a> 3 "abcdefg"
--   "abcd"
--   &gt; <a>dropEnd</a> 4 (<a>fromList</a> [1,2,3,4,5,6] :: <tt>Vector</tt> <a>Int</a>)
--   fromList [1,2]
--   </pre>
dropEnd :: IsSequence seq => Index seq -> seq -> seq

-- | <a>partition</a> takes a predicate and a sequence and returns the pair
--   of sequences of elements which do and do not satisfy the predicate.
--   
--   <pre>
--   <a>partition</a> p se = (<a>filter</a> p se, <a>filter</a> (<tt>not</tt> . p) se)
--   </pre>
partition :: IsSequence seq => (Element seq -> Bool) -> seq -> (seq, seq)

-- | <a>uncons</a> returns the tuple of the first element of a sequence and
--   the rest of the sequence, or <a>Nothing</a> if the sequence is empty.
--   
--   <pre>
--   &gt; <a>uncons</a> (<a>fromList</a> [1,2,3,4] :: <tt>Vector</tt> <a>Int</a>)
--   <a>Just</a> (1,fromList [2,3,4])
--   
--   &gt; <a>uncons</a> ([] :: [<a>Int</a>])
--   <a>Nothing</a>
--   </pre>
uncons :: IsSequence seq => seq -> Maybe (Element seq, seq)

-- | <a>unsnoc</a> returns the tuple of the init of a sequence and the last
--   element, or <a>Nothing</a> if the sequence is empty.
--   
--   <pre>
--   &gt; <a>unsnoc</a> (<a>fromList</a> [1,2,3,4] :: <tt>Vector</tt> <a>Int</a>)
--   <a>Just</a> (fromList [1,2,3],4)
--   
--   &gt; <a>unsnoc</a> ([] :: [<a>Int</a>])
--   <a>Nothing</a>
--   </pre>
unsnoc :: IsSequence seq => seq -> Maybe (seq, Element seq)

-- | <a>filter</a> given a predicate returns a sequence of all elements
--   that satisfy the predicate.
--   
--   <pre>
--   &gt; <a>filter</a> (&lt; 5) [1 .. 10]
--   [1,2,3,4]
--   </pre>
filter :: IsSequence seq => (Element seq -> Bool) -> seq -> seq

-- | The monadic version of <a>filter</a>.
filterM :: (IsSequence seq, Monad m) => (Element seq -> m Bool) -> seq -> m seq

-- | <tt><a>replicate</a> n x</tt> is a sequence of length <tt>n</tt> with
--   <tt>x</tt> as the value of every element.
--   
--   <pre>
--   &gt; <a>replicate</a> 10 <tt>a</tt> :: Text
--   "aaaaaaaaaa"
--   </pre>
replicate :: IsSequence seq => Index seq -> Element seq -> seq

-- | The monadic version of <a>replicateM</a>.
replicateM :: (IsSequence seq, Monad m) => Index seq -> m (Element seq) -> m seq

-- | <a>group</a> takes a sequence and returns a list of sequences such
--   that the concatenation of the result is equal to the argument. Each
--   subsequence in the result contains only equal elements, using the
--   supplied equality test.
--   
--   <pre>
--   &gt; <a>groupBy</a> (==) <a>Mississippi</a>
--   [<a>M</a>,"i","ss","i","ss","i","pp","i"]
--   </pre>
groupBy :: IsSequence seq => (Element seq -> Element seq -> Bool) -> seq -> [seq]

-- | Similar to standard <a>groupBy</a>, but operates on the whole
--   collection, not just the consecutive items.
groupAllOn :: (IsSequence seq, Eq b) => (Element seq -> b) -> seq -> [seq]

-- | <a>subsequences</a> returns a list of all subsequences of the
--   argument.
--   
--   <pre>
--   &gt; <a>subsequences</a> "abc"
--   ["","a","b","ab","c","ac","bc","abc"]
--   </pre>
subsequences :: IsSequence seq => seq -> [seq]

-- | <a>permutations</a> returns a list of all permutations of the
--   argument.
--   
--   <pre>
--   &gt; <a>permutations</a> "abc"
--   ["abc","bac","cba","bca","cab","acb"]
--   </pre>
permutations :: IsSequence seq => seq -> [seq]

-- | <b>Unsafe</b>
--   
--   Get the tail of a sequence, throw an exception if the sequence is
--   empty.
--   
--   <pre>
--   &gt; <a>tailEx</a> [1,2,3]
--   [2,3]
--   </pre>
tailEx :: IsSequence seq => seq -> seq

-- | Safe version of <a>tailEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
tailMay :: IsSequence seq => seq -> Maybe seq

-- | <b>Unsafe</b>
--   
--   Get the init of a sequence, throw an exception if the sequence is
--   empty.
--   
--   <pre>
--   &gt; <a>initEx</a> [1,2,3]
--   [1,2]
--   </pre>
initEx :: IsSequence seq => seq -> seq

-- | Safe version of <a>initEx</a>.
--   
--   Returns <a>Nothing</a> instead of throwing an exception when
--   encountering an empty monomorphic container.
initMay :: IsSequence seq => seq -> Maybe seq

-- | Equivalent to <a>tailEx</a>.
unsafeTail :: IsSequence seq => seq -> seq

-- | Equivalent to <a>initEx</a>.
unsafeInit :: IsSequence seq => seq -> seq

-- | Get the element of a sequence at a certain index, returns
--   <a>Nothing</a> if that index does not exist.
--   
--   <pre>
--   &gt; <a>index</a> (<a>fromList</a> [1,2,3] :: <tt>Vector</tt> <a>Int</a>) 1
--   <a>Just</a> 2
--   &gt; <a>index</a> (<a>fromList</a> [1,2,3] :: <tt>Vector</tt> <a>Int</a>) 4
--   <a>Nothing</a>
--   </pre>
index :: IsSequence seq => seq -> Index seq -> Maybe (Element seq)

-- | <b>Unsafe</b>
--   
--   Get the element of a sequence at a certain index, throws an exception
--   if the index does not exist.
indexEx :: IsSequence seq => seq -> Index seq -> Element seq

-- | Equivalent to <a>indexEx</a>.
unsafeIndex :: IsSequence seq => seq -> Index seq -> Element seq

-- | <a>splitWhen</a> splits a sequence into components delimited by
--   separators, where the predicate returns True for a separator element.
--   The resulting components do not contain the separators. Two adjacent
--   separators result in an empty component in the output. The number of
--   resulting components is greater by one than number of separators.
--   
--   Since 0.9.3
splitWhen :: IsSequence seq => (Element seq -> Bool) -> seq -> [seq]

-- | <a>SemiSequence</a> was created to share code between
--   <a>IsSequence</a> and <tt>NonNull</tt>.
--   
--   <tt>Semi</tt> means <tt>SemiGroup</tt> A <a>SemiSequence</a> can
--   accomodate a <tt>SemiGroup</tt> such as <tt>NonEmpty</tt> or
--   <tt>NonNull</tt> A Monoid should be able to fill out
--   <a>IsSequence</a>.
--   
--   <a>SemiSequence</a> operations maintain the same type because they all
--   maintain the same number of elements or increase them. However, a
--   decreasing function such as filter may change they type. For example,
--   from <tt>NonEmpty</tt> to '[]' This type-changing function exists on
--   <tt>NonNull</tt> as <tt>nfilter</tt>
--   
--   <a>filter</a> and other such functions are placed in <a>IsSequence</a>
--   
--   <i>NOTE</i>: Like <a>GrowingAppend</a>, ideally we'd have a
--   <tt>Semigroup</tt> superclass constraint here, but that would pull in
--   more dependencies to this package than desired.
class (Integral Index seq, GrowingAppend seq) => SemiSequence seq where {
    
    -- | The type of the index of a sequence.
    type family Index seq;
}

-- | <a>intersperse</a> takes an element and intersperses that element
--   between the elements of the sequence.
--   
--   <pre>
--   &gt; <a>intersperse</a> ',' "abcde"
--   "a,b,c,d,e"
--   </pre>
intersperse :: SemiSequence seq => Element seq -> seq -> seq

-- | Reverse a sequence
--   
--   <pre>
--   &gt; <a>reverse</a> "hello world"
--   "dlrow olleh"
--   </pre>
reverse :: SemiSequence seq => seq -> seq

-- | <a>find</a> takes a predicate and a sequence and returns the first
--   element in the sequence matching the predicate, or <a>Nothing</a> if
--   there isn't an element that matches the predicate.
--   
--   <pre>
--   &gt; <a>find</a> (== 5) [1 .. 10]
--   <a>Just</a> 5
--   
--   &gt; <a>find</a> (== 15) [1 .. 10]
--   <a>Nothing</a>
--   </pre>
find :: SemiSequence seq => (Element seq -> Bool) -> seq -> Maybe (Element seq)

-- | Sort a sequence using an supplied element ordering function.
--   
--   <pre>
--   &gt; let compare' x y = case <a>compare</a> x y of LT -&gt; GT; EQ -&gt; EQ; GT -&gt; LT
--   &gt; <a>sortBy</a> compare' [5,3,6,1,2,4]
--   [6,5,4,3,2,1]
--   </pre>
sortBy :: SemiSequence seq => (Element seq -> Element seq -> Ordering) -> seq -> seq

-- | Prepend an element onto a sequence.
--   
--   <pre>
--   &gt; 4 `<a>cons</a>` [1,2,3]
--   [4,1,2,3]
--   </pre>
cons :: SemiSequence seq => Element seq -> seq -> seq

-- | Append an element onto a sequence.
--   
--   <pre>
--   &gt; [1,2,3] `<a>snoc</a>` 4
--   [1,2,3,4]
--   </pre>
snoc :: SemiSequence seq => seq -> Element seq -> seq

-- | The type of the index of a sequence.
type family Index seq

-- | Create a sequence from a single element.
--   
--   <pre>
--   &gt; <a>singleton</a> <tt>a</tt> :: <tt>String</tt>
--   "a"
--   &gt; <a>singleton</a> <tt>a</tt> :: <tt>Vector</tt> <a>Char</a>
--   <a>fromList</a> "a"
--   </pre>
singleton :: MonoPointed seq => Element seq -> seq

-- | Use <a>Data.List</a>'s implementation of <a>find</a>.
defaultFind :: MonoFoldable seq => (Element seq -> Bool) -> seq -> Maybe (Element seq)

-- | Use <a>Data.List</a>'s implementation of <a>intersperse</a>.
defaultIntersperse :: IsSequence seq => Element seq -> seq -> seq

-- | Use <a>Data.List</a>'s implementation of <a>reverse</a>.
defaultReverse :: IsSequence seq => seq -> seq

-- | Use <a>Data.List</a>'s implementation of <a>sortBy</a>.
defaultSortBy :: IsSequence seq => (Element seq -> Element seq -> Ordering) -> seq -> seq

-- | Use <a>splitWhen</a> from <a>Data.List.Split</a>
defaultSplitWhen :: IsSequence seq => (Element seq -> Bool) -> seq -> [seq]

-- | Sort a vector using an supplied element ordering function.
vectorSortBy :: Vector v e => (e -> e -> Ordering) -> v e -> v e

-- | Sort a vector.
vectorSort :: (Vector v e, Ord e) => v e -> v e

-- | Use <a>Data.List</a>'s <a>:</a> to prepend an element to a sequence.
defaultCons :: IsSequence seq => Element seq -> seq -> seq

-- | Use <a>Data.List</a>'s <a>++</a> to append an element to a sequence.
defaultSnoc :: IsSequence seq => seq -> Element seq -> seq

-- | like Data.List.tail, but an input of <a>mempty</a> returns
--   <a>mempty</a>
tailDef :: IsSequence seq => seq -> seq

-- | like Data.List.init, but an input of <a>mempty</a> returns
--   <a>mempty</a>
initDef :: IsSequence seq => seq -> seq

-- | <tt><a>splitElem</a></tt> splits a sequence into components delimited
--   by separator element. It's equivalent to <a>splitWhen</a> with
--   equality predicate:
--   
--   <pre>
--   splitElem sep === splitWhen (== sep)
--   </pre>
--   
--   Since 0.9.3
splitElem :: (IsSequence seq, Eq (Element seq)) => Element seq -> seq -> [seq]

-- | <tt><a>splitSeq</a></tt> splits a sequence into components delimited
--   by separator subsequence. <a>splitSeq</a> is the right inverse of
--   <tt>intercalate</tt>:
--   
--   <pre>
--   ointercalate x . splitSeq x === id
--   </pre>
--   
--   <a>splitElem</a> can be considered a special case of <a>splitSeq</a>
--   
--   <pre>
--   splitSeq (singleton sep) === splitElem sep
--   </pre>
--   
--   <tt><a>splitSeq</a> mempty</tt> is another special case: it splits
--   just before each element, and in line with <a>splitWhen</a> rules, it
--   has at least one output component:
--   
--   <pre>
--   &gt; <a>splitSeq</a> "" ""
--   [""]
--   &gt; <a>splitSeq</a> "" "a"
--   ["", "a"]
--   &gt; <a>splitSeq</a> "" "ab"
--   ["", "a", "b"]
--   </pre>
--   
--   Since 0.9.3
splitSeq :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> [seq]

-- | <tt><a>replaceSeq</a> old new</tt> replaces all <tt>old</tt>
--   subsequences with <tt>new</tt>.
--   
--   <pre>
--   replaceSeq old new === ointercalate new . splitSeq old
--   </pre>
replaceSeq :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq -> seq

-- | <a>stripPrefix</a> drops the given prefix from a sequence. It returns
--   <a>Nothing</a> if the sequence did not start with the prefix given, or
--   <a>Just</a> the sequence after the prefix, if it does.
--   
--   <pre>
--   &gt; <a>stripPrefix</a> "foo" "foobar"
--   <a>Just</a> "bar"
--   &gt; <a>stripPrefix</a> "abc" "foobar"
--   <a>Nothing</a>
--   </pre>
stripPrefix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Maybe seq

-- | <a>stripSuffix</a> drops the given suffix from a sequence. It returns
--   <a>Nothing</a> if the sequence did not end with the suffix given, or
--   <a>Just</a> the sequence before the suffix, if it does.
--   
--   <pre>
--   &gt; <a>stripSuffix</a> "bar" "foobar"
--   <a>Just</a> "foo"
--   &gt; <a>stripSuffix</a> "abc" "foobar"
--   <a>Nothing</a>
--   </pre>
stripSuffix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Maybe seq

-- | <a>dropPrefix</a> drops the given prefix from a sequence. It returns
--   the original sequence if the sequence doesn't start with the given
--   prefix.
--   
--   <pre>
--   &gt; <a>dropPrefix</a> "foo" "foobar"
--   "bar"
--   &gt; <a>dropPrefix</a> "abc" "foobar"
--   "foobar"
--   </pre>
dropPrefix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq

-- | <a>dropSuffix</a> drops the given suffix from a sequence. It returns
--   the original sequence if the sequence doesn't end with the given
--   suffix.
--   
--   <pre>
--   &gt; <a>dropSuffix</a> "bar" "foobar"
--   "foo"
--   &gt; <a>dropSuffix</a> "abc" "foobar"
--   "foobar"
--   </pre>
dropSuffix :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> seq

-- | <a>ensurePrefix</a> will add a prefix to a sequence if it doesn't
--   exist, and otherwise have no effect.
--   
--   <pre>
--   &gt; <a>ensurePrefix</a> "foo" "foobar"
--   "foobar"
--   &gt; <a>ensurePrefix</a> "abc" "foobar"
--   "abcfoobar"
--   </pre>
ensurePrefix :: (Eq (Element seq), IsSequence seq) => seq -> seq -> seq

-- | Append a suffix to a sequence, unless it already has that suffix.
--   
--   <pre>
--   &gt; <a>ensureSuffix</a> "bar" "foobar"
--   "foobar"
--   &gt; <a>ensureSuffix</a> "abc" "foobar"
--   "foobarabc"
--   </pre>
ensureSuffix :: (Eq (Element seq), IsSequence seq) => seq -> seq -> seq

-- | <a>isPrefixOf</a> takes two sequences and returns <a>True</a> if the
--   first sequence is a prefix of the second.
isPrefixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool

-- | <a>isSuffixOf</a> takes two sequences and returns <a>True</a> if the
--   first sequence is a suffix of the second.
isSuffixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool

-- | <a>isInfixOf</a> takes two sequences and returns <tt>true</tt> if the
--   first sequence is contained, wholly and intact, anywhere within the
--   second.
isInfixOf :: (IsSequence seq, Eq (Element seq)) => seq -> seq -> Bool

-- | Equivalent to <tt><a>groupBy</a> (==)</tt>
group :: (IsSequence seq, Eq (Element seq)) => seq -> [seq]

-- | Similar to standard <a>group</a>, but operates on the whole
--   collection, not just the consecutive items.
--   
--   Equivalent to <tt><a>groupAllOn</a> id</tt>
groupAll :: (IsSequence seq, Eq (Element seq)) => 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
splitElemStrictBS :: Word8 -> ByteString -> [ByteString]
stripPrefixStrictBS :: ByteString -> ByteString -> Maybe ByteString
stripSuffixStrictBS :: ByteString -> ByteString -> Maybe ByteString
splitSeqLazyBS :: Word8 -> ByteString -> [ByteString]
stripPrefixLazyBS :: ByteString -> ByteString -> Maybe ByteString
stripSuffixLazyBS :: ByteString -> ByteString -> Maybe ByteString
splitSeqStrictText :: Text -> Text -> [Text]
replaceSeqStrictText :: Text -> Text -> Text -> Text
splitSeqLazyText :: Text -> Text -> [Text]
replaceSeqLazyText :: Text -> Text -> Text -> Text

-- | Sort a ordered sequence.
--   
--   <pre>
--   &gt; <a>sort</a> [4,3,1,2]
--   [1,2,3,4]
--   </pre>
sort :: (SemiSequence seq, Ord (Element seq)) => seq -> seq

-- | Takes all of the <a>Just</a> values from a sequence of <tt>Maybe
--   t</tt>s and concatenates them into an unboxed sequence of <tt>t</tt>s.
--   
--   Since 0.6.2
catMaybes :: (IsSequence (f (Maybe t)), Functor f, Element (f (Maybe t)) ~ Maybe t) => f (Maybe t) -> f t

-- | Same as <tt>sortBy . comparing</tt>.
--   
--   Since 0.7.0
sortOn :: (Ord o, SemiSequence seq) => (Element seq -> o) -> seq -> seq

-- | Synonym for <a>fromList</a>
pack :: IsSequence seq => [Element seq] -> seq

-- | Synonym for <a>otoList</a>
unpack :: MonoFoldable mono => mono -> [Element mono]

-- | Repack from one type to another, dropping to a list in the middle.
--   
--   <tt>repack = pack . unpack</tt>.
repack :: (MonoFoldable a, IsSequence b, Element a ~ Element b) => a -> b

-- | A monomorphic container that is not null.
data NonNull mono

-- | <b>Safely</b> convert from an <b>unsafe</b> monomorphic container to a
--   <b>safe</b> non-null monomorphic container.
fromNullable :: MonoFoldable mono => mono -> Maybe (NonNull mono)

-- | <b>Unsafely</b> convert from an <b>unsafe</b> monomorphic container to
--   a <b>safe</b> non-null monomorphic container.
--   
--   Throws an exception if the monomorphic container is empty.
impureNonNull :: MonoFoldable mono => mono -> NonNull mono

-- | Old synonym for <a>impureNonNull</a>
nonNull :: MonoFoldable mono => mono -> NonNull mono

-- | <b>Safely</b> convert from a <tt>NonEmpty</tt> list to a non-null
--   monomorphic container.
fromNonEmpty :: IsSequence seq => NonEmpty (Element seq) -> NonNull seq

-- | <b>Safely</b> convert from a <a>NonNull</a> container to a
--   <tt>NonEmpty</tt> list.
toNonEmpty :: MonoFoldable mono => NonNull mono -> NonEmpty (Element mono)

-- | Specializes <a>fromNonEmpty</a> to lists only.
toMinList :: NonEmpty a -> NonNull [a]

-- | Prepend an element to a <a>SemiSequence</a>, creating a non-null
--   <a>SemiSequence</a>.
--   
--   Generally this uses cons underneath. cons is not efficient for most
--   data structures.
--   
--   Alternatives:
--   
--   <ul>
--   <li>if you don't need to cons, use <a>fromNullable</a> or
--   <a>nonNull</a> if you can create your structure in one go.</li>
--   <li>if you need to cons, you might be able to start off with an
--   efficient data structure such as a <tt>NonEmpty</tt> List.
--   <tt>fronNonEmpty</tt> will convert that to your data structure using
--   the structure's fromList function.</li>
--   </ul>
ncons :: SemiSequence seq => Element seq -> seq -> NonNull seq

-- | Extract the first element of a sequnce and the rest of the non-null
--   sequence if it exists.
nuncons :: IsSequence seq => NonNull seq -> (Element seq, Maybe (NonNull seq))

-- | Same as <a>nuncons</a> with no guarantee that the rest of the sequence
--   is non-null.
splitFirst :: IsSequence seq => NonNull seq -> (Element seq, seq)

-- | Equivalent to <tt><a>Data.Sequences</a>.<a>filter</a></tt>, but works
--   on non-nullable sequences.
nfilter :: IsSequence seq => (Element seq -> Bool) -> NonNull seq -> seq

-- | Equivalent to <tt><a>Data.Sequences</a>.<a>filterM</a></tt>, but works
--   on non-nullable sequences.
nfilterM :: (Monad m, IsSequence seq) => (Element seq -> m Bool) -> NonNull seq -> m seq

-- | Equivalent to <tt><a>Data.Sequences</a>.<a>replicate</a></tt>
--   
--   <tt>i</tt> must be <tt>&gt; 0</tt>
--   
--   <tt>i &lt;= 0</tt> is treated the same as providing <tt>1</tt>
nReplicate :: IsSequence seq => Index seq -> Element seq -> NonNull seq

-- | <b>Safe</b> version of <a>tailEx</a>, only working on non-nullable
--   sequences.
tail :: IsSequence seq => NonNull seq -> seq

-- | <b>Safe</b> version of <a>initEx</a>, only working on non-nullable
--   sequences.
init :: IsSequence seq => NonNull seq -> seq

-- | Prepend an element to a non-null <a>SemiSequence</a>.
(<|) :: SemiSequence seq => Element seq -> NonNull seq -> NonNull seq
infixr 5 <|

-- | Return the first element of a monomorphic container.
--   
--   Safe version of <a>headEx</a>, only works on monomorphic containers
--   wrapped in a <a>NonNull</a>.
head :: MonoFoldable mono => NonNull mono -> Element mono

-- | Return the last element of a monomorphic container.
--   
--   Safe version of <a>lastEx</a>, only works on monomorphic containers
--   wrapped in a <a>NonNull</a>.
last :: MonoFoldable mono => NonNull mono -> Element mono

-- | Map each element of a monomorphic container to a semigroup, and
--   combine the results.
--   
--   Safe version of <a>ofoldMap1Ex</a>, only works on monomorphic
--   containers wrapped in a <a>NonNull</a>.
--   
--   <h4><b>Examples</b></h4>
--   
--   <pre>
--   &gt; let xs = ncons ("hello", 1 :: <a>Integer</a>) [(" world", 2)]
--   &gt; <a>ofoldMap1</a> <a>fst</a> xs
--   "hello world"
--   </pre>
ofoldMap1 :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> NonNull mono -> m

-- | Join a monomorphic container, whose elements are <a>Semigroup</a>s,
--   together.
--   
--   Safe, only works on monomorphic containers wrapped in a
--   <a>NonNull</a>.
--   
--   <h4><b>Examples</b></h4>
--   
--   <pre>
--   &gt; let xs = ncons "a" ["b", "c"]
--   &gt; xs
--   <a>NonNull</a> {toNullable = ["a","b","c"]}
--   
--   &gt; <a>ofold1</a> xs
--   "abc"
--   </pre>
ofold1 :: (MonoFoldable mono, Semigroup (Element mono)) => NonNull mono -> Element mono

-- | Right-associative fold of a monomorphic container with no base
--   element.
--   
--   Safe version of <a>ofoldr1Ex</a>, only works on monomorphic containers
--   wrapped in a <a>NonNull</a>.
--   
--   <pre>
--   <a>foldr1</a> f = <a>Prelude</a>.<a>foldr1</a> f . <a>otoList</a>
--   </pre>
--   
--   <h4><b>Examples</b></h4>
--   
--   <pre>
--   &gt; let xs = ncons "a" ["b", "c"]
--   &gt; <a>ofoldr1</a> (++) xs
--   "abc"
--   </pre>
ofoldr1 :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> NonNull mono -> Element mono

-- | Strict left-associative fold of a monomorphic container with no base
--   element.
--   
--   Safe version of <a>ofoldl1Ex'</a>, only works on monomorphic
--   containers wrapped in a <a>NonNull</a>.
--   
--   <pre>
--   <tt>foldl1'</tt> f = <a>Prelude</a>.<a>foldl1'</a> f . <a>otoList</a>
--   </pre>
--   
--   <h4><b>Examples</b></h4>
--   
--   <pre>
--   &gt; let xs = ncons "a" ["b", "c"]
--   &gt; <a>ofoldl1'</a> (++) xs
--   "abc"
--   </pre>
ofoldl1' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> NonNull mono -> Element mono

-- | Get the maximum element of a monomorphic container.
--   
--   Safe version of <a>maximumEx</a>, only works on monomorphic containers
--   wrapped in a <a>NonNull</a>.
--   
--   <h4><b>Examples</b></h4>
--   
--   <pre>
--   &gt; let xs = ncons 1 [2, 3 :: Int]
--   &gt; <a>maximum</a> xs
--   3
--   </pre>
maximum :: (MonoFoldable mono, Ord (Element mono)) => NonNull mono -> Element mono

-- | Get the minimum element of a monomorphic container.
--   
--   Safe version of <a>minimumEx</a>, only works on monomorphic containers
--   wrapped in a <a>NonNull</a>.
--   
--   <h4><b>Examples</b></h4>
--   
--   <pre>
--   &gt; let xs = ncons 1 [2, 3 :: Int]
--   &gt; <a>minimum</a> xs
--   1
--   </pre>
minimum :: (MonoFoldable mono, Ord (Element mono)) => NonNull mono -> Element mono

-- | Get the maximum element of a monomorphic container, using a supplied
--   element ordering function.
--   
--   Safe version of <a>maximumByEx</a>, only works on monomorphic
--   containers wrapped in a <a>NonNull</a>.
maximumBy :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> NonNull mono -> Element mono

-- | Get the minimum element of a monomorphic container, using a supplied
--   element ordering function.
--   
--   Safe version of <a>minimumByEx</a>, only works on monomorphic
--   containers wrapped in a <a>NonNull</a>.
minimumBy :: MonoFoldable mono => (Element mono -> Element mono -> Ordering) -> NonNull mono -> Element mono

-- | <a>fmap</a> over the underlying container in a <a>NonNull</a>.
mapNonNull :: (Functor f, MonoFoldable (f b)) => (a -> b) -> NonNull (f a) -> NonNull (f b)
class ToBuilder value builder
toBuilder :: ToBuilder value builder => value -> 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 BlazeBuilder = Builder
type TextBuilder = Builder
textToBuilder :: ToBuilder Text builder => Text -> builder
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 Async a
waitAnyCatchSTM :: [Async a] -> STM (Async a, Either SomeException a)
waitAnySTM :: [Async a] -> STM (Async a, 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 ()
waitBothSTM :: Async a -> Async b -> STM (a, b)
data Handle
waitCatchSTM :: Async a -> STM (Either SomeException a)
pollSTM :: Async a -> STM (Maybe (Either SomeException a))
waitSTM :: Async a -> STM a
orElse :: STM a -> STM a -> STM a

-- | Takes a function of type 'LText -&gt; LText' and passes all input on
--   stdin to it, then prints result to stdout
--   
--   Uses lazy IO Uses system locale settings
interact :: MonadIO m => (LText -> LText) -> m ()

-- | Read all input from stdin into a lazy Text (<a>LText</a>)
--   
--   Uses system locale settings
getContents :: MonadIO m => m LText

-- | Read a line from stdin
--   
--   Uses system locale settings
getLine :: MonadIO m => m Text

-- | Read a character from stdin
--   
--   Uses system locale settings
getChar :: MonadIO m => m Char

-- | Write a Text followed by a newline to stdout
--   
--   Uses system locale settings
putStrLn :: MonadIO m => Text -> m ()

-- | Write a Text to stdout
--   
--   Uses system locale settings
putStr :: MonadIO m => Text -> m ()

-- | Write a character to stdout
--   
--   Uses system locale settings
putChar :: MonadIO m => Char -> m ()

-- | Read a single chunk of data as a <a>ByteString</a> from the given
--   <a>Handle</a>.
--   
--   Under the surface, this uses <a>hGetSome</a> with the default chunk
--   size.
hGetChunk :: MonadIO m => Handle -> m ByteString

-- | Write a <a>ByteString</a> to the given <a>Handle</a>.
hPut :: MonadIO m => Handle -> ByteString -> m ()

-- | Strictly read the contents of the given <a>Handle</a> into a
--   <a>ByteString</a>.
hGetContents :: MonadIO m => Handle -> m ByteString

-- | Write a <a>Text</a> to a file using a UTF-8 character encoding.
writeFileUtf8 :: MonadIO m => FilePath -> Text -> m ()

-- | Write a <a>ByteString</a> to a file.
writeFile :: MonadIO m => FilePath -> ByteString -> m ()

-- | Strictly read a file into a <a>Text</a> using a UTF-8 character
--   encoding. In the event of a character encoding error, a Unicode
--   replacement character will be used (a.k.a., <tt>lenientDecode</tt>).
readFileUtf8 :: MonadIO m => FilePath -> m Text

-- | Strictly read a file into a <a>ByteString</a>.
readFile :: MonadIO m => FilePath -> m ByteString

-- | <a>link2</a> generalized to any <a>MonadIO</a>
link2Async :: MonadIO m => Async a -> Async b -> m ()

-- | <a>link</a> generalized to any <a>MonadIO</a>
linkAsync :: MonadIO m => Async a -> m ()

-- | <a>waitCatchSTM</a> for any <a>MonadIO</a>
waitCatchAsync :: MonadIO m => Async a -> m (Either SomeException a)

-- | <a>pollSTM</a> for any <a>MonadIO</a>
pollAsync :: MonadIO m => Async a -> m (Maybe (Either SomeException a))

-- | <a>waitSTM</a> for any <a>MonadIO</a>
waitAsync :: MonadIO m => Async a -> m a

-- | Convert a storable <a>Vector</a> into a <a>ByteString</a>.
fromByteVector :: SVector Word8 -> ByteString

-- | Convert a <a>ByteString</a> into a storable <a>Vector</a>.
toByteVector :: ByteString -> SVector Word8

-- | <a>||</a> lifted to an Applicative.
(<||>) :: Applicative a => a Bool -> a Bool -> a Bool
infixr 2 <||>

-- | <a>&amp;&amp;</a> lifted to an Applicative.
(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool
infixr 3 <&&>

-- | Synonym for <a>apply</a>
--   
--   Since 0.11.0
applyDList :: DList a -> [a] -> [a]

-- | Force type to a <a>DList</a>
--   
--   Since 0.11.0
asDList :: DList a -> DList a

-- | Only perform the action if the predicate returns <a>False</a>.
--   
--   Since 0.9.2
unlessM :: Monad m => m Bool -> m () -> m ()

-- | Only perform the action if the predicate returns <a>True</a>.
--   
--   Since 0.9.2
whenM :: Monad m => m Bool -> m () -> m ()

-- | Synonym for <a>orElse</a>.
orElseSTM :: STM a -> STM a -> STM a

-- | same behavior as <a>nubBy</a>, but requires <a>Ord</a> and is <tt>O(n
--   log n)</tt>
--   
--   <a>https://github.com/nh2/haskell-ordnub</a>
ordNubBy :: Ord b => (a -> b) -> (a -> a -> Bool) -> [a] -> [a]

-- | same behavior as <a>nub</a>, but requires <a>Ord</a> and is <tt>O(n
--   log n)</tt>
--   
--   <a>https://github.com/nh2/haskell-ordnub</a>
ordNub :: Ord a => [a] -> [a]

-- | same behavior as <a>nub</a>, but requires <a>Hashable</a> &amp;
--   <a>Eq</a> and is <tt>O(n log n)</tt>
--   
--   <a>https://github.com/nh2/haskell-ordnub</a>
hashNub :: (Hashable a, Eq a) => [a] -> [a]

-- | Originally <a>yield</a>.
yieldThread :: MonadIO m => m ()

-- | Since 0.5.9
traceShowM :: (Show a, Monad m) => a -> m ()

-- | Since 0.5.9
traceShowId :: Show a => a -> a

-- | Since 0.5.9
traceM :: Monad m => String -> m ()

-- | Since 0.5.9
traceId :: String -> String
traceShow :: Show a => a -> b -> b

-- | We define our own <a>trace</a> (and also its variants) which provides
--   a warning when used. So that tracing is available during development,
--   but the compiler reminds you to not leave them in the code for
--   production.
trace :: String -> a -> a

-- | We define our own <a>undefined</a> which is marked as deprecated. This
--   makes it useful to use during development, but lets you more easily
--   get notifications if you accidentally ship partial code in production.
--   
--   The classy prelude recommendation for when you need to really have a
--   partial function in production is to use <a>error</a> with a very
--   descriptive message so that, in case an exception is thrown, you get
--   more information than <tt><a>Prelude</a>.<a>undefined</a></tt>.
--   
--   Since 0.5.5
undefined :: HasCallStack => a

-- | Sort elements using the user supplied function to project something
--   out of each element. Inspired by
--   <a>http://hackage.haskell.org/packages/archive/base/latest/doc/html/GHC-Exts.html#v:sortWith</a>.
sortWith :: (Ord a, IsSequence c) => (Element c -> a) -> c -> c
print :: (Show a, MonadIO m) => a -> m ()
asString :: [Char] -> [Char]
asSVector :: SVector a -> SVector a
asUVector :: UVector a -> UVector a
asVector :: Vector a -> Vector a
asIntSet :: IntSet -> IntSet
asSet :: Set a -> Set a
asMaybe :: Maybe a -> Maybe a
asIntMap :: IntMap v -> IntMap v
asMap :: Map k v -> Map k v
asList :: [a] -> [a]
asLText :: LText -> LText
asText :: Text -> Text
asHashSet :: HashSet a -> HashSet a
asHashMap :: HashMap k v -> HashMap k v
asLByteString :: LByteString -> LByteString
asByteString :: ByteString -> ByteString

-- | An alias for <a>intersection</a>.
intersect :: SetContainer a => a -> a -> a

-- | An alias for <a>difference</a>.
(\\) :: SetContainer a => a -> a -> a
infixl 9 \\
(++) :: Monoid m => m -> m -> m
infixr 5 ++
map :: Functor f => (a -> b) -> f a -> f b
readMay :: (Element c ~ Char, MonoFoldable c, Read a) => c -> Maybe a

-- | Convert a character to upper case.
--   
--   Character-based case conversion is lossy in comparison to string-based
--   <a>toUpper</a>. For instance, ß won't be converted to SS.
charToUpper :: Char -> Char

-- | Convert a character to lower case.
--   
--   Character-based case conversion is lossy in comparison to string-based
--   <a>toLower</a>. For instance, İ will be converted to i, instead of i̇.
charToLower :: Char -> Char
tlshow :: Show a => a -> LText
tshow :: Show a => a -> Text
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
class Hashable a
hashWithSalt :: Hashable a => Int -> a -> Int
hash :: Hashable a => a -> Int
error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
data HashSet a
data HashMap k v
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 ByteString
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
type SVector = Vector
type UVector = Vector
type LByteString = ByteString
type LText = Text
equating :: Eq a => (b -> a) -> b -> b -> Bool
getArgs :: MonadIO m => m [Text]
terror :: HasCallStack => Text -> 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
(***) :: 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
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)
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
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_a27Ph. Lens' (ColourConfig c_a27Ph) (Option c_a27Ph)
lensCursorBgColour :: forall c_a27Ph. Lens' (ColourConfig c_a27Ph) (Option c_a27Ph)
lensForegroundColour :: forall c_a27Ph. Lens' (ColourConfig c_a27Ph) (Option c_a27Ph)
lensBackgroundColour :: forall c_a27Ph. Lens' (ColourConfig c_a27Ph) (Option c_a27Ph)
lensPalette :: forall c_a27Ph. Lens' (ColourConfig c_a27Ph) (Palette c_a27Ph)

-- | 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 ()
