-- 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 0.2.1.0

module Termonad.Prelude

module Termonad.Gtk
objFromBuildUnsafe :: GObject o => Builder -> Text -> (ManagedPtr o -> o) -> IO o
appNew :: (HasCallStack, MonadIO m) => Maybe Text -> [ApplicationFlags] -> m Application

module Termonad.FocusList
data Focus
Focus :: {-# UNPACK #-} !Int -> Focus
NoFocus :: Focus
foldFocus :: b -> (Int -> b) -> Focus -> b
_Focus :: Prism' Focus Int
_NoFocus :: Prism' Focus ()
hasFocus :: Focus -> Bool
unsafeGetFocus :: Focus -> Int
data FocusList a
FocusList :: !Focus -> {-# UNPACK #-} !Int -> !IntMap a -> FocusList a
[focusListFocus] :: FocusList a -> !Focus
[focusListLen] :: FocusList a -> {-# UNPACK #-} !Int
[focusList] :: FocusList a -> !IntMap a
lensFocusListLen :: forall a_a1j1r. Lens' (FocusList a_a1j1r) Int
lensFocusListFocus :: forall a_a1j1r. Lens' (FocusList a_a1j1r) Focus
lensFocusList :: forall a_a1j1r a_a1pO9. Lens (FocusList a_a1j1r) (FocusList a_a1pO9) (IntMap a_a1j1r) (IntMap a_a1pO9)
debugFL :: Show a => FocusList a -> String
lensFocusListAt :: Int -> Lens' (FocusList a) (Maybe a)

-- | This is an invariant that the <a>FocusList</a> must always protect.
invariantFL :: FocusList a -> Bool

-- | Unsafely create a <a>FocusList</a>. This does not check that the focus
--   actually exists in the list.
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeFLFromList (Focus 1) [0..2]
--   
--   &gt;&gt;&gt; debugFL fl
--   "FocusList {focusListFocus = Focus 1, focusListLen = 3, focusList = fromList [(0,0),(1,1),(2,2)]}"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeFLFromList NoFocus []
--   
--   &gt;&gt;&gt; debugFL fl
--   "FocusList {focusListFocus = NoFocus, focusListLen = 0, focusList = fromList []}"
--   </pre>
unsafeFLFromList :: Focus -> [a] -> FocusList a
focusItemGetter :: Getter (FocusList a) (Maybe a)

-- | Safely create a <a>FocusList</a> from a list.
--   
--   <pre>
--   &gt;&gt;&gt; flFromList (Focus 1) ["cat","dog","goat"]
--   Just (FocusList (Focus 1) ["cat","dog","goat"])
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; flFromList NoFocus []
--   Just (FocusList NoFocus [])
--   </pre>
--   
--   If the <a>Focus</a> is out of range for the list, then <a>Nothing</a>
--   will be returned.
--   
--   <pre>
--   &gt;&gt;&gt; flFromList (Focus (-1)) ["cat","dog","goat"]
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; flFromList (Focus 3) ["cat","dog","goat"]
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; flFromList NoFocus ["cat","dog","goat"]
--   Nothing
--   </pre>
flFromList :: Focus -> [a] -> Maybe (FocusList a)

-- | Create a <a>FocusList</a> with a single element.
--   
--   <pre>
--   &gt;&gt;&gt; singletonFL "hello"
--   FocusList (Focus 0) ["hello"]
--   </pre>
singletonFL :: a -> FocusList a

-- | Create an empty <a>FocusList</a> without a <a>Focus</a>.
--   
--   <pre>
--   &gt;&gt;&gt; emptyFL
--   FocusList NoFocus []
--   </pre>
emptyFL :: FocusList a

-- | Return <a>True</a> if the <a>FocusList</a> is empty.
--   
--   <pre>
--   &gt;&gt;&gt; isEmptyFL emptyFL
--   True
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; isEmptyFL $ singletonFL "hello"
--   False
--   </pre>
--   
--   Any <a>FocusList</a> with a <a>Focus</a> should never be empty.
isEmptyFL :: FocusList a -> Bool

-- | Append a value to the end of a <a>FocusList</a>.
--   
--   This can be thought of as a "snoc" operation.
--   
--   <pre>
--   &gt;&gt;&gt; appendFL emptyFL "hello"
--   FocusList (Focus 0) ["hello"]
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; appendFL (singletonFL "hello") "bye"
--   FocusList (Focus 0) ["hello","bye"]
--   </pre>
--   
--   Appending a value to an empty <a>FocusList</a> is the same as using
--   <a>singletonFL</a>.
--   
--   <pre>
--   appendFL emptyFL a == singletonFL a
--   </pre>
appendFL :: FocusList a -> a -> FocusList a

-- | A combination of <a>appendFL</a> and <a>setFocusFL</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["hello", "bye", "tree"]
--   
--   &gt;&gt;&gt; appendSetFocusFL fl "pie"
--   FocusList (Focus 3) ["hello","bye","tree","pie"]
--   </pre>
--   
--   <pre>
--   (appendSetFocusFL fl a) ^. lensFocusListFocus /= fl ^. lensFocusListFocus
--   </pre>
appendSetFocusFL :: FocusList a -> a -> FocusList a

-- | Prepend a value to a <a>FocusList</a>.
--   
--   This can be thought of as a "cons" operation.
--   
--   <pre>
--   &gt;&gt;&gt; prependFL "hello" emptyFL
--   FocusList (Focus 0) ["hello"]
--   </pre>
--   
--   The focus will be updated when prepending:
--   
--   <pre>
--   &gt;&gt;&gt; prependFL "bye" (singletonFL "hello")
--   FocusList (Focus 1) ["bye","hello"]
--   </pre>
--   
--   Prepending to a <a>FocusList</a> will always update the <a>Focus</a>:
--   
--   <pre>
--   (fl ^. lensFocusListFocus) &lt; (prependFL a fl ^. lensFocusListFocus)
--   </pre>
prependFL :: a -> FocusList a -> FocusList a

-- | Unsafely get the <a>Focus</a> from a <a>FocusList</a>. If the
--   <a>Focus</a> is <a>NoFocus</a>, this function returns <a>error</a>.
unsafeGetFLFocus :: FocusList a -> Int

-- | Unsafely get the value of the <a>Focus</a> from a <a>FocusList</a>. If
--   the <a>Focus</a> is <a>NoFocus</a>, this function returns
--   <a>error</a>.
unsafeGetFLFocusItem :: FocusList a -> a
getFLFocusItem :: FocusList a -> Maybe a

-- | Unsafely insert a new <tt>a</tt> in a <a>FocusList</a>. This sets the
--   <a>Int</a> value to <tt>a</tt>. The length of the <a>FocusList</a>
--   will be increased by 1. The <a>FocusList</a>s <a>Focus</a> is not
--   changed.
--   
--   If there is some value in the <a>FocusList</a> already at the
--   <a>Int</a>, then it will be overwritten. Also, the <a>Int</a> is not
--   checked to make sure it is above 0.
--   
--   This function is meant to be used after <a>unsafeShiftUpFrom</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeShiftUpFrom 2 $ unsafeFLFromList (Focus 1) [0,1,200]
--   
--   &gt;&gt;&gt; debugFL $ unsafeInsertNewFL 2 100 fl
--   "FocusList {focusListFocus = Focus 1, focusListLen = 4, focusList = fromList [(0,0),(1,1),(2,100),(3,200)]}"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeFLFromList NoFocus []
--   
--   &gt;&gt;&gt; debugFL $ unsafeInsertNewFL 0 100 fl
--   "FocusList {focusListFocus = NoFocus, focusListLen = 1, focusList = fromList [(0,100)]}"
--   </pre>
unsafeInsertNewFL :: Int -> a -> FocusList a -> FocusList a

-- | This unsafely shifts all values up in a <a>FocusList</a> starting at a
--   given index. It also updates the <a>Focus</a> of the <a>FocusList</a>
--   if it has been shifted. This does not change the length of the
--   <a>FocusList</a>.
--   
--   It does not check that the <a>Int</a> is greater than 0. It also does
--   not check that there is a <a>Focus</a>.
--   
--   <h4><b>EXAMPLES</b></h4>
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeShiftUpFrom 2 $ unsafeFLFromList (Focus 1) [0,1,200]
--   
--   &gt;&gt;&gt; debugFL fl
--   "FocusList {focusListFocus = Focus 1, focusListLen = 3, focusList = fromList [(0,0),(1,1),(3,200)]}"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeShiftUpFrom 1 $ unsafeFLFromList (Focus 1) [0,1,200]
--   
--   &gt;&gt;&gt; debugFL fl
--   "FocusList {focusListFocus = Focus 2, focusListLen = 3, focusList = fromList [(0,0),(2,1),(3,200)]}"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeShiftUpFrom 0 $ unsafeFLFromList (Focus 1) [0,1,200]
--   
--   &gt;&gt;&gt; debugFL fl
--   "FocusList {focusListFocus = Focus 2, focusListLen = 3, focusList = fromList [(1,0),(2,1),(3,200)]}"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeShiftUpFrom 0 $ unsafeFLFromList (Focus 1) [0,1,200]
--   
--   &gt;&gt;&gt; debugFL fl
--   "FocusList {focusListFocus = Focus 2, focusListLen = 3, focusList = fromList [(1,0),(2,1),(3,200)]}"
--   </pre>
unsafeShiftUpFrom :: forall a. Int -> FocusList a -> FocusList a

-- | This is an unsafe lookup function. This assumes that the <a>Int</a>
--   exists in the <a>IntMap</a>.
unsafeLookup :: Int -> IntMap a -> a
lookupFL :: Int -> FocusList a -> Maybe a

-- | Insert a new value into the <a>FocusList</a>. The <a>Focus</a> of the
--   list is changed appropriately.
--   
--   <pre>
--   &gt;&gt;&gt; insertFL 0 "hello" emptyFL
--   Just (FocusList (Focus 0) ["hello"])
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; insertFL 0 "hello" (singletonFL "bye")
--   Just (FocusList (Focus 1) ["hello","bye"])
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; insertFL 1 "hello" (singletonFL "bye")
--   Just (FocusList (Focus 0) ["bye","hello"])
--   </pre>
--   
--   This returns <a>Nothing</a> if the index at which to insert the new
--   value is either less than 0 or greater than the length of the list.
--   
--   <pre>
--   &gt;&gt;&gt; insertFL 100 "hello" emptyFL
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; insertFL 100 "bye" (singletonFL "hello")
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; insertFL (-1) "bye" (singletonFL "hello")
--   Nothing
--   </pre>
insertFL :: Int -> a -> FocusList a -> Maybe (FocusList a)

-- | Unsafely remove a value from a <a>FocusList</a>. It effectively leaves
--   a hole inside the <a>FocusList</a>. It updates the length of the
--   <a>FocusList</a>.
--   
--   This function does not check that a value actually exists in the
--   <a>FocusList</a>. It also does not update the <a>Focus</a>.
--   
--   This function does update the length of the <a>FocusList</a>.
--   
--   <pre>
--   &gt;&gt;&gt; debugFL $ unsafeRemove 1 $ unsafeFLFromList (Focus 0) [0..2]
--   "FocusList {focusListFocus = Focus 0, focusListLen = 2, focusList = fromList [(0,0),(2,2)]}"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; debugFL $ unsafeRemove 0 $ unsafeFLFromList (Focus 0) [0..2]
--   "FocusList {focusListFocus = Focus 0, focusListLen = 2, focusList = fromList [(1,1),(2,2)]}"
--   </pre>
--   
--   Trying to remove the last element is completely safe (unless, of
--   course, it is the <a>Focus</a>):
--   
--   <pre>
--   &gt;&gt;&gt; debugFL $ unsafeRemove 2 $ unsafeFLFromList (Focus 2) [0..2]
--   "FocusList {focusListFocus = Focus 2, focusListLen = 2, focusList = fromList [(0,0),(1,1)]}"
--   </pre>
--   
--   If this function is passed an empty <a>FocusList</a>, it will make the
--   length -1.
--   
--   <pre>
--   &gt;&gt;&gt; debugFL $ unsafeRemove 0 emptyFL
--   "FocusList {focusListFocus = NoFocus, focusListLen = -1, focusList = fromList []}"
--   </pre>
unsafeRemove :: Int -> FocusList a -> FocusList a

-- | This shifts all the values down in a <a>FocusList</a> starting at a
--   given index. It does not change the <a>Focus</a> of the
--   <a>FocusList</a>. It does not change the length of the
--   <a>FocusList</a>.
--   
--   It does not check that shifting elements down will not overwrite other
--   elements. This function is meant to be called after
--   <a>unsafeRemove</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeRemove 1 $ unsafeFLFromList (Focus 0) [0..2]
--   
--   &gt;&gt;&gt; debugFL $ unsafeShiftDownFrom 1 fl
--   "FocusList {focusListFocus = Focus 0, focusListLen = 2, focusList = fromList [(0,0),(1,2)]}"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeRemove 0 $ unsafeFLFromList (Focus 0) [0..2]
--   
--   &gt;&gt;&gt; debugFL $ unsafeShiftDownFrom 0 fl
--   "FocusList {focusListFocus = Focus 0, focusListLen = 2, focusList = fromList [(0,1),(1,2)]}"
--   </pre>
--   
--   Trying to shift down from the last element after it has been removed
--   is a no-op:
--   
--   <pre>
--   &gt;&gt;&gt; let fl = unsafeRemove 2 $ unsafeFLFromList (Focus 0) [0..2]
--   
--   &gt;&gt;&gt; debugFL $ unsafeShiftDownFrom 2 fl
--   "FocusList {focusListFocus = Focus 0, focusListLen = 2, focusList = fromList [(0,0),(1,1)]}"
--   </pre>
unsafeShiftDownFrom :: forall a. Int -> FocusList a -> FocusList a

-- | Remove an element from a <a>FocusList</a>.
--   
--   If the element to remove is not the <a>Focus</a>, then update the
--   <a>Focus</a> accordingly.
--   
--   For example, if the <a>Focus</a> is on index 1, and we have removed
--   index 2, then the focus is not affected, so it is not changed.
--   
--   <pre>
--   &gt;&gt;&gt; let focusList = unsafeFLFromList (Focus 1) ["cat","goat","dog","hello"]
--   
--   &gt;&gt;&gt; removeFL 2 focusList
--   Just (FocusList (Focus 1) ["cat","goat","hello"])
--   </pre>
--   
--   If the <a>Focus</a> is on index 2 and we have removed index 1, then
--   the <a>Focus</a> will be moved back one element to set to index 1.
--   
--   <pre>
--   &gt;&gt;&gt; let focusList = unsafeFLFromList (Focus 2) ["cat","goat","dog","hello"]
--   
--   &gt;&gt;&gt; removeFL 1 focusList
--   Just (FocusList (Focus 1) ["cat","dog","hello"])
--   </pre>
--   
--   If we remove the <a>Focus</a>, then the next item is set to have the
--   <a>Focus</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let focusList = unsafeFLFromList (Focus 0) ["cat","goat","dog","hello"]
--   
--   &gt;&gt;&gt; removeFL 0 focusList
--   Just (FocusList (Focus 0) ["goat","dog","hello"])
--   </pre>
--   
--   If the element to remove is the only element in the list, then the
--   <a>Focus</a> will be set to <a>NoFocus</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let focusList = unsafeFLFromList (Focus 0) ["hello"]
--   
--   &gt;&gt;&gt; removeFL 0 focusList
--   Just (FocusList NoFocus [])
--   </pre>
--   
--   If the <a>Int</a> for the index to remove is either less than 0 or
--   greater then the length of the list, then <a>Nothing</a> is returned.
--   
--   <pre>
--   &gt;&gt;&gt; let focusList = unsafeFLFromList (Focus 0) ["hello"]
--   
--   &gt;&gt;&gt; removeFL (-1) focusList
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let focusList = unsafeFLFromList (Focus 1) ["hello","bye","cat"]
--   
--   &gt;&gt;&gt; removeFL 3 focusList
--   Nothing
--   </pre>
--   
--   If the <a>FocusList</a> passed in is <a>Empty</a>, then <a>Nothing</a>
--   is returned.
--   
--   <pre>
--   &gt;&gt;&gt; removeFL 0 emptyFL
--   Nothing
--   </pre>
removeFL :: Int -> FocusList a -> Maybe (FocusList a)

-- | Find the index of the first element in the <a>FocusList</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["hello", "bye", "tree"]
--   
--   &gt;&gt;&gt; indexOfFL "hello" fl
--   Just 0
--   </pre>
--   
--   If more than one element exists, then return the index of the first
--   one.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["dog", "cat", "cat"]
--   
--   &gt;&gt;&gt; indexOfFL "cat" fl
--   Just 1
--   </pre>
--   
--   If the element doesn't exist, then return <a>Nothing</a>
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["foo", "bar", "baz"]
--   
--   &gt;&gt;&gt; indexOfFL "hogehoge" fl
--   Nothing
--   </pre>
indexOfFL :: Eq a => a -> FocusList a -> Maybe Int

-- | Delete an element from a <a>FocusList</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 0) ["hello", "bye", "tree"]
--   
--   &gt;&gt;&gt; deleteFL "bye" fl
--   FocusList (Focus 0) ["hello","tree"]
--   </pre>
--   
--   The focus will be updated if an item before it is deleted.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["hello", "bye", "tree"]
--   
--   &gt;&gt;&gt; deleteFL "hello" fl
--   FocusList (Focus 0) ["bye","tree"]
--   </pre>
--   
--   If there are multiple matching elements in the <a>FocusList</a>,
--   remove them all.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 0) ["hello", "bye", "bye"]
--   
--   &gt;&gt;&gt; deleteFL "bye" fl
--   FocusList (Focus 0) ["hello"]
--   </pre>
--   
--   If there are no matching elements, return the original
--   <a>FocusList</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 2) ["hello", "good", "bye"]
--   
--   &gt;&gt;&gt; deleteFL "frog" fl
--   FocusList (Focus 2) ["hello","good","bye"]
--   </pre>
deleteFL :: forall a. Eq a => a -> FocusList a -> FocusList a

