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


-- | A standard library for Haskell
--   
--   See README and Haddocks at <a>https://www.stackage.org/package/rio</a>
@package rio
@version 0.1.24.0


-- | Lazy <tt>ByteString</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.ByteString.Lazy.Partial as BL'
--   </pre>
module RIO.ByteString.Lazy.Partial
head :: HasCallStack => ByteString -> Word8
last :: HasCallStack => ByteString -> Word8
tail :: HasCallStack => ByteString -> ByteString
init :: HasCallStack => ByteString -> ByteString
foldl1 :: HasCallStack => (Word8 -> Word8 -> Word8) -> ByteString -> Word8
foldl1' :: HasCallStack => (Word8 -> Word8 -> Word8) -> ByteString -> Word8
foldr1 :: HasCallStack => (Word8 -> Word8 -> Word8) -> ByteString -> Word8
maximum :: HasCallStack => ByteString -> Word8
minimum :: HasCallStack => ByteString -> Word8


-- | Strict <tt>ByteString</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.ByteString.Partial as B'
--   </pre>
module RIO.ByteString.Partial
head :: HasCallStack => ByteString -> Word8
last :: HasCallStack => ByteString -> Word8
tail :: HasCallStack => ByteString -> ByteString
init :: HasCallStack => ByteString -> ByteString
foldl1 :: HasCallStack => (Word8 -> Word8 -> Word8) -> ByteString -> Word8
foldl1' :: HasCallStack => (Word8 -> Word8 -> Word8) -> ByteString -> Word8
foldr1 :: HasCallStack => (Word8 -> Word8 -> Word8) -> ByteString -> Word8
foldr1' :: HasCallStack => (Word8 -> Word8 -> Word8) -> ByteString -> Word8
maximum :: HasCallStack => ByteString -> Word8
minimum :: HasCallStack => ByteString -> Word8


-- | Unicode <tt>Char</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Char as C
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.Char.Partial</a>
module RIO.Char
data Char
isControl :: Char -> Bool
isSpace :: Char -> Bool
isLower :: Char -> Bool
isUpper :: Char -> Bool
isAlpha :: Char -> Bool
isAlphaNum :: Char -> Bool
isPrint :: Char -> Bool
isDigit :: Char -> Bool
isOctDigit :: Char -> Bool
isHexDigit :: Char -> Bool
isLetter :: Char -> Bool
isMark :: Char -> Bool
isNumber :: Char -> Bool
isPunctuation :: Char -> Bool
isSymbol :: Char -> Bool
isSeparator :: Char -> Bool
isAscii :: Char -> Bool
isLatin1 :: Char -> Bool
isAsciiUpper :: Char -> Bool
isAsciiLower :: Char -> Bool
data GeneralCategory
UppercaseLetter :: GeneralCategory
LowercaseLetter :: GeneralCategory
TitlecaseLetter :: GeneralCategory
ModifierLetter :: GeneralCategory
OtherLetter :: GeneralCategory
NonSpacingMark :: GeneralCategory
SpacingCombiningMark :: GeneralCategory
EnclosingMark :: GeneralCategory
DecimalNumber :: GeneralCategory
LetterNumber :: GeneralCategory
OtherNumber :: GeneralCategory
ConnectorPunctuation :: GeneralCategory
DashPunctuation :: GeneralCategory
OpenPunctuation :: GeneralCategory
ClosePunctuation :: GeneralCategory
InitialQuote :: GeneralCategory
FinalQuote :: GeneralCategory
OtherPunctuation :: GeneralCategory
MathSymbol :: GeneralCategory
CurrencySymbol :: GeneralCategory
ModifierSymbol :: GeneralCategory
OtherSymbol :: GeneralCategory
Space :: GeneralCategory
LineSeparator :: GeneralCategory
ParagraphSeparator :: GeneralCategory
Control :: GeneralCategory
Format :: GeneralCategory
Surrogate :: GeneralCategory
PrivateUse :: GeneralCategory
NotAssigned :: GeneralCategory
generalCategory :: Char -> GeneralCategory
toUpper :: Char -> Char
toLower :: Char -> Char
toTitle :: Char -> Char
ord :: Char -> Int
showLitChar :: Char -> ShowS
lexLitChar :: ReadS String
readLitChar :: ReadS Char


-- | Unicode <tt>Char</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Char.Partial as C'
--   </pre>
module RIO.Char.Partial
digitToInt :: Char -> Int
intToDigit :: Int -> Char
chr :: Int -> Char

module RIO.Directory


-- | <h2>Rationale</h2>
--   
--   This module offers functions to handle files that offer better
--   durability and/or atomicity.
--   
--   See <a>UnliftIO.IO.File</a> for the rationale behind this module,
--   since all of the functions were moved upstream and are now simply
--   re-exported from here.
module RIO.File

-- | Unlifted version of <a>withBinaryFile</a>.
withBinaryFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a

-- | Lifted version of <a>writeFile</a>
writeBinaryFile :: MonadIO m => FilePath -> ByteString -> m ()

-- | Perform an action on a new or existing file at the destination file
--   path. If previously the file existed at the supplied file path then:
--   
--   <ul>
--   <li>in case of <a>WriteMode</a> it will be overwritten</li>
--   <li>upon <a>ReadWriteMode</a> or <a>AppendMode</a> files contents will
--   be copied over into a temporary file, thus making sure no corruption
--   can happen to an existing file upon any failures, even catastrophic
--   one, yet its contents are availble for modification.</li>
--   <li>There is nothing atomic about <a>ReadMode</a>, so no special
--   treatment there.</li>
--   </ul>
--   
--   It is similar to <a>withBinaryFileDurableAtomic</a>, but without the
--   durability part. It means that all modification can still disappear
--   after it has been succesfully written due to some extreme event like
--   an abrupt power loss, but the contents will not be corrupted in case
--   when the file write did not end successfully.
--   
--   The same performance caveats apply as for
--   <a>withBinaryFileDurableAtomic</a> due to making a copy of the content
--   of existing files during non-truncating writes.
--   
--   <b>Important</b> - Do not close the handle, otherwise it will result
--   in <tt>invalid argument (Bad file descriptor)</tt> exception
--   
--   <b>Note</b> - on Linux operating system and only with supported file
--   systems an anonymous temporary file will be used while working on the
--   file (see <tt>O_TMPFILE</tt> in <tt>man openat</tt>). In case when
--   such feature is not available or not supported a temporary file
--   ".target-file-nameXXX.ext.tmp", where XXX is some random number, will
--   be created alongside the target file in the same directory
withBinaryFileAtomic :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r

-- | Same as <a>writeBinaryFileDurableAtomic</a>, except it does not
--   guarantee durability.
--   
--   <h3>Cross-Platform support</h3>
--   
--   This function behaves the same as <a>writeBinaryFile</a> on Windows
--   platforms.
writeBinaryFileAtomic :: MonadIO m => FilePath -> ByteString -> m ()

-- | Opens a file with the following guarantees:
--   
--   <ul>
--   <li>It successfully closes the file in case of an asynchronous
--   exception</li>
--   <li>It reliably saves the file in the correct directory; including
--   edge case situations like a different device being mounted to the
--   current directory, or the current directory being renamed to some
--   other name while the file is being used.</li>
--   <li>It ensures durability by executing an <tt>fsync()</tt> call before
--   closing the file handle</li>
--   </ul>
--   
--   <h3>Cross-Platform support</h3>
--   
--   This function behaves the same as <a>withBinaryFile</a> on Windows
--   platforms.
withBinaryFileDurable :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r

-- | Similar to <a>writeBinaryFile</a>, but it also ensures that changes
--   executed to the file are guaranteed to be durable. It internally uses
--   <tt>fsync()</tt> and makes sure it synchronizes the file on disk.
--   
--   <h3>Cross-Platform support</h3>
--   
--   This function behaves the same as <a>writeBinaryFile</a> on Windows
--   platforms.
writeBinaryFileDurable :: MonadIO m => FilePath -> ByteString -> m ()

-- | After a file is closed, this function opens it again and executes
--   <tt>fsync()</tt> internally on both the file and the directory that
--   contains it. Note that this function is intended to work around the
--   non-durability of existing file APIs, as opposed to being necessary
--   for the API functions provided in this module.
--   
--   <a>The effectiveness of calling this function is debatable</a>, as it
--   relies on internal implementation details at the Kernel level that
--   might change. We argue that, despite this fact, calling this function
--   may bring benefits in terms of durability.
--   
--   This function does not provide the same guarantee as if you would open
--   and modify a file using <a>withBinaryFileDurable</a> or
--   <a>writeBinaryFileDurable</a>, since they ensure that the
--   <tt>fsync()</tt> is called before the file is closed, so if possible
--   use those instead.
--   
--   <h3>Cross-Platform support</h3>
--   
--   This function is a noop on Windows platforms.
ensureFileDurable :: MonadIO m => FilePath -> m ()

-- | Opens a file with the following guarantees:
--   
--   <ul>
--   <li>It successfully closes the file in case of an asynchronous
--   exception</li>
--   <li>It reliably saves the file in the correct directory; including
--   edge case situations like a different device being mounted to the
--   current directory, or the current directory being renamed to some
--   other name while the file is being used.</li>
--   <li>It ensures durability by executing an <tt>fsync()</tt> call before
--   closing the file handle</li>
--   <li>It keeps all changes in a temporary file, and after it is closed
--   it atomically moves the temporary file to the original filepath, in
--   case of catastrophic failure, the original file stays unaffected.</li>
--   </ul>
--   
--   If you do not need durability but only atomicity, use
--   <a>withBinaryFileAtomic</a> instead, which is faster as it does not
--   perform <tt>fsync()</tt>.
--   
--   <b>Important</b> - Make sure not to close the <a>Handle</a>, it will
--   be closed for you, otherwise it will result in <tt>invalid argument
--   (Bad file descriptor)</tt> exception.
--   
--   <h3>Performance Considerations</h3>
--   
--   When using a writable but non-truncating <a>IOMode</a> (i.e.
--   <a>ReadWriteMode</a> and <a>AppendMode</a>), this function performs a
--   copy operation of the specified input file to guarantee the original
--   file is intact in case of a catastrophic failure (no partial writes).
--   This approach may be prohibitive in scenarios where the input file is
--   expected to be large in size.
--   
--   <h3>Cross-Platform support</h3>
--   
--   This function behaves the same as <a>withBinaryFile</a> on Windows
--   platforms.
withBinaryFileDurableAtomic :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r

-- | Similar to <a>writeBinaryFile</a>, but it also guarantes that changes
--   executed to the file are durable, also, in case of failure, the
--   modified file is never going to get corrupted. It internally uses
--   <tt>fsync()</tt> and makes sure it synchronizes the file on disk.
--   
--   <h3>Cross-Platform support</h3>
--   
--   This function behaves the same as <a>writeBinaryFile</a> on Windows
--   platforms.
writeBinaryFileDurableAtomic :: MonadIO m => FilePath -> ByteString -> m ()

module RIO.FilePath
type FilePath = String
addExtension :: FilePath -> String -> FilePath
makeRelative :: FilePath -> FilePath -> FilePath
isPathSeparator :: Char -> Bool
pathSeparator :: Char
normalise :: FilePath -> FilePath
(-<.>) :: FilePath -> String -> FilePath
(<.>) :: FilePath -> String -> FilePath
(</>) :: FilePath -> FilePath -> FilePath
addTrailingPathSeparator :: FilePath -> FilePath
combine :: FilePath -> FilePath -> FilePath
dropDrive :: FilePath -> FilePath
dropExtension :: FilePath -> FilePath
dropExtensions :: FilePath -> FilePath
dropFileName :: FilePath -> FilePath
dropTrailingPathSeparator :: FilePath -> FilePath
equalFilePath :: FilePath -> FilePath -> Bool
extSeparator :: Char
hasDrive :: FilePath -> Bool
hasExtension :: FilePath -> Bool
hasTrailingPathSeparator :: FilePath -> Bool
isAbsolute :: FilePath -> Bool
isDrive :: FilePath -> Bool
isExtSeparator :: Char -> Bool
isExtensionOf :: String -> FilePath -> Bool
isRelative :: FilePath -> Bool
isSearchPathSeparator :: Char -> Bool
isValid :: FilePath -> Bool
joinDrive :: FilePath -> FilePath -> FilePath
joinPath :: [FilePath] -> FilePath
makeValid :: FilePath -> FilePath
pathSeparators :: [Char]
replaceBaseName :: FilePath -> String -> FilePath
replaceDirectory :: FilePath -> String -> FilePath
replaceExtension :: FilePath -> String -> FilePath
replaceExtensions :: FilePath -> String -> FilePath
replaceFileName :: FilePath -> String -> FilePath
searchPathSeparator :: Char
splitDirectories :: FilePath -> [FilePath]
splitDrive :: FilePath -> (FilePath, FilePath)
splitExtension :: FilePath -> (String, String)
splitExtensions :: FilePath -> (FilePath, String)
splitFileName :: FilePath -> (String, String)
splitPath :: FilePath -> [FilePath]
splitSearchPath :: String -> [FilePath]
stripExtension :: String -> FilePath -> Maybe FilePath
takeBaseName :: FilePath -> String
takeDirectory :: FilePath -> FilePath
takeDrive :: FilePath -> FilePath
takeExtension :: FilePath -> String
takeExtensions :: FilePath -> String
takeFileName :: FilePath -> FilePath

-- | Lifted version of <a>getSearchPath</a>
getSearchPath :: MonadIO m => m [FilePath]


-- | Strict <tt>Map</tt> with hashed keys. Import as:
--   
--   <pre>
--   import qualified RIO.HashMap as HM
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.HashMap.Partial</a>
module RIO.HashMap

-- | A map from keys to values. A map cannot contain duplicate keys; each
--   key can map to at most one value.
data HashMap k v

-- | &lt;math&gt; Construct an empty map.
empty :: HashMap k v

-- | &lt;math&gt; Construct a map with a single element.
singleton :: Hashable k => k -> v -> HashMap k v

-- | &lt;math&gt; Return <a>True</a> if this map is empty, <a>False</a>
--   otherwise.
null :: HashMap k v -> Bool

-- | &lt;math&gt; Return the number of key-value mappings in this map.
size :: HashMap k v -> Int

-- | &lt;math&gt; Return <a>True</a> if the specified key is present in the
--   map, <a>False</a> otherwise.
member :: (Eq k, Hashable k) => k -> HashMap k a -> Bool

-- | &lt;math&gt; Return the value to which the specified key is mapped, or
--   <a>Nothing</a> if this map contains no mapping for the key.
lookup :: (Eq k, Hashable k) => k -> HashMap k v -> Maybe v

-- | &lt;math&gt; Return the value to which the specified key is mapped, or
--   the default value if this map contains no mapping for the key.
--   
--   DEPRECATED: lookupDefault is deprecated as of version 0.2.11, replaced
--   by <a>findWithDefault</a>.
lookupDefault :: (Eq k, Hashable k) => v -> k -> HashMap k v -> v

-- | &lt;math&gt; Associate the specified value with the specified key in
--   this map. If this map previously contained a mapping for the key, the
--   old value is replaced.
insert :: (Eq k, Hashable k) => k -> v -> HashMap k v -> HashMap k v

-- | &lt;math&gt; Associate the value with the key in this map. If this map
--   previously contained a mapping for the key, the old value is replaced
--   by the result of applying the given function to the new and old value.
--   Example:
--   
--   <pre>
--   insertWith f k v map
--     where f new old = new + old
--   </pre>
insertWith :: (Eq k, Hashable k) => (v -> v -> v) -> k -> v -> HashMap k v -> HashMap k v

-- | &lt;math&gt; Remove the mapping for the specified key from this map if
--   present.
delete :: (Eq k, Hashable k) => k -> HashMap k v -> HashMap k v

-- | &lt;math&gt; Adjust the value tied to a given key in this map only if
--   it is present. Otherwise, leave the map alone.
adjust :: (Eq k, Hashable k) => (v -> v) -> k -> HashMap k v -> HashMap k v

-- | &lt;math&gt; The expression <tt>(<a>update</a> f k map)</tt> updates
--   the value <tt>x</tt> at <tt>k</tt> (if it is in the map). If <tt>(f
--   x)</tt> is <a>Nothing</a>, the element is deleted. If it is
--   <tt>(<a>Just</a> y)</tt>, the key <tt>k</tt> is bound to the new value
--   <tt>y</tt>.
update :: (Eq k, Hashable k) => (a -> Maybe a) -> k -> HashMap k a -> HashMap k a

-- | &lt;math&gt; The expression <tt>(<a>alter</a> f k map)</tt> alters the
--   value <tt>x</tt> at <tt>k</tt>, or absence thereof.
--   
--   <a>alter</a> can be used to insert, delete, or update a value in a
--   map. In short:
--   
--   <pre>
--   <tt>lookup</tt> k (<a>alter</a> f k m) = f (<tt>lookup</tt> k m)
--   </pre>
alter :: (Eq k, Hashable k) => (Maybe v -> Maybe v) -> k -> HashMap k v -> HashMap k v

-- | &lt;math&gt; The union of two maps. If a key occurs in both maps, the
--   mapping from the first will be the mapping in the result.
--   
--   <h4><b>Examples</b></h4>
--   
--   <pre>
--   &gt;&gt;&gt; union (fromList [(1,'a'),(2,'b')]) (fromList [(2,'c'),(3,'d')])
--   fromList [(1,'a'),(2,'b'),(3,'d')]
--   </pre>
union :: Eq k => HashMap k v -> HashMap k v -> HashMap k v

-- | &lt;math&gt; The union of two maps. If a key occurs in both maps, the
--   provided function (first argument) will be used to compute the result.
unionWith :: Eq k => (v -> v -> v) -> HashMap k v -> HashMap k v -> HashMap k v

-- | &lt;math&gt; The union of two maps. If a key occurs in both maps, the
--   provided function (first argument) will be used to compute the result.
unionWithKey :: Eq k => (k -> v -> v -> v) -> HashMap k v -> HashMap k v -> HashMap k v

-- | Construct a set containing all elements from a list of sets.
unions :: Eq k => [HashMap k v] -> HashMap k v

-- | &lt;math&gt; Transform this map by applying a function to every value.
map :: (v1 -> v2) -> HashMap k v1 -> HashMap k v2

-- | &lt;math&gt; Transform this map by applying a function to every value.
mapWithKey :: (k -> v1 -> v2) -> HashMap k v1 -> HashMap k v2

-- | &lt;math&gt; Perform an <a>Applicative</a> action for each key-value
--   pair in a <a>HashMap</a> and produce a <a>HashMap</a> of all the
--   results. Each <a>HashMap</a> will be strict in all its values.
--   
--   <pre>
--   traverseWithKey f = fmap (<a>map</a> id) . <a>Data.HashMap.Lazy</a>.<a>traverseWithKey</a> f
--   </pre>
--   
--   Note: the order in which the actions occur is unspecified. In
--   particular, when the map contains hash collisions, the order in which
--   the actions associated with the keys involved will depend in an
--   unspecified way on their insertion order.
traverseWithKey :: Applicative f => (k -> v1 -> f v2) -> HashMap k v1 -> f (HashMap k v2)

-- | &lt;math&gt; Difference of two maps. Return elements of the first map
--   not existing in the second.
difference :: (Eq k, Hashable k) => HashMap k v -> HashMap k w -> HashMap k v

-- | &lt;math&gt; Difference with a combining function. When two equal keys
--   are encountered, the combining function is applied to the values of
--   these keys. If it returns <a>Nothing</a>, the element is discarded
--   (proper set difference). If it returns (<tt><a>Just</a> y</tt>), the
--   element is updated with a new value <tt>y</tt>.
differenceWith :: (Eq k, Hashable k) => (v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v

-- | &lt;math&gt; Intersection of two maps. Return elements of the first
--   map for keys existing in the second.
intersection :: Eq k => HashMap k v -> HashMap k w -> HashMap k v

-- | &lt;math&gt; Intersection of two maps. If a key occurs in both maps
--   the provided function is used to combine the values from the two maps.
intersectionWith :: Eq k => (v1 -> v2 -> v3) -> HashMap k v1 -> HashMap k v2 -> HashMap k v3

-- | &lt;math&gt; Intersection of two maps. If a key occurs in both maps
--   the provided function is used to combine the values from the two maps.
intersectionWithKey :: Eq k => (k -> v1 -> v2 -> v3) -> HashMap k v1 -> HashMap k v2 -> HashMap k v3

-- | &lt;math&gt; Reduce this map by applying a binary operator to all
--   elements, using the given starting value (typically the left-identity
--   of the operator). Each application of the operator is evaluated before
--   using the result in the next application. This function is strict in
--   the starting value.
foldl' :: (a -> v -> a) -> a -> HashMap k v -> a

-- | &lt;math&gt; Reduce this map by applying a binary operator to all
--   elements, using the given starting value (typically the left-identity
--   of the operator). Each application of the operator is evaluated before
--   using the result in the next application. This function is strict in
--   the starting value.
foldlWithKey' :: (a -> k -> v -> a) -> a -> HashMap k v -> a

-- | &lt;math&gt; Reduce this map by applying a binary operator to all
--   elements, using the given starting value (typically the right-identity
--   of the operator).
foldr :: (v -> a -> a) -> a -> HashMap k v -> a

-- | &lt;math&gt; Reduce this map by applying a binary operator to all
--   elements, using the given starting value (typically the right-identity
--   of the operator).
foldrWithKey :: (k -> v -> a -> a) -> a -> HashMap k v -> a

-- | &lt;math&gt; Filter this map by retaining only elements which values
--   satisfy a predicate.
filter :: (v -> Bool) -> HashMap k v -> HashMap k v

-- | &lt;math&gt; Filter this map by retaining only elements satisfying a
--   predicate.
filterWithKey :: (k -> v -> Bool) -> HashMap k v -> HashMap k v

-- | &lt;math&gt; Transform this map by applying a function to every value
--   and retaining only some of them.
mapMaybe :: (v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

-- | &lt;math&gt; Transform this map by applying a function to every value
--   and retaining only some of them.
mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2

-- | &lt;math&gt; Return a list of this map's keys. The list is produced
--   lazily.
keys :: HashMap k v -> [k]

-- | &lt;math&gt; Return a list of this map's values. The list is produced
--   lazily.
elems :: HashMap k v -> [v]

-- | &lt;math&gt; Return a list of this map's elements. The list is
--   produced lazily. The order of its elements is unspecified, and it may
--   change from version to version of either this package or of
--   <tt>hashable</tt>.
toList :: HashMap k v -> [(k, v)]

-- | &lt;math&gt; Construct a map with the supplied mappings. If the list
--   contains duplicate mappings, the later mappings take precedence.
fromList :: (Eq k, Hashable k) => [(k, v)] -> HashMap k v

-- | &lt;math&gt; Construct a map from a list of elements. Uses the
--   provided function <tt>f</tt> to merge duplicate entries with <tt>(f
--   newVal oldVal)</tt>.
--   
--   <h3>Examples</h3>
--   
--   Given a list <tt>xs</tt>, create a map with the number of occurrences
--   of each element in <tt>xs</tt>:
--   
--   <pre>
--   let xs = ['a', 'b', 'a']
--   in fromListWith (+) [ (x, 1) | x &lt;- xs ]
--   
--   = fromList [('a', 2), ('b', 1)]
--   </pre>
--   
--   Given a list of key-value pairs <tt>xs :: [(k, v)]</tt>, group all
--   values by their keys and return a <tt>HashMap k [v]</tt>.
--   
--   <pre>
--   let xs = ('a', 1), ('b', 2), ('a', 3)]
--   in fromListWith (++) [ (k, [v]) | (k, v) &lt;- xs ]
--   
--   = fromList [('a', [3, 1]), ('b', [2])]
--   </pre>
--   
--   Note that the lists in the resulting map contain elements in reverse
--   order from their occurrences in the original list.
--   
--   More generally, duplicate entries are accumulated as follows; this
--   matters when <tt>f</tt> is not commutative or not associative.
--   
--   <pre>
--   fromListWith f [(k, a), (k, b), (k, c), (k, d)]
--   = fromList [(k, f d (f c (f b a)))]
--   </pre>
fromListWith :: (Eq k, Hashable k) => (v -> v -> v) -> [(k, v)] -> HashMap k v


-- | Strict <tt>HashMap</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.HashMap.Partial as HM'
--   </pre>
module RIO.HashMap.Partial

-- | &lt;math&gt; Return the value to which the specified key is mapped.
--   Calls <a>error</a> if this map contains no mapping for the key.
(!) :: (Eq k, Hashable k, HasCallStack) => HashMap k v -> k -> v
infixl 9 !


-- | <tt>Set</tt> with hashed members. Import as:
--   
--   <pre>
--   import qualified RIO.HashSet as HS
--   </pre>
module RIO.HashSet

-- | A set of values. A set cannot contain duplicate values.
data HashSet a

-- | &lt;math&gt; Construct an empty set.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.empty
--   fromList []
--   </pre>
empty :: HashSet a

-- | &lt;math&gt; Construct a set with a single element.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.singleton 1
--   fromList [1]
--   </pre>
singleton :: Hashable a => a -> HashSet a

-- | &lt;math&gt; Construct a set containing all elements from both sets.
--   
--   To obtain good performance, the smaller set must be presented as the
--   first argument.
--   
--   <pre>
--   &gt;&gt;&gt; union (fromList [1,2]) (fromList [2,3])
--   fromList [1,2,3]
--   </pre>
union :: Eq a => HashSet a -> HashSet a -> HashSet a

-- | Construct a set containing all elements from a list of sets.
unions :: Eq a => [HashSet a] -> HashSet a

-- | &lt;math&gt; Return <a>True</a> if this set is empty, <a>False</a>
--   otherwise.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.null HashSet.empty
--   True
--   
--   &gt;&gt;&gt; HashSet.null (HashSet.singleton 1)
--   False
--   </pre>
null :: HashSet a -> Bool

-- | &lt;math&gt; Return the number of elements in this set.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.size HashSet.empty
--   0
--   
--   &gt;&gt;&gt; HashSet.size (HashSet.fromList [1,2,3])
--   3
--   </pre>
size :: HashSet a -> Int

-- | &lt;math&gt; Return <a>True</a> if the given value is present in this
--   set, <a>False</a> otherwise.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.member 1 (Hashset.fromList [1,2,3])
--   True
--   
--   &gt;&gt;&gt; HashSet.member 1 (Hashset.fromList [4,5,6])
--   False
--   </pre>
member :: (Eq a, Hashable a) => a -> HashSet a -> Bool

-- | &lt;math&gt; Add the specified value to this set.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.insert 1 HashSet.empty
--   fromList [1]
--   </pre>
insert :: (Eq a, Hashable a) => a -> HashSet a -> HashSet a

-- | &lt;math&gt; Remove the specified value from this set if present.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.delete 1 (HashSet.fromList [1,2,3])
--   fromList [2,3]
--   
--   &gt;&gt;&gt; HashSet.delete 1 (HashSet.fromList [4,5,6])
--   fromList [4,5,6]
--   </pre>
delete :: (Eq a, Hashable a) => a -> HashSet a -> HashSet a

-- | &lt;math&gt; Transform this set by applying a function to every value.
--   The resulting set may be smaller than the source.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.map show (HashSet.fromList [1,2,3])
--   HashSet.fromList ["1","2","3"]
--   </pre>
map :: (Hashable b, Eq b) => (a -> b) -> HashSet a -> HashSet b

-- | &lt;math&gt; Difference of two sets. Return elements of the first set
--   not existing in the second.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.difference (HashSet.fromList [1,2,3]) (HashSet.fromList [2,3,4])
--   fromList [1]
--   </pre>
difference :: (Eq a, Hashable a) => HashSet a -> HashSet a -> HashSet a

-- | &lt;math&gt; Intersection of two sets. Return elements present in both
--   the first set and the second.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.intersection (HashSet.fromList [1,2,3]) (HashSet.fromList [2,3,4])
--   fromList [2,3]
--   </pre>
intersection :: Eq a => HashSet a -> HashSet a -> HashSet a

-- | &lt;math&gt; Reduce this set by applying a binary operator to all
--   elements, using the given starting value (typically the left-identity
--   of the operator). Each application of the operator is evaluated before
--   before using the result in the next application. This function is
--   strict in the starting value.
foldl' :: (a -> b -> a) -> a -> HashSet b -> a

-- | &lt;math&gt; Reduce this set by applying a binary operator to all
--   elements, using the given starting value (typically the right-identity
--   of the operator).
foldr :: (b -> a -> a) -> a -> HashSet b -> a

-- | &lt;math&gt; Filter this set by retaining only elements satisfying a
--   predicate.
filter :: (a -> Bool) -> HashSet a -> HashSet a

-- | &lt;math&gt; Return a list of this set's elements. The list is
--   produced lazily. The order of its elements is unspecified, and it may
--   change from version to version of either this package or of
--   <tt>hashable</tt>.
toList :: HashSet a -> [a]

-- | &lt;math&gt; Construct a set from a list of elements.
fromList :: (Eq a, Hashable a) => [a] -> HashSet a

-- | &lt;math&gt; Convert to set to the equivalent <a>HashMap</a> with
--   <tt>()</tt> values.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.toMap (HashSet.singleton 1)
--   fromList [(1,())]
--   </pre>
toMap :: HashSet a -> HashMap a ()

-- | &lt;math&gt; Convert from the equivalent <a>HashMap</a> with
--   <tt>()</tt> values.
--   
--   <pre>
--   &gt;&gt;&gt; HashSet.fromMap (HashMap.singleton 1 ())
--   fromList [1]
--   </pre>
fromMap :: HashMap a () -> HashSet a


-- | Extra utilities from <tt>microlens</tt>.
--   
--   @since: 0.1.16.0
module RIO.Lens

-- | A <tt>SimpleFold s a</tt> extracts several <tt>a</tt>s from
--   <tt>s</tt>; so, it's pretty much the same thing as <tt>(s -&gt;
--   [a])</tt>, but you can use it with lens operators.
--   
--   The actual <tt>Fold</tt> from lens is more general:
--   
--   <pre>
--   type Fold s a =
--     forall f. (Contravariant f, Applicative f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s
--   </pre>
--   
--   There are several functions in lens that accept lens's <tt>Fold</tt>
--   but won't accept <a>SimpleFold</a>; I'm aware of
--   <tt><a>takingWhile</a></tt>, <tt><a>droppingWhile</a></tt>,
--   <tt><a>backwards</a></tt>, <tt><a>foldByOf</a></tt>,
--   <tt><a>foldMapByOf</a></tt>. For this reason, try not to export
--   <a>SimpleFold</a>s if at all possible. <a>microlens-contra</a>
--   provides a fully lens-compatible <tt>Fold</tt>.
--   
--   Lens users: you can convert a <a>SimpleFold</a> to <tt>Fold</tt> by
--   applying <tt>folded . toListOf</tt> to it.
type SimpleFold s a = forall r. Monoid r => Getting r s a

-- | <a>toListOf</a> is a synonym for (<a>^..</a>).
toListOf :: Getting (Endo [a]) s a -> s -> [a]

-- | <a>has</a> checks whether a getter (any getter, including lenses,
--   traversals, and folds) returns at least 1 value.
--   
--   Checking whether a list is non-empty:
--   
--   <pre>
--   &gt;&gt;&gt; has each []
--   False
--   </pre>
--   
--   You can also use it with e.g. <a>_Left</a> (and other 0-or-1
--   traversals) as a replacement for <a>isNothing</a>, <a>isJust</a> and
--   other <tt>isConstructorName</tt> functions:
--   
--   <pre>
--   &gt;&gt;&gt; has _Left (Left 1)
--   True
--   </pre>
has :: Getting Any s a -> s -> Bool

-- | Gives access to the 1st field of a tuple (up to 5-tuples).
--   
--   Getting the 1st component:
--   
--   <pre>
--   &gt;&gt;&gt; (1,2,3,4,5) ^. _1
--   1
--   </pre>
--   
--   Setting the 1st component:
--   
--   <pre>
--   &gt;&gt;&gt; (1,2,3) &amp; _1 .~ 10
--   (10,2,3)
--   </pre>
--   
--   Note that this lens is lazy, and can set fields even of
--   <a>undefined</a>:
--   
--   <pre>
--   &gt;&gt;&gt; set _1 10 undefined :: (Int, Int)
--   (10,*** Exception: Prelude.undefined
--   </pre>
--   
--   This is done to avoid violating a lens law stating that you can get
--   back what you put:
--   
--   <pre>
--   &gt;&gt;&gt; view _1 . set _1 10 $ (undefined :: (Int, Int))
--   10
--   </pre>
--   
--   The implementation (for 2-tuples) is:
--   
--   <pre>
--   <a>_1</a> f t = (,) <a>&lt;$&gt;</a> f    (<a>fst</a> t)
--                <a>&lt;*&gt;</a> <a>pure</a> (<a>snd</a> t)
--   </pre>
--   
--   or, alternatively,
--   
--   <pre>
--   <a>_1</a> f ~(a,b) = (\a' -&gt; (a',b)) <a>&lt;$&gt;</a> f a
--   </pre>
--   
--   (where <tt>~</tt> means a <a>lazy pattern</a>).
--   
--   <a>_2</a>, <a>_3</a>, <a>_4</a>, and <a>_5</a> are also available (see
--   below).
_1 :: Field1 s t a b => Lens s t a b
_2 :: Field2 s t a b => Lens s t a b
_3 :: Field3 s t a b => Lens s t a b
_4 :: Field4 s t a b => Lens s t a b
_5 :: Field5 s t a b => Lens s t a b

-- | This lens lets you read, write, or delete elements in
--   <tt>Map</tt>-like structures. It returns <a>Nothing</a> when the value
--   isn't found, just like <tt>lookup</tt>:
--   
--   <pre>
--   Data.Map.lookup k m = m <a>^.</a> at k
--   </pre>
--   
--   However, it also lets you insert and delete values by setting the
--   value to <tt><a>Just</a> value</tt> or <a>Nothing</a>:
--   
--   <pre>
--   Data.Map.insert k a m = m <a>&amp;</a> at k <a>.~</a> Just a
--   
--   Data.Map.delete k m = m <a>&amp;</a> at k <a>.~</a> Nothing
--   </pre>
--   
--   Or you could use (<a>?~</a>) instead of (<a>.~</a>):
--   
--   <pre>
--   Data.Map.insert k a m = m <a>&amp;</a> at k <a>?~</a> a
--   </pre>
--   
--   Note that <a>at</a> doesn't work for arrays or lists. You can't delete
--   an arbitrary element from an array (what would be left in its place?),
--   and you can't set an arbitrary element in a list because if the index
--   is out of list's bounds, you'd have to somehow fill the stretch
--   between the last element and the element you just inserted (i.e.
--   <tt>[1,2,3] &amp; at 10 .~ 5</tt> is undefined). If you want to modify
--   an already existing value in an array or list, you should use
--   <a>ix</a> instead.
--   
--   <a>at</a> is often used with <a>non</a>. See the documentation of
--   <a>non</a> for examples.
--   
--   Note that <a>at</a> isn't strict for <tt>Map</tt>, even if you're
--   using <tt>Data.Map.Strict</tt>:
--   
--   <pre>
--   &gt;&gt;&gt; Data.Map.Strict.size (Data.Map.Strict.empty &amp; at 1 .~ Just undefined)
--   1
--   </pre>
--   
--   The reason for such behavior is that there's actually no “strict
--   <tt>Map</tt>” type; <tt>Data.Map.Strict</tt> just provides some strict
--   functions for ordinary <tt>Map</tt>s.
--   
--   This package doesn't actually provide any instances for <a>at</a>, but
--   there are instances for <tt>Map</tt> and <tt>IntMap</tt> in
--   <a>microlens-ghc</a> and an instance for <tt>HashMap</tt> in
--   <a>microlens-platform</a>.
at :: At m => Index m -> Lens' m (Maybe (IxValue m))

-- | <a>lens</a> creates a <a>Lens</a> from a getter and a setter. The
--   resulting lens isn't the most effective one (because of having to
--   traverse the structure twice when modifying), but it shouldn't matter
--   much.
--   
--   A (partial) lens for list indexing:
--   
--   <pre>
--   ix :: Int -&gt; <a>Lens'</a> [a] a
--   ix i = <a>lens</a> (<a>!!</a> i)                                   -- getter
--               (\s b -&gt; take i s ++ b : drop (i+1) s)   -- setter
--   </pre>
--   
--   Usage:
--   
--   <pre>
--   &gt;&gt;&gt; [1..9] <a>^.</a> ix 3
--   4
--   
--   &gt;&gt;&gt; [1..9] &amp; ix 3 <a>%~</a> negate
--   [1,2,3,-4,5,6,7,8,9]
--   </pre>
--   
--   When getting, the setter is completely unused; when setting, the
--   getter is unused. Both are used only when the value is being modified.
--   For instance, here we define a lens for the 1st element of a list, but
--   instead of a legitimate getter we use <a>undefined</a>. Then we use
--   the resulting lens for <i>setting</i> and it works, which proves that
--   the getter wasn't used:
--   
--   <pre>
--   &gt;&gt;&gt; [1,2,3] &amp; lens undefined (\s b -&gt; b : tail s) .~ 10
--   [10,2,3]
--   </pre>
lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b