-- | Set the <a>Focus</a> for a <a>FocusList</a>.
--   
--   This is just like <a>updateFocusFL</a>, but doesn't return the new
--   focused item.
--   
--   <pre>
--   setFocusFL i fl == fmap snd (updateFocusFL i fl)
--   </pre>
setFocusFL :: Int -> FocusList a -> Maybe (FocusList a)

-- | Update the <a>Focus</a> for a <a>FocusList</a> and get the new focused
--   element.
--   
--   <pre>
--   &gt;&gt;&gt; updateFocusFL 1 =&lt;&lt; flFromList (Focus 2) ["hello","bye","dog","cat"]
--   Just ("bye",FocusList (Focus 1) ["hello","bye","dog","cat"])
--   </pre>
--   
--   If the <a>FocusList</a> is empty, then return <a>Nothing</a>.
--   
--   <pre>
--   &gt;&gt;&gt; updateFocusFL 1 emptyFL
--   Nothing
--   </pre>
--   
--   If the new focus is less than 0, or greater than or equal to the
--   length of the <a>FocusList</a>, then return <a>Nothing</a>.
--   
--   <pre>
--   &gt;&gt;&gt; updateFocusFL (-1) =&lt;&lt; flFromList (Focus 2) ["hello","bye","dog","cat"]
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; updateFocusFL 4 =&lt;&lt; flFromList (Focus 2) ["hello","bye","dog","cat"]
--   Nothing
--   </pre>
updateFocusFL :: Int -> FocusList a -> Maybe (a, FocusList a)

-- | Find a value in a <a>FocusList</a>. Similar to
--   <tt>Data.List.<a>find</a></tt>.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["hello", "bye", "tree"]
--   
--   &gt;&gt;&gt; findFL (\_ a -&gt; a == "hello") fl
--   Just (0,"hello")
--   </pre>
--   
--   This will only find the first value.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 0) ["hello", "bye", "bye"]
--   
--   &gt;&gt;&gt; findFL (\_ a -&gt; a == "bye") fl
--   Just (1,"bye")
--   </pre>
--   
--   If no values match the comparison, this will return <a>Nothing</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["hello", "bye", "parrot"]
--   
--   &gt;&gt;&gt; findFL (\_ a -&gt; a == "ball") fl
--   Nothing
--   </pre>
findFL :: (Int -> a -> Bool) -> FocusList a -> Maybe (Int, a)

-- | Move an existing item in a <a>FocusList</a> to a new index.
--   
--   The <a>Focus</a> gets updated appropriately when moving items.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 1) ["hello", "bye", "parrot"]
--   
--   &gt;&gt;&gt; moveFromToFL 0 1 fl
--   Just (FocusList (Focus 0) ["bye","hello","parrot"])
--   </pre>
--   
--   The <a>Focus</a> may not get updated if it is not involved.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 0) ["hello", "bye", "parrot"]
--   
--   &gt;&gt;&gt; moveFromToFL 1 2 fl
--   Just (FocusList (Focus 0) ["hello","parrot","bye"])
--   </pre>
--   
--   If the element with the <a>Focus</a> is moved, then the <a>Focus</a>
--   will be updated appropriately.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 2) ["hello", "bye", "parrot"]
--   
--   &gt;&gt;&gt; moveFromToFL 2 0 fl
--   Just (FocusList (Focus 0) ["parrot","hello","bye"])
--   </pre>
--   
--   If the index of the item to move is out bounds, then <a>Nothing</a>
--   will be returned.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 2) ["hello", "bye", "parrot"]
--   
--   &gt;&gt;&gt; moveFromToFL 3 0 fl
--   Nothing
--   </pre>
--   
--   If the new index is out of bounds, then <a>Nothing</a> wil be
--   returned.
--   
--   <pre>
--   &gt;&gt;&gt; let Just fl = flFromList (Focus 2) ["hello", "bye", "parrot"]
--   
--   &gt;&gt;&gt; moveFromToFL 1 (-1) fl
--   Nothing
--   </pre>
moveFromToFL :: Show a => Int -> Int -> FocusList a -> Maybe (FocusList a)
instance GHC.Base.Functor Termonad.FocusList.FocusList
instance Data.Foldable.Foldable Termonad.FocusList.FocusList
instance Data.Traversable.Traversable Termonad.FocusList.FocusList
instance Data.MonoTraversable.MonoFunctor (Termonad.FocusList.FocusList a)
instance Data.MonoTraversable.MonoFoldable (Termonad.FocusList.FocusList a)
instance Data.MonoTraversable.MonoTraversable (Termonad.FocusList.FocusList a)
instance Test.QuickCheck.Arbitrary.Arbitrary1 Termonad.FocusList.FocusList
instance Test.QuickCheck.Arbitrary.Arbitrary a => Test.QuickCheck.Arbitrary.Arbitrary (Termonad.FocusList.FocusList a)
instance Test.QuickCheck.Arbitrary.CoArbitrary a => Test.QuickCheck.Arbitrary.CoArbitrary (Termonad.FocusList.FocusList a)
instance GHC.Show.Show a => GHC.Show.Show (Termonad.FocusList.FocusList a)
instance GHC.Generics.Generic (Termonad.FocusList.FocusList a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Termonad.FocusList.FocusList a)
instance GHC.Show.Show Termonad.FocusList.Focus
instance GHC.Read.Read Termonad.FocusList.Focus
instance GHC.Generics.Generic Termonad.FocusList.Focus
instance GHC.Classes.Eq Termonad.FocusList.Focus
instance GHC.Classes.Ord Termonad.FocusList.Focus
instance Test.QuickCheck.Arbitrary.CoArbitrary Termonad.FocusList.Focus