-- | <a>non</a> lets you “relabel” a <a>Maybe</a> by equating
--   <a>Nothing</a> to an arbitrary value (which you can choose):
--   
--   <pre>
--   &gt;&gt;&gt; Just 1 ^. non 0
--   1
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; Nothing ^. non 0
--   0
--   </pre>
--   
--   The most useful thing about <a>non</a> is that relabeling also works
--   in other direction. If you try to <a>set</a> the “forbidden” value,
--   it'll be turned to <a>Nothing</a>:
--   
--   <pre>
--   &gt;&gt;&gt; Just 1 &amp; non 0 .~ 0
--   Nothing
--   </pre>
--   
--   Setting anything else works just fine:
--   
--   <pre>
--   &gt;&gt;&gt; Just 1 &amp; non 0 .~ 5
--   Just 5
--   </pre>
--   
--   Same happens if you try to modify a value:
--   
--   <pre>
--   &gt;&gt;&gt; Just 1 &amp; non 0 %~ subtract 1
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; Just 1 &amp; non 0 %~ (+ 1)
--   Just 2
--   </pre>
--   
--   <a>non</a> is often useful when combined with <a>at</a>. For instance,
--   if you have a map of songs and their playcounts, it makes sense not to
--   store songs with 0 plays in the map; <a>non</a> can act as a filter
--   that wouldn't pass such entries.
--   
--   Decrease playcount of a song to 0, and it'll be gone:
--   
--   <pre>
--   &gt;&gt;&gt; fromList [("Soon",1),("Yesterday",3)] &amp; at "Soon" . non 0 %~ subtract 1
--   fromList [("Yesterday",3)]
--   </pre>
--   
--   Try to add a song with 0 plays, and it won't be added:
--   
--   <pre>
--   &gt;&gt;&gt; fromList [("Yesterday",3)] &amp; at "Soon" . non 0 .~ 0
--   fromList [("Yesterday",3)]
--   </pre>
--   
--   But it will be added if you set any other number:
--   
--   <pre>
--   &gt;&gt;&gt; fromList [("Yesterday",3)] &amp; at "Soon" . non 0 .~ 1
--   fromList [("Soon",1),("Yesterday",3)]
--   </pre>
--   
--   <a>non</a> is also useful when working with nested maps. Here a nested
--   map is created when it's missing:
--   
--   <pre>
--   &gt;&gt;&gt; Map.empty &amp; at "Dez Mona" . non Map.empty . at "Soon" .~ Just 1
--   fromList [("Dez Mona",fromList [("Soon",1)])]
--   </pre>
--   
--   and here it is deleted when its last entry is deleted (notice that
--   <a>non</a> is used twice here):
--   
--   <pre>
--   &gt;&gt;&gt; fromList [("Dez Mona",fromList [("Soon",1)])] &amp; at "Dez Mona" . non Map.empty . at "Soon" . non 0 %~ subtract 1
--   fromList []
--   </pre>
--   
--   To understand the last example better, observe the flow of values in
--   it:
--   
--   <ul>
--   <li>the map goes into <tt>at "Dez Mona"</tt></li>
--   <li>the nested map (wrapped into <tt>Just</tt>) goes into <tt>non
--   Map.empty</tt></li>
--   <li><tt>Just</tt> is unwrapped and the nested map goes into <tt>at
--   "Soon"</tt></li>
--   <li><tt>Just 1</tt> is unwrapped by <tt>non 0</tt></li>
--   </ul>
--   
--   Then the final value – i.e. 1 – is modified by <tt>subtract 1</tt> and
--   the result (which is 0) starts flowing backwards:
--   
--   <ul>
--   <li><tt>non 0</tt> sees the 0 and produces a <tt>Nothing</tt></li>
--   <li><tt>at "Soon"</tt> sees <tt>Nothing</tt> and deletes the
--   corresponding value from the map</li>
--   <li>the resulting empty map is passed to <tt>non Map.empty</tt>, which
--   sees that it's empty and thus produces <tt>Nothing</tt></li>
--   <li><tt>at "Dez Mona"</tt> sees <tt>Nothing</tt> and removes the key
--   from the map</li>
--   </ul>
non :: Eq a => a -> Lens' (Maybe a) a

-- | <a>singular</a> turns a traversal into a lens that behaves like a
--   single-element traversal:
--   
--   <pre>
--   &gt;&gt;&gt; [1,2,3] ^. singular each
--   1
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; [1,2,3] &amp; singular each %~ negate
--   [-1,2,3]
--   </pre>
--   
--   If there is nothing to return, it'll throw an error:
--   
--   <pre>
--   &gt;&gt;&gt; [] ^. singular each
--   *** Exception: Lens.Micro.singular: empty traversal
--   </pre>
--   
--   However, it won't fail if you are merely setting the value:
--   
--   <pre>
--   &gt;&gt;&gt; [] &amp; singular each %~ negate
--   </pre>
singular :: HasCallStack => Traversal s t a a -> Lens s t a a

-- | <a>failing</a> lets you chain traversals together; if the 1st
--   traversal fails, the 2nd traversal will be used.
--   
--   <pre>
--   &gt;&gt;&gt; ([1,2],[3]) &amp; failing (_1.each) (_2.each) .~ 0
--   ([0,0],[3])
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; ([],[3]) &amp; failing (_1.each) (_2.each) .~ 0
--   ([],[0])
--   </pre>
--   
--   Note that the resulting traversal won't be valid unless either both
--   traversals don't touch each others' elements, or both traversals
--   return exactly the same results. To see an example of how
--   <a>failing</a> can generate invalid traversals, see <a>this
--   Stackoverflow question</a>.
failing :: Traversal s t a b -> Traversal s t a b -> Traversal s t a b
infixl 5 `failing`

-- | <a>filtered</a> is a traversal that filters elements “passing” through
--   it:
--   
--   <pre>
--   &gt;&gt;&gt; (1,2,3,4) ^.. each
--   [1,2,3,4]
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; (1,2,3,4) ^.. each . filtered even
--   [2,4]
--   </pre>
--   
--   It also can be used to modify elements selectively:
--   
--   <pre>
--   &gt;&gt;&gt; (1,2,3,4) &amp; each . filtered even %~ (*100)
--   (1,200,3,400)
--   </pre>
--   
--   The implementation of <a>filtered</a> is very simple. Consider this
--   traversal, which always “traverses” just the value it's given:
--   
--   <pre>
--   id :: <a>Traversal'</a> a a
--   id f s = f s
--   </pre>
--   
--   And this traversal, which traverses nothing (in other words,
--   <i>doesn't</i> traverse the value it's given):
--   
--   <pre>
--   ignored :: <a>Traversal'</a> a a
--   ignored f s = <a>pure</a> s
--   </pre>
--   
--   And now combine them into a traversal that conditionally traverses the
--   value it's given, and you get <a>filtered</a>:
--   
--   <pre>
--   filtered :: (a -&gt; Bool) -&gt; <a>Traversal'</a> a a
--   filtered p f s = if p s then f s else <a>pure</a> s
--   </pre>
--   
--   By the way, note that <a>filtered</a> can generate illegal traversals
--   – sometimes this can bite you. In particular, an optimisation that
--   should be safe becomes unsafe. (To the best of my knowledge, this
--   optimisation never happens automatically. If you just use
--   <a>filtered</a> to modify/view something, you're safe. If you don't
--   define any traversals that use <a>filtered</a>, you're safe too.)
--   
--   Let's use <tt>evens</tt> as an example:
--   
--   <pre>
--   evens = <a>filtered</a> <a>even</a>
--   </pre>
--   
--   If <tt>evens</tt> was a legal traversal, you'd be able to fuse several
--   applications of <tt>evens</tt> like this:
--   
--   <pre>
--   <a>over</a> evens f <a>.</a> <a>over</a> evens g = <a>over</a> evens (f <a>.</a> g)
--   </pre>
--   
--   Unfortunately, in case of <tt>evens</tt> this isn't a correct
--   optimisation:
--   
--   <ul>
--   <li>the left-side variant applies <tt>g</tt> to all even numbers, and
--   then applies <tt>f</tt> to all even numbers that are left after
--   <tt>f</tt> (because <tt>f</tt> might've turned some even numbers into
--   odd ones)</li>
--   <li>the right-side variant applies <tt>f</tt> and <tt>g</tt> to all
--   even numbers</li>
--   </ul>
--   
--   Of course, when you are careful and know what you're doing, you won't
--   try to make such an optimisation. However, if you export an illegal
--   traversal created with <a>filtered</a> and someone tries to use it,
--   they might mistakenly assume that it's legal, do the optimisation, and
--   silently get an incorrect result.
--   
--   If you are using <a>filtered</a> with some another traversal that
--   doesn't overlap with -whatever the predicate checks-, the resulting
--   traversal will be legal. For instance, here the predicate looks at the
--   1st element of a tuple, but the resulting traversal only gives you
--   access to the 2nd:
--   
--   <pre>
--   pairedWithEvens :: <a>Traversal</a> [(Int, a)] [(Int, b)] a b
--   pairedWithEvens = <a>each</a> <a>.</a> <a>filtered</a> (<a>even</a> <a>.</a> <a>fst</a>) <a>.</a> <a>_2</a>
--   </pre>
--   
--   Since you can't do anything with the 1st components through this
--   traversal, the following holds for any <tt>f</tt> and <tt>g</tt>:
--   
--   <pre>
--   <a>over</a> pairedWithEvens f <a>.</a> <a>over</a> pairedWithEvens g = <a>over</a> pairedWithEvens (f <a>.</a> g)
--   </pre>
filtered :: (a -> Bool) -> Traversal' a a

-- | <a>both</a> traverses both fields of a tuple. Unlike
--   <tt><a>both</a></tt> from lens, it only works for pairs – not for
--   triples or <a>Either</a>.
--   
--   <pre>
--   &gt;&gt;&gt; ("str","ing") ^. both
--   "string"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; ("str","ing") &amp; both %~ reverse
--   ("rts","gni")
--   </pre>
both :: forall a b f. Applicative f => (a -> f b) -> (a, a) -> f (b, b)

-- | <a>traversed</a> traverses any <a>Traversable</a> container (list,
--   vector, <tt>Map</tt>, <a>Maybe</a>, you name it):
--   
--   <pre>
--   &gt;&gt;&gt; Just 1 ^.. traversed
--   [1]
--   </pre>
--   
--   <a>traversed</a> is the same as <a>traverse</a>, but can be faster
--   thanks to magic rewrite rules.
traversed :: forall (f :: Type -> Type) a b. Traversable f => Traversal (f a) (f b) a b

-- | <a>each</a> tries to be a universal <a>Traversal</a> – it behaves like
--   <a>traversed</a> in most situations, but also adds support for e.g.
--   tuples with same-typed values:
--   
--   <pre>
--   &gt;&gt;&gt; (1,2) &amp; each %~ succ
--   (2,3)
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; ["x", "y", "z"] ^. each
--   "xyz"
--   </pre>
--   
--   However, note that <a>each</a> doesn't work on <i>every</i> instance
--   of <a>Traversable</a>. If you have a <a>Traversable</a> which isn't
--   supported by <a>each</a>, you can use <a>traversed</a> instead.
--   Personally, I like using <a>each</a> instead of <a>traversed</a>
--   whenever possible – it's shorter and more descriptive.
--   
--   You can use <a>each</a> with these things:
--   
--   <pre>
--   <a>each</a> :: <a>Traversal</a> [a] [b] a b
--   
--   <a>each</a> :: <a>Traversal</a> (<a>Maybe</a> a) (<a>Maybe</a> b) a b
--   <a>each</a> :: <a>Traversal</a> (<a>Either</a> a a) (<a>Either</a> b b) a b  -- since 0.4.11
--   
--   <a>each</a> :: <a>Traversal</a> (a,a) (b,b) a b
--   <a>each</a> :: <a>Traversal</a> (a,a,a) (b,b,b) a b
--   <a>each</a> :: <a>Traversal</a> (a,a,a,a) (b,b,b,b) a b
--   <a>each</a> :: <a>Traversal</a> (a,a,a,a,a) (b,b,b,b,b) a b
--   
--   <a>each</a> :: (<a>RealFloat</a> a, <a>RealFloat</a> b) =&gt; <a>Traversal</a> (<a>Complex</a> a) (<a>Complex</a> b) a b
--   </pre>
--   
--   You can also use <a>each</a> with types from <a>array</a>,
--   <a>bytestring</a>, and <a>containers</a> by using
--   <a>microlens-ghc</a>, or additionally with types from <a>vector</a>,
--   <a>text</a>, and <a>unordered-containers</a> by using
--   <a>microlens-platform</a>.
each :: Each s t a b => Traversal s t a b

-- | This traversal lets you access (and update) an arbitrary element in a
--   list, array, <tt>Map</tt>, etc. (If you want to insert or delete
--   elements as well, look at <a>at</a>.)
--   
--   An example for lists:
--   
--   <pre>
--   &gt;&gt;&gt; [0..5] &amp; ix 3 .~ 10
--   [0,1,2,10,4,5]
--   </pre>
--   
--   You can use it for getting, too:
--   
--   <pre>
--   &gt;&gt;&gt; [0..5] ^? ix 3
--   Just 3
--   </pre>
--   
--   Of course, the element may not be present (which means that you can
--   use <a>ix</a> as a safe variant of (<a>!!</a>)):
--   
--   <pre>
--   &gt;&gt;&gt; [0..5] ^? ix 10
--   Nothing
--   </pre>
--   
--   Another useful instance is the one for functions – it lets you modify
--   their outputs for specific inputs. For instance, here's <a>maximum</a>
--   that returns 0 when the list is empty (instead of throwing an
--   exception):
--   
--   <pre>
--   maximum0 = <a>maximum</a> <a>&amp;</a> <a>ix</a> [] <a>.~</a> 0
--   </pre>
--   
--   The following instances are provided in this package:
--   
--   <pre>
--   <a>ix</a> :: <a>Int</a> -&gt; <a>Traversal'</a> [a] a
--   
--   <a>ix</a> :: <a>Int</a> -&gt; <a>Traversal'</a> (NonEmpty a) a
--   
--   <a>ix</a> :: (<a>Eq</a> e) =&gt; e -&gt; <a>Traversal'</a> (e -&gt; a) a
--   </pre>
--   
--   You can also use <a>ix</a> with types from <a>array</a>,
--   <a>bytestring</a>, and <a>containers</a> by using
--   <a>microlens-ghc</a>, or additionally with types from <a>vector</a>,
--   <a>text</a>, and <a>unordered-containers</a> by using
--   <a>microlens-platform</a>.
ix :: Ixed m => Index m -> Traversal' m (IxValue m)

-- | <a>_head</a> traverses the 1st element of something (usually a list,
--   but can also be a <tt>Seq</tt>, etc):
--   
--   <pre>
--   &gt;&gt;&gt; [1..5] ^? _head
--   Just 1
--   </pre>
--   
--   It can be used to modify too, as in this example where the 1st letter
--   of a sentence is capitalised:
--   
--   <pre>
--   &gt;&gt;&gt; "mary had a little lamb." &amp; _head %~ toTitle
--   "Mary had a little lamb."
--   </pre>
--   
--   The reason it's a traversal and not a lens is that there's nothing to
--   traverse when the list is empty:
--   
--   <pre>
--   &gt;&gt;&gt; [] ^? _head
--   Nothing
--   </pre>
--   
--   This package only lets you use <a>_head</a> on lists, but if you use
--   <a>microlens-ghc</a> you get instances for <tt>ByteString</tt> and
--   <tt>Seq</tt>, and if you use <a>microlens-platform</a> you
--   additionally get instances for <tt>Text</tt> and <tt>Vector</tt>.
_head :: Cons s s a a => Traversal' s a

-- | <a>_tail</a> gives you access to the tail of a list (or <tt>Seq</tt>,
--   etc):
--   
--   <pre>
--   &gt;&gt;&gt; [1..5] ^? _tail
--   Just [2,3,4,5]
--   </pre>
--   
--   You can modify the tail as well:
--   
--   <pre>
--   &gt;&gt;&gt; [4,1,2,3] &amp; _tail %~ reverse
--   [4,3,2,1]
--   </pre>
--   
--   Since lists are monoids, you can use <a>_tail</a> with plain
--   (<a>^.</a>) (and then it'll return an empty list if you give it an
--   empty list):
--   
--   <pre>
--   &gt;&gt;&gt; [1..5] ^. _tail
--   [2,3,4,5]
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; [] ^. _tail
--   []
--   </pre>
--   
--   If you want to traverse each <i>element</i> of the tail, use
--   <a>_tail</a> with <a>each</a>:
--   
--   <pre>
--   &gt;&gt;&gt; "I HATE CAPS." &amp; _tail.each %~ toLower
--   "I hate caps."
--   </pre>
--   
--   This package only lets you use <a>_tail</a> on lists, but if you use
--   <a>microlens-ghc</a> you get instances for <tt>ByteString</tt> and
--   <tt>Seq</tt>, and if you use <a>microlens-platform</a> you
--   additionally get instances for <tt>Text</tt> and <tt>Vector</tt>.
_tail :: Cons s s a a => Traversal' s s

-- | <a>_init</a> gives you access to all-but-the-last elements of the
--   list:
--   
--   <pre>
--   &gt;&gt;&gt; "Hello." ^. _init
--   "Hello"
--   </pre>
--   
--   See documentation for <a>_tail</a>, as <a>_init</a> and <a>_tail</a>
--   are pretty similar.
_init :: Snoc s s a a => Traversal' s s

-- | <a>_last</a> gives you access to the last element of the list:
--   
--   <pre>
--   &gt;&gt;&gt; "Hello." ^? _last
--   '.'
--   </pre>
--   
--   See documentation for <a>_head</a>, as <a>_last</a> and <a>_head</a>
--   are pretty similar.
_last :: Snoc s s a a => Traversal' s a

-- | <a>_Left</a> targets the value contained in an <a>Either</a>, provided
--   it's a <a>Left</a>.
--   
--   Gathering all <tt>Left</tt>s in a structure (like the <a>lefts</a>
--   function, but not necessarily just for lists):
--   
--   <pre>
--   &gt;&gt;&gt; [Left 1, Right 'c', Left 3] ^.. each._Left
--   [1,3]
--   </pre>
--   
--   Checking whether an <a>Either</a> is a <a>Left</a> (like
--   <a>isLeft</a>):
--   
--   <pre>
--   &gt;&gt;&gt; has _Left (Left 1)
--   True
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; has _Left (Right 1)
--   False
--   </pre>
--   
--   Extracting a value (if you're sure it's a <a>Left</a>):
--   
--   <pre>
--   &gt;&gt;&gt; Left 1 ^?! _Left
--   1
--   </pre>
--   
--   Mapping over all <a>Left</a>s:
--   
--   <pre>
--   &gt;&gt;&gt; (each._Left %~ map toUpper) [Left "foo", Right "bar"]
--   [Left "FOO",Right "bar"]
--   </pre>
--   
--   Implementation:
--   
--   <pre>
--   <a>_Left</a> f (Left a)  = <a>Left</a> <a>&lt;$&gt;</a> f a
--   <a>_Left</a> _ (Right b) = <a>pure</a> (<a>Right</a> b)
--   </pre>
_Left :: forall a b a' f. Applicative f => (a -> f a') -> Either a b -> f (Either a' b)

-- | <a>_Right</a> targets the value contained in an <a>Either</a>,
--   provided it's a <a>Right</a>.
--   
--   See documentation for <a>_Left</a>.
_Right :: forall a b b' f. Applicative f => (b -> f b') -> Either a b -> f (Either a b')

-- | <a>_Just</a> targets the value contained in a <a>Maybe</a>, provided
--   it's a <a>Just</a>.
--   
--   See documentation for <a>_Left</a> (as these 2 are pretty similar). In
--   particular, it can be used to write these:
--   
--   <ul>
--   <li>Unsafely extracting a value from a <a>Just</a>:</li>
--   </ul>
--   
--   <pre>
--   <a>fromJust</a> = (<a>^?!</a> <a>_Just</a>)
--   
--   </pre>
--   
--   <ul>
--   <li>Checking whether a value is a <a>Just</a>:</li>
--   </ul>
--   
--   <pre>
--   <a>isJust</a> = <a>has</a> <a>_Just</a>
--   
--   </pre>
--   
--   <ul>
--   <li>Converting a <a>Maybe</a> to a list (empty or consisting of a
--   single element):</li>
--   </ul>
--   
--   <pre>
--   <a>maybeToList</a> = (<a>^..</a> <a>_Just</a>)
--   
--   </pre>
--   
--   <ul>
--   <li>Gathering all <a>Just</a>s in a list:</li>
--   </ul>
--   
--   <pre>
--   <a>catMaybes</a> = (<a>^..</a> <a>each</a> <a>.</a> <a>_Just</a>)
--   
--   </pre>
_Just :: forall a a' f. Applicative f => (a -> f a') -> Maybe a -> f (Maybe a')

-- | <a>_Nothing</a> targets a <tt>()</tt> if the <a>Maybe</a> is a
--   <a>Nothing</a>, and doesn't target anything otherwise:
--   
--   <pre>
--   &gt;&gt;&gt; Just 1 ^.. _Nothing
--   []
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; Nothing ^.. _Nothing
--   [()]
--   </pre>
--   
--   It's not particularly useful (unless you want to use <tt><a>has</a>
--   <a>_Nothing</a></tt> as a replacement for <a>isNothing</a>), and
--   provided mainly for consistency.
--   
--   Implementation:
--   
--   <pre>
--   <a>_Nothing</a> f Nothing = <a>const</a> <a>Nothing</a> <a>&lt;$&gt;</a> f ()
--   <a>_Nothing</a> _ j       = <a>pure</a> j
--   </pre>
_Nothing :: forall a f. Applicative f => (() -> f ()) -> Maybe a -> f (Maybe a)


-- | <tt>List</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.List as L
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.List.Partial</a>
module RIO.List
(++) :: [a] -> [a] -> [a]
uncons :: [a] -> Maybe (a, [a])
null :: Foldable t => t a -> Bool
length :: Foldable t => t a -> Int

headMaybe :: [a] -> Maybe a

lastMaybe :: [a] -> Maybe a

tailMaybe :: [a] -> Maybe [a]

initMaybe :: [a] -> Maybe [a]
map :: (a -> b) -> [a] -> [b]
reverse :: [a] -> [a]
intersperse :: a -> [a] -> [a]
intercalate :: [a] -> [[a]] -> [a]
transpose :: [[a]] -> [[a]]
subsequences :: [a] -> [[a]]
permutations :: [a] -> [[a]]
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
concat :: Foldable t => t [a] -> [a]
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
and :: Foldable t => t Bool -> Bool
or :: Foldable t => t Bool -> Bool
any :: Foldable t => (a -> Bool) -> t a -> Bool
all :: Foldable t => (a -> Bool) -> t a -> Bool
sum :: (Foldable t, Num a) => t a -> a
product :: (Foldable t, Num a) => t a -> a

maximumMaybe :: (Ord a, Foldable t) => t a -> Maybe a

minimumMaybe :: (Ord a, Foldable t) => t a -> Maybe a

maximumByMaybe :: Foldable t => (a -> a -> Ordering) -> t a -> Maybe a

minimumByMaybe :: Foldable t => (a -> a -> Ordering) -> t a -> Maybe a
scanl :: (b -> a -> b) -> b -> [a] -> [b]
scanl' :: (b -> a -> b) -> b -> [a] -> [b]
scanr :: (a -> b -> b) -> b -> [a] -> [b]
scanl1 :: (a -> a -> a) -> [a] -> [a]
scanr1 :: (a -> a -> a) -> [a] -> [a]
mapAccumL :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
mapAccumR :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)
iterate :: (a -> a) -> a -> [a]
repeat :: a -> [a]
replicate :: Int -> a -> [a]
cycle :: HasCallStack => [a] -> [a]
unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
take :: Int -> [a] -> [a]
drop :: Int -> [a] -> [a]
splitAt :: Int -> [a] -> ([a], [a])
takeWhile :: (a -> Bool) -> [a] -> [a]
dropWhile :: (a -> Bool) -> [a] -> [a]
dropWhileEnd :: (a -> Bool) -> [a] -> [a]
span :: (a -> Bool) -> [a] -> ([a], [a])
break :: (a -> Bool) -> [a] -> ([a], [a])
stripPrefix :: Eq a => [a] -> [a] -> Maybe [a]

-- | Remove the suffix from the given list, if present
stripSuffix :: Eq a => [a] -> [a] -> Maybe [a]

-- | Drop prefix if present, otherwise return original list.
dropPrefix :: Eq a => [a] -> [a] -> [a]

-- | Drop prefix if present, otherwise return original list.
dropSuffix :: Eq a => [a] -> [a] -> [a]
group :: Eq a => [a] -> [[a]]
inits :: [a] -> [[a]]
tails :: [a] -> [[a]]
isPrefixOf :: Eq a => [a] -> [a] -> Bool
isSuffixOf :: Eq a => [a] -> [a] -> Bool
isInfixOf :: Eq a => [a] -> [a] -> Bool
isSubsequenceOf :: Eq a => [a] -> [a] -> Bool
elem :: (Foldable t, Eq a) => a -> t a -> Bool
notElem :: (Foldable t, Eq a) => a -> t a -> Bool
lookup :: Eq a => a -> [(a, b)] -> Maybe b
find :: Foldable t => (a -> Bool) -> t a -> Maybe a
filter :: (a -> Bool) -> [a] -> [a]
partition :: (a -> Bool) -> [a] -> ([a], [a])
elemIndex :: Eq a => a -> [a] -> Maybe Int
elemIndices :: Eq a => a -> [a] -> [Int]
findIndex :: (a -> Bool) -> [a] -> Maybe Int
findIndices :: (a -> Bool) -> [a] -> [Int]
zip :: [a] -> [b] -> [(a, b)]
zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)]
zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)]
zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)]
zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)]
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
zipWith5 :: (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f]
zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]
zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
unzip :: [(a, b)] -> ([a], [b])
unzip3 :: [(a, b, c)] -> ([a], [b], [c])
unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d])
unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e])
unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f])
unzip7 :: [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g])
lines :: String -> [String]

-- | <a>linesCR</a> breaks a <a>String</a> up into a list of <a>String</a>s
--   at newline <a>Char</a>s. It is very similar to <a>lines</a>, but it
--   also removes any trailing <tt>'r'</tt> <a>Char</a>s. The resulting
--   <a>String</a> values do not contain newlines or trailing <tt>'r'</tt>
--   characters.
linesCR :: String -> [String]
words :: String -> [String]
unlines :: [String] -> String
unwords :: [String] -> String
nub :: Eq a => [a] -> [a]
delete :: Eq a => a -> [a] -> [a]
(\\) :: Eq a => [a] -> [a] -> [a]
union :: Eq a => [a] -> [a] -> [a]
intersect :: Eq a => [a] -> [a] -> [a]
sort :: Ord a => [a] -> [a]
sortOn :: Ord b => (a -> b) -> [a] -> [a]
insert :: Ord a => a -> [a] -> [a]
nubBy :: (a -> a -> Bool) -> [a] -> [a]
deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
unionBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
groupBy :: (a -> a -> Bool) -> [a] -> [[a]]
sortBy :: (a -> a -> Ordering) -> [a] -> [a]
insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
genericLength :: Num i => [a] -> i
genericTake :: Integral i => i -> [a] -> [a]
genericDrop :: Integral i => i -> [a] -> [a]
genericSplitAt :: Integral i => i -> [a] -> ([a], [a])
genericIndex :: Integral i => [a] -> i -> a
genericReplicate :: Integral i => i -> a -> [a]


-- | <tt>List</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.List.Partial as L'
--   </pre>
module RIO.List.Partial
head :: HasCallStack => [a] -> a
last :: HasCallStack => [a] -> a
tail :: HasCallStack => [a] -> [a]
init :: HasCallStack => [a] -> [a]
foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a
foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
maximum :: (Foldable t, Ord a) => t a -> a
minimum :: (Foldable t, Ord a) => t a -> a
maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
scanl1 :: (a -> a -> a) -> [a] -> [a]
scanr1 :: (a -> a -> a) -> [a] -> [a]
(!!) :: HasCallStack => [a] -> Int -> a