module Termonad.Config
data FontConfig
FontConfig :: !Text -> !Int -> FontConfig
[fontFamily] :: FontConfig -> !Text
[fontSize] :: FontConfig -> !Int
lensFontSize :: Lens' FontConfig Int
lensFontFamily :: Lens' FontConfig Text
defaultFontConfig :: FontConfig
data ShowScrollbar
ShowScrollbarNever :: ShowScrollbar
ShowScrollbarAlways :: ShowScrollbar
ShowScrollbarIfNeeded :: ShowScrollbar
data TMConfig
TMConfig :: !FontConfig -> !ShowScrollbar -> !Colour Double -> !Integer -> TMConfig
[fontConfig] :: TMConfig -> !FontConfig
[showScrollbar] :: TMConfig -> !ShowScrollbar
[cursorColor] :: TMConfig -> !Colour Double
[scrollbackLen] :: TMConfig -> !Integer
lensShowScrollbar :: Lens' TMConfig ShowScrollbar
lensScrollbackLen :: Lens' TMConfig Integer
lensFontConfig :: Lens' TMConfig FontConfig
lensCursorColor :: Lens' TMConfig (Colour Double)
defaultTMConfig :: TMConfig
instance GHC.Show.Show Termonad.Config.TMConfig
instance GHC.Classes.Eq Termonad.Config.TMConfig
instance GHC.Show.Show Termonad.Config.ShowScrollbar
instance GHC.Classes.Eq Termonad.Config.ShowScrollbar
instance GHC.Show.Show Termonad.Config.FontConfig
instance GHC.Classes.Eq Termonad.Config.FontConfig

module Termonad.Types
data TMTerm
TMTerm :: !Terminal -> !Int -> !Unique -> TMTerm
[term] :: TMTerm -> !Terminal
[pid] :: TMTerm -> !Int
[unique] :: TMTerm -> !Unique
lensUnique :: Lens' TMTerm Unique
lensTerm :: Lens' TMTerm Terminal
lensPid :: Lens' TMTerm Int
data TMNotebookTab
TMNotebookTab :: !ScrolledWindow -> !TMTerm -> !Label -> TMNotebookTab
[tmNotebookTabTermContainer] :: TMNotebookTab -> !ScrolledWindow
[tmNotebookTabTerm] :: TMNotebookTab -> !TMTerm
[tmNotebookTabLabel] :: TMNotebookTab -> !Label
lensTMNotebookTabTermContainer :: Lens' TMNotebookTab ScrolledWindow
lensTMNotebookTabTerm :: Lens' TMNotebookTab TMTerm
lensTMNotebookTabLabel :: Lens' TMNotebookTab Label
data TMNotebook
TMNotebook :: !Notebook -> !FocusList TMNotebookTab -> TMNotebook
[tmNotebook] :: TMNotebook -> !Notebook
[tmNotebookTabs] :: TMNotebook -> !FocusList TMNotebookTab
lensTMNotebookTabs :: Lens' TMNotebook (FocusList TMNotebookTab)
lensTMNotebook :: Lens' TMNotebook Notebook
data UserRequestedExit
UserRequestedExit :: UserRequestedExit
UserDidNotRequestExit :: UserRequestedExit
data TMState'
TMState :: !Application -> !ApplicationWindow -> !TMNotebook -> !FontDescription -> !TMConfig -> !UserRequestedExit -> TMState'
[tmStateApp] :: TMState' -> !Application
[tmStateAppWin] :: TMState' -> !ApplicationWindow
[tmStateNotebook] :: TMState' -> !TMNotebook
[tmStateFontDesc] :: TMState' -> !FontDescription
[tmStateConfig] :: TMState' -> !TMConfig