-- | Strict <tt>Map</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Map as Map
--   </pre>
--   
--   This module does not export any partial or unchecked functions. For
--   those, see <a>RIO.Map.Partial</a> and <a>RIO.Map.Unchecked</a>
module RIO.Map
data Map k a
(!?) :: Ord k => Map k a -> k -> Maybe a
(\\) :: Ord k => Map k a -> Map k b -> Map k a
null :: Map k a -> Bool
size :: Map k a -> Int
member :: Ord k => k -> Map k a -> Bool
notMember :: Ord k => k -> Map k a -> Bool
lookup :: Ord k => k -> Map k a -> Maybe a
findWithDefault :: Ord k => a -> k -> Map k a -> a
lookupLT :: Ord k => k -> Map k v -> Maybe (k, v)
lookupGT :: Ord k => k -> Map k v -> Maybe (k, v)
lookupLE :: Ord k => k -> Map k v -> Maybe (k, v)
lookupGE :: Ord k => k -> Map k v -> Maybe (k, v)
empty :: Map k a
singleton :: k -> a -> Map k a
insert :: Ord k => k -> a -> Map k a -> Map k a
insertWith :: Ord k => (a -> a -> a) -> k -> a -> Map k a -> Map k a
insertWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> Map k a
insertLookupWithKey :: Ord k => (k -> a -> a -> a) -> k -> a -> Map k a -> (Maybe a, Map k a)
delete :: Ord k => k -> Map k a -> Map k a
adjust :: Ord k => (a -> a) -> k -> Map k a -> Map k a
adjustWithKey :: Ord k => (k -> a -> a) -> k -> Map k a -> Map k a
update :: Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a
updateWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> Map k a
updateLookupWithKey :: Ord k => (k -> a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a)
alter :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k a
alterF :: (Functor f, Ord k) => (Maybe a -> f (Maybe a)) -> k -> Map k a -> f (Map k a)
union :: Ord k => Map k a -> Map k a -> Map k a
unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a
unions :: (Foldable f, Ord k) => f (Map k a) -> Map k a
unionsWith :: (Foldable f, Ord k) => (a -> a -> a) -> f (Map k a) -> Map k a
difference :: Ord k => Map k a -> Map k b -> Map k a
differenceWith :: Ord k => (a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
differenceWithKey :: Ord k => (k -> a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
intersection :: Ord k => Map k a -> Map k b -> Map k a
intersectionWith :: Ord k => (a -> b -> c) -> Map k a -> Map k b -> Map k c
intersectionWithKey :: Ord k => (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c
mergeWithKey :: Ord k => (k -> a -> b -> Maybe c) -> (Map k a -> Map k c) -> (Map k b -> Map k c) -> Map k a -> Map k b -> Map k c
map :: (a -> b) -> Map k a -> Map k b
mapWithKey :: (k -> a -> b) -> Map k a -> Map k b
traverseWithKey :: Applicative t => (k -> a -> t b) -> Map k a -> t (Map k b)
traverseMaybeWithKey :: Applicative f => (k -> a -> f (Maybe b)) -> Map k a -> f (Map k b)
mapAccum :: (a -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
mapAccumWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
mapAccumRWithKey :: (a -> k -> b -> (a, c)) -> a -> Map k b -> (a, Map k c)
mapKeys :: Ord k2 => (k1 -> k2) -> Map k1 a -> Map k2 a
mapKeysWith :: Ord k2 => (a -> a -> a) -> (k1 -> k2) -> Map k1 a -> Map k2 a
foldr :: (a -> b -> b) -> b -> Map k a -> b
foldl :: (a -> b -> a) -> a -> Map k b -> a
foldrWithKey :: (k -> a -> b -> b) -> b -> Map k a -> b
foldlWithKey :: (a -> k -> b -> a) -> a -> Map k b -> a
foldMapWithKey :: Monoid m => (k -> a -> m) -> Map k a -> m
foldr' :: (a -> b -> b) -> b -> Map k a -> b
foldl' :: (a -> b -> a) -> a -> Map k b -> a
foldrWithKey' :: (k -> a -> b -> b) -> b -> Map k a -> b
foldlWithKey' :: (a -> k -> b -> a) -> a -> Map k b -> a
elems :: Map k a -> [a]
keys :: Map k a -> [k]
assocs :: Map k a -> [(k, a)]
keysSet :: Map k a -> Set k
fromSet :: (k -> a) -> Set k -> Map k a
toList :: Map k a -> [(k, a)]
fromList :: Ord k => [(k, a)] -> Map k a
fromListWith :: Ord k => (a -> a -> a) -> [(k, a)] -> Map k a
fromListWithKey :: Ord k => (k -> a -> a -> a) -> [(k, a)] -> Map k a
toAscList :: Map k a -> [(k, a)]
toDescList :: Map k a -> [(k, a)]
filter :: (a -> Bool) -> Map k a -> Map k a
filterWithKey :: (k -> a -> Bool) -> Map k a -> Map k a
restrictKeys :: Ord k => Map k a -> Set k -> Map k a
withoutKeys :: Ord k => Map k a -> Set k -> Map k a
partition :: (a -> Bool) -> Map k a -> (Map k a, Map k a)
partitionWithKey :: (k -> a -> Bool) -> Map k a -> (Map k a, Map k a)
takeWhileAntitone :: (k -> Bool) -> Map k a -> Map k a
dropWhileAntitone :: (k -> Bool) -> Map k a -> Map k a
spanAntitone :: (k -> Bool) -> Map k a -> (Map k a, Map k a)
mapMaybe :: (a -> Maybe b) -> Map k a -> Map k b
mapMaybeWithKey :: (k -> a -> Maybe b) -> Map k a -> Map k b
mapEither :: (a -> Either b c) -> Map k a -> (Map k b, Map k c)
mapEitherWithKey :: (k -> a -> Either b c) -> Map k a -> (Map k b, Map k c)
split :: Ord k => k -> Map k a -> (Map k a, Map k a)
splitLookup :: Ord k => k -> Map k a -> (Map k a, Maybe a, Map k a)
splitRoot :: Map k b -> [Map k b]
isSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool
isSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool
isProperSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool
isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool
lookupIndex :: Ord k => k -> Map k a -> Maybe Int
elemAt :: Int -> Map k a -> (k, a)
deleteAt :: Int -> Map k a -> Map k a
take :: Int -> Map k a -> Map k a
drop :: Int -> Map k a -> Map k a
splitAt :: Int -> Map k a -> (Map k a, Map k a)
lookupMin :: Map k a -> Maybe (k, a)
lookupMax :: Map k a -> Maybe (k, a)
deleteMin :: Map k a -> Map k a
deleteMax :: Map k a -> Map k a
updateMin :: (a -> Maybe a) -> Map k a -> Map k a
updateMax :: (a -> Maybe a) -> Map k a -> Map k a
updateMinWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a
updateMaxWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a
minView :: Map k a -> Maybe (a, Map k a)
maxView :: Map k a -> Maybe (a, Map k a)
minViewWithKey :: Map k a -> Maybe ((k, a), Map k a)
maxViewWithKey :: Map k a -> Maybe ((k, a), Map k a)
showTree :: (Show k, Show a) => Map k a -> String
showTreeWith :: (k -> a -> String) -> Bool -> Bool -> Map k a -> String
valid :: Ord k => Map k a -> Bool


-- | Strict <tt>Map</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Map.Partial as Map'
--   </pre>
module RIO.Map.Partial
(!) :: Ord k => Map k a -> k -> a
elemAt :: Int -> Map k a -> (k, a)
deleteAt :: Int -> Map k a -> Map k a
findIndex :: Ord k => k -> Map k a -> Int
updateAt :: (k -> a -> Maybe a) -> Int -> Map k a -> Map k a
findMin :: Map k a -> (k, a)
findMax :: Map k a -> (k, a)
deleteFindMin :: Map k a -> ((k, a), Map k a)
deleteFindMax :: Map k a -> ((k, a), Map k a)


-- | This module contains functions from <a>Data.Map.Strict</a> that have
--   unchecked preconditions on their input. If these preconditions are not
--   satisfied, the data structure may end up in an invalid state and other
--   operations may misbehave. Import as:
--   
--   <pre>
--   import qualified RIO.Map.Unchecked as Map'
--   </pre>
module RIO.Map.Unchecked
mapKeysMonotonic :: (k1 -> k2) -> Map k1 a -> Map k2 a
toAscList :: Map k a -> [(k, a)]
fromAscList :: Eq k => [(k, a)] -> Map k a
fromAscListWith :: Eq k => (a -> a -> a) -> [(k, a)] -> Map k a
fromAscListWithKey :: Eq k => (k -> a -> a -> a) -> [(k, a)] -> Map k a
fromDistinctAscList :: [(k, a)] -> Map k a
toDescList :: Map k a -> [(k, a)]
fromDescList :: Eq k => [(k, a)] -> Map k a
fromDescListWith :: Eq k => (a -> a -> a) -> [(k, a)] -> Map k a
fromDescListWithKey :: Eq k => (k -> a -> a -> a) -> [(k, a)] -> Map k a
fromDistinctDescList :: [(k, a)] -> Map k a


-- | <tt>NonEmpty</tt> list. Import as:
--   
--   <pre>
--   import qualified RIO.NonEmpty as NE
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.NonEmpty.Partial</a>
module RIO.NonEmpty
data NonEmpty a
(:|) :: a -> [a] -> NonEmpty a
map :: (a -> b) -> NonEmpty a -> NonEmpty b
intersperse :: a -> NonEmpty a -> NonEmpty a
scanl :: Foldable f => (b -> a -> b) -> b -> f a -> NonEmpty b
scanr :: Foldable f => (a -> b -> b) -> b -> f a -> NonEmpty b
scanl1 :: (a -> a -> a) -> NonEmpty a -> NonEmpty a
scanr1 :: (a -> a -> a) -> NonEmpty a -> NonEmpty a
transpose :: NonEmpty (NonEmpty a) -> NonEmpty (NonEmpty a)
sortBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a
sortWith :: Ord o => (a -> o) -> NonEmpty a -> NonEmpty a
length :: NonEmpty a -> Int
head :: NonEmpty a -> a
tail :: NonEmpty a -> [a]
last :: NonEmpty a -> a
init :: NonEmpty a -> [a]
(<|) :: a -> NonEmpty a -> NonEmpty a
cons :: a -> NonEmpty a -> NonEmpty a
uncons :: NonEmpty a -> (a, Maybe (NonEmpty a))
unfoldr :: (a -> (b, Maybe a)) -> a -> NonEmpty b
sort :: Ord a => NonEmpty a -> NonEmpty a
reverse :: NonEmpty a -> NonEmpty a
inits :: Foldable f => f a -> NonEmpty [a]
tails :: Foldable f => f a -> NonEmpty [a]
iterate :: (a -> a) -> a -> NonEmpty a
repeat :: a -> NonEmpty a
cycle :: NonEmpty a -> NonEmpty a
insert :: (Foldable f, Ord a) => a -> f a -> NonEmpty a
some1 :: Alternative f => f a -> f (NonEmpty a)
take :: Int -> NonEmpty a -> [a]
drop :: Int -> NonEmpty a -> [a]
splitAt :: Int -> NonEmpty a -> ([a], [a])
takeWhile :: (a -> Bool) -> NonEmpty a -> [a]
dropWhile :: (a -> Bool) -> NonEmpty a -> [a]
span :: (a -> Bool) -> NonEmpty a -> ([a], [a])
break :: (a -> Bool) -> NonEmpty a -> ([a], [a])
filter :: (a -> Bool) -> NonEmpty a -> [a]
partition :: (a -> Bool) -> NonEmpty a -> ([a], [a])
group :: (Foldable f, Eq a) => f a -> [NonEmpty a]
groupBy :: Foldable f => (a -> a -> Bool) -> f a -> [NonEmpty a]
groupWith :: (Foldable f, Eq b) => (a -> b) -> f a -> [NonEmpty a]
groupAllWith :: Ord b => (a -> b) -> [a] -> [NonEmpty a]
group1 :: Eq a => NonEmpty a -> NonEmpty (NonEmpty a)
groupBy1 :: (a -> a -> Bool) -> NonEmpty a -> NonEmpty (NonEmpty a)
groupWith1 :: Eq b => (a -> b) -> NonEmpty a -> NonEmpty (NonEmpty a)
groupAllWith1 :: Ord b => (a -> b) -> NonEmpty a -> NonEmpty (NonEmpty a)
isPrefixOf :: Eq a => [a] -> NonEmpty a -> Bool
nub :: Eq a => NonEmpty a -> NonEmpty a
nubBy :: (a -> a -> Bool) -> NonEmpty a -> NonEmpty a
zip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b)
zipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c
unzip :: Functor f => f (a, b) -> (f a, f b)
nonEmpty :: [a] -> Maybe (NonEmpty a)
toList :: NonEmpty a -> [a]
xor :: NonEmpty Bool -> Bool


-- | <tt>NonEmpty</tt> list partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.NonEmpty.Partial as NE'
--   </pre>
module RIO.NonEmpty.Partial
(!!) :: HasCallStack => NonEmpty a -> Int -> a
fromList :: HasCallStack => [a] -> NonEmpty a


-- | Partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Partial as RIO'
--   </pre>
module RIO.Partial
fromJust :: HasCallStack => Maybe a -> a
read :: Read a => String -> a
toEnum :: Enum a => Int -> a
pred :: Enum a => a -> a
succ :: Enum a => a -> a

module RIO.Prelude.Types
data Bool
False :: Bool
True :: Bool
data Char
type String = [Char]
type FilePath = String
data Ordering
LT :: Ordering
EQ :: Ordering
GT :: Ordering
data Int
data Int8
data Int16
data Int32
data Int64
data Word
data Word8
data Word16
data Word32
data Word64
data Integer
data Natural
type Rational = Ratio Integer
data Float
data Double
data Maybe a
Nothing :: Maybe a
Just :: a -> Maybe a
data Either a b
Left :: a -> Either a b
Right :: b -> Either a b
data NonEmpty a
(:|) :: a -> [a] -> NonEmpty a
data Proxy (t :: k)
Proxy :: Proxy (t :: k)
data Void
newtype Const a (b :: k)
Const :: a -> Const a (b :: k)
[getConst] :: Const a (b :: k) -> a
newtype Identity a
Identity :: a -> Identity a
[runIdentity] :: Identity a -> a
data IO a
data ST s a
class Eq a
class Eq a => Ord a
class Bounded a
class Enum a
class Show a
class Read a
class IsString a
class Num a
class Num a => Fractional a
class Fractional a => Floating a
class (Num a, Ord a) => Real a
class (Real a, Enum a) => Integral a
class (Real a, Fractional a) => RealFrac a
class (RealFrac a, Floating a) => RealFloat a
class Functor (f :: Type -> Type)
class forall a. () => Functor p a => Bifunctor (p :: Type -> Type -> Type)
class Foldable (t :: Type -> Type)
class Bifoldable (p :: Type -> Type -> Type)
class Semigroup a
class Semigroup a => Monoid a
class Functor f => Applicative (f :: Type -> Type)
class Applicative f => Alternative (f :: Type -> Type)
class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
class (Bifunctor t, Bifoldable t) => Bitraversable (t :: Type -> Type -> Type)
class Applicative m => Monad (m :: Type -> Type)
class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type)
class Category (cat :: k -> k -> Type)
class Category a => Arrow (a :: Type -> Type -> Type)
class Monad m => MonadFail (m :: Type -> Type)
class Typeable (a :: k)
class Typeable a => Data a
gfoldl :: Data a => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. () => g -> c g) -> a -> c a
gunfold :: Data a => (forall b r. Data b => c (b -> r) -> c r) -> (forall r. () => r -> c r) -> Constr -> c a
toConstr :: Data a => a -> Constr
dataTypeOf :: Data a => a -> DataType
dataCast1 :: (Data a, Typeable t) => (forall d. Data d => c (t d)) -> Maybe (c a)
dataCast2 :: (Data a, Typeable t) => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)
gmapT :: Data a => (forall b. Data b => b -> b) -> a -> a
gmapQl :: Data a => (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
gmapQr :: forall r r'. Data a => (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
gmapQ :: Data a => (forall d. Data d => d -> u) -> a -> [u]
gmapQi :: Data a => Int -> (forall d. Data d => d -> u) -> a -> u
gmapM :: (Data a, Monad m) => (forall d. Data d => d -> m d) -> a -> m a
gmapMp :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
gmapMo :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
class Generic a
class Storable a
class (Typeable e, Show e) => Exception e
type HasCallStack = ?callStack :: CallStack
class a ~# b => (a :: k) ~ (b :: k)
class NFData a
class forall (m :: Type -> Type). Monad m => Monad t m => MonadTrans (t :: Type -> Type -> Type -> Type)
class Monad m => MonadReader r (m :: Type -> Type) | m -> r
type Reader r = ReaderT r Identity
newtype ReaderT r (m :: Type -> Type) a
ReaderT :: (r -> m a) -> ReaderT r (m :: Type -> Type) a
class Monad m => MonadThrow (m :: Type -> Type)
data ByteString
type LByteString = ByteString
data Builder
data ShortByteString
data Text
type LText = Text
data UnicodeException
DecodeError :: String -> Maybe Word8 -> UnicodeException
EncodeError :: String -> Maybe Char -> UnicodeException
data Vector a
type UVector = Vector
class (Vector Vector a, MVector MVector a) => Unbox a
type SVector = Vector
type GVector = Vector
data IntMap a
data Map k a
data IntSet
data Set a
data Seq a

-- | The class of types that can be converted to a hash value.
--   
--   Minimal implementation: <a>hashWithSalt</a>.
--   
--   <a>Hashable</a> is intended exclusively for use in in-memory data
--   structures. . <a>Hashable</a> does <i>not</i> have a fixed standard.
--   This allows it to improve over time. . Because it does not have a
--   fixed standard, different computers or computers on different versions
--   of the code will observe different hash values. As such,
--   <a>Hashable</a> is not recommended for use other than in-memory
--   datastructures. Specifically, <a>Hashable</a> is not intended for
--   network use or in applications which persist hashed values. For stable
--   hashing use named hashes: sha256, crc32, xxhash etc.
--   
--   If you are looking for <a>Hashable</a> instance in <tt>time</tt>
--   package, check <a>time-compat</a>
class Eq a => Hashable a

-- | A map from keys to values. A map cannot contain duplicate keys; each
--   key can map to at most one value.
data HashMap k v

-- | A set of values. A set cannot contain duplicate values.
data HashSet a

-- | Class of monads which can perform primitive state-transformer actions.
class Monad m => PrimMonad (m :: Type -> Type) where {
    
    -- | State token type.
    type PrimState (m :: Type -> Type);
}

module RIO.Prelude
(||) :: Bool -> Bool -> Bool
(&&) :: Bool -> Bool -> Bool
not :: Bool -> Bool
otherwise :: Bool
bool :: a -> a -> Bool -> a
maybe :: b -> (a -> b) -> Maybe a -> b
fromMaybe :: a -> Maybe a -> a

-- | Get a <a>First</a> value with a default fallback
fromFirst :: a -> First a -> a
isJust :: Maybe a -> Bool
isNothing :: Maybe a -> Bool
listToMaybe :: [a] -> Maybe a
maybeToList :: Maybe a -> [a]
catMaybes :: [Maybe a] -> [a]
mapMaybe :: (a -> Maybe b) -> [a] -> [b]

-- | Applicative <a>mapMaybe</a>.
mapMaybeA :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b]

-- | Monadic <a>mapMaybe</a>.
mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]

-- | <pre>
--   <a>forMaybeA</a> <a>==</a> <a>flip</a> <a>mapMaybeA</a>
--   </pre>
forMaybeA :: Applicative f => [a] -> (a -> f (Maybe b)) -> f [b]

-- | <pre>
--   <a>forMaybeM</a> <a>==</a> <a>flip</a> <a>mapMaybeM</a>
--   </pre>
forMaybeM :: Monad m => [a] -> (a -> m (Maybe b)) -> m [b]
either :: (a -> c) -> (b -> c) -> Either a b -> c
fromLeft :: a -> Either a b -> a
fromRight :: b -> Either a b -> b
isLeft :: Either a b -> Bool
isRight :: Either a b -> Bool

-- | Apply a function to a <a>Left</a> constructor
mapLeft :: (a1 -> a2) -> Either a1 b -> Either a2 b
lefts :: [Either a b] -> [a]
partitionEithers :: [Either a b] -> ([a], [b])
rights :: [Either a b] -> [b]
fst :: (a, b) -> a
snd :: (a, b) -> b
curry :: ((a, b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> (a, b) -> c
(==) :: Eq a => a -> a -> Bool
(/=) :: Eq a => a -> a -> Bool
(<) :: 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
compare :: Ord a => a -> a -> Ordering
comparing :: Ord a => (b -> a) -> b -> b -> Ordering
newtype Down a
Down :: a -> Down a
[getDown] :: Down a -> a
fromEnum :: Enum a => a -> Int
minBound :: Bounded a => a
maxBound :: Bounded a => a
(+) :: Num a => a -> a -> a
(-) :: Num a => a -> a -> a
(*) :: Num a => a -> a -> a
(^) :: (Num a, Integral b) => a -> b -> a
negate :: Num a => a -> a
abs :: Num a => a -> a
signum :: Num a => a -> a
fromInteger :: Num a => Integer -> a
subtract :: Num a => a -> a -> a
toRational :: Real a => a -> Rational
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
even :: Integral a => a -> Bool
odd :: Integral a => a -> Bool
gcd :: Integral a => a -> a -> a
lcm :: Integral a => a -> a -> a
fromIntegral :: (Integral a, Num b) => a -> b
(/) :: Fractional a => a -> a -> a
(^^) :: (Fractional a, Integral b) => a -> b -> a
recip :: Fractional a => a -> a
fromRational :: Fractional a => Rational -> a
realToFrac :: (Real a, Fractional b) => a -> b
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
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
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
byteSwap16 :: Word16 -> Word16
byteSwap32 :: Word32 -> Word32
byteSwap64 :: Word64 -> Word64
(<>) :: Semigroup a => a -> a -> a
sappend :: Semigroup s => s -> s -> s
mempty :: Monoid a => a
mappend :: Monoid a => a -> a -> a
mconcat :: Monoid a => [a] -> a
fmap :: Functor f => (a -> b) -> f a -> f b
(<$>) :: Functor f => (a -> b) -> f a -> f b
(<$) :: Functor f => a -> f b -> f a
($>) :: Functor f => f a -> b -> f b
void :: Functor f => f a -> f ()
(<&>) :: Functor f => f a -> (a -> b) -> f b
pure :: Applicative f => a -> f a
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
(<*) :: Applicative f => f a -> f b -> f a
(*>) :: Applicative f => f a -> f b -> f b
liftA :: Applicative f => (a -> b) -> f a -> f b
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
forever :: Applicative f => f a -> f b
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()
filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
replicateM_ :: Applicative m => Int -> m a -> m ()
zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
return :: Monad m => a -> m a
join :: Monad m => m (m a) -> m a
fail :: MonadFail m => String -> m a
(>>=) :: Monad m => m a -> (a -> m b) -> m b
(>>) :: Monad m => m a -> m b -> m b
(=<<) :: Monad m => (a -> m b) -> m a -> m b
(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
(<$!>) :: Monad m => (a -> b) -> m a -> m b
liftM :: Monad m => (a1 -> r) -> m a1 -> m r
liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r

-- | Run the second value if the first value returns <a>True</a>
whenM :: Monad m => m Bool -> m () -> m ()

-- | Run the second value if the first value returns <a>False</a>
unlessM :: Monad m => m Bool -> m () -> m ()
mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
fold :: (Foldable t, Monoid m) => t m -> m
foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m

-- | Extend <a>foldMap</a> to allow side effects.
--   
--   Internally, this is implemented using a strict left fold. This is used
--   for performance reasons. It also necessitates that this function has a
--   <tt>Monad</tt> constraint and not just an <tt>Applicative</tt>
--   constraint. For more information, see
--   <a>https://github.com/commercialhaskell/rio/pull/99#issuecomment-394179757</a>.
foldMapM :: (Monad m, Monoid w, Foldable t) => (a -> m w) -> t a -> m w
elem :: (Foldable t, Eq a) => a -> t a -> Bool
notElem :: (Foldable t, Eq a) => a -> t a -> Bool
null :: Foldable t => t a -> Bool
length :: Foldable t => t a -> Int
sum :: (Foldable t, Num a) => t a -> a
product :: (Foldable t, Num a) => t a -> a
all :: Foldable t => (a -> Bool) -> t a -> Bool
any :: Foldable t => (a -> Bool) -> t a -> Bool
and :: Foldable t => t Bool -> Bool
or :: Foldable t => t Bool -> Bool
toList :: Foldable t => t a -> [a]
concat :: Foldable t => t [a] -> [a]
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> 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)
forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
(<|>) :: Alternative f => f a -> f a -> f a
some :: Alternative f => f a -> f [a]
many :: Alternative f => f a -> f [a]
optional :: Alternative f => f a -> f (Maybe a)
asum :: (Foldable t, Alternative f) => t (f a) -> f a
guard :: Alternative f => Bool -> f ()
when :: Applicative f => Bool -> f () -> f ()
unless :: Applicative f => Bool -> f () -> f ()
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
bifold :: (Bifoldable p, Monoid m) => p m m -> m
bifoldMap :: (Bifoldable p, Monoid m) => (a -> m) -> (b -> m) -> p a b -> m
bifoldr :: Bifoldable p => (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldl :: Bifoldable p => (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c
bifoldr' :: Bifoldable t => (a -> c -> c) -> (b -> c -> c) -> c -> t a b -> c
bifoldr1 :: Bifoldable t => (a -> a -> a) -> t a a -> a
bifoldrM :: (Bifoldable t, Monad m) => (a -> c -> m c) -> (b -> c -> m c) -> c -> t a b -> m c
bifoldl' :: Bifoldable t => (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> a
bifoldl1 :: Bifoldable t => (a -> a -> a) -> t a a -> a
bifoldlM :: (Bifoldable t, Monad m) => (a -> b -> m a) -> (a -> c -> m a) -> a -> t b c -> m a
bitraverse_ :: (Bifoldable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f ()
bifor_ :: (Bifoldable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f ()
bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()
biasum :: (Bifoldable t, Alternative f) => t (f a) (f a) -> f a
biList :: Bifoldable t => t a a -> [a]
binull :: Bifoldable t => t a b -> Bool
bilength :: Bifoldable t => t a b -> Int
bielem :: (Bifoldable t, Eq a) => a -> t a a -> Bool
bimaximum :: (Bifoldable t, Ord a) => t a a -> a
biminimum :: (Bifoldable t, Ord a) => t a a -> a
bisum :: (Bifoldable t, Num a) => t a a -> a
biproduct :: (Bifoldable t, Num a) => t a a -> a
biconcat :: Bifoldable t => t [a] [a] -> [a]
biconcatMap :: Bifoldable t => (a -> [c]) -> (b -> [c]) -> t a b -> [c]
biand :: Bifoldable t => t Bool Bool -> Bool
bior :: Bifoldable t => t Bool Bool -> Bool
biany :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
biall :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
bimaximumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a
biminimumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a
binotElem :: (Bifoldable t, Eq a) => a -> t a a -> Bool
bifind :: Bifoldable t => (a -> Bool) -> t a a -> Maybe a
bitraverse :: (Bitraversable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)
bifor :: (Bitraversable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f (t c d)
bimapAccumL :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e)
bimapAccumR :: Bitraversable t => (a -> b -> (a, c)) -> (a -> d -> (a, e)) -> a -> t b d -> (a, t c e)
mzero :: MonadPlus m => m a
mplus :: MonadPlus m => m a -> m a -> m a
msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c')
(>>>) :: forall {k} cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
id :: a -> a
const :: a -> b -> a
(.) :: (b -> c) -> (a -> b) -> a -> c
($) :: (a -> b) -> a -> b
(&) :: a -> (a -> b) -> b
flip :: (a -> b -> c) -> b -> a -> c
fix :: (a -> a) -> a
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
($!) :: (a -> b) -> a -> b
seq :: a -> b -> b
error :: HasCallStack => [Char] -> a
undefined :: HasCallStack => a
asTypeOf :: a -> a -> a

-- | Helper function to force an action to run in <a>IO</a>. Especially
--   useful for overly general contexts, like hspec tests.
asIO :: IO a -> IO a
(++) :: [a] -> [a] -> [a]
break :: (a -> Bool) -> [a] -> ([a], [a])
drop :: Int -> [a] -> [a]
dropWhile :: (a -> Bool) -> [a] -> [a]
filter :: (a -> Bool) -> [a] -> [a]
lookup :: Eq a => a -> [(a, b)] -> Maybe b
map :: (a -> b) -> [a] -> [b]
replicate :: Int -> a -> [a]
reverse :: [a] -> [a]
span :: (a -> Bool) -> [a] -> ([a], [a])
take :: Int -> [a] -> [a]
takeWhile :: (a -> Bool) -> [a] -> [a]
zip :: [a] -> [b] -> [(a, b)]
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]

-- | Strip out duplicates
nubOrd :: Ord a => [a] -> [a]
fromString :: IsString a => String -> a
lines :: String -> [String]
unlines :: [String] -> String
unwords :: [String] -> String
words :: String -> [String]
show :: Show a => a -> String
readMaybe :: Read a => String -> Maybe a
($!!) :: NFData a => (a -> b) -> a -> b
rnf :: NFData a => a -> ()
deepseq :: NFData a => a -> b -> b
force :: NFData a => a -> a
absurd :: Void -> a
lift :: (MonadTrans t, Monad m) => m a -> t m a
ask :: MonadReader r m => m r
asks :: MonadReader r m => (r -> a) -> m a
local :: MonadReader r m => (r -> r) -> m a -> m a
runReader :: Reader r a -> r -> a
runReaderT :: ReaderT r m a -> r -> m a
toStrictBytes :: LByteString -> ByteString
fromStrictBytes :: ByteString -> LByteString
toShort :: ByteString -> ShortByteString
fromShort :: ShortByteString -> ByteString
tshow :: Show a => a -> Text
decodeUtf8Lenient :: ByteString -> Text
decodeUtf8' :: ByteString -> Either UnicodeException Text
decodeUtf8With :: OnDecodeError -> ByteString -> Text
encodeUtf8 :: Text -> ByteString
encodeUtf8Builder :: Text -> Builder
lenientDecode :: OnDecodeError

-- | Execute a primitive operation.
primitive :: PrimMonad m => (State# (PrimState m) -> (# State# (PrimState m), a #)) -> m a
runST :: (forall s. () => ST s a) -> a

module RIO.Deque

-- | A double-ended queue supporting any underlying vector type and any
--   monad.
--   
--   This implements a circular double-ended queue with exponential growth.
data Deque (v :: Type -> Type -> Type) s a

-- | A <a>Deque</a> specialized to unboxed vectors.
type UDeque = Deque MVector

-- | A <a>Deque</a> specialized to storable vectors.
type SDeque = Deque MVector

-- | A <a>Deque</a> specialized to boxed vectors.
type BDeque = Deque MVector

-- | Create a new, empty <a>Deque</a>
newDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => m (Deque v (PrimState m) a)

-- | <i>O(1)</i> - Get the number of elements that is currently in the
--   <a>Deque</a>
getDequeSize :: forall m (v :: Type -> Type -> Type) a. PrimMonad m => Deque v (PrimState m) a -> m Int

-- | Pop the first value from the beginning of the <a>Deque</a>
popFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)

-- | Pop the first value from the end of the <a>Deque</a>
popBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)

-- | Push a new value to the beginning of the <a>Deque</a>
pushFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()

-- | Push a new value to the end of the <a>Deque</a>
pushBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()

-- | Fold over a <a>Deque</a>, starting at the beginning. Does not modify
--   the <a>Deque</a>.
foldlDeque :: forall (v :: Type -> Type -> Type) a m acc. (MVector v a, PrimMonad m) => (acc -> a -> m acc) -> acc -> Deque v (PrimState m) a -> m acc

-- | Fold over a <a>Deque</a>, starting at the end. Does not modify the
--   <a>Deque</a>.
foldrDeque :: forall (v :: Type -> Type -> Type) a m acc. (MVector v a, PrimMonad m) => (a -> acc -> m acc) -> acc -> Deque v (PrimState m) a -> m acc

-- | Convert a <a>Deque</a> into a list. Does not modify the <a>Deque</a>.
dequeToList :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m [a]

-- | Convert to an immutable vector of any type. If resulting pure vector
--   corresponds to the mutable one used by the <a>Deque</a>, it will be
--   more efficient to use <a>freezeDeque</a> instead.
--   
--   <h4><b>Example</b></h4>
--   
--   <pre>
--   &gt;&gt;&gt; :set -XTypeApplications
--   
--   &gt;&gt;&gt; import qualified RIO.Vector.Unboxed as U
--   
--   &gt;&gt;&gt; import qualified RIO.Vector.Storable as S
--   
--   &gt;&gt;&gt; d &lt;- newDeque @U.MVector @Int
--   
--   &gt;&gt;&gt; mapM_ (pushFrontDeque d) [0..10]
--   
--   &gt;&gt;&gt; dequeToVector @S.Vector d
--   [10,9,8,7,6,5,4,3,2,1,0]
--   </pre>
dequeToVector :: forall v' a (v :: Type -> Type -> Type) m. (Vector v' a, MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (v' a)

-- | Yield an immutable copy of the underlying mutable vector. The
--   difference from <a>dequeToVector</a> is that the the copy will be
--   performed with a more efficient <tt>memcpy</tt>, rather than element
--   by element. The downside is that the resulting vector type must be the
--   one that corresponds to the mutable one that is used in the
--   <a>Deque</a>.
--   
--   <h4><b>Example</b></h4>
--   
--   <pre>
--   &gt;&gt;&gt; :set -XTypeApplications
--   
--   &gt;&gt;&gt; import qualified RIO.Vector.Unboxed as U
--   
--   &gt;&gt;&gt; d &lt;- newDeque @U.MVector @Int
--   
--   &gt;&gt;&gt; mapM_ (pushFrontDeque d) [0..10]
--   
--   &gt;&gt;&gt; freezeDeque @U.Vector d
--   [10,9,8,7,6,5,4,3,2,1,0]
--   </pre>
freezeDeque :: (Vector v a, PrimMonad m) => Deque (Mutable v) (PrimState m) a -> m (v a)

-- | Helper function to assist with type inference, forcing usage of an
--   unboxed vector.
asUDeque :: UDeque s a -> UDeque s a

-- | Helper function to assist with type inference, forcing usage of a
--   storable vector.
asSDeque :: SDeque s a -> SDeque s a

-- | Helper function to assist with type inference, forcing usage of a
--   boxed vector.
asBDeque :: BDeque s a -> BDeque s a


-- | Interacting with external processes.
--   
--   This module provides a layer on top of <a>System.Process.Typed</a>,
--   with the following additions:
--   
--   <ul>
--   <li>For efficiency, it will cache <tt>PATH</tt> lookups.</li>
--   <li>For convenience, you can set the working directory and env vars
--   overrides in a <a>RIO</a> environment instead of on the individual
--   calls to the process.</li>
--   <li>Built-in support for logging at the debug level.</li>
--   </ul>
--   
--   In order to switch over to this API, the main idea is:
--   
--   <ul>
--   <li>Like most of the rio library, you need to create an environment
--   value (this time <a>ProcessContext</a>), and include it in your
--   <a>RIO</a> environment. See <a>mkProcessContext</a>.</li>
--   <li>Instead of using the <a>proc</a> function from
--   <a>System.Process.Typed</a> for creating a <a>ProcessConfig</a>, use
--   the locally defined <a>proc</a> function, which will handle overriding
--   environment variables, looking up paths, performing logging, etc.</li>
--   </ul>
--   
--   Once you have your <a>ProcessConfig</a>, use the standard functions
--   from <a>Typed</a> (reexported here for convenient) for running the
--   <a>ProcessConfig</a>.
module RIO.Process

-- | Context in which to run processes.
data ProcessContext

-- | Get the <a>ProcessContext</a> from the environment.
class HasProcessContext env
processContextL :: HasProcessContext env => Lens' env ProcessContext

-- | The environment variable map
type EnvVars = Map Text Text

-- | Create a new <a>ProcessContext</a> from the given environment variable
--   map.
mkProcessContext :: MonadIO m => EnvVars -> m ProcessContext

-- | Same as <a>mkProcessContext</a> but uses the system environment (from
--   <a>getEnvironment</a>).
mkDefaultProcessContext :: MonadIO m => m ProcessContext

-- | Modify the environment variables of a <a>ProcessContext</a>. This will
--   not change the working directory.
--   
--   Note that this requires <a>MonadIO</a>, as it will create a new
--   <a>IORef</a> for the cache.
modifyEnvVars :: MonadIO m => ProcessContext -> (EnvVars -> EnvVars) -> m ProcessContext

-- | Use <a>modifyEnvVars</a> to create a new <a>ProcessContext</a>, and
--   then use it in the provided action.
withModifyEnvVars :: (HasProcessContext env, MonadReader env m, MonadIO m) => (EnvVars -> EnvVars) -> m a -> m a

-- | Look into the <a>ProcessContext</a> and return the specified
--   environmet variable if one is available.
lookupEnvFromContext :: (MonadReader env m, HasProcessContext env) => Text -> m (Maybe Text)

-- | Set the working directory to be used by child processes.
withWorkingDir :: (HasProcessContext env, MonadReader env m, MonadIO m) => FilePath -> m a -> m a

-- | Override the working directory processes run in. <tt>Nothing</tt>
--   means the current process's working directory.
workingDirL :: HasProcessContext env => Lens' env (Maybe FilePath)

-- | Get the environment variables. We cannot provide a <tt>Lens</tt> here,
--   since updating the environment variables requires an <tt>IO</tt>
--   action to allocate a new <tt>IORef</tt> for holding the executable
--   path cache.
envVarsL :: HasProcessContext env => SimpleGetter env EnvVars

-- | Get the <a>EnvVars</a> as an associated list of <a>String</a>s.
--   
--   Useful for interacting with other libraries.
envVarsStringsL :: HasProcessContext env => SimpleGetter env [(String, String)]

-- | Get the list of directories searched for executables (the
--   <tt>PATH</tt>).
--   
--   Similar to <tt>envVarMapL</tt>, this cannot be a full <tt>Lens</tt>.
exeSearchPathL :: HasProcessContext env => SimpleGetter env [FilePath]

-- | Reset the executable cache.
resetExeCache :: (MonadIO m, MonadReader env m, HasProcessContext env) => m ()

-- | Provide a <a>ProcessConfig</a> based on the <a>ProcessContext</a> in
--   scope. Deals with resolving the full path, setting the child process's
--   environment variables, setting the working directory, and wrapping the
--   call with <a>withProcessTimeLog</a> for debugging output.
--   
--   This is intended to be analogous to the <tt>proc</tt> function
--   provided by the <tt>System.Process.Typed</tt> module, but has a
--   different type signature to (1) allow it to perform <tt>IO</tt>
--   actions for looking up paths, and (2) allow logging and timing of the
--   running action.
proc :: (HasProcessContext env, HasLogFunc env, MonadReader env m, MonadIO m, HasCallStack) => FilePath -> [String] -> (ProcessConfig () () () -> m a) -> m a

-- | Same as <a>withProcess</a>, but generalized to <a>MonadUnliftIO</a>.

-- | <i>Deprecated: Please consider using withProcessWait, or instead use
--   withProcessTerm</i>
withProcess :: MonadUnliftIO m => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a

-- | Same as <a>withProcess_</a>, but generalized to <a>MonadUnliftIO</a>.

-- | <i>Deprecated: Please consider using withProcessWait, or instead use
--   withProcessTerm</i>
withProcess_ :: MonadUnliftIO m => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a

-- | Same as <a>withProcessWait</a>, but generalized to
--   <a>MonadUnliftIO</a>.
withProcessWait :: MonadUnliftIO m => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a

-- | Same as <a>withProcessWait_</a>, but generalized to
--   <a>MonadUnliftIO</a>.
withProcessWait_ :: MonadUnliftIO m => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a

-- | Same as <a>withProcessTerm</a>, but generalized to
--   <a>MonadUnliftIO</a>.
withProcessTerm :: MonadUnliftIO m => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a

-- | Same as <a>withProcessTerm_</a>, but generalized to
--   <a>MonadUnliftIO</a>.
withProcessTerm_ :: MonadUnliftIO m => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a

-- | Execute a process within the configured environment.
--   
--   Execution will not return, because either:
--   
--   1) On non-windows, execution is taken over by execv of the
--   sub-process. This allows signals to be propagated (#527)
--   
--   2) On windows, an <a>ExitCode</a> exception will be thrown.
exec :: (HasProcessContext env, HasLogFunc env) => String -> [String] -> RIO env b

-- | Like <a>exec</a>, but does not use <tt>execv</tt> on non-windows. This
--   way, there is a sub-process, which is helpful in some cases
--   (<a>https://github.com/commercialhaskell/stack/issues/1306</a>).
--   
--   This function only exits by throwing <a>ExitCode</a>.
execSpawn :: (HasProcessContext env, HasLogFunc env) => String -> [String] -> RIO env a

-- | A convenience environment combining a <a>LogFunc</a> and a
--   <a>ProcessContext</a>
data LoggedProcessContext
LoggedProcessContext :: ProcessContext -> LogFunc -> LoggedProcessContext

-- | Run an action using a <a>LoggedProcessContext</a> with default
--   settings and no logging.
withProcessContextNoLogging :: MonadIO m => RIO LoggedProcessContext a -> m a

-- | Exception type which may be generated in this module.
--   
--   <i>NOTE</i> Other exceptions may be thrown by underlying libraries!
data ProcessException
NoPathFound :: ProcessException
ExecutableNotFound :: String -> [FilePath] -> ProcessException
ExecutableNotFoundAt :: FilePath -> ProcessException
PathsInvalidInPath :: [FilePath] -> ProcessException

-- | Check if the given executable exists on the given PATH.
doesExecutableExist :: (MonadIO m, MonadReader env m, HasProcessContext env) => String -> m Bool

-- | Find the complete path for the given executable name.
--   
--   On POSIX systems, filenames that match but are not exectuables are
--   excluded.
--   
--   On Windows systems, the executable names tried, in turn, are the
--   supplied name (only if it has an extension) and that name extended by
--   each of the <a>exeExtensions</a>. Also, this function may behave
--   differently from <a>findExecutable</a>. The latter excludes as
--   executables filenames without a <tt>.bat</tt>, <tt>.cmd</tt>,
--   <tt>.com</tt> or <tt>.exe</tt> extension (case-insensitive).
findExecutable :: (MonadIO m, MonadReader env m, HasProcessContext env) => String -> m (Either ProcessException FilePath)

-- | Get the filename extensions for executable files, including the dot
--   (if any).
--   
--   On POSIX systems, this is <tt>[""]</tt>.
--   
--   On Windows systems, the list is determined by the value of the
--   <tt>PATHEXT</tt> environment variable, if it present in the
--   environment. If the variable is absent, this is its default value on a
--   Windows system. This function may, therefore, behave differently from
--   <a>exeExtension</a>, which returns only <tt>".exe"</tt>.
exeExtensions :: (MonadIO m, MonadReader env m, HasProcessContext env) => m [String]

-- | Augment the given value (assumed to be that of an environment variable
--   that lists paths, such as PATH; this is not checked) with the given
--   extra paths. Those paths are prepended (as in: they take precedence).
augmentPath :: [FilePath] -> Maybe Text -> Either ProcessException Text

-- | Apply <a>augmentPath</a> on the value of the PATH environment variable
--   in the given <a>EnvVars</a>.
augmentPathMap :: [FilePath] -> EnvVars -> Either ProcessException EnvVars

-- | Apply <a>augmentPath</a> on the value of the given environment
--   variable in the given <a>EnvVars</a>.
augmentPathMap' :: Text -> [FilePath] -> EnvVars -> Either ProcessException EnvVars

-- | Show a process arg including speechmarks when necessary. Just for
--   debugging purposes, not functionally important.
showProcessArgDebug :: String -> Text

-- | An abstract configuration for a process, which can then be launched
--   into an actual running <tt>Process</tt>. Takes three type parameters,
--   providing the types of standard input, standard output, and standard
--   error, respectively.
--   
--   There are three ways to construct a value of this type:
--   
--   <ul>
--   <li>With the <a>proc</a> smart constructor, which takes a command name
--   and a list of arguments.</li>
--   <li>With the <a>shell</a> smart constructor, which takes a shell
--   string</li>
--   <li>With the <a>IsString</a> instance via OverloadedStrings. If you
--   provide it a string with no spaces (e.g., <tt>"date"</tt>), it will
--   treat it as a raw command with no arguments (e.g., <tt>proc "date"
--   []</tt>). If it has spaces, it will use <tt>shell</tt>.</li>
--   </ul>
--   
--   In all cases, the default for all three streams is to inherit the
--   streams from the parent process. For other settings, see the
--   <a>setters below</a> for default values.
--   
--   Once you have a <tt>ProcessConfig</tt> you can launch a process from
--   it using the functions in the section <a>Launch a process</a>.
data ProcessConfig stdin stdout stderr

-- | A specification for how to create one of the three standard child
--   streams, <tt>stdin</tt>, <tt>stdout</tt> and <tt>stderr</tt>. A
--   <a>StreamSpec</a> can be thought of as containing
--   
--   <ol>
--   <li>A type safe version of <a>StdStream</a> from
--   <a>System.Process</a>. This determines whether the stream should be
--   inherited from the parent process, piped to or from a <a>Handle</a>,
--   etc.</li>
--   <li>A means of accessing the stream as a value of type <tt>a</tt></li>
--   <li>A cleanup action which will be run on the stream once the process
--   terminates</li>
--   </ol>
--   
--   To create a <tt>StreamSpec</tt> see the section <a>Stream specs</a>.
data StreamSpec (streamType :: StreamType) a

-- | Whether a stream is an input stream or output stream. Note that this
--   is from the perspective of the <i>child process</i>, so that a child's
--   standard input stream is an <tt>STInput</tt>, even though the parent
--   process will be writing to it.
data StreamType
STInput :: StreamType
STOutput :: StreamType

-- | A running process. The three type parameters provide the type of the
--   standard input, standard output, and standard error streams.
--   
--   To interact with a <tt>Process</tt> use the functions from the section
--   <a>Interact with a process</a>.
data Process stdin stdout stderr

-- | Set the child's standard input stream to the given <a>StreamSpec</a>.
--   
--   Default: <a>inherit</a>
setStdin :: StreamSpec 'STInput stdin -> ProcessConfig stdin0 stdout stderr -> ProcessConfig stdin stdout stderr

-- | Set the child's standard output stream to the given <a>StreamSpec</a>.
--   
--   Default: <a>inherit</a>
setStdout :: StreamSpec 'STOutput stdout -> ProcessConfig stdin stdout0 stderr -> ProcessConfig stdin stdout stderr

-- | Set the child's standard error stream to the given <a>StreamSpec</a>.
--   
--   Default: <a>inherit</a>
setStderr :: StreamSpec 'STOutput stderr -> ProcessConfig stdin stdout stderr0 -> ProcessConfig stdin stdout stderr

-- | Should we close all file descriptors besides stdin, stdout, and
--   stderr? See <a>close_fds</a> for more information.
--   
--   Default: False
setCloseFds :: Bool -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Should we create a new process group?
--   
--   Default: False
setCreateGroup :: Bool -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Delegate handling of Ctrl-C to the child. For more information, see
--   <a>delegate_ctlc</a>.
--   
--   Default: False
setDelegateCtlc :: Bool -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Detach console on Windows, see <a>detach_console</a>.
--   
--   Default: False
setDetachConsole :: Bool -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Create new console on Windows, see <a>create_new_console</a>.
--   
--   Default: False
setCreateNewConsole :: Bool -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Set a new session with the POSIX <tt>setsid</tt> syscall, does nothing
--   on non-POSIX. See <a>new_session</a>.
--   
--   Default: False
setNewSession :: Bool -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Set the child process's group ID with the POSIX <tt>setgid</tt>
--   syscall, does nothing on non-POSIX. See <a>child_group</a>.
--   
--   Default: False
setChildGroup :: GroupID -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Set the child process's user ID with the POSIX <tt>setuid</tt>
--   syscall, does nothing on non-POSIX. See <a>child_user</a>.
--   
--   Default: False
setChildUser :: UserID -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr

-- | Create a new <a>StreamSpec</a> from the given <a>StdStream</a> and a
--   helper function. This function:
--   
--   <ul>
--   <li>Takes as input the raw <tt>Maybe Handle</tt> returned by the
--   <a>createProcess</a> function. The handle will be <tt>Just</tt>
--   <a>Handle</a> if the <a>StdStream</a> argument is <a>CreatePipe</a>
--   and <tt>Nothing</tt> otherwise. See <a>createProcess</a> for more
--   details.</li>
--   <li>Returns the actual stream value <tt>a</tt>, as well as a cleanup
--   function to be run when calling <tt>stopProcess</tt>.</li>
--   </ul>
--   
--   If making a <a>StreamSpec</a> with <a>CreatePipe</a>, prefer
--   <a>mkPipeStreamSpec</a>, which encodes the invariant that a
--   <a>Handle</a> is created.
mkStreamSpec :: forall a (streamType :: StreamType). StdStream -> (ProcessConfig () () () -> Maybe Handle -> IO (a, IO ())) -> StreamSpec streamType a

-- | A stream spec which simply inherits the stream of the parent process.
inherit :: forall (anyStreamType :: StreamType). StreamSpec anyStreamType ()

-- | A stream spec which will close the stream for the child process. You
--   usually do not want to use this, as it will leave the corresponding
--   file descriptor unassigned and hence available for re-use in the child
--   process. Prefer <a>nullStream</a> unless you're certain you want this
--   behavior.
closed :: forall (anyStreamType :: StreamType). StreamSpec anyStreamType ()

-- | An input stream spec which sets the input to the given
--   <a>ByteString</a>. A separate thread will be forked to write the
--   contents to the child process.
byteStringInput :: ByteString -> StreamSpec 'STInput ()

-- | Capture the output of a process in a <a>ByteString</a>.
--   
--   This function will fork a separate thread to consume all input from
--   the process, and will only make the results available when the
--   underlying <a>Handle</a> is closed. As this is provided as an
--   <a>STM</a> action, you can either check if the result is available, or
--   block until it's ready.
--   
--   In the event of any exception occurring when reading from the
--   <a>Handle</a>, the <a>STM</a> action will throw a
--   <a>ByteStringOutputException</a>.
byteStringOutput :: StreamSpec 'STOutput (STM ByteString)

-- | Create a new pipe between this process and the child, and return a
--   <a>Handle</a> to communicate with the child.
createPipe :: forall (anyStreamType :: StreamType). StreamSpec anyStreamType Handle

-- | Use the provided <a>Handle</a> for the child process, and when the
--   process exits, do <i>not</i> close it. This is useful if, for example,
--   you want to have multiple processes write to the same log file
--   sequentially.
useHandleOpen :: forall (anyStreamType :: StreamType). Handle -> StreamSpec anyStreamType ()

-- | Use the provided <a>Handle</a> for the child process, and when the
--   process exits, close it. If you have no reason to keep the
--   <a>Handle</a> open, you should use this over <a>useHandleOpen</a>.
useHandleClose :: forall (anyStreamType :: StreamType). Handle -> StreamSpec anyStreamType ()

-- | Launch a process based on the given <a>ProcessConfig</a>. You should
--   ensure that you call <a>stopProcess</a> on the result. It's usually
--   better to use one of the functions in this module which ensures
--   <a>stopProcess</a> is called, such as <a>withProcessWait</a>.
startProcess :: MonadIO m => ProcessConfig stdin stdout stderr -> m (Process stdin stdout stderr)

-- | Close a process and release any resources acquired. This will ensure
--   <a>terminateProcess</a> is called, wait for the process to actually
--   exit, and then close out resources allocated for the streams. In the
--   event of any cleanup exceptions being thrown this will throw an
--   exception.
stopProcess :: MonadIO m => Process stdin stdout stderr -> m ()

-- | Run a process, capture its standard output and error as a
--   <a>ByteString</a>, wait for it to complete, and then return its exit
--   code, output, and error.
--   
--   Note that any previously used <a>setStdout</a> or <a>setStderr</a>
--   will be overridden.
readProcess :: MonadIO m => ProcessConfig stdin stdoutIgnored stderrIgnored -> m (ExitCode, ByteString, ByteString)

-- | Same as <a>readProcess</a>, but instead of returning the
--   <a>ExitCode</a>, checks it with <a>checkExitCode</a>.
--   
--   Exceptions thrown by this function will include stdout and stderr.
readProcess_ :: MonadIO m => ProcessConfig stdin stdoutIgnored stderrIgnored -> m (ByteString, ByteString)

-- | Run the given process, wait for it to exit, and returns its
--   <a>ExitCode</a>.
runProcess :: MonadIO m => ProcessConfig stdin stdout stderr -> m ExitCode

-- | Same as <a>runProcess</a>, but instead of returning the
--   <a>ExitCode</a>, checks it with <a>checkExitCode</a>.
runProcess_ :: MonadIO m => ProcessConfig stdin stdout stderr -> m ()

-- | Same as <a>readProcess</a>, but only read the stdout of the process.
--   Original settings for stderr remain.
readProcessStdout :: MonadIO m => ProcessConfig stdin stdoutIgnored stderr -> m (ExitCode, ByteString)

-- | Same as <a>readProcessStdout</a>, but instead of returning the
--   <a>ExitCode</a>, checks it with <a>checkExitCode</a>.
--   
--   Exceptions thrown by this function will include stdout.
readProcessStdout_ :: MonadIO m => ProcessConfig stdin stdoutIgnored stderr -> m ByteString

-- | Same as <a>readProcess</a>, but only read the stderr of the process.
--   Original settings for stdout remain.
readProcessStderr :: MonadIO m => ProcessConfig stdin stdout stderrIgnored -> m (ExitCode, ByteString)

-- | Same as <a>readProcessStderr</a>, but instead of returning the
--   <a>ExitCode</a>, checks it with <a>checkExitCode</a>.
--   
--   Exceptions thrown by this function will include stderr.
readProcessStderr_ :: MonadIO m => ProcessConfig stdin stdout stderrIgnored -> m ByteString

-- | Wait for the process to exit and then return its <a>ExitCode</a>.
waitExitCode :: MonadIO m => Process stdin stdout stderr -> m ExitCode

-- | Same as <a>waitExitCode</a>, but in <a>STM</a>.
waitExitCodeSTM :: Process stdin stdout stderr -> STM ExitCode

-- | Check if a process has exited and, if so, return its <a>ExitCode</a>.
getExitCode :: MonadIO m => Process stdin stdout stderr -> m (Maybe ExitCode)

-- | Same as <a>getExitCode</a>, but in <a>STM</a>.
getExitCodeSTM :: Process stdin stdout stderr -> STM (Maybe ExitCode)

-- | Wait for a process to exit, and ensure that it exited successfully. If
--   not, throws an <a>ExitCodeException</a>.
--   
--   Exceptions thrown by this function will not include stdout or stderr
--   (This prevents unbounded memory usage from reading them into memory).
--   However, some callers such as <a>readProcess_</a> catch the exception,
--   add the stdout and stderr, and rethrow.
checkExitCode :: MonadIO m => Process stdin stdout stderr -> m ()

-- | Same as <a>checkExitCode</a>, but in <a>STM</a>.
checkExitCodeSTM :: Process stdin stdout stderr -> STM ()

-- | Get the child's standard input stream value.
getStdin :: Process stdin stdout stderr -> stdin

-- | Get the child's standard output stream value.
getStdout :: Process stdin stdout stderr -> stdout

-- | Get the child's standard error stream value.
getStderr :: Process stdin stdout stderr -> stderr

-- | Exception thrown by <a>checkExitCode</a> in the event of a non-success
--   exit code. Note that <a>checkExitCode</a> is called by other functions
--   as well, like <a>runProcess_</a> or <a>readProcess_</a>.
--   
--   Note that several functions that throw an <a>ExitCodeException</a>
--   intentionally do not populate <a>eceStdout</a> or <a>eceStderr</a>.
--   This prevents unbounded memory usage for large stdout and stderrs.
--   
--   Functions which do include <a>eceStdout</a> or <a>eceStderr</a> (like
--   <a>readProcess_</a>) state so in their documentation.
data ExitCodeException
ExitCodeException :: ExitCode -> ProcessConfig () () () -> ByteString -> ByteString -> ExitCodeException
[eceExitCode] :: ExitCodeException -> ExitCode
[eceProcessConfig] :: ExitCodeException -> ProcessConfig () () ()
[eceStdout] :: ExitCodeException -> ByteString
[eceStderr] :: ExitCodeException -> ByteString

-- | Wrapper for when an exception is thrown when reading from a child
--   process, used by <a>byteStringOutput</a>.
data ByteStringOutputException
ByteStringOutputException :: SomeException -> ProcessConfig () () () -> ByteStringOutputException

-- | Take <a>ProcessHandle</a> out of the <a>Process</a>. This method is
--   needed in cases one need to use low level functions from the
--   <tt>process</tt> package. Use cases for this method are:
--   
--   <ol>
--   <li>Send a special signal to the process.</li>
--   <li>Terminate the process group instead of terminating single
--   process.</li>
--   <li>Use platform specific API on the underlying process.</li>
--   </ol>
--   
--   This method is considered unsafe because the actions it performs on
--   the underlying process may overlap with the functionality that
--   <tt>typed-process</tt> provides. For example the user should not call
--   <a>waitForProcess</a> on the process handle as either
--   <a>waitForProcess</a> or <a>stopProcess</a> will lock. Additionally,
--   even if process was terminated by the <a>terminateProcess</a> or by
--   sending signal, <a>stopProcess</a> should be called either way in
--   order to cleanup resources allocated by the <tt>typed-process</tt>.
unsafeProcessHandle :: Process stdin stdout stderr -> ProcessHandle
instance GHC.Classes.Eq RIO.Process.ProcessException
instance GHC.Internal.Exception.Type.Exception RIO.Process.ProcessException
instance RIO.Prelude.Logger.HasLogFunc RIO.Process.LoggedProcessContext
instance RIO.Process.HasProcessContext RIO.Process.LoggedProcessContext
instance RIO.Process.HasProcessContext RIO.Process.ProcessContext
instance GHC.Internal.Show.Show RIO.Process.ProcessException


-- | Provide a <tt><a>SimpleApp</a></tt> datatype, for providing a basic
--   <tt>App</tt>-like environment with common functionality built in. This
--   is intended to make it easier to, e.g., use rio's logging and process
--   code from within short scripts.
module RIO.Prelude.Simple

-- | A simple, non-customizable environment type for <tt>RIO</tt>, which
--   provides common functionality. If it's insufficient for your needs,
--   define your own, custom <tt>App</tt> data type.
data SimpleApp

-- | Constructor for <a>SimpleApp</a>. In case when <a>ProcessContext</a>
--   is not supplied <a>mkDefaultProcessContext</a> will be used to create
--   it.
mkSimpleApp :: MonadIO m => LogFunc -> Maybe ProcessContext -> m SimpleApp

-- | Run with a default configured <tt>SimpleApp</tt>, consisting of:
--   
--   <ul>
--   <li>Logging to stderr</li>
--   <li>If the <tt>RIO_VERBOSE</tt> environment variable is set, turns on
--   verbose logging</li>
--   <li>Default process context</li>
--   </ul>
runSimpleApp :: MonadIO m => RIO SimpleApp a -> m a
instance RIO.Prelude.Logger.HasLogFunc RIO.Prelude.Simple.SimpleApp
instance RIO.Process.HasProcessContext RIO.Prelude.Simple.SimpleApp


-- | <tt>Seq</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Seq as Seq
--   </pre>
module RIO.Seq
data Seq a
pattern Empty :: Seq a
pattern (:<|) :: a -> Seq a -> Seq a
pattern (:|>) :: Seq a -> a -> Seq a
empty :: Seq a
singleton :: a -> Seq a
(<|) :: a -> Seq a -> Seq a
(|>) :: Seq a -> a -> Seq a
(><) :: Seq a -> Seq a -> Seq a
fromList :: [a] -> Seq a
fromFunction :: Int -> (Int -> a) -> Seq a
fromArray :: Ix i => Array i a -> Seq a
replicate :: Int -> a -> Seq a
replicateA :: Applicative f => Int -> f a -> f (Seq a)
replicateM :: Applicative m => Int -> m a -> m (Seq a)
cycleTaking :: Int -> Seq a -> Seq a
iterateN :: Int -> (a -> a) -> a -> Seq a
unfoldr :: (b -> Maybe (a, b)) -> b -> Seq a
unfoldl :: (b -> Maybe (b, a)) -> b -> Seq a
null :: Seq a -> Bool
length :: Seq a -> Int
data ViewL a
EmptyL :: ViewL a
(:<) :: a -> Seq a -> ViewL a
viewl :: Seq a -> ViewL a
data ViewR a
EmptyR :: ViewR a
(:>) :: Seq a -> a -> ViewR a
viewr :: Seq a -> ViewR a
scanl :: (a -> b -> a) -> a -> Seq b -> Seq a
scanl1 :: (a -> a -> a) -> Seq a -> Seq a
scanr :: (a -> b -> b) -> b -> Seq a -> Seq b
scanr1 :: (a -> a -> a) -> Seq a -> Seq a
tails :: Seq a -> Seq (Seq a)
inits :: Seq a -> Seq (Seq a)
chunksOf :: Int -> Seq a -> Seq (Seq a)
takeWhileL :: (a -> Bool) -> Seq a -> Seq a
takeWhileR :: (a -> Bool) -> Seq a -> Seq a
dropWhileL :: (a -> Bool) -> Seq a -> Seq a
dropWhileR :: (a -> Bool) -> Seq a -> Seq a
spanl :: (a -> Bool) -> Seq a -> (Seq a, Seq a)
spanr :: (a -> Bool) -> Seq a -> (Seq a, Seq a)
breakl :: (a -> Bool) -> Seq a -> (Seq a, Seq a)
breakr :: (a -> Bool) -> Seq a -> (Seq a, Seq a)
partition :: (a -> Bool) -> Seq a -> (Seq a, Seq a)
filter :: (a -> Bool) -> Seq a -> Seq a
sort :: Ord a => Seq a -> Seq a
sortBy :: (a -> a -> Ordering) -> Seq a -> Seq a
unstableSort :: Ord a => Seq a -> Seq a
unstableSortBy :: (a -> a -> Ordering) -> Seq a -> Seq a
lookup :: Int -> Seq a -> Maybe a
(!?) :: Seq a -> Int -> Maybe a
index :: Seq a -> Int -> a
adjust :: (a -> a) -> Int -> Seq a -> Seq a
adjust' :: (a -> a) -> Int -> Seq a -> Seq a
update :: Int -> a -> Seq a -> Seq a
take :: Int -> Seq a -> Seq a
drop :: Int -> Seq a -> Seq a
insertAt :: Int -> a -> Seq a -> Seq a
deleteAt :: Int -> Seq a -> Seq a
splitAt :: Int -> Seq a -> (Seq a, Seq a)
elemIndexL :: Eq a => a -> Seq a -> Maybe Int
elemIndicesL :: Eq a => a -> Seq a -> [Int]
elemIndexR :: Eq a => a -> Seq a -> Maybe Int
elemIndicesR :: Eq a => a -> Seq a -> [Int]
findIndexL :: (a -> Bool) -> Seq a -> Maybe Int
findIndicesL :: (a -> Bool) -> Seq a -> [Int]
findIndexR :: (a -> Bool) -> Seq a -> Maybe Int
findIndicesR :: (a -> Bool) -> Seq a -> [Int]
foldMapWithIndex :: Monoid m => (Int -> a -> m) -> Seq a -> m
foldlWithIndex :: (b -> Int -> a -> b) -> b -> Seq a -> b
foldrWithIndex :: (Int -> a -> b -> b) -> b -> Seq a -> b
mapWithIndex :: (Int -> a -> b) -> Seq a -> Seq b
traverseWithIndex :: Applicative f => (Int -> a -> f b) -> Seq a -> f (Seq b)
reverse :: Seq a -> Seq a
intersperse :: a -> Seq a -> Seq a
zip :: Seq a -> Seq b -> Seq (a, b)
zipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c
zip3 :: Seq a -> Seq b -> Seq c -> Seq (a, b, c)
zipWith3 :: (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d
zip4 :: Seq a -> Seq b -> Seq c -> Seq d -> Seq (a, b, c, d)
zipWith4 :: (a -> b -> c -> d -> e) -> Seq a -> Seq b -> Seq c -> Seq d -> Seq e


-- | <tt>Set</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Set as Set
--   </pre>
--   
--   This module does not export any partial or unchecked functions. For
--   those, see <a>RIO.Set.Partial</a> and <a>RIO.Set.Unchecked</a>
module RIO.Set
data Set a
(\\) :: Ord a => Set a -> Set a -> Set a
null :: Set a -> Bool
size :: Set a -> Int
member :: Ord a => a -> Set a -> Bool
notMember :: Ord a => a -> Set a -> Bool
lookupLT :: Ord a => a -> Set a -> Maybe a
lookupGT :: Ord a => a -> Set a -> Maybe a
lookupLE :: Ord a => a -> Set a -> Maybe a
lookupGE :: Ord a => a -> Set a -> Maybe a
isSubsetOf :: Ord a => Set a -> Set a -> Bool
isProperSubsetOf :: Ord a => Set a -> Set a -> Bool
empty :: Set a
singleton :: a -> Set a
insert :: Ord a => a -> Set a -> Set a
delete :: Ord a => a -> Set a -> Set a
union :: Ord a => Set a -> Set a -> Set a
unions :: (Foldable f, Ord a) => f (Set a) -> Set a
difference :: Ord a => Set a -> Set a -> Set a
intersection :: Ord a => Set a -> Set a -> Set a
filter :: (a -> Bool) -> Set a -> Set a
takeWhileAntitone :: (a -> Bool) -> Set a -> Set a
dropWhileAntitone :: (a -> Bool) -> Set a -> Set a
spanAntitone :: (a -> Bool) -> Set a -> (Set a, Set a)
partition :: (a -> Bool) -> Set a -> (Set a, Set a)
split :: Ord a => a -> Set a -> (Set a, Set a)
splitMember :: Ord a => a -> Set a -> (Set a, Bool, Set a)
splitRoot :: Set a -> [Set a]
lookupIndex :: Ord a => a -> Set a -> Maybe Int
take :: Int -> Set a -> Set a
drop :: Int -> Set a -> Set a
splitAt :: Int -> Set a -> (Set a, Set a)
map :: Ord b => (a -> b) -> Set a -> Set b
foldr :: (a -> b -> b) -> b -> Set a -> b
foldl :: (a -> b -> a) -> a -> Set b -> a
foldr' :: (a -> b -> b) -> b -> Set a -> b
foldl' :: (a -> b -> a) -> a -> Set b -> a
lookupMin :: Set a -> Maybe a
lookupMax :: Set a -> Maybe a
deleteMin :: Set a -> Set a
deleteMax :: Set a -> Set a
maxView :: Set a -> Maybe (a, Set a)
minView :: Set a -> Maybe (a, Set a)
elems :: Set a -> [a]
toList :: Set a -> [a]
fromList :: Ord a => [a] -> Set a
toAscList :: Set a -> [a]
toDescList :: Set a -> [a]
showTree :: Show a => Set a -> String
showTreeWith :: Show a => Bool -> Bool -> Set a -> String
valid :: Ord a => Set a -> Bool


-- | <tt>Set</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Set.Partial as Set'
--   </pre>
module RIO.Set.Partial
findIndex :: Ord a => a -> Set a -> Int
elemAt :: Int -> Set a -> a
deleteAt :: Int -> Set a -> Set a
findMin :: Set a -> a
findMax :: Set a -> a
deleteFindMin :: Set a -> (a, Set a)
deleteFindMax :: Set a -> (a, Set a)


-- | This module contains functions from <a>Data.Set</a> that have
--   unchecked preconditions on their input. If these preconditions are not
--   satisfied, the data structure may end up in an invalid state and other
--   operations may misbehave. Import as:
--   
--   <pre>
--   import qualified RIO.Set.Unchecked as Set'
--   </pre>
module RIO.Set.Unchecked
mapMonotonic :: (a -> b) -> Set a -> Set b
fromAscList :: Eq a => [a] -> Set a
fromDescList :: Eq a => [a] -> Set a
fromDistinctAscList :: [a] -> Set a
fromDistinctDescList :: [a] -> Set a


-- | Provides reexports of <tt>MonadState</tt> and related helpers.
module RIO.State
class Monad m => MonadState s (m :: Type -> Type) | m -> s
get :: MonadState s m => m s
put :: MonadState s m => s -> m ()
state :: MonadState s m => (s -> (a, s)) -> m a
gets :: MonadState s m => (s -> a) -> m a
modify :: MonadState s m => (s -> s) -> m ()
modify' :: MonadState s m => (s -> s) -> m ()
type State s = StateT s Identity
runState :: State s a -> s -> (a, s)
evalState :: State s a -> s -> a
execState :: State s a -> s -> s
mapState :: ((a, s) -> (b, s)) -> State s a -> State s b
withState :: (s -> s) -> State s a -> State s a
newtype StateT s (m :: Type -> Type) a
StateT :: (s -> m (a, s)) -> StateT s (m :: Type -> Type) a
[runStateT] :: StateT s (m :: Type -> Type) a -> s -> m (a, s)
evalStateT :: Monad m => StateT s m a -> s -> m a
execStateT :: Monad m => StateT s m a -> s -> m s
mapStateT :: (m (a, s) -> n (b, s)) -> StateT s m a -> StateT s n b
withStateT :: forall s (m :: Type -> Type) a. (s -> s) -> StateT s m a -> StateT s m a


-- | Strict <tt>Text</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Text as T
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.Text.Partial</a>
module RIO.Text
data Text
pack :: String -> Text
unpack :: Text -> String
singleton :: Char -> Text
empty :: Text
cons :: Char -> Text -> Text
snoc :: Text -> Char -> Text
append :: Text -> Text -> Text
uncons :: Text -> Maybe (Char, Text)
null :: Text -> Bool
length :: Text -> Int
compareLength :: Text -> Int -> Ordering
map :: (Char -> Char) -> Text -> Text
intercalate :: Text -> [Text] -> Text
intersperse :: Char -> Text -> Text
transpose :: [Text] -> [Text]
reverse :: Text -> Text
toCaseFold :: Text -> Text
toLower :: Text -> Text
toUpper :: Text -> Text
toTitle :: Text -> Text
justifyLeft :: Int -> Char -> Text -> Text
justifyRight :: Int -> Char -> Text -> Text
center :: Int -> Char -> Text -> Text
foldl :: (a -> Char -> a) -> a -> Text -> a
foldl' :: (a -> Char -> a) -> a -> Text -> a
foldr :: (Char -> a -> a) -> a -> Text -> a
concat :: [Text] -> Text
concatMap :: (Char -> Text) -> Text -> Text
any :: (Char -> Bool) -> Text -> Bool
all :: (Char -> Bool) -> Text -> Bool
scanl :: (Char -> Char -> Char) -> Char -> Text -> Text
scanl1 :: (Char -> Char -> Char) -> Text -> Text
scanr :: (Char -> Char -> Char) -> Char -> Text -> Text
scanr1 :: (Char -> Char -> Char) -> Text -> Text
mapAccumL :: (a -> Char -> (a, Char)) -> a -> Text -> (a, Text)
mapAccumR :: (a -> Char -> (a, Char)) -> a -> Text -> (a, Text)
replicate :: Int -> Text -> Text
unfoldr :: (a -> Maybe (Char, a)) -> a -> Text
unfoldrN :: Int -> (a -> Maybe (Char, a)) -> a -> Text
take :: Int -> Text -> Text
takeEnd :: Int -> Text -> Text
drop :: Int -> Text -> Text
dropEnd :: Int -> Text -> Text
takeWhile :: (Char -> Bool) -> Text -> Text
takeWhileEnd :: (Char -> Bool) -> Text -> Text
dropWhile :: (Char -> Bool) -> Text -> Text
dropWhileEnd :: (Char -> Bool) -> Text -> Text
dropAround :: (Char -> Bool) -> Text -> Text
strip :: Text -> Text
stripStart :: Text -> Text
stripEnd :: Text -> Text
splitAt :: Int -> Text -> (Text, Text)
break :: (Char -> Bool) -> Text -> (Text, Text)
span :: (Char -> Bool) -> Text -> (Text, Text)
group :: Text -> [Text]
groupBy :: (Char -> Char -> Bool) -> Text -> [Text]
inits :: Text -> [Text]
tails :: Text -> [Text]
split :: (Char -> Bool) -> Text -> [Text]
chunksOf :: Int -> Text -> [Text]
lines :: Text -> [Text]

-- | <a>linesCR</a> breaks a <a>Text</a> up into a list of <a>Text</a>s at
--   newline <a>Char</a>s. It is very similar to <a>lines</a>, but it also
--   removes any trailing <tt>'r'</tt> characters. The resulting
--   <a>Text</a> values do not contain newlines or trailing <tt>'r'</tt>
--   characters.
linesCR :: Text -> [Text]
words :: Text -> [Text]
unlines :: [Text] -> Text
unwords :: [Text] -> Text
isPrefixOf :: Text -> Text -> Bool
isSuffixOf :: Text -> Text -> Bool
isInfixOf :: Text -> Text -> Bool
stripPrefix :: Text -> Text -> Maybe Text
stripSuffix :: Text -> Text -> Maybe Text

-- | Drop prefix if present, otherwise return original <a>Text</a>.
dropPrefix :: Text -> Text -> Text

-- | Drop prefix if present, otherwise return original <a>Text</a>.
dropSuffix :: Text -> Text -> Text
commonPrefixes :: Text -> Text -> Maybe (Text, Text, Text)
filter :: (Char -> Bool) -> Text -> Text
find :: (Char -> Bool) -> Text -> Maybe Char
partition :: (Char -> Bool) -> Text -> (Text, Text)
index :: HasCallStack => Text -> Int -> Char
findIndex :: (Char -> Bool) -> Text -> Maybe Int
zip :: Text -> Text -> [(Char, Char)]
zipWith :: (Char -> Char -> Char) -> Text -> Text -> Text
copy :: Text -> Text
unpackCString# :: Addr# -> Text
encodeUtf8 :: Text -> ByteString
decodeUtf8With :: OnDecodeError -> ByteString -> Text
decodeUtf8' :: ByteString -> Either UnicodeException Text
lenientDecode :: OnDecodeError

module RIO

-- | The Reader+IO monad. This is different from a <a>ReaderT</a> because:
--   
--   <ul>
--   <li>It's not a transformer, it hardcodes IO for simpler usage and
--   error messages.</li>
--   <li>Instances of typeclasses like <tt>MonadLogger</tt> are implemented
--   using classes defined on the environment, instead of using an
--   underlying monad.</li>
--   </ul>
newtype RIO env a
RIO :: ReaderT env IO a -> RIO env a
[unRIO] :: RIO env a -> ReaderT env IO a

-- | Abstract <a>RIO</a> to an arbitrary <a>MonadReader</a> instance, which
--   can handle IO.
liftRIO :: (MonadIO m, MonadReader env m) => RIO env a -> m a

-- | Using the environment run in IO the action that requires that
--   environment.
runRIO :: MonadIO m => env -> RIO env a -> m a
data CallStack

-- | Given a <a>LogOptions</a> value, run the given function with the
--   specified <a>LogFunc</a>. A common way to use this function is:
--   
--   <pre>
--   let isVerbose = False -- get from the command line instead
--   logOptions' &lt;- logOptionsHandle stderr isVerbose
--   let logOptions = setLogUseTime True logOptions'
--   withLogFunc logOptions $ \lf -&gt; do
--     let app = App -- application specific environment
--           { appLogFunc = lf
--           , appOtherStuff = ...
--           }
--     runRIO app $ do
--       logInfo "Starting app"
--       myApp
--   </pre>
withLogFunc :: MonadUnliftIO m => LogOptions -> (LogFunc -> m a) -> m a

-- | Given a <a>LogOptions</a> value, returns both a new <a>LogFunc</a> and
--   a sub-routine that disposes it.
--   
--   Intended for use if you want to deal with the teardown of
--   <a>LogFunc</a> yourself, otherwise prefer the <a>withLogFunc</a>
--   function instead.
newLogFunc :: (MonadIO n, MonadIO m) => LogOptions -> n (LogFunc, m ())

-- | A logging function, wrapped in a newtype for better error messages.
--   
--   An implementation may choose any behavior of this value it wishes,
--   including printing to standard output or no action at all.
data LogFunc

-- | Environment values with a logging function.
class HasLogFunc env
logFuncL :: HasLogFunc env => Lens' env LogFunc

-- | Create a <a>LogOptions</a> value from the given <a>Handle</a> and
--   whether to perform verbose logging or not. Individiual settings can be
--   overridden using appropriate <tt>set</tt> functions. Logging output is
--   guaranteed to be non-interleaved only for a UTF-8 <a>Handle</a> in a
--   multi-thread environment.
--   
--   When Verbose Flag is <tt>True</tt>, the following happens:
--   
--   <ul>
--   <li><tt>setLogVerboseFormat</tt> is called with <tt>True</tt></li>
--   <li><tt>setLogUseColor</tt> is called with <tt>True</tt> (except on
--   Windows)</li>
--   <li><tt>setLogUseLoc</tt> is called with <tt>True</tt></li>
--   <li><tt>setLogUseTime</tt> is called with <tt>True</tt></li>
--   <li><tt>setLogMinLevel</tt> is called with <tt>Debug</tt> log
--   level</li>
--   </ul>
logOptionsHandle :: MonadIO m => Handle -> Bool -> m LogOptions

-- | Configuration for how to create a <a>LogFunc</a>. Intended to be used
--   with the <a>withLogFunc</a> function.
data LogOptions

-- | Set the minimum log level. Messages below this level will not be
--   printed.
--   
--   Default: in verbose mode, <a>LevelDebug</a>. Otherwise,
--   <a>LevelInfo</a>.
setLogMinLevel :: LogLevel -> LogOptions -> LogOptions

-- | Refer to <a>setLogMinLevel</a>. This modifier allows to alter the
--   verbose format value dynamically at runtime.
--   
--   Default: in verbose mode, <a>LevelDebug</a>. Otherwise,
--   <a>LevelInfo</a>.
setLogMinLevelIO :: IO LogLevel -> LogOptions -> LogOptions

-- | Use the verbose format for printing log messages.
--   
--   Default: follows the value of the verbose flag.
setLogVerboseFormat :: Bool -> LogOptions -> LogOptions

-- | Refer to <a>setLogVerboseFormat</a>. This modifier allows to alter the
--   verbose format value dynamically at runtime.
--   
--   Default: follows the value of the verbose flag.
setLogVerboseFormatIO :: IO Bool -> LogOptions -> LogOptions

-- | Do we treat output as a terminal. If <tt>True</tt>, we will enable
--   sticky logging functionality.
--   
--   Default: checks if the <tt>Handle</tt> provided to
--   <a>logOptionsHandle</a> is a terminal with <a>hIsTerminalDevice</a>.
setLogTerminal :: Bool -> LogOptions -> LogOptions

-- | Include the time when printing log messages.
--   
--   Default: <a>True</a> in debug mode, <a>False</a> otherwise.
setLogUseTime :: Bool -> LogOptions -> LogOptions

-- | Use ANSI color codes in the log output.
--   
--   Default: <a>True</a> if in verbose mode <i>and</i> the <a>Handle</a>
--   is a terminal device.
setLogUseColor :: Bool -> LogOptions -> LogOptions

-- | Use code location in the log output.
--   
--   Default: <a>True</a> if in verbose mode, <a>False</a> otherwise.
setLogUseLoc :: Bool -> LogOptions -> LogOptions

-- | Set format method for messages
--   
--   Default: <a>id</a>
setLogFormat :: (Utf8Builder -> Utf8Builder) -> LogOptions -> LogOptions

-- | ANSI color codes for <a>LogLevel</a> in the log output.
--   
--   Default: <a>LevelDebug</a> = "\ESC[32m" -- Green <a>LevelInfo</a> =
--   "\ESC[34m" -- Blue <a>LevelWarn</a> = "\ESC[33m" -- Yellow
--   <a>LevelError</a> = "\ESC[31m" -- Red <a>LevelOther</a> _ = "\ESC[35m"
--   -- Magenta
setLogLevelColors :: (LogLevel -> Utf8Builder) -> LogOptions -> LogOptions

-- | ANSI color codes for secondary content in the log output.
--   
--   Default: "\ESC[90m" -- Bright black (gray)
setLogSecondaryColor :: Utf8Builder -> LogOptions -> LogOptions

-- | ANSI color codes for accents in the log output. Accent colors are
--   indexed by <a>Int</a>.
--   
--   Default: <a>const</a> "\ESC[92m" -- Bright green, for all indicies
setLogAccentColors :: (Int -> Utf8Builder) -> LogOptions -> LogOptions

-- | Log a debug level message with no source.
logDebug :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()

-- | Log an info level message with no source.
logInfo :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()

-- | Log a warn level message with no source.
logWarn :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()

-- | Log an error level message with no source.
logError :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()

-- | Log a message with the specified textual level and no source.
logOther :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> Utf8Builder -> m ()

-- | Write a "sticky" line to the terminal. Any subsequent lines will
--   overwrite this one, and that same line will be repeated below again.
--   In other words, the line sticks at the bottom of the output forever.
--   Running this function again will replace the sticky line with a new
--   sticky line. When you want to get rid of the sticky line, run
--   <a>logStickyDone</a>.
--   
--   Note that not all <a>LogFunc</a> implementations will support sticky
--   messages as described. However, the <a>withLogFunc</a> implementation
--   provided by this module does.
logSticky :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()

-- | This will print out the given message with a newline and disable any
--   further stickiness of the line until a new call to <a>logSticky</a>
--   happens.
logStickyDone :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()

-- | Log a debug level message with the given source.
logDebugS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()

-- | Log an info level message with the given source.
logInfoS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()

-- | Log a warn level message with the given source.
logWarnS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()

-- | Log an error level message with the given source.
logErrorS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()

-- | Log a message with the specified textual level and the given source.
logOtherS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> LogSource -> Utf8Builder -> m ()

-- | Generic, basic function for creating other logging functions.
logGeneric :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> LogLevel -> Utf8Builder -> m ()

-- | Create a <a>LogFunc</a> from the given function.
mkLogFunc :: (CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO ()) -> LogFunc

-- | Create a <a>LogOptions</a> value which will store its data in memory.
--   This is primarily intended for testing purposes. This will return both
--   a <a>LogOptions</a> value and an <a>IORef</a> containing the resulting
--   <a>Builder</a> value.
--   
--   This will default to non-verbose settings and assume there is a
--   terminal attached. These assumptions can be overridden using the
--   appropriate <tt>set</tt> functions.
logOptionsMemory :: MonadIO m => m (IORef Builder, LogOptions)

-- | The log level of a message.
data LogLevel
LevelDebug :: LogLevel
LevelInfo :: LogLevel
LevelWarn :: LogLevel
LevelError :: LogLevel
LevelOther :: !Text -> LogLevel

-- | Where in the application a log message came from. Used for display
--   purposes only.
type LogSource = Text

-- | Convert a <a>CallStack</a> value into a <a>Utf8Builder</a> indicating
--   the first source location.
--   
--   TODO Consider showing the entire call stack instead.
displayCallStack :: CallStack -> Utf8Builder

-- | Disable logging capabilities in a given sub-routine
--   
--   Intended to skip logging in general purpose implementations, where
--   secrets might be logged accidently.
noLogging :: (HasLogFunc env, MonadReader env m) => m a -> m a

-- | Is the log func configured to use color output?
--   
--   Intended for use by code which wants to optionally add additional
--   color to its log messages.
logFuncUseColorL :: HasLogFunc env => SimpleGetter env Bool

-- | What color is the log func configured to use for each <a>LogLevel</a>?
--   
--   Intended for use by code which wants to optionally add additional
--   color to its log messages.
logFuncLogLevelColorsL :: HasLogFunc env => SimpleGetter env (LogLevel -> Utf8Builder)

-- | What color is the log func configured to use for secondary content?
--   
--   Intended for use by code which wants to optionally add additional
--   color to its log messages.
logFuncSecondaryColorL :: HasLogFunc env => SimpleGetter env Utf8Builder

-- | What accent colors, indexed by <a>Int</a>, is the log func configured
--   to use?
--   
--   Intended for use by code which wants to optionally add additional
--   color to its log messages.
logFuncAccentColorsL :: HasLogFunc env => SimpleGetter env (Int -> Utf8Builder)

-- | Log a value generically.
glog :: (MonadIO m, HasCallStack, HasGLogFunc env, MonadReader env m) => GMsg env -> m ()

-- | A generic logger of some type <tt>msg</tt>.
--   
--   Your <tt>GLocFunc</tt> can re-use the existing classical logging
--   framework of RIO, and/or implement additional transforms, filters.
--   Alternatively, you may log to a JSON source in a database, or anywhere
--   else as needed. You can decide how to log levels or severities based
--   on the constructors in your type. You will normally determine this in
--   your main app entry point.
data GLogFunc msg

-- | Make a <a>GLogFunc</a> via classic <a>LogFunc</a>. Use this if you'd
--   like to log your generic data type via the classic RIO terminal
--   logger.
gLogFuncClassic :: (HasLogLevel msg, HasLogSource msg, Display msg) => LogFunc -> GLogFunc msg

-- | Make a custom generic logger. With this you could, for example, write
--   to a database or a log digestion service. For example:
--   
--   <pre>
--   mkGLogFunc (\stack msg -&gt; send (Data.Aeson.encode (JsonLog stack msg)))
--   </pre>
mkGLogFunc :: (CallStack -> msg -> IO ()) -> GLogFunc msg

-- | A vesion of <a>contramapMaybeGLogFunc</a> which supports filering.
contramapMaybeGLogFunc :: (a -> Maybe b) -> GLogFunc b -> GLogFunc a

-- | A contramap. Use this to wrap sub-loggers via <a>mapRIO</a>.
--   
--   If you are on base &gt; 4.12.0, you can just use <a>contramap</a>.
contramapGLogFunc :: (a -> b) -> GLogFunc b -> GLogFunc a

-- | An app is capable of generic logging if it implements this.
class HasGLogFunc env where {
    type GMsg env;
}
gLogFuncL :: HasGLogFunc env => Lens' env (GLogFunc (GMsg env))

-- | Level, if any, of your logs. If unknown, use <tt>LogOther</tt>. Use
--   for your generic log data types that want to sit inside the classic
--   log framework.
class HasLogLevel msg
getLogLevel :: HasLogLevel msg => msg -> LogLevel

-- | Source of a log. This can be whatever you want. Use for your generic
--   log data types that want to sit inside the classic log framework.
class HasLogSource msg
getLogSource :: HasLogSource msg => msg -> LogSource
type family GMsg env

-- | A typeclass for values which can be converted to a <a>Utf8Builder</a>.
--   The intention of this typeclass is to provide a human-friendly display
--   of the data.
class Display a
display :: Display a => a -> Utf8Builder

-- | Display data as <a>Text</a>, which will also be used for
--   <a>display</a> if it is not overriden.
textDisplay :: Display a => a -> Text

-- | A builder of binary data, with the invariant that the underlying data
--   is supposed to be UTF-8 encoded.
newtype Utf8Builder
Utf8Builder :: Builder -> Utf8Builder
[getUtf8Builder] :: Utf8Builder -> Builder

-- | Use the <a>Show</a> instance for a value to convert it to a
--   <a>Utf8Builder</a>.
displayShow :: Show a => a -> Utf8Builder

-- | Convert a <a>Utf8Builder</a> value into a strict <a>Text</a>.
utf8BuilderToText :: Utf8Builder -> Text

-- | Convert a <a>Utf8Builder</a> value into a lazy <a>Text</a>.
utf8BuilderToLazyText :: Utf8Builder -> Text

-- | Convert a <a>ByteString</a> into a <a>Utf8Builder</a>.
--   
--   <i>NOTE</i> This function performs no checks to ensure that the data
--   is, in fact, UTF8 encoded. If you provide non-UTF8 data, later
--   functions may fail.
displayBytesUtf8 :: ByteString -> Utf8Builder

-- | Write the given <a>Utf8Builder</a> value to a file.
writeFileUtf8Builder :: MonadIO m => FilePath -> Utf8Builder -> m ()

-- | (<a>^.</a>) applies a getter to a value; in other words, it gets a
--   value out of a structure using a getter (which can be a lens,
--   traversal, fold, etc.).
--   
--   Getting 1st field of a tuple:
--   
--   <pre>
--   (<a>^.</a> <a>_1</a>) :: (a, b) -&gt; a
--   (<a>^.</a> <a>_1</a>) = <a>fst</a>
--   </pre>
--   
--   When (<a>^.</a>) is used with a traversal, it combines all results
--   using the <a>Monoid</a> instance for the resulting type. For instance,
--   for lists it would be simple concatenation:
--   
--   <pre>
--   &gt;&gt;&gt; ("str","ing") ^. each
--   "string"
--   </pre>
--   
--   The reason for this is that traversals use <a>Applicative</a>, and the
--   <a>Applicative</a> instance for <a>Const</a> uses monoid concatenation
--   to combine “effects” of <a>Const</a>.
--   
--   A non-operator version of (<a>^.</a>) is called <tt>view</tt>, and
--   it's a bit more general than (<a>^.</a>) (it works in
--   <tt>MonadReader</tt>). If you need the general version, you can get it
--   from <a>microlens-mtl</a>; otherwise there's <a>view</a> available in
--   <a>Lens.Micro.Extras</a>.
(^.) :: s -> Getting a s a -> a
infixl 8 ^.

-- | <tt>s ^.. t</tt> returns the list of all values that <tt>t</tt> gets
--   from <tt>s</tt>.
--   
--   A <a>Maybe</a> contains either 0 or 1 values:
--   
--   <pre>
--   &gt;&gt;&gt; Just 3 ^.. _Just
--   [3]
--   </pre>
--   
--   Gathering all values in a list of tuples:
--   
--   <pre>
--   &gt;&gt;&gt; [(1,2),(3,4)] ^.. each.each
--   [1,2,3,4]
--   </pre>
(^..) :: s -> Getting (Endo [a]) s a -> [a]
infixl 8 ^..

-- | <tt>s ^? t</tt> returns the 1st element <tt>t</tt> returns, or
--   <a>Nothing</a> if <tt>t</tt> doesn't return anything. It's trivially
--   implemented by passing the <a>First</a> monoid to the getter.
--   
--   Safe <a>head</a>:
--   
--   <pre>
--   &gt;&gt;&gt; [] ^? each
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; [1..3] ^? each
--   Just 1
--   </pre>
--   
--   Converting <a>Either</a> to <a>Maybe</a>:
--   
--   <pre>
--   &gt;&gt;&gt; Left 1 ^? _Right
--   Nothing
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; Right 1 ^? _Right
--   Just 1
--   </pre>
--   
--   A non-operator version of (<a>^?</a>) is called <tt>preview</tt>, and
--   – like <tt>view</tt> – it's a bit more general than (<a>^?</a>) (it
--   works in <tt>MonadReader</tt>). If you need the general version, you
--   can get it from <a>microlens-mtl</a>; otherwise there's <a>preview</a>
--   available in <a>Lens.Micro.Extras</a>.
(^?) :: s -> Getting (First a) s a -> Maybe a
infixl 8 ^?

-- | <a>view</a> is a synonym for (<a>^.</a>), generalised for
--   <a>MonadReader</a> (we are able to use it instead of (<a>^.</a>) since
--   functions are instances of the <a>MonadReader</a> class):
--   
--   <pre>
--   &gt;&gt;&gt; view _1 (1, 2)
--   1
--   </pre>
--   
--   When you're using <a>Reader</a> for config and your config type has
--   lenses generated for it, most of the time you'll be using <a>view</a>
--   instead of <a>asks</a>:
--   
--   <pre>
--   doSomething :: (<a>MonadReader</a> Config m) =&gt; m Int
--   doSomething = do
--     thingy        &lt;- <a>view</a> setting1  -- same as “<a>asks</a> (<a>^.</a> setting1)”
--     anotherThingy &lt;- <a>view</a> setting2
--     ...
--   </pre>
view :: MonadReader s m => Getting a s a -> m a

-- | (<a>.~</a>) assigns a value to the target. It's the same thing as
--   using (<a>%~</a>) with <a>const</a>:
--   
--   <pre>
--   l <a>.~</a> x = l <a>%~</a> <a>const</a> x
--   </pre>
--   
--   See <a>set</a> if you want a non-operator synonym.
--   
--   Here it is used to change 2 fields of a 3-tuple:
--   
--   <pre>
--   &gt;&gt;&gt; (0,0,0) &amp; _1 .~ 1 &amp; _3 .~ 3
--   (1,0,3)
--   </pre>
(.~) :: ASetter s t a b -> b -> s -> t
infixr 4 .~

-- | <a>preview</a> is a synonym for (<a>^?</a>), generalised for
--   <a>MonadReader</a> (just like <a>view</a>, which is a synonym for
--   (<a>^.</a>)).
--   
--   <pre>
--   &gt;&gt;&gt; preview each [1..5]
--   Just 1
--   </pre>
preview :: MonadReader s m => Getting (First a) s a -> m (Maybe a)

-- | This is a type alias for monomorphic lenses which don't change the
--   type of the container (or of the value inside).
type Lens' s a = Lens s s a a

-- | <tt>Lens s t a b</tt> is the lowest common denominator of a setter and
--   a getter, something that has the power of both; it has a
--   <a>Functor</a> constraint, and since both <a>Const</a> and
--   <a>Identity</a> are functors, it can be used whenever a getter or a
--   setter is needed.
--   
--   <ul>
--   <li><tt>a</tt> is the type of the value inside of structure</li>
--   <li><tt>b</tt> is the type of the replaced value</li>
--   <li><tt>s</tt> is the type of the whole structure</li>
--   <li><tt>t</tt> is the type of the structure after replacing <tt>a</tt>
--   in it with <tt>b</tt></li>
--   </ul>
type Lens s t a b = forall (f :: Type -> Type). Functor f => a -> f b -> s -> f t

-- | Functions that operate on getters and folds – such as (<a>^.</a>),
--   (<a>^..</a>), (<a>^?</a>) – use <tt>Getter r s a</tt> (with different
--   values of <tt>r</tt>) to describe what kind of result they need. For
--   instance, (<a>^.</a>) needs the getter to be able to return a single
--   value, and so it accepts a getter of type <tt>Getting a s a</tt>.
--   (<a>^..</a>) wants the getter to gather values together, so it uses
--   <tt>Getting (Endo [a]) s a</tt> (it could've used <tt>Getting [a] s
--   a</tt> instead, but it's faster with <a>Endo</a>). The choice of
--   <tt>r</tt> depends on what you want to do with elements you're
--   extracting from <tt>s</tt>.
type Getting r s a = a -> Const r a -> s -> Const r s

-- | A <tt>SimpleGetter s a</tt> extracts <tt>a</tt> from <tt>s</tt>; so,
--   it's the same thing as <tt>(s -&gt; a)</tt>, but you can use it in
--   lens chains because its type looks like this:
--   
--   <pre>
--   type SimpleGetter s a =
--     forall r. (a -&gt; Const r a) -&gt; s -&gt; Const r s
--   </pre>
--   
--   Since <tt>Const r</tt> is a functor, <a>SimpleGetter</a> has the same
--   shape as other lens types and can be composed with them. To get <tt>(s
--   -&gt; a)</tt> out of a <a>SimpleGetter</a>, choose <tt>r ~ a</tt> and
--   feed <tt>Const :: a -&gt; Const a a</tt> to the getter:
--   
--   <pre>
--   -- the actual signature is more permissive:
--   -- <a>view</a> :: <a>Getting</a> a s a -&gt; s -&gt; a
--   <a>view</a> :: <a>SimpleGetter</a> s a -&gt; s -&gt; a
--   <a>view</a> getter = <a>getConst</a> . getter <a>Const</a>
--   </pre>
--   
--   The actual <tt><a>Getter</a></tt> from lens is more general:
--   
--   <pre>
--   type Getter s a =
--     forall f. (Contravariant f, Functor f) =&gt; (a -&gt; f a) -&gt; s -&gt; f s
--   </pre>
--   
--   I'm not currently aware of any functions that take lens's
--   <tt>Getter</tt> but won't accept <a>SimpleGetter</a>, but you should
--   try to avoid exporting <a>SimpleGetter</a>s anyway to minimise
--   confusion. Alternatively, look at <a>microlens-contra</a>, which
--   provides a fully lens-compatible <tt>Getter</tt>.
--   
--   Lens users: you can convert a <a>SimpleGetter</a> to <tt>Getter</tt>
--   by applying <tt>to . view</tt> to it.
type SimpleGetter s a = forall r. () => Getting r s a

-- | This is a type alias for monomorphic setters which don't change the
--   type of the container (or of the value inside). It's useful more often
--   than the same type in lens, because we can't provide real setters and
--   so it does the job of both <tt><a>ASetter'</a></tt> and
--   <tt><a>Setter'</a></tt>.
type ASetter' s a = ASetter s s a a

-- | <tt>ASetter s t a b</tt> is something that turns a function modifying
--   a value into a function modifying a <i>structure</i>. If you ignore
--   <a>Identity</a> (as <tt>Identity a</tt> is the same thing as
--   <tt>a</tt>), the type is:
--   
--   <pre>
--   type ASetter s t a b = (a -&gt; b) -&gt; s -&gt; t
--   </pre>
--   
--   The reason <a>Identity</a> is used here is for <a>ASetter</a> to be
--   composable with other types, such as <a>Lens</a>.
--   
--   Technically, if you're writing a library, you shouldn't use this type
--   for setters you are exporting from your library; the right type to use
--   is <tt><a>Setter</a></tt>, but it is not provided by this package
--   (because then it'd have to depend on <a>distributive</a>). It's
--   completely alright, however, to export functions which take an
--   <a>ASetter</a> as an argument.
type ASetter s t a b = a -> Identity b -> s -> Identity t

-- | <a>sets</a> creates an <a>ASetter</a> from an ordinary function. (The
--   only thing it does is wrapping and unwrapping <a>Identity</a>.)
sets :: ((a -> b) -> s -> t) -> ASetter s t a b

-- | (<a>%~</a>) applies a function to the target; an alternative
--   explanation is that it is an inverse of <a>sets</a>, which turns a
--   setter into an ordinary function. <tt><a>mapped</a> <a>%~</a>
--   <a>reverse</a></tt> is the same thing as <tt><a>fmap</a>
--   <a>reverse</a></tt>.
--   
--   See <a>over</a> if you want a non-operator synonym.
--   
--   Negating the 1st element of a pair:
--   
--   <pre>
--   &gt;&gt;&gt; (1,2) &amp; _1 %~ negate
--   (-1,2)
--   </pre>
--   
--   Turning all <tt>Left</tt>s in a list to upper case:
--   
--   <pre>
--   &gt;&gt;&gt; (mapped._Left.mapped %~ toUpper) [Left "foo", Right "bar"]
--   [Left "FOO",Right "bar"]
--   </pre>
(%~) :: ASetter s t a b -> (a -> b) -> s -> t
infixr 4 %~

-- | <a>over</a> is a synonym for (<a>%~</a>).
--   
--   Getting <a>fmap</a> in a roundabout way:
--   
--   <pre>
--   <a>over</a> <a>mapped</a> :: <a>Functor</a> f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
--   <a>over</a> <a>mapped</a> = <a>fmap</a>
--   </pre>
--   
--   Applying a function to both components of a pair:
--   
--   <pre>
--   <a>over</a> <a>both</a> :: (a -&gt; b) -&gt; (a, a) -&gt; (b, b)
--   <a>over</a> <a>both</a> = \f t -&gt; (f (fst t), f (snd t))
--   </pre>
--   
--   Using <tt><a>over</a> <a>_2</a></tt> as a replacement for
--   <a>second</a>:
--   
--   <pre>
--   &gt;&gt;&gt; over _2 show (10,20)
--   (10,"20")
--   </pre>
over :: ASetter s t a b -> (a -> b) -> s -> t

-- | <a>set</a> is a synonym for (<a>.~</a>).
--   
--   Setting the 1st component of a pair:
--   
--   <pre>
--   <a>set</a> <a>_1</a> :: x -&gt; (a, b) -&gt; (x, b)
--   <a>set</a> <a>_1</a> = \x t -&gt; (x, snd t)
--   </pre>
--   
--   Using it to rewrite (<a>&lt;$</a>):
--   
--   <pre>
--   <a>set</a> <a>mapped</a> :: <a>Functor</a> f =&gt; a -&gt; f b -&gt; f a
--   <a>set</a> <a>mapped</a> = (<a>&lt;$</a>)
--   </pre>
set :: ASetter s t a b -> b -> s -> t

-- | <a>to</a> creates a getter from any function:
--   
--   <pre>
--   a <a>^.</a> <a>to</a> f = f a
--   </pre>
--   
--   It's most useful in chains, because it lets you mix lenses and
--   ordinary functions. Suppose you have a record which comes from some
--   third-party library and doesn't have any lens accessors. You want to
--   do something like this:
--   
--   <pre>
--   value ^. _1 . field . at 2
--   </pre>
--   
--   However, <tt>field</tt> isn't a getter, and you have to do this
--   instead:
--   
--   <pre>
--   field (value ^. _1) ^. at 2
--   </pre>
--   
--   but now <tt>value</tt> is in the middle and it's hard to read the
--   resulting code. A variant with <a>to</a> is prettier and more
--   readable:
--   
--   <pre>
--   value ^. _1 . to field . at 2
--   </pre>
to :: (s -> a) -> SimpleGetter s a

-- | <a>lens</a> creates a <a>Lens</a> from a getter and a setter. The
--   resulting lens isn't the most effective one (because of having to
--   traverse the structure twice when modifying), but it shouldn't matter
--   much.
--   
--   A (partial) lens for list indexing:
--   
--   <pre>
--   ix :: Int -&gt; <a>Lens'</a> [a] a
--   ix i = <a>lens</a> (<a>!!</a> i)                                   -- getter
--               (\s b -&gt; take i s ++ b : drop (i+1) s)   -- setter
--   </pre>
--   
--   Usage:
--   
--   <pre>
--   &gt;&gt;&gt; [1..9] <a>^.</a> ix 3
--   4
--   
--   &gt;&gt;&gt; [1..9] &amp; ix 3 <a>%~</a> negate
--   [1,2,3,-4,5,6,7,8,9]
--   </pre>
--   
--   When getting, the setter is completely unused; when setting, the
--   getter is unused. Both are used only when the value is being modified.
--   For instance, here we define a lens for the 1st element of a list, but
--   instead of a legitimate getter we use <a>undefined</a>. Then we use
--   the resulting lens for <i>setting</i> and it works, which proves that
--   the getter wasn't used:
--   
--   <pre>
--   &gt;&gt;&gt; [1,2,3] &amp; lens undefined (\s b -&gt; b : tail s) .~ 10
--   [10,2,3]
--   </pre>
lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
data ThreadId

-- | Lifted version of <a>myThreadId</a>.
myThreadId :: MonadIO m => m ThreadId

-- | Lifted version of <a>isCurrentThreadBound</a>.
isCurrentThreadBound :: MonadIO m => m Bool

-- | Lifted version of <a>threadWaitRead</a>.
threadWaitRead :: MonadIO m => Fd -> m ()

-- | Lifted version of <a>threadWaitWrite</a>.
threadWaitWrite :: MonadIO m => Fd -> m ()

-- | Lifted version of <a>threadDelay</a>.
threadDelay :: MonadIO m => Int -> m ()
yieldThread :: MonadIO m => m ()
throwM :: (MonadThrow m, HasCallStack, Exception e) => e -> m a

-- | Lazily get the contents of a file. Unlike <a>readFile</a>, this
--   ensures that if an exception is thrown, the file handle is closed
--   immediately.
withLazyFile :: MonadUnliftIO m => FilePath -> (ByteString -> m a) -> m a

-- | Lazily read a file in UTF8 encoding.
withLazyFileUtf8 :: MonadUnliftIO m => FilePath -> (Text -> m a) -> m a

-- | Same as <a>readFile</a>, but generalized to <a>MonadIO</a>
readFileBinary :: MonadIO m => FilePath -> m ByteString

-- | Same as <a>writeFile</a>, but generalized to <a>MonadIO</a>
writeFileBinary :: MonadIO m => FilePath -> ByteString -> m ()

-- | Read a file in UTF8 encoding, throwing an exception on invalid
--   character encoding.
--   
--   This function will use OS-specific line ending handling.
readFileUtf8 :: MonadIO m => FilePath -> m Text

-- | Write a file in UTF8 encoding
--   
--   This function will use OS-specific line ending handling.
writeFileUtf8 :: MonadIO m => FilePath -> Text -> m ()
hPutBuilder :: MonadIO m => Handle -> Builder -> m ()
data ExitCode
ExitSuccess :: ExitCode
ExitFailure :: Int -> ExitCode

-- | Lifted version of "System.Exit.exitWith".
--   
--   @since 0.1.9.0.
exitWith :: MonadIO m => ExitCode -> m a

-- | Lifted version of "System.Exit.exitFailure".
--   
--   @since 0.1.9.0.
exitFailure :: MonadIO m => m a

-- | Lifted version of "System.Exit.exitSuccess".
--   
--   @since 0.1.9.0.
exitSuccess :: MonadIO m => m a

-- | Abstraction over how to read from and write to a mutable reference
data SomeRef a

-- | Lift one RIO env to another.
mapRIO :: (outer -> inner) -> RIO inner a -> RIO outer a

-- | Environment values with stateful capabilities to SomeRef
class HasStateRef s env | env -> s
stateRefL :: HasStateRef s env => Lens' env (SomeRef s)

-- | Environment values with writing capabilities to SomeRef
class HasWriteRef w env | env -> w
writeRefL :: HasWriteRef w env => Lens' env (SomeRef w)

-- | create a new boxed SomeRef
newSomeRef :: MonadIO m => a -> m (SomeRef a)

-- | create a new unboxed SomeRef
newUnboxedSomeRef :: (MonadIO m, Unbox a) => a -> m (SomeRef a)

-- | Read from a SomeRef
readSomeRef :: MonadIO m => SomeRef a -> m a

-- | Write to a SomeRef
writeSomeRef :: MonadIO m => SomeRef a -> a -> m ()

-- | Modify a SomeRef This function is subject to change due to the lack of
--   atomic operations
modifySomeRef :: MonadIO m => SomeRef a -> (a -> a) -> m ()

-- | An unboxed reference. This works like an <a>IORef</a>, but the data is
--   stored in a bytearray instead of a heap object, avoiding significant
--   allocation overhead in some cases. For a concrete example, see this
--   Stack Overflow question:
--   <a>https://stackoverflow.com/questions/27261813/why-is-my-little-stref-int-require-allocating-gigabytes</a>.
--   
--   The first parameter is the state token type, the same as would be used
--   for the <a>ST</a> monad. If you're using an <a>IO</a>-based monad, you
--   can use the convenience <a>IOURef</a> type synonym instead.
data URef s a

-- | Helpful type synonym for using a <a>URef</a> from an <a>IO</a>-based
--   stack.
type IOURef = URef PrimState IO

-- | Create a new <a>URef</a>
newURef :: (PrimMonad m, Unbox a) => a -> m (URef (PrimState m) a)

-- | Read the value in a <a>URef</a>
readURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> m a

-- | Write a value into a <a>URef</a>. Note that this action is strict, and
--   will force evalution of the value.
writeURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> a -> m ()

-- | Modify a value in a <a>URef</a>. Note that this action is strict, and
--   will force evaluation of the result value.
modifyURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> (a -> a) -> m ()


-- | <i>Warning: Trace statement left in code</i>
trace :: Text -> a -> a


-- | <i>Warning: Trace statement left in code</i>
traceId :: Text -> Text


-- | <i>Warning: Trace statement left in code</i>
traceIO :: MonadIO m => Text -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceM :: Applicative f => Text -> f ()


-- | <i>Warning: Trace statement left in code</i>
traceEvent :: Text -> a -> a


-- | <i>Warning: Trace statement left in code</i>
traceEventIO :: MonadIO m => Text -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceMarker :: Text -> a -> a


-- | <i>Warning: Trace statement left in code</i>
traceMarkerIO :: MonadIO m => Text -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceStack :: Text -> a -> a


-- | <i>Warning: Trace statement left in code</i>
traceShow :: Show a => a -> b -> b


-- | <i>Warning: Trace statement left in code</i>
traceShowId :: Show a => a -> a


-- | <i>Warning: Trace statement left in code</i>
traceShowIO :: (Show a, MonadIO m) => a -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceShowM :: (Show a, Applicative f) => a -> f ()


-- | <i>Warning: Trace statement left in code</i>
traceShowEvent :: Show a => a -> b -> b


-- | <i>Warning: Trace statement left in code</i>
traceShowEventIO :: (Show a, MonadIO m) => a -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceShowMarker :: Show a => a -> b -> b


-- | <i>Warning: Trace statement left in code</i>
traceShowMarkerIO :: (Show a, MonadIO m) => a -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceShowStack :: Show a => a -> b -> b


-- | <i>Warning: Trace statement left in code</i>
traceDisplay :: Display a => a -> b -> b


-- | <i>Warning: Trace statement left in code</i>
traceDisplayId :: Display a => a -> a


-- | <i>Warning: Trace statement left in code</i>
traceDisplayIO :: (Display a, MonadIO m) => a -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceDisplayM :: (Display a, Applicative f) => a -> f ()


-- | <i>Warning: Trace statement left in code</i>
traceDisplayEvent :: Display a => a -> b -> b


-- | <i>Warning: Trace statement left in code</i>
traceDisplayEventIO :: (Display a, MonadIO m) => a -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceDisplayMarker :: Display a => a -> b -> b


-- | <i>Warning: Trace statement left in code</i>
traceDisplayMarkerIO :: (Display a, MonadIO m) => a -> m ()


-- | <i>Warning: Trace statement left in code</i>
traceDisplayStack :: Display a => a -> b -> b


-- | Lazy <tt>ByteString</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.ByteString.Lazy as BL
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.ByteString.Lazy.Partial</a>
module RIO.ByteString.Lazy
data ByteString
empty :: ByteString
singleton :: Word8 -> ByteString
pack :: [Word8] -> ByteString
unpack :: ByteString -> [Word8]
fromStrict :: StrictByteString -> LazyByteString
toStrict :: LazyByteString -> StrictByteString
fromChunks :: [StrictByteString] -> LazyByteString
toChunks :: LazyByteString -> [StrictByteString]
foldrChunks :: (StrictByteString -> a -> a) -> a -> ByteString -> a
foldlChunks :: (a -> StrictByteString -> a) -> a -> ByteString -> a
cons :: Word8 -> ByteString -> ByteString
cons' :: Word8 -> ByteString -> ByteString
snoc :: ByteString -> Word8 -> ByteString
append :: ByteString -> ByteString -> ByteString
uncons :: ByteString -> Maybe (Word8, ByteString)
unsnoc :: ByteString -> Maybe (ByteString, Word8)
null :: ByteString -> Bool
length :: ByteString -> Int64
map :: (Word8 -> Word8) -> ByteString -> ByteString
reverse :: ByteString -> ByteString
intersperse :: Word8 -> ByteString -> ByteString
intercalate :: ByteString -> [ByteString] -> ByteString
transpose :: [ByteString] -> [ByteString]
foldl :: (a -> Word8 -> a) -> a -> ByteString -> a
foldl' :: (a -> Word8 -> a) -> a -> ByteString -> a
foldr :: (Word8 -> a -> a) -> a -> ByteString -> a
concat :: [ByteString] -> ByteString
concatMap :: (Word8 -> ByteString) -> ByteString -> ByteString
any :: (Word8 -> Bool) -> ByteString -> Bool
all :: (Word8 -> Bool) -> ByteString -> Bool
scanl :: (Word8 -> Word8 -> Word8) -> Word8 -> ByteString -> ByteString
mapAccumL :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString)
mapAccumR :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString)
repeat :: Word8 -> ByteString
replicate :: Int64 -> Word8 -> ByteString
cycle :: HasCallStack => ByteString -> ByteString
iterate :: (Word8 -> Word8) -> Word8 -> ByteString
unfoldr :: (a -> Maybe (Word8, a)) -> a -> ByteString
take :: Int64 -> ByteString -> ByteString
drop :: Int64 -> ByteString -> ByteString
splitAt :: Int64 -> ByteString -> (ByteString, ByteString)
takeWhile :: (Word8 -> Bool) -> ByteString -> ByteString
dropWhile :: (Word8 -> Bool) -> ByteString -> ByteString
span :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
break :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
group :: ByteString -> [ByteString]
groupBy :: (Word8 -> Word8 -> Bool) -> ByteString -> [ByteString]
inits :: ByteString -> [ByteString]
tails :: ByteString -> [ByteString]
stripPrefix :: ByteString -> ByteString -> Maybe ByteString
stripSuffix :: ByteString -> ByteString -> Maybe ByteString
split :: Word8 -> ByteString -> [ByteString]
splitWith :: (Word8 -> Bool) -> ByteString -> [ByteString]
isPrefixOf :: ByteString -> ByteString -> Bool
isSuffixOf :: ByteString -> ByteString -> Bool
elem :: Word8 -> ByteString -> Bool
notElem :: Word8 -> ByteString -> Bool
find :: (Word8 -> Bool) -> ByteString -> Maybe Word8
filter :: (Word8 -> Bool) -> ByteString -> ByteString
partition :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
index :: HasCallStack => ByteString -> Int64 -> Word8
elemIndex :: Word8 -> ByteString -> Maybe Int64
elemIndexEnd :: Word8 -> ByteString -> Maybe Int64
elemIndices :: Word8 -> ByteString -> [Int64]
findIndex :: (Word8 -> Bool) -> ByteString -> Maybe Int64
findIndices :: (Word8 -> Bool) -> ByteString -> [Int64]
count :: Word8 -> ByteString -> Int64
zip :: ByteString -> ByteString -> [(Word8, Word8)]
zipWith :: (Word8 -> Word8 -> a) -> ByteString -> ByteString -> [a]
unzip :: [(Word8, Word8)] -> (ByteString, ByteString)
copy :: ByteString -> ByteString

-- | Lifted <a>getContents</a>
getContents :: MonadIO m => m LByteString

-- | Lifted <a>putStr</a>
putStr :: MonadIO m => LByteString -> m ()

-- | Lifted <a>putStrLn</a>
putStrLn :: MonadIO m => LByteString -> m ()

-- | Lifted <a>interact</a>
interact :: MonadIO m => (LByteString -> LByteString) -> m ()

-- | Lifted <a>readFile</a>
readFile :: MonadIO m => FilePath -> m LByteString

-- | Lifted <a>writeFile</a>
writeFile :: MonadIO m => FilePath -> LByteString -> m ()

-- | Lifted <a>appendFile</a>
appendFile :: MonadIO m => FilePath -> LByteString -> m ()

-- | Lifted <a>hGetContents</a>
hGetContents :: MonadIO m => Handle -> m LByteString

-- | Lifted <a>hGet</a>
hGet :: MonadIO m => Handle -> Int -> m LByteString

-- | Lifted <a>hGetNonBlocking</a>
hGetNonBlocking :: MonadIO m => Handle -> Int -> m LByteString

-- | Lifted <a>hPut</a>
hPut :: MonadIO m => Handle -> LByteString -> m ()

-- | Lifted <a>hPutNonBlocking</a>
hPutNonBlocking :: MonadIO m => Handle -> LByteString -> m LByteString

-- | Lifted <a>hPutStr</a>
hPutStr :: MonadIO m => Handle -> LByteString -> m ()


-- | Strict <tt>ByteString</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.ByteString as B
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.ByteString.Partial</a>
module RIO.ByteString
data ByteString
foldr :: (Word8 -> a -> a) -> a -> ByteString -> a
map :: (Word8 -> Word8) -> ByteString -> ByteString
mapAccumL :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString)
reverse :: ByteString -> ByteString
zip :: ByteString -> ByteString -> [(Word8, Word8)]
filter :: (Word8 -> Bool) -> ByteString -> ByteString
concat :: [ByteString] -> ByteString
empty :: ByteString
length :: ByteString -> Int
singleton :: Word8 -> ByteString
snoc :: ByteString -> Word8 -> ByteString
index :: HasCallStack => ByteString -> Int -> Word8
copy :: ByteString -> ByteString
foldl' :: (a -> Word8 -> a) -> a -> ByteString -> a
foldr' :: (Word8 -> a -> a) -> a -> ByteString -> a
foldl :: (a -> Word8 -> a) -> a -> ByteString -> a
all :: (Word8 -> Bool) -> ByteString -> Bool
null :: ByteString -> Bool
(!?) :: ByteString -> Int -> Maybe Word8
group :: ByteString -> [ByteString]
pack :: [Word8] -> ByteString
unpack :: ByteString -> [Word8]
fromStrict :: StrictByteString -> LazyByteString
toStrict :: LazyByteString -> StrictByteString
cons :: Word8 -> ByteString -> ByteString
append :: ByteString -> ByteString -> ByteString
uncons :: ByteString -> Maybe (Word8, ByteString)
unsnoc :: ByteString -> Maybe (ByteString, Word8)
intersperse :: Word8 -> ByteString -> ByteString
intercalate :: ByteString -> [ByteString] -> ByteString
transpose :: [ByteString] -> [ByteString]
concatMap :: (Word8 -> ByteString) -> ByteString -> ByteString
any :: (Word8 -> Bool) -> ByteString -> Bool
scanl :: (Word8 -> Word8 -> Word8) -> Word8 -> ByteString -> ByteString
mapAccumR :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString)
replicate :: Int -> Word8 -> ByteString
unfoldr :: (a -> Maybe (Word8, a)) -> a -> ByteString
take :: Int -> ByteString -> ByteString
drop :: Int -> ByteString -> ByteString
splitAt :: Int -> ByteString -> (ByteString, ByteString)
takeWhile :: (Word8 -> Bool) -> ByteString -> ByteString
dropWhile :: (Word8 -> Bool) -> ByteString -> ByteString
span :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
break :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
groupBy :: (Word8 -> Word8 -> Bool) -> ByteString -> [ByteString]
inits :: ByteString -> [ByteString]
tails :: ByteString -> [ByteString]
stripPrefix :: ByteString -> ByteString -> Maybe ByteString
stripSuffix :: ByteString -> ByteString -> Maybe ByteString
split :: Word8 -> ByteString -> [ByteString]
splitWith :: (Word8 -> Bool) -> ByteString -> [ByteString]
isPrefixOf :: ByteString -> ByteString -> Bool
isSuffixOf :: ByteString -> ByteString -> Bool
elem :: Word8 -> ByteString -> Bool
notElem :: Word8 -> ByteString -> Bool
find :: (Word8 -> Bool) -> ByteString -> Maybe Word8
partition :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
elemIndex :: Word8 -> ByteString -> Maybe Int
elemIndexEnd :: Word8 -> ByteString -> Maybe Int
elemIndices :: Word8 -> ByteString -> [Int]
findIndex :: (Word8 -> Bool) -> ByteString -> Maybe Int
findIndices :: (Word8 -> Bool) -> ByteString -> [Int]
count :: Word8 -> ByteString -> Int
zipWith :: (Word8 -> Word8 -> a) -> ByteString -> ByteString -> [a]
unzip :: [(Word8, Word8)] -> (ByteString, ByteString)
scanr :: (Word8 -> Word8 -> Word8) -> Word8 -> ByteString -> ByteString
scanl1 :: (Word8 -> Word8 -> Word8) -> ByteString -> ByteString
scanr1 :: (Word8 -> Word8 -> Word8) -> ByteString -> ByteString
dropWhileEnd :: (Word8 -> Bool) -> ByteString -> ByteString
isInfixOf :: ByteString -> ByteString -> Bool
sort :: ByteString -> ByteString
unfoldrN :: Int -> (a -> Maybe (Word8, a)) -> a -> (ByteString, Maybe a)
takeEnd :: Int -> ByteString -> ByteString
dropEnd :: Int -> ByteString -> ByteString
takeWhileEnd :: (Word8 -> Bool) -> ByteString -> ByteString
breakEnd :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
findIndexEnd :: (Word8 -> Bool) -> ByteString -> Maybe Int
packZipWith :: (Word8 -> Word8 -> Word8) -> ByteString -> ByteString -> ByteString
type StrictByteString = ByteString
indexMaybe :: ByteString -> Int -> Maybe Word8
initsNE :: ByteString -> NonEmpty ByteString
spanEnd :: (Word8 -> Bool) -> ByteString -> (ByteString, ByteString)
tailsNE :: ByteString -> NonEmpty ByteString
breakSubstring :: ByteString -> ByteString -> (ByteString, ByteString)
fromFilePath :: FilePath -> IO ByteString
isValidUtf8 :: ByteString -> Bool
toFilePath :: ByteString -> IO FilePath

-- | Lifted <a>writeFile</a>
writeFile :: MonadIO m => FilePath -> ByteString -> m ()

-- | Lifted <a>packCString</a>
packCString :: MonadIO m => CString -> m ByteString

-- | Lifted <a>packCStringLen</a>
packCStringLen :: MonadIO m => CStringLen -> m ByteString

-- | Unlifted <a>useAsCString</a>
useAsCString :: MonadUnliftIO m => ByteString -> (CString -> m a) -> m a

-- | Unlifted <a>useAsCStringLen</a>
useAsCStringLen :: MonadUnliftIO m => ByteString -> (CStringLen -> m a) -> m a

-- | Lifted <a>getLine</a>
getLine :: MonadIO m => m ByteString

-- | Lifted <a>getContents</a>
getContents :: MonadIO m => m ByteString

-- | Lifted <a>putStr</a>
putStr :: MonadIO m => ByteString -> m ()

-- | Lifted <a>interact</a>
interact :: MonadIO m => (ByteString -> ByteString) -> m ()

-- | Lifted <a>readFile</a>
readFile :: MonadIO m => FilePath -> m ByteString

-- | Lifted <a>appendFile</a>
appendFile :: MonadIO m => FilePath -> ByteString -> m ()

-- | Lifted <a>hGetLine</a>
hGetLine :: MonadIO m => Handle -> m ByteString

-- | Lifted <a>hGetContents</a>
hGetContents :: MonadIO m => Handle -> m ByteString

-- | Lifted <a>hGet</a>
hGet :: MonadIO m => Handle -> Int -> m ByteString

-- | Lifted <a>hGetSome</a>
hGetSome :: MonadIO m => Handle -> Int -> m ByteString

-- | Lifted <a>hGetNonBlocking</a>
hGetNonBlocking :: MonadIO m => Handle -> Int -> m ByteString

-- | Lifted <a>hPut</a>
hPut :: MonadIO m => Handle -> ByteString -> m ()

-- | Lifted <a>hPutNonBlocking</a>
hPutNonBlocking :: MonadIO m => Handle -> ByteString -> m ByteString

-- | Lifted <a>hPutStr</a>
hPutStr :: MonadIO m => Handle -> ByteString -> m ()


-- | Lazy <tt>Text</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Text.Lazy as TL
--   </pre>
--   
--   This module does not export any partial functions. For those, see
--   <a>RIO.Text.Lazy.Partial</a>
module RIO.Text.Lazy
data Text
pack :: String -> Text
unpack :: Text -> String
singleton :: Char -> Text
empty :: Text
fromChunks :: [Text] -> Text
toChunks :: Text -> [Text]
toStrict :: LazyText -> StrictText
fromStrict :: StrictText -> LazyText
foldrChunks :: (Text -> a -> a) -> a -> Text -> a
foldlChunks :: (a -> Text -> a) -> a -> Text -> a
cons :: Char -> Text -> Text
snoc :: Text -> Char -> Text
append :: Text -> Text -> Text
uncons :: Text -> Maybe (Char, Text)
null :: Text -> Bool
length :: Text -> Int64
compareLength :: Text -> Int64 -> Ordering
map :: (Char -> Char) -> Text -> Text
intercalate :: Text -> [Text] -> Text
intersperse :: Char -> Text -> Text
transpose :: [Text] -> [Text]
reverse :: Text -> Text
toCaseFold :: Text -> Text
toLower :: Text -> Text
toUpper :: Text -> Text
toTitle :: Text -> Text
justifyLeft :: Int64 -> Char -> Text -> Text
justifyRight :: Int64 -> Char -> Text -> Text
center :: Int64 -> Char -> Text -> Text
foldl :: (a -> Char -> a) -> a -> Text -> a
foldl' :: (a -> Char -> a) -> a -> Text -> a
foldr :: (Char -> a -> a) -> a -> Text -> a
concat :: [Text] -> Text
concatMap :: (Char -> Text) -> Text -> Text
any :: (Char -> Bool) -> Text -> Bool
all :: (Char -> Bool) -> Text -> Bool
scanl :: (Char -> Char -> Char) -> Char -> Text -> Text
scanl1 :: (Char -> Char -> Char) -> Text -> Text
scanr :: (Char -> Char -> Char) -> Char -> Text -> Text
scanr1 :: (Char -> Char -> Char) -> Text -> Text
mapAccumL :: (a -> Char -> (a, Char)) -> a -> Text -> (a, Text)
mapAccumR :: (a -> Char -> (a, Char)) -> a -> Text -> (a, Text)
repeat :: Char -> Text
replicate :: Int64 -> Text -> Text
cycle :: HasCallStack => Text -> Text
iterate :: (Char -> Char) -> Char -> Text
unfoldr :: (a -> Maybe (Char, a)) -> a -> Text
unfoldrN :: Int64 -> (a -> Maybe (Char, a)) -> a -> Text
take :: Int64 -> Text -> Text
takeEnd :: Int64 -> Text -> Text
drop :: Int64 -> Text -> Text
dropEnd :: Int64 -> Text -> Text
takeWhile :: (Char -> Bool) -> Text -> Text
takeWhileEnd :: (Char -> Bool) -> Text -> Text
dropWhile :: (Char -> Bool) -> Text -> Text
dropWhileEnd :: (Char -> Bool) -> Text -> Text
dropAround :: (Char -> Bool) -> Text -> Text
strip :: Text -> Text
stripStart :: Text -> Text
stripEnd :: Text -> Text
splitAt :: Int64 -> Text -> (Text, Text)
span :: (Char -> Bool) -> Text -> (Text, Text)
break :: (Char -> Bool) -> Text -> (Text, Text)
group :: Text -> [Text]
groupBy :: (Char -> Char -> Bool) -> Text -> [Text]
inits :: Text -> [Text]
tails :: Text -> [Text]
split :: (Char -> Bool) -> Text -> [Text]
chunksOf :: Int64 -> Text -> [Text]
lines :: Text -> [Text]
words :: Text -> [Text]
unlines :: [Text] -> Text
unwords :: [Text] -> Text
isPrefixOf :: Text -> Text -> Bool
isSuffixOf :: Text -> Text -> Bool
isInfixOf :: Text -> Text -> Bool
stripPrefix :: Text -> Text -> Maybe Text
stripSuffix :: Text -> Text -> Maybe Text
commonPrefixes :: Text -> Text -> Maybe (Text, Text, Text)
filter :: (Char -> Bool) -> Text -> Text
find :: (Char -> Bool) -> Text -> Maybe Char
partition :: (Char -> Bool) -> Text -> (Text, Text)
index :: HasCallStack => Text -> Int64 -> Char
count :: HasCallStack => Text -> Text -> Int64
zip :: Text -> Text -> [(Char, Char)]
zipWith :: (Char -> Char -> Char) -> Text -> Text -> Text


-- | Lazy <tt>Text</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Text.Lazy.Partial as TL'
--   </pre>
module RIO.Text.Lazy.Partial
head :: HasCallStack => Text -> Char
last :: HasCallStack => Text -> Char
tail :: HasCallStack => Text -> Text
init :: HasCallStack => Text -> Text
replace :: HasCallStack => Text -> Text -> Text -> Text
foldl1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
foldl1' :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
foldr1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
maximum :: HasCallStack => Text -> Char
minimum :: HasCallStack => Text -> Char
breakOn :: HasCallStack => Text -> Text -> (Text, Text)
breakOnEnd :: HasCallStack => Text -> Text -> (Text, Text)
splitOn :: HasCallStack => Text -> Text -> [Text]
breakOnAll :: HasCallStack => Text -> Text -> [(Text, Text)]


-- | Strict <tt>Text</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Text.Partial as T'
--   </pre>
module RIO.Text.Partial
head :: HasCallStack => Text -> Char
last :: HasCallStack => Text -> Char
tail :: HasCallStack => Text -> Text
init :: HasCallStack => Text -> Text
replace :: HasCallStack => Text -> Text -> Text -> Text
foldl1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
foldl1' :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
foldr1 :: HasCallStack => (Char -> Char -> Char) -> Text -> Char
maximum :: HasCallStack => Text -> Char
minimum :: HasCallStack => Text -> Char
breakOn :: HasCallStack => Text -> Text -> (Text, Text)
breakOnEnd :: HasCallStack => Text -> Text -> (Text, Text)
splitOn :: HasCallStack => Text -> Text -> [Text]
breakOnAll :: HasCallStack => Text -> Text -> [(Text, Text)]
count :: HasCallStack => Text -> Text -> Int

module RIO.Time
pattern May :: MonthOfYear
data UTCTime
UTCTime :: Day -> DiffTime -> UTCTime
[utctDay] :: UTCTime -> Day
[utctDayTime] :: UTCTime -> DiffTime
data CalendarDiffDays
CalendarDiffDays :: Integer -> Integer -> CalendarDiffDays
[cdMonths] :: CalendarDiffDays -> Integer
[cdDays] :: CalendarDiffDays -> Integer
newtype Day
ModifiedJulianDay :: Integer -> Day
[toModifiedJulianDay] :: Day -> Integer
class Ord p => DayPeriod p
periodFirstDay :: DayPeriod p => p -> Day
periodLastDay :: DayPeriod p => p -> Day
dayPeriod :: DayPeriod p => Day -> p
addDays :: Integer -> Day -> Day
diffDays :: Day -> Day -> Integer
isLeapYear :: Year -> Bool
pattern April :: MonthOfYear
pattern August :: MonthOfYear
pattern BeforeCommonEra :: Integer -> Year
pattern CommonEra :: Integer -> Year
type DayOfMonth = Int
pattern December :: MonthOfYear
pattern February :: MonthOfYear
pattern January :: MonthOfYear
pattern July :: MonthOfYear
pattern June :: MonthOfYear
pattern March :: MonthOfYear
type MonthOfYear = Int
pattern November :: MonthOfYear
pattern October :: MonthOfYear
pattern September :: MonthOfYear
type Year = Integer
pattern YearMonthDay :: Year -> MonthOfYear -> DayOfMonth -> Day
addGregorianDurationClip :: CalendarDiffDays -> Day -> Day
addGregorianDurationRollOver :: CalendarDiffDays -> Day -> Day
addGregorianMonthsClip :: Integer -> Day -> Day
addGregorianMonthsRollOver :: Integer -> Day -> Day
addGregorianYearsClip :: Integer -> Day -> Day
addGregorianYearsRollOver :: Integer -> Day -> Day
diffGregorianDurationClip :: Day -> Day -> CalendarDiffDays
diffGregorianDurationRollOver :: Day -> Day -> CalendarDiffDays
fromGregorian :: Year -> MonthOfYear -> DayOfMonth -> Day
fromGregorianValid :: Year -> MonthOfYear -> DayOfMonth -> Maybe Day
gregorianMonthLength :: Year -> MonthOfYear -> DayOfMonth
showGregorian :: Day -> String
toGregorian :: Day -> (Year, MonthOfYear, DayOfMonth)
data DayOfWeek
Monday :: DayOfWeek
Tuesday :: DayOfWeek
Wednesday :: DayOfWeek
Thursday :: DayOfWeek
Friday :: DayOfWeek
Saturday :: DayOfWeek
Sunday :: DayOfWeek
data DiffTime
data NominalDiffTime
newtype UniversalTime
ModJulianDate :: Rational -> UniversalTime
[getModJulianDate] :: UniversalTime -> Rational
class FormatTime t
formatTime :: FormatTime t => TimeLocale -> String -> t -> String
data TimeLocale
TimeLocale :: [(String, String)] -> [(String, String)] -> (String, String) -> String -> String -> String -> String -> [TimeZone] -> TimeLocale
[wDays] :: TimeLocale -> [(String, String)]
[months] :: TimeLocale -> [(String, String)]
[amPm] :: TimeLocale -> (String, String)
[dateTimeFmt] :: TimeLocale -> String
[dateFmt] :: TimeLocale -> String
[timeFmt] :: TimeLocale -> String
[time12Fmt] :: TimeLocale -> String
[knownTimeZones] :: TimeLocale -> [TimeZone]
data CalendarDiffTime
CalendarDiffTime :: Integer -> NominalDiffTime -> CalendarDiffTime
[ctMonths] :: CalendarDiffTime -> Integer
[ctTime] :: CalendarDiffTime -> NominalDiffTime
data LocalTime
LocalTime :: Day -> TimeOfDay -> LocalTime
[localDay] :: LocalTime -> Day
[localTimeOfDay] :: LocalTime -> TimeOfDay
ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime
data TimeOfDay
TimeOfDay :: Int -> Int -> Pico -> TimeOfDay
[todHour] :: TimeOfDay -> Int
[todMin] :: TimeOfDay -> Int
[todSec] :: TimeOfDay -> Pico
data TimeZone
TimeZone :: Int -> Bool -> String -> TimeZone
[timeZoneMinutes] :: TimeZone -> Int
[timeZoneSummerOnly] :: TimeZone -> Bool
[timeZoneName] :: TimeZone -> String
utc :: TimeZone
data ZonedTime
ZonedTime :: LocalTime -> TimeZone -> ZonedTime
[zonedTimeToLocalTime] :: ZonedTime -> LocalTime
[zonedTimeZone] :: ZonedTime -> TimeZone
utcToZonedTime :: TimeZone -> UTCTime -> ZonedTime
zonedTimeToUTC :: ZonedTime -> UTCTime
defaultTimeLocale :: TimeLocale
iso8601DateFormat :: Maybe String -> String
rfc822DateFormat :: String
class ParseTime t
localTimeToUT1 :: Rational -> LocalTime -> UniversalTime
localTimeToUTC :: TimeZone -> LocalTime -> UTCTime
parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t
parseTimeMultipleM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> [(String, String)] -> m t
parseTimeOrError :: ParseTime t => Bool -> TimeLocale -> String -> String -> t
readPTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadP t
readSTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadS t
midnight :: TimeOfDay
minutesToTimeZone :: Int -> TimeZone
addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime
diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime
dayFractionToTimeOfDay :: Rational -> TimeOfDay
localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
timeOfDayToDayFraction :: TimeOfDay -> Rational
timeOfDayToTime :: TimeOfDay -> DiffTime
timeToTimeOfDay :: DiffTime -> TimeOfDay
utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay)
addLocalTime :: NominalDiffTime -> LocalTime -> LocalTime
diffLocalTime :: LocalTime -> LocalTime -> NominalDiffTime
utcToLocalTime :: TimeZone -> UTCTime -> LocalTime
calendarDay :: CalendarDiffDays
calendarMonth :: CalendarDiffDays
calendarWeek :: CalendarDiffDays
calendarYear :: CalendarDiffDays
scaleCalendarDiffDays :: Integer -> CalendarDiffDays -> CalendarDiffDays
periodAllDays :: DayPeriod p => p -> [Day]
periodFromDay :: DayPeriod p => Day -> (p, Int)
periodLength :: DayPeriod p => p -> Int
periodToDay :: DayPeriod p => p -> Int -> Day
periodToDayValid :: DayPeriod p => p -> Int -> Maybe Day
dayOfWeek :: Day -> DayOfWeek
dayOfWeekDiff :: DayOfWeek -> DayOfWeek -> Int
firstDayOfWeekOnAfter :: DayOfWeek -> Day -> Day
weekAllDays :: DayOfWeek -> Day -> [Day]
weekFirstDay :: DayOfWeek -> Day -> Day
weekLastDay :: DayOfWeek -> Day -> Day
diffTimeToPicoseconds :: DiffTime -> Integer
picosecondsToDiffTime :: Integer -> DiffTime
secondsToDiffTime :: Integer -> DiffTime
nominalDay :: NominalDiffTime
nominalDiffTimeToSeconds :: NominalDiffTime -> Pico
secondsToNominalDiffTime :: Pico -> NominalDiffTime
getTime_resolution :: DiffTime
calendarTimeDays :: CalendarDiffDays -> CalendarDiffTime
calendarTimeTime :: NominalDiffTime -> CalendarDiffTime
scaleCalendarDiffTime :: Integer -> CalendarDiffTime -> CalendarDiffTime
daysAndTimeOfDayToTime :: Integer -> TimeOfDay -> NominalDiffTime
makeTimeOfDayValid :: Int -> Int -> Pico -> Maybe TimeOfDay
midday :: TimeOfDay
pastMidnight :: DiffTime -> TimeOfDay
sinceMidnight :: TimeOfDay -> DiffTime
timeToDaysAndTimeOfDay :: NominalDiffTime -> (Integer, TimeOfDay)
hoursToTimeZone :: Int -> TimeZone
timeZoneOffsetString :: TimeZone -> String
timeZoneOffsetString' :: Maybe Char -> TimeZone -> String
getCurrentTime :: MonadIO m => m UTCTime
getTimeZone :: MonadIO m => UTCTime -> m TimeZone
getCurrentTimeZone :: MonadIO m => m TimeZone
getZonedTime :: MonadIO m => m ZonedTime
utcToLocalZonedTime :: MonadIO m => UTCTime -> m ZonedTime