-- | This signifies whether or not the user has requested that Termonad
--   exit by either closing all terminals or clicking the exit button. If
--   so, <a>tmStateUserReqExit</a> should have a value of
--   <a>UserRequestedExit</a>. However, if the window manager requested
--   Termonad to exit (probably through the user trying to close Termonad
--   through their window manager), then this will be set to
--   <a>UserDidNotRequestExit</a>.
[tmStateUserReqExit] :: TMState' -> !UserRequestedExit
lensTMStateUserReqExit :: Lens' TMState' UserRequestedExit
lensTMStateNotebook :: Lens' TMState' TMNotebook
lensTMStateFontDesc :: Lens' TMState' FontDescription
lensTMStateConfig :: Lens' TMState' TMConfig
lensTMStateAppWin :: Lens' TMState' ApplicationWindow
lensTMStateApp :: Lens' TMState' Application
type TMState = MVar TMState'
createTMTerm :: Terminal -> Int -> Unique -> TMTerm
newTMTerm :: Terminal -> Int -> IO TMTerm
createTMNotebookTab :: Label -> ScrolledWindow -> TMTerm -> TMNotebookTab
createTMNotebook :: Notebook -> FocusList TMNotebookTab -> TMNotebook
createEmptyTMNotebook :: Notebook -> TMNotebook
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 ()
pTraceShowMTMState :: TMState -> IO ()
getFocusedTermFromState :: TMState -> IO (Maybe Terminal)
setUserRequestedExit :: TMState -> IO ()
getUserRequestedExit :: TMState -> IO UserRequestedExit
instance GHC.Classes.Eq Termonad.Types.TMTerm
instance GHC.Classes.Eq Termonad.Types.TMNotebookTab
instance GHC.Show.Show Termonad.Types.UserRequestedExit
instance GHC.Classes.Eq Termonad.Types.UserRequestedExit
instance GHC.Show.Show Termonad.Types.TMState'
instance GHC.Show.Show Termonad.Types.TMNotebook
instance GHC.Show.Show Termonad.Types.TMNotebookTab
instance GHC.Show.Show Termonad.Types.TMTerm