-- | Generic <tt>Vector</tt> interface. Import as:
--   
--   <pre>
--   import qualified RIO.Vector as V
--   </pre>
--   
--   This module does not export any partial or unsafe functions. For
--   those, see <a>RIO.Vector.Partial</a> and <a>RIO.Vector.Unsafe</a>
module RIO.Vector
class MVector Mutable v a => Vector (v :: Type -> Type) a
length :: Vector v a => v a -> Int
null :: Vector v a => v a -> Bool
(!?) :: Vector v a => v a -> Int -> Maybe a
slice :: (HasCallStack, Vector v a) => Int -> Int -> v a -> v a
take :: Vector v a => Int -> v a -> v a
drop :: Vector v a => Int -> v a -> v a
splitAt :: Vector v a => Int -> v a -> (v a, v a)
empty :: Vector v a => v a
singleton :: Vector v a => a -> v a
replicate :: Vector v a => Int -> a -> v a
generate :: Vector v a => Int -> (Int -> a) -> v a
iterateN :: Vector v a => Int -> (a -> a) -> a -> v a
replicateM :: (Monad m, Vector v a) => Int -> m a -> m (v a)
generateM :: (Monad m, Vector v a) => Int -> (Int -> m a) -> m (v a)
iterateNM :: (Monad m, Vector v a) => Int -> (a -> m a) -> a -> m (v a)
create :: Vector v a => (forall s. () => ST s (Mutable v s a)) -> v a
createT :: (Traversable f, Vector v a) => (forall s. () => ST s (f (Mutable v s a))) -> f (v a)
unfoldr :: Vector v a => (b -> Maybe (a, b)) -> b -> v a
unfoldrN :: Vector v a => Int -> (b -> Maybe (a, b)) -> b -> v a
unfoldrM :: (Monad m, Vector v a) => (b -> m (Maybe (a, b))) -> b -> m (v a)
unfoldrNM :: (Monad m, Vector v a) => Int -> (b -> m (Maybe (a, b))) -> b -> m (v a)
constructN :: Vector v a => Int -> (v a -> a) -> v a
constructrN :: Vector v a => Int -> (v a -> a) -> v a
enumFromN :: (Vector v a, Num a) => a -> Int -> v a
enumFromStepN :: (Vector v a, Num a) => a -> a -> Int -> v a
enumFromTo :: (Vector v a, Enum a) => a -> a -> v a
enumFromThenTo :: (Vector v a, Enum a) => a -> a -> a -> v a
cons :: Vector v a => a -> v a -> v a
snoc :: Vector v a => v a -> a -> v a
(++) :: Vector v a => v a -> v a -> v a
concat :: Vector v a => [v a] -> v a
concatNE :: Vector v a => NonEmpty (v a) -> v a
force :: Vector v a => v a -> v a
reverse :: Vector v a => v a -> v a
modify :: Vector v a => (forall s. () => Mutable v s a -> ST s ()) -> v a -> v a
indexed :: (Vector v a, Vector v (Int, a)) => v a -> v (Int, a)
map :: (Vector v a, Vector v b) => (a -> b) -> v a -> v b
imap :: (Vector v a, Vector v b) => (Int -> a -> b) -> v a -> v b
concatMap :: (Vector v a, Vector v b) => (a -> v b) -> v a -> v b
mapM :: (Monad m, Vector v a, Vector v b) => (a -> m b) -> v a -> m (v b)
imapM :: (Monad m, Vector v a, Vector v b) => (Int -> a -> m b) -> v a -> m (v b)
mapM_ :: (Monad m, Vector v a) => (a -> m b) -> v a -> m ()
imapM_ :: (Monad m, Vector v a) => (Int -> a -> m b) -> v a -> m ()
forM :: (Monad m, Vector v a, Vector v b) => v a -> (a -> m b) -> m (v b)
forM_ :: (Monad m, Vector v a) => v a -> (a -> m b) -> m ()
zipWith :: (Vector v a, Vector v b, Vector v c) => (a -> b -> c) -> v a -> v b -> v c
zipWith3 :: (Vector v a, Vector v b, Vector v c, Vector v d) => (a -> b -> c -> d) -> v a -> v b -> v c -> v d
zipWith4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e) => (a -> b -> c -> d -> e) -> v a -> v b -> v c -> v d -> v e
zipWith5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f) => (a -> b -> c -> d -> e -> f) -> v a -> v b -> v c -> v d -> v e -> v f
zipWith6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v g) => (a -> b -> c -> d -> e -> f -> g) -> v a -> v b -> v c -> v d -> v e -> v f -> v g
izipWith :: (Vector v a, Vector v b, Vector v c) => (Int -> a -> b -> c) -> v a -> v b -> v c
izipWith3 :: (Vector v a, Vector v b, Vector v c, Vector v d) => (Int -> a -> b -> c -> d) -> v a -> v b -> v c -> v d
izipWith4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e) => (Int -> a -> b -> c -> d -> e) -> v a -> v b -> v c -> v d -> v e
izipWith5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f) => (Int -> a -> b -> c -> d -> e -> f) -> v a -> v b -> v c -> v d -> v e -> v f
izipWith6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v g) => (Int -> a -> b -> c -> d -> e -> f -> g) -> v a -> v b -> v c -> v d -> v e -> v f -> v g
zip :: (Vector v a, Vector v b, Vector v (a, b)) => v a -> v b -> v (a, b)
zip3 :: (Vector v a, Vector v b, Vector v c, Vector v (a, b, c)) => v a -> v b -> v c -> v (a, b, c)
zip4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v (a, b, c, d)) => v a -> v b -> v c -> v d -> v (a, b, c, d)
zip5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v (a, b, c, d, e)) => v a -> v b -> v c -> v d -> v e -> v (a, b, c, d, e)
zip6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v (a, b, c, d, e, f)) => v a -> v b -> v c -> v d -> v e -> v f -> v (a, b, c, d, e, f)
zipWithM :: (Monad m, Vector v a, Vector v b, Vector v c) => (a -> b -> m c) -> v a -> v b -> m (v c)
izipWithM :: (Monad m, Vector v a, Vector v b, Vector v c) => (Int -> a -> b -> m c) -> v a -> v b -> m (v c)
zipWithM_ :: (Monad m, Vector v a, Vector v b) => (a -> b -> m c) -> v a -> v b -> m ()
izipWithM_ :: (Monad m, Vector v a, Vector v b) => (Int -> a -> b -> m c) -> v a -> v b -> m ()
unzip :: (Vector v a, Vector v b, Vector v (a, b)) => v (a, b) -> (v a, v b)
unzip3 :: (Vector v a, Vector v b, Vector v c, Vector v (a, b, c)) => v (a, b, c) -> (v a, v b, v c)
unzip4 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v (a, b, c, d)) => v (a, b, c, d) -> (v a, v b, v c, v d)
unzip5 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v (a, b, c, d, e)) => v (a, b, c, d, e) -> (v a, v b, v c, v d, v e)
unzip6 :: (Vector v a, Vector v b, Vector v c, Vector v d, Vector v e, Vector v f, Vector v (a, b, c, d, e, f)) => v (a, b, c, d, e, f) -> (v a, v b, v c, v d, v e, v f)
filter :: Vector v a => (a -> Bool) -> v a -> v a
ifilter :: Vector v a => (Int -> a -> Bool) -> v a -> v a
uniq :: (Vector v a, Eq a) => v a -> v a
mapMaybe :: (Vector v a, Vector v b) => (a -> Maybe b) -> v a -> v b
imapMaybe :: (Vector v a, Vector v b) => (Int -> a -> Maybe b) -> v a -> v b
filterM :: (Monad m, Vector v a) => (a -> m Bool) -> v a -> m (v a)
takeWhile :: Vector v a => (a -> Bool) -> v a -> v a
dropWhile :: Vector v a => (a -> Bool) -> v a -> v a
partition :: Vector v a => (a -> Bool) -> v a -> (v a, v a)
unstablePartition :: Vector v a => (a -> Bool) -> v a -> (v a, v a)
span :: Vector v a => (a -> Bool) -> v a -> (v a, v a)
break :: Vector v a => (a -> Bool) -> v a -> (v a, v a)
elem :: (Vector v a, Eq a) => a -> v a -> Bool
notElem :: (Vector v a, Eq a) => a -> v a -> Bool
find :: Vector v a => (a -> Bool) -> v a -> Maybe a
findIndex :: Vector v a => (a -> Bool) -> v a -> Maybe Int
findIndices :: (Vector v a, Vector v Int) => (a -> Bool) -> v a -> v Int
elemIndex :: (Vector v a, Eq a) => a -> v a -> Maybe Int
elemIndices :: (Vector v a, Vector v Int, Eq a) => a -> v a -> v Int
foldl :: Vector v b => (a -> b -> a) -> a -> v b -> a
foldl' :: Vector v b => (a -> b -> a) -> a -> v b -> a
foldr :: Vector v a => (a -> b -> b) -> b -> v a -> b
foldr' :: Vector v a => (a -> b -> b) -> b -> v a -> b
ifoldl :: Vector v b => (a -> Int -> b -> a) -> a -> v b -> a
ifoldl' :: Vector v b => (a -> Int -> b -> a) -> a -> v b -> a
ifoldr :: Vector v a => (Int -> a -> b -> b) -> b -> v a -> b
ifoldr' :: Vector v a => (Int -> a -> b -> b) -> b -> v a -> b
all :: Vector v a => (a -> Bool) -> v a -> Bool
any :: Vector v a => (a -> Bool) -> v a -> Bool
and :: Vector v Bool => v Bool -> Bool
or :: Vector v Bool => v Bool -> Bool
sum :: (Vector v a, Num a) => v a -> a
product :: (Vector v a, Num a) => v a -> a
foldM :: (Monad m, Vector v b) => (a -> b -> m a) -> a -> v b -> m a
ifoldM :: (Monad m, Vector v b) => (a -> Int -> b -> m a) -> a -> v b -> m a
foldM' :: (Monad m, Vector v b) => (a -> b -> m a) -> a -> v b -> m a
ifoldM' :: (Monad m, Vector v b) => (a -> Int -> b -> m a) -> a -> v b -> m a
foldM_ :: (Monad m, Vector v b) => (a -> b -> m a) -> a -> v b -> m ()
ifoldM_ :: (Monad m, Vector v b) => (a -> Int -> b -> m a) -> a -> v b -> m ()
foldM'_ :: (Monad m, Vector v b) => (a -> b -> m a) -> a -> v b -> m ()
ifoldM'_ :: (Monad m, Vector v b) => (a -> Int -> b -> m a) -> a -> v b -> m ()
sequence :: (Monad m, Vector v a, Vector v (m a)) => v (m a) -> m (v a)
sequence_ :: (Monad m, Vector v (m a)) => v (m a) -> m ()
prescanl :: (Vector v a, Vector v b) => (a -> b -> a) -> a -> v b -> v a
prescanl' :: (Vector v a, Vector v b) => (a -> b -> a) -> a -> v b -> v a
postscanl :: (Vector v a, Vector v b) => (a -> b -> a) -> a -> v b -> v a
postscanl' :: (Vector v a, Vector v b) => (a -> b -> a) -> a -> v b -> v a
scanl :: (Vector v a, Vector v b) => (a -> b -> a) -> a -> v b -> v a
scanl' :: (Vector v a, Vector v b) => (a -> b -> a) -> a -> v b -> v a
iscanl :: (Vector v a, Vector v b) => (Int -> a -> b -> a) -> a -> v b -> v a
iscanl' :: (Vector v a, Vector v b) => (Int -> a -> b -> a) -> a -> v b -> v a
prescanr :: (Vector v a, Vector v b) => (a -> b -> b) -> b -> v a -> v b
prescanr' :: (Vector v a, Vector v b) => (a -> b -> b) -> b -> v a -> v b
postscanr :: (Vector v a, Vector v b) => (a -> b -> b) -> b -> v a -> v b
postscanr' :: (Vector v a, Vector v b) => (a -> b -> b) -> b -> v a -> v b
scanr :: (Vector v a, Vector v b) => (a -> b -> b) -> b -> v a -> v b
scanr' :: (Vector v a, Vector v b) => (a -> b -> b) -> b -> v a -> v b
iscanr :: (Vector v a, Vector v b) => (Int -> a -> b -> b) -> b -> v a -> v b
iscanr' :: (Vector v a, Vector v b) => (Int -> a -> b -> b) -> b -> v a -> v b
toList :: Vector v a => v a -> [a]
fromList :: Vector v a => [a] -> v a
fromListN :: Vector v a => Int -> [a] -> v a
convert :: (Vector v a, Vector w a) => v a -> w a
freeze :: (PrimMonad m, Vector v a) => Mutable v (PrimState m) a -> m (v a)
thaw :: (PrimMonad m, Vector v a) => v a -> m (Mutable v (PrimState m) a)
copy :: (HasCallStack, PrimMonad m, Vector v a) => Mutable v (PrimState m) a -> v a -> m ()
stream :: Vector v a => v a -> Bundle v a
unstream :: Vector v a => Bundle v a -> v a
streamR :: forall v a (u :: Type -> Type). Vector v a => v a -> Bundle u a
unstreamR :: Vector v a => Bundle v a -> v a
new :: Vector v a => New v a -> v a
clone :: Vector v a => v a -> New v a
eq :: (Vector v a, Eq a) => v a -> v a -> Bool
cmp :: (Vector v a, Ord a) => v a -> v a -> Ordering
eqBy :: (Vector v a, Vector v b) => (a -> b -> Bool) -> v a -> v b -> Bool
cmpBy :: (Vector v a, Vector v b) => (a -> b -> Ordering) -> v a -> v b -> Ordering
showsPrec :: (Vector v a, Show a) => Int -> v a -> ShowS
readPrec :: (Vector v a, Read a) => ReadPrec (v a)
liftShowsPrec :: Vector v a => (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> v a -> ShowS
liftReadsPrec :: Vector v a => (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (v a)
gfoldl :: (Vector v a, Data a) => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. () => g -> c g) -> v a -> c (v a)
dataCast :: (Vector v a, Data a, Typeable v, Typeable t) => (forall d. Data d => c (t d)) -> Maybe (c (v a))
mkType :: String -> DataType


-- | Boxed <tt>Vector</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Boxed as VB
--   </pre>
--   
--   This module does not export any partial or unsafe functions. For
--   those, see <a>RIO.Vector.Boxed.Partial</a> and
--   <a>RIO.Vector.Boxed.Unsafe</a>
module RIO.Vector.Boxed
data Vector a
data MVector s a
length :: Vector a -> Int
null :: Vector a -> Bool
(!?) :: Vector a -> Int -> Maybe a
slice :: Int -> Int -> Vector a -> Vector a
take :: Int -> Vector a -> Vector a
drop :: Int -> Vector a -> Vector a
splitAt :: Int -> Vector a -> (Vector a, Vector a)
empty :: Vector a
singleton :: a -> Vector a
replicate :: Int -> a -> Vector a
generate :: Int -> (Int -> a) -> Vector a
iterateN :: Int -> (a -> a) -> a -> Vector a
replicateM :: Monad m => Int -> m a -> m (Vector a)
generateM :: Monad m => Int -> (Int -> m a) -> m (Vector a)
iterateNM :: Monad m => Int -> (a -> m a) -> a -> m (Vector a)
create :: (forall s. () => ST s (MVector s a)) -> Vector a
createT :: Traversable f => (forall s. () => ST s (f (MVector s a))) -> f (Vector a)
unfoldr :: (b -> Maybe (a, b)) -> b -> Vector a
unfoldrN :: Int -> (b -> Maybe (a, b)) -> b -> Vector a
unfoldrM :: Monad m => (b -> m (Maybe (a, b))) -> b -> m (Vector a)
unfoldrNM :: Monad m => Int -> (b -> m (Maybe (a, b))) -> b -> m (Vector a)
constructN :: Int -> (Vector a -> a) -> Vector a
constructrN :: Int -> (Vector a -> a) -> Vector a
enumFromN :: Num a => a -> Int -> Vector a
enumFromStepN :: Num a => a -> a -> Int -> Vector a
enumFromTo :: Enum a => a -> a -> Vector a
enumFromThenTo :: Enum a => a -> a -> a -> Vector a
cons :: a -> Vector a -> Vector a
snoc :: Vector a -> a -> Vector a
(++) :: Vector a -> Vector a -> Vector a
concat :: [Vector a] -> Vector a
force :: Vector a -> Vector a
reverse :: Vector a -> Vector a
modify :: (forall s. () => MVector s a -> ST s ()) -> Vector a -> Vector a
indexed :: Vector a -> Vector (Int, a)
map :: (a -> b) -> Vector a -> Vector b
imap :: (Int -> a -> b) -> Vector a -> Vector b
concatMap :: (a -> Vector b) -> Vector a -> Vector b
mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b)
imapM :: Monad m => (Int -> a -> m b) -> Vector a -> m (Vector b)
mapM_ :: Monad m => (a -> m b) -> Vector a -> m ()
imapM_ :: Monad m => (Int -> a -> m b) -> Vector a -> m ()
forM :: Monad m => Vector a -> (a -> m b) -> m (Vector b)
forM_ :: Monad m => Vector a -> (a -> m b) -> m ()
zipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c
zipWith3 :: (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
zipWith4 :: (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
zipWith5 :: (a -> b -> c -> d -> e -> f) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f
zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector g
izipWith :: (Int -> a -> b -> c) -> Vector a -> Vector b -> Vector c
izipWith3 :: (Int -> a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
izipWith4 :: (Int -> a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
izipWith5 :: (Int -> a -> b -> c -> d -> e -> f) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f
izipWith6 :: (Int -> a -> b -> c -> d -> e -> f -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector g
zip :: Vector a -> Vector b -> Vector (a, b)
zip3 :: Vector a -> Vector b -> Vector c -> Vector (a, b, c)
zip4 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d)
zip5 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector (a, b, c, d, e)
zip6 :: Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector (a, b, c, d, e, f)
zipWithM :: Monad m => (a -> b -> m c) -> Vector a -> Vector b -> m (Vector c)
izipWithM :: Monad m => (Int -> a -> b -> m c) -> Vector a -> Vector b -> m (Vector c)
zipWithM_ :: Monad m => (a -> b -> m c) -> Vector a -> Vector b -> m ()
izipWithM_ :: Monad m => (Int -> a -> b -> m c) -> Vector a -> Vector b -> m ()
unzip :: Vector (a, b) -> (Vector a, Vector b)
unzip3 :: Vector (a, b, c) -> (Vector a, Vector b, Vector c)
unzip4 :: Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d)
unzip5 :: Vector (a, b, c, d, e) -> (Vector a, Vector b, Vector c, Vector d, Vector e)
unzip6 :: Vector (a, b, c, d, e, f) -> (Vector a, Vector b, Vector c, Vector d, Vector e, Vector f)
filter :: (a -> Bool) -> Vector a -> Vector a
ifilter :: (Int -> a -> Bool) -> Vector a -> Vector a
uniq :: Eq a => Vector a -> Vector a
mapMaybe :: (a -> Maybe b) -> Vector a -> Vector b
imapMaybe :: (Int -> a -> Maybe b) -> Vector a -> Vector b
filterM :: Monad m => (a -> m Bool) -> Vector a -> m (Vector a)
takeWhile :: (a -> Bool) -> Vector a -> Vector a
dropWhile :: (a -> Bool) -> Vector a -> Vector a
partition :: (a -> Bool) -> Vector a -> (Vector a, Vector a)
unstablePartition :: (a -> Bool) -> Vector a -> (Vector a, Vector a)
span :: (a -> Bool) -> Vector a -> (Vector a, Vector a)
break :: (a -> Bool) -> Vector a -> (Vector a, Vector a)
elem :: Eq a => a -> Vector a -> Bool
notElem :: Eq a => a -> Vector a -> Bool
find :: (a -> Bool) -> Vector a -> Maybe a
findIndex :: (a -> Bool) -> Vector a -> Maybe Int
findIndices :: (a -> Bool) -> Vector a -> Vector Int
elemIndex :: Eq a => a -> Vector a -> Maybe Int
elemIndices :: Eq a => a -> Vector a -> Vector Int
foldl :: (a -> b -> a) -> a -> Vector b -> a
foldl' :: (a -> b -> a) -> a -> Vector b -> a
foldr :: (a -> b -> b) -> b -> Vector a -> b
foldr' :: (a -> b -> b) -> b -> Vector a -> b
ifoldl :: (a -> Int -> b -> a) -> a -> Vector b -> a
ifoldl' :: (a -> Int -> b -> a) -> a -> Vector b -> a
ifoldr :: (Int -> a -> b -> b) -> b -> Vector a -> b
ifoldr' :: (Int -> a -> b -> b) -> b -> Vector a -> b
all :: (a -> Bool) -> Vector a -> Bool
any :: (a -> Bool) -> Vector a -> Bool
and :: Vector Bool -> Bool
or :: Vector Bool -> Bool
sum :: Num a => Vector a -> a
product :: Num a => Vector a -> a
foldM :: Monad m => (a -> b -> m a) -> a -> Vector b -> m a
ifoldM :: Monad m => (a -> Int -> b -> m a) -> a -> Vector b -> m a
foldM' :: Monad m => (a -> b -> m a) -> a -> Vector b -> m a
ifoldM' :: Monad m => (a -> Int -> b -> m a) -> a -> Vector b -> m a
foldM_ :: Monad m => (a -> b -> m a) -> a -> Vector b -> m ()
ifoldM_ :: Monad m => (a -> Int -> b -> m a) -> a -> Vector b -> m ()
foldM'_ :: Monad m => (a -> b -> m a) -> a -> Vector b -> m ()
ifoldM'_ :: Monad m => (a -> Int -> b -> m a) -> a -> Vector b -> m ()
sequence :: Monad m => Vector (m a) -> m (Vector a)
sequence_ :: Monad m => Vector (m a) -> m ()
prescanl :: (a -> b -> a) -> a -> Vector b -> Vector a
prescanl' :: (a -> b -> a) -> a -> Vector b -> Vector a
postscanl :: (a -> b -> a) -> a -> Vector b -> Vector a
postscanl' :: (a -> b -> a) -> a -> Vector b -> Vector a
scanl :: (a -> b -> a) -> a -> Vector b -> Vector a
scanl' :: (a -> b -> a) -> a -> Vector b -> Vector a
iscanl :: (Int -> a -> b -> a) -> a -> Vector b -> Vector a
iscanl' :: (Int -> a -> b -> a) -> a -> Vector b -> Vector a
prescanr :: (a -> b -> b) -> b -> Vector a -> Vector b
prescanr' :: (a -> b -> b) -> b -> Vector a -> Vector b
postscanr :: (a -> b -> b) -> b -> Vector a -> Vector b
postscanr' :: (a -> b -> b) -> b -> Vector a -> Vector b
scanr :: (a -> b -> b) -> b -> Vector a -> Vector b
scanr' :: (a -> b -> b) -> b -> Vector a -> Vector b
iscanr :: (Int -> a -> b -> b) -> b -> Vector a -> Vector b
iscanr' :: (Int -> a -> b -> b) -> b -> Vector a -> Vector b
toList :: Vector a -> [a]
fromList :: [a] -> Vector a
fromListN :: Int -> [a] -> Vector a
convert :: (Vector v a, Vector w a) => v a -> w a
freeze :: PrimMonad m => MVector (PrimState m) a -> m (Vector a)
thaw :: PrimMonad m => Vector a -> m (MVector (PrimState m) a)
copy :: PrimMonad m => MVector (PrimState m) a -> Vector a -> m ()


-- | Boxed <tt>Vector</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Boxed.Partial as VB'
--   </pre>
module RIO.Vector.Boxed.Partial
(!) :: Vector a -> Int -> a
head :: Vector a -> a
last :: Vector a -> a
indexM :: Monad m => Vector a -> Int -> m a
headM :: Monad m => Vector a -> m a
lastM :: Monad m => Vector a -> m a
init :: Vector a -> Vector a
tail :: Vector a -> Vector a
(//) :: Vector a -> [(Int, a)] -> Vector a
update :: Vector a -> Vector (Int, a) -> Vector a
update_ :: Vector a -> Vector Int -> Vector a -> Vector a
accum :: (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
accumulate :: (a -> b -> a) -> Vector a -> Vector (Int, b) -> Vector a
accumulate_ :: (a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
backpermute :: Vector a -> Vector Int -> Vector a
foldl1 :: (a -> a -> a) -> Vector a -> a
foldl1' :: (a -> a -> a) -> Vector a -> a
foldr1 :: (a -> a -> a) -> Vector a -> a
foldr1' :: (a -> a -> a) -> Vector a -> a
maximum :: Ord a => Vector a -> a
maximumBy :: (a -> a -> Ordering) -> Vector a -> a
minimum :: Ord a => Vector a -> a
minimumBy :: (a -> a -> Ordering) -> Vector a -> a
minIndex :: Ord a => Vector a -> Int
minIndexBy :: (a -> a -> Ordering) -> Vector a -> Int
maxIndex :: Ord a => Vector a -> Int
maxIndexBy :: (a -> a -> Ordering) -> Vector a -> Int
fold1M :: Monad m => (a -> a -> m a) -> Vector a -> m a
fold1M' :: Monad m => (a -> a -> m a) -> Vector a -> m a
fold1M_ :: Monad m => (a -> a -> m a) -> Vector a -> m ()
fold1M'_ :: Monad m => (a -> a -> m a) -> Vector a -> m ()
scanl1 :: (a -> a -> a) -> Vector a -> Vector a
scanl1' :: (a -> a -> a) -> Vector a -> Vector a
scanr1 :: (a -> a -> a) -> Vector a -> Vector a
scanr1' :: (a -> a -> a) -> Vector a -> Vector a


-- | Boxed <tt>Vector</tt> unsafe functions. These perform no bounds
--   checking, and may cause segmentation faults etc.! Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Boxed.Unsafe as VB'
--   </pre>
module RIO.Vector.Boxed.Unsafe
unsafeIndex :: Vector a -> Int -> a
unsafeHead :: Vector a -> a
unsafeLast :: Vector a -> a
unsafeIndexM :: Monad m => Vector a -> Int -> m a
unsafeHeadM :: Monad m => Vector a -> m a
unsafeLastM :: Monad m => Vector a -> m a
unsafeSlice :: Int -> Int -> Vector a -> Vector a
unsafeInit :: Vector a -> Vector a
unsafeTail :: Vector a -> Vector a
unsafeTake :: Int -> Vector a -> Vector a
unsafeDrop :: Int -> Vector a -> Vector a
unsafeUpd :: Vector a -> [(Int, a)] -> Vector a
unsafeUpdate :: Vector a -> Vector (Int, a) -> Vector a
unsafeUpdate_ :: Vector a -> Vector Int -> Vector a -> Vector a
unsafeAccum :: (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
unsafeAccumulate :: (a -> b -> a) -> Vector a -> Vector (Int, b) -> Vector a
unsafeAccumulate_ :: (a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
unsafeBackpermute :: Vector a -> Vector Int -> Vector a
unsafeFreeze :: PrimMonad m => MVector (PrimState m) a -> m (Vector a)
unsafeThaw :: PrimMonad m => Vector a -> m (MVector (PrimState m) a)
unsafeCopy :: PrimMonad m => MVector (PrimState m) a -> Vector a -> m ()


-- | Generic <tt>Vector</tt> interface partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Partial as V'
--   </pre>
module RIO.Vector.Partial
(!) :: (HasCallStack, Vector v a) => v a -> Int -> a
head :: Vector v a => v a -> a
last :: Vector v a => v a -> a
indexM :: (HasCallStack, Vector v a, Monad m) => v a -> Int -> m a
headM :: (Vector v a, Monad m) => v a -> m a
lastM :: (Vector v a, Monad m) => v a -> m a
init :: Vector v a => v a -> v a
tail :: Vector v a => v a -> v a
(//) :: Vector v a => v a -> [(Int, a)] -> v a
update :: (Vector v a, Vector v (Int, a)) => v a -> v (Int, a) -> v a
update_ :: (Vector v a, Vector v Int) => v a -> v Int -> v a -> v a
accum :: Vector v a => (a -> b -> a) -> v a -> [(Int, b)] -> v a
accumulate :: (Vector v a, Vector v (Int, b)) => (a -> b -> a) -> v a -> v (Int, b) -> v a
accumulate_ :: (Vector v a, Vector v Int, Vector v b) => (a -> b -> a) -> v a -> v Int -> v b -> v a
backpermute :: (HasCallStack, Vector v a, Vector v Int) => v a -> v Int -> v a
foldl1 :: Vector v a => (a -> a -> a) -> v a -> a
foldl1' :: Vector v a => (a -> a -> a) -> v a -> a
foldr1 :: Vector v a => (a -> a -> a) -> v a -> a
foldr1' :: Vector v a => (a -> a -> a) -> v a -> a
maximum :: (Vector v a, Ord a) => v a -> a
maximumBy :: Vector v a => (a -> a -> Ordering) -> v a -> a
minimum :: (Vector v a, Ord a) => v a -> a
minimumBy :: Vector v a => (a -> a -> Ordering) -> v a -> a
minIndex :: (Vector v a, Ord a) => v a -> Int
minIndexBy :: Vector v a => (a -> a -> Ordering) -> v a -> Int
maxIndex :: (Vector v a, Ord a) => v a -> Int
maxIndexBy :: Vector v a => (a -> a -> Ordering) -> v a -> Int
fold1M :: (Monad m, Vector v a) => (a -> a -> m a) -> v a -> m a
fold1M' :: (Monad m, Vector v a) => (a -> a -> m a) -> v a -> m a
fold1M_ :: (Monad m, Vector v a) => (a -> a -> m a) -> v a -> m ()
fold1M'_ :: (Monad m, Vector v a) => (a -> a -> m a) -> v a -> m ()
scanl1 :: Vector v a => (a -> a -> a) -> v a -> v a
scanl1' :: Vector v a => (a -> a -> a) -> v a -> v a
scanr1 :: Vector v a => (a -> a -> a) -> v a -> v a
scanr1' :: Vector v a => (a -> a -> a) -> v a -> v a


-- | Storable <tt>Vector</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Storable as VS
--   </pre>
--   
--   This module does not export any partial or unsafe functions. For
--   those, see <a>RIO.Vector.Storable.Partial</a> and
--   <a>RIO.Vector.Storable.Unsafe</a>
module RIO.Vector.Storable
data Vector a
data MVector s a
MVector :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !ForeignPtr a -> MVector s a
class Storable a
length :: Storable a => Vector a -> Int
null :: Storable a => Vector a -> Bool
(!?) :: Storable a => Vector a -> Int -> Maybe a
slice :: Storable a => Int -> Int -> Vector a -> Vector a
take :: Storable a => Int -> Vector a -> Vector a
drop :: Storable a => Int -> Vector a -> Vector a
splitAt :: Storable a => Int -> Vector a -> (Vector a, Vector a)
empty :: Storable a => Vector a
singleton :: Storable a => a -> Vector a
replicate :: Storable a => Int -> a -> Vector a
generate :: Storable a => Int -> (Int -> a) -> Vector a
iterateN :: Storable a => Int -> (a -> a) -> a -> Vector a
replicateM :: (Monad m, Storable a) => Int -> m a -> m (Vector a)
generateM :: (Monad m, Storable a) => Int -> (Int -> m a) -> m (Vector a)
iterateNM :: (Monad m, Storable a) => Int -> (a -> m a) -> a -> m (Vector a)
create :: Storable a => (forall s. () => ST s (MVector s a)) -> Vector a
createT :: (Traversable f, Storable a) => (forall s. () => ST s (f (MVector s a))) -> f (Vector a)
unfoldr :: Storable a => (b -> Maybe (a, b)) -> b -> Vector a
unfoldrN :: Storable a => Int -> (b -> Maybe (a, b)) -> b -> Vector a
unfoldrM :: (Monad m, Storable a) => (b -> m (Maybe (a, b))) -> b -> m (Vector a)
unfoldrNM :: (Monad m, Storable a) => Int -> (b -> m (Maybe (a, b))) -> b -> m (Vector a)
constructN :: Storable a => Int -> (Vector a -> a) -> Vector a
constructrN :: Storable a => Int -> (Vector a -> a) -> Vector a
enumFromN :: (Storable a, Num a) => a -> Int -> Vector a
enumFromStepN :: (Storable a, Num a) => a -> a -> Int -> Vector a
enumFromTo :: (Storable a, Enum a) => a -> a -> Vector a
enumFromThenTo :: (Storable a, Enum a) => a -> a -> a -> Vector a
cons :: Storable a => a -> Vector a -> Vector a
snoc :: Storable a => Vector a -> a -> Vector a
(++) :: Storable a => Vector a -> Vector a -> Vector a
concat :: Storable a => [Vector a] -> Vector a
force :: Storable a => Vector a -> Vector a
reverse :: Storable a => Vector a -> Vector a
modify :: Storable a => (forall s. () => MVector s a -> ST s ()) -> Vector a -> Vector a
map :: (Storable a, Storable b) => (a -> b) -> Vector a -> Vector b
imap :: (Storable a, Storable b) => (Int -> a -> b) -> Vector a -> Vector b
concatMap :: (Storable a, Storable b) => (a -> Vector b) -> Vector a -> Vector b
mapM :: (Monad m, Storable a, Storable b) => (a -> m b) -> Vector a -> m (Vector b)
mapM_ :: (Monad m, Storable a) => (a -> m b) -> Vector a -> m ()
forM :: (Monad m, Storable a, Storable b) => Vector a -> (a -> m b) -> m (Vector b)
forM_ :: (Monad m, Storable a) => Vector a -> (a -> m b) -> m ()
zipWith :: (Storable a, Storable b, Storable c) => (a -> b -> c) -> Vector a -> Vector b -> Vector c
zipWith3 :: (Storable a, Storable b, Storable c, Storable d) => (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
zipWith4 :: (Storable a, Storable b, Storable c, Storable d, Storable e) => (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
zipWith5 :: (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f) => (a -> b -> c -> d -> e -> f) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f
zipWith6 :: (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g) => (a -> b -> c -> d -> e -> f -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector g
izipWith :: (Storable a, Storable b, Storable c) => (Int -> a -> b -> c) -> Vector a -> Vector b -> Vector c
izipWith3 :: (Storable a, Storable b, Storable c, Storable d) => (Int -> a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
izipWith4 :: (Storable a, Storable b, Storable c, Storable d, Storable e) => (Int -> a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
izipWith5 :: (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f) => (Int -> a -> b -> c -> d -> e -> f) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f
izipWith6 :: (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g) => (Int -> a -> b -> c -> d -> e -> f -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector g
zipWithM :: (Monad m, Storable a, Storable b, Storable c) => (a -> b -> m c) -> Vector a -> Vector b -> m (Vector c)
zipWithM_ :: (Monad m, Storable a, Storable b) => (a -> b -> m c) -> Vector a -> Vector b -> m ()
filter :: Storable a => (a -> Bool) -> Vector a -> Vector a
ifilter :: Storable a => (Int -> a -> Bool) -> Vector a -> Vector a
uniq :: (Storable a, Eq a) => Vector a -> Vector a
mapMaybe :: (Storable a, Storable b) => (a -> Maybe b) -> Vector a -> Vector b
imapMaybe :: (Storable a, Storable b) => (Int -> a -> Maybe b) -> Vector a -> Vector b
filterM :: (Monad m, Storable a) => (a -> m Bool) -> Vector a -> m (Vector a)
takeWhile :: Storable a => (a -> Bool) -> Vector a -> Vector a
dropWhile :: Storable a => (a -> Bool) -> Vector a -> Vector a
partition :: Storable a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
unstablePartition :: Storable a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
span :: Storable a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
break :: Storable a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
elem :: (Storable a, Eq a) => a -> Vector a -> Bool
notElem :: (Storable a, Eq a) => a -> Vector a -> Bool
find :: Storable a => (a -> Bool) -> Vector a -> Maybe a
findIndex :: Storable a => (a -> Bool) -> Vector a -> Maybe Int
findIndices :: Storable a => (a -> Bool) -> Vector a -> Vector Int
elemIndex :: (Storable a, Eq a) => a -> Vector a -> Maybe Int
elemIndices :: (Storable a, Eq a) => a -> Vector a -> Vector Int
foldl :: Storable b => (a -> b -> a) -> a -> Vector b -> a
foldl' :: Storable b => (a -> b -> a) -> a -> Vector b -> a
foldr :: Storable a => (a -> b -> b) -> b -> Vector a -> b
foldr' :: Storable a => (a -> b -> b) -> b -> Vector a -> b
ifoldl :: Storable b => (a -> Int -> b -> a) -> a -> Vector b -> a
ifoldl' :: Storable b => (a -> Int -> b -> a) -> a -> Vector b -> a
ifoldr :: Storable a => (Int -> a -> b -> b) -> b -> Vector a -> b
ifoldr' :: Storable a => (Int -> a -> b -> b) -> b -> Vector a -> b
all :: Storable a => (a -> Bool) -> Vector a -> Bool
any :: Storable a => (a -> Bool) -> Vector a -> Bool
and :: Vector Bool -> Bool
or :: Vector Bool -> Bool
sum :: (Storable a, Num a) => Vector a -> a
product :: (Storable a, Num a) => Vector a -> a
foldM :: (Monad m, Storable b) => (a -> b -> m a) -> a -> Vector b -> m a
foldM' :: (Monad m, Storable b) => (a -> b -> m a) -> a -> Vector b -> m a
foldM_ :: (Monad m, Storable b) => (a -> b -> m a) -> a -> Vector b -> m ()
foldM'_ :: (Monad m, Storable b) => (a -> b -> m a) -> a -> Vector b -> m ()
prescanl :: (Storable a, Storable b) => (a -> b -> a) -> a -> Vector b -> Vector a
prescanl' :: (Storable a, Storable b) => (a -> b -> a) -> a -> Vector b -> Vector a
postscanl :: (Storable a, Storable b) => (a -> b -> a) -> a -> Vector b -> Vector a
postscanl' :: (Storable a, Storable b) => (a -> b -> a) -> a -> Vector b -> Vector a
scanl :: (Storable a, Storable b) => (a -> b -> a) -> a -> Vector b -> Vector a
scanl' :: (Storable a, Storable b) => (a -> b -> a) -> a -> Vector b -> Vector a
prescanr :: (Storable a, Storable b) => (a -> b -> b) -> b -> Vector a -> Vector b
prescanr' :: (Storable a, Storable b) => (a -> b -> b) -> b -> Vector a -> Vector b
postscanr :: (Storable a, Storable b) => (a -> b -> b) -> b -> Vector a -> Vector b
postscanr' :: (Storable a, Storable b) => (a -> b -> b) -> b -> Vector a -> Vector b
scanr :: (Storable a, Storable b) => (a -> b -> b) -> b -> Vector a -> Vector b
scanr' :: (Storable a, Storable b) => (a -> b -> b) -> b -> Vector a -> Vector b
toList :: Storable a => Vector a -> [a]
fromList :: Storable a => [a] -> Vector a
fromListN :: Storable a => Int -> [a] -> Vector a
convert :: (Vector v a, Vector w a) => v a -> w a
freeze :: (Storable a, PrimMonad m) => MVector (PrimState m) a -> m (Vector a)
thaw :: (Storable a, PrimMonad m) => Vector a -> m (MVector (PrimState m) a)
copy :: (Storable a, PrimMonad m) => MVector (PrimState m) a -> Vector a -> m ()


-- | Storable <tt>Vector</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Storable.Partial as VS'
--   </pre>
module RIO.Vector.Storable.Partial
(!) :: Storable a => Vector a -> Int -> a
head :: Storable a => Vector a -> a
last :: Storable a => Vector a -> a
indexM :: (Storable a, Monad m) => Vector a -> Int -> m a
headM :: (Storable a, Monad m) => Vector a -> m a
lastM :: (Storable a, Monad m) => Vector a -> m a
init :: Storable a => Vector a -> Vector a
tail :: Storable a => Vector a -> Vector a
(//) :: Storable a => Vector a -> [(Int, a)] -> Vector a
update_ :: Storable a => Vector a -> Vector Int -> Vector a -> Vector a
accum :: Storable a => (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
accumulate_ :: (Storable a, Storable b) => (a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
backpermute :: Storable a => Vector a -> Vector Int -> Vector a
foldl1 :: Storable a => (a -> a -> a) -> Vector a -> a
foldl1' :: Storable a => (a -> a -> a) -> Vector a -> a
foldr1 :: Storable a => (a -> a -> a) -> Vector a -> a
foldr1' :: Storable a => (a -> a -> a) -> Vector a -> a
maximum :: (Storable a, Ord a) => Vector a -> a
maximumBy :: Storable a => (a -> a -> Ordering) -> Vector a -> a
minimum :: (Storable a, Ord a) => Vector a -> a
minimumBy :: Storable a => (a -> a -> Ordering) -> Vector a -> a
minIndex :: (Storable a, Ord a) => Vector a -> Int
minIndexBy :: Storable a => (a -> a -> Ordering) -> Vector a -> Int
maxIndex :: (Storable a, Ord a) => Vector a -> Int
maxIndexBy :: Storable a => (a -> a -> Ordering) -> Vector a -> Int
fold1M :: (Monad m, Storable a) => (a -> a -> m a) -> Vector a -> m a
fold1M' :: (Monad m, Storable a) => (a -> a -> m a) -> Vector a -> m a
fold1M_ :: (Monad m, Storable a) => (a -> a -> m a) -> Vector a -> m ()
fold1M'_ :: (Monad m, Storable a) => (a -> a -> m a) -> Vector a -> m ()
scanl1 :: Storable a => (a -> a -> a) -> Vector a -> Vector a
scanl1' :: Storable a => (a -> a -> a) -> Vector a -> Vector a
scanr1 :: Storable a => (a -> a -> a) -> Vector a -> Vector a
scanr1' :: Storable a => (a -> a -> a) -> Vector a -> Vector a


-- | Storable <tt>Vector</tt> unsafe functions. These perform no bounds
--   checking, and may cause segmentation faults etc.! Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Storable.Unsafe as VS'
--   </pre>
module RIO.Vector.Storable.Unsafe
unsafeIndex :: Storable a => Vector a -> Int -> a
unsafeHead :: Storable a => Vector a -> a
unsafeLast :: Storable a => Vector a -> a
unsafeIndexM :: (Storable a, Monad m) => Vector a -> Int -> m a
unsafeHeadM :: (Storable a, Monad m) => Vector a -> m a
unsafeLastM :: (Storable a, Monad m) => Vector a -> m a
unsafeSlice :: Storable a => Int -> Int -> Vector a -> Vector a
unsafeInit :: Storable a => Vector a -> Vector a
unsafeTail :: Storable a => Vector a -> Vector a
unsafeTake :: Storable a => Int -> Vector a -> Vector a
unsafeDrop :: Storable a => Int -> Vector a -> Vector a
unsafeUpd :: Storable a => Vector a -> [(Int, a)] -> Vector a
unsafeUpdate_ :: Storable a => Vector a -> Vector Int -> Vector a -> Vector a
unsafeAccum :: Storable a => (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
unsafeAccumulate_ :: (Storable a, Storable b) => (a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
unsafeBackpermute :: Storable a => Vector a -> Vector Int -> Vector a
unsafeFreeze :: (Storable a, PrimMonad m) => MVector (PrimState m) a -> m (Vector a)
unsafeThaw :: (Storable a, PrimMonad m) => Vector a -> m (MVector (PrimState m) a)
unsafeCopy :: (Storable a, PrimMonad m) => MVector (PrimState m) a -> Vector a -> m ()
unsafeFromForeignPtr :: Storable a => ForeignPtr a -> Int -> Int -> Vector a
unsafeFromForeignPtr0 :: ForeignPtr a -> Int -> Vector a
unsafeToForeignPtr :: Vector a -> (ForeignPtr a, Int, Int)
unsafeToForeignPtr0 :: Vector a -> (ForeignPtr a, Int)

-- | Lifted version of <a>unsafeWith</a>
unsafeWith :: (MonadUnliftIO m, Storable a) => Vector a -> (Ptr a -> m b) -> m b


-- | Unboxed <tt>Vector</tt>. Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Unboxed as VU
--   </pre>
--   
--   This module does not export any partial or unsafe functions. For
--   those, see <a>RIO.Vector.Unboxed.Partial</a> and
--   <a>RIO.Vector.Unboxed.Unsafe</a>
module RIO.Vector.Unboxed
data family Vector a
data family MVector s a
class (Vector Vector a, MVector MVector a) => Unbox a
length :: Unbox a => Vector a -> Int
null :: Unbox a => Vector a -> Bool
(!?) :: Unbox a => Vector a -> Int -> Maybe a
slice :: Unbox a => Int -> Int -> Vector a -> Vector a
take :: Unbox a => Int -> Vector a -> Vector a
drop :: Unbox a => Int -> Vector a -> Vector a
splitAt :: Unbox a => Int -> Vector a -> (Vector a, Vector a)
empty :: Unbox a => Vector a
singleton :: Unbox a => a -> Vector a
replicate :: Unbox a => Int -> a -> Vector a
generate :: Unbox a => Int -> (Int -> a) -> Vector a
iterateN :: Unbox a => Int -> (a -> a) -> a -> Vector a
replicateM :: (Monad m, Unbox a) => Int -> m a -> m (Vector a)
generateM :: (Monad m, Unbox a) => Int -> (Int -> m a) -> m (Vector a)
iterateNM :: (Monad m, Unbox a) => Int -> (a -> m a) -> a -> m (Vector a)
create :: Unbox a => (forall s. () => ST s (MVector s a)) -> Vector a
createT :: (Traversable f, Unbox a) => (forall s. () => ST s (f (MVector s a))) -> f (Vector a)
unfoldr :: Unbox a => (b -> Maybe (a, b)) -> b -> Vector a
unfoldrN :: Unbox a => Int -> (b -> Maybe (a, b)) -> b -> Vector a
unfoldrM :: (Monad m, Unbox a) => (b -> m (Maybe (a, b))) -> b -> m (Vector a)
unfoldrNM :: (Monad m, Unbox a) => Int -> (b -> m (Maybe (a, b))) -> b -> m (Vector a)
constructN :: Unbox a => Int -> (Vector a -> a) -> Vector a
constructrN :: Unbox a => Int -> (Vector a -> a) -> Vector a
enumFromN :: (Unbox a, Num a) => a -> Int -> Vector a
enumFromStepN :: (Unbox a, Num a) => a -> a -> Int -> Vector a
enumFromTo :: (Unbox a, Enum a) => a -> a -> Vector a
enumFromThenTo :: (Unbox a, Enum a) => a -> a -> a -> Vector a
cons :: Unbox a => a -> Vector a -> Vector a
snoc :: Unbox a => Vector a -> a -> Vector a
(++) :: Unbox a => Vector a -> Vector a -> Vector a
concat :: Unbox a => [Vector a] -> Vector a
force :: Unbox a => Vector a -> Vector a
reverse :: Unbox a => Vector a -> Vector a
modify :: Unbox a => (forall s. () => MVector s a -> ST s ()) -> Vector a -> Vector a
indexed :: Unbox a => Vector a -> Vector (Int, a)
map :: (Unbox a, Unbox b) => (a -> b) -> Vector a -> Vector b
imap :: (Unbox a, Unbox b) => (Int -> a -> b) -> Vector a -> Vector b
concatMap :: (Unbox a, Unbox b) => (a -> Vector b) -> Vector a -> Vector b
mapM :: (Monad m, Unbox a, Unbox b) => (a -> m b) -> Vector a -> m (Vector b)
imapM :: (Monad m, Unbox a, Unbox b) => (Int -> a -> m b) -> Vector a -> m (Vector b)
mapM_ :: (Monad m, Unbox a) => (a -> m b) -> Vector a -> m ()
imapM_ :: (Monad m, Unbox a) => (Int -> a -> m b) -> Vector a -> m ()
forM :: (Monad m, Unbox a, Unbox b) => Vector a -> (a -> m b) -> m (Vector b)
forM_ :: (Monad m, Unbox a) => Vector a -> (a -> m b) -> m ()
zipWith :: (Unbox a, Unbox b, Unbox c) => (a -> b -> c) -> Vector a -> Vector b -> Vector c
zipWith3 :: (Unbox a, Unbox b, Unbox c, Unbox d) => (a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
zipWith4 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => (a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
zipWith5 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => (a -> b -> c -> d -> e -> f) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f
zipWith6 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f, Unbox g) => (a -> b -> c -> d -> e -> f -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector g
izipWith :: (Unbox a, Unbox b, Unbox c) => (Int -> a -> b -> c) -> Vector a -> Vector b -> Vector c
izipWith3 :: (Unbox a, Unbox b, Unbox c, Unbox d) => (Int -> a -> b -> c -> d) -> Vector a -> Vector b -> Vector c -> Vector d
izipWith4 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => (Int -> a -> b -> c -> d -> e) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e
izipWith5 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => (Int -> a -> b -> c -> d -> e -> f) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f
izipWith6 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f, Unbox g) => (Int -> a -> b -> c -> d -> e -> f -> g) -> Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector g
zip :: (Unbox a, Unbox b) => Vector a -> Vector b -> Vector (a, b)
zip3 :: (Unbox a, Unbox b, Unbox c) => Vector a -> Vector b -> Vector c -> Vector (a, b, c)
zip4 :: (Unbox a, Unbox b, Unbox c, Unbox d) => Vector a -> Vector b -> Vector c -> Vector d -> Vector (a, b, c, d)
zip5 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector (a, b, c, d, e)
zip6 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Vector a -> Vector b -> Vector c -> Vector d -> Vector e -> Vector f -> Vector (a, b, c, d, e, f)
zipWithM :: (Monad m, Unbox a, Unbox b, Unbox c) => (a -> b -> m c) -> Vector a -> Vector b -> m (Vector c)
izipWithM :: (Monad m, Unbox a, Unbox b, Unbox c) => (Int -> a -> b -> m c) -> Vector a -> Vector b -> m (Vector c)
zipWithM_ :: (Monad m, Unbox a, Unbox b) => (a -> b -> m c) -> Vector a -> Vector b -> m ()
izipWithM_ :: (Monad m, Unbox a, Unbox b) => (Int -> a -> b -> m c) -> Vector a -> Vector b -> m ()
unzip :: (Unbox a, Unbox b) => Vector (a, b) -> (Vector a, Vector b)
unzip3 :: (Unbox a, Unbox b, Unbox c) => Vector (a, b, c) -> (Vector a, Vector b, Vector c)
unzip4 :: (Unbox a, Unbox b, Unbox c, Unbox d) => Vector (a, b, c, d) -> (Vector a, Vector b, Vector c, Vector d)
unzip5 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Vector (a, b, c, d, e) -> (Vector a, Vector b, Vector c, Vector d, Vector e)
unzip6 :: (Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Vector (a, b, c, d, e, f) -> (Vector a, Vector b, Vector c, Vector d, Vector e, Vector f)
filter :: Unbox a => (a -> Bool) -> Vector a -> Vector a
ifilter :: Unbox a => (Int -> a -> Bool) -> Vector a -> Vector a
uniq :: (Unbox a, Eq a) => Vector a -> Vector a
mapMaybe :: (Unbox a, Unbox b) => (a -> Maybe b) -> Vector a -> Vector b
imapMaybe :: (Unbox a, Unbox b) => (Int -> a -> Maybe b) -> Vector a -> Vector b
filterM :: (Monad m, Unbox a) => (a -> m Bool) -> Vector a -> m (Vector a)
takeWhile :: Unbox a => (a -> Bool) -> Vector a -> Vector a
dropWhile :: Unbox a => (a -> Bool) -> Vector a -> Vector a
partition :: Unbox a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
unstablePartition :: Unbox a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
span :: Unbox a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
break :: Unbox a => (a -> Bool) -> Vector a -> (Vector a, Vector a)
elem :: (Unbox a, Eq a) => a -> Vector a -> Bool
notElem :: (Unbox a, Eq a) => a -> Vector a -> Bool
find :: Unbox a => (a -> Bool) -> Vector a -> Maybe a
findIndex :: Unbox a => (a -> Bool) -> Vector a -> Maybe Int
findIndices :: Unbox a => (a -> Bool) -> Vector a -> Vector Int
elemIndex :: (Unbox a, Eq a) => a -> Vector a -> Maybe Int
elemIndices :: (Unbox a, Eq a) => a -> Vector a -> Vector Int
foldl :: Unbox b => (a -> b -> a) -> a -> Vector b -> a
foldl' :: Unbox b => (a -> b -> a) -> a -> Vector b -> a
foldr :: Unbox a => (a -> b -> b) -> b -> Vector a -> b
foldr' :: Unbox a => (a -> b -> b) -> b -> Vector a -> b
ifoldl :: Unbox b => (a -> Int -> b -> a) -> a -> Vector b -> a
ifoldl' :: Unbox b => (a -> Int -> b -> a) -> a -> Vector b -> a
ifoldr :: Unbox a => (Int -> a -> b -> b) -> b -> Vector a -> b
ifoldr' :: Unbox a => (Int -> a -> b -> b) -> b -> Vector a -> b
all :: Unbox a => (a -> Bool) -> Vector a -> Bool
any :: Unbox a => (a -> Bool) -> Vector a -> Bool
and :: Vector Bool -> Bool
or :: Vector Bool -> Bool
sum :: (Unbox a, Num a) => Vector a -> a
product :: (Unbox a, Num a) => Vector a -> a
foldM :: (Monad m, Unbox b) => (a -> b -> m a) -> a -> Vector b -> m a
ifoldM :: (Monad m, Unbox b) => (a -> Int -> b -> m a) -> a -> Vector b -> m a
foldM' :: (Monad m, Unbox b) => (a -> b -> m a) -> a -> Vector b -> m a
ifoldM' :: (Monad m, Unbox b) => (a -> Int -> b -> m a) -> a -> Vector b -> m a
foldM_ :: (Monad m, Unbox b) => (a -> b -> m a) -> a -> Vector b -> m ()
ifoldM_ :: (Monad m, Unbox b) => (a -> Int -> b -> m a) -> a -> Vector b -> m ()
foldM'_ :: (Monad m, Unbox b) => (a -> b -> m a) -> a -> Vector b -> m ()
ifoldM'_ :: (Monad m, Unbox b) => (a -> Int -> b -> m a) -> a -> Vector b -> m ()
prescanl :: (Unbox a, Unbox b) => (a -> b -> a) -> a -> Vector b -> Vector a
prescanl' :: (Unbox a, Unbox b) => (a -> b -> a) -> a -> Vector b -> Vector a
postscanl :: (Unbox a, Unbox b) => (a -> b -> a) -> a -> Vector b -> Vector a
postscanl' :: (Unbox a, Unbox b) => (a -> b -> a) -> a -> Vector b -> Vector a
scanl :: (Unbox a, Unbox b) => (a -> b -> a) -> a -> Vector b -> Vector a
scanl' :: (Unbox a, Unbox b) => (a -> b -> a) -> a -> Vector b -> Vector a
prescanr :: (Unbox a, Unbox b) => (a -> b -> b) -> b -> Vector a -> Vector b
prescanr' :: (Unbox a, Unbox b) => (a -> b -> b) -> b -> Vector a -> Vector b
postscanr :: (Unbox a, Unbox b) => (a -> b -> b) -> b -> Vector a -> Vector b
postscanr' :: (Unbox a, Unbox b) => (a -> b -> b) -> b -> Vector a -> Vector b
scanr :: (Unbox a, Unbox b) => (a -> b -> b) -> b -> Vector a -> Vector b
scanr' :: (Unbox a, Unbox b) => (a -> b -> b) -> b -> Vector a -> Vector b
toList :: Unbox a => Vector a -> [a]
fromList :: Unbox a => [a] -> Vector a
fromListN :: Unbox a => Int -> [a] -> Vector a
convert :: (Vector v a, Vector w a) => v a -> w a
freeze :: (Unbox a, PrimMonad m) => MVector (PrimState m) a -> m (Vector a)
thaw :: (Unbox a, PrimMonad m) => Vector a -> m (MVector (PrimState m) a)
copy :: (Unbox a, PrimMonad m) => MVector (PrimState m) a -> Vector a -> m ()


-- | Unboxed <tt>Vector</tt> partial functions. Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Unboxed.Partial as VU'
--   </pre>
module RIO.Vector.Unboxed.Partial
(!) :: Unbox a => Vector a -> Int -> a
head :: Unbox a => Vector a -> a
last :: Unbox a => Vector a -> a
indexM :: (Unbox a, Monad m) => Vector a -> Int -> m a
headM :: (Unbox a, Monad m) => Vector a -> m a
lastM :: (Unbox a, Monad m) => Vector a -> m a
init :: Unbox a => Vector a -> Vector a
tail :: Unbox a => Vector a -> Vector a
(//) :: Unbox a => Vector a -> [(Int, a)] -> Vector a
update :: Unbox a => Vector a -> Vector (Int, a) -> Vector a
update_ :: Unbox a => Vector a -> Vector Int -> Vector a -> Vector a
accum :: Unbox a => (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
accumulate :: (Unbox a, Unbox b) => (a -> b -> a) -> Vector a -> Vector (Int, b) -> Vector a
accumulate_ :: (Unbox a, Unbox b) => (a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
backpermute :: Unbox a => Vector a -> Vector Int -> Vector a
foldl1 :: Unbox a => (a -> a -> a) -> Vector a -> a
foldl1' :: Unbox a => (a -> a -> a) -> Vector a -> a
foldr1 :: Unbox a => (a -> a -> a) -> Vector a -> a
foldr1' :: Unbox a => (a -> a -> a) -> Vector a -> a
maximum :: (Unbox a, Ord a) => Vector a -> a
maximumBy :: Unbox a => (a -> a -> Ordering) -> Vector a -> a
minimum :: (Unbox a, Ord a) => Vector a -> a
minimumBy :: Unbox a => (a -> a -> Ordering) -> Vector a -> a
minIndex :: (Unbox a, Ord a) => Vector a -> Int
minIndexBy :: Unbox a => (a -> a -> Ordering) -> Vector a -> Int
maxIndex :: (Unbox a, Ord a) => Vector a -> Int
maxIndexBy :: Unbox a => (a -> a -> Ordering) -> Vector a -> Int
fold1M :: (Monad m, Unbox a) => (a -> a -> m a) -> Vector a -> m a
fold1M' :: (Monad m, Unbox a) => (a -> a -> m a) -> Vector a -> m a
fold1M_ :: (Monad m, Unbox a) => (a -> a -> m a) -> Vector a -> m ()
fold1M'_ :: (Monad m, Unbox a) => (a -> a -> m a) -> Vector a -> m ()
scanl1 :: Unbox a => (a -> a -> a) -> Vector a -> Vector a
scanl1' :: Unbox a => (a -> a -> a) -> Vector a -> Vector a
scanr1 :: Unbox a => (a -> a -> a) -> Vector a -> Vector a
scanr1' :: Unbox a => (a -> a -> a) -> Vector a -> Vector a


-- | Unoxed <tt>Vector</tt> unsafe functions. These perform no bounds
--   checking, and may cause segmentation faults etc.! Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Unoxed.Unsafe as VU'
--   </pre>
module RIO.Vector.Unboxed.Unsafe
unsafeIndex :: Unbox a => Vector a -> Int -> a
unsafeHead :: Unbox a => Vector a -> a
unsafeLast :: Unbox a => Vector a -> a
unsafeIndexM :: (Unbox a, Monad m) => Vector a -> Int -> m a
unsafeHeadM :: (Unbox a, Monad m) => Vector a -> m a
unsafeLastM :: (Unbox a, Monad m) => Vector a -> m a
unsafeSlice :: Unbox a => Int -> Int -> Vector a -> Vector a
unsafeInit :: Unbox a => Vector a -> Vector a
unsafeTail :: Unbox a => Vector a -> Vector a
unsafeTake :: Unbox a => Int -> Vector a -> Vector a
unsafeDrop :: Unbox a => Int -> Vector a -> Vector a
unsafeUpd :: Unbox a => Vector a -> [(Int, a)] -> Vector a
unsafeUpdate :: Unbox a => Vector a -> Vector (Int, a) -> Vector a
unsafeUpdate_ :: Unbox a => Vector a -> Vector Int -> Vector a -> Vector a
unsafeAccum :: Unbox a => (a -> b -> a) -> Vector a -> [(Int, b)] -> Vector a
unsafeAccumulate :: (Unbox a, Unbox b) => (a -> b -> a) -> Vector a -> Vector (Int, b) -> Vector a
unsafeAccumulate_ :: (Unbox a, Unbox b) => (a -> b -> a) -> Vector a -> Vector Int -> Vector b -> Vector a
unsafeBackpermute :: Unbox a => Vector a -> Vector Int -> Vector a
unsafeFreeze :: (Unbox a, PrimMonad m) => MVector (PrimState m) a -> m (Vector a)
unsafeThaw :: (Unbox a, PrimMonad m) => Vector a -> m (MVector (PrimState m) a)
unsafeCopy :: (Unbox a, PrimMonad m) => MVector (PrimState m) a -> Vector a -> m ()


-- | Generic <tt>Vector</tt> interface unsafe functions. These perform no
--   bounds checking, and may cause segmentation faults etc.! Import as:
--   
--   <pre>
--   import qualified RIO.Vector.Unsafe as V'
--   </pre>
module RIO.Vector.Unsafe
class MVector Mutable v a => Vector (v :: Type -> Type) a
basicUnsafeFreeze :: Vector v a => Mutable v s a -> ST s (v a)
basicUnsafeThaw :: Vector v a => v a -> ST s (Mutable v s a)
basicLength :: Vector v a => v a -> Int
basicUnsafeSlice :: Vector v a => Int -> Int -> v a -> v a
basicUnsafeIndexM :: Vector v a => v a -> Int -> Box a
basicUnsafeCopy :: Vector v a => Mutable v s a -> v a -> ST s ()
elemseq :: Vector v a => v a -> a -> b -> b
unsafeIndex :: Vector v a => v a -> Int -> a
unsafeHead :: Vector v a => v a -> a
unsafeLast :: Vector v a => v a -> a
unsafeIndexM :: (Vector v a, Monad m) => v a -> Int -> m a
unsafeHeadM :: (Vector v a, Monad m) => v a -> m a
unsafeLastM :: (Vector v a, Monad m) => v a -> m a
unsafeSlice :: Vector v a => Int -> Int -> v a -> v a
unsafeInit :: Vector v a => v a -> v a
unsafeTail :: Vector v a => v a -> v a
unsafeTake :: Vector v a => Int -> v a -> v a
unsafeDrop :: Vector v a => Int -> v a -> v a
unsafeUpd :: Vector v a => v a -> [(Int, a)] -> v a
unsafeUpdate :: (Vector v a, Vector v (Int, a)) => v a -> v (Int, a) -> v a
unsafeUpdate_ :: (Vector v a, Vector v Int) => v a -> v Int -> v a -> v a
unsafeAccum :: Vector v a => (a -> b -> a) -> v a -> [(Int, b)] -> v a
unsafeAccumulate :: (Vector v a, Vector v (Int, b)) => (a -> b -> a) -> v a -> v (Int, b) -> v a
unsafeAccumulate_ :: (Vector v a, Vector v Int, Vector v b) => (a -> b -> a) -> v a -> v Int -> v b -> v a
unsafeBackpermute :: (Vector v a, Vector v Int) => v a -> v Int -> v a
unsafeFreeze :: (PrimMonad m, Vector v a) => Mutable v (PrimState m) a -> m (v a)
unsafeThaw :: (PrimMonad m, Vector v a) => v a -> m (Mutable v (PrimState m) a)
unsafeCopy :: (PrimMonad m, Vector v a) => Mutable v (PrimState m) a -> v a -> m ()


-- | Provides reexports of <tt>MonadWriter</tt> and related helpers.
module RIO.Writer
class (Monoid w, Monad m) => MonadWriter w (m :: Type -> Type) | m -> w
writer :: MonadWriter w m => (a, w) -> m a
tell :: MonadWriter w m => w -> m ()
listen :: MonadWriter w m => m a -> m (a, w)
pass :: MonadWriter w m => m (a, w -> w) -> m a
listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b)
censor :: MonadWriter w m => (w -> w) -> m a -> m a
type Writer w = WriterT w Identity
runWriter :: Writer w a -> (a, w)
execWriter :: Writer w a -> w
mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' b
newtype WriterT w (m :: Type -> Type) a
WriterT :: m (a, w) -> WriterT w (m :: Type -> Type) a
[runWriterT] :: WriterT w (m :: Type -> Type) a -> m (a, w)
execWriterT :: Monad m => WriterT w m a -> m w
mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b