module Termonad.Term
focusTerm :: Int -> TMState -> IO ()
altNumSwitchTerm :: Int -> TMState -> IO ()
termExitFocused :: TMState -> IO ()
termExitWithConfirmation :: TMNotebookTab -> TMState -> IO ()
termExit :: TMNotebookTab -> TMState -> IO ()
relabelTabs :: TMState -> IO ()
relabelTab :: Notebook -> Label -> ScrolledWindow -> Terminal -> IO ()
showScrollbarToPolicy :: ShowScrollbar -> PolicyType
createScrolledWin :: TMState -> IO ScrolledWindow
createNotebookTabLabel :: IO (Box, Label, Button)
getCursorColor :: TMConfig -> 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)
createTerm :: (TMState -> EventKey -> IO Bool) -> TMState -> IO TMTerm

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

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

module Termonad.App
setupScreenStyle :: IO ()
createFontDesc :: TMConfig -> IO FontDescription
compareScrolledWinAndTab :: ScrolledWindow -> a -> TMNotebookTab -> Bool
updateFLTabPos :: TMState -> Int -> Int -> IO ()
exitWithConfirmation :: TMState -> IO ()
exitWithConfirmationDialog :: TMState -> IO ResponseType
quit :: TMState -> IO ()
setupTermonad :: TMConfig -> Application -> ApplicationWindow -> Builder -> IO ()
appActivate :: TMConfig -> Application -> IO ()
showAboutDialog :: Application -> IO ()
appStartup :: Application -> IO ()
start :: TMConfig -> IO ()
defaultMain :: TMConfig -> IO ()

module Termonad
defaultMain :: TMConfig -> IO ()
