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


-- | The Haskell Tool Stack
--   
--   Please see the documentation at <a>https://docs.haskellstack.org</a>
--   for usage information.
--   
--   If building a <a>stack</a> executable for distribution, please
--   download the source code from
--   <a>https://github.com/commercialhaskell/stack/releases</a> and build
--   it using Stack itself in order to ensure identical behaviour to
--   official binaries. This package on Hackage is provided for convenience
--   and bootstrapping purposes.
--   
--   Note that the API for the library is not currently stable, and may
--   change significantly, even between minor releases. It is currently
--   only intended for use by the executable.
@package stack
@version 2.7.5


-- | Wrapper functions of <a>Simple</a> and <a>Client</a> to add the
--   'User-Agent' HTTP request header to each request.
module Network.HTTP.StackClient
httpJSON :: (MonadIO m, FromJSON a) => Request -> m (Response a)
httpLbs :: MonadIO m => Request -> m (Response LByteString)
httpNoBody :: MonadIO m => Request -> m (Response ())
httpSink :: MonadUnliftIO m => Request -> (Response () -> ConduitM ByteString Void m a) -> m a
withResponse :: (MonadUnliftIO m, MonadIO n) => Request -> (Response (ConduitM i ByteString n ()) -> m a) -> m a
setRequestCheckStatus :: Request -> Request
setRequestMethod :: ByteString -> Request -> Request
setRequestHeader :: HeaderName -> [ByteString] -> Request -> Request
addRequestHeader :: HeaderName -> ByteString -> Request -> Request
setRequestBody :: RequestBody -> Request -> Request
getResponseHeaders :: Response a -> [(HeaderName, ByteString)]
getResponseBody :: Response a -> a
getResponseStatusCode :: Response a -> Int
parseRequest :: MonadThrow m => String -> m Request
getUri :: Request -> URI
path :: Request -> ByteString
checkResponse :: Request -> Request -> Response BodyReader -> IO ()
parseUrlThrow :: MonadThrow m => String -> m Request
requestHeaders :: Request -> RequestHeaders
getGlobalManager :: IO Manager
applyDigestAuth :: (MonadIO m, MonadThrow n) => ByteString -> ByteString -> Request -> Manager -> m (n Request)
displayDigestAuthException :: DigestAuthException -> String
data Request
data RequestBody
RequestBodyLBS :: ByteString -> RequestBody
RequestBodyBS :: ByteString -> RequestBody
data Response body
data HttpException
hAccept :: HeaderName
hContentLength :: HeaderName
hContentMD5 :: HeaderName
methodPut :: Method
formDataBody :: MonadIO m => [Part] -> Request -> m Request
partFileRequestBody :: forall (m :: Type -> Type). Applicative m => Text -> FilePath -> RequestBody -> PartM m
partBS :: forall (m :: Type -> Type). Applicative m => Text -> ByteString -> PartM m
partLBS :: forall (m :: Type -> Type). Applicative m => Text -> ByteString -> PartM m

-- | Set the user-agent request header
setGithubHeaders :: Request -> Request

-- | Download the given URL to the given location. If the file already
--   exists, no download is performed. Otherwise, creates the parent
--   directory, downloads to a temporary file, and on file download
--   completion moves to the appropriate destination.
--   
--   Throws an exception if things go wrong
download :: HasTerm env => Request -> Path Abs File -> RIO env Bool

-- | Same as <a>download</a>, but will download a file a second time if it
--   is already present.
--   
--   Returns <a>True</a> if the file was downloaded, <a>False</a> otherwise
redownload :: HasTerm env => Request -> Path Abs File -> RIO env Bool

-- | Copied and extended version of Network.HTTP.Download.download.
--   
--   Has the following additional features: * Verifies that response
--   content-length header (if present) matches expected length * Limits
--   the download to (close to) the expected # of bytes * Verifies that the
--   expected # bytes were downloaded (not too few) * Verifies md5 if
--   response includes content-md5 header * Verifies the expected hashes
--   
--   Throws VerifiedDownloadException. Throws IOExceptions related to file
--   system operations. Throws HttpException.
verifiedDownload :: HasTerm env => DownloadRequest -> Path Abs File -> (Maybe Integer -> ConduitM ByteString Void (RIO env) ()) -> RIO env Bool
verifiedDownloadWithProgress :: HasTerm env => DownloadRequest -> Path Abs File -> Text -> Maybe Int -> RIO env Bool
data CheckHexDigest
CheckHexDigestString :: String -> CheckHexDigest
CheckHexDigestByteString :: ByteString -> CheckHexDigest
CheckHexDigestHeader :: ByteString -> CheckHexDigest

-- | A request together with some checks to perform.
--   
--   Construct using the <tt>downloadRequest</tt> smart constructor and
--   associated setters. The constructor itself is not exposed to avoid
--   breaking changes with additional fields.
data DownloadRequest

-- | Default to retrying seven times with exponential backoff starting from
--   one hundred milliseconds.
--   
--   This means the tries will occur after these delays if necessary:
--   
--   <ul>
--   <li>0.1s</li>
--   <li>0.2s</li>
--   <li>0.4s</li>
--   <li>0.8s</li>
--   <li>1.6s</li>
--   <li>3.2s</li>
--   <li>6.4s</li>
--   </ul>
drRetryPolicyDefault :: RetryPolicy

-- | An exception regarding verification of a download.
data VerifiedDownloadException
WrongContentLength :: Request -> Int -> ByteString -> VerifiedDownloadException
WrongStreamLength :: Request -> Int -> Int -> VerifiedDownloadException
WrongDigest :: Request -> String -> CheckHexDigest -> String -> VerifiedDownloadException
DownloadHttpError :: HttpException -> VerifiedDownloadException
data HashCheck
HashCheck :: a -> CheckHexDigest -> HashCheck
[hashCheckAlgorithm] :: HashCheck -> a
[hashCheckHexDigest] :: HashCheck -> CheckHexDigest

-- | Construct a new <a>DownloadRequest</a> from the given <a>Request</a>.
--   Use associated setters to modify the value further.
mkDownloadRequest :: Request -> DownloadRequest

-- | Set the hash checks to be run when verifying.
setHashChecks :: [HashCheck] -> DownloadRequest -> DownloadRequest

-- | Set the length check to be run when verifying.
setLengthCheck :: Maybe LengthCheck -> DownloadRequest -> DownloadRequest

-- | Set the retry policy to be used when downloading.
setRetryPolicy :: RetryPolicy -> DownloadRequest -> DownloadRequest

-- | If <a>True</a>, force download even if the file already exists. Useful
--   for download a resource which may change over time.
setForceDownload :: Bool -> DownloadRequest -> DownloadRequest


-- | Extra Path utilities.
module Path.Extra

-- | Convert to FilePath but don't add a trailing slash.
toFilePathNoTrailingSep :: Path loc Dir -> FilePath

-- | Drop the root (either <tt>/</tt> on POSIX or <tt>C:\</tt>,
--   <tt>D:\</tt>, etc. on Windows).
dropRoot :: Path Abs t -> Path Rel t

-- | Collapse intermediate "." and ".." directories from path, then parse
--   it with <a>parseAbsDir</a>. (probably should be moved to the Path
--   module)
parseCollapsedAbsDir :: MonadThrow m => FilePath -> m (Path Abs Dir)

-- | Collapse intermediate "." and ".." directories from path, then parse
--   it with <a>parseAbsFile</a>. (probably should be moved to the Path
--   module)
parseCollapsedAbsFile :: MonadThrow m => FilePath -> m (Path Abs File)

-- | Add a relative FilePath to the end of a Path We can't parse the
--   FilePath first because we need to account for ".." in the FilePath
--   (#2895)
concatAndColapseAbsDir :: MonadThrow m => Path Abs Dir -> FilePath -> m (Path Abs Dir)

-- | If given file in <a>Maybe</a> does not exist, ensure we have
--   <a>Nothing</a>. This is to be used in conjunction with
--   <a>forgivingAbsence</a> and <a>resolveFile</a>.
--   
--   Previously the idiom <tt>forgivingAbsence (relsoveFile …)</tt> alone
--   was used, which relied on <a>canonicalizePath</a> throwing
--   <a>isDoesNotExistError</a> when path does not exist. As it turns out,
--   this behavior is actually not intentional and unreliable, see
--   <a>https://github.com/haskell/directory/issues/44</a>. This was
--   “fixed” in version <tt>1.2.3.0</tt> of <tt>directory</tt> package (now
--   it never throws). To make it work with all versions, we need to use
--   the following idiom:
--   
--   <pre>
--   forgivingAbsence (resolveFile …) &gt;&gt;= rejectMissingFile
--   </pre>
rejectMissingFile :: MonadIO m => Maybe (Path Abs File) -> m (Maybe (Path Abs File))

-- | See <a>rejectMissingFile</a>.
rejectMissingDir :: MonadIO m => Maybe (Path Abs Dir) -> m (Maybe (Path Abs Dir))

-- | Convert to a ByteString using toFilePath and UTF8.
pathToByteString :: Path b t -> ByteString

-- | Convert to a lazy ByteString using toFilePath and UTF8.
pathToLazyByteString :: Path b t -> ByteString
pathToText :: Path b t -> Text
tryGetModificationTime :: MonadIO m => Path Abs File -> m (Either () UTCTime)


-- | Finding files.
module Path.Find

-- | Find the location of a file matching the given predicate.
findFileUp :: (MonadIO m, MonadThrow m) => Path Abs Dir -> (Path Abs File -> Bool) -> Maybe (Path Abs Dir) -> m (Maybe (Path Abs File))

-- | Find the location of a directory matching the given predicate.
findDirUp :: (MonadIO m, MonadThrow m) => Path Abs Dir -> (Path Abs Dir -> Bool) -> Maybe (Path Abs Dir) -> m (Maybe (Path Abs Dir))

-- | Find files matching predicate below a root directory.
--   
--   NOTE: this skips symbolic directory links, to avoid loops. This may
--   not make sense for all uses of file finding.
--   
--   TODO: write one of these that traverses symbolic links but efficiently
--   ignores loops.
findFiles :: Path Abs Dir -> (Path Abs File -> Bool) -> (Path Abs Dir -> Bool) -> IO [Path Abs File]

-- | <tt>findInParents f path</tt> applies <tt>f</tt> to <tt>path</tt> and
--   its <a>parent</a>s until it finds a <a>Just</a> or reaches the root
--   directory.
findInParents :: MonadIO m => (Path Abs Dir -> m (Maybe a)) -> Path Abs Dir -> m (Maybe a)

module Paths_stack
version :: Version
getBinDir :: IO FilePath
getLibDir :: IO FilePath
getDynLibDir :: IO FilePath
getDataDir :: IO FilePath
getLibexecDir :: IO FilePath
getDataFileName :: FilePath -> IO FilePath
getSysconfDir :: IO FilePath

module Stack.Prelude

-- | Path version
withSystemTempDir :: MonadUnliftIO m => String -> (Path Abs Dir -> m a) -> m a

-- | Like <a>withSystemTempDir</a>, but the temporary directory is not
--   deleted.
withKeepSystemTempDir :: MonadUnliftIO m => String -> (Path Abs Dir -> m a) -> m a

-- | Consume the stdout and stderr of a process feeding strict
--   <a>ByteString</a>s to the consumers.
--   
--   Throws a <tt>ReadProcessException</tt> if unsuccessful in launching,
--   or <tt>ExitCodeException</tt> if the process itself fails.
sinkProcessStderrStdout :: forall e o env. (HasProcessContext env, HasLogFunc env, HasCallStack) => String -> [String] -> ConduitM ByteString Void (RIO env) e -> ConduitM ByteString Void (RIO env) o -> RIO env (e, o)

-- | Consume the stdout of a process feeding strict <a>ByteString</a>s to a
--   consumer. If the process fails, spits out stdout and stderr as error
--   log level. Should not be used for long-running processes or ones with
--   lots of output; for that use <a>sinkProcessStderrStdout</a>.
--   
--   Throws a <tt>ReadProcessException</tt> if unsuccessful.
sinkProcessStdout :: (HasProcessContext env, HasLogFunc env, HasCallStack) => String -> [String] -> ConduitM ByteString Void (RIO env) a -> RIO env a
logProcessStderrStdout :: (HasCallStack, HasProcessContext env, HasLogFunc env) => ProcessConfig stdin stdoutIgnored stderrIgnored -> RIO env ()

-- | Read from the process, ignoring any output.
--   
--   Throws a <tt>ReadProcessException</tt> exception if the process fails.
readProcessNull :: (HasProcessContext env, HasLogFunc env, HasCallStack) => String -> [String] -> RIO env ()

-- | Use the new <a>ProcessContext</a>, but retain the working directory
--   from the parent environment.
withProcessContext :: HasProcessContext env => ProcessContext -> RIO env a -> RIO env a

-- | Remove a trailing carriage return if present
stripCR :: Text -> Text

-- | Prompt the user by sending text to stdout, and taking a line of input
--   from stdin.
prompt :: MonadIO m => Text -> m Text

-- | Prompt the user by sending text to stdout, and collecting a line of
--   input from stdin. While taking input from stdin, input echoing is
--   disabled, to hide passwords.
--   
--   Based on code from cabal-install, Distribution.Client.Upload
promptPassword :: MonadIO m => Text -> m Text

-- | Prompt the user by sending text to stdout, and collecting a line of
--   input from stdin. If something other than "y" or "n" is entered, then
--   print a message indicating that "y" or "n" is expected, and ask again.
promptBool :: MonadIO m => Text -> m Bool

-- | Name of the <tt>stack</tt> program.
--   
--   NOTE: Should be defined in <a>Stack.Constants</a>, but not doing so
--   due to the GHC stage restrictions.
stackProgName :: String

-- | Like <tt>First Bool</tt>, but the default is <tt>True</tt>.
newtype FirstTrue
FirstTrue :: Maybe Bool -> FirstTrue
[getFirstTrue] :: FirstTrue -> Maybe Bool

-- | Get the <a>Bool</a>, defaulting to <a>True</a>
fromFirstTrue :: FirstTrue -> Bool

-- | Helper for filling in default values
defaultFirstTrue :: (a -> FirstTrue) -> Bool

-- | Like <tt>First Bool</tt>, but the default is <tt>False</tt>.
newtype FirstFalse
FirstFalse :: Maybe Bool -> FirstFalse
[getFirstFalse] :: FirstFalse -> Maybe Bool

-- | Get the <a>Bool</a>, defaulting to <a>False</a>
fromFirstFalse :: FirstFalse -> Bool

-- | Helper for filling in default values
defaultFirstFalse :: (a -> FirstFalse) -> Bool

-- | Write a <tt>Builder</tt> to a file and atomically rename.
writeBinaryFileAtomic :: MonadIO m => Path absrel File -> Builder -> m ()
(++) :: [a] -> [a] -> [a]
seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
filter :: (a -> Bool) -> [a] -> [a]
zip :: [a] -> [b] -> [(a, b)]
fst :: (a, b) -> a
snd :: (a, b) -> b
otherwise :: Bool
assert :: Bool -> a -> a
map :: (a -> b) -> [a] -> [b]
($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
fromIntegral :: (Integral a, Num b) => a -> b
realToFrac :: (Real a, Fractional b) => a -> b
guard :: Alternative f => Bool -> f ()
join :: Monad m => m (m a) -> m a
class Bounded a
minBound :: Bounded a => a
maxBound :: Bounded a => a
class Enum a
fromEnum :: Enum a => a -> Int
class Eq a
(==) :: Eq a => a -> a -> Bool
(/=) :: Eq a => a -> a -> Bool
class Fractional a => Floating a
pi :: Floating a => a
exp :: Floating a => a -> a
log :: Floating a => a -> a
sqrt :: Floating a => a -> a
(**) :: Floating a => a -> a -> a
logBase :: Floating a => a -> a -> a
sin :: Floating a => a -> a
cos :: Floating a => a -> a
tan :: Floating a => a -> a
asin :: Floating a => a -> a
acos :: Floating a => a -> a
atan :: Floating a => a -> a
sinh :: Floating a => a -> a
cosh :: Floating a => a -> a
tanh :: Floating a => a -> a
asinh :: Floating a => a -> a
acosh :: Floating a => a -> a
atanh :: Floating a => a -> a
class Num a => Fractional a
(/) :: Fractional a => a -> a -> a
recip :: Fractional a => a -> a
fromRational :: Fractional a => Rational -> a
class (Real a, Enum a) => Integral a
quot :: Integral a => a -> a -> a
rem :: Integral a => a -> a -> a
div :: Integral a => a -> a -> a
mod :: Integral a => a -> a -> a
quotRem :: Integral a => a -> a -> (a, a)
divMod :: Integral a => a -> a -> (a, a)
toInteger :: Integral a => a -> Integer
class Applicative m => Monad (m :: Type -> Type)
(>>=) :: Monad m => m a -> (a -> m b) -> m b
(>>) :: Monad m => m a -> m b -> m b
return :: Monad m => a -> m a
class 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 Functor (f :: Type -> Type)
fmap :: Functor f => (a -> b) -> f a -> f b
(<$) :: Functor f => a -> f b -> f a
class Num a
(+) :: Num a => a -> a -> a
(-) :: Num a => a -> a -> a
(*) :: Num a => a -> a -> a
negate :: Num a => a -> a
abs :: Num a => a -> a
signum :: Num a => a -> a
fromInteger :: Num a => Integer -> a
class Eq a => Ord a
compare :: Ord a => a -> a -> Ordering
(<) :: Ord a => a -> a -> Bool
(<=) :: Ord a => a -> a -> Bool
(>) :: Ord a => a -> a -> Bool
(>=) :: Ord a => a -> a -> Bool
max :: Ord a => a -> a -> a
min :: Ord a => a -> a -> a
class Read a
class (Num a, Ord a) => Real a
toRational :: Real a => a -> Rational
class (RealFrac a, Floating a) => RealFloat a
floatRadix :: RealFloat a => a -> Integer
floatDigits :: RealFloat a => a -> Int
floatRange :: RealFloat a => a -> (Int, Int)
decodeFloat :: RealFloat a => a -> (Integer, Int)
encodeFloat :: RealFloat a => Integer -> Int -> a
exponent :: RealFloat a => a -> Int
significand :: RealFloat a => a -> a
scaleFloat :: RealFloat a => Int -> a -> a
isNaN :: RealFloat a => a -> Bool
isInfinite :: RealFloat a => a -> Bool
isDenormalized :: RealFloat a => a -> Bool
isNegativeZero :: RealFloat a => a -> Bool
isIEEE :: RealFloat a => a -> Bool
atan2 :: RealFloat a => a -> a -> a
class (Real a, Fractional a) => RealFrac a
properFraction :: (RealFrac a, Integral b) => a -> (b, a)
truncate :: (RealFrac a, Integral b) => a -> b
round :: (RealFrac a, Integral b) => a -> b
ceiling :: (RealFrac a, Integral b) => a -> b
floor :: (RealFrac a, Integral b) => a -> b
class Show a
show :: Show a => a -> String
class Typeable (a :: k)
class Monad m => MonadFail (m :: Type -> Type)
fail :: MonadFail m => String -> m a
class IsString a
fromString :: IsString a => String -> a
class Functor f => Applicative (f :: Type -> Type)
pure :: Applicative f => a -> f a
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
(*>) :: Applicative f => f a -> f b -> f b
(<*) :: Applicative f => f a -> f b -> f a
class Foldable (t :: Type -> Type)
fold :: (Foldable t, Monoid m) => t m -> m
foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
toList :: Foldable t => t a -> [a]
null :: Foldable t => t a -> Bool
length :: Foldable t => t a -> Int
elem :: (Foldable t, Eq a) => a -> t a -> Bool
sum :: (Foldable t, Num a) => t a -> a
product :: (Foldable t, Num a) => t a -> a
class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
class Generic a
class Semigroup a
(<>) :: Semigroup a => a -> a -> a
class Semigroup a => Monoid a
mempty :: Monoid a => a
mappend :: Monoid a => a -> a -> a
mconcat :: Monoid a => [a] -> a
data Bool
False :: Bool
True :: Bool
data Char
data Double
data Float
data Int
data Int8
data Int16
data Int32
data Int64
data Integer
data Natural
data Maybe a
Nothing :: Maybe a
Just :: a -> Maybe a
data Ordering
LT :: Ordering
EQ :: Ordering
GT :: Ordering
type Rational = Ratio Integer
data IO a
data Word
data Word8
data Word16
data Word32
data Word64
data Either a b
Left :: a -> Either a b
Right :: b -> Either a b
data CallStack
class Bifunctor (p :: Type -> Type -> Type)
bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
first :: Bifunctor p => (a -> b) -> p a c -> p b c
second :: Bifunctor p => (b -> c) -> p a b -> p a c
forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
void :: Functor f => f a -> f ()
zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
unless :: Applicative f => Bool -> f () -> f ()
replicateM_ :: Applicative m => Int -> m a -> m ()
mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
forever :: Applicative f => f a -> f b
foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
(>=>) :: 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
(>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
optional :: Alternative f => f a -> f (Maybe a)
msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
newtype Const a (b :: k)
Const :: a -> Const a (b :: k)
[getConst] :: Const a (b :: k) -> a
class Applicative f => Alternative (f :: Type -> Type)
(<|>) :: Alternative f => f a -> f a -> f a
some :: Alternative f => f a -> f [a]
many :: Alternative f => f a -> f [a]
when :: Applicative f => Bool -> f () -> f ()
liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
liftM :: Monad m => (a1 -> r) -> m a1 -> m r
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
liftA :: Applicative f => (a -> b) -> f a -> f b
class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type)
mzero :: MonadPlus m => m a
mplus :: MonadPlus m => m a -> m a -> m a
data Text
type String = [Char]
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
takeWhile :: (a -> Bool) -> [a] -> [a]
take :: Int -> [a] -> [a]
span :: (a -> Bool) -> [a] -> ([a], [a])
reverse :: [a] -> [a]
replicate :: Int -> a -> [a]
lookup :: Eq a => a -> [(a, b)] -> Maybe b
dropWhile :: (a -> Bool) -> [a] -> [a]
drop :: Int -> [a] -> [a]
break :: (a -> Bool) -> [a] -> ([a], [a])
(=<<) :: Monad m => (a -> m b) -> m a -> m b
words :: String -> [String]
unwords :: [String] -> String
unlines :: [String] -> String
lines :: String -> [String]
(<$>) :: Functor f => (a -> b) -> f a -> f b
sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
or :: Foldable t => t Bool -> Bool
notElem :: (Foldable t, Eq a) => a -> t a -> Bool
mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
concat :: Foldable t => t [a] -> [a]
any :: Foldable t => (a -> Bool) -> t a -> Bool
and :: Foldable t => t Bool -> Bool
all :: Foldable t => (a -> Bool) -> t a -> Bool
data HashMap k v
readMaybe :: Read a => String -> Maybe a
data IOMode
ReadMode :: IOMode
WriteMode :: IOMode
AppendMode :: IOMode
ReadWriteMode :: IOMode
data BufferMode
NoBuffering :: BufferMode
LineBuffering :: BufferMode
BlockBuffering :: Maybe Int -> BufferMode
data SeekMode
AbsoluteSeek :: SeekMode
RelativeSeek :: SeekMode
SeekFromEnd :: SeekMode
stdout :: Handle
stdin :: Handle
stderr :: Handle
odd :: Integral a => a -> Bool
lcm :: Integral a => a -> a -> a
gcd :: Integral a => a -> a -> a
even :: Integral a => a -> Bool
(^^) :: (Fractional a, Integral b) => a -> b -> a
subtract :: Num a => a -> a -> a
asTypeOf :: a -> a -> a
($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
type FilePath = String
data Handle
data ExitCode
ExitSuccess :: ExitCode
ExitFailure :: Int -> ExitCode
data TVar a
writeTVar :: TVar a -> a -> STM ()
readTVar :: TVar a -> STM a
orElse :: STM a -> STM a -> STM a
newTVar :: a -> STM (TVar a)
undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
byteSwap64 :: Word64 -> Word64
byteSwap32 :: Word32 -> Word32
byteSwap16 :: Word16 -> Word16
data Void
absurd :: Void -> a
curry :: ((a, b) -> c) -> a -> b -> c
for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
comparing :: Ord a => (b -> a) -> b -> b -> Ordering
maybeToList :: Maybe a -> [a]
maybe :: b -> (a -> b) -> Maybe a -> b
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
listToMaybe :: [a] -> Maybe a
isNothing :: Maybe a -> Bool
isJust :: Maybe a -> Bool
fromMaybe :: a -> Maybe a -> a
catMaybes :: [Maybe a] -> [a]
data IORef a
(<&>) :: Functor f => f a -> (a -> b) -> f b
($>) :: Functor f => f a -> b -> f b
flip :: (a -> b -> c) -> b -> a -> c
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
(&) :: a -> (a -> b) -> b
newtype Endo a
Endo :: (a -> a) -> Endo a
[appEndo] :: Endo a -> a -> a
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()
for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
asum :: (Foldable t, Alternative f) => t (f a) -> f a
(^) :: (Num a, Integral b) => a -> b -> a
rights :: [Either a b] -> [b]
partitionEithers :: [Either a b] -> ([a], [b])
lefts :: [Either a b] -> [a]
isRight :: Either a b -> Bool
isLeft :: Either a b -> Bool
fromRight :: b -> Either a b -> b
fromLeft :: a -> Either a b -> a
newtype Any
Any :: Bool -> Any
[getAny] :: Any -> Bool
data Proxy (t :: k)
Proxy :: Proxy (t :: k)
class Storable a
newtype Identity a
Identity :: a -> Identity a
[runIdentity] :: Identity a -> a
bool :: a -> a -> Bool -> a
not :: Bool -> Bool
(||) :: Bool -> Bool -> Bool
(&&) :: Bool -> Bool -> Bool
error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
runST :: (forall s. () => ST s a) -> a
newtype Sum a
Sum :: a -> Sum a
[getSum] :: Sum a -> a
data ST s a
newtype Down a
Down :: a -> Down a
[getDown] :: Down a -> a
fix :: (a -> a) -> a
class Monad m => MonadIO (m :: Type -> Type)
liftIO :: MonadIO m => IO a -> m a
data SomeAsyncException
SomeAsyncException :: e -> SomeAsyncException
data IOException
class (Typeable e, Show e) => Exception e
toException :: Exception e => e -> SomeException
fromException :: Exception e => SomeException -> Maybe e
displayException :: Exception e => e -> String
asyncExceptionToException :: Exception e => e -> SomeException
asyncExceptionFromException :: Exception e => SomeException -> Maybe e
data STM a
data SomeException
SomeException :: e -> SomeException
data MVar a
data ThreadId
data QSemN
data QSem
data Chan a
either :: (a -> c) -> (b -> c) -> Either a b -> c
class Category (cat :: k -> k -> Type)
uncurry :: (a -> b -> c) -> (a, b) -> c
const :: a -> b -> a
class Category a => Arrow (a :: Type -> Type -> Type)
(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c')
(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
data Set a
data Map k a
data ByteString

-- | Use a snapshot cache, which caches which modules are in which packages
--   in a given snapshot. This is mostly intended for usage by Stack.
withSnapshotCache :: (HasPantryConfig env, HasLogFunc env) => SnapshotCacheHash -> RIO env (Map PackageName (Set ModuleName)) -> ((ModuleName -> RIO env [PackageName]) -> RIO env a) -> RIO env a

-- | Partition a map of global packages with its versions into a Set of
--   replaced packages and its dependencies and a map of remaining
--   (untouched) packages.
partitionReplacedDependencies :: Ord id => Map PackageName a -> (a -> PackageName) -> (a -> id) -> (a -> [id]) -> Set PackageName -> (Map PackageName [PackageName], Map PackageName a)

-- | Load the global hints from Github.
loadGlobalHints :: (HasTerm env, HasPantryConfig env) => WantedCompiler -> RIO env (Maybe (Map PackageName Version))

-- | Like <a>runPantryApp</a>, but uses an empty pantry directory instead
--   of sharing with Stack. Useful for testing.
runPantryAppClean :: MonadIO m => RIO PantryApp a -> m a

-- | Run some code against pantry using basic sane settings.
--   
--   For testing, see <a>runPantryAppClean</a>.
runPantryAppWith :: MonadIO m => Int -> CasaRepoPrefix -> Int -> RIO PantryApp a -> m a

-- | Run some code against pantry using basic sane settings.
--   
--   For testing, see <a>runPantryAppClean</a>.
runPantryApp :: MonadIO m => RIO PantryApp a -> m a

-- | Lens to view or modify the <a>HpackExecutable</a> of a
--   <a>PantryConfig</a>
hpackExecutableL :: Lens' PantryConfig HpackExecutable

-- | Get the <a>TreeKey</a> of the package at the given location.
getPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env TreeKey

-- | Get the <a>TreeKey</a> of the package at the given location.
getRawPackageLocationTreeKey :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env TreeKey

-- | Get the <a>PackageIdentifier</a> of the package at the given location.
getRawPackageLocationIdent :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageIdentifier

-- | Get version of the package at the given location.
packageLocationVersion :: PackageLocationImmutable -> Version

-- | Get the <a>PackageIdentifier</a> of the package at the given location.
packageLocationIdent :: PackageLocationImmutable -> PackageIdentifier

-- | Get the <a>PackageName</a> of the package at the given location.
getPackageLocationName :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env PackageName

-- | Parse a <a>SnapshotLayer</a> value from a <a>SnapshotLocation</a>.
--   
--   Returns a <a>Left</a> value if provided an <a>SLCompiler</a>
--   constructor. Otherwise, returns a <a>Right</a> value providing both
--   the <a>Snapshot</a> and a hash of the input configuration file.
loadSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => SnapshotLocation -> RIO env (Either WantedCompiler RawSnapshotLayer)

-- | Parse a <a>SnapshotLayer</a> value from a <a>SnapshotLocation</a>.
--   
--   Returns a <a>Left</a> value if provided an <a>SLCompiler</a>
--   constructor. Otherwise, returns a <a>Right</a> value providing both
--   the <a>Snapshot</a> and a hash of the input configuration file.
loadRawSnapshotLayer :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env (Either WantedCompiler (RawSnapshotLayer, CompletedSL))

-- | Add more packages to a snapshot
--   
--   Note that any settings on a parent flag which is being replaced will
--   be ignored. For example, if package <tt>foo</tt> is in the parent and
--   has flag <tt>bar</tt> set, and <tt>foo</tt> also appears in new
--   packages, then <tt>bar</tt> will no longer be set.
--   
--   Returns any of the <a>AddPackagesConfig</a> values not used.
addPackagesToSnapshot :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Utf8Builder -> [RawPackageLocationImmutable] -> AddPackagesConfig -> Map PackageName RawSnapshotPackage -> RIO env (Map PackageName RawSnapshotPackage, AddPackagesConfig)

-- | Parse a <a>Snapshot</a> (all layers) from a <a>RawSnapshotLocation</a>
--   completing any incomplete package locations
loadAndCompleteSnapshotRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawSnapshotLocation -> Map RawSnapshotLocation SnapshotLocation -> Map RawPackageLocationImmutable PackageLocationImmutable -> RIO env (Snapshot, [CompletedSL], [CompletedPLI])

-- | Parse a <a>Snapshot</a> (all layers) from a <a>SnapshotLocation</a>
--   noting any incomplete package locations
loadAndCompleteSnapshot :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => SnapshotLocation -> Map RawSnapshotLocation SnapshotLocation -> Map RawPackageLocationImmutable PackageLocationImmutable -> RIO env (Snapshot, [CompletedSL], [CompletedPLI])

-- | Add in hashes to make a <a>SnapshotLocation</a> reproducible.
completeSnapshotLocation :: (HasPantryConfig env, HasLogFunc env) => RawSnapshotLocation -> RIO env SnapshotLocation

-- | Fill in optional fields in a <a>PackageLocationImmutable</a> for more
--   reproducible builds.
completePackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env CompletePackageLocation

-- | Maybe load the package from Casa.
tryLoadPackageRawViaCasa :: (HasLogFunc env, HasPantryConfig env, HasProcessContext env) => RawPackageLocationImmutable -> TreeKey -> RIO env (Maybe Package)

-- | Load a <a>Package</a> from a <a>RawPackageLocationImmutable</a>.
--   
--   Load the package either from the local DB, Casa, or as a last resort,
--   the third party (hackage, archive or repo).
loadPackageRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env Package

-- | Load a <a>Package</a> from a <a>PackageLocationImmutable</a>.
loadPackage :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env Package

-- | Get the <a>Version</a> from a <a>GenericPackageDescription</a>.
gpdVersion :: GenericPackageDescription -> Version

-- | Get the <a>PackageName</a> from a <a>GenericPackageDescription</a>.
gpdPackageName :: GenericPackageDescription -> PackageName

-- | Get the <a>PackageIdentifier</a> from a
--   <a>GenericPackageDescription</a>.
gpdPackageIdentifier :: GenericPackageDescription -> PackageIdentifier

-- | Get the filename for the cabal file in the given directory.
--   
--   If no .cabal file is present, or more than one is present, an
--   exception is thrown via <a>throwM</a>.
--   
--   If the directory contains a file named package.yaml, hpack is used to
--   generate a .cabal file from it.
findOrGenerateCabalFile :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Path Abs Dir -> RIO env (PackageName, Path Abs File)

-- | Parse the cabal file for the package inside the given directory.
--   Performs various sanity checks, such as the file name being correct
--   and having only a single cabal file.
loadCabalFilePath :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Path Abs Dir -> RIO env (PrintWarnings -> IO GenericPackageDescription, PackageName, Path Abs File)

-- | Same as <a>loadCabalFileImmutable</a>, but takes a
--   <a>PackageLocation</a>. Never prints warnings, see
--   <a>loadCabalFilePath</a> for that.
loadCabalFile :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocation -> RIO env GenericPackageDescription

-- | Same as <a>loadCabalFileRawImmutable</a>, but takes a
--   <a>RawPackageLocation</a>. Never prints warnings, see
--   <a>loadCabalFilePath</a> for that.
loadCabalFileRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocation -> RIO env GenericPackageDescription

-- | Load the cabal file for the given <a>RawPackageLocationImmutable</a>.
--   
--   This function ignores all warnings.
--   
--   Note that, for now, this will not allow support for hpack files in
--   these package locations. Instead, all
--   <tt>PackageLocationImmutable</tt>s will require a .cabal file. This
--   may be relaxed in the future.
loadCabalFileRawImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RawPackageLocationImmutable -> RIO env GenericPackageDescription

-- | Load the cabal file for the given <a>PackageLocationImmutable</a>.
--   
--   This function ignores all warnings.
loadCabalFileImmutable :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PackageLocationImmutable -> RIO env GenericPackageDescription

-- | Unpack a given <a>PackageLocationImmutable</a> into the given
--   directory. Does not generate any extra subdirectories.
unpackPackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Path Abs Dir -> PackageLocationImmutable -> RIO env ()

-- | Unpack a given <a>RawPackageLocationImmutable</a> into the given
--   directory. Does not generate any extra subdirectories.
unpackPackageLocationRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Path Abs Dir -> RawPackageLocationImmutable -> RIO env ()

-- | Download all of the packages provided into the local cache without
--   performing any unpacking. Can be useful for build tools wanting to
--   prefetch or provide an offline mode.
fetchPackages :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env, Foldable f) => f PackageLocationImmutable -> RIO env ()

-- | Returns the latest revision of the given package version available
--   from Hackage.
getLatestHackageRevision :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RequireHackageIndex -> PackageName -> Version -> RIO env (Maybe (Revision, BlobKey, TreeKey))

-- | Returns location of the latest version of the given package available
--   from Hackage.
getLatestHackageLocation :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => RequireHackageIndex -> PackageName -> UsePreferredVersions -> RIO env (Maybe PackageLocationImmutable)

-- | Returns the latest version of the given package available from
--   Hackage.
getLatestHackageVersion :: (HasPantryConfig env, HasLogFunc env) => RequireHackageIndex -> PackageName -> UsePreferredVersions -> RIO env (Maybe PackageIdentifierRevision)

-- | Default <a>HackageSecurityConfig</a> value using the official Hackage
--   server.
defaultHackageSecurityConfig :: HackageSecurityConfig

-- | Default max keys to pull per request.
defaultCasaMaxPerRequest :: Int

-- | Default pull URL for Casa.
defaultCasaRepoPrefix :: CasaRepoPrefix

-- | Create a new <a>PantryConfig</a> with the given settings.
--   
--   For something easier to use in simple cases, see <a>runPantryApp</a>.
withPantryConfig :: HasLogFunc env => Path Abs Dir -> HackageSecurityConfig -> HpackExecutable -> Int -> CasaRepoPrefix -> Int -> (SnapName -> RawSnapshotLocation) -> (PantryConfig -> RIO env a) -> RIO env a

-- | Complete package location, plus whether the package has a cabal file.
--   This is relevant to reproducibility, see
--   <a>https://tech.fpcomplete.com/blog/storing-generated-cabal-files</a>
data CompletePackageLocation
CompletePackageLocation :: !PackageLocationImmutable -> !Bool -> CompletePackageLocation
[cplComplete] :: CompletePackageLocation -> !PackageLocationImmutable
[cplHasCabalFile] :: CompletePackageLocation -> !Bool

-- | A completed package location, including the original raw and completed
--   information.
data CompletedPLI
CompletedPLI :: !RawPackageLocationImmutable -> !PackageLocationImmutable -> CompletedPLI

-- | A completed snapshot location, including the original raw and
--   completed information.
data CompletedSL
CompletedSL :: !RawSnapshotLocation -> !SnapshotLocation -> CompletedSL

-- | Package settings to be passed to <a>addPackagesToSnapshot</a>.
data AddPackagesConfig
AddPackagesConfig :: !Set PackageName -> !Map PackageName (Map FlagName Bool) -> !Map PackageName Bool -> !Map PackageName [Text] -> AddPackagesConfig
[apcDrop] :: AddPackagesConfig -> !Set PackageName
[apcFlags] :: AddPackagesConfig -> !Map PackageName (Map FlagName Bool)
[apcHiddens] :: AddPackagesConfig -> !Map PackageName Bool
[apcGhcOptions] :: AddPackagesConfig -> !Map PackageName [Text]

-- | Convenient data type that allows you to work with pantry more easily
--   than using <a>withPantryConfig</a> directly. Uses basically sane
--   settings, like sharing a pantry directory with Stack.
--   
--   You can use <a>runPantryApp</a> to use this.
data PantryApp

-- | Clone the repository and execute the action with the working directory
--   set to the repository root.
withRepo :: (HasLogFunc env, HasProcessContext env) => SimpleRepo -> RIO env a -> RIO env a

-- | Fetch the given repositories at once and populate the pantry database.
fetchRepos :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, PackageMetadata)] -> RIO env ()

-- | Like <a>fetchRepos</a>, except with <a>RawPackageMetadata</a> instead
--   of <a>PackageMetadata</a>.
fetchReposRaw :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => [(Repo, RawPackageMetadata)] -> RIO env ()

-- | Returns the versions of the package available on Hackage.
getHackagePackageVersions :: (HasPantryConfig env, HasLogFunc env) => RequireHackageIndex -> UsePreferredVersions -> PackageName -> RIO env (Map Version (Map Revision BlobKey))

-- | Try to come up with typo corrections for given package identifier
--   using Hackage package names. This can provide more user-friendly
--   information in error messages.
getHackageTypoCorrections :: (HasPantryConfig env, HasLogFunc env) => PackageName -> RIO env [PackageName]

-- | Download the most recent 01-index.tar file from Hackage and update the
--   database tables.
--   
--   This function will only perform an update once per <a>PantryConfig</a>
--   for user sanity. See the return value to find out if it happened.
updateHackageIndex :: (HasPantryConfig env, HasLogFunc env) => Maybe Utf8Builder -> RIO env DidUpdateOccur

-- | Where does pantry download its 01-index.tar file from Hackage?
hackageIndexTarballL :: HasPantryConfig env => SimpleGetter env (Path Abs File)

-- | Did an update occur when running <a>updateHackageIndex</a>?
data DidUpdateOccur
UpdateOccurred :: DidUpdateOccur
NoUpdateOccurred :: DidUpdateOccur

-- | Should we pay attention to Hackage's preferred versions?
data UsePreferredVersions
UsePreferredVersions :: UsePreferredVersions
IgnorePreferredVersions :: UsePreferredVersions

-- | Require that the Hackage index is populated.
data RequireHackageIndex

-- | If there is nothing in the Hackage index, then perform an update
YesRequireHackageIndex :: RequireHackageIndex

-- | Do not perform an update
NoRequireHackageIndex :: RequireHackageIndex

-- | Warn if the package uses <a>PCHpack</a>.
warnMissingCabalFile :: HasLogFunc env => RawPackageLocationImmutable -> RIO env ()

-- | Convert snapshot layer into its "raw" equivalent.
toRawSnapshotLayer :: SnapshotLayer -> RawSnapshotLayer

-- | Convert snapshot location to its "raw" equivalent.
toRawSL :: SnapshotLocation -> RawSnapshotLocation

-- | Parse the short representation of a <a>SnapName</a>.
parseSnapName :: MonadThrow m => Text -> m SnapName

-- | Default location of snapshot synonyms , i.e. commercialhaskell's
--   GitHub repository.
defaultSnapshotLocation :: SnapName -> RawSnapshotLocation

-- | Parse a <a>Text</a> into an <a>Unresolved</a>
--   <a>RawSnapshotLocation</a>.
parseRawSnapshotLocation :: Text -> Unresolved RawSnapshotLocation

-- | Parse a <a>Text</a> into a <a>WantedCompiler</a> value.
parseWantedCompiler :: Text -> Either PantryException WantedCompiler

-- | Unwrap the <a>CabalString</a> from the keys in a <a>Map</a> to use a
--   <a>FromJSON</a> instance.
unCabalStringMap :: Map (CabalString a) v -> Map a v

-- | Wrap the keys in a <a>Map</a> with a <a>CabalString</a> to get a
--   <a>ToJSON</a> instance.
toCabalStringMap :: Map a v -> Map (CabalString a) v

-- | Render a module name as a <a>String</a>.
moduleNameString :: ModuleName -> String

-- | Render a flag name as a <a>String</a>.
flagNameString :: FlagName -> String

-- | Render a version as a <a>String</a>.
versionString :: Version -> String

-- | Render a package identifier as a <a>String</a>.
packageIdentifierString :: PackageIdentifier -> String

-- | Render a package name as a <a>String</a>.
packageNameString :: PackageName -> String

-- | Parse a flag name from a <a>String</a>.
parseFlagName :: String -> Maybe FlagName

-- | Parse a package version from a <a>String</a> throwing on failure
parseVersionThrowing :: MonadThrow m => String -> m Version

-- | Parse a version from a <a>String</a>.
parseVersion :: String -> Maybe Version

-- | Parse a package name from a <a>String</a> throwing on failure
parsePackageNameThrowing :: MonadThrow m => String -> m PackageName

-- | Parse a package name from a <a>String</a>.
parsePackageName :: String -> Maybe PackageName

-- | This is almost a copy of Cabal's parser for package identifiers, the
--   main difference is in the fact that Stack requires version to be
--   present while Cabal uses "null version" as a default value
parsePackageIdentifier :: String -> Maybe PackageIdentifier

-- | Parse a <a>PackageIdentifierRevision</a>
parsePackageIdentifierRevision :: Text -> Either PantryException PackageIdentifierRevision

-- | Parse a hackage text.
parseHackageText :: Text -> Either PantryException (PackageIdentifier, BlobKey)

-- | Convert <a>PackageLocation</a> to its "raw" equivalent
toRawPL :: PackageLocation -> RawPackageLocation

-- | Resolve all of the file paths in an <a>Unresolved</a> relative to the
--   given directory.
resolvePaths :: MonadIO m => Maybe (Path Abs Dir) -> Unresolved a -> m a

-- | Get the location of a snapshot synonym from the <a>PantryConfig</a>.
snapshotLocation :: HasPantryConfig env => SnapName -> RIO env RawSnapshotLocation

-- | The revision number of a package from Hackage, counting upwards from 0
--   (the original cabal file).
--   
--   See caveats on <a>CFIRevision</a>.
newtype Revision
Revision :: Word -> Revision

-- | Configuration value used by the entire pantry package. Create one
--   using <tt>withPantryConfig</tt>. See also <tt>PantryApp</tt> for a
--   convenience approach to using pantry.
data PantryConfig

-- | Should we print warnings when loading a cabal file?
data PrintWarnings
YesPrintWarnings :: PrintWarnings
NoPrintWarnings :: PrintWarnings

-- | Wraps a value which potentially contains relative paths. Needs to be
--   provided with a base directory to resolve these paths.
--   
--   Unwrap this using <a>resolvePaths</a>.
data Unresolved a

-- | A combination of the relative path provided in a config file, together
--   with the resolved absolute path.
data ResolvedPath t
ResolvedPath :: !RelFilePath -> !Path Abs t -> ResolvedPath t

-- | Original value parsed from a config file.
[resolvedRelative] :: ResolvedPath t -> !RelFilePath

-- | Absolute path resolved against base directory loaded from.
[resolvedAbsolute] :: ResolvedPath t -> !Path Abs t

-- | Location to load a package from. Can either be immutable (see
--   <a>PackageLocationImmutable</a>) or a local directory which is
--   expected to change over time. Raw version doesn't include exact
--   package version (e.g. could refer to the latest revision on Hackage)
data RawPackageLocation
RPLImmutable :: !RawPackageLocationImmutable -> RawPackageLocation
RPLMutable :: !ResolvedPath Dir -> RawPackageLocation

-- | Location to load a package from. Can either be immutable (see
--   <a>PackageLocationImmutable</a>) or a local directory which is
--   expected to change over time.
data PackageLocation
PLImmutable :: !PackageLocationImmutable -> PackageLocation
PLMutable :: !ResolvedPath Dir -> PackageLocation

-- | Location for remote packages or archives assumed to be immutable. as
--   user specifies it i.e. not an exact location
data RawPackageLocationImmutable
RPLIHackage :: !PackageIdentifierRevision -> !Maybe TreeKey -> RawPackageLocationImmutable
RPLIArchive :: !RawArchive -> !RawPackageMetadata -> RawPackageLocationImmutable
RPLIRepo :: !Repo -> !RawPackageMetadata -> RawPackageLocationImmutable

-- | Location for remote packages or archives assumed to be immutable.
data PackageLocationImmutable
PLIHackage :: !PackageIdentifier -> !BlobKey -> !TreeKey -> PackageLocationImmutable
PLIArchive :: !Archive -> !PackageMetadata -> PackageLocationImmutable
PLIRepo :: !Repo -> !PackageMetadata -> PackageLocationImmutable

-- | A raw package archive, specified by a user, could have no hash and
--   file size information.
data RawArchive
RawArchive :: !ArchiveLocation -> !Maybe SHA256 -> !Maybe FileSize -> !Text -> RawArchive

-- | Location of the archive
[raLocation] :: RawArchive -> !ArchiveLocation

-- | Cryptographic hash of the archive file
[raHash] :: RawArchive -> !Maybe SHA256

-- | Size of the archive file
[raSize] :: RawArchive -> !Maybe FileSize

-- | Subdirectory within the archive to get the package from.
[raSubdir] :: RawArchive -> !Text

-- | A package archive, could be from a URL or a local file path. Local
--   file path archives are assumed to be unchanging over time, and so are
--   allowed in custom snapshots.
data Archive
Archive :: !ArchiveLocation -> !SHA256 -> !FileSize -> !Text -> Archive

-- | Location of the archive
[archiveLocation] :: Archive -> !ArchiveLocation

-- | Cryptographic hash of the archive file
[archiveHash] :: Archive -> !SHA256

-- | Size of the archive file
[archiveSize] :: Archive -> !FileSize

-- | Subdirectory within the archive to get the package from.
[archiveSubdir] :: Archive -> !Text

-- | The type of a source control repository.
data RepoType
RepoGit :: RepoType
RepoHg :: RepoType

-- | Information on packages stored in a source control repository.
data Repo
Repo :: !Text -> !Text -> !RepoType -> !Text -> Repo

-- | Location of the repo
[repoUrl] :: Repo -> !Text

-- | Commit to use from the repo. It's strongly recommended to use a hash
--   instead of a tag or branch name.
[repoCommit] :: Repo -> !Text

-- | The type of the repo
[repoType] :: Repo -> !RepoType

-- | Subdirectory within the archive to get the package from.
[repoSubdir] :: Repo -> !Text

-- | Repository without subdirectory information.
data SimpleRepo
SimpleRepo :: !Text -> !Text -> !RepoType -> SimpleRepo
[sRepoUrl] :: SimpleRepo -> !Text
[sRepoCommit] :: SimpleRepo -> !Text
[sRepoType] :: SimpleRepo -> !RepoType

-- | Configuration for Hackage Security to securely download package
--   metadata and contents from Hackage. For most purposes, you'll want to
--   use the default Hackage settings via
--   <tt>defaultHackageSecurityConfig</tt>.
--   
--   <i>NOTE</i> It's highly recommended to only use the official Hackage
--   server or a mirror. See
--   <a>https://github.com/commercialhaskell/stack/issues/4137</a>.
data HackageSecurityConfig
HackageSecurityConfig :: ![Text] -> !Int -> !Text -> !Bool -> HackageSecurityConfig
[hscKeyIds] :: HackageSecurityConfig -> ![Text]
[hscKeyThreshold] :: HackageSecurityConfig -> !Int
[hscDownloadPrefix] :: HackageSecurityConfig -> !Text
[hscIgnoreExpiry] :: HackageSecurityConfig -> !Bool

-- | An environment which contains a <a>PantryConfig</a>.
class HasPantryConfig env

-- | Lens to get or set the <a>PantryConfig</a>
pantryConfigL :: HasPantryConfig env => Lens' env PantryConfig

-- | File size in bytes
newtype FileSize
FileSize :: Word -> FileSize

-- | A key for looking up a blob, which combines the SHA256 hash of the
--   contents and the file size.
--   
--   The file size may seem redundant with the hash. However, it is
--   necessary for safely downloading blobs from an untrusted source. See
--   <a>https://www.fpcomplete.com/blog/2018/07/pantry-part-2-trees-keys</a>.
data BlobKey
BlobKey :: !SHA256 -> !FileSize -> BlobKey

-- | How to choose a cabal file for a package from Hackage. This is to work
--   with Hackage cabal file revisions, which makes
--   <tt>PackageIdentifier</tt> insufficient for specifying a package from
--   Hackage.
data CabalFileInfo

-- | Take the latest revision of the cabal file available. This isn't
--   reproducible at all, but the running assumption (not necessarily true)
--   is that cabal file revisions do not change semantics of the build.
CFILatest :: CabalFileInfo

-- | Identify by contents of the cabal file itself. Only reason for
--   <tt>Maybe</tt> on <tt>FileSize</tt> is for compatibility with input
--   that doesn't include the file size.
CFIHash :: !SHA256 -> !Maybe FileSize -> CabalFileInfo

-- | Identify by revision number, with 0 being the original and counting
--   upward. This relies on Hackage providing consistent versioning.
--   <tt>CFIHash</tt> should be preferred wherever possible for
--   reproducibility.
CFIRevision :: !Revision -> CabalFileInfo

-- | A full specification for a package from Hackage, including the package
--   name, version, and how to load up the correct cabal file revision.
data PackageIdentifierRevision
PackageIdentifierRevision :: !PackageName -> !Version -> !CabalFileInfo -> PackageIdentifierRevision

-- | Things that can go wrong in pantry. Note two things:
--   
--   <ul>
--   <li>Many other exception types may be thrown from underlying
--   libraries. Pantry does not attempt to wrap these underlying
--   exceptions.</li>
--   <li>We may add more constructors to this data type in minor version
--   bumps of pantry. This technically breaks the PVP. You should not be
--   writing pattern matches against this type that expect total
--   matching.</li>
--   </ul>
data PantryException
PackageIdentifierRevisionParseFail :: !Text -> PantryException
InvalidCabalFile :: !Either RawPackageLocationImmutable (Path Abs File) -> !Maybe Version -> ![PError] -> ![PWarning] -> PantryException
TreeWithoutCabalFile :: !RawPackageLocationImmutable -> PantryException
TreeWithMultipleCabalFiles :: !RawPackageLocationImmutable -> ![SafeFilePath] -> PantryException
MismatchedCabalName :: !Path Abs File -> !PackageName -> PantryException
NoCabalFileFound :: !Path Abs Dir -> PantryException
MultipleCabalFilesFound :: !Path Abs Dir -> ![Path Abs File] -> PantryException
InvalidWantedCompiler :: !Text -> PantryException
InvalidSnapshotLocation :: !Path Abs Dir -> !Text -> PantryException
InvalidOverrideCompiler :: !WantedCompiler -> !WantedCompiler -> PantryException
InvalidFilePathSnapshot :: !Text -> PantryException
InvalidSnapshot :: !RawSnapshotLocation -> !SomeException -> PantryException
MismatchedPackageMetadata :: !RawPackageLocationImmutable -> !RawPackageMetadata -> !Maybe TreeKey -> !PackageIdentifier -> PantryException
Non200ResponseStatus :: !Status -> PantryException
InvalidBlobKey :: !Mismatch BlobKey -> PantryException
Couldn'tParseSnapshot :: !RawSnapshotLocation -> !String -> PantryException
WrongCabalFileName :: !RawPackageLocationImmutable -> !SafeFilePath -> !PackageName -> PantryException
DownloadInvalidSHA256 :: !Text -> !Mismatch SHA256 -> PantryException
DownloadInvalidSize :: !Text -> !Mismatch FileSize -> PantryException

-- | Different from <a>DownloadInvalidSize</a> since <a>mismatchActual</a>
--   is a lower bound on the size from the server.
DownloadTooLarge :: !Text -> !Mismatch FileSize -> PantryException
LocalInvalidSHA256 :: !Path Abs File -> !Mismatch SHA256 -> PantryException
LocalInvalidSize :: !Path Abs File -> !Mismatch FileSize -> PantryException
UnknownArchiveType :: !ArchiveLocation -> PantryException
InvalidTarFileType :: !ArchiveLocation -> !FilePath -> !FileType -> PantryException
UnsupportedTarball :: !ArchiveLocation -> !Text -> PantryException
NoHackageCryptographicHash :: !PackageIdentifier -> PantryException
FailedToCloneRepo :: !SimpleRepo -> PantryException
TreeReferencesMissingBlob :: !RawPackageLocationImmutable -> !SafeFilePath -> !BlobKey -> PantryException
CompletePackageMetadataMismatch :: !RawPackageLocationImmutable -> !PackageMetadata -> PantryException
CRC32Mismatch :: !ArchiveLocation -> !FilePath -> !Mismatch Word32 -> PantryException
UnknownHackagePackage :: !PackageIdentifierRevision -> !FuzzyResults -> PantryException
CannotCompleteRepoNonSHA1 :: !Repo -> PantryException
MutablePackageLocationFromUrl :: !Text -> PantryException
MismatchedCabalFileForHackage :: !PackageIdentifierRevision -> !Mismatch PackageIdentifier -> PantryException
PackageNameParseFail :: !Text -> PantryException
PackageVersionParseFail :: !Text -> PantryException
InvalidCabalFilePath :: !Path Abs File -> PantryException
DuplicatePackageNames :: !Utf8Builder -> ![(PackageName, [RawPackageLocationImmutable])] -> PantryException
MigrationFailure :: !Text -> !Path Abs File -> !SomeException -> PantryException
InvalidTreeFromCasa :: !BlobKey -> !ByteString -> PantryException
ParseSnapNameException :: !Text -> PantryException

-- | The hash of the binary representation of a <a>Tree</a>.
newtype TreeKey
TreeKey :: BlobKey -> TreeKey

-- | Metadata provided by a config file for archives and repos. This
--   information can be used for optimized lookups of information like
--   package identifiers, or for validating that the user configuration has
--   the expected information.
data RawPackageMetadata
RawPackageMetadata :: !Maybe PackageName -> !Maybe Version -> !Maybe TreeKey -> RawPackageMetadata

-- | Package name in the cabal file
[rpmName] :: RawPackageMetadata -> !Maybe PackageName

-- | Package version in the cabal file
[rpmVersion] :: RawPackageMetadata -> !Maybe Version

-- | Tree key of the loaded up package
[rpmTreeKey] :: RawPackageMetadata -> !Maybe TreeKey

-- | Exact metadata specifying concrete package
data PackageMetadata
PackageMetadata :: !PackageIdentifier -> !TreeKey -> PackageMetadata

-- | Package identifier in the cabal file
[pmIdent] :: PackageMetadata -> !PackageIdentifier

-- | Tree key of the loaded up package
[pmTreeKey] :: PackageMetadata -> !TreeKey

-- | File path relative to the configuration file it was parsed from
newtype RelFilePath
RelFilePath :: Text -> RelFilePath

-- | Location that an archive is stored at
data ArchiveLocation

-- | Archive stored at an HTTP(S) URL
ALUrl :: !Text -> ArchiveLocation

-- | Archive stored at a local file path
ALFilePath :: !ResolvedPath File -> ArchiveLocation

-- | Newtype wrapper for easier JSON integration with Cabal types.
newtype CabalString a
CabalString :: a -> CabalString a
[unCabalString] :: CabalString a -> a

-- | What to use for running hpack
data HpackExecutable

-- | Compiled in library
HpackBundled :: HpackExecutable

-- | Executable at the provided path
HpackCommand :: !FilePath -> HpackExecutable

-- | Which compiler a snapshot wants to use. The build tool may elect to do
--   some fuzzy matching of versions (e.g., allowing different patch
--   versions).
data WantedCompiler
WCGhc :: !Version -> WantedCompiler
WCGhcGit :: !Text -> !Text -> WantedCompiler

-- | GHCJS version followed by GHC version
WCGhcjs :: !Version -> !Version -> WantedCompiler

-- | A snapshot synonym. It is expanded according to the field
--   <a>snapshotLocation</a> of a <a>PantryConfig</a>.
--   
--   @ since 0.5.0.0
data SnapName

-- | LTS Haskell snapshot, displayed as <tt>"lts-maj.min"</tt>.
LTS :: !Int -> !Int -> SnapName
Nightly :: !Day -> SnapName

-- | Where to load a snapshot from in raw form (RSUrl could have a missing
--   BlobKey)
data RawSnapshotLocation

-- | Don't use an actual snapshot, just a version of the compiler with its
--   shipped packages.
RSLCompiler :: !WantedCompiler -> RawSnapshotLocation

-- | Download the snapshot from the given URL. The optional <a>BlobKey</a>
--   is used for reproducibility.
RSLUrl :: !Text -> !Maybe BlobKey -> RawSnapshotLocation

-- | Snapshot at a local file path.
RSLFilePath :: !ResolvedPath File -> RawSnapshotLocation

-- | Snapshot synonym (LTS/Nightly).
RSLSynonym :: !SnapName -> RawSnapshotLocation

-- | Where to load a snapshot from.
data SnapshotLocation

-- | Don't use an actual snapshot, just a version of the compiler with its
--   shipped packages.
SLCompiler :: !WantedCompiler -> SnapshotLocation

-- | Download the snapshot from the given URL. The optional <a>BlobKey</a>
--   is used for reproducibility.
SLUrl :: !Text -> !BlobKey -> SnapshotLocation

-- | Snapshot at a local file path.
SLFilePath :: !ResolvedPath File -> SnapshotLocation

-- | A flattened representation of all the layers in a snapshot.
data RawSnapshot
RawSnapshot :: !WantedCompiler -> !Map PackageName RawSnapshotPackage -> !Set PackageName -> RawSnapshot

-- | The compiler wanted for this snapshot.
[rsCompiler] :: RawSnapshot -> !WantedCompiler

-- | Packages available in this snapshot for installation. This will be
--   applied on top of any globally available packages.
[rsPackages] :: RawSnapshot -> !Map PackageName RawSnapshotPackage

-- | Global packages that should be dropped/ignored.
[rsDrop] :: RawSnapshot -> !Set PackageName

-- | A flattened representation of all the layers in a snapshot.
data Snapshot
Snapshot :: !WantedCompiler -> !Map PackageName SnapshotPackage -> !Set PackageName -> Snapshot

-- | The compiler wanted for this snapshot.
[snapshotCompiler] :: Snapshot -> !WantedCompiler

-- | Packages available in this snapshot for installation. This will be
--   applied on top of any globally available packages.
[snapshotPackages] :: Snapshot -> !Map PackageName SnapshotPackage

-- | Global packages that should be dropped/ignored.
[snapshotDrop] :: Snapshot -> !Set PackageName

-- | Settings for a package found in a snapshot.
data RawSnapshotPackage
RawSnapshotPackage :: !RawPackageLocationImmutable -> !Map FlagName Bool -> !Bool -> ![Text] -> RawSnapshotPackage

-- | Where to get the package from
[rspLocation] :: RawSnapshotPackage -> !RawPackageLocationImmutable

-- | Same as <a>slFlags</a>
[rspFlags] :: RawSnapshotPackage -> !Map FlagName Bool

-- | Same as <a>slHidden</a>
[rspHidden] :: RawSnapshotPackage -> !Bool

-- | Same as <a>slGhcOptions</a>
[rspGhcOptions] :: RawSnapshotPackage -> ![Text]

-- | Settings for a package found in a snapshot.
data SnapshotPackage
SnapshotPackage :: !PackageLocationImmutable -> !Map FlagName Bool -> !Bool -> ![Text] -> SnapshotPackage

-- | Where to get the package from
[spLocation] :: SnapshotPackage -> !PackageLocationImmutable

-- | Same as <a>slFlags</a>
[spFlags] :: SnapshotPackage -> !Map FlagName Bool

-- | Same as <a>slHidden</a>
[spHidden] :: SnapshotPackage -> !Bool

-- | Same as <a>slGhcOptions</a>
[spGhcOptions] :: SnapshotPackage -> ![Text]

-- | A single layer of a snapshot, i.e. a specific YAML configuration file.
data RawSnapshotLayer
RawSnapshotLayer :: !RawSnapshotLocation -> !Maybe WantedCompiler -> ![RawPackageLocationImmutable] -> !Set PackageName -> !Map PackageName (Map FlagName Bool) -> !Map PackageName Bool -> !Map PackageName [Text] -> !Maybe UTCTime -> RawSnapshotLayer

-- | The sl to extend from. This is either a specific compiler, or a
--   <tt>SnapshotLocation</tt> which gives us more information (like
--   packages). Ultimately, we'll end up with a <tt>CompilerVersion</tt>.
[rslParent] :: RawSnapshotLayer -> !RawSnapshotLocation

-- | Override the compiler specified in <a>slParent</a>. Must be
--   <a>Nothing</a> if using <a>SLCompiler</a>.
[rslCompiler] :: RawSnapshotLayer -> !Maybe WantedCompiler

-- | Where to grab all of the packages from.
[rslLocations] :: RawSnapshotLayer -> ![RawPackageLocationImmutable]

-- | Packages present in the parent which should not be included here.
[rslDropPackages] :: RawSnapshotLayer -> !Set PackageName

-- | Flag values to override from the defaults
[rslFlags] :: RawSnapshotLayer -> !Map PackageName (Map FlagName Bool)

-- | Packages which should be hidden when registering. This will affect,
--   for example, the import parser in the script command. We use a
--   <a>Map</a> instead of just a <a>Set</a> to allow overriding the hidden
--   settings in a parent sl.
[rslHidden] :: RawSnapshotLayer -> !Map PackageName Bool

-- | GHC options per package
[rslGhcOptions] :: RawSnapshotLayer -> !Map PackageName [Text]

-- | See <a>slPublishTime</a>
[rslPublishTime] :: RawSnapshotLayer -> !Maybe UTCTime

-- | A single layer of a snapshot, i.e. a specific YAML configuration file.
data SnapshotLayer
SnapshotLayer :: !SnapshotLocation -> !Maybe WantedCompiler -> ![PackageLocationImmutable] -> !Set PackageName -> !Map PackageName (Map FlagName Bool) -> !Map PackageName Bool -> !Map PackageName [Text] -> !Maybe UTCTime -> SnapshotLayer

-- | The sl to extend from. This is either a specific compiler, or a
--   <tt>SnapshotLocation</tt> which gives us more information (like
--   packages). Ultimately, we'll end up with a <tt>CompilerVersion</tt>.
[slParent] :: SnapshotLayer -> !SnapshotLocation

-- | Override the compiler specified in <a>slParent</a>. Must be
--   <a>Nothing</a> if using <a>SLCompiler</a>.
[slCompiler] :: SnapshotLayer -> !Maybe WantedCompiler

-- | Where to grab all of the packages from.
[slLocations] :: SnapshotLayer -> ![PackageLocationImmutable]

-- | Packages present in the parent which should not be included here.
[slDropPackages] :: SnapshotLayer -> !Set PackageName

-- | Flag values to override from the defaults
[slFlags] :: SnapshotLayer -> !Map PackageName (Map FlagName Bool)

-- | Packages which should be hidden when registering. This will affect,
--   for example, the import parser in the script command. We use a
--   <a>Map</a> instead of just a <a>Set</a> to allow overriding the hidden
--   settings in a parent sl.
[slHidden] :: SnapshotLayer -> !Map PackageName Bool

-- | GHC options per package
[slGhcOptions] :: SnapshotLayer -> !Map PackageName [Text]

-- | Publication timestamp for this snapshot. This field is optional, and
--   is for informational purposes only.
[slPublishTime] :: SnapshotLayer -> !Maybe UTCTime

-- | An arbitrary hash for a snapshot, used for finding module names in a
--   snapshot. Mostly intended for Stack's usage.
newtype SnapshotCacheHash
SnapshotCacheHash :: SHA256 -> SnapshotCacheHash
[unSnapshotCacheHash] :: SnapshotCacheHash -> SHA256
data PackageIdentifier
PackageIdentifier :: PackageName -> Version -> PackageIdentifier
[pkgName] :: PackageIdentifier -> PackageName
[pkgVersion] :: PackageIdentifier -> Version
data FlagName
data Version
data PackageName

-- | A SHA256 hash, stored in a static size for more efficient memory
--   representation.
data SHA256
class MonadTrans (t :: Type -> Type -> Type -> Type)
lift :: (MonadTrans t, Monad m) => m a -> t m a
(.|) :: forall (m :: Type -> Type) a b c r. Monad m => ConduitM a b m () -> ConduitM b c m r -> ConduitM a c m r
runConduit :: Monad m => ConduitT () Void m r -> m r
type ConduitM = ConduitT
newtype ReaderT r (m :: Type -> Type) a
ReaderT :: (r -> m a) -> ReaderT r (m :: Type -> Type) a
[runReaderT] :: ReaderT r (m :: Type -> Type) a -> r -> m a
id :: a -> a
(.) :: (b -> c) -> (a -> b) -> a -> c
newtype First a
First :: Maybe a -> First a
[getFirst] :: First a -> Maybe a
data NonEmpty a
(:|) :: a -> [a] -> NonEmpty a
data UnicodeException
DecodeError :: String -> Maybe Word8 -> UnicodeException
EncodeError :: String -> Maybe Char -> UnicodeException
class NFData a
rnf :: NFData a => a -> ()
class MonadIO m => MonadUnliftIO (m :: Type -> Type)
withRunInIO :: MonadUnliftIO m => ((forall a. () => m a -> IO a) -> IO b) -> m b
class Monad m => MonadThrow (m :: Type -> Type)
throwM :: (MonadThrow m, Exception e) => e -> m a
data Abs
data File
data Path b t
newtype RIO env a
RIO :: ReaderT env IO a -> RIO env a
[unRIO] :: RIO env a -> ReaderT env IO a
toFilePath :: Path b t -> FilePath
data Dir
data Rel
pollSTM :: Async a -> STM (Maybe (Either SomeException a))
waitAnyCatchSTM :: [Async a] -> STM (Async a, Either SomeException a)
waitAnySTM :: [Async a] -> STM (Async a, a)
waitBothSTM :: Async a -> Async b -> STM (a, b)
waitCatchSTM :: Async a -> STM (Either SomeException a)
waitEitherCatchSTM :: Async a -> Async b -> STM (Either (Either SomeException a) (Either SomeException b))
waitEitherSTM :: Async a -> Async b -> STM (Either a b)
waitEitherSTM_ :: Async a -> Async b -> STM ()
waitSTM :: Async a -> STM a
biList :: Bifoldable t => t a a -> [a]
biall :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
biand :: Bifoldable t => t Bool Bool -> Bool
biany :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
biasum :: (Bifoldable t, Alternative f) => t (f a) (f a) -> f a
biconcat :: Bifoldable t => t [a] [a] -> [a]
biconcatMap :: Bifoldable t => (a -> [c]) -> (b -> [c]) -> t a b -> [c]
bielem :: (Bifoldable t, Eq a) => a -> t a a -> Bool
bifind :: Bifoldable t => (a -> Bool) -> t a a -> Maybe a
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
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
bifor_ :: (Bifoldable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f ()
bilength :: Bifoldable t => t a b -> Int
bimaximum :: (Bifoldable t, Ord a) => t a a -> a
bimaximumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a
biminimum :: (Bifoldable t, Ord a) => t a a -> a
biminimumBy :: Bifoldable t => (a -> a -> Ordering) -> t a a -> a
binotElem :: (Bifoldable t, Eq a) => a -> t a a -> Bool
binull :: Bifoldable t => t a b -> Bool
bior :: Bifoldable t => t Bool Bool -> Bool
biproduct :: (Bifoldable t, Num a) => t a a -> a
bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()
bisum :: (Bifoldable t, Num a) => t a a -> a
bitraverse_ :: (Bifoldable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f ()
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)
bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)
fromShort :: ShortByteString -> ByteString
toShort :: ByteString -> ShortByteString
($!!) :: NFData a => (a -> b) -> a -> b
deepseq :: NFData a => a -> b -> b
force :: NFData a => a -> a
(%~) :: ASetter s t a b -> (a -> b) -> s -> t
(.~) :: ASetter s t a b -> b -> s -> t
(^.) :: s -> Getting a s a -> a
(^..) :: s -> Getting (Endo [a]) s a -> [a]
(^?) :: s -> Getting (First a) s a -> Maybe a
lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
over :: ASetter s t a b -> (a -> b) -> s -> t
set :: ASetter s t a b -> b -> s -> t
to :: (s -> a) -> SimpleGetter s a
sets :: ((a -> b) -> s -> t) -> ASetter s t a b
preview :: MonadReader s m => Getting (First a) s a -> m (Maybe a)
view :: MonadReader s m => Getting a s a -> m a
asks :: MonadReader r m => (r -> a) -> m a
asBDeque :: BDeque s a -> BDeque s a
asSDeque :: SDeque s a -> SDeque s a
asUDeque :: UDeque s a -> UDeque s a
dequeToList :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m [a]
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)
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
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
freezeDeque :: (Vector v a, PrimMonad m) => Deque (Mutable v) (PrimState m) a -> m (v a)
getDequeSize :: forall m (v :: Type -> Type -> Type) a. PrimMonad m => Deque v (PrimState m) a -> m Int
newDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => m (Deque v (PrimState m) a)
popBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)
popFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> m (Maybe a)
pushBackDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()
pushFrontDeque :: forall (v :: Type -> Type -> Type) a m. (MVector v a, PrimMonad m) => Deque v (PrimState m) a -> a -> m ()
displayBytesUtf8 :: ByteString -> Utf8Builder
displayShow :: Show a => a -> Utf8Builder
utf8BuilderToLazyText :: Utf8Builder -> Text
utf8BuilderToText :: Utf8Builder -> Text
writeFileUtf8Builder :: MonadIO m => FilePath -> Utf8Builder -> m ()
exitFailure :: MonadIO m => m a
exitSuccess :: MonadIO m => m a
exitWith :: MonadIO m => ExitCode -> m a
asIO :: IO a -> IO a
foldMapM :: (Monad m, Monoid w, Foldable t) => (a -> m w) -> t a -> m w
forMaybeA :: Applicative f => [a] -> (a -> f (Maybe b)) -> f [b]
forMaybeM :: Monad m => [a] -> (a -> m (Maybe b)) -> m [b]
fromFirst :: a -> First a -> a
mapLeft :: (a1 -> a2) -> Either a1 b -> Either a2 b
mapMaybeA :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b]
mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
nubOrd :: Ord a => [a] -> [a]
unlessM :: Monad m => m Bool -> m () -> m ()
whenM :: Monad m => m Bool -> m () -> m ()
hPutBuilder :: MonadIO m => Handle -> Builder -> m ()
readFileBinary :: MonadIO m => FilePath -> m ByteString
readFileUtf8 :: MonadIO m => FilePath -> m Text
withLazyFile :: MonadUnliftIO m => FilePath -> (ByteString -> m a) -> m a
withLazyFileUtf8 :: MonadUnliftIO m => FilePath -> (Text -> m a) -> m a
writeFileBinary :: MonadIO m => FilePath -> ByteString -> m ()
writeFileUtf8 :: MonadIO m => FilePath -> Text -> m ()
contramapGLogFunc :: (a -> b) -> GLogFunc b -> GLogFunc a
contramapMaybeGLogFunc :: (a -> Maybe b) -> GLogFunc b -> GLogFunc a
displayCallStack :: CallStack -> Utf8Builder
gLogFuncClassic :: (HasLogLevel msg, HasLogSource msg, Display msg) => LogFunc -> GLogFunc msg
glog :: (MonadIO m, HasCallStack, HasGLogFunc env, MonadReader env m) => GMsg env -> m ()
logDebug :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
logDebugS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
logError :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
logErrorS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
logFuncAccentColorsL :: HasLogFunc env => SimpleGetter env (Int -> Utf8Builder)
logFuncLogLevelColorsL :: HasLogFunc env => SimpleGetter env (LogLevel -> Utf8Builder)
logFuncSecondaryColorL :: HasLogFunc env => SimpleGetter env Utf8Builder
logFuncUseColorL :: HasLogFunc env => SimpleGetter env Bool
logGeneric :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> LogLevel -> Utf8Builder -> m ()
logInfo :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
logInfoS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
logOptionsHandle :: MonadIO m => Handle -> Bool -> m LogOptions
logOptionsMemory :: MonadIO m => m (IORef Builder, LogOptions)
logOther :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> Utf8Builder -> m ()
logOtherS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Text -> LogSource -> Utf8Builder -> m ()
logSticky :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()
logStickyDone :: (MonadIO m, HasCallStack, MonadReader env m, HasLogFunc env) => Utf8Builder -> m ()
logWarn :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => Utf8Builder -> m ()
logWarnS :: (MonadIO m, MonadReader env m, HasLogFunc env, HasCallStack) => LogSource -> Utf8Builder -> m ()
mkGLogFunc :: (CallStack -> msg -> IO ()) -> GLogFunc msg
mkLogFunc :: (CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO ()) -> LogFunc
newLogFunc :: (MonadIO n, MonadIO m) => LogOptions -> n (LogFunc, m ())
noLogging :: (HasLogFunc env, MonadReader env m) => m a -> m a
setLogAccentColors :: (Int -> Utf8Builder) -> LogOptions -> LogOptions
setLogFormat :: (Utf8Builder -> Utf8Builder) -> LogOptions -> LogOptions
setLogLevelColors :: (LogLevel -> Utf8Builder) -> LogOptions -> LogOptions
setLogMinLevel :: LogLevel -> LogOptions -> LogOptions
setLogMinLevelIO :: IO LogLevel -> LogOptions -> LogOptions
setLogSecondaryColor :: Utf8Builder -> LogOptions -> LogOptions
setLogTerminal :: Bool -> LogOptions -> LogOptions
setLogUseColor :: Bool -> LogOptions -> LogOptions
setLogUseLoc :: Bool -> LogOptions -> LogOptions
setLogUseTime :: Bool -> LogOptions -> LogOptions
setLogVerboseFormat :: Bool -> LogOptions -> LogOptions
setLogVerboseFormatIO :: IO Bool -> LogOptions -> LogOptions
withLogFunc :: MonadUnliftIO m => LogOptions -> (LogFunc -> m a) -> m a
liftRIO :: (MonadIO m, MonadReader env m) => RIO env a -> m a
mapRIO :: (outer -> inner) -> RIO inner a -> RIO outer a
modifySomeRef :: MonadIO m => SomeRef a -> (a -> a) -> m ()
newSomeRef :: MonadIO m => a -> m (SomeRef a)
newUnboxedSomeRef :: (MonadIO m, Unbox a) => a -> m (SomeRef a)
readSomeRef :: MonadIO m => SomeRef a -> m a
runRIO :: MonadIO m => env -> RIO env a -> m a
writeSomeRef :: MonadIO m => SomeRef a -> a -> m ()
fromStrictBytes :: ByteString -> LByteString
sappend :: Semigroup s => s -> s -> s
toStrictBytes :: LByteString -> ByteString
yieldThread :: MonadIO m => m ()
mkSimpleApp :: MonadIO m => LogFunc -> Maybe ProcessContext -> m SimpleApp
runSimpleApp :: MonadIO m => RIO SimpleApp a -> m a
decodeUtf8Lenient :: ByteString -> Text
tshow :: Show a => a -> Text
trace :: Text -> a -> a
traceDisplay :: Display a => a -> b -> b
traceDisplayEvent :: Display a => a -> b -> b
traceDisplayEventIO :: (Display a, MonadIO m) => a -> m ()
traceDisplayIO :: (Display a, MonadIO m) => a -> m ()
traceDisplayId :: Display a => a -> a
traceDisplayM :: (Display a, Applicative f) => a -> f ()
traceDisplayMarker :: Display a => a -> b -> b
traceDisplayMarkerIO :: (Display a, MonadIO m) => a -> m ()
traceDisplayStack :: Display a => a -> b -> b
traceEvent :: Text -> a -> a
traceEventIO :: MonadIO m => Text -> m ()
traceIO :: MonadIO m => Text -> m ()
traceId :: Text -> Text
traceM :: Applicative f => Text -> f ()
traceMarker :: Text -> a -> a
traceMarkerIO :: MonadIO m => Text -> m ()
traceShow :: Show a => a -> b -> b
traceShowEvent :: Show a => a -> b -> b
traceShowEventIO :: (Show a, MonadIO m) => a -> m ()
traceShowIO :: (Show a, MonadIO m) => a -> m ()
traceShowId :: Show a => a -> a
traceShowM :: (Show a, Applicative f) => a -> f ()
traceShowMarker :: Show a => a -> b -> b
traceShowMarkerIO :: (Show a, MonadIO m) => a -> m ()
traceShowStack :: Show a => a -> b -> b
traceStack :: Text -> a -> a
modifyURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> (a -> a) -> m ()
newURef :: (PrimMonad m, Unbox a) => a -> m (URef (PrimState m) a)
readURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> m a
writeURef :: (PrimMonad m, Unbox a) => URef (PrimState m) a -> a -> m ()
isEmptyTBQueue :: TBQueue a -> STM Bool
isFullTBQueue :: TBQueue a -> STM Bool
newTBQueue :: Natural -> STM (TBQueue a)
peekTBQueue :: TBQueue a -> STM a
readTBQueue :: TBQueue a -> STM a
tryPeekTBQueue :: TBQueue a -> STM (Maybe a)
tryReadTBQueue :: TBQueue a -> STM (Maybe a)
unGetTBQueue :: TBQueue a -> a -> STM ()
writeTBQueue :: TBQueue a -> a -> STM ()
cloneTChan :: TChan a -> STM (TChan a)
dupTChan :: TChan a -> STM (TChan a)
isEmptyTChan :: TChan a -> STM Bool
newBroadcastTChan :: STM (TChan a)
newTChan :: STM (TChan a)
peekTChan :: TChan a -> STM a
readTChan :: TChan a -> STM a
tryPeekTChan :: TChan a -> STM (Maybe a)
tryReadTChan :: TChan a -> STM (Maybe a)
unGetTChan :: TChan a -> a -> STM ()
writeTChan :: TChan a -> a -> STM ()
isEmptyTMVar :: TMVar a -> STM Bool
newEmptyTMVar :: STM (TMVar a)
newTMVar :: a -> STM (TMVar a)
putTMVar :: TMVar a -> a -> STM ()
readTMVar :: TMVar a -> STM a
swapTMVar :: TMVar a -> a -> STM a
takeTMVar :: TMVar a -> STM a
tryPutTMVar :: TMVar a -> a -> STM Bool
tryReadTMVar :: TMVar a -> STM (Maybe a)
tryTakeTMVar :: TMVar a -> STM (Maybe a)
isEmptyTQueue :: TQueue a -> STM Bool
newTQueue :: STM (TQueue a)
peekTQueue :: TQueue a -> STM a
readTQueue :: TQueue a -> STM a
tryPeekTQueue :: TQueue a -> STM (Maybe a)
tryReadTQueue :: TQueue a -> STM (Maybe a)
unGetTQueue :: TQueue a -> a -> STM ()
writeTQueue :: TQueue a -> a -> STM ()
modifyTVar :: TVar a -> (a -> a) -> STM ()
modifyTVar' :: TVar a -> (a -> a) -> STM ()
swapTVar :: TVar a -> a -> STM a
decodeUtf8' :: ByteString -> Either UnicodeException Text
decodeUtf8With :: OnDecodeError -> ByteString -> Text
encodeUtf8 :: Text -> ByteString
encodeUtf8Builder :: Text -> Builder
lenientDecode :: OnDecodeError
runReader :: Reader r a -> r -> a
dupChan :: MonadIO m => Chan a -> m (Chan a)
getChanContents :: MonadIO m => Chan a -> m [a]
newChan :: MonadIO m => m (Chan a)
readChan :: MonadIO m => Chan a -> m a
writeChan :: MonadIO m => Chan a -> a -> m ()
writeList2Chan :: MonadIO m => Chan a -> [a] -> m ()
isCurrentThreadBound :: MonadIO m => m Bool
myThreadId :: MonadIO m => m ThreadId
threadDelay :: MonadIO m => Int -> m ()
threadWaitRead :: MonadIO m => Fd -> m ()
threadWaitWrite :: MonadIO m => Fd -> m ()
bracket :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
bracketOnError :: MonadUnliftIO m => m a -> (a -> m b) -> (a -> m c) -> m c
bracketOnError_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
bracket_ :: MonadUnliftIO m => m a -> m b -> m c -> m c
catch :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a
catchAny :: MonadUnliftIO m => m a -> (SomeException -> m a) -> m a
catchAnyDeep :: (NFData a, MonadUnliftIO m) => m a -> (SomeException -> m a) -> m a
catchDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> (e -> m a) -> m a
catchIO :: MonadUnliftIO m => m a -> (IOException -> m a) -> m a
catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a
catchSyncOrAsync :: (MonadUnliftIO m, Exception e) => m a -> (e -> m a) -> m a
catches :: MonadUnliftIO m => m a -> [Handler m a] -> m a
catchesDeep :: (MonadUnliftIO m, NFData a) => m a -> [Handler m a] -> m a
evaluate :: MonadIO m => a -> m a
evaluateDeep :: (MonadIO m, NFData a) => a -> m a
finally :: MonadUnliftIO m => m a -> m b -> m a
fromEither :: (Exception e, MonadIO m) => Either e a -> m a
fromEitherIO :: (Exception e, MonadIO m) => IO (Either e a) -> m a
fromEitherM :: (Exception e, MonadIO m) => m (Either e a) -> m a
fromExceptionUnwrap :: Exception e => SomeException -> Maybe e
handle :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a
handleAny :: MonadUnliftIO m => (SomeException -> m a) -> m a -> m a
handleAnyDeep :: (MonadUnliftIO m, NFData a) => (SomeException -> m a) -> m a -> m a
handleDeep :: (MonadUnliftIO m, Exception e, NFData a) => (e -> m a) -> m a -> m a
handleIO :: MonadUnliftIO m => (IOException -> m a) -> m a -> m a
handleJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a
handleSyncOrAsync :: (MonadUnliftIO m, Exception e) => (e -> m a) -> m a -> m a
impureThrow :: Exception e => e -> a
isAsyncException :: Exception e => e -> Bool
isSyncException :: Exception e => e -> Bool
mapExceptionM :: (Exception e1, Exception e2, MonadUnliftIO m) => (e1 -> e2) -> m a -> m a
mask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
mask_ :: MonadUnliftIO m => m a -> m a
onException :: MonadUnliftIO m => m a -> m b -> m a
pureTry :: a -> Either SomeException a
pureTryDeep :: NFData a => a -> Either SomeException a
stringException :: HasCallStack => String -> StringException
throwIO :: (MonadIO m, Exception e) => e -> m a
throwString :: (MonadIO m, HasCallStack) => String -> m a
throwTo :: (Exception e, MonadIO m) => ThreadId -> e -> m ()
toAsyncException :: Exception e => e -> SomeException
toSyncException :: Exception e => e -> SomeException
try :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a)
tryAny :: MonadUnliftIO m => m a -> m (Either SomeException a)
tryAnyDeep :: (MonadUnliftIO m, NFData a) => m a -> m (Either SomeException a)
tryDeep :: (MonadUnliftIO m, Exception e, NFData a) => m a -> m (Either e a)
tryIO :: MonadUnliftIO m => m a -> m (Either IOException a)
tryJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)
trySyncOrAsync :: (MonadUnliftIO m, Exception e) => m a -> m (Either e a)
uninterruptibleMask :: MonadUnliftIO m => ((forall a. () => m a -> m a) -> m b) -> m b
uninterruptibleMask_ :: MonadUnliftIO m => m a -> m a
withException :: (MonadUnliftIO m, Exception e) => m a -> (e -> m b) -> m a
getMonotonicTime :: MonadIO m => m Double
hClose :: MonadIO m => Handle -> m ()
hFileSize :: MonadIO m => Handle -> m Integer
hFlush :: MonadIO m => Handle -> m ()
hGetBuffering :: MonadIO m => Handle -> m BufferMode
hGetEcho :: MonadIO m => Handle -> m Bool
hIsClosed :: MonadIO m => Handle -> m Bool
hIsEOF :: MonadIO m => Handle -> m Bool
hIsOpen :: MonadIO m => Handle -> m Bool
hIsReadable :: MonadIO m => Handle -> m Bool
hIsSeekable :: MonadIO m => Handle -> m Bool
hIsTerminalDevice :: MonadIO m => Handle -> m Bool
hIsWritable :: MonadIO m => Handle -> m Bool
hReady :: MonadIO m => Handle -> m Bool
hSeek :: MonadIO m => Handle -> SeekMode -> Integer -> m ()
hSetBuffering :: MonadIO m => Handle -> BufferMode -> m ()
hSetEcho :: MonadIO m => Handle -> Bool -> m ()
hSetFileSize :: MonadIO m => Handle -> Integer -> m ()
hTell :: MonadIO m => Handle -> m Integer
hWaitForInput :: MonadIO m => Handle -> Int -> m Bool
openFile :: MonadIO m => FilePath -> IOMode -> m Handle
withBinaryFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
withFile :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m a) -> m a
atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
atomicWriteIORef :: MonadIO m => IORef a -> a -> m ()
mkWeakIORef :: MonadUnliftIO m => IORef a -> m () -> m (Weak (IORef a))
modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m ()
modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m ()
newIORef :: MonadIO m => a -> m (IORef a)
readIORef :: MonadIO m => IORef a -> m a
writeIORef :: MonadIO m => IORef a -> a -> m ()
async :: MonadUnliftIO m => m a -> m (Async a)
asyncBound :: MonadUnliftIO m => m a -> m (Async a)
asyncOn :: MonadUnliftIO m => Int -> m a -> m (Async a)
asyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall b. () => m b -> m b) -> m a) -> m (Async a)
asyncWithUnmask :: MonadUnliftIO m => ((forall b. () => m b -> m b) -> m a) -> m (Async a)
cancel :: MonadIO m => Async a -> m ()
cancelWith :: (Exception e, MonadIO m) => Async a -> e -> m ()
conc :: m a -> Conc m a
concurrently :: MonadUnliftIO m => m a -> m b -> m (a, b)
concurrently_ :: MonadUnliftIO m => m a -> m b -> m ()
forConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
forConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
link :: MonadIO m => Async a -> m ()
link2 :: MonadIO m => Async a -> Async b -> m ()
mapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
mapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
poll :: MonadIO m => Async a -> m (Maybe (Either SomeException a))
pooledForConcurrently :: (MonadUnliftIO m, Traversable t) => t a -> (a -> m b) -> m (t b)
pooledForConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> t a -> (a -> m b) -> m (t b)
pooledForConcurrentlyN_ :: (MonadUnliftIO m, Foldable t) => Int -> t a -> (a -> m b) -> m ()
pooledForConcurrently_ :: (MonadUnliftIO m, Foldable f) => f a -> (a -> m b) -> m ()
pooledMapConcurrently :: (MonadUnliftIO m, Traversable t) => (a -> m b) -> t a -> m (t b)
pooledMapConcurrentlyN :: (MonadUnliftIO m, Traversable t) => Int -> (a -> m b) -> t a -> m (t b)
pooledMapConcurrentlyN_ :: (MonadUnliftIO m, Foldable f) => Int -> (a -> m b) -> f a -> m ()
pooledMapConcurrently_ :: (MonadUnliftIO m, Foldable f) => (a -> m b) -> f a -> m ()
pooledReplicateConcurrently :: MonadUnliftIO m => Int -> m a -> m [a]
pooledReplicateConcurrentlyN :: MonadUnliftIO m => Int -> Int -> m a -> m [a]
pooledReplicateConcurrentlyN_ :: MonadUnliftIO m => Int -> Int -> m a -> m ()
pooledReplicateConcurrently_ :: MonadUnliftIO m => Int -> m a -> m ()
race :: MonadUnliftIO m => m a -> m b -> m (Either a b)
race_ :: MonadUnliftIO m => m a -> m b -> m ()
replicateConcurrently :: MonadUnliftIO m => Int -> m b -> m [b]
replicateConcurrently_ :: (Applicative m, MonadUnliftIO m) => Int -> m a -> m ()
runConc :: MonadUnliftIO m => Conc m a -> m a
uninterruptibleCancel :: MonadIO m => Async a -> m ()
wait :: MonadIO m => Async a -> m a
waitAny :: MonadIO m => [Async a] -> m (Async a, a)
waitAnyCancel :: MonadIO m => [Async a] -> m (Async a, a)
waitAnyCatch :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
waitAnyCatchCancel :: MonadIO m => [Async a] -> m (Async a, Either SomeException a)
waitBoth :: MonadIO m => Async a -> Async b -> m (a, b)
waitCatch :: MonadIO m => Async a -> m (Either SomeException a)
waitEither :: MonadIO m => Async a -> Async b -> m (Either a b)
waitEitherCancel :: MonadIO m => Async a -> Async b -> m (Either a b)
waitEitherCatch :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
waitEitherCatchCancel :: MonadIO m => Async a -> Async b -> m (Either (Either SomeException a) (Either SomeException b))
waitEither_ :: MonadIO m => Async a -> Async b -> m ()
withAsync :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
withAsyncBound :: MonadUnliftIO m => m a -> (Async a -> m b) -> m b
withAsyncOn :: MonadUnliftIO m => Int -> m a -> (Async a -> m b) -> m b
withAsyncOnWithUnmask :: MonadUnliftIO m => Int -> ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
withAsyncWithUnmask :: MonadUnliftIO m => ((forall c. () => m c -> m c) -> m a) -> (Async a -> m b) -> m b
isEmptyMVar :: MonadIO m => MVar a -> m Bool
mkWeakMVar :: MonadUnliftIO m => MVar a -> m () -> m (Weak (MVar a))
modifyMVar :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
modifyMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b
modifyMVarMasked_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
modifyMVar_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m ()
newEmptyMVar :: MonadIO m => m (MVar a)
newMVar :: MonadIO m => a -> m (MVar a)
putMVar :: MonadIO m => MVar a -> a -> m ()
readMVar :: MonadIO m => MVar a -> m a
swapMVar :: MonadIO m => MVar a -> a -> m a
takeMVar :: MonadIO m => MVar a -> m a
tryPutMVar :: MonadIO m => MVar a -> a -> m Bool
tryReadMVar :: MonadIO m => MVar a -> m (Maybe a)
tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a)
withMVar :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
withMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b
memoizeMVar :: MonadUnliftIO m => m a -> m (Memoized a)
memoizeRef :: MonadUnliftIO m => m a -> m (Memoized a)
runMemoized :: MonadIO m => Memoized a -> m a
newQSem :: MonadIO m => Int -> m QSem
signalQSem :: MonadIO m => QSem -> m ()
waitQSem :: MonadIO m => QSem -> m ()
withQSem :: MonadUnliftIO m => QSem -> m a -> m a
newQSemN :: MonadIO m => Int -> m QSemN
signalQSemN :: MonadIO m => QSemN -> Int -> m ()
waitQSemN :: MonadIO m => QSemN -> Int -> m ()
withQSemN :: MonadUnliftIO m => QSemN -> Int -> m a -> m a
atomically :: MonadIO m => STM a -> m a
checkSTM :: Bool -> STM ()
mkWeakTMVar :: MonadUnliftIO m => TMVar a -> m () -> m (Weak (TMVar a))
mkWeakTVar :: MonadUnliftIO m => TVar a -> m () -> m (Weak (TVar a))
newBroadcastTChanIO :: MonadIO m => m (TChan a)
newEmptyTMVarIO :: MonadIO m => m (TMVar a)
newTBQueueIO :: MonadIO m => Natural -> m (TBQueue a)
newTChanIO :: MonadIO m => m (TChan a)
newTMVarIO :: MonadIO m => a -> m (TMVar a)
newTQueueIO :: MonadIO m => m (TQueue a)
newTVarIO :: MonadIO m => a -> m (TVar a)
readTVarIO :: MonadIO m => TVar a -> m a
registerDelay :: MonadIO m => Int -> m (TVar Bool)
retrySTM :: STM a
withSystemTempDirectory :: MonadUnliftIO m => String -> (FilePath -> m a) -> m a
withSystemTempFile :: MonadUnliftIO m => String -> (FilePath -> Handle -> m a) -> m a
withTempDirectory :: MonadUnliftIO m => FilePath -> String -> (FilePath -> m a) -> m a
withTempFile :: MonadUnliftIO m => FilePath -> String -> (FilePath -> Handle -> m a) -> m a
timeout :: MonadUnliftIO m => Int -> m a -> m (Maybe a)
askRunInIO :: MonadUnliftIO m => m (m a -> IO a)
askUnliftIO :: MonadUnliftIO m => m (UnliftIO m)
toIO :: MonadUnliftIO m => m a -> m (IO a)
withUnliftIO :: MonadUnliftIO m => (UnliftIO m -> IO a) -> m a
wrappedWithRunInIO :: MonadUnliftIO n => (n b -> m b) -> (forall a. () => m a -> n a) -> ((forall a. () => m a -> IO a) -> IO b) -> m b
data Async a
data AsyncCancelled
AsyncCancelled :: AsyncCancelled
class Bifoldable (p :: Type -> Type -> Type)
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
class (Bifunctor t, Bifoldable t) => Bitraversable (t :: Type -> Type -> Type)
bitraverse :: (Bitraversable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
type HasCallStack = ?callStack :: CallStack
data Builder
data ShortByteString
data IntMap a
data IntSet
data Seq a
class Hashable a
type ASetter s t a b = a -> Identity b -> s -> Identity t
type ASetter' s a = ASetter s s a a
type Getting r s a = a -> Const r a -> s -> Const r s
type Lens s t a b = forall (f :: Type -> Type). Functor f => a -> f b -> s -> f t
type Lens' s a = Lens s s a a
type SimpleGetter s a = forall r. () => Getting r s a
class Monad m => MonadReader r (m :: Type -> Type) | m -> r
ask :: MonadReader r m => m r
local :: MonadReader r m => (r -> r) -> m a -> m a
class Monad m => PrimMonad (m :: Type -> Type) where {
    type family PrimState (m :: Type -> Type);
}
primitive :: PrimMonad m => (State# (PrimState m) -> (# State# (PrimState m), a #)) -> m a
type family PrimState (m :: Type -> Type)
type BDeque = Deque MVector
data Deque (v :: Type -> Type -> Type) s a
type SDeque = Deque MVector
type UDeque = Deque MVector
class Display a
display :: Display a => a -> Utf8Builder
textDisplay :: Display a => a -> Text
newtype Utf8Builder
Utf8Builder :: Builder -> Utf8Builder
[getUtf8Builder] :: Utf8Builder -> Builder
data GLogFunc msg
type family GMsg env
class HasGLogFunc env where {
    type family GMsg env;
}
gLogFuncL :: HasGLogFunc env => Lens' env (GLogFunc (GMsg env))
class HasLogFunc env
logFuncL :: HasLogFunc env => Lens' env LogFunc
class HasLogLevel msg
getLogLevel :: HasLogLevel msg => msg -> LogLevel
class HasLogSource msg
getLogSource :: HasLogSource msg => msg -> LogSource
data LogFunc
data LogLevel
LevelDebug :: LogLevel
LevelInfo :: LogLevel
LevelWarn :: LogLevel
LevelError :: LogLevel
LevelOther :: !Text -> LogLevel
data LogOptions
type LogSource = Text
class HasStateRef s env | env -> s
stateRefL :: HasStateRef s env => Lens' env (SomeRef s)
class HasWriteRef w env | env -> w
writeRefL :: HasWriteRef w env => Lens' env (SomeRef w)
data SomeRef a
type GVector = Vector
type LByteString = ByteString
type LText = Text
type SVector = Vector
type UVector = Vector
data SimpleApp
type IOURef = URef PrimState IO
data URef s a
data TBQueue a
data TChan a
data TMVar a
data TQueue a
type Reader r = ReaderT r Identity
data AsyncExceptionWrapper
AsyncExceptionWrapper :: e -> AsyncExceptionWrapper
data Handler (m :: Type -> Type) a
Handler :: (e -> m a) -> Handler (m :: Type -> Type) a
data StringException
StringException :: String -> CallStack -> StringException
data SyncExceptionWrapper
SyncExceptionWrapper :: e -> SyncExceptionWrapper
data Conc (m :: Type -> Type) a
data ConcException
EmptyWithNoAlternative :: ConcException
newtype Concurrently (m :: Type -> Type) a
Concurrently :: m a -> Concurrently (m :: Type -> Type) a
[runConcurrently] :: Concurrently (m :: Type -> Type) a -> m a
data Memoized a
newtype UnliftIO (m :: Type -> Type)
UnliftIO :: (forall a. () => m a -> IO a) -> UnliftIO (m :: Type -> Type)
[unliftIO] :: UnliftIO (m :: Type -> Type) -> forall a. () => m a -> IO a
data HashSet a
data Vector a
class (Vector Vector a, MVector MVector a) => Unbox a
ensureFileDurable :: MonadIO m => FilePath -> m ()
withBinaryFileAtomic :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r
withBinaryFileDurable :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r
withBinaryFileDurableAtomic :: MonadUnliftIO m => FilePath -> IOMode -> (Handle -> m r) -> m r
writeBinaryFile :: MonadIO m => FilePath -> ByteString -> m ()
writeBinaryFileDurable :: MonadIO m => FilePath -> ByteString -> m ()
writeBinaryFileDurableAtomic :: MonadIO m => FilePath -> ByteString -> m ()
instance GHC.Classes.Ord Stack.Prelude.FirstTrue
instance GHC.Classes.Eq Stack.Prelude.FirstTrue
instance GHC.Show.Show Stack.Prelude.FirstTrue
instance GHC.Classes.Ord Stack.Prelude.FirstFalse
instance GHC.Classes.Eq Stack.Prelude.FirstFalse
instance GHC.Show.Show Stack.Prelude.FirstFalse
instance GHC.Base.Semigroup Stack.Prelude.FirstFalse
instance GHC.Base.Monoid Stack.Prelude.FirstFalse
instance GHC.Base.Semigroup Stack.Prelude.FirstTrue
instance GHC.Base.Monoid Stack.Prelude.FirstTrue

module Stack.Options.Utils

-- | If argument is True, hides the option from usage and help
hideMods :: Bool -> Mod f a

-- | Allows adjust global options depending on their context Note: This was
--   being used to remove ambibuity between the local and global
--   implementation of stack init --resolver option. Now that stack init
--   has no local --resolver this is not being used anymore but the code is
--   kept for any similar future use cases.
data GlobalOptsContext

-- | Global options before subcommand name
OuterGlobalOpts :: GlobalOptsContext

-- | Global options following any other subcommand
OtherCmdGlobalOpts :: GlobalOptsContext
BuildCmdGlobalOpts :: GlobalOptsContext
GhciCmdGlobalOpts :: GlobalOptsContext
instance GHC.Classes.Eq Stack.Options.Utils.GlobalOptsContext
instance GHC.Show.Show Stack.Options.Utils.GlobalOptsContext

module Stack.Options.LogLevelParser

-- | Parser for a logging level.
logLevelOptsParser :: Bool -> Maybe LogLevel -> Parser (Maybe LogLevel)

module Stack.List

-- | Intended to work for the command line command.
listPackages :: forall env. (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Maybe RawSnapshot -> [String] -> RIO env ()
instance GHC.Exception.Type.Exception Stack.List.ListException
instance GHC.Show.Show Stack.List.ListException

module Stack.Ghci.Script
data GhciScript
data ModuleName
cmdAdd :: Set (Either ModuleName (Path Abs File)) -> GhciScript
cmdCdGhc :: Path Abs Dir -> GhciScript
cmdModule :: Set ModuleName -> GhciScript
scriptToLazyByteString :: GhciScript -> LByteString
scriptToBuilder :: GhciScript -> Builder
scriptToFile :: Path Abs File -> GhciScript -> IO ()
instance GHC.Show.Show Stack.Ghci.Script.GhciCommand
instance GHC.Base.Semigroup Stack.Ghci.Script.GhciScript
instance GHC.Base.Monoid Stack.Ghci.Script.GhciScript

module Stack.FileWatch
fileWatch :: (HasLogFunc env, HasTerm env) => ((Set (Path Abs File) -> IO ()) -> RIO env ()) -> RIO env ()
fileWatchPoll :: (HasLogFunc env, HasTerm env) => ((Set (Path Abs File) -> IO ()) -> RIO env ()) -> RIO env ()


-- | Extra functions for optparse-applicative.
module Options.Applicative.Builder.Extra

-- | Enable/disable flags for a <a>Bool</a>.
boolFlags :: Bool -> String -> String -> Mod FlagFields Bool -> Parser Bool

-- | Enable/disable flags for a <a>Bool</a>, without a default case (to
--   allow chaining with <a>&lt;|&gt;</a>).
boolFlagsNoDefault :: String -> String -> Mod FlagFields Bool -> Parser Bool

-- | Flag with no default of True or False
firstBoolFlagsNoDefault :: String -> String -> Mod FlagFields (Maybe Bool) -> Parser (First Bool)

-- | Flag with a Semigroup instance and a default of True
firstBoolFlagsTrue :: String -> String -> Mod FlagFields FirstTrue -> Parser FirstTrue

-- | Flag with a Semigroup instance and a default of False
firstBoolFlagsFalse :: String -> String -> Mod FlagFields FirstFalse -> Parser FirstFalse

-- | Enable/disable flags for any type.
enableDisableFlags :: a -> a -> a -> String -> String -> Mod FlagFields a -> Parser a

-- | Enable/disable flags for any type, without a default (to allow
--   chaining with <a>&lt;|&gt;</a>)
enableDisableFlagsNoDefault :: a -> a -> String -> String -> Mod FlagFields a -> Parser a

-- | Show an extra help option (e.g. <tt>--docker-help</tt> shows help for
--   all <tt>--docker*</tt> args).
--   
--   To actually have that help appear, use <a>execExtraHelp</a> before
--   executing the main parser.
extraHelpOption :: Bool -> String -> String -> String -> Parser (a -> a)

-- | Display extra help if extra help option passed in arguments.
--   
--   Since optparse-applicative doesn't allow an arbitrary IO action for an
--   <a>abortOption</a>, this was the best way I found that doesn't require
--   manually formatting the help.
execExtraHelp :: [String] -> String -> Parser a -> String -> IO ()

-- | <a>option</a>, specialized to <a>Text</a>.
textOption :: Mod OptionFields Text -> Parser Text

-- | <a>argument</a>, specialized to <a>Text</a>.
textArgument :: Mod ArgumentFields Text -> Parser Text

-- | Like <a>optional</a>, but returning a <a>First</a>.
optionalFirst :: Alternative f => f a -> f (First a)

-- | Like <a>optional</a>, but returning a <a>FirstTrue</a>.
optionalFirstTrue :: Alternative f => f Bool -> f FirstTrue

-- | Like <a>optional</a>, but returning a <a>FirstFalse</a>.
optionalFirstFalse :: Alternative f => f Bool -> f FirstFalse
absFileOption :: Mod OptionFields (Path Abs File) -> Parser (Path Abs File)
relFileOption :: Mod OptionFields (Path Rel File) -> Parser (Path Rel File)
absDirOption :: Mod OptionFields (Path Abs Dir) -> Parser (Path Abs Dir)
relDirOption :: Mod OptionFields (Path Rel Dir) -> Parser (Path Rel Dir)

-- | Like <a>eitherReader</a>, but accepting any <tt><a>Show</a> e</tt> on
--   the <a>Left</a>.
eitherReader' :: Show e => (String -> Either e a) -> ReadM a
fileCompleter :: Completer
fileExtCompleter :: [String] -> Completer
dirCompleter :: Completer
data PathCompleterOpts
PathCompleterOpts :: Bool -> Bool -> Maybe FilePath -> (FilePath -> Bool) -> (FilePath -> Bool) -> PathCompleterOpts
[pcoAbsolute] :: PathCompleterOpts -> Bool
[pcoRelative] :: PathCompleterOpts -> Bool
[pcoRootDir] :: PathCompleterOpts -> Maybe FilePath
[pcoFileFilter] :: PathCompleterOpts -> FilePath -> Bool
[pcoDirFilter] :: PathCompleterOpts -> FilePath -> Bool
defaultPathCompleterOpts :: PathCompleterOpts
pathCompleterWith :: PathCompleterOpts -> Completer
unescapeBashArg :: String -> String
showHelpText :: ParseError


-- | Simple interface to complicated program arguments.
--   
--   This is a "fork" of the <tt>optparse-simple</tt> package that has some
--   workarounds for optparse-applicative issues that become problematic
--   with programs that have many options and subcommands. Because it makes
--   the interface more complex, these workarounds are not suitable for
--   pushing upstream to optparse-applicative.
module Options.Applicative.Complicated

-- | Add a command to the options dispatcher.
addCommand :: String -> String -> String -> (a -> b) -> (a -> c -> c) -> Parser c -> Parser a -> ExceptT b (Writer (Mod CommandFields (b, c))) ()

-- | Add a command that takes sub-commands to the options dispatcher.
addSubCommands :: Monoid c => String -> String -> String -> Parser c -> ExceptT b (Writer (Mod CommandFields (b, c))) () -> ExceptT b (Writer (Mod CommandFields (b, c))) ()

-- | Generate and execute a complicated options parser.
complicatedOptions :: Monoid a => Version -> Maybe String -> String -> String -> String -> String -> Parser a -> Maybe (ParserFailure ParserHelp -> [String] -> IO (a, (b, a))) -> ExceptT b (Writer (Mod CommandFields (b, a))) () -> IO (a, b)

-- | Generate a complicated options parser.
complicatedParser :: Monoid a => String -> Parser a -> ExceptT b (Writer (Mod CommandFields (b, a))) () -> Parser (a, (b, a))

module Data.Monoid.Map

-- | Utility newtype wrapper to make make Map's Monoid also use the
--   element's Monoid.
newtype MonoidMap k a
MonoidMap :: Map k a -> MonoidMap k a
instance GHC.Base.Functor (Data.Monoid.Map.MonoidMap k)
instance GHC.Generics.Generic (Data.Monoid.Map.MonoidMap k a)
instance (GHC.Show.Show k, GHC.Show.Show a) => GHC.Show.Show (Data.Monoid.Map.MonoidMap k a)
instance (GHC.Classes.Ord k, GHC.Read.Read k, GHC.Read.Read a) => GHC.Read.Read (Data.Monoid.Map.MonoidMap k a)
instance (GHC.Classes.Ord k, GHC.Classes.Ord a) => GHC.Classes.Ord (Data.Monoid.Map.MonoidMap k a)
instance (GHC.Classes.Eq k, GHC.Classes.Eq a) => GHC.Classes.Eq (Data.Monoid.Map.MonoidMap k a)
instance (GHC.Classes.Ord k, GHC.Base.Semigroup a) => GHC.Base.Semigroup (Data.Monoid.Map.MonoidMap k a)
instance (GHC.Classes.Ord k, GHC.Base.Semigroup a) => GHC.Base.Monoid (Data.Monoid.Map.MonoidMap k a)


-- | More readable combinators for writing parsers.
module Data.Attoparsec.Combinators

-- | Concatenate two parsers.
appending :: (Applicative f, Semigroup a) => f a -> f a -> f a

-- | Alternative parsers.
alternating :: Alternative f => f a -> f a -> f a

-- | Pure something.
pured :: (Applicative g, Applicative f) => g a -> g (f a)

-- | Concatting the result of an action.
concating :: (Monoid m, Applicative f) => f [m] -> f m


-- | Parsing of stack command line arguments
module Data.Attoparsec.Args

-- | Mode for parsing escape characters.
data EscapingMode
Escaping :: EscapingMode
NoEscaping :: EscapingMode

-- | A basic argument parser. It supports space-separated text, and string
--   quotation with identity escaping: x -&gt; x.
argsParser :: EscapingMode -> Parser [String]

-- | Parse arguments using <a>argsParser</a>.
parseArgs :: EscapingMode -> Text -> Either String [String]

-- | Parse using <a>argsParser</a> from a string.
parseArgsFromString :: EscapingMode -> String -> Either String [String]
instance GHC.Enum.Enum Data.Attoparsec.Args.EscapingMode
instance GHC.Classes.Eq Data.Attoparsec.Args.EscapingMode
instance GHC.Show.Show Data.Attoparsec.Args.EscapingMode


-- | Accepting arguments to be passed through to a sub-process.
module Options.Applicative.Args

-- | An argument which accepts a list of arguments e.g.
--   <tt>--ghc-options="-X P.hs "this""</tt>.
argsArgument :: Mod ArgumentFields [String] -> Parser [String]

-- | An option which accepts a list of arguments e.g. <tt>--ghc-options="-X
--   P.hs "this""</tt>.
argsOption :: Mod OptionFields [String] -> Parser [String]

-- | An option which accepts a command and a list of arguments e.g.
--   <tt>--exec "echo hello world"</tt>
cmdOption :: Mod OptionFields (String, [String]) -> Parser (String, [String])


-- | This module implements parsing of additional arguments embedded in a
--   comment when stack is invoked as a script interpreter
--   
--   <h3>Specifying arguments in script interpreter mode</h3>
--   
--   <tt><i>stack</i></tt> can execute a Haskell source file using
--   <tt><i>runghc</i></tt> and if required it can also install and setup
--   the compiler and any package dependencies automatically.
--   
--   For using a Haskell source file as an executable script on a Unix like
--   OS, the first line of the file must specify <tt>stack</tt> as the
--   interpreter using a shebang directive e.g.
--   
--   <pre>
--   #!/usr/bin/env stack
--   </pre>
--   
--   Additional arguments can be specified in a haskell comment following
--   the <tt>#!</tt> line. The contents inside the comment must be a single
--   valid stack command line, starting with <tt>stack</tt> as the command
--   and followed by the options to use for executing this file.
--   
--   The comment must be on the line immediately following the <tt>#!</tt>
--   line. The comment must start in the first column of the line. When
--   using a block style comment the command can be split on multiple
--   lines.
--   
--   Here is an example of a single line comment:
--   
--   <pre>
--   #!/usr/bin/env stack
--   -- stack --resolver lts-3.14 --install-ghc runghc --package random
--   </pre>
--   
--   Here is an example of a multi line block comment:
--   
--   <pre>
--   #!/usr/bin/env stack
--   {- stack
--     --resolver lts-3.14
--     --install-ghc
--     runghc
--     --package random
--   -}
--   </pre>
--   
--   When the <tt>#!</tt> line is not present, the file can still be
--   executed using <tt>stack &lt;file name&gt;</tt> command if the file
--   starts with a valid stack interpreter comment. This can be used to
--   execute the file on Windows for example.
--   
--   Nested block comments are not supported.
module Data.Attoparsec.Interpreter

-- | Parser to extract the stack command line embedded inside a comment
--   after validating the placement and formatting rules for a valid
--   interpreter specification.
interpreterArgsParser :: Bool -> String -> Parser String

-- | Extract stack arguments from a correctly placed and correctly
--   formatted comment when it is being used as an interpreter
getInterpreterArgs :: String -> IO [String]

module Control.Concurrent.Execute
data ActionType

-- | Action for building a package's library and executables. If
--   <tt>taskAllInOne</tt> is <a>True</a>, then this will also build
--   benchmarks and tests. It is <a>False</a> when then library's
--   benchmarks or test-suites have cyclic dependencies.
ATBuild :: ActionType

-- | Task for building the package's benchmarks and test-suites. Requires
--   that the library was already built.
ATBuildFinal :: ActionType

-- | Task for running the package's test-suites.
ATRunTests :: ActionType

-- | Task for running the package's benchmarks.
ATRunBenchmarks :: ActionType
data ActionId
ActionId :: !PackageIdentifier -> !ActionType -> ActionId
data ActionContext
ActionContext :: !Set ActionId -> [Action] -> !Concurrency -> ActionContext

-- | Does not include the current action
[acRemaining] :: ActionContext -> !Set ActionId

-- | Actions which depend on the current action
[acDownstream] :: ActionContext -> [Action]

-- | Whether this action may be run concurrently with others
[acConcurrency] :: ActionContext -> !Concurrency
data Action
Action :: !ActionId -> !Set ActionId -> !ActionContext -> IO () -> !Concurrency -> Action
[actionId] :: Action -> !ActionId
[actionDeps] :: Action -> !Set ActionId
[actionDo] :: Action -> !ActionContext -> IO ()
[actionConcurrency] :: Action -> !Concurrency
data Concurrency
ConcurrencyAllowed :: Concurrency
ConcurrencyDisallowed :: Concurrency
runActions :: Int -> Bool -> [Action] -> (TVar Int -> TVar (Set ActionId) -> IO ()) -> IO [SomeException]
instance GHC.Classes.Ord Control.Concurrent.Execute.ActionType
instance GHC.Classes.Eq Control.Concurrent.Execute.ActionType
instance GHC.Show.Show Control.Concurrent.Execute.ActionType
instance GHC.Classes.Ord Control.Concurrent.Execute.ActionId
instance GHC.Classes.Eq Control.Concurrent.Execute.ActionId
instance GHC.Show.Show Control.Concurrent.Execute.ActionId
instance GHC.Classes.Eq Control.Concurrent.Execute.Concurrency
instance GHC.Exception.Type.Exception Control.Concurrent.Execute.ExecuteException
instance GHC.Show.Show Control.Concurrent.Execute.ExecuteException


-- | Utils for the other Stack.Storage modules
module Stack.Storage.Util

-- | Efficiently update a list of values stored in a database table.
updateList :: (PersistEntityBackend record ~ BaseBackend backend, PersistField parentid, Ord value, PersistEntity record, MonadIO m, PersistQueryWrite backend) => (parentid -> Int -> value -> record) -> EntityField record parentid -> parentid -> EntityField record Int -> [value] -> [value] -> ReaderT backend m ()

-- | Efficiently update a set of values stored in a database table
updateSet :: (PersistEntityBackend record ~ BaseBackend backend, PersistField parentid, PersistField value, Ord value, PersistEntity record, MonadIO m, PersistQueryWrite backend) => (parentid -> value -> record) -> EntityField record parentid -> parentid -> EntityField record value -> Set value -> Set value -> ReaderT backend m ()

module Stack.Types.CompilerBuild
data CompilerBuild
CompilerBuildStandard :: CompilerBuild
CompilerBuildSpecialized :: String -> CompilerBuild

-- | Descriptive name for compiler build
compilerBuildName :: CompilerBuild -> String

-- | Suffix to use for filenames/directories constructed with compiler
--   build
compilerBuildSuffix :: CompilerBuild -> String

-- | Parse compiler build from a String.
parseCompilerBuild :: MonadThrow m => String -> m CompilerBuild
instance GHC.Show.Show Stack.Types.CompilerBuild.CompilerBuild
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.CompilerBuild.CompilerBuild

module Stack.Options.GhcBuildParser

-- | GHC build parser
ghcBuildParser :: Bool -> Parser CompilerBuild


-- | Configuration options for building.
module Stack.Types.Config.Build

-- | Build options that is interpreted by the build command. This is built
--   up from BuildOptsCLI and BuildOptsMonoid
data BuildOpts
BuildOpts :: !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !HaddockOpts -> !Bool -> !Maybe Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Maybe Bool -> !Bool -> !Bool -> !Bool -> !TestOpts -> !Bool -> !BenchmarkOpts -> !Bool -> !Bool -> !Bool -> ![Text] -> !Bool -> !Maybe Text -> BuildOpts
[boptsLibProfile] :: BuildOpts -> !Bool
[boptsExeProfile] :: BuildOpts -> !Bool
[boptsLibStrip] :: BuildOpts -> !Bool
[boptsExeStrip] :: BuildOpts -> !Bool

-- | Build haddocks?
[boptsHaddock] :: BuildOpts -> !Bool

-- | Options to pass to haddock
[boptsHaddockOpts] :: BuildOpts -> !HaddockOpts

-- | Open haddocks in the browser?
[boptsOpenHaddocks] :: BuildOpts -> !Bool

-- | Build haddocks for dependencies?
[boptsHaddockDeps] :: BuildOpts -> !Maybe Bool

-- | Build haddocks for all symbols and packages, like <tt>cabal haddock
--   --internal</tt>
[boptsHaddockInternal] :: BuildOpts -> !Bool

-- | Build hyperlinked source if possible. Fallback to <tt>hscolour</tt>.
--   Disable for no sources.
[boptsHaddockHyperlinkSource] :: BuildOpts -> !Bool

-- | Install executables to user path after building?
[boptsInstallExes] :: BuildOpts -> !Bool

-- | Install executables to compiler tools path after building?
[boptsInstallCompilerTool] :: BuildOpts -> !Bool

-- | Fetch all packages immediately ^ Watch files for changes and
--   automatically rebuild
[boptsPreFetch] :: BuildOpts -> !Bool

-- | Keep building/running after failure
[boptsKeepGoing] :: BuildOpts -> !Maybe Bool

-- | Keep intermediate files and build directories
[boptsKeepTmpFiles] :: BuildOpts -> !Bool

-- | Force treating all local packages as having dirty files
[boptsForceDirty] :: BuildOpts -> !Bool

-- | Turn on tests for local targets
[boptsTests] :: BuildOpts -> !Bool

-- | Additional test arguments
[boptsTestOpts] :: BuildOpts -> !TestOpts

-- | Turn on benchmarks for local targets
[boptsBenchmarks] :: BuildOpts -> !Bool

-- | Additional test arguments ^ Commands (with arguments) to run after a
--   successful build ^ Only perform the configure step when building
[boptsBenchmarkOpts] :: BuildOpts -> !BenchmarkOpts

-- | Perform the configure step even if already configured
[boptsReconfigure] :: BuildOpts -> !Bool

-- | Ask Cabal to be verbose in its builds
[boptsCabalVerbose] :: BuildOpts -> !Bool

-- | Whether to enable split-objs.
[boptsSplitObjs] :: BuildOpts -> !Bool

-- | Which components to skip when building
[boptsSkipComponents] :: BuildOpts -> ![Text]

-- | Should we use the interleaved GHC output when building multiple
--   packages?
[boptsInterleavedOutput] :: BuildOpts -> !Bool
[boptsDdumpDir] :: BuildOpts -> !Maybe Text

-- | Command sum type for conditional arguments.
data BuildCommand
Build :: BuildCommand
Test :: BuildCommand
Haddock :: BuildCommand
Bench :: BuildCommand
Install :: BuildCommand
defaultBuildOpts :: BuildOpts
defaultBuildOptsCLI :: BuildOptsCLI

-- | Build options that may only be specified from the CLI
data BuildOptsCLI
BuildOptsCLI :: ![Text] -> !Bool -> ![Text] -> !Map ApplyCLIFlag (Map FlagName Bool) -> !BuildSubset -> !FileWatchOpts -> !Bool -> ![(String, [String])] -> !Bool -> !BuildCommand -> !Bool -> BuildOptsCLI
[boptsCLITargets] :: BuildOptsCLI -> ![Text]
[boptsCLIDryrun] :: BuildOptsCLI -> !Bool
[boptsCLIGhcOptions] :: BuildOptsCLI -> ![Text]
[boptsCLIFlags] :: BuildOptsCLI -> !Map ApplyCLIFlag (Map FlagName Bool)
[boptsCLIBuildSubset] :: BuildOptsCLI -> !BuildSubset
[boptsCLIFileWatch] :: BuildOptsCLI -> !FileWatchOpts
[boptsCLIWatchAll] :: BuildOptsCLI -> !Bool
[boptsCLIExec] :: BuildOptsCLI -> ![(String, [String])]
[boptsCLIOnlyConfigure] :: BuildOptsCLI -> !Bool
[boptsCLICommand] :: BuildOptsCLI -> !BuildCommand
[boptsCLIInitialBuildSteps] :: BuildOptsCLI -> !Bool

-- | Build options that may be specified in the stack.yaml or from the CLI
data BuildOptsMonoid
BuildOptsMonoid :: !Any -> !Any -> !Any -> !FirstFalse -> !FirstFalse -> !FirstTrue -> !FirstTrue -> !FirstFalse -> !HaddockOptsMonoid -> !FirstFalse -> !First Bool -> !FirstFalse -> !FirstTrue -> !FirstFalse -> !FirstFalse -> !FirstFalse -> !First Bool -> !FirstFalse -> !FirstFalse -> !FirstFalse -> !TestOptsMonoid -> !FirstFalse -> !BenchmarkOptsMonoid -> !FirstFalse -> !FirstFalse -> !FirstFalse -> ![Text] -> !FirstTrue -> !First Text -> BuildOptsMonoid
[buildMonoidTrace] :: BuildOptsMonoid -> !Any
[buildMonoidProfile] :: BuildOptsMonoid -> !Any
[buildMonoidNoStrip] :: BuildOptsMonoid -> !Any
[buildMonoidLibProfile] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidExeProfile] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidLibStrip] :: BuildOptsMonoid -> !FirstTrue
[buildMonoidExeStrip] :: BuildOptsMonoid -> !FirstTrue
[buildMonoidHaddock] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidHaddockOpts] :: BuildOptsMonoid -> !HaddockOptsMonoid
[buildMonoidOpenHaddocks] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidHaddockDeps] :: BuildOptsMonoid -> !First Bool
[buildMonoidHaddockInternal] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidHaddockHyperlinkSource] :: BuildOptsMonoid -> !FirstTrue
[buildMonoidInstallExes] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidInstallCompilerTool] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidPreFetch] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidKeepGoing] :: BuildOptsMonoid -> !First Bool
[buildMonoidKeepTmpFiles] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidForceDirty] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidTests] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidTestOpts] :: BuildOptsMonoid -> !TestOptsMonoid
[buildMonoidBenchmarks] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidBenchmarkOpts] :: BuildOptsMonoid -> !BenchmarkOptsMonoid
[buildMonoidReconfigure] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidCabalVerbose] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidSplitObjs] :: BuildOptsMonoid -> !FirstFalse
[buildMonoidSkipComponents] :: BuildOptsMonoid -> ![Text]
[buildMonoidInterleavedOutput] :: BuildOptsMonoid -> !FirstTrue
[buildMonoidDdumpDir] :: BuildOptsMonoid -> !First Text

-- | Options for the <tt>FinalAction</tt> <tt>DoTests</tt>
data TestOpts
TestOpts :: !Bool -> ![String] -> !Bool -> !Bool -> !Maybe Int -> TestOpts

-- | Whether successful tests will be run gain
[toRerunTests] :: TestOpts -> !Bool

-- | Arguments passed to the test program
[toAdditionalArgs] :: TestOpts -> ![String]

-- | Generate a code coverage report
[toCoverage] :: TestOpts -> !Bool

-- | Disable running of tests
[toDisableRun] :: TestOpts -> !Bool

-- | test suite timeout in seconds
[toMaximumTimeSeconds] :: TestOpts -> !Maybe Int
defaultTestOpts :: TestOpts
data TestOptsMonoid
TestOptsMonoid :: !FirstTrue -> ![String] -> !FirstFalse -> !FirstFalse -> !First (Maybe Int) -> TestOptsMonoid
[toMonoidRerunTests] :: TestOptsMonoid -> !FirstTrue
[toMonoidAdditionalArgs] :: TestOptsMonoid -> ![String]
[toMonoidCoverage] :: TestOptsMonoid -> !FirstFalse
[toMonoidDisableRun] :: TestOptsMonoid -> !FirstFalse
[toMonoidMaximumTimeSeconds] :: TestOptsMonoid -> !First (Maybe Int)

-- | Haddock Options
newtype HaddockOpts
HaddockOpts :: [String] -> HaddockOpts

-- | Arguments passed to haddock program
[hoAdditionalArgs] :: HaddockOpts -> [String]
defaultHaddockOpts :: HaddockOpts
newtype HaddockOptsMonoid
HaddockOptsMonoid :: [String] -> HaddockOptsMonoid
[hoMonoidAdditionalArgs] :: HaddockOptsMonoid -> [String]

-- | Options for the <tt>FinalAction</tt> <tt>DoBenchmarks</tt>
data BenchmarkOpts
BenchmarkOpts :: !Maybe String -> !Bool -> BenchmarkOpts

-- | Arguments passed to the benchmark program
[beoAdditionalArgs] :: BenchmarkOpts -> !Maybe String

-- | Disable running of benchmarks
[beoDisableRun] :: BenchmarkOpts -> !Bool
defaultBenchmarkOpts :: BenchmarkOpts
data BenchmarkOptsMonoid
BenchmarkOptsMonoid :: !First String -> !First Bool -> BenchmarkOptsMonoid
[beoMonoidAdditionalArgs] :: BenchmarkOptsMonoid -> !First String
[beoMonoidDisableRun] :: BenchmarkOptsMonoid -> !First Bool
data FileWatchOpts
NoFileWatch :: FileWatchOpts
FileWatch :: FileWatchOpts
FileWatchPoll :: FileWatchOpts

-- | Which subset of packages to build
data BuildSubset
BSAll :: BuildSubset

-- | Only install packages in the snapshot database, skipping packages
--   intended for the local database.
BSOnlySnapshot :: BuildSubset
BSOnlyDependencies :: BuildSubset

-- | Refuse to build anything in the snapshot database, see
--   <a>https://github.com/commercialhaskell/stack/issues/5272</a>
BSOnlyLocals :: BuildSubset

-- | How to apply a CLI flag
data ApplyCLIFlag

-- | Apply to all project packages which have such a flag name available.
ACFAllProjectPackages :: ApplyCLIFlag

-- | Apply to the specified package only.
ACFByName :: !PackageName -> ApplyCLIFlag

-- | Only flags set via <a>ACFByName</a>
boptsCLIFlagsByName :: BuildOptsCLI -> Map PackageName (Map FlagName Bool)
instance GHC.Classes.Ord Stack.Types.Config.Build.ApplyCLIFlag
instance GHC.Classes.Eq Stack.Types.Config.Build.ApplyCLIFlag
instance GHC.Show.Show Stack.Types.Config.Build.ApplyCLIFlag
instance GHC.Show.Show Stack.Types.Config.Build.BuildCommand
instance GHC.Classes.Eq Stack.Types.Config.Build.BuildCommand
instance GHC.Classes.Eq Stack.Types.Config.Build.BuildSubset
instance GHC.Show.Show Stack.Types.Config.Build.BuildSubset
instance GHC.Show.Show Stack.Types.Config.Build.TestOpts
instance GHC.Classes.Eq Stack.Types.Config.Build.TestOpts
instance GHC.Generics.Generic Stack.Types.Config.Build.TestOptsMonoid
instance GHC.Show.Show Stack.Types.Config.Build.TestOptsMonoid
instance GHC.Show.Show Stack.Types.Config.Build.HaddockOpts
instance GHC.Classes.Eq Stack.Types.Config.Build.HaddockOpts
instance GHC.Generics.Generic Stack.Types.Config.Build.HaddockOptsMonoid
instance GHC.Show.Show Stack.Types.Config.Build.HaddockOptsMonoid
instance GHC.Show.Show Stack.Types.Config.Build.BenchmarkOpts
instance GHC.Classes.Eq Stack.Types.Config.Build.BenchmarkOpts
instance GHC.Show.Show Stack.Types.Config.Build.BuildOpts
instance GHC.Generics.Generic Stack.Types.Config.Build.BenchmarkOptsMonoid
instance GHC.Show.Show Stack.Types.Config.Build.BenchmarkOptsMonoid
instance GHC.Generics.Generic Stack.Types.Config.Build.BuildOptsMonoid
instance GHC.Show.Show Stack.Types.Config.Build.BuildOptsMonoid
instance GHC.Classes.Eq Stack.Types.Config.Build.FileWatchOpts
instance GHC.Show.Show Stack.Types.Config.Build.FileWatchOpts
instance GHC.Show.Show Stack.Types.Config.Build.BuildOptsCLI
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.Build.BuildOptsMonoid)
instance GHC.Base.Semigroup Stack.Types.Config.Build.BuildOptsMonoid
instance GHC.Base.Monoid Stack.Types.Config.Build.BuildOptsMonoid
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.Build.BenchmarkOptsMonoid)
instance GHC.Base.Semigroup Stack.Types.Config.Build.BenchmarkOptsMonoid
instance GHC.Base.Monoid Stack.Types.Config.Build.BenchmarkOptsMonoid
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.Build.HaddockOptsMonoid)
instance GHC.Base.Semigroup Stack.Types.Config.Build.HaddockOptsMonoid
instance GHC.Base.Monoid Stack.Types.Config.Build.HaddockOptsMonoid
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.Build.TestOptsMonoid)
instance GHC.Base.Semigroup Stack.Types.Config.Build.TestOptsMonoid
instance GHC.Base.Monoid Stack.Types.Config.Build.TestOptsMonoid

module Stack.Options.PackageParser

-- | Parser for package:[-]flag
readFlag :: ReadM (Map ApplyCLIFlag (Map FlagName Bool))


-- | A ghc-pkg id.
module Stack.Types.GhcPkgId

-- | A ghc-pkg package identifier.
data GhcPkgId

-- | Get a text value of GHC package id
unGhcPkgId :: GhcPkgId -> Text

-- | A parser for a package-version-hash pair.
ghcPkgIdParser :: Parser GhcPkgId

-- | Convenient way to parse a package name from a <a>Text</a>.
parseGhcPkgId :: MonadThrow m => Text -> m GhcPkgId

-- | Get a string representation of GHC package id.
ghcPkgIdString :: GhcPkgId -> String
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Types.GhcPkgId.GhcPkgId
instance Database.Persist.Class.PersistField.PersistField Stack.Types.GhcPkgId.GhcPkgId
instance GHC.Generics.Generic Stack.Types.GhcPkgId.GhcPkgId
instance Data.Data.Data Stack.Types.GhcPkgId.GhcPkgId
instance GHC.Classes.Ord Stack.Types.GhcPkgId.GhcPkgId
instance GHC.Classes.Eq Stack.Types.GhcPkgId.GhcPkgId
instance Data.Hashable.Class.Hashable Stack.Types.GhcPkgId.GhcPkgId
instance Control.DeepSeq.NFData Stack.Types.GhcPkgId.GhcPkgId
instance GHC.Show.Show Stack.Types.GhcPkgId.GhcPkgId
instance GHC.Read.Read Stack.Types.GhcPkgId.GhcPkgId
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.GhcPkgId.GhcPkgId
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.GhcPkgId.GhcPkgId
instance GHC.Show.Show Stack.Types.GhcPkgId.GhcPkgIdParseFail
instance GHC.Exception.Type.Exception Stack.Types.GhcPkgId.GhcPkgIdParseFail

module Stack.Types.NamedComponent

-- | A single, fully resolved component of a package
data NamedComponent
CLib :: NamedComponent
CInternalLib :: !Text -> NamedComponent
CExe :: !Text -> NamedComponent
CTest :: !Text -> NamedComponent
CBench :: !Text -> NamedComponent
renderComponent :: NamedComponent -> Text
renderPkgComponents :: [(PackageName, NamedComponent)] -> Text
renderPkgComponent :: (PackageName, NamedComponent) -> Text
exeComponents :: Set NamedComponent -> Set Text
testComponents :: Set NamedComponent -> Set Text
benchComponents :: Set NamedComponent -> Set Text
internalLibComponents :: Set NamedComponent -> Set Text
isCLib :: NamedComponent -> Bool
isCInternalLib :: NamedComponent -> Bool
isCExe :: NamedComponent -> Bool
isCTest :: NamedComponent -> Bool
isCBench :: NamedComponent -> Bool
instance GHC.Classes.Ord Stack.Types.NamedComponent.NamedComponent
instance GHC.Classes.Eq Stack.Types.NamedComponent.NamedComponent
instance GHC.Show.Show Stack.Types.NamedComponent.NamedComponent


-- | Nix types.
module Stack.Types.Nix

-- | Nix configuration. Parameterize by resolver type to avoid cyclic
--   dependency.
data NixOpts
NixOpts :: !Bool -> !Bool -> ![Text] -> !Maybe FilePath -> ![Text] -> !Bool -> NixOpts
[nixEnable] :: NixOpts -> !Bool
[nixPureShell] :: NixOpts -> !Bool

-- | The system packages to be installed in the environment before it runs
[nixPackages] :: NixOpts -> ![Text]

-- | The path of a file containing preconfiguration of the environment (e.g
--   shell.nix)
[nixInitFile] :: NixOpts -> !Maybe FilePath

-- | Options to be given to the nix-shell command line
[nixShellOptions] :: NixOpts -> ![Text]

-- | Should we register gc roots so running nix-collect-garbage doesn't
--   remove nix dependencies
[nixAddGCRoots] :: NixOpts -> !Bool

-- | An uninterpreted representation of nix options. Configurations may be
--   "cascaded" using mappend (left-biased).
data NixOptsMonoid
NixOptsMonoid :: !First Bool -> !First Bool -> !First [Text] -> !First FilePath -> !First [Text] -> !First [Text] -> !FirstFalse -> NixOptsMonoid

-- | Is using nix-shell enabled?
[nixMonoidEnable] :: NixOptsMonoid -> !First Bool

-- | Should the nix-shell be pure
[nixMonoidPureShell] :: NixOptsMonoid -> !First Bool

-- | System packages to use (given to nix-shell)
[nixMonoidPackages] :: NixOptsMonoid -> !First [Text]

-- | The path of a file containing preconfiguration of the environment (e.g
--   shell.nix)
[nixMonoidInitFile] :: NixOptsMonoid -> !First FilePath

-- | Options to be given to the nix-shell command line
[nixMonoidShellOptions] :: NixOptsMonoid -> !First [Text]

-- | Override parts of NIX_PATH (notably <tt>nixpkgs</tt>)
[nixMonoidPath] :: NixOptsMonoid -> !First [Text]

-- | Should we register gc roots so running nix-collect-garbage doesn't
--   remove nix dependencies
[nixMonoidAddGCRoots] :: NixOptsMonoid -> !FirstFalse

-- | Nix enable argument name.
nixEnableArgName :: Text

-- | Nix run in pure shell argument name.
nixPureShellArgName :: Text

-- | Nix packages (build inputs) argument name.
nixPackagesArgName :: Text

-- | shell.nix file path argument name.
nixInitFileArgName :: Text

-- | Extra options for the nix-shell command argument name.
nixShellOptsArgName :: Text

-- | NIX_PATH override argument name
nixPathArgName :: Text

-- | Add GC roots arg name
nixAddGCRootsArgName :: Text
instance GHC.Show.Show Stack.Types.Nix.NixOpts
instance GHC.Generics.Generic Stack.Types.Nix.NixOptsMonoid
instance GHC.Show.Show Stack.Types.Nix.NixOptsMonoid
instance GHC.Classes.Eq Stack.Types.Nix.NixOptsMonoid
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Nix.NixOptsMonoid)
instance GHC.Base.Semigroup Stack.Types.Nix.NixOptsMonoid
instance GHC.Base.Monoid Stack.Types.Nix.NixOptsMonoid


-- | Names for packages.
module Stack.Types.PackageName

-- | An argument which accepts a template name of the format
--   <tt>foo.hsfiles</tt>.
packageNameArgument :: Mod ArgumentFields PackageName -> Parser PackageName

module Stack.Types.Resolver

-- | Either an actual resolver value, or an abstract description of one
--   (e.g., latest nightly).
data AbstractResolver
ARLatestNightly :: AbstractResolver
ARLatestLTS :: AbstractResolver
ARLatestLTSMajor :: !Int -> AbstractResolver
ARResolver :: !RawSnapshotLocation -> AbstractResolver
ARGlobal :: AbstractResolver
readAbstractResolver :: ReadM (Unresolved AbstractResolver)

-- | Most recent Nightly and newest LTS version per major release.
data Snapshots
Snapshots :: !Day -> !IntMap Int -> Snapshots
[snapshotsNightly] :: Snapshots -> !Day
[snapshotsLts] :: Snapshots -> !IntMap Int
instance GHC.Show.Show Stack.Types.Resolver.Snapshots
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Resolver.Snapshots
instance GHC.Exception.Type.Exception Stack.Types.Resolver.BuildPlanTypesException
instance GHC.Show.Show Stack.Types.Resolver.BuildPlanTypesException
instance GHC.Show.Show Stack.Types.Resolver.AbstractResolver
instance RIO.Prelude.Display.Display Stack.Types.Resolver.AbstractResolver

module Stack.Options.ResolverParser

-- | Parser for the resolver
abstractResolverOptsParser :: Bool -> Parser (Unresolved AbstractResolver)
compilerOptsParser :: Bool -> Parser WantedCompiler
readCompilerVersion :: ReadM WantedCompiler


-- | Template name handling.
module Stack.Types.TemplateName

-- | A template name.
data TemplateName

-- | Details for how to access a template from a remote repo.
data RepoTemplatePath
RepoTemplatePath :: RepoService -> Text -> Text -> RepoTemplatePath
[rtpService] :: RepoTemplatePath -> RepoService
[rtpUser] :: RepoTemplatePath -> Text
[rtpTemplate] :: RepoTemplatePath -> Text

-- | Services from which templates can be retrieved from a repository.
data RepoService
Github :: RepoService
Gitlab :: RepoService
Bitbucket :: RepoService
data TemplatePath

-- | an absolute path on the filesystem
AbsPath :: Path Abs File -> TemplatePath

-- | a relative path on the filesystem, or relative to the template
--   repository. To avoid path separator conversion on Windows, the raw
--   command-line parameter passed is also given as the first field
--   (possibly with <tt>.hsfiles</tt> appended).
RelPath :: String -> Path Rel File -> TemplatePath

-- | a full URL
UrlPath :: String -> TemplatePath
RepoPath :: RepoTemplatePath -> TemplatePath

-- | Get a text representation of the template name.
templateName :: TemplateName -> Text

-- | Get the path of the template.
templatePath :: TemplateName -> TemplatePath

-- | Parse a template name from a string.
parseTemplateNameFromString :: String -> Either String TemplateName

-- | Parses a template path of the form <tt>user/template</tt>, given a
--   service
parseRepoPathWithService :: RepoService -> Text -> Maybe RepoTemplatePath

-- | An argument which accepts a template name of the format
--   <tt>foo.hsfiles</tt> or <tt>foo</tt>, ultimately normalized to
--   <tt>foo</tt>.
templateNameArgument :: Mod ArgumentFields TemplateName -> Parser TemplateName

-- | An argument which accepts a <tt>key:value</tt> pair for specifying
--   parameters.
templateParamArgument :: Mod OptionFields (Text, Text) -> Parser (Text, Text)

-- | The default template name you can use if you don't have one.
defaultTemplateName :: TemplateName
instance GHC.Show.Show Stack.Types.TemplateName.RepoService
instance GHC.Classes.Ord Stack.Types.TemplateName.RepoService
instance GHC.Classes.Eq Stack.Types.TemplateName.RepoService
instance GHC.Show.Show Stack.Types.TemplateName.RepoTemplatePath
instance GHC.Classes.Ord Stack.Types.TemplateName.RepoTemplatePath
instance GHC.Classes.Eq Stack.Types.TemplateName.RepoTemplatePath
instance GHC.Show.Show Stack.Types.TemplateName.TemplatePath
instance GHC.Classes.Ord Stack.Types.TemplateName.TemplatePath
instance GHC.Classes.Eq Stack.Types.TemplateName.TemplatePath
instance GHC.Show.Show Stack.Types.TemplateName.TemplateName
instance GHC.Classes.Eq Stack.Types.TemplateName.TemplateName
instance GHC.Classes.Ord Stack.Types.TemplateName.TemplateName
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.TemplateName.TemplateName


-- | Versions for packages.
module Stack.Types.Version
data Version
data VersionRange
newtype IntersectingVersionRange
IntersectingVersionRange :: VersionRange -> IntersectingVersionRange
[getIntersectingVersionRange] :: IntersectingVersionRange -> VersionRange
data VersionCheck
MatchMinor :: VersionCheck
MatchExact :: VersionCheck
NewerMinor :: VersionCheck

-- | Display a version range
versionRangeText :: VersionRange -> Text
withinRange :: Version -> VersionRange -> Bool

-- | A modified intersection which also simplifies, for better display.
intersectVersionRanges :: VersionRange -> VersionRange -> VersionRange

-- | Returns the first two components, defaulting to 0 if not present
toMajorVersion :: Version -> Version

-- | Given a version range and a set of versions, find the latest version
--   from the set that is within the range.
latestApplicableVersion :: VersionRange -> Set Version -> Maybe Version
checkVersion :: VersionCheck -> Version -> Version -> Bool

-- | Get the next major version number for the given version
nextMajorVersion :: Version -> Version

-- | Get minor version (excludes any patchlevel)
minorVersion :: Version -> Version

-- | Current Stack version
stackVersion :: Version

-- | Current Stack minor version (excludes patchlevel)
stackMinorVersion :: Version
instance GHC.Show.Show Stack.Types.Version.IntersectingVersionRange
instance GHC.Classes.Ord Stack.Types.Version.VersionCheck
instance GHC.Classes.Eq Stack.Types.Version.VersionCheck
instance GHC.Show.Show Stack.Types.Version.VersionCheck
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Version.VersionCheck
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Version.VersionCheck
instance GHC.Base.Semigroup Stack.Types.Version.IntersectingVersionRange
instance GHC.Base.Monoid Stack.Types.Version.IntersectingVersionRange


-- | Docker types.
module Stack.Types.Docker

-- | Docker configuration.
data DockerOpts
DockerOpts :: !Bool -> !Either SomeException String -> !Bool -> !Maybe String -> !Maybe String -> !Bool -> !Bool -> !Bool -> !Maybe String -> !Maybe String -> ![String] -> ![Mount] -> !Maybe String -> ![String] -> !Maybe DockerStackExe -> !Maybe Bool -> !VersionRange -> DockerOpts

-- | Is using Docker enabled?
[dockerEnable] :: DockerOpts -> !Bool

-- | Exact Docker image tag or ID. Overrides docker-repo-*/tag.
[dockerImage] :: DockerOpts -> !Either SomeException String

-- | Does registry require login for pulls?
[dockerRegistryLogin] :: DockerOpts -> !Bool

-- | Optional username for Docker registry.
[dockerRegistryUsername] :: DockerOpts -> !Maybe String

-- | Optional password for Docker registry.
[dockerRegistryPassword] :: DockerOpts -> !Maybe String

-- | Automatically pull new images.
[dockerAutoPull] :: DockerOpts -> !Bool

-- | Whether to run a detached container
[dockerDetach] :: DockerOpts -> !Bool

-- | Create a persistent container (don't remove it when finished). Implied
--   by <a>dockerDetach</a>.
[dockerPersist] :: DockerOpts -> !Bool

-- | Container name to use, only makes sense from command-line with
--   <a>dockerPersist</a> or <a>dockerDetach</a>.
[dockerContainerName] :: DockerOpts -> !Maybe String

-- | The network docker uses.
[dockerNetwork] :: DockerOpts -> !Maybe String

-- | Arguments to pass directly to <tt>docker run</tt>.
[dockerRunArgs] :: DockerOpts -> ![String]

-- | Volumes to mount in the container.
[dockerMount] :: DockerOpts -> ![Mount]

-- | Volume mount mode
[dockerMountMode] :: DockerOpts -> !Maybe String

-- | Environment variables to set in the container.
[dockerEnv] :: DockerOpts -> ![String]

-- | Location of container-compatible stack executable
[dockerStackExe] :: DockerOpts -> !Maybe DockerStackExe

-- | Set in-container user to match host's
[dockerSetUser] :: DockerOpts -> !Maybe Bool

-- | Require a version of Docker within this range.
[dockerRequireDockerVersion] :: DockerOpts -> !VersionRange

-- | An uninterpreted representation of docker options. Configurations may
--   be "cascaded" using mappend (left-biased).
data DockerOptsMonoid
DockerOptsMonoid :: !Any -> !First Bool -> !First DockerMonoidRepoOrImage -> !First Bool -> !First String -> !First String -> !FirstTrue -> !FirstFalse -> !FirstFalse -> !First String -> !First String -> ![String] -> ![Mount] -> !First String -> ![String] -> !First DockerStackExe -> !First Bool -> !IntersectingVersionRange -> DockerOptsMonoid

-- | Should Docker be defaulted to enabled (does <tt>docker:</tt> section
--   exist in the config)?
[dockerMonoidDefaultEnable] :: DockerOptsMonoid -> !Any

-- | Is using Docker enabled?
[dockerMonoidEnable] :: DockerOptsMonoid -> !First Bool

-- | Docker repository name (e.g. <tt>fpco/stack-build</tt> or
--   <tt>fpco/stack-full:lts-2.8</tt>)
[dockerMonoidRepoOrImage] :: DockerOptsMonoid -> !First DockerMonoidRepoOrImage

-- | Does registry require login for pulls?
[dockerMonoidRegistryLogin] :: DockerOptsMonoid -> !First Bool

-- | Optional username for Docker registry.
[dockerMonoidRegistryUsername] :: DockerOptsMonoid -> !First String

-- | Optional password for Docker registry.
[dockerMonoidRegistryPassword] :: DockerOptsMonoid -> !First String

-- | Automatically pull new images.
[dockerMonoidAutoPull] :: DockerOptsMonoid -> !FirstTrue

-- | Whether to run a detached container
[dockerMonoidDetach] :: DockerOptsMonoid -> !FirstFalse

-- | Create a persistent container (don't remove it when finished). Implied
--   by <a>dockerDetach</a>.
[dockerMonoidPersist] :: DockerOptsMonoid -> !FirstFalse

-- | Container name to use, only makes sense from command-line with
--   <a>dockerPersist</a> or <a>dockerDetach</a>.
[dockerMonoidContainerName] :: DockerOptsMonoid -> !First String

-- | See: <a>dockerNetwork</a>
[dockerMonoidNetwork] :: DockerOptsMonoid -> !First String

-- | Arguments to pass directly to <tt>docker run</tt>
[dockerMonoidRunArgs] :: DockerOptsMonoid -> ![String]

-- | Volumes to mount in the container
[dockerMonoidMount] :: DockerOptsMonoid -> ![Mount]

-- | Volume mount mode
[dockerMonoidMountMode] :: DockerOptsMonoid -> !First String

-- | Environment variables to set in the container
[dockerMonoidEnv] :: DockerOptsMonoid -> ![String]

-- | Location of container-compatible stack executable
[dockerMonoidStackExe] :: DockerOptsMonoid -> !First DockerStackExe

-- | Set in-container user to match host's
[dockerMonoidSetUser] :: DockerOptsMonoid -> !First Bool

-- | See: <a>dockerRequireDockerVersion</a>
[dockerMonoidRequireDockerVersion] :: DockerOptsMonoid -> !IntersectingVersionRange

-- | Where to get the <tt>stack</tt> executable to run in Docker containers
data DockerStackExe

-- | Download from official bindist
DockerStackExeDownload :: DockerStackExe

-- | Host's <tt>stack</tt> (linux-x86_64 only)
DockerStackExeHost :: DockerStackExe

-- | Docker image's <tt>stack</tt> (versions must match)
DockerStackExeImage :: DockerStackExe

-- | Executable at given path
DockerStackExePath :: Path Abs File -> DockerStackExe

-- | Parse <a>DockerStackExe</a>.
parseDockerStackExe :: MonadThrow m => String -> m DockerStackExe

-- | Docker volume mount.
data Mount
Mount :: String -> String -> Mount

-- | Options for Docker repository or image.
data DockerMonoidRepoOrImage
DockerMonoidRepo :: String -> DockerMonoidRepoOrImage
DockerMonoidImage :: String -> DockerMonoidRepoOrImage

-- | Newtype for non-orphan FromJSON instance.
newtype VersionRangeJSON
VersionRangeJSON :: VersionRange -> VersionRangeJSON
[unVersionRangeJSON] :: VersionRangeJSON -> VersionRange

-- | Exceptions thrown by Stack.Docker.
data StackDockerException

-- | Docker must be enabled to use the command.
DockerMustBeEnabledException :: StackDockerException

-- | Command must be run on host OS (not in a container).
OnlyOnHostException :: StackDockerException

-- | <tt>docker inspect</tt> failed.
InspectFailedException :: String -> StackDockerException

-- | Image does not exist.
NotPulledException :: String -> StackDockerException

-- | Invalid output from <tt>docker images</tt>.
InvalidImagesOutputException :: String -> StackDockerException

-- | Invalid output from <tt>docker ps</tt>.
InvalidPSOutputException :: String -> StackDockerException

-- | Invalid output from <tt>docker inspect</tt>.
InvalidInspectOutputException :: String -> StackDockerException

-- | Could not pull a Docker image.
PullFailedException :: String -> StackDockerException

-- | Installed version of <tt>docker</tt> below minimum version.
DockerTooOldException :: Version -> Version -> StackDockerException

-- | Installed version of <tt>docker</tt> is prohibited.
DockerVersionProhibitedException :: [Version] -> Version -> StackDockerException

-- | Installed version of <tt>docker</tt> is out of range specified in
--   config file.
BadDockerVersionException :: VersionRange -> Version -> StackDockerException

-- | Invalid output from <tt>docker --version</tt>.
InvalidVersionOutputException :: StackDockerException

-- | Version of <tt>stack</tt> on host is too old for version in image.
HostStackTooOldException :: Version -> Maybe Version -> StackDockerException

-- | Version of <tt>stack</tt> in container/image is too old for version on
--   host.
ContainerStackTooOldException :: Version -> Version -> StackDockerException

-- | Can't determine the project root (where to put docker sandbox).
CannotDetermineProjectRootException :: StackDockerException

-- | <tt>docker --version</tt> failed.
DockerNotInstalledException :: StackDockerException

-- | Using host stack-exe on unsupported platform.
UnsupportedStackExeHostPlatformException :: StackDockerException

-- | <tt>stack-exe</tt> option fails to parse.
DockerStackExeParseException :: String -> StackDockerException

-- | Docker enable argument name.
dockerEnableArgName :: Text

-- | Docker repo arg argument name.
dockerRepoArgName :: Text

-- | Docker image argument name.
dockerImageArgName :: Text

-- | Docker registry login argument name.
dockerRegistryLoginArgName :: Text

-- | Docker registry username argument name.
dockerRegistryUsernameArgName :: Text

-- | Docker registry password argument name.
dockerRegistryPasswordArgName :: Text

-- | Docker auto-pull argument name.
dockerAutoPullArgName :: Text

-- | Docker detach argument name.
dockerDetachArgName :: Text

-- | Docker run args argument name.
dockerRunArgsArgName :: Text

-- | Docker mount argument name.
dockerMountArgName :: Text

-- | Docker mount mode argument name.
dockerMountModeArgName :: Text

-- | Docker environment variable argument name.
dockerEnvArgName :: Text

-- | Docker container name argument name.
dockerContainerNameArgName :: Text

-- | Docker container name argument name.
dockerNetworkArgName :: Text

-- | Docker persist argument name.
dockerPersistArgName :: Text

-- | Docker stack executable argument name.
dockerStackExeArgName :: Text

-- | Value for <tt>--docker-stack-exe=download</tt>
dockerStackExeDownloadVal :: String

-- | Value for <tt>--docker-stack-exe=host</tt>
dockerStackExeHostVal :: String

-- | Value for <tt>--docker-stack-exe=image</tt>
dockerStackExeImageVal :: String

-- | Docker <tt>set-user</tt> argument name
dockerSetUserArgName :: Text

-- | Docker <tt>require-version</tt> argument name
dockerRequireDockerVersionArgName :: Text

-- | Argument name used to pass docker entrypoint data (only used
--   internally)
dockerEntrypointArgName :: String

-- | Command-line argument for "docker"
dockerCmdName :: String
dockerHelpOptName :: String

-- | Command-line argument for <tt>docker pull</tt>.
dockerPullCmdName :: String

-- | Command-line option for <tt>--internal-re-exec-version</tt>.
reExecArgName :: String

-- | Platform that Docker containers run
dockerContainerPlatform :: Platform
instance GHC.Show.Show Stack.Types.Docker.DockerStackExe
instance GHC.Show.Show Stack.Types.Docker.DockerOpts
instance GHC.Show.Show Stack.Types.Docker.DockerMonoidRepoOrImage
instance GHC.Generics.Generic Stack.Types.Docker.DockerOptsMonoid
instance GHC.Show.Show Stack.Types.Docker.DockerOptsMonoid
instance GHC.Exception.Type.Exception Stack.Types.Docker.StackDockerException
instance GHC.Show.Show Stack.Types.Docker.StackDockerException
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Docker.DockerOptsMonoid)
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Docker.VersionRangeJSON
instance GHC.Base.Semigroup Stack.Types.Docker.DockerOptsMonoid
instance GHC.Base.Monoid Stack.Types.Docker.DockerOptsMonoid
instance GHC.Read.Read Stack.Types.Docker.Mount
instance GHC.Show.Show Stack.Types.Docker.Mount
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Docker.Mount
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Docker.DockerStackExe

module Stack.Types.Compiler

-- | Specifies a compiler and its version number(s).
--   
--   Note that despite having this datatype, stack isn't in a hurry to
--   support compilers other than GHC.
data ActualCompiler
ACGhc :: !Version -> ActualCompiler
ACGhcGit :: !Text -> !Text -> ActualCompiler

-- | Variety of compiler to use.
data WhichCompiler
Ghc :: WhichCompiler

-- | Repository containing the compiler sources
newtype CompilerRepository
CompilerRepository :: Text -> CompilerRepository
data CompilerException
GhcjsNotSupported :: CompilerException
PantryException :: PantryException -> CompilerException
defaultCompilerRepository :: CompilerRepository
getGhcVersion :: ActualCompiler -> Version
whichCompiler :: ActualCompiler -> WhichCompiler
compilerVersionText :: ActualCompiler -> Text
compilerVersionString :: ActualCompiler -> String
isWantedCompiler :: VersionCheck -> WantedCompiler -> ActualCompiler -> Bool
wantedToActual :: WantedCompiler -> Either CompilerException ActualCompiler
actualToWanted :: ActualCompiler -> WantedCompiler
parseActualCompiler :: Text -> Either CompilerException ActualCompiler
instance GHC.Classes.Ord Stack.Types.Compiler.WhichCompiler
instance GHC.Classes.Eq Stack.Types.Compiler.WhichCompiler
instance GHC.Show.Show Stack.Types.Compiler.WhichCompiler
instance Data.Data.Data Stack.Types.Compiler.ActualCompiler
instance GHC.Classes.Ord Stack.Types.Compiler.ActualCompiler
instance GHC.Classes.Eq Stack.Types.Compiler.ActualCompiler
instance GHC.Show.Show Stack.Types.Compiler.ActualCompiler
instance GHC.Generics.Generic Stack.Types.Compiler.ActualCompiler
instance GHC.Show.Show Stack.Types.Compiler.CompilerRepository
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Compiler.CompilerRepository
instance GHC.Show.Show Stack.Types.Compiler.CompilerException
instance GHC.Exception.Type.Exception Stack.Types.Compiler.CompilerException
instance Control.DeepSeq.NFData Stack.Types.Compiler.ActualCompiler
instance RIO.Prelude.Display.Display Stack.Types.Compiler.ActualCompiler
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Compiler.ActualCompiler
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Compiler.ActualCompiler
instance Data.Aeson.Types.FromJSON.FromJSONKey Stack.Types.Compiler.ActualCompiler
instance Database.Persist.Class.PersistField.PersistField Stack.Types.Compiler.ActualCompiler
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Types.Compiler.ActualCompiler


-- | A sourcemap maps a package name to how it should be built, including
--   source code, flags, options, etc. This module contains various stages
--   of source map construction. See the <tt>build_overview.md</tt> doc for
--   details on these stages.
module Stack.Types.SourceMap

-- | A source map with information on the wanted (but not actual) compiler.
--   This is derived by parsing the <tt>stack.yaml</tt> file for
--   <tt>packages</tt>, <tt>extra-deps</tt>, their configuration (e.g.,
--   flags and options), and parsing the snapshot it refers to. It does not
--   include global packages or any information from the command line.
--   
--   Invariant: a <tt>PackageName</tt> appears in either <a>smwProject</a>
--   or <a>smwDeps</a>, but not both.
data SMWanted
SMWanted :: !WantedCompiler -> !Map PackageName ProjectPackage -> !Map PackageName DepPackage -> !RawSnapshotLocation -> SMWanted
[smwCompiler] :: SMWanted -> !WantedCompiler
[smwProject] :: SMWanted -> !Map PackageName ProjectPackage
[smwDeps] :: SMWanted -> !Map PackageName DepPackage

-- | Where this snapshot is loaded from.
[smwSnapshotLocation] :: SMWanted -> !RawSnapshotLocation

-- | Adds in actual compiler information to <a>SMWanted</a>, in particular
--   the contents of the global package database.
--   
--   Invariant: a <tt>PackageName</tt> appears in only one of the
--   <tt>Map</tt>s.
data SMActual global
SMActual :: !ActualCompiler -> !Map PackageName ProjectPackage -> !Map PackageName DepPackage -> !Map PackageName global -> SMActual global
[smaCompiler] :: SMActual global -> !ActualCompiler
[smaProject] :: SMActual global -> !Map PackageName ProjectPackage
[smaDeps] :: SMActual global -> !Map PackageName DepPackage
[smaGlobal] :: SMActual global -> !Map PackageName global

-- | How a package is intended to be built
data Target

-- | Build all of the default components.
TargetAll :: !PackageType -> Target

-- | Only build specific components
TargetComps :: !Set NamedComponent -> Target
data PackageType
PTProject :: PackageType
PTDependency :: PackageType

-- | Builds on an <a>SMActual</a> by resolving the targets specified on the
--   command line, potentially adding in new dependency packages in the
--   process.
data SMTargets
SMTargets :: !Map PackageName Target -> !Map PackageName DepPackage -> SMTargets
[smtTargets] :: SMTargets -> !Map PackageName Target
[smtDeps] :: SMTargets -> !Map PackageName DepPackage

-- | The final source map, taking an <a>SMTargets</a> and applying all
--   command line flags and GHC options.
data SourceMap
SourceMap :: !SMTargets -> !ActualCompiler -> !Map PackageName ProjectPackage -> !Map PackageName DepPackage -> !Map PackageName GlobalPackage -> SourceMap

-- | Doesn't need to be included in the hash, does not affect the source
--   map.
[smTargets] :: SourceMap -> !SMTargets

-- | Need to hash the compiler version _and_ its installation path. Ideally
--   there would be some kind of output from GHC telling us some unique ID
--   for the compiler itself.
[smCompiler] :: SourceMap -> !ActualCompiler

-- | Doesn't need to be included in hash, doesn't affect any of the
--   packages that get stored in the snapshot database.
[smProject] :: SourceMap -> !Map PackageName ProjectPackage

-- | Need to hash all of the immutable dependencies, can ignore the mutable
--   dependencies.
[smDeps] :: SourceMap -> !Map PackageName DepPackage

-- | Doesn't actually need to be hashed, implicitly captured by smCompiler.
--   Can be broken if someone installs new global packages. We can document
--   that as not supported, _or_ we could actually include all of this in
--   the hash and make Stack more resilient.
[smGlobal] :: SourceMap -> !Map PackageName GlobalPackage

-- | Flag showing if package comes from a snapshot needed to ignore
--   dependency bounds between such packages
data FromSnapshot
FromSnapshot :: FromSnapshot
NotFromSnapshot :: FromSnapshot

-- | A view of a dependency package, specified in stack.yaml
data DepPackage
DepPackage :: !CommonPackage -> !PackageLocation -> !Bool -> !FromSnapshot -> DepPackage
[dpCommon] :: DepPackage -> !CommonPackage
[dpLocation] :: DepPackage -> !PackageLocation

-- | Should the package be hidden after registering? Affects the script
--   interpreter's module name import parser.
[dpHidden] :: DepPackage -> !Bool

-- | Needed to ignore bounds between snapshot packages See
--   <a>https://github.com/commercialhaskell/stackage/issues/3185</a>
[dpFromSnapshot] :: DepPackage -> !FromSnapshot

-- | A view of a project package needed for resolving components
data ProjectPackage
ProjectPackage :: !CommonPackage -> !Path Abs File -> !ResolvedPath Dir -> ProjectPackage
[ppCommon] :: ProjectPackage -> !CommonPackage
[ppCabalFP] :: ProjectPackage -> !Path Abs File
[ppResolvedDir] :: ProjectPackage -> !ResolvedPath Dir

-- | Common settings for both dependency and project package.
data CommonPackage
CommonPackage :: !IO GenericPackageDescription -> !PackageName -> !Map FlagName Bool -> ![Text] -> ![Text] -> !Bool -> CommonPackage
[cpGPD] :: CommonPackage -> !IO GenericPackageDescription
[cpName] :: CommonPackage -> !PackageName

-- | overrides default flags
[cpFlags] :: CommonPackage -> !Map FlagName Bool
[cpGhcOptions] :: CommonPackage -> ![Text]
[cpCabalConfigOpts] :: CommonPackage -> ![Text]
[cpHaddocks] :: CommonPackage -> !Bool
newtype GlobalPackageVersion
GlobalPackageVersion :: Version -> GlobalPackageVersion

-- | A view of a package installed in the global package database also
--   could include marker for a replaced global package (could be replaced
--   because of a replaced dependency)
data GlobalPackage
GlobalPackage :: !Version -> GlobalPackage
ReplacedGlobalPackage :: ![PackageName] -> GlobalPackage
isReplacedGlobal :: GlobalPackage -> Bool

-- | A unique hash for the immutable portions of a <a>SourceMap</a>.
newtype SourceMapHash
SourceMapHash :: SHA256 -> SourceMapHash

-- | Returns relative directory name with source map's hash
smRelDir :: MonadThrow m => SourceMapHash -> m (Path Rel Dir)
instance GHC.Show.Show Stack.Types.SourceMap.FromSnapshot
instance GHC.Classes.Eq Stack.Types.SourceMap.GlobalPackage
instance GHC.Show.Show Stack.Types.SourceMap.PackageType
instance GHC.Classes.Eq Stack.Types.SourceMap.PackageType

module Stack.Types.VersionIntervals
data VersionIntervals
toVersionRange :: VersionIntervals -> VersionRange
fromVersionRange :: VersionRange -> VersionIntervals
withinIntervals :: Version -> VersionIntervals -> Bool
unionVersionIntervals :: VersionIntervals -> VersionIntervals -> VersionIntervals
intersectVersionIntervals :: VersionIntervals -> VersionIntervals -> VersionIntervals
instance Data.Data.Data Stack.Types.VersionIntervals.Bound
instance GHC.Classes.Eq Stack.Types.VersionIntervals.Bound
instance GHC.Show.Show Stack.Types.VersionIntervals.Bound
instance GHC.Generics.Generic Stack.Types.VersionIntervals.Bound
instance Data.Data.Data Stack.Types.VersionIntervals.VersionInterval
instance GHC.Classes.Eq Stack.Types.VersionIntervals.VersionInterval
instance GHC.Show.Show Stack.Types.VersionIntervals.VersionInterval
instance GHC.Generics.Generic Stack.Types.VersionIntervals.VersionInterval
instance Data.Data.Data Stack.Types.VersionIntervals.VersionIntervals
instance GHC.Classes.Eq Stack.Types.VersionIntervals.VersionIntervals
instance GHC.Show.Show Stack.Types.VersionIntervals.VersionIntervals
instance GHC.Generics.Generic Stack.Types.VersionIntervals.VersionIntervals
instance Control.DeepSeq.NFData Stack.Types.VersionIntervals.VersionIntervals
instance Control.DeepSeq.NFData Stack.Types.VersionIntervals.VersionInterval
instance Control.DeepSeq.NFData Stack.Types.VersionIntervals.Bound

module Stack.Unpack

-- | Intended to work for the command line command.
unpackPackages :: forall env. (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Maybe RawSnapshot -> Path Abs Dir -> [String] -> RIO env ()
instance GHC.Exception.Type.Exception Stack.Unpack.UnpackException
instance GHC.Show.Show Stack.Unpack.UnpackException

module System.Info.ShortPathName
getShortPathName :: FilePath -> IO FilePath

module System.Permissions
setScriptPerms :: MonadIO m => FilePath -> m ()

-- | True if using Windows OS.
osIsWindows :: Bool
setFileExecutable :: MonadIO m => FilePath -> m ()


-- | Constants used throughout the project.
module Stack.Constants

-- | Path where build plans are stored.
buildPlanDir :: Path Abs Dir -> Path Abs Dir

-- | Path where binary caches of the build plans are stored.
buildPlanCacheDir :: Path Abs Dir -> Path Abs Dir

-- | Extensions used for Haskell modules. Excludes preprocessor ones.
haskellFileExts :: [Text]

-- | Extensions for modules that are preprocessed by common preprocessors.
haskellDefaultPreprocessorExts :: [Text]

-- | The filename used for the stack config file.
stackDotYaml :: Path Rel File

-- | Environment variable used to override the '.stack-work' relative dir.
stackWorkEnvVar :: String

-- | Environment variable used to override the '~/.stack' location.
stackRootEnvVar :: String

-- | Option name for the global stack root.
stackRootOptionName :: String

-- | Deprecated option name for the global stack root.
--   
--   Deprecated since stack-1.1.0.
--   
--   TODO: Remove occurrences of this variable and use
--   <a>stackRootOptionName</a> only after an appropriate deprecation
--   period.
deprecatedStackRootOptionName :: String

-- | Environment variable used to indicate stack is running in container.
inContainerEnvVar :: String

-- | Environment variable used to indicate stack is running in container.
--   although we already have STACK_IN_NIX_EXTRA_ARGS that is set in the
--   same conditions, it can happen that STACK_IN_NIX_EXTRA_ARGS is set to
--   empty.
inNixShellEnvVar :: String

-- | Name of the <tt>stack</tt> program, uppercased
stackProgNameUpper :: String
wiredInPackages :: Set PackageName

-- | Just to avoid repetition and magic strings.
cabalPackageName :: PackageName

-- | Deprecated implicit global project directory used when outside of a
--   project.
implicitGlobalProjectDirDeprecated :: Path Abs Dir -> Path Abs Dir

-- | Implicit global project directory used when outside of a project.
--   Normally, <tt>getImplicitGlobalProjectDir</tt> should be used instead.
implicitGlobalProjectDir :: Path Abs Dir -> Path Abs Dir

-- | Deprecated default global config path.
defaultUserConfigPathDeprecated :: Path Abs Dir -> Path Abs File

-- | Default global config path. Normally,
--   <tt>getDefaultUserConfigPath</tt> should be used instead.
defaultUserConfigPath :: Path Abs Dir -> Path Abs File

-- | Deprecated default global config path. Note that this will be
--   <tt>Nothing</tt> on Windows, which is by design.
defaultGlobalConfigPathDeprecated :: Maybe (Path Abs File)

-- | Default global config path. Normally,
--   <tt>getDefaultGlobalConfigPath</tt> should be used instead. Note that
--   this will be <tt>Nothing</tt> on Windows, which is by design.
defaultGlobalConfigPath :: Maybe (Path Abs File)

-- | Environment variable that stores a variant to append to
--   platform-specific directory names. Used to ensure incompatible
--   binaries aren't shared between Docker builds and host
platformVariantEnvVar :: String

-- | Provides --ghc-options for <a>Ghc</a>
compilerOptionsCabalFlag :: WhichCompiler -> String

-- | The flag to pass to GHC when we want to force its output to be
--   colorized.
ghcColorForceFlag :: String

-- | The minimum allowed terminal width. Used for pretty-printing.
minTerminalWidth :: Int

-- | The maximum allowed terminal width. Used for pretty-printing.
maxTerminalWidth :: Int

-- | The default terminal width. Used for pretty-printing when we can't
--   automatically detect it and when the user doesn't supply one.
defaultTerminalWidth :: Int

-- | True if using Windows OS.
osIsWindows :: Bool
relFileSetupHs :: Path Rel File
relFileSetupLhs :: Path Rel File
relFileHpackPackageConfig :: Path Rel File
relDirGlobalAutogen :: Path Rel Dir
relDirAutogen :: Path Rel Dir
relDirLogs :: Path Rel Dir
relFileCabalMacrosH :: Path Rel File
relDirBuild :: Path Rel Dir
relDirBin :: Path Rel Dir
relDirPantry :: Path Rel Dir
relDirPrograms :: Path Rel Dir
relDirUpperPrograms :: Path Rel Dir
relDirStackProgName :: Path Rel Dir
relDirStackWork :: Path Rel Dir
relFileReadmeTxt :: Path Rel File
relDirScript :: Path Rel Dir
relFileConfigYaml :: Path Rel File
relDirSnapshots :: Path Rel Dir
relDirGlobalHints :: Path Rel Dir
relFileGlobalHintsYaml :: Path Rel File
relDirInstall :: Path Rel Dir
relDirCompilerTools :: Path Rel Dir
relDirHoogle :: Path Rel Dir
relFileDatabaseHoo :: Path Rel File
relDirPkgdb :: Path Rel Dir
relFileStorage :: Path Rel File
relDirLoadedSnapshotCache :: Path Rel Dir

-- | Suffix applied to an installation root to get the bin dir
bindirSuffix :: Path Rel Dir

-- | Suffix applied to an installation root to get the doc dir
docDirSuffix :: Path Rel Dir
relDirHpc :: Path Rel Dir
relDirLib :: Path Rel Dir
relDirShare :: Path Rel Dir
relDirLibexec :: Path Rel Dir
relDirEtc :: Path Rel Dir
setupGhciShimCode :: Builder
relDirSetupExeCache :: Path Rel Dir
relDirSetupExeSrc :: Path Rel Dir
relFileConfigure :: Path Rel File
relDirDist :: Path Rel Dir
relFileSetupMacrosH :: Path Rel File
relDirSetup :: Path Rel Dir
relFileSetupLower :: Path Rel File
relDirMingw :: Path Rel Dir
relDirMingw32 :: Path Rel Dir
relDirMingw64 :: Path Rel Dir
relDirLocal :: Path Rel Dir
relDirUsr :: Path Rel Dir
relDirInclude :: Path Rel Dir
relFileIndexHtml :: Path Rel File
relDirAll :: Path Rel Dir
relFilePackageCache :: Path Rel File
relFileDockerfile :: Path Rel File
relDirHaskellStackGhci :: Path Rel Dir
relFileGhciScript :: Path Rel File
relDirCombined :: Path Rel Dir
relFileHpcIndexHtml :: Path Rel File
relDirCustom :: Path Rel Dir
relDirPackageConfInplace :: Path Rel Dir
relDirExtraTixFiles :: Path Rel Dir
relDirInstalledPackages :: Path Rel Dir
backupUrlRelPath :: Path Rel File
relDirDotLocal :: Path Rel Dir
relDirDotSsh :: Path Rel Dir
relDirDotStackProgName :: Path Rel Dir
relDirUnderHome :: Path Rel Dir
relDirSrc :: Path Rel Dir
relFileLibtinfoSo5 :: Path Rel File
relFileLibtinfoSo6 :: Path Rel File
relFileLibncurseswSo6 :: Path Rel File
relFileLibgmpSo10 :: Path Rel File
relFileLibgmpSo3 :: Path Rel File
relDirNewCabal :: Path Rel Dir
relFileSetupExe :: Path Rel File
relFileSetupUpper :: Path Rel File
relFile7zexe :: Path Rel File
relFile7zdll :: Path Rel File
relFileMainHs :: Path Rel File
relFileStack :: Path Rel File
relFileStackDotExe :: Path Rel File
relFileStackDotTmpDotExe :: Path Rel File
relFileStackDotTmp :: Path Rel File
ghcShowOptionsOutput :: [String]

-- | Relative paths inside a GHC repo to the Hadrian build batch script.
--   The second path is maintained for compatibility with older GHC
--   versions.
hadrianScriptsWindows :: [Path Rel File]

-- | Relative paths inside a GHC repo to the Hadrian build shell script The
--   second path is maintained for compatibility with older GHC versions.
hadrianScriptsPosix :: [Path Rel File]

-- | Used in Stack.Setup for detecting libtinfo, see comments at use site
usrLibDirs :: [Path Abs Dir]

-- | Relative file path for a temporary GHC environment file for tests
testGhcEnvRelFile :: Path Rel File

-- | File inside a dist directory to use for locking
relFileBuildLock :: Path Rel File

-- | What should the default be for stack-developer-mode
stackDeveloperModeDefault :: Bool


-- | The Config type.
module Stack.Types.Config

-- | Class for environment values which have a Platform
class HasPlatform env
platformL :: HasPlatform env => Lens' env Platform
platformL :: (HasPlatform env, HasConfig env) => Lens' env Platform
platformVariantL :: HasPlatform env => Lens' env PlatformVariant
platformVariantL :: (HasPlatform env, HasConfig env) => Lens' env PlatformVariant

-- | A variant of the platform, used to differentiate Docker builds from
--   host
data PlatformVariant
PlatformVariantNone :: PlatformVariant
PlatformVariant :: String -> PlatformVariant

-- | Class for environment values which have a <a>Runner</a>.
class (HasProcessContext env, HasLogFunc env) => HasRunner env
runnerL :: HasRunner env => Lens' env Runner

-- | The base environment that almost everything in Stack runs in, based
--   off of parsing command line options in <a>GlobalOpts</a>. Provides
--   logging and process execution.
data Runner
Runner :: !GlobalOpts -> !Bool -> !LogFunc -> !Int -> !ProcessContext -> Runner
[runnerGlobalOpts] :: Runner -> !GlobalOpts
[runnerUseColor] :: Runner -> !Bool
[runnerLogFunc] :: Runner -> !LogFunc
[runnerTermWidth] :: Runner -> !Int
[runnerProcessContext] :: Runner -> !ProcessContext
data ColorWhen
ColorNever :: ColorWhen
ColorAlways :: ColorWhen
ColorAuto :: ColorWhen

-- | See <a>globalTerminal</a>
terminalL :: HasRunner env => Lens' env Bool

-- | See <a>globalReExecVersion</a>
reExecL :: HasRunner env => SimpleGetter env Bool

-- | The top-level Stackage configuration.
data Config
Config :: !Path Rel Dir -> !Path Abs File -> !BuildOpts -> !DockerOpts -> !NixOpts -> !EnvSettings -> IO ProcessContext -> !Path Abs Dir -> !Path Abs Dir -> !Bool -> !Bool -> !Platform -> !PlatformVariant -> !Maybe GHCVariant -> !Maybe CompilerBuild -> !Text -> !Bool -> !Bool -> !Bool -> !Bool -> !VersionCheck -> !CompilerRepository -> !Path Abs Dir -> !VersionRange -> !Int -> !Maybe (Path Abs File) -> ![FilePath] -> ![FilePath] -> ![Text] -> !Bool -> !Map Text Text -> !Maybe SCM -> !Map PackageName [Text] -> !Map ApplyGhcOptions [Text] -> !Map CabalConfigKey [Text] -> ![String] -> !SetupInfo -> !PvpBounds -> !Bool -> !Bool -> !ApplyGhcOptions -> !Bool -> !Maybe TemplateName -> !Bool -> !DumpLogs -> !ProjectConfig (Project, Path Abs File) -> !Bool -> !Bool -> !Text -> !Runner -> !PantryConfig -> !Path Abs Dir -> !Maybe AbstractResolver -> !UserStorage -> !Bool -> !Bool -> !Bool -> Config

-- | this allows to override .stack-work directory
[configWorkDir] :: Config -> !Path Rel Dir

-- | Path to user configuration file (usually ~<i>.stack</i>config.yaml)
[configUserConfigPath] :: Config -> !Path Abs File

-- | Build configuration
[configBuild] :: Config -> !BuildOpts

-- | Docker configuration
[configDocker] :: Config -> !DockerOpts

-- | Execution environment (e.g nix-shell) configuration
[configNix] :: Config -> !NixOpts

-- | Environment variables to be passed to external tools
[configProcessContextSettings] :: Config -> !EnvSettings -> IO ProcessContext

-- | Non-platform-specific path containing local installations
[configLocalProgramsBase] :: Config -> !Path Abs Dir

-- | Path containing local installations (mainly GHC)
[configLocalPrograms] :: Config -> !Path Abs Dir

-- | Hide the Template Haskell "Loading package ..." messages from the
--   console
[configHideTHLoading] :: Config -> !Bool

-- | Prefix build output with timestamps for each line.
[configPrefixTimestamps] :: Config -> !Bool

-- | The platform we're building for, used in many directory names
[configPlatform] :: Config -> !Platform

-- | Variant of the platform, also used in directory names
[configPlatformVariant] :: Config -> !PlatformVariant

-- | The variant of GHC requested by the user.
[configGHCVariant] :: Config -> !Maybe GHCVariant

-- | Override build of the compiler distribution (e.g. standard, gmp4,
--   tinfo6)
[configGHCBuild] :: Config -> !Maybe CompilerBuild

-- | URL of a JSON file providing the latest LTS and Nightly snapshots.
[configLatestSnapshot] :: Config -> !Text

-- | Should we use the system-installed GHC (on the PATH) if available? Can
--   be overridden by command line options.
[configSystemGHC] :: Config -> !Bool

-- | Should we automatically install GHC if missing or the wrong version is
--   available? Can be overridden by command line options.
[configInstallGHC] :: Config -> !Bool

-- | Don't bother checking the GHC version or architecture.
[configSkipGHCCheck] :: Config -> !Bool

-- | On Windows: don't use a sandboxed MSYS
[configSkipMsys] :: Config -> !Bool

-- | Specifies which versions of the compiler are acceptable.
[configCompilerCheck] :: Config -> !VersionCheck

-- | Specifies the repository containing the compiler sources
[configCompilerRepository] :: Config -> !CompilerRepository

-- | Directory we should install executables into
[configLocalBin] :: Config -> !Path Abs Dir

-- | Require a version of stack within this range.
[configRequireStackVersion] :: Config -> !VersionRange

-- | How many concurrent jobs to run, defaults to number of capabilities
[configJobs] :: Config -> !Int

-- | Optional gcc override path
[configOverrideGccPath] :: Config -> !Maybe (Path Abs File)

-- | <ul>
--   <li>-extra-include-dirs arguments</li>
--   </ul>
[configExtraIncludeDirs] :: Config -> ![FilePath]

-- | <ul>
--   <li>-extra-lib-dirs arguments</li>
--   </ul>
[configExtraLibDirs] :: Config -> ![FilePath]

-- | List of custom preprocessors to complete the hard coded ones
[configCustomPreprocessorExts] :: Config -> ![Text]

-- | Run test suites concurrently
[configConcurrentTests] :: Config -> !Bool

-- | Parameters for templates.
[configTemplateParams] :: Config -> !Map Text Text

-- | Initialize SCM (e.g. git) when creating new projects.
[configScmInit] :: Config -> !Maybe SCM

-- | Additional GHC options to apply to specific packages.
[configGhcOptionsByName] :: Config -> !Map PackageName [Text]

-- | Additional GHC options to apply to categories of packages
[configGhcOptionsByCat] :: Config -> !Map ApplyGhcOptions [Text]

-- | Additional options to be passed to ./Setup.hs configure
[configCabalConfigOpts] :: Config -> !Map CabalConfigKey [Text]

-- | URLs or paths to stack-setup.yaml files, for finding tools. If none
--   present, the default setup-info is used.
[configSetupInfoLocations] :: Config -> ![String]

-- | Additional SetupInfo to use to find tools.
[configSetupInfoInline] :: Config -> !SetupInfo

-- | How PVP upper bounds should be added to packages
[configPvpBounds] :: Config -> !PvpBounds

-- | Force the code page to UTF-8 on Windows
[configModifyCodePage] :: Config -> !Bool

-- | Rebuild on GHC options changes
[configRebuildGhcOptions] :: Config -> !Bool

-- | Which packages to ghc-options on the command line apply to?
[configApplyGhcOptions] :: Config -> !ApplyGhcOptions

-- | Ignore version ranges in .cabal files. Funny naming chosen to match
--   cabal.
[configAllowNewer] :: Config -> !Bool

-- | The default template to use when none is specified. (If Nothing, the
--   default default is used.)
[configDefaultTemplate] :: Config -> !Maybe TemplateName

-- | Allow users other than the stack root owner to use the stack
--   installation.
[configAllowDifferentUser] :: Config -> !Bool

-- | Dump logs of local non-dependencies when doing a build.
[configDumpLogs] :: Config -> !DumpLogs

-- | Project information and stack.yaml file location
[configProject] :: Config -> !ProjectConfig (Project, Path Abs File)

-- | Are we allowed to build local packages? The script command disallows
--   this.
[configAllowLocals] :: Config -> !Bool

-- | Should we save Hackage credentials to a file?
[configSaveHackageCreds] :: Config -> !Bool

-- | Hackage base URL used when uploading packages
[configHackageBaseUrl] :: Config -> !Text
[configRunner] :: Config -> !Runner
[configPantryConfig] :: Config -> !PantryConfig
[configStackRoot] :: Config -> !Path Abs Dir

-- | Any resolver override from the command line
[configResolver] :: Config -> !Maybe AbstractResolver

-- | Database connection pool for user Stack database
[configUserStorage] :: Config -> !UserStorage

-- | Enable GHC hiding source paths?
[configHideSourcePaths] :: Config -> !Bool

-- | Recommend a Stack upgrade?
[configRecommendUpgrade] :: Config -> !Bool

-- | Turn on Stack developer mode for additional messages?
[configStackDeveloperMode] :: Config -> !Bool

-- | Class for environment values that can provide a <a>Config</a>.
class (HasPlatform env, HasGHCVariant env, HasProcessContext env, HasPantryConfig env, HasTerm env, HasRunner env) => HasConfig env
configL :: HasConfig env => Lens' env Config
configL :: (HasConfig env, HasBuildConfig env) => Lens' env Config

-- | Get the URL to request the information on the latest snapshots
askLatestSnapshotUrl :: (MonadReader env m, HasConfig env) => m Text

-- | The project root directory, if in a project.
configProjectRoot :: Config -> Maybe (Path Abs Dir)

-- | A superset of <a>Config</a> adding information on how to build code.
--   The reason for this breakdown is because we will need some of the
--   information from <a>Config</a> in order to determine the values here.
--   
--   These are the components which know nothing about local configuration.
data BuildConfig
BuildConfig :: !Config -> !SMWanted -> ![Path Abs Dir] -> !Path Abs File -> !ProjectStorage -> !Maybe Curator -> BuildConfig
[bcConfig] :: BuildConfig -> !Config
[bcSMWanted] :: BuildConfig -> !SMWanted

-- | Extra package databases
[bcExtraPackageDBs] :: BuildConfig -> ![Path Abs Dir]

-- | Location of the stack.yaml file.
--   
--   Note: if the STACK_YAML environment variable is used, this may be
--   different from projectRootL <a>/</a> "stack.yaml" if a different file
--   name is used.
[bcStackYaml] :: BuildConfig -> !Path Abs File

-- | Database connection pool for project Stack database
[bcProjectStorage] :: BuildConfig -> !ProjectStorage
[bcCurator] :: BuildConfig -> !Maybe Curator

-- | A view of a project package needed for resolving components
data ProjectPackage
ProjectPackage :: !CommonPackage -> !Path Abs File -> !ResolvedPath Dir -> ProjectPackage
[ppCommon] :: ProjectPackage -> !CommonPackage
[ppCabalFP] :: ProjectPackage -> !Path Abs File
[ppResolvedDir] :: ProjectPackage -> !ResolvedPath Dir

-- | A view of a dependency package, specified in stack.yaml
data DepPackage
DepPackage :: !CommonPackage -> !PackageLocation -> !Bool -> !FromSnapshot -> DepPackage
[dpCommon] :: DepPackage -> !CommonPackage
[dpLocation] :: DepPackage -> !PackageLocation

-- | Should the package be hidden after registering? Affects the script
--   interpreter's module name import parser.
[dpHidden] :: DepPackage -> !Bool

-- | Needed to ignore bounds between snapshot packages See
--   <a>https://github.com/commercialhaskell/stackage/issues/3185</a>
[dpFromSnapshot] :: DepPackage -> !FromSnapshot

-- | Root directory for the given <a>ProjectPackage</a>
ppRoot :: ProjectPackage -> Path Abs Dir

-- | Version for the given 'ProjectPackage
ppVersion :: MonadIO m => ProjectPackage -> m Version

-- | All components available in the given <a>ProjectPackage</a>
ppComponents :: MonadIO m => ProjectPackage -> m (Set NamedComponent)
ppGPD :: MonadIO m => ProjectPackage -> m GenericPackageDescription
stackYamlL :: HasBuildConfig env => Lens' env (Path Abs File)

-- | Directory containing the project's stack.yaml file
projectRootL :: HasBuildConfig env => Getting r env (Path Abs Dir)
class HasConfig env => HasBuildConfig env
buildConfigL :: HasBuildConfig env => Lens' env BuildConfig
buildConfigL :: (HasBuildConfig env, HasEnvConfig env) => Lens' env BuildConfig

-- | A bit of type safety to ensure we're talking to the right database.
newtype UserStorage
UserStorage :: Storage -> UserStorage
[unUserStorage] :: UserStorage -> Storage

-- | A bit of type safety to ensure we're talking to the right database.
newtype ProjectStorage
ProjectStorage :: Storage -> ProjectStorage
[unProjectStorage] :: ProjectStorage -> Storage

-- | Specialized bariant of GHC (e.g. libgmp4 or integer-simple)
data GHCVariant

-- | Standard bindist
GHCStandard :: GHCVariant

-- | Bindist that uses integer-simple
GHCIntegerSimple :: GHCVariant

-- | Other bindists
GHCCustom :: String -> GHCVariant

-- | Render a GHC variant to a String.
ghcVariantName :: GHCVariant -> String

-- | Render a GHC variant to a String suffix.
ghcVariantSuffix :: GHCVariant -> String

-- | Parse GHC variant from a String.
parseGHCVariant :: MonadThrow m => String -> m GHCVariant

-- | Class for environment values which have a GHCVariant
class HasGHCVariant env
ghcVariantL :: HasGHCVariant env => SimpleGetter env GHCVariant
ghcVariantL :: (HasGHCVariant env, HasConfig env) => SimpleGetter env GHCVariant

-- | Directory containing snapshots
snapshotsDir :: (MonadReader env m, HasEnvConfig env, MonadThrow m) => m (Path Abs Dir)

-- | Configuration after the environment has been setup.
data EnvConfig
EnvConfig :: !BuildConfig -> !BuildOptsCLI -> !SourceMap -> !SourceMapHash -> !CompilerPaths -> EnvConfig
[envConfigBuildConfig] :: EnvConfig -> !BuildConfig
[envConfigBuildOptsCLI] :: EnvConfig -> !BuildOptsCLI
[envConfigSourceMap] :: EnvConfig -> !SourceMap
[envConfigSourceMapHash] :: EnvConfig -> !SourceMapHash
[envConfigCompilerPaths] :: EnvConfig -> !CompilerPaths
class HasSourceMap env
sourceMapL :: HasSourceMap env => Lens' env SourceMap
class (HasBuildConfig env, HasSourceMap env, HasCompiler env) => HasEnvConfig env
envConfigL :: HasEnvConfig env => Lens' env EnvConfig

-- | Get the path for the given compiler ignoring any local binaries.
--   
--   <a>https://github.com/commercialhaskell/stack/issues/1052</a>
getCompilerPath :: HasCompiler env => RIO env (Path Abs File)

-- | Which packages do ghc-options on the command line apply to?
data ApplyGhcOptions

-- | all local targets
AGOTargets :: ApplyGhcOptions

-- | all local packages, even non-targets
AGOLocals :: ApplyGhcOptions

-- | every package
AGOEverything :: ApplyGhcOptions

-- | Which packages do configure opts apply to?
data CabalConfigKey

-- | See AGOTargets
CCKTargets :: CabalConfigKey

-- | See AGOLocals
CCKLocals :: CabalConfigKey

-- | See AGOEverything
CCKEverything :: CabalConfigKey

-- | A specific package
CCKPackage :: !PackageName -> CabalConfigKey

-- | What to use for running hpack
data HpackExecutable

-- | Compiled in library
HpackBundled :: HpackExecutable

-- | Executable at the provided path
HpackCommand :: !FilePath -> HpackExecutable
data ConfigException
ParseConfigFileException :: Path Abs File -> ParseException -> ConfigException
ParseCustomSnapshotException :: Text -> ParseException -> ConfigException
NoProjectConfigFound :: Path Abs Dir -> Maybe Text -> ConfigException
UnexpectedArchiveContents :: [Path Abs Dir] -> [Path Abs File] -> ConfigException
UnableToExtractArchive :: Text -> Path Abs File -> ConfigException
BadStackVersionException :: VersionRange -> ConfigException
NoMatchingSnapshot :: NonEmpty SnapName -> ConfigException
ResolverMismatch :: !RawSnapshotLocation -> String -> ConfigException
ResolverPartial :: !RawSnapshotLocation -> String -> ConfigException
NoSuchDirectory :: FilePath -> ConfigException
ParseGHCVariantException :: String -> ConfigException
BadStackRoot :: Path Abs Dir -> ConfigException

-- | <tt>$STACK_ROOT</tt>, parent dir
Won'tCreateStackRootInDirectoryOwnedByDifferentUser :: Path Abs Dir -> Path Abs Dir -> ConfigException
UserDoesn'tOwnDirectory :: Path Abs Dir -> ConfigException
ManualGHCVariantSettingsAreIncompatibleWithSystemGHC :: ConfigException
NixRequiresSystemGhc :: ConfigException
NoResolverWhenUsingNoProject :: ConfigException
DuplicateLocalPackageNames :: ![(PackageName, [PackageLocation])] -> ConfigException
data ConfigMonoid
ConfigMonoid :: !First (Path Abs Dir) -> !First (Path Rel Dir) -> !BuildOptsMonoid -> !DockerOptsMonoid -> !NixOptsMonoid -> !First Int -> !FirstTrue -> !First Bool -> !First Text -> !First [HackageSecurityConfig] -> !First Bool -> !FirstTrue -> !FirstFalse -> !FirstFalse -> !First VersionCheck -> !First CompilerRepository -> !IntersectingVersionRange -> !First String -> !First GHCVariant -> !First CompilerBuild -> !First Int -> ![FilePath] -> ![FilePath] -> ![Text] -> !First (Path Abs File) -> !First FilePath -> !First Bool -> !First FilePath -> !Map Text Text -> !First SCM -> !MonoidMap PackageName (Dual [Text]) -> !MonoidMap ApplyGhcOptions (Dual [Text]) -> !MonoidMap CabalConfigKey (Dual [Text]) -> ![Path Abs Dir] -> ![String] -> !SetupInfo -> !First (Path Abs Dir) -> !First PvpBounds -> !FirstTrue -> !FirstFalse -> !First ApplyGhcOptions -> !First Bool -> !First TemplateName -> !First Bool -> !First DumpLogs -> !First Bool -> !First Text -> !First ColorWhen -> !StylesUpdate -> !FirstTrue -> !FirstTrue -> !First CasaRepoPrefix -> !First Text -> !First Bool -> ConfigMonoid

-- | See: <tt>clStackRoot</tt>
[configMonoidStackRoot] :: ConfigMonoid -> !First (Path Abs Dir)

-- | See: <a>configWorkDir</a>.
[configMonoidWorkDir] :: ConfigMonoid -> !First (Path Rel Dir)

-- | build options.
[configMonoidBuildOpts] :: ConfigMonoid -> !BuildOptsMonoid

-- | Docker options.
[configMonoidDockerOpts] :: ConfigMonoid -> !DockerOptsMonoid

-- | Options for the execution environment (nix-shell or container)
[configMonoidNixOpts] :: ConfigMonoid -> !NixOptsMonoid

-- | See: <tt>configConnectionCount</tt>
[configMonoidConnectionCount] :: ConfigMonoid -> !First Int

-- | See: <a>configHideTHLoading</a>
[configMonoidHideTHLoading] :: ConfigMonoid -> !FirstTrue

-- | See: <a>configPrefixTimestamps</a>
[configMonoidPrefixTimestamps] :: ConfigMonoid -> !First Bool

-- | See: <a>configLatestSnapshot</a>
[configMonoidLatestSnapshot] :: ConfigMonoid -> !First Text

-- | See: <tt>picIndices</tt>
[configMonoidPackageIndices] :: ConfigMonoid -> !First [HackageSecurityConfig]

-- | See: <a>configSystemGHC</a>
[configMonoidSystemGHC] :: ConfigMonoid -> !First Bool

-- | See: <a>configInstallGHC</a>
[configMonoidInstallGHC] :: ConfigMonoid -> !FirstTrue

-- | See: <a>configSkipGHCCheck</a>
[configMonoidSkipGHCCheck] :: ConfigMonoid -> !FirstFalse

-- | See: <a>configSkipMsys</a>
[configMonoidSkipMsys] :: ConfigMonoid -> !FirstFalse

-- | See: <a>configCompilerCheck</a>
[configMonoidCompilerCheck] :: ConfigMonoid -> !First VersionCheck

-- | See: <a>configCompilerRepository</a>
[configMonoidCompilerRepository] :: ConfigMonoid -> !First CompilerRepository

-- | See: <a>configRequireStackVersion</a>
[configMonoidRequireStackVersion] :: ConfigMonoid -> !IntersectingVersionRange

-- | Used for overriding the platform
[configMonoidArch] :: ConfigMonoid -> !First String

-- | Used for overriding the platform
[configMonoidGHCVariant] :: ConfigMonoid -> !First GHCVariant

-- | Used for overriding the GHC build
[configMonoidGHCBuild] :: ConfigMonoid -> !First CompilerBuild

-- | See: <a>configJobs</a>
[configMonoidJobs] :: ConfigMonoid -> !First Int

-- | See: <a>configExtraIncludeDirs</a>
[configMonoidExtraIncludeDirs] :: ConfigMonoid -> ![FilePath]

-- | See: <a>configExtraLibDirs</a>
[configMonoidExtraLibDirs] :: ConfigMonoid -> ![FilePath]

-- | See: <a>configCustomPreprocessorExts</a>
[configMonoidCustomPreprocessorExts] :: ConfigMonoid -> ![Text]

-- | Allow users to override the path to gcc
[configMonoidOverrideGccPath] :: ConfigMonoid -> !First (Path Abs File)

-- | Use Hpack executable (overrides bundled Hpack)
[configMonoidOverrideHpack] :: ConfigMonoid -> !First FilePath

-- | See: <a>configConcurrentTests</a>
[configMonoidConcurrentTests] :: ConfigMonoid -> !First Bool

-- | Used to override the binary installation dir
[configMonoidLocalBinPath] :: ConfigMonoid -> !First FilePath

-- | Template parameters.
[configMonoidTemplateParameters] :: ConfigMonoid -> !Map Text Text

-- | Initialize SCM (e.g. git init) when making new projects?
[configMonoidScmInit] :: ConfigMonoid -> !First SCM

-- | See <a>configGhcOptionsByName</a>. Uses <a>Dual</a> so that options
--   from the configs on the right come first, so that they can be
--   overridden.
[configMonoidGhcOptionsByName] :: ConfigMonoid -> !MonoidMap PackageName (Dual [Text])

-- | See <tt>configGhcOptionsAll</tt>. Uses <a>Dual</a> so that options
--   from the configs on the right come first, so that they can be
--   overridden.
[configMonoidGhcOptionsByCat] :: ConfigMonoid -> !MonoidMap ApplyGhcOptions (Dual [Text])

-- | See <a>configCabalConfigOpts</a>.
[configMonoidCabalConfigOpts] :: ConfigMonoid -> !MonoidMap CabalConfigKey (Dual [Text])

-- | Additional paths to search for executables in
[configMonoidExtraPath] :: ConfigMonoid -> ![Path Abs Dir]

-- | See <a>configSetupInfoLocations</a>
[configMonoidSetupInfoLocations] :: ConfigMonoid -> ![String]

-- | See <a>configSetupInfoInline</a>
[configMonoidSetupInfoInline] :: ConfigMonoid -> !SetupInfo

-- | Override the default local programs dir, where e.g. GHC is installed.
[configMonoidLocalProgramsBase] :: ConfigMonoid -> !First (Path Abs Dir)

-- | See <a>configPvpBounds</a>
[configMonoidPvpBounds] :: ConfigMonoid -> !First PvpBounds

-- | See <a>configModifyCodePage</a>
[configMonoidModifyCodePage] :: ConfigMonoid -> !FirstTrue

-- | See <a>configMonoidRebuildGhcOptions</a>
[configMonoidRebuildGhcOptions] :: ConfigMonoid -> !FirstFalse

-- | See <a>configApplyGhcOptions</a>
[configMonoidApplyGhcOptions] :: ConfigMonoid -> !First ApplyGhcOptions

-- | See <a>configMonoidAllowNewer</a>
[configMonoidAllowNewer] :: ConfigMonoid -> !First Bool

-- | The default template to use when none is specified. (If Nothing, the
--   default default is used.)
[configMonoidDefaultTemplate] :: ConfigMonoid -> !First TemplateName

-- | Allow users other than the stack root owner to use the stack
--   installation.
[configMonoidAllowDifferentUser] :: ConfigMonoid -> !First Bool

-- | See <a>configDumpLogs</a>
[configMonoidDumpLogs] :: ConfigMonoid -> !First DumpLogs

-- | See <a>configSaveHackageCreds</a>
[configMonoidSaveHackageCreds] :: ConfigMonoid -> !First Bool

-- | See <a>configHackageBaseUrl</a>
[configMonoidHackageBaseUrl] :: ConfigMonoid -> !First Text

-- | When to use <tt>ANSI</tt> colors
[configMonoidColorWhen] :: ConfigMonoid -> !First ColorWhen
[configMonoidStyles] :: ConfigMonoid -> !StylesUpdate

-- | See <a>configHideSourcePaths</a>
[configMonoidHideSourcePaths] :: ConfigMonoid -> !FirstTrue

-- | See <a>configRecommendUpgrade</a>
[configMonoidRecommendUpgrade] :: ConfigMonoid -> !FirstTrue
[configMonoidCasaRepoPrefix] :: ConfigMonoid -> !First CasaRepoPrefix

-- | Custom location of LTS/Nightly snapshots
[configMonoidSnapshotLocation] :: ConfigMonoid -> !First Text

-- | See <a>configStackDeveloperMode</a>
[configMonoidStackDeveloperMode] :: ConfigMonoid -> !First Bool
configMonoidInstallGHCName :: Text
configMonoidSystemGHCName :: Text
parseConfigMonoid :: Path Abs Dir -> Value -> Parser (WithJSONWarnings ConfigMonoid)

-- | Which build log files to dump
data DumpLogs

-- | don't dump any logfiles
DumpNoLogs :: DumpLogs

-- | dump logfiles containing warnings
DumpWarningLogs :: DumpLogs

-- | dump all logfiles
DumpAllLogs :: DumpLogs

-- | Controls which version of the environment is used
data EnvSettings
EnvSettings :: !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> EnvSettings

-- | include local project bin directory, GHC_PACKAGE_PATH, etc
[esIncludeLocals] :: EnvSettings -> !Bool

-- | include the GHC_PACKAGE_PATH variable
[esIncludeGhcPackagePath] :: EnvSettings -> !Bool

-- | set the STACK_EXE variable to the current executable name
[esStackExe] :: EnvSettings -> !Bool

-- | set the locale to C.UTF-8
[esLocaleUtf8] :: EnvSettings -> !Bool

-- | if True, keep GHCRTS variable in environment
[esKeepGhcRts] :: EnvSettings -> !Bool
minimalEnvSettings :: EnvSettings

-- | Default <tt>EnvSettings</tt> which includes locals and
--   GHC_PACKAGE_PATH.
--   
--   Note that this also passes through the GHCRTS environment variable.
--   See <a>https://github.com/commercialhaskell/stack/issues/3444</a>
defaultEnvSettings :: EnvSettings

-- | Environment settings which do not embellish the environment
--   
--   Note that this also passes through the GHCRTS environment variable.
--   See <a>https://github.com/commercialhaskell/stack/issues/3444</a>
plainEnvSettings :: EnvSettings

-- | Parsed global command-line options.
data GlobalOpts
GlobalOpts :: !Maybe String -> !Maybe DockerEntrypoint -> !LogLevel -> !Bool -> !ConfigMonoid -> !Maybe AbstractResolver -> !Maybe WantedCompiler -> !Bool -> !StylesUpdate -> !Maybe Int -> !StackYamlLoc -> !LockFileBehavior -> GlobalOpts

-- | Expected re-exec in container version
[globalReExecVersion] :: GlobalOpts -> !Maybe String

-- | Data used when stack is acting as a Docker entrypoint (internal use
--   only)
[globalDockerEntrypoint] :: GlobalOpts -> !Maybe DockerEntrypoint

-- | Log level
[globalLogLevel] :: GlobalOpts -> !LogLevel

-- | Whether to include timings in logs.
[globalTimeInLog] :: GlobalOpts -> !Bool

-- | Config monoid, for passing into <tt>loadConfig</tt>
[globalConfigMonoid] :: GlobalOpts -> !ConfigMonoid

-- | Resolver override
[globalResolver] :: GlobalOpts -> !Maybe AbstractResolver

-- | Compiler override
[globalCompiler] :: GlobalOpts -> !Maybe WantedCompiler

-- | We're in a terminal?
[globalTerminal] :: GlobalOpts -> !Bool

-- | SGR (Ansi) codes for styles
[globalStylesUpdate] :: GlobalOpts -> !StylesUpdate

-- | Terminal width override
[globalTermWidth] :: GlobalOpts -> !Maybe Int

-- | Override project stack.yaml
[globalStackYaml] :: GlobalOpts -> !StackYamlLoc
[globalLockFileBehavior] :: GlobalOpts -> !LockFileBehavior

-- | Parsed global command-line options monoid.
data GlobalOptsMonoid
GlobalOptsMonoid :: !First String -> !First DockerEntrypoint -> !First LogLevel -> !FirstTrue -> !ConfigMonoid -> !First (Unresolved AbstractResolver) -> !First FilePath -> !First WantedCompiler -> !First Bool -> !StylesUpdate -> !First Int -> !First FilePath -> !First LockFileBehavior -> GlobalOptsMonoid

-- | Expected re-exec in container version
[globalMonoidReExecVersion] :: GlobalOptsMonoid -> !First String

-- | Data used when stack is acting as a Docker entrypoint (internal use
--   only)
[globalMonoidDockerEntrypoint] :: GlobalOptsMonoid -> !First DockerEntrypoint

-- | Log level
[globalMonoidLogLevel] :: GlobalOptsMonoid -> !First LogLevel

-- | Whether to include timings in logs.
[globalMonoidTimeInLog] :: GlobalOptsMonoid -> !FirstTrue

-- | Config monoid, for passing into <tt>loadConfig</tt>
[globalMonoidConfigMonoid] :: GlobalOptsMonoid -> !ConfigMonoid

-- | Resolver override
[globalMonoidResolver] :: GlobalOptsMonoid -> !First (Unresolved AbstractResolver)

-- | root directory for resolver relative path
[globalMonoidResolverRoot] :: GlobalOptsMonoid -> !First FilePath

-- | Compiler override
[globalMonoidCompiler] :: GlobalOptsMonoid -> !First WantedCompiler

-- | We're in a terminal?
[globalMonoidTerminal] :: GlobalOptsMonoid -> !First Bool

-- | Stack's output styles
[globalMonoidStyles] :: GlobalOptsMonoid -> !StylesUpdate

-- | Terminal width override
[globalMonoidTermWidth] :: GlobalOptsMonoid -> !First Int

-- | Override project stack.yaml
[globalMonoidStackYaml] :: GlobalOptsMonoid -> !First FilePath

-- | See <a>globalLockFileBehavior</a>
[globalMonoidLockFileBehavior] :: GlobalOptsMonoid -> !First LockFileBehavior

-- | Location for the project's stack.yaml file.
data StackYamlLoc

-- | Use the standard parent-directory-checking logic
SYLDefault :: StackYamlLoc

-- | Use a specific stack.yaml file provided
SYLOverride :: !Path Abs File -> StackYamlLoc

-- | Do not load up a project, just user configuration. Include the given
--   extra dependencies with the resolver.
SYLNoProject :: ![PackageIdentifierRevision] -> StackYamlLoc

-- | Do not look for a project configuration, and use the implicit global.
SYLGlobalProject :: StackYamlLoc
stackYamlLocL :: HasRunner env => Lens' env StackYamlLoc

-- | How to interact with lock files
data LockFileBehavior

-- | Read and write lock files
LFBReadWrite :: LockFileBehavior

-- | Read lock files, but do not write them
LFBReadOnly :: LockFileBehavior

-- | Entirely ignore lock files
LFBIgnore :: LockFileBehavior

-- | Error out on trying to write a lock file. This can be used to ensure
--   that lock files in a repository already ensure reproducible builds.
LFBErrorOnWrite :: LockFileBehavior

-- | Parser for <a>LockFileBehavior</a>
readLockFileBehavior :: ReadM LockFileBehavior
lockFileBehaviorL :: HasRunner env => SimpleGetter env LockFileBehavior

-- | Default logging level should be something useful but not crazy.
defaultLogLevel :: LogLevel

-- | A project is a collection of packages. We can have multiple stack.yaml
--   files, but only one of them may contain project information.
data Project
Project :: !Maybe String -> ![RelFilePath] -> ![RawPackageLocation] -> !Map PackageName (Map FlagName Bool) -> !RawSnapshotLocation -> !Maybe WantedCompiler -> ![FilePath] -> !Maybe Curator -> !Set PackageName -> Project

-- | A warning message to display to the user when the auto generated
--   config may have issues.
[projectUserMsg] :: Project -> !Maybe String

-- | Packages which are actually part of the project (as opposed to
--   dependencies).
[projectPackages] :: Project -> ![RelFilePath]

-- | Dependencies defined within the stack.yaml file, to be applied on top
--   of the snapshot.
[projectDependencies] :: Project -> ![RawPackageLocation]

-- | Flags to be applied on top of the snapshot flags.
[projectFlags] :: Project -> !Map PackageName (Map FlagName Bool)

-- | How we resolve which <tt>Snapshot</tt> to use
[projectResolver] :: Project -> !RawSnapshotLocation

-- | Override the compiler in <a>projectResolver</a>
[projectCompiler] :: Project -> !Maybe WantedCompiler
[projectExtraPackageDBs] :: Project -> ![FilePath]

-- | Extra configuration intended exclusively for usage by the curator
--   tool. In other words, this is <i>not</i> part of the documented and
--   exposed Stack API. SUBJECT TO CHANGE.
[projectCurator] :: Project -> !Maybe Curator

-- | Packages to drop from the <a>projectResolver</a>.
[projectDropPackages] :: Project -> !Set PackageName

-- | Project configuration information. Not every run of Stack has a true
--   local project; see constructors below.
data ProjectConfig a

-- | Normal run: we want a project, and have one. This comes from either
--   <a>SYLDefault</a> or <a>SYLOverride</a>.
PCProject :: a -> ProjectConfig a

-- | No project was found when using <a>SYLDefault</a>. Instead, use the
--   implicit global.
PCGlobalProject :: ProjectConfig a

-- | Use a no project run. This comes from <a>SYLNoProject</a>.
PCNoProject :: ![PackageIdentifierRevision] -> ProjectConfig a

-- | Extra configuration intended exclusively for usage by the curator
--   tool. In other words, this is <i>not</i> part of the documented and
--   exposed Stack API. SUBJECT TO CHANGE.
data Curator
Curator :: !Set PackageName -> !Set PackageName -> !Set PackageName -> !Set PackageName -> !Set PackageName -> !Set PackageName -> Curator
[curatorSkipTest] :: Curator -> !Set PackageName
[curatorExpectTestFailure] :: Curator -> !Set PackageName
[curatorSkipBenchmark] :: Curator -> !Set PackageName
[curatorExpectBenchmarkFailure] :: Curator -> !Set PackageName
[curatorSkipHaddock] :: Curator -> !Set PackageName
[curatorExpectHaddockFailure] :: Curator -> !Set PackageName
data ProjectAndConfigMonoid
ProjectAndConfigMonoid :: !Project -> !ConfigMonoid -> ProjectAndConfigMonoid
parseProjectAndConfigMonoid :: Path Abs Dir -> Value -> Parser (WithJSONWarnings (IO ProjectAndConfigMonoid))
data PvpBounds
PvpBounds :: !PvpBoundsType -> !Bool -> PvpBounds
[pbType] :: PvpBounds -> !PvpBoundsType
[pbAsRevision] :: PvpBounds -> !Bool

-- | How PVP bounds should be added to .cabal files
data PvpBoundsType
PvpBoundsNone :: PvpBoundsType
PvpBoundsUpper :: PvpBoundsType
PvpBoundsLower :: PvpBoundsType
PvpBoundsBoth :: PvpBoundsType
parsePvpBounds :: Text -> Either String PvpBounds
readColorWhen :: ReadM ColorWhen
readStyles :: ReadM StylesUpdate

-- | A software control system.
data SCM
Git :: SCM

-- | Suffix applied to an installation root to get the bin dir
bindirSuffix :: Path Rel Dir

-- | Where do we get information on global packages for loading up a
--   <tt>LoadedSnapshot</tt>?
data GlobalInfoSource

-- | Accept the hints in the snapshot definition
GISSnapshotHints :: GlobalInfoSource

-- | Look up the actual information in the installed compiler
GISCompiler :: ActualCompiler -> GlobalInfoSource

-- | Per-project work dir
getProjectWorkDir :: (HasBuildConfig env, MonadReader env m) => m (Path Abs Dir)

-- | Suffix applied to an installation root to get the doc dir
docDirSuffix :: Path Rel Dir

-- | Get the extra bin directories (for the PATH). Puts more local first
--   
--   Bool indicates whether or not to include the locals
extraBinDirs :: HasEnvConfig env => RIO env (Bool -> [Path Abs Dir])

-- | Where HPC reports and tix files get stored.
hpcReportDir :: HasEnvConfig env => RIO env (Path Abs Dir)

-- | Installation root for dependencies
installationRootDeps :: HasEnvConfig env => RIO env (Path Abs Dir)

-- | Installation root for locals
installationRootLocal :: HasEnvConfig env => RIO env (Path Abs Dir)

-- | Installation root for compiler tools
bindirCompilerTools :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir)

-- | Hoogle directory.
hoogleRoot :: HasEnvConfig env => RIO env (Path Abs Dir)

-- | Get the hoogle database path.
hoogleDatabasePath :: HasEnvConfig env => RIO env (Path Abs File)

-- | Package database for installing dependencies into
packageDatabaseDeps :: HasEnvConfig env => RIO env (Path Abs Dir)

-- | Extra package databases
packageDatabaseExtra :: (MonadReader env m, HasEnvConfig env) => m [Path Abs Dir]

-- | Package database for installing local packages into
packageDatabaseLocal :: HasEnvConfig env => RIO env (Path Abs Dir)

-- | Relative directory for the platform identifier
platformOnlyRelDir :: (MonadReader env m, HasPlatform env, MonadThrow m) => m (Path Rel Dir)

-- | Relative directory for the platform and GHC identifier
platformGhcRelDir :: (MonadReader env m, HasEnvConfig env, MonadThrow m) => m (Path Rel Dir)

-- | Relative directory for the platform and GHC identifier without GHC
--   bindist build
platformGhcVerOnlyRelDir :: (MonadReader env m, HasPlatform env, HasGHCVariant env, MonadThrow m) => m (Path Rel Dir)

-- | This is an attempt to shorten stack paths on Windows to decrease our
--   chances of hitting 260 symbol path limit. The idea is to calculate
--   SHA1 hash of the path used on other architectures, encode with base 16
--   and take first 8 symbols of it.
useShaPathOnWindows :: MonadThrow m => Path Rel Dir -> m (Path Rel Dir)
shaPath :: (IsPath Rel t, MonadThrow m) => Path Rel t -> m (Path Rel t)
shaPathForBytes :: (IsPath Rel t, MonadThrow m) => ByteString -> m (Path Rel t)

-- | <pre>
--   ".stack-work"
--   </pre>
workDirL :: HasConfig env => Lens' env (Path Rel Dir)
data EvalOpts
EvalOpts :: !String -> !ExecOptsExtra -> EvalOpts
[evalArg] :: EvalOpts -> !String
[evalExtra] :: EvalOpts -> !ExecOptsExtra
data ExecOpts
ExecOpts :: !SpecialExecCmd -> ![String] -> !ExecOptsExtra -> ExecOpts
[eoCmd] :: ExecOpts -> !SpecialExecCmd
[eoArgs] :: ExecOpts -> ![String]
[eoExtra] :: ExecOpts -> !ExecOptsExtra
data SpecialExecCmd
ExecCmd :: String -> SpecialExecCmd
ExecRun :: SpecialExecCmd
ExecGhc :: SpecialExecCmd
ExecRunGhc :: SpecialExecCmd
data ExecOptsExtra
ExecOptsExtra :: !EnvSettings -> ![String] -> ![String] -> !Maybe FilePath -> ExecOptsExtra
[eoEnvSettings] :: ExecOptsExtra -> !EnvSettings
[eoPackages] :: ExecOptsExtra -> ![String]
[eoRtsOptions] :: ExecOptsExtra -> ![String]
[eoCwd] :: ExecOptsExtra -> !Maybe FilePath

-- | Build of the compiler distribution (e.g. standard, gmp4, tinfo6) |
--   Information for a file to download.
data DownloadInfo
DownloadInfo :: Text -> Maybe Int -> Maybe ByteString -> Maybe ByteString -> DownloadInfo

-- | URL or absolute file path
[downloadInfoUrl] :: DownloadInfo -> Text
[downloadInfoContentLength] :: DownloadInfo -> Maybe Int
[downloadInfoSha1] :: DownloadInfo -> Maybe ByteString
[downloadInfoSha256] :: DownloadInfo -> Maybe ByteString
data VersionedDownloadInfo
VersionedDownloadInfo :: Version -> DownloadInfo -> VersionedDownloadInfo
[vdiVersion] :: VersionedDownloadInfo -> Version
[vdiDownloadInfo] :: VersionedDownloadInfo -> DownloadInfo
data GHCDownloadInfo
GHCDownloadInfo :: [Text] -> Map Text Text -> DownloadInfo -> GHCDownloadInfo
[gdiConfigureOpts] :: GHCDownloadInfo -> [Text]
[gdiConfigureEnv] :: GHCDownloadInfo -> Map Text Text
[gdiDownloadInfo] :: GHCDownloadInfo -> DownloadInfo
data SetupInfo
SetupInfo :: Maybe DownloadInfo -> Maybe DownloadInfo -> Map Text VersionedDownloadInfo -> Map Text (Map Version GHCDownloadInfo) -> Map Text (Map Version DownloadInfo) -> SetupInfo
[siSevenzExe] :: SetupInfo -> Maybe DownloadInfo
[siSevenzDll] :: SetupInfo -> Maybe DownloadInfo
[siMsys2] :: SetupInfo -> Map Text VersionedDownloadInfo
[siGHCs] :: SetupInfo -> Map Text (Map Version GHCDownloadInfo)
[siStack] :: SetupInfo -> Map Text (Map Version DownloadInfo)

-- | Data passed into Docker container for the Docker entrypoint's use
newtype DockerEntrypoint
DockerEntrypoint :: Maybe DockerUser -> DockerEntrypoint

-- | UID<i>GID</i>etc of host user, if we wish to perform UID/GID switch in
--   container
[deUser] :: DockerEntrypoint -> Maybe DockerUser

-- | Docker host user info
data DockerUser
DockerUser :: UserID -> GroupID -> [GroupID] -> FileMode -> DockerUser

-- | uid
[duUid] :: DockerUser -> UserID

-- | gid
[duGid] :: DockerUser -> GroupID

-- | Supplemantal groups
[duGroups] :: DockerUser -> [GroupID]

-- | File creation mask }
[duUmask] :: DockerUser -> FileMode

-- | The compiler specified by the <tt>SnapshotDef</tt>. This may be
--   different from the actual compiler used!
wantedCompilerVersionL :: HasBuildConfig s => Getting r s WantedCompiler

-- | The version of the compiler which will actually be used. May be
--   different than that specified in the <tt>SnapshotDef</tt> and returned
--   by <a>wantedCompilerVersionL</a>.
actualCompilerVersionL :: HasSourceMap env => SimpleGetter env ActualCompiler

-- | An environment which ensures that the given compiler is available on
--   the PATH
class HasCompiler env
compilerPathsL :: HasCompiler env => SimpleGetter env CompilerPaths

-- | Dump information for a single package
data DumpPackage
DumpPackage :: !GhcPkgId -> !PackageIdentifier -> !Maybe PackageIdentifier -> !Maybe License -> ![FilePath] -> ![Text] -> !Bool -> !Set ModuleName -> ![GhcPkgId] -> ![FilePath] -> !Maybe FilePath -> !Bool -> DumpPackage
[dpGhcPkgId] :: DumpPackage -> !GhcPkgId
[dpPackageIdent] :: DumpPackage -> !PackageIdentifier
[dpParentLibIdent] :: DumpPackage -> !Maybe PackageIdentifier
[dpLicense] :: DumpPackage -> !Maybe License
[dpLibDirs] :: DumpPackage -> ![FilePath]
[dpLibraries] :: DumpPackage -> ![Text]
[dpHasExposedModules] :: DumpPackage -> !Bool
[dpExposedModules] :: DumpPackage -> !Set ModuleName
[dpDepends] :: DumpPackage -> ![GhcPkgId]
[dpHaddockInterfaces] :: DumpPackage -> ![FilePath]
[dpHaddockHtml] :: DumpPackage -> !Maybe FilePath
[dpIsExposed] :: DumpPackage -> !Bool

-- | Paths on the filesystem for the compiler we're using
data CompilerPaths
CompilerPaths :: !ActualCompiler -> !Arch -> !CompilerBuild -> !Path Abs File -> !GhcPkgExe -> !Path Abs File -> !Path Abs File -> !Bool -> !Version -> !Path Abs Dir -> !ByteString -> !Map PackageName DumpPackage -> CompilerPaths
[cpCompilerVersion] :: CompilerPaths -> !ActualCompiler
[cpArch] :: CompilerPaths -> !Arch
[cpBuild] :: CompilerPaths -> !CompilerBuild
[cpCompiler] :: CompilerPaths -> !Path Abs File

-- | ghc-pkg or equivalent
[cpPkg] :: CompilerPaths -> !GhcPkgExe

-- | runghc
[cpInterpreter] :: CompilerPaths -> !Path Abs File

-- | haddock, in <a>IO</a> to allow deferring the lookup
[cpHaddock] :: CompilerPaths -> !Path Abs File

-- | Is this a Stack-sandboxed installation?
[cpSandboxed] :: CompilerPaths -> !Bool

-- | This is the version of Cabal that stack will use to compile Setup.hs
--   files in the build process.
--   
--   Note that this is not necessarily the same version as the one that
--   stack depends on as a library and which is displayed when running
--   <tt>stack ls dependencies | grep Cabal</tt> in the stack project.
[cpCabalVersion] :: CompilerPaths -> !Version

-- | Global package database
[cpGlobalDB] :: CompilerPaths -> !Path Abs Dir

-- | Output of <tt>ghc --info</tt>
[cpGhcInfo] :: CompilerPaths -> !ByteString
[cpGlobalDump] :: CompilerPaths -> !Map PackageName DumpPackage

-- | Location of the ghc-pkg executable
newtype GhcPkgExe
GhcPkgExe :: Path Abs File -> GhcPkgExe

-- | Get the <a>GhcPkgExe</a> from a <a>HasCompiler</a> environment
getGhcPkgExe :: HasCompiler env => RIO env GhcPkgExe
cpWhich :: (MonadReader env m, HasCompiler env) => m WhichCompiler
data ExtraDirs
ExtraDirs :: ![Path Abs Dir] -> ![Path Abs Dir] -> ![Path Abs Dir] -> ExtraDirs
[edBins] :: ExtraDirs -> ![Path Abs Dir]
[edInclude] :: ExtraDirs -> ![Path Abs Dir]
[edLib] :: ExtraDirs -> ![Path Abs Dir]
buildOptsL :: HasConfig s => Lens' s BuildOpts
globalOptsL :: HasRunner env => Lens' env GlobalOpts
buildOptsInstallExesL :: Lens' BuildOpts Bool
buildOptsMonoidHaddockL :: Lens' BuildOptsMonoid (Maybe Bool)
buildOptsMonoidTestsL :: Lens' BuildOptsMonoid (Maybe Bool)
buildOptsMonoidBenchmarksL :: Lens' BuildOptsMonoid (Maybe Bool)
buildOptsMonoidInstallExesL :: Lens' BuildOptsMonoid (Maybe Bool)
buildOptsHaddockL :: Lens' BuildOpts Bool
globalOptsBuildOptsMonoidL :: Lens' GlobalOpts BuildOptsMonoid
stackRootL :: HasConfig s => Lens' s (Path Abs Dir)
cabalVersionL :: HasCompiler env => SimpleGetter env Version
whichCompilerL :: Getting r ActualCompiler WhichCompiler
envOverrideSettingsL :: HasConfig env => Lens' env (EnvSettings -> IO ProcessContext)
shouldForceGhcColorFlag :: (HasRunner env, HasEnvConfig env) => RIO env Bool
appropriateGhcColorFlag :: (HasRunner env, HasEnvConfig env) => RIO env (Maybe String)

-- | In dev mode, print as a warning, otherwise as debug
prettyStackDevL :: HasConfig env => [StyleDoc] -> RIO env ()
view :: MonadReader s m => Getting a s a -> m a
to :: (s -> a) -> SimpleGetter s a
instance GHC.Generics.Generic Stack.Types.Config.ColorWhen
instance GHC.Show.Show Stack.Types.Config.ColorWhen
instance GHC.Classes.Eq Stack.Types.Config.ColorWhen
instance GHC.Classes.Ord Stack.Types.Config.CabalConfigKey
instance GHC.Classes.Eq Stack.Types.Config.CabalConfigKey
instance GHC.Read.Read Stack.Types.Config.CabalConfigKey
instance GHC.Show.Show Stack.Types.Config.CabalConfigKey
instance GHC.Enum.Bounded Stack.Types.Config.ApplyGhcOptions
instance GHC.Enum.Enum Stack.Types.Config.ApplyGhcOptions
instance GHC.Classes.Ord Stack.Types.Config.ApplyGhcOptions
instance GHC.Classes.Eq Stack.Types.Config.ApplyGhcOptions
instance GHC.Read.Read Stack.Types.Config.ApplyGhcOptions
instance GHC.Show.Show Stack.Types.Config.ApplyGhcOptions
instance GHC.Enum.Bounded Stack.Types.Config.DumpLogs
instance GHC.Enum.Enum Stack.Types.Config.DumpLogs
instance GHC.Classes.Ord Stack.Types.Config.DumpLogs
instance GHC.Classes.Eq Stack.Types.Config.DumpLogs
instance GHC.Read.Read Stack.Types.Config.DumpLogs
instance GHC.Show.Show Stack.Types.Config.DumpLogs
instance GHC.Classes.Ord Stack.Types.Config.EnvSettings
instance GHC.Classes.Eq Stack.Types.Config.EnvSettings
instance GHC.Show.Show Stack.Types.Config.EnvSettings
instance GHC.Classes.Eq Stack.Types.Config.SpecialExecCmd
instance GHC.Show.Show Stack.Types.Config.SpecialExecCmd
instance GHC.Show.Show Stack.Types.Config.ExecOptsExtra
instance GHC.Show.Show Stack.Types.Config.ExecOpts
instance GHC.Show.Show Stack.Types.Config.EvalOpts
instance GHC.Show.Show Stack.Types.Config.StackYamlLoc
instance GHC.Enum.Bounded Stack.Types.Config.LockFileBehavior
instance GHC.Enum.Enum Stack.Types.Config.LockFileBehavior
instance GHC.Show.Show Stack.Types.Config.LockFileBehavior
instance GHC.Show.Show Stack.Types.Config.Curator
instance GHC.Show.Show Stack.Types.Config.Project
instance GHC.Show.Show Stack.Types.Config.SCM
instance GHC.Show.Show Stack.Types.Config.GHCVariant
instance GHC.Show.Show Stack.Types.Config.DownloadInfo
instance GHC.Show.Show Stack.Types.Config.VersionedDownloadInfo
instance GHC.Show.Show Stack.Types.Config.GHCDownloadInfo
instance GHC.Show.Show Stack.Types.Config.SetupInfo
instance GHC.Enum.Bounded Stack.Types.Config.PvpBoundsType
instance GHC.Enum.Enum Stack.Types.Config.PvpBoundsType
instance GHC.Classes.Ord Stack.Types.Config.PvpBoundsType
instance GHC.Classes.Eq Stack.Types.Config.PvpBoundsType
instance GHC.Read.Read Stack.Types.Config.PvpBoundsType
instance GHC.Show.Show Stack.Types.Config.PvpBoundsType
instance GHC.Classes.Ord Stack.Types.Config.PvpBounds
instance GHC.Classes.Eq Stack.Types.Config.PvpBounds
instance GHC.Read.Read Stack.Types.Config.PvpBounds
instance GHC.Show.Show Stack.Types.Config.PvpBounds
instance GHC.Generics.Generic Stack.Types.Config.ConfigMonoid
instance GHC.Show.Show Stack.Types.Config.ConfigMonoid
instance GHC.Show.Show Stack.Types.Config.DockerUser
instance GHC.Read.Read Stack.Types.Config.DockerUser
instance GHC.Show.Show Stack.Types.Config.DockerEntrypoint
instance GHC.Read.Read Stack.Types.Config.DockerEntrypoint
instance GHC.Generics.Generic Stack.Types.Config.GlobalOptsMonoid
instance GHC.Show.Show Stack.Types.Config.GlobalOpts
instance GHC.Classes.Ord Stack.Types.Config.GhcOptionKey
instance GHC.Classes.Eq Stack.Types.Config.GhcOptionKey
instance GHC.Show.Show Stack.Types.Config.GhcPkgExe
instance GHC.Classes.Eq Stack.Types.Config.DumpPackage
instance GHC.Read.Read Stack.Types.Config.DumpPackage
instance GHC.Show.Show Stack.Types.Config.DumpPackage
instance GHC.Show.Show Stack.Types.Config.CompilerPaths
instance GHC.Generics.Generic Stack.Types.Config.ExtraDirs
instance GHC.Show.Show Stack.Types.Config.ExtraDirs
instance Stack.Types.Config.HasPlatform (Distribution.System.Platform, Stack.Types.Config.PlatformVariant)
instance Stack.Types.Config.HasPlatform Stack.Types.Config.Config
instance Stack.Types.Config.HasPlatform Stack.Types.Config.BuildConfig
instance Stack.Types.Config.HasPlatform Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasGHCVariant Stack.Types.Config.GHCVariant
instance Stack.Types.Config.HasGHCVariant Stack.Types.Config.Config
instance Stack.Types.Config.HasGHCVariant Stack.Types.Config.BuildConfig
instance Stack.Types.Config.HasGHCVariant Stack.Types.Config.EnvConfig
instance RIO.Process.HasProcessContext Stack.Types.Config.BuildConfig
instance RIO.Process.HasProcessContext Stack.Types.Config.EnvConfig
instance Pantry.Types.HasPantryConfig Stack.Types.Config.BuildConfig
instance Pantry.Types.HasPantryConfig Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasConfig Stack.Types.Config.Config
instance Stack.Types.Config.HasConfig Stack.Types.Config.BuildConfig
instance Stack.Types.Config.HasConfig Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasBuildConfig Stack.Types.Config.BuildConfig
instance Stack.Types.Config.HasBuildConfig Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasEnvConfig Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasRunner Stack.Types.Config.BuildConfig
instance Stack.Types.Config.HasRunner Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasSourceMap Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasCompiler Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasCompiler Stack.Types.Config.CompilerPaths
instance GHC.Base.Semigroup Stack.Types.Config.ExtraDirs
instance GHC.Base.Monoid Stack.Types.Config.ExtraDirs
instance RIO.Prelude.Logger.HasLogFunc Stack.Types.Config.EnvConfig
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Types.Config.EnvConfig
instance RIO.PrettyPrint.HasTerm Stack.Types.Config.EnvConfig
instance Stack.Types.Config.HasRunner Stack.Types.Config.Runner
instance RIO.Process.HasProcessContext Stack.Types.Config.Config
instance Stack.Types.Config.HasRunner Stack.Types.Config.Config
instance RIO.Prelude.Logger.HasLogFunc Stack.Types.Config.Config
instance RIO.Prelude.Logger.HasLogFunc Stack.Types.Config.BuildConfig
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Types.Config.Config
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Types.Config.BuildConfig
instance RIO.PrettyPrint.HasTerm Stack.Types.Config.Config
instance RIO.PrettyPrint.HasTerm Stack.Types.Config.BuildConfig
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.GhcOptions
instance Data.Aeson.Types.FromJSON.FromJSONKey Stack.Types.Config.GhcOptionKey
instance Pantry.Types.HasPantryConfig Stack.Types.Config.Config
instance RIO.Prelude.Logger.HasLogFunc Stack.Types.Config.Runner
instance RIO.Process.HasProcessContext Stack.Types.Config.Runner
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Types.Config.Runner
instance RIO.PrettyPrint.HasTerm Stack.Types.Config.Runner
instance GHC.Base.Semigroup Stack.Types.Config.GlobalOptsMonoid
instance GHC.Base.Monoid Stack.Types.Config.GlobalOptsMonoid
instance GHC.Base.Semigroup Stack.Types.Config.ConfigMonoid
instance GHC.Base.Monoid Stack.Types.Config.ConfigMonoid
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Config.PvpBounds
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.PvpBounds
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.SetupInfo)
instance GHC.Base.Semigroup Stack.Types.Config.SetupInfo
instance GHC.Base.Monoid Stack.Types.Config.SetupInfo
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.GHCDownloadInfo)
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.VersionedDownloadInfo)
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.DownloadInfo)
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.GHCVariant
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.SCM
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Config.SCM
instance Stack.Types.Config.IsPath Path.Posix.Abs Path.Posix.Dir
instance Stack.Types.Config.IsPath Path.Posix.Rel Path.Posix.Dir
instance Stack.Types.Config.IsPath Path.Posix.Abs Path.Posix.File
instance Stack.Types.Config.IsPath Path.Posix.Rel Path.Posix.File
instance GHC.Show.Show Stack.Types.Config.ConfigException
instance GHC.Exception.Type.Exception Stack.Types.Config.ConfigException
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Config.Project
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Config.Curator
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings Stack.Types.Config.Curator)
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.DumpLogs
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.ApplyGhcOptions
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.CabalConfigKey
instance Data.Aeson.Types.FromJSON.FromJSONKey Stack.Types.Config.CabalConfigKey
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Config.ColorWhen

module Stack.Types.Package

-- | All exceptions thrown by the library.
data PackageException
PackageInvalidCabalFile :: !Either PackageIdentifierRevision (Path Abs File) -> !Maybe Version -> ![PError] -> ![PWarning] -> PackageException
MismatchedCabalIdentifier :: !PackageIdentifierRevision -> !PackageIdentifier -> PackageException

-- | Libraries in a package. Since Cabal 2.0, internal libraries are a
--   thing.
data PackageLibraries
NoLibraries :: PackageLibraries

-- | the foreign library names, sub libraries get built automatically
--   without explicit component name passing
HasLibraries :: !Set Text -> PackageLibraries

-- | Name of an executable.
newtype ExeName
ExeName :: Text -> ExeName
[unExeName] :: ExeName -> Text

-- | Some package info.
data Package
Package :: !PackageName -> !Version -> !Either License License -> !GetPackageFiles -> !Map PackageName DepValue -> !Set ExeName -> !Set PackageName -> ![Text] -> ![Text] -> !Map FlagName Bool -> !Map FlagName Bool -> !PackageLibraries -> !Set Text -> !Map Text TestSuiteInterface -> !Set Text -> !Set Text -> !GetPackageOpts -> !Bool -> !BuildType -> !Maybe (Map PackageName VersionRange) -> !VersionRange -> Package

-- | Name of the package.
[packageName] :: Package -> !PackageName

-- | Version of the package
[packageVersion] :: Package -> !Version

-- | The license the package was released under.
[packageLicense] :: Package -> !Either License License

-- | Get all files of the package.
[packageFiles] :: Package -> !GetPackageFiles

-- | Packages that the package depends on, both as libraries and build
--   tools.
[packageDeps] :: Package -> !Map PackageName DepValue

-- | Build tools specified in the legacy manner (build-tools:) that failed
--   the hard-coded lookup.
[packageUnknownTools] :: Package -> !Set ExeName

-- | Original dependencies (not sieved).
[packageAllDeps] :: Package -> !Set PackageName

-- | Ghc options used on package.
[packageGhcOptions] :: Package -> ![Text]

-- | Additional options passed to ./Setup.hs configure
[packageCabalConfigOpts] :: Package -> ![Text]

-- | Flags used on package.
[packageFlags] :: Package -> !Map FlagName Bool

-- | Defaults for unspecified flags.
[packageDefaultFlags] :: Package -> !Map FlagName Bool

-- | does the package have a buildable library stanza?
[packageLibraries] :: Package -> !PackageLibraries

-- | names of internal libraries
[packageInternalLibraries] :: Package -> !Set Text

-- | names and interfaces of test suites
[packageTests] :: Package -> !Map Text TestSuiteInterface

-- | names of benchmarks
[packageBenchmarks] :: Package -> !Set Text

-- | names of executables
[packageExes] :: Package -> !Set Text

-- | Args to pass to GHC.
[packageOpts] :: Package -> !GetPackageOpts

-- | Does the package have exposed modules?
[packageHasExposedModules] :: Package -> !Bool

-- | Package build-type.
[packageBuildType] :: Package -> !BuildType

-- | If present: custom-setup dependencies
[packageSetupDeps] :: Package -> !Maybe (Map PackageName VersionRange)

-- | Cabal spec range
[packageCabalSpec] :: Package -> !VersionRange
packageIdent :: Package -> PackageIdentifier

-- | The value for a map from dependency name. This contains both the
--   version range and the type of dependency, and provides a semigroup
--   instance.
data DepValue
DepValue :: !VersionRange -> !DepType -> DepValue
[dvVersionRange] :: DepValue -> !VersionRange
[dvType] :: DepValue -> !DepType

-- | Is this package being used as a library, or just as a build tool? If
--   the former, we need to ensure that a library actually exists. See
--   <a>https://github.com/commercialhaskell/stack/issues/2195</a>
data DepType
AsLibrary :: DepType
AsBuildTool :: DepType
packageIdentifier :: Package -> PackageIdentifier
packageDefinedFlags :: Package -> Set FlagName
type InstallMap = Map PackageName (InstallLocation, Version)

-- | Files that the package depends on, relative to package directory.
--   Argument is the location of the .cabal file
newtype GetPackageOpts
GetPackageOpts :: (forall env. HasEnvConfig env => InstallMap -> InstalledMap -> [PackageName] -> [PackageName] -> Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Map NamedComponent BuildInfoOpts)) -> GetPackageOpts
[getPackageOpts] :: GetPackageOpts -> forall env. HasEnvConfig env => InstallMap -> InstalledMap -> [PackageName] -> [PackageName] -> Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Map NamedComponent BuildInfoOpts)

-- | GHC options based on cabal information and ghc-options.
data BuildInfoOpts
BuildInfoOpts :: [String] -> [String] -> [String] -> Path Abs File -> BuildInfoOpts
[bioOpts] :: BuildInfoOpts -> [String]
[bioOneWordOpts] :: BuildInfoOpts -> [String]

-- | These options can safely have <a>nubOrd</a> applied to them, as there
--   are no multi-word options (see
--   <a>https://github.com/commercialhaskell/stack/issues/1255)</a>
[bioPackageFlags] :: BuildInfoOpts -> [String]
[bioCabalMacros] :: BuildInfoOpts -> Path Abs File

-- | Files to get for a cabal package.
data CabalFileType
AllFiles :: CabalFileType
Modules :: CabalFileType

-- | Files that the package depends on, relative to package directory.
--   Argument is the location of the .cabal file
newtype GetPackageFiles
GetPackageFiles :: (forall env. HasEnvConfig env => Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Set (Path Abs File), [PackageWarning])) -> GetPackageFiles
[getPackageFiles] :: GetPackageFiles -> forall env. HasEnvConfig env => Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Set (Path Abs File), [PackageWarning])

-- | Warning generated when reading a package
data PackageWarning

-- | Modules found that are not listed in cabal file
UnlistedModulesWarning :: NamedComponent -> [ModuleName] -> PackageWarning

-- | Package build configuration
data PackageConfig
PackageConfig :: !Bool -> !Bool -> !Map FlagName Bool -> ![Text] -> ![Text] -> ActualCompiler -> !Platform -> PackageConfig

-- | Are tests enabled?
[packageConfigEnableTests] :: PackageConfig -> !Bool

-- | Are benchmarks enabled?
[packageConfigEnableBenchmarks] :: PackageConfig -> !Bool

-- | Configured flags.
[packageConfigFlags] :: PackageConfig -> !Map FlagName Bool

-- | Configured ghc options.
[packageConfigGhcOptions] :: PackageConfig -> ![Text]

-- | ./Setup.hs configure options
[packageConfigCabalConfigOpts] :: PackageConfig -> ![Text]

-- | GHC version
[packageConfigCompilerVersion] :: PackageConfig -> ActualCompiler

-- | host platform
[packageConfigPlatform] :: PackageConfig -> !Platform

-- | Where the package's source is located: local directory or package
--   index
data PackageSource

-- | Package which exist on the filesystem
PSFilePath :: LocalPackage -> PackageSource

-- | Package which is downloaded remotely.
PSRemote :: PackageLocationImmutable -> Version -> FromSnapshot -> CommonPackage -> PackageSource
psVersion :: PackageSource -> Version

-- | Information on a locally available package of source code
data LocalPackage
LocalPackage :: !Package -> !Set NamedComponent -> !Set NamedComponent -> !Bool -> !Map PackageName VersionRange -> !Map PackageName VersionRange -> !Maybe Package -> !Path Abs File -> !Bool -> !Bool -> !MemoizedWith EnvConfig (Maybe (Set FilePath)) -> !MemoizedWith EnvConfig (Map NamedComponent (Map FilePath FileCacheInfo)) -> !MemoizedWith EnvConfig (Map NamedComponent (Set (Path Abs File))) -> LocalPackage

-- | The <tt>Package</tt> info itself, after resolution with package flags,
--   with tests and benchmarks disabled
[lpPackage] :: LocalPackage -> !Package

-- | Components to build, not including the library component.
[lpComponents] :: LocalPackage -> !Set NamedComponent

-- | Components explicitly requested for build, that are marked "buildable:
--   false".
[lpUnbuildable] :: LocalPackage -> !Set NamedComponent

-- | Whether this package is wanted as a target.
[lpWanted] :: LocalPackage -> !Bool

-- | Used for determining if we can use --enable-tests in a normal build.
[lpTestDeps] :: LocalPackage -> !Map PackageName VersionRange

-- | Used for determining if we can use --enable-benchmarks in a normal
--   build.
[lpBenchDeps] :: LocalPackage -> !Map PackageName VersionRange

-- | This stores the <a>Package</a> with tests and benchmarks enabled, if
--   either is asked for by the user.
[lpTestBench] :: LocalPackage -> !Maybe Package

-- | The .cabal file
[lpCabalFile] :: LocalPackage -> !Path Abs File
[lpBuildHaddocks] :: LocalPackage -> !Bool
[lpForceDirty] :: LocalPackage -> !Bool

-- | Nothing == not dirty, Just == dirty. Note that the Set may be empty if
--   we forced the build to treat packages as dirty. Also, the Set may not
--   include all modified files.
[lpDirtyFiles] :: LocalPackage -> !MemoizedWith EnvConfig (Maybe (Set FilePath))

-- | current state of the files
[lpNewBuildCaches] :: LocalPackage -> !MemoizedWith EnvConfig (Map NamedComponent (Map FilePath FileCacheInfo))

-- | all files used by this package
[lpComponentFiles] :: LocalPackage -> !MemoizedWith EnvConfig (Map NamedComponent (Set (Path Abs File)))
newtype MemoizedWith env a
MemoizedWith :: RIO env a -> MemoizedWith env a
[unMemoizedWith] :: MemoizedWith env a -> RIO env a
memoizeRefWith :: MonadIO m => RIO env a -> m (MemoizedWith env a)
runMemoizedWith :: (HasEnvConfig env, MonadReader env m, MonadIO m) => MemoizedWith EnvConfig a -> m a
lpFiles :: HasEnvConfig env => LocalPackage -> RIO env (Set (Path Abs File))
lpFilesForComponents :: HasEnvConfig env => Set NamedComponent -> LocalPackage -> RIO env (Set (Path Abs File))

-- | A location to install a package into, either snapshot or local
data InstallLocation
Snap :: InstallLocation
Local :: InstallLocation
data InstalledPackageLocation
InstalledTo :: InstallLocation -> InstalledPackageLocation
ExtraGlobal :: InstalledPackageLocation
newtype FileCacheInfo
FileCacheInfo :: SHA256 -> FileCacheInfo
[fciHash] :: FileCacheInfo -> SHA256

-- | A descriptor from a .cabal file indicating one of the following:
--   
--   exposed-modules: Foo other-modules: Foo or main-is: Foo.hs
data DotCabalDescriptor
DotCabalModule :: !ModuleName -> DotCabalDescriptor
DotCabalMain :: !FilePath -> DotCabalDescriptor
DotCabalFile :: !FilePath -> DotCabalDescriptor
DotCabalCFile :: !FilePath -> DotCabalDescriptor

-- | Maybe get the module name from the .cabal descriptor.
dotCabalModule :: DotCabalDescriptor -> Maybe ModuleName

-- | Maybe get the main name from the .cabal descriptor.
dotCabalMain :: DotCabalDescriptor -> Maybe FilePath

-- | A path resolved from the .cabal file, which is either main-is or an
--   exposed<i>internal</i>referenced module.
data DotCabalPath
DotCabalModulePath :: !Path Abs File -> DotCabalPath
DotCabalMainPath :: !Path Abs File -> DotCabalPath
DotCabalFilePath :: !Path Abs File -> DotCabalPath
DotCabalCFilePath :: !Path Abs File -> DotCabalPath

-- | Get the module path.
dotCabalModulePath :: DotCabalPath -> Maybe (Path Abs File)

-- | Get the main path.
dotCabalMainPath :: DotCabalPath -> Maybe (Path Abs File)

-- | Get the c file path.
dotCabalCFilePath :: DotCabalPath -> Maybe (Path Abs File)

-- | Get the path.
dotCabalGetPath :: DotCabalPath -> Path Abs File
type InstalledMap = Map PackageName (InstallLocation, Installed)
data Installed
Library :: PackageIdentifier -> GhcPkgId -> Maybe (Either License License) -> Installed
Executable :: PackageIdentifier -> Installed
installedPackageIdentifier :: Installed -> PackageIdentifier

-- | Get the installed Version.
installedVersion :: Installed -> Version
instance GHC.Show.Show Stack.Types.Package.PackageLibraries
instance Data.Data.Data Stack.Types.Package.ExeName
instance Control.DeepSeq.NFData Stack.Types.Package.ExeName
instance GHC.Generics.Generic Stack.Types.Package.ExeName
instance Data.String.IsString Stack.Types.Package.ExeName
instance Data.Hashable.Class.Hashable Stack.Types.Package.ExeName
instance GHC.Classes.Ord Stack.Types.Package.ExeName
instance GHC.Classes.Eq Stack.Types.Package.ExeName
instance GHC.Show.Show Stack.Types.Package.ExeName
instance GHC.Classes.Eq Stack.Types.Package.DepType
instance GHC.Show.Show Stack.Types.Package.DepType
instance GHC.Show.Show Stack.Types.Package.DepValue
instance GHC.Show.Show Stack.Types.Package.BuildInfoOpts
instance GHC.Show.Show Stack.Types.Package.PackageConfig
instance GHC.Base.Monad (Stack.Types.Package.MemoizedWith env)
instance GHC.Base.Applicative (Stack.Types.Package.MemoizedWith env)
instance GHC.Base.Functor (Stack.Types.Package.MemoizedWith env)
instance GHC.Classes.Eq Stack.Types.Package.InstallLocation
instance GHC.Show.Show Stack.Types.Package.InstallLocation
instance GHC.Classes.Eq Stack.Types.Package.InstalledPackageLocation
instance GHC.Show.Show Stack.Types.Package.InstalledPackageLocation
instance GHC.Classes.Eq Stack.Types.Package.FileCacheInfo
instance GHC.Show.Show Stack.Types.Package.FileCacheInfo
instance GHC.Generics.Generic Stack.Types.Package.FileCacheInfo
instance GHC.Show.Show Stack.Types.Package.DotCabalDescriptor
instance GHC.Classes.Ord Stack.Types.Package.DotCabalDescriptor
instance GHC.Classes.Eq Stack.Types.Package.DotCabalDescriptor
instance GHC.Show.Show Stack.Types.Package.DotCabalPath
instance GHC.Classes.Ord Stack.Types.Package.DotCabalPath
instance GHC.Classes.Eq Stack.Types.Package.DotCabalPath
instance GHC.Classes.Eq Stack.Types.Package.Installed
instance GHC.Show.Show Stack.Types.Package.Installed
instance GHC.Show.Show Stack.Types.Package.Package
instance GHC.Show.Show Stack.Types.Package.LocalPackage
instance GHC.Show.Show Stack.Types.Package.PackageSource
instance GHC.Classes.Ord Stack.Types.Package.Package
instance GHC.Classes.Eq Stack.Types.Package.Package
instance GHC.Show.Show Stack.Types.Package.GetPackageOpts
instance GHC.Show.Show Stack.Types.Package.GetPackageFiles
instance Control.DeepSeq.NFData Stack.Types.Package.FileCacheInfo
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Package.FileCacheInfo
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Package.FileCacheInfo
instance GHC.Base.Semigroup Stack.Types.Package.InstallLocation
instance GHC.Base.Monoid Stack.Types.Package.InstallLocation
instance GHC.Show.Show (Stack.Types.Package.MemoizedWith env a)
instance GHC.Base.Semigroup Stack.Types.Package.DepValue
instance GHC.Base.Semigroup Stack.Types.Package.DepType
instance GHC.Exception.Type.Exception Stack.Types.Package.PackageException
instance GHC.Show.Show Stack.Types.Package.PackageException

module Stack.Options.TestParser

-- | Parser for test arguments. FIXME hide args
testOptsParser :: Bool -> Parser TestOptsMonoid

module Stack.Options.HaddockParser

-- | Parser for haddock arguments.
haddockOptsParser :: Bool -> Parser HaddockOptsMonoid

module Stack.Options.GhcVariantParser

-- | GHC variant parser
ghcVariantParser :: Bool -> Parser GHCVariant

module Stack.Options.BenchParser

-- | Parser for bench arguments. FIXME hiding options
benchOptsParser :: Bool -> Parser BenchmarkOptsMonoid


-- | Functions for IDEs.
module Stack.IDE
data OutputStream
OutputLogInfo :: OutputStream
OutputStdout :: OutputStream
data ListPackagesCmd
ListPackageNames :: ListPackagesCmd
ListPackageCabalFiles :: ListPackagesCmd

-- | List the packages inside the current project.
listPackages :: HasBuildConfig env => OutputStream -> ListPackagesCmd -> RIO env ()

-- | List the targets in the current project.
listTargets :: forall env. HasBuildConfig env => OutputStream -> RIO env ()

module Stack.DefaultColorWhen

-- | The default adopts the standard proposed at
--   <a>http://no-color.org/</a>, that color should not be added by default
--   if the <tt>NO_COLOR</tt> environment variable is present.
defaultColorWhen :: IO ColorWhen


-- | Docker configuration
module Stack.Config.Docker

-- | Add a default Docker tag name to a given base image.
addDefaultTag :: MonadThrow m => String -> Maybe Project -> Maybe AbstractResolver -> m String

-- | Interprets DockerOptsMonoid options.
dockerOptsFromMonoid :: MonadThrow m => Maybe Project -> Maybe AbstractResolver -> DockerOptsMonoid -> m DockerOpts

-- | Exceptions thrown by Stack.Docker.Config.
data StackDockerConfigException

-- | Only LTS resolvers are supported for default image tag.
ResolverNotSupportedException :: !Maybe Project -> !Maybe AbstractResolver -> StackDockerConfigException
instance GHC.Exception.Type.Exception Stack.Config.Docker.StackDockerConfigException
instance GHC.Show.Show Stack.Config.Docker.StackDockerConfigException


-- | Build configuration
module Stack.Config.Build

-- | Interprets BuildOptsMonoid options.
buildOptsFromMonoid :: BuildOptsMonoid -> BuildOpts
haddockOptsFromMonoid :: HaddockOptsMonoid -> HaddockOpts
testOptsFromMonoid :: TestOptsMonoid -> Maybe [String] -> TestOpts
benchmarkOptsFromMonoid :: BenchmarkOptsMonoid -> Maybe [String] -> BenchmarkOpts

module Path.CheckInstall

-- | Checks if the installed executable will be available on the user's
--   PATH. This doesn't use <tt>envSearchPath menv</tt> because it includes
--   paths only visible when running in the stack environment.
warnInstallSearchPathIssues :: HasConfig env => FilePath -> [Text] -> RIO env ()


-- | Build-specific types.
module Stack.Types.Build
data StackBuildException
Couldn'tFindPkgId :: PackageName -> StackBuildException
CompilerVersionMismatch :: Maybe (ActualCompiler, Arch) -> (WantedCompiler, Arch) -> GHCVariant -> CompilerBuild -> VersionCheck -> Maybe (Path Abs File) -> Text -> StackBuildException
Couldn'tParseTargets :: [Text] -> StackBuildException
UnknownTargets :: Set PackageName -> Map PackageName Version -> Path Abs File -> StackBuildException
TestSuiteFailure :: PackageIdentifier -> Map Text (Maybe ExitCode) -> Maybe (Path Abs File) -> ByteString -> StackBuildException
TestSuiteTypeUnsupported :: TestSuiteInterface -> StackBuildException
ConstructPlanFailed :: String -> StackBuildException
CabalExitedUnsuccessfully :: ExitCode -> PackageIdentifier -> Path Abs File -> [String] -> Maybe (Path Abs File) -> [Text] -> StackBuildException
SetupHsBuildFailure :: ExitCode -> Maybe PackageIdentifier -> Path Abs File -> [String] -> Maybe (Path Abs File) -> [Text] -> StackBuildException
ExecutionFailure :: [SomeException] -> StackBuildException
LocalPackageDoesn'tMatchTarget :: PackageName -> Version -> Version -> StackBuildException
NoSetupHsFound :: Path Abs Dir -> StackBuildException
InvalidFlagSpecification :: Set UnusedFlags -> StackBuildException
InvalidGhcOptionsSpecification :: [PackageName] -> StackBuildException
TargetParseException :: [Text] -> StackBuildException
SomeTargetsNotBuildable :: [(PackageName, NamedComponent)] -> StackBuildException
TestSuiteExeMissing :: Bool -> String -> String -> String -> StackBuildException
CabalCopyFailed :: Bool -> String -> StackBuildException
LocalPackagesPresent :: [PackageIdentifier] -> StackBuildException
CouldNotLockDistDir :: !Path Abs File -> StackBuildException
data FlagSource
FSCommandLine :: FlagSource
FSStackYaml :: FlagSource
data UnusedFlags
UFNoPackage :: FlagSource -> PackageName -> UnusedFlags
UFFlagsNotDefined :: FlagSource -> PackageName -> Set FlagName -> Set FlagName -> UnusedFlags
UFSnapshot :: PackageName -> UnusedFlags

-- | A location to install a package into, either snapshot or local
data InstallLocation
Snap :: InstallLocation
Local :: InstallLocation
data Installed
Library :: PackageIdentifier -> GhcPkgId -> Maybe (Either License License) -> Installed
Executable :: PackageIdentifier -> Installed
psVersion :: PackageSource -> Version

-- | A task to perform when building
data Task
Task :: !PackageIdentifier -> !TaskType -> !TaskConfigOpts -> !Bool -> !Map PackageIdentifier GhcPkgId -> !Bool -> !CachePkgSrc -> !Bool -> !Bool -> Task

-- | the package/version to be built
[taskProvides] :: Task -> !PackageIdentifier

-- | the task type, telling us how to build this
[taskType] :: Task -> !TaskType
[taskConfigOpts] :: Task -> !TaskConfigOpts
[taskBuildHaddock] :: Task -> !Bool

-- | GhcPkgIds of already-installed dependencies
[taskPresent] :: Task -> !Map PackageIdentifier GhcPkgId

-- | indicates that the package can be built in one step
[taskAllInOne] :: Task -> !Bool
[taskCachePkgSrc] :: Task -> !CachePkgSrc

-- | Were any of the dependencies missing? The reason this is necessary
--   is... hairy. And as you may expect, a bug in Cabal. See:
--   <a>https://github.com/haskell/cabal/issues/4728#issuecomment-337937673</a>.
--   The problem is that Cabal may end up generating the same package ID
--   for a dependency, even if the ABI has changed. As a result, without
--   this field, Stack would think that a reconfigure is unnecessary, when
--   in fact we _do_ need to reconfigure. The details here suck. We really
--   need proper hashes for package identifiers.
[taskAnyMissing] :: Task -> !Bool

-- | Is the build type of this package Configure. Check out
--   ensureConfigureScript in Stack.Build.Execute for the motivation
[taskBuildTypeConfig] :: Task -> !Bool
taskIsTarget :: Task -> Bool
taskLocation :: Task -> InstallLocation
taskTargetIsMutable :: Task -> IsMutable

-- | Information on a locally available package of source code
data LocalPackage
LocalPackage :: !Package -> !Set NamedComponent -> !Set NamedComponent -> !Bool -> !Map PackageName VersionRange -> !Map PackageName VersionRange -> !Maybe Package -> !Path Abs File -> !Bool -> !Bool -> !MemoizedWith EnvConfig (Maybe (Set FilePath)) -> !MemoizedWith EnvConfig (Map NamedComponent (Map FilePath FileCacheInfo)) -> !MemoizedWith EnvConfig (Map NamedComponent (Set (Path Abs File))) -> LocalPackage

-- | The <tt>Package</tt> info itself, after resolution with package flags,
--   with tests and benchmarks disabled
[lpPackage] :: LocalPackage -> !Package

-- | Components to build, not including the library component.
[lpComponents] :: LocalPackage -> !Set NamedComponent

-- | Components explicitly requested for build, that are marked "buildable:
--   false".
[lpUnbuildable] :: LocalPackage -> !Set NamedComponent

-- | Whether this package is wanted as a target.
[lpWanted] :: LocalPackage -> !Bool

-- | Used for determining if we can use --enable-tests in a normal build.
[lpTestDeps] :: LocalPackage -> !Map PackageName VersionRange

-- | Used for determining if we can use --enable-benchmarks in a normal
--   build.
[lpBenchDeps] :: LocalPackage -> !Map PackageName VersionRange

-- | This stores the <a>Package</a> with tests and benchmarks enabled, if
--   either is asked for by the user.
[lpTestBench] :: LocalPackage -> !Maybe Package

-- | The .cabal file
[lpCabalFile] :: LocalPackage -> !Path Abs File
[lpBuildHaddocks] :: LocalPackage -> !Bool
[lpForceDirty] :: LocalPackage -> !Bool

-- | Nothing == not dirty, Just == dirty. Note that the Set may be empty if
--   we forced the build to treat packages as dirty. Also, the Set may not
--   include all modified files.
[lpDirtyFiles] :: LocalPackage -> !MemoizedWith EnvConfig (Maybe (Set FilePath))

-- | current state of the files
[lpNewBuildCaches] :: LocalPackage -> !MemoizedWith EnvConfig (Map NamedComponent (Map FilePath FileCacheInfo))

-- | all files used by this package
[lpComponentFiles] :: LocalPackage -> !MemoizedWith EnvConfig (Map NamedComponent (Set (Path Abs File)))

-- | Basic information used to calculate what the configure options are
data BaseConfigOpts
BaseConfigOpts :: !Path Abs Dir -> !Path Abs Dir -> !Path Abs Dir -> !Path Abs Dir -> !BuildOpts -> !BuildOptsCLI -> ![Path Abs Dir] -> BaseConfigOpts
[bcoSnapDB] :: BaseConfigOpts -> !Path Abs Dir
[bcoLocalDB] :: BaseConfigOpts -> !Path Abs Dir
[bcoSnapInstallRoot] :: BaseConfigOpts -> !Path Abs Dir
[bcoLocalInstallRoot] :: BaseConfigOpts -> !Path Abs Dir
[bcoBuildOpts] :: BaseConfigOpts -> !BuildOpts
[bcoBuildOptsCLI] :: BaseConfigOpts -> !BuildOptsCLI
[bcoExtraDBs] :: BaseConfigOpts -> ![Path Abs Dir]

-- | A complete plan of what needs to be built and how to do it
data Plan
Plan :: !Map PackageName Task -> !Map PackageName Task -> !Map GhcPkgId (PackageIdentifier, Text) -> !Map Text InstallLocation -> Plan
[planTasks] :: Plan -> !Map PackageName Task

-- | Final actions to be taken (test, benchmark, etc)
[planFinals] :: Plan -> !Map PackageName Task

-- | Text is reason we're unregistering, for display only
[planUnregisterLocal] :: Plan -> !Map GhcPkgId (PackageIdentifier, Text)

-- | Executables that should be installed after successful building
[planInstallExes] :: Plan -> !Map Text InstallLocation

-- | Options for the <tt>FinalAction</tt> <tt>DoTests</tt>
data TestOpts
TestOpts :: !Bool -> ![String] -> !Bool -> !Bool -> !Maybe Int -> TestOpts

-- | Whether successful tests will be run gain
[toRerunTests] :: TestOpts -> !Bool

-- | Arguments passed to the test program
[toAdditionalArgs] :: TestOpts -> ![String]

-- | Generate a code coverage report
[toCoverage] :: TestOpts -> !Bool

-- | Disable running of tests
[toDisableRun] :: TestOpts -> !Bool

-- | test suite timeout in seconds
[toMaximumTimeSeconds] :: TestOpts -> !Maybe Int

-- | Options for the <tt>FinalAction</tt> <tt>DoBenchmarks</tt>
data BenchmarkOpts
BenchmarkOpts :: !Maybe String -> !Bool -> BenchmarkOpts

-- | Arguments passed to the benchmark program
[beoAdditionalArgs] :: BenchmarkOpts -> !Maybe String

-- | Disable running of benchmarks
[beoDisableRun] :: BenchmarkOpts -> !Bool
data FileWatchOpts
NoFileWatch :: FileWatchOpts
FileWatch :: FileWatchOpts
FileWatchPoll :: FileWatchOpts

-- | Build options that is interpreted by the build command. This is built
--   up from BuildOptsCLI and BuildOptsMonoid
data BuildOpts
BuildOpts :: !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !HaddockOpts -> !Bool -> !Maybe Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Bool -> !Maybe Bool -> !Bool -> !Bool -> !Bool -> !TestOpts -> !Bool -> !BenchmarkOpts -> !Bool -> !Bool -> !Bool -> ![Text] -> !Bool -> !Maybe Text -> BuildOpts
[boptsLibProfile] :: BuildOpts -> !Bool
[boptsExeProfile] :: BuildOpts -> !Bool
[boptsLibStrip] :: BuildOpts -> !Bool
[boptsExeStrip] :: BuildOpts -> !Bool

-- | Build haddocks?
[boptsHaddock] :: BuildOpts -> !Bool

-- | Options to pass to haddock
[boptsHaddockOpts] :: BuildOpts -> !HaddockOpts

-- | Open haddocks in the browser?
[boptsOpenHaddocks] :: BuildOpts -> !Bool

-- | Build haddocks for dependencies?
[boptsHaddockDeps] :: BuildOpts -> !Maybe Bool

-- | Build haddocks for all symbols and packages, like <tt>cabal haddock
--   --internal</tt>
[boptsHaddockInternal] :: BuildOpts -> !Bool

-- | Build hyperlinked source if possible. Fallback to <tt>hscolour</tt>.
--   Disable for no sources.
[boptsHaddockHyperlinkSource] :: BuildOpts -> !Bool

-- | Install executables to user path after building?
[boptsInstallExes] :: BuildOpts -> !Bool

-- | Install executables to compiler tools path after building?
[boptsInstallCompilerTool] :: BuildOpts -> !Bool

-- | Fetch all packages immediately ^ Watch files for changes and
--   automatically rebuild
[boptsPreFetch] :: BuildOpts -> !Bool

-- | Keep building/running after failure
[boptsKeepGoing] :: BuildOpts -> !Maybe Bool

-- | Keep intermediate files and build directories
[boptsKeepTmpFiles] :: BuildOpts -> !Bool

-- | Force treating all local packages as having dirty files
[boptsForceDirty] :: BuildOpts -> !Bool

-- | Turn on tests for local targets
[boptsTests] :: BuildOpts -> !Bool

-- | Additional test arguments
[boptsTestOpts] :: BuildOpts -> !TestOpts

-- | Turn on benchmarks for local targets
[boptsBenchmarks] :: BuildOpts -> !Bool

-- | Additional test arguments ^ Commands (with arguments) to run after a
--   successful build ^ Only perform the configure step when building
[boptsBenchmarkOpts] :: BuildOpts -> !BenchmarkOpts

-- | Perform the configure step even if already configured
[boptsReconfigure] :: BuildOpts -> !Bool

-- | Ask Cabal to be verbose in its builds
[boptsCabalVerbose] :: BuildOpts -> !Bool

-- | Whether to enable split-objs.
[boptsSplitObjs] :: BuildOpts -> !Bool

-- | Which components to skip when building
[boptsSkipComponents] :: BuildOpts -> ![Text]

-- | Should we use the interleaved GHC output when building multiple
--   packages?
[boptsInterleavedOutput] :: BuildOpts -> !Bool
[boptsDdumpDir] :: BuildOpts -> !Maybe Text

-- | Which subset of packages to build
data BuildSubset
BSAll :: BuildSubset

-- | Only install packages in the snapshot database, skipping packages
--   intended for the local database.
BSOnlySnapshot :: BuildSubset
BSOnlyDependencies :: BuildSubset

-- | Refuse to build anything in the snapshot database, see
--   <a>https://github.com/commercialhaskell/stack/issues/5272</a>
BSOnlyLocals :: BuildSubset
defaultBuildOpts :: BuildOpts

-- | The type of a task, either building local code or something from the
--   package index (upstream)
data TaskType
TTLocalMutable :: LocalPackage -> TaskType
TTRemotePackage :: IsMutable -> Package -> PackageLocationImmutable -> TaskType
data IsMutable
Mutable :: IsMutable
Immutable :: IsMutable
installLocationIsMutable :: InstallLocation -> IsMutable

-- | Given the IDs of any missing packages, produce the configure options
data TaskConfigOpts
TaskConfigOpts :: !Set PackageIdentifier -> !Map PackageIdentifier GhcPkgId -> ConfigureOpts -> TaskConfigOpts

-- | Dependencies for which we don't yet have an GhcPkgId
[tcoMissing] :: TaskConfigOpts -> !Set PackageIdentifier

-- | Produce the list of options given the missing <tt>GhcPkgId</tt>s
[tcoOpts] :: TaskConfigOpts -> !Map PackageIdentifier GhcPkgId -> ConfigureOpts

-- | Stored on disk to know whether the files have changed.
newtype BuildCache
BuildCache :: Map FilePath FileCacheInfo -> BuildCache

-- | Modification times of files.
[buildCacheTimes] :: BuildCache -> Map FilePath FileCacheInfo

-- | Stored on disk to know whether the flags have changed.
data ConfigCache
ConfigCache :: !ConfigureOpts -> !Set GhcPkgId -> !Set ByteString -> !Bool -> !CachePkgSrc -> !Text -> ConfigCache

-- | All options used for this package.
[configCacheOpts] :: ConfigCache -> !ConfigureOpts

-- | The GhcPkgIds of all of the dependencies. Since Cabal doesn't take the
--   complete GhcPkgId (only a PackageIdentifier) in the configure options,
--   just using the previous value is insufficient to know if dependencies
--   have changed.
[configCacheDeps] :: ConfigCache -> !Set GhcPkgId

-- | The components to be built. It's a bit of a hack to include this in
--   here, as it's not a configure option (just a build option), but this
--   is a convenient way to force compilation when the components change.
[configCacheComponents] :: ConfigCache -> !Set ByteString

-- | Are haddocks to be built?
[configCacheHaddock] :: ConfigCache -> !Bool
[configCachePkgSrc] :: ConfigCache -> !CachePkgSrc

-- | Value of the PATH env var, see
--   <a>https://github.com/commercialhaskell/stack/issues/3138</a>
[configCachePathEnvVar] :: ConfigCache -> !Text

-- | Render a <tt>BaseConfigOpts</tt> to an actual list of options
configureOpts :: EnvConfig -> BaseConfigOpts -> Map PackageIdentifier GhcPkgId -> Bool -> IsMutable -> Package -> ConfigureOpts
data CachePkgSrc
CacheSrcUpstream :: CachePkgSrc
CacheSrcLocal :: FilePath -> CachePkgSrc
toCachePkgSrc :: PackageSource -> CachePkgSrc
isStackOpt :: Text -> Bool

-- | Get set of wanted package names from locals.
wantedLocalPackages :: [LocalPackage] -> Set PackageName
newtype FileCacheInfo
FileCacheInfo :: SHA256 -> FileCacheInfo
[fciHash] :: FileCacheInfo -> SHA256

-- | Configure options to be sent to Setup.hs configure
data ConfigureOpts
ConfigureOpts :: ![String] -> ![String] -> ConfigureOpts

-- | Options related to various paths. We separate these out since they do
--   not have an impact on the contents of the compiled binary for checking
--   if we can use an existing precompiled cache.
[coDirs] :: ConfigureOpts -> ![String]
[coNoDirs] :: ConfigureOpts -> ![String]

-- | Information on a compiled package: the library conf file (if
--   relevant), the sublibraries (if present) and all of the executable
--   paths.
data PrecompiledCache base
PrecompiledCache :: !Maybe (Path base File) -> ![Path base File] -> ![Path base File] -> PrecompiledCache base

-- | .conf file inside the package database
[pcLibrary] :: PrecompiledCache base -> !Maybe (Path base File)

-- | .conf file inside the package database, for each of the sublibraries
[pcSubLibs] :: PrecompiledCache base -> ![Path base File]

-- | Full paths to executables
[pcExes] :: PrecompiledCache base -> ![Path base File]
instance GHC.Classes.Ord Stack.Types.Build.FlagSource
instance GHC.Classes.Eq Stack.Types.Build.FlagSource
instance GHC.Show.Show Stack.Types.Build.FlagSource
instance GHC.Classes.Ord Stack.Types.Build.UnusedFlags
instance GHC.Classes.Eq Stack.Types.Build.UnusedFlags
instance GHC.Show.Show Stack.Types.Build.UnusedFlags
instance Control.DeepSeq.NFData Stack.Types.Build.PkgDepsOracle
instance GHC.Classes.Eq Stack.Types.Build.PkgDepsOracle
instance GHC.Show.Show Stack.Types.Build.PkgDepsOracle
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Types.Build.BuildCache
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Types.Build.BuildCache
instance GHC.Show.Show Stack.Types.Build.BuildCache
instance GHC.Classes.Eq Stack.Types.Build.BuildCache
instance GHC.Generics.Generic Stack.Types.Build.BuildCache
instance Data.Data.Data Stack.Types.Build.CachePkgSrc
instance GHC.Show.Show Stack.Types.Build.CachePkgSrc
instance GHC.Read.Read Stack.Types.Build.CachePkgSrc
instance GHC.Classes.Eq Stack.Types.Build.CachePkgSrc
instance GHC.Generics.Generic Stack.Types.Build.CachePkgSrc
instance GHC.Show.Show Stack.Types.Build.IsMutable
instance GHC.Classes.Eq Stack.Types.Build.IsMutable
instance GHC.Show.Show Stack.Types.Build.TaskType
instance GHC.Show.Show Stack.Types.Build.BaseConfigOpts
instance Data.Data.Data Stack.Types.Build.ConfigureOpts
instance GHC.Generics.Generic Stack.Types.Build.ConfigureOpts
instance GHC.Classes.Eq Stack.Types.Build.ConfigureOpts
instance GHC.Show.Show Stack.Types.Build.ConfigureOpts
instance GHC.Show.Show Stack.Types.Build.Task
instance GHC.Show.Show Stack.Types.Build.Plan
instance Data.Data.Data Stack.Types.Build.ConfigCache
instance GHC.Show.Show Stack.Types.Build.ConfigCache
instance GHC.Classes.Eq Stack.Types.Build.ConfigCache
instance GHC.Generics.Generic Stack.Types.Build.ConfigCache
instance GHC.Generics.Generic (Stack.Types.Build.PrecompiledCache base)
instance GHC.Classes.Eq (Stack.Types.Build.PrecompiledCache base)
instance GHC.Show.Show (Stack.Types.Build.PrecompiledCache base)
instance Control.DeepSeq.NFData (Stack.Types.Build.PrecompiledCache Path.Posix.Abs)
instance Control.DeepSeq.NFData (Stack.Types.Build.PrecompiledCache Path.Posix.Rel)
instance Control.DeepSeq.NFData Stack.Types.Build.ConfigCache
instance GHC.Show.Show Stack.Types.Build.TaskConfigOpts
instance Control.DeepSeq.NFData Stack.Types.Build.ConfigureOpts
instance GHC.Base.Semigroup Stack.Types.Build.IsMutable
instance GHC.Base.Monoid Stack.Types.Build.IsMutable
instance Control.DeepSeq.NFData Stack.Types.Build.CachePkgSrc
instance Database.Persist.Class.PersistField.PersistField Stack.Types.Build.CachePkgSrc
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Types.Build.CachePkgSrc
instance Control.DeepSeq.NFData Stack.Types.Build.BuildCache
instance GHC.Show.Show Stack.Types.Build.StackBuildException
instance GHC.Exception.Type.Exception Stack.Types.Build.StackBuildException


-- | Work with SQLite database used for caches across an entire user
--   account.
module Stack.Storage.User

-- | Initialize the database.
initUserStorage :: HasLogFunc env => Path Abs File -> (UserStorage -> RIO env a) -> RIO env a

-- | Key used to retrieve the precompiled cache
type PrecompiledCacheKey = Unique PrecompiledCacheParent

-- | Build key used to retrieve the precompiled cache
precompiledCacheKey :: Path Rel Dir -> ActualCompiler -> Version -> Text -> ByteString -> Bool -> PrecompiledCacheKey

-- | Load <a>PrecompiledCache</a> from the database.
loadPrecompiledCache :: (HasConfig env, HasLogFunc env) => PrecompiledCacheKey -> RIO env (Maybe (PrecompiledCache Rel))

-- | Insert or update <a>PrecompiledCache</a> to the database.
savePrecompiledCache :: (HasConfig env, HasLogFunc env) => PrecompiledCacheKey -> PrecompiledCache Rel -> RIO env ()

-- | Get the record of whether an executable is compatible with a Docker
--   image
loadDockerImageExeCache :: (HasConfig env, HasLogFunc env) => Text -> Path Abs File -> UTCTime -> RIO env (Maybe Bool)

-- | Sest the record of whether an executable is compatible with a Docker
--   image
saveDockerImageExeCache :: (HasConfig env, HasLogFunc env) => Text -> Path Abs File -> UTCTime -> Bool -> RIO env ()

-- | Load compiler information, if available, and confirm that the
--   referenced files are unchanged. May throw exceptions!
loadCompilerPaths :: HasConfig env => Path Abs File -> CompilerBuild -> Bool -> RIO env (Maybe CompilerPaths)

-- | Save compiler information. May throw exceptions!
saveCompilerPaths :: HasConfig env => CompilerPaths -> RIO env ()

-- | How many upgrade checks have occurred since the given timestamp?
upgradeChecksSince :: HasConfig env => UTCTime -> RIO env Int

-- | Log in the database that an upgrade check occurred at the given time.
logUpgradeCheck :: HasConfig env => UTCTime -> RIO env ()
instance GHC.Show.Show Stack.Storage.User.PrecompiledCacheParent
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance GHC.Show.Show Stack.Storage.User.PrecompiledCacheSubLib
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance GHC.Show.Show Stack.Storage.User.PrecompiledCacheExe
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance GHC.Show.Show Stack.Storage.User.DockerImageExeCache
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.User.LastPerformed
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.User.LastPerformed
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.User.LastPerformed
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.User.LastPerformed
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.User.LastPerformed
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.User.LastPerformed
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.User.LastPerformed (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.LastPerformed)
instance Database.Persist.Class.PersistEntity.SymbolToField "action" Stack.Storage.User.LastPerformed Stack.Types.Cache.Action
instance Database.Persist.Class.PersistEntity.SymbolToField "timestamp" Stack.Storage.User.LastPerformed Data.Time.Clock.Internal.UTCTime.UTCTime
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.User.LastPerformed GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.User.LastPerformed backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.User.CompilerCache
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.User.CompilerCache
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.User.CompilerCache
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.User.CompilerCache
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.User.CompilerCache
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.User.CompilerCache
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.User.CompilerCache (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.CompilerCache)
instance Database.Persist.Class.PersistEntity.SymbolToField "actualVersion" Stack.Storage.User.CompilerCache Stack.Types.Compiler.ActualCompiler
instance Database.Persist.Class.PersistEntity.SymbolToField "arch" Stack.Storage.User.CompilerCache Data.Text.Internal.Text
instance Database.Persist.Class.PersistEntity.SymbolToField "ghcPath" Stack.Storage.User.CompilerCache GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "ghcSize" Stack.Storage.User.CompilerCache GHC.Int.Int64
instance Database.Persist.Class.PersistEntity.SymbolToField "ghcModified" Stack.Storage.User.CompilerCache GHC.Int.Int64
instance Database.Persist.Class.PersistEntity.SymbolToField "ghcPkgPath" Stack.Storage.User.CompilerCache GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "runghcPath" Stack.Storage.User.CompilerCache GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "haddockPath" Stack.Storage.User.CompilerCache GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "cabalVersion" Stack.Storage.User.CompilerCache Data.Text.Internal.Text
instance Database.Persist.Class.PersistEntity.SymbolToField "globalDb" Stack.Storage.User.CompilerCache GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "globalDbCacheSize" Stack.Storage.User.CompilerCache GHC.Int.Int64
instance Database.Persist.Class.PersistEntity.SymbolToField "globalDbCacheModified" Stack.Storage.User.CompilerCache GHC.Int.Int64
instance Database.Persist.Class.PersistEntity.SymbolToField "info" Stack.Storage.User.CompilerCache Data.ByteString.Internal.ByteString
instance Database.Persist.Class.PersistEntity.SymbolToField "globalDump" Stack.Storage.User.CompilerCache Data.Text.Internal.Text
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.User.CompilerCache GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.User.CompilerCache backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.User.DockerImageExeCache
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.User.DockerImageExeCache
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.User.DockerImageExeCache
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.User.DockerImageExeCache
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.User.DockerImageExeCache
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.User.DockerImageExeCache
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.User.DockerImageExeCache (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.DockerImageExeCache)
instance Database.Persist.Class.PersistEntity.SymbolToField "imageHash" Stack.Storage.User.DockerImageExeCache Data.Text.Internal.Text
instance Database.Persist.Class.PersistEntity.SymbolToField "exePath" Stack.Storage.User.DockerImageExeCache GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "exeTimestamp" Stack.Storage.User.DockerImageExeCache Data.Time.Clock.Internal.UTCTime.UTCTime
instance Database.Persist.Class.PersistEntity.SymbolToField "compatible" Stack.Storage.User.DockerImageExeCache GHC.Types.Bool
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.User.DockerImageExeCache GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.User.DockerImageExeCache backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.User.PrecompiledCacheExe
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.User.PrecompiledCacheExe
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.User.PrecompiledCacheExe
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.User.PrecompiledCacheExe
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.User.PrecompiledCacheExe
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.User.PrecompiledCacheExe
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.User.PrecompiledCacheExe (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheExe)
instance Database.Persist.Class.PersistEntity.SymbolToField "parent" Stack.Storage.User.PrecompiledCacheExe Stack.Storage.User.PrecompiledCacheParentId
instance Database.Persist.Class.PersistEntity.SymbolToField "value" Stack.Storage.User.PrecompiledCacheExe GHC.IO.FilePath
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.User.PrecompiledCacheExe GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.User.PrecompiledCacheExe backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.User.PrecompiledCacheSubLib
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.User.PrecompiledCacheSubLib
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.User.PrecompiledCacheSubLib
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.User.PrecompiledCacheSubLib
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.User.PrecompiledCacheSubLib
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.User.PrecompiledCacheSubLib
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.User.PrecompiledCacheSubLib (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheSubLib)
instance Database.Persist.Class.PersistEntity.SymbolToField "parent" Stack.Storage.User.PrecompiledCacheSubLib Stack.Storage.User.PrecompiledCacheParentId
instance Database.Persist.Class.PersistEntity.SymbolToField "value" Stack.Storage.User.PrecompiledCacheSubLib GHC.IO.FilePath
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.User.PrecompiledCacheSubLib GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.User.PrecompiledCacheSubLib backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.User.PrecompiledCacheParent
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.User.PrecompiledCacheParent
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.User.PrecompiledCacheParent
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.User.PrecompiledCacheParent
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.User.PrecompiledCacheParent
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.User.PrecompiledCacheParent
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.User.PrecompiledCacheParent (Database.Persist.Class.PersistEntity.Key Stack.Storage.User.PrecompiledCacheParent)
instance Database.Persist.Class.PersistEntity.SymbolToField "platformGhcDir" Stack.Storage.User.PrecompiledCacheParent GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "compiler" Stack.Storage.User.PrecompiledCacheParent Data.Text.Internal.Text
instance Database.Persist.Class.PersistEntity.SymbolToField "cabalVersion" Stack.Storage.User.PrecompiledCacheParent Data.Text.Internal.Text
instance Database.Persist.Class.PersistEntity.SymbolToField "packageKey" Stack.Storage.User.PrecompiledCacheParent Data.Text.Internal.Text
instance Database.Persist.Class.PersistEntity.SymbolToField "optionsHash" Stack.Storage.User.PrecompiledCacheParent Data.ByteString.Internal.ByteString
instance Database.Persist.Class.PersistEntity.SymbolToField "haddock" Stack.Storage.User.PrecompiledCacheParent GHC.Types.Bool
instance Database.Persist.Class.PersistEntity.SymbolToField "library" Stack.Storage.User.PrecompiledCacheParent (GHC.Maybe.Maybe GHC.IO.FilePath)
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.User.PrecompiledCacheParent GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.User.PrecompiledCacheParent backend


-- | Work with SQLite database used for caches across a single project.
module Stack.Storage.Project

-- | Initialize the database.
initProjectStorage :: HasLogFunc env => Path Abs File -> (ProjectStorage -> RIO env a) -> RIO env a

-- | Key used to retrieve configuration or flag cache
type ConfigCacheKey = Unique ConfigCacheParent

-- | Build key used to retrieve configuration or flag cache
configCacheKey :: Path Abs Dir -> ConfigCacheType -> ConfigCacheKey

-- | Load <a>ConfigCache</a> from the database.
loadConfigCache :: (HasBuildConfig env, HasLogFunc env) => ConfigCacheKey -> RIO env (Maybe ConfigCache)

-- | Insert or update <a>ConfigCache</a> to the database.
saveConfigCache :: (HasBuildConfig env, HasLogFunc env) => ConfigCacheKey -> ConfigCache -> RIO env ()

-- | Mark <a>ConfigCache</a> as inactive in the database. We use a flag
--   instead of deleting the records since, in most cases, the same cache
--   will be written again within in a few seconds (after `cabal
--   configure`), so this avoids unnecessary database churn.
deactiveConfigCache :: HasBuildConfig env => ConfigCacheKey -> RIO env ()
instance GHC.Show.Show Stack.Storage.Project.ConfigCacheParent
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance GHC.Show.Show Stack.Storage.Project.ConfigCacheDirOption
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance GHC.Show.Show Stack.Storage.Project.ConfigCacheNoDirOption
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance GHC.Show.Show Stack.Storage.Project.ConfigCacheDep
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance GHC.Show.Show Stack.Storage.Project.ConfigCacheComponent
instance Data.Aeson.Types.FromJSON.FromJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Data.Aeson.Types.ToJSON.ToJSON (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Database.Persist.Sql.Class.PersistFieldSql (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Database.Persist.Class.PersistField.PersistField (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Web.Internal.HttpApiData.FromHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Web.Internal.HttpApiData.ToHttpApiData (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Web.PathPieces.PathPiece (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance GHC.Classes.Ord (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance GHC.Classes.Eq (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance GHC.Read.Read (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance GHC.Show.Show (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.Project.ConfigCacheComponent
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.Project.ConfigCacheComponent
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.Project.ConfigCacheComponent
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.Project.ConfigCacheComponent
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.Project.ConfigCacheComponent
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.Project.ConfigCacheComponent
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.Project.ConfigCacheComponent (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheComponent)
instance Database.Persist.Class.PersistEntity.SymbolToField "parent" Stack.Storage.Project.ConfigCacheComponent Stack.Storage.Project.ConfigCacheParentId
instance Database.Persist.Class.PersistEntity.SymbolToField "value" Stack.Storage.Project.ConfigCacheComponent Data.ByteString.Internal.ByteString
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.Project.ConfigCacheComponent GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.Project.ConfigCacheComponent backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.Project.ConfigCacheDep
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.Project.ConfigCacheDep
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.Project.ConfigCacheDep
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.Project.ConfigCacheDep
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.Project.ConfigCacheDep
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.Project.ConfigCacheDep
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.Project.ConfigCacheDep (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDep)
instance Database.Persist.Class.PersistEntity.SymbolToField "parent" Stack.Storage.Project.ConfigCacheDep Stack.Storage.Project.ConfigCacheParentId
instance Database.Persist.Class.PersistEntity.SymbolToField "value" Stack.Storage.Project.ConfigCacheDep Stack.Types.GhcPkgId.GhcPkgId
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.Project.ConfigCacheDep GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.Project.ConfigCacheDep backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.Project.ConfigCacheNoDirOption
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.Project.ConfigCacheNoDirOption
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.Project.ConfigCacheNoDirOption
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.Project.ConfigCacheNoDirOption
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.Project.ConfigCacheNoDirOption
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.Project.ConfigCacheNoDirOption
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.Project.ConfigCacheNoDirOption (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheNoDirOption)
instance Database.Persist.Class.PersistEntity.SymbolToField "parent" Stack.Storage.Project.ConfigCacheNoDirOption Stack.Storage.Project.ConfigCacheParentId
instance Database.Persist.Class.PersistEntity.SymbolToField "index" Stack.Storage.Project.ConfigCacheNoDirOption GHC.Types.Int
instance Database.Persist.Class.PersistEntity.SymbolToField "value" Stack.Storage.Project.ConfigCacheNoDirOption GHC.Base.String
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.Project.ConfigCacheNoDirOption GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.Project.ConfigCacheNoDirOption backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.Project.ConfigCacheDirOption
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.Project.ConfigCacheDirOption
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.Project.ConfigCacheDirOption
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.Project.ConfigCacheDirOption
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.Project.ConfigCacheDirOption
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.Project.ConfigCacheDirOption
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.Project.ConfigCacheDirOption (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheDirOption)
instance Database.Persist.Class.PersistEntity.SymbolToField "parent" Stack.Storage.Project.ConfigCacheDirOption Stack.Storage.Project.ConfigCacheParentId
instance Database.Persist.Class.PersistEntity.SymbolToField "index" Stack.Storage.Project.ConfigCacheDirOption GHC.Types.Int
instance Database.Persist.Class.PersistEntity.SymbolToField "value" Stack.Storage.Project.ConfigCacheDirOption GHC.Base.String
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.Project.ConfigCacheDirOption GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.Project.ConfigCacheDirOption backend
instance Database.Persist.Class.PersistEntity.PersistEntity Stack.Storage.Project.ConfigCacheParent
instance Database.Persist.Class.PersistField.PersistField Stack.Storage.Project.ConfigCacheParent
instance Database.Persist.Sql.Class.PersistFieldSql Stack.Storage.Project.ConfigCacheParent
instance Database.Persist.Class.PersistStore.ToBackendKey Database.Persist.SqlBackend.Internal.SqlBackend Stack.Storage.Project.ConfigCacheParent
instance Database.Persist.Class.PersistUnique.OnlyOneUniqueKey Stack.Storage.Project.ConfigCacheParent
instance Database.Persist.Class.PersistUnique.AtLeastOneUniqueKey Stack.Storage.Project.ConfigCacheParent
instance Database.Persist.Class.PersistEntity.SymbolToField "id" Stack.Storage.Project.ConfigCacheParent (Database.Persist.Class.PersistEntity.Key Stack.Storage.Project.ConfigCacheParent)
instance Database.Persist.Class.PersistEntity.SymbolToField "directory" Stack.Storage.Project.ConfigCacheParent GHC.IO.FilePath
instance Database.Persist.Class.PersistEntity.SymbolToField "type" Stack.Storage.Project.ConfigCacheParent Stack.Types.Cache.ConfigCacheType
instance Database.Persist.Class.PersistEntity.SymbolToField "pkgSrc" Stack.Storage.Project.ConfigCacheParent Stack.Types.Build.CachePkgSrc
instance Database.Persist.Class.PersistEntity.SymbolToField "active" Stack.Storage.Project.ConfigCacheParent GHC.Types.Bool
instance Database.Persist.Class.PersistEntity.SymbolToField "pathEnvVar" Stack.Storage.Project.ConfigCacheParent Data.Text.Internal.Text
instance Database.Persist.Class.PersistEntity.SymbolToField "haddock" Stack.Storage.Project.ConfigCacheParent GHC.Types.Bool
instance (Database.Persist.Class.PersistQuery backend, Database.Persist.Class.PersistEntity.PersistEntityBackend Stack.Storage.Project.ConfigCacheParent GHC.Types.~ Database.Persist.Class.PersistStore.BaseBackend backend) => Database.Persist.Class.DeleteCascade.DeleteCascade Stack.Storage.Project.ConfigCacheParent backend

module Stack.Setup.Installed
getCompilerVersion :: (HasProcessContext env, HasLogFunc env) => WhichCompiler -> Path Abs File -> RIO env ActualCompiler
markInstalled :: (MonadIO m, MonadThrow m) => Path Abs Dir -> Tool -> m ()
unmarkInstalled :: MonadIO m => Path Abs Dir -> Tool -> m ()
listInstalled :: (MonadIO m, MonadThrow m) => Path Abs Dir -> m [Tool]
data Tool

-- | e.g. ghc-7.8.4, msys2-20150512
Tool :: PackageIdentifier -> Tool

-- | e.g. ghc-git-COMMIT_ID-FLAVOUR
ToolGhcGit :: !Text -> !Text -> Tool
toolString :: Tool -> String
toolNameString :: Tool -> String
parseToolText :: Text -> Maybe Tool

-- | Binary directories for the given installed package
extraDirs :: HasConfig env => Tool -> RIO env ExtraDirs
installDir :: (MonadReader env m, MonadThrow m) => Path Abs Dir -> Tool -> m (Path Abs Dir)
tempInstallDir :: (MonadReader env m, MonadThrow m) => Path Abs Dir -> Tool -> m (Path Abs Dir)
instance GHC.Classes.Eq Stack.Setup.Installed.Tool


-- | Functions for the GHC package database.
module Stack.GhcPkg

-- | Get the global package database
getGlobalDB :: (HasProcessContext env, HasLogFunc env) => GhcPkgExe -> RIO env (Path Abs Dir)

-- | Get the value of a field of the package.
findGhcPkgField :: (HasProcessContext env, HasLogFunc env) => GhcPkgExe -> [Path Abs Dir] -> String -> Text -> RIO env (Maybe Text)

-- | Create a package database in the given directory, if it doesn't exist.
createDatabase :: (HasProcessContext env, HasLogFunc env) => GhcPkgExe -> Path Abs Dir -> RIO env ()

-- | unregister list of package ghcids, batching available from GHC 8.2.1,
--   see
--   <a>https://github.com/commercialhaskell/stack/issues/2662#issuecomment-460342402</a>
--   using GHC package id where available (from GHC 7.9)
unregisterGhcPkgIds :: (HasProcessContext env, HasLogFunc env) => GhcPkgExe -> Path Abs Dir -> NonEmpty (Either PackageIdentifier GhcPkgId) -> RIO env ()

-- | Get the environment variable to use for the package DB paths.
ghcPkgPathEnvVar :: WhichCompiler -> Text

-- | Get the value for GHC_PACKAGE_PATH
mkGhcPackagePath :: Bool -> Path Abs Dir -> Path Abs Dir -> [Path Abs Dir] -> Path Abs Dir -> Text

module Stack.PackageDump

-- | A single line of input, not including line endings
type Line = Text

-- | Apply the given Sink to each section of output, broken by a single
--   line containing ---
eachSection :: Monad m => ConduitM Line Void m a -> ConduitM Text a m ()

-- | Grab each key/value pair
eachPair :: Monad m => (Text -> ConduitM Line Void m a) -> ConduitM Line a m ()

-- | Dump information for a single package
data DumpPackage
DumpPackage :: !GhcPkgId -> !PackageIdentifier -> !Maybe PackageIdentifier -> !Maybe License -> ![FilePath] -> ![Text] -> !Bool -> !Set ModuleName -> ![GhcPkgId] -> ![FilePath] -> !Maybe FilePath -> !Bool -> DumpPackage
[dpGhcPkgId] :: DumpPackage -> !GhcPkgId
[dpPackageIdent] :: DumpPackage -> !PackageIdentifier
[dpParentLibIdent] :: DumpPackage -> !Maybe PackageIdentifier
[dpLicense] :: DumpPackage -> !Maybe License
[dpLibDirs] :: DumpPackage -> ![FilePath]
[dpLibraries] :: DumpPackage -> ![Text]
[dpHasExposedModules] :: DumpPackage -> !Bool
[dpExposedModules] :: DumpPackage -> !Set ModuleName
[dpDepends] :: DumpPackage -> ![GhcPkgId]
[dpHaddockInterfaces] :: DumpPackage -> ![FilePath]
[dpHaddockHtml] :: DumpPackage -> !Maybe FilePath
[dpIsExposed] :: DumpPackage -> !Bool

-- | Convert a stream of bytes into a stream of <tt>DumpPackage</tt>s
conduitDumpPackage :: MonadThrow m => ConduitM Text DumpPackage m ()

-- | Call ghc-pkg dump with appropriate flags and stream to the given
--   <tt>Sink</tt>, for a single database
ghcPkgDump :: (HasProcessContext env, HasLogFunc env) => GhcPkgExe -> [Path Abs Dir] -> ConduitM Text Void (RIO env) a -> RIO env a

-- | Call ghc-pkg describe with appropriate flags and stream to the given
--   <tt>Sink</tt>, for a single database
ghcPkgDescribe :: (HasProcessContext env, HasLogFunc env, HasCompiler env) => GhcPkgExe -> PackageName -> [Path Abs Dir] -> ConduitM Text Void (RIO env) a -> RIO env a

-- | Find the package IDs matching the given constraints with all
--   dependencies installed. Packages not mentioned in the provided
--   <tt>Map</tt> are allowed to be present too.
sinkMatching :: Monad m => Map PackageName Version -> ConduitM DumpPackage o m (Map PackageName DumpPackage)

-- | Prune a list of possible packages down to those whose dependencies are
--   met.
--   
--   <ul>
--   <li>id uniquely identifies an item</li>
--   <li>There can be multiple items per name</li>
--   </ul>
pruneDeps :: (Ord name, Ord id) => (id -> name) -> (item -> id) -> (item -> [id]) -> (item -> item -> item) -> [item] -> Map name item
instance GHC.Exception.Type.Exception Stack.PackageDump.PackageDumpException
instance GHC.Show.Show Stack.PackageDump.PackageDumpException

module Stack.SourceMap

-- | Create a <a>ProjectPackage</a> from a directory containing a package.
mkProjectPackage :: forall env. (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PrintWarnings -> ResolvedPath Dir -> Bool -> RIO env ProjectPackage
snapToDepPackage :: forall env. (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Bool -> PackageName -> SnapshotPackage -> RIO env DepPackage

-- | Create a <a>DepPackage</a> from a <a>PackageLocation</a>, from some
--   additional to a snapshot setting (extra-deps or command line)
additionalDepPackage :: forall env. (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Bool -> PackageLocation -> RIO env DepPackage
loadVersion :: MonadIO m => CommonPackage -> m Version
getPLIVersion :: PackageLocationImmutable -> Version

-- | Load the global hints from Github.
loadGlobalHints :: (HasTerm env, HasPantryConfig env) => WantedCompiler -> RIO env (Maybe (Map PackageName Version))
type DumpedGlobalPackage = DumpPackage
actualFromGhc :: (HasConfig env, HasCompiler env) => SMWanted -> ActualCompiler -> RIO env (SMActual DumpedGlobalPackage)
actualFromHints :: HasConfig env => SMWanted -> ActualCompiler -> RIO env (SMActual GlobalPackageVersion)
checkFlagsUsedThrowing :: (MonadIO m, MonadThrow m) => Map PackageName (Map FlagName Bool) -> FlagSource -> Map PackageName ProjectPackage -> Map PackageName DepPackage -> m ()

-- | Simple cond check for boot packages - checks only OS and Arch
globalCondCheck :: HasConfig env => RIO env (ConfVar -> Either ConfVar Bool)
pruneGlobals :: Map PackageName DumpedGlobalPackage -> Set PackageName -> Map PackageName GlobalPackage
globalsFromHints :: HasConfig env => WantedCompiler -> RIO env (Map PackageName Version)
getCompilerInfo :: (HasConfig env, HasCompiler env) => RIO env Builder
immutableLocSha :: PackageLocationImmutable -> Builder
loadProjectSnapshotCandidate :: HasConfig env => RawSnapshotLocation -> PrintWarnings -> Bool -> RIO env (SnapshotCandidate env)
type SnapshotCandidate env = [ResolvedPath Dir] -> RIO env (SMActual GlobalPackageVersion)
globalsFromDump :: (HasLogFunc env, HasProcessContext env) => GhcPkgExe -> RIO env (Map PackageName DumpedGlobalPackage)

module Stack.Lock
lockCachedWanted :: (HasPantryConfig env, HasRunner env) => Path Abs File -> RawSnapshotLocation -> (Map RawPackageLocationImmutable PackageLocationImmutable -> WantedCompiler -> Map PackageName (Bool -> RIO env DepPackage) -> RIO env (SMWanted, [CompletedPLI])) -> RIO env SMWanted
data LockedLocation a b
LockedLocation :: a -> b -> LockedLocation a b
[llOriginal] :: LockedLocation a b -> a
[llCompleted] :: LockedLocation a b -> b
data Locked
Locked :: [LockedLocation RawSnapshotLocation SnapshotLocation] -> [LockedLocation RawPackageLocationImmutable PackageLocationImmutable] -> Locked
[lckSnapshotLocations] :: Locked -> [LockedLocation RawSnapshotLocation SnapshotLocation]
[lckPkgImmutableLocations] :: Locked -> [LockedLocation RawPackageLocationImmutable PackageLocationImmutable]
instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Stack.Lock.LockedLocation a b)
instance (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (Stack.Lock.LockedLocation a b)
instance GHC.Show.Show Stack.Lock.Locked
instance GHC.Classes.Eq Stack.Lock.Locked
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Lock.Locked
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings (Pantry.Types.Unresolved Stack.Lock.Locked))
instance Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings (Pantry.Types.Unresolved Stack.Lock.SingleRPLI))
instance (Data.Aeson.Types.ToJSON.ToJSON a, Data.Aeson.Types.ToJSON.ToJSON b) => Data.Aeson.Types.ToJSON.ToJSON (Stack.Lock.LockedLocation a b)
instance (Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings (Pantry.Types.Unresolved a)), Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings (Pantry.Types.Unresolved b))) => Data.Aeson.Types.FromJSON.FromJSON (Pantry.Internal.AesonExtended.WithJSONWarnings (Pantry.Types.Unresolved (Stack.Lock.LockedLocation a b)))


-- | Parsing command line targets
--   
--   There are two relevant data sources for performing this parsing: the
--   project configuration, and command line arguments. Project
--   configurations includes the resolver (defining a LoadedSnapshot of
--   global and snapshot packages), local dependencies, and project
--   packages. It also defines local flag overrides.
--   
--   The command line arguments specify both additional local flag
--   overrides and targets in their raw form.
--   
--   Flags are simple: we just combine CLI flags with config flags and make
--   one big map of flags, preferring CLI flags when present.
--   
--   Raw targets can be a package name, a package name with component, just
--   a component, or a package name and version number. We first must
--   resolve these raw targets into both simple targets and additional
--   dependencies. This works as follows:
--   
--   <ul>
--   <li>If a component is specified, find a unique project package which
--   defines that component, and convert it into a name+component
--   target.</li>
--   <li>Ensure that all name+component values refer to valid components in
--   the given project package.</li>
--   <li>For names, check if the name is present in the snapshot, local
--   deps, or project packages. If it is not, then look up the most recent
--   version in the package index and convert to a name+version.</li>
--   <li>For name+version, first ensure that the name is not used by a
--   project package. Next, if that name+version is present in the snapshot
--   or local deps _and_ its location is PLIndex, we have the package.
--   Otherwise, add to local deps with the appropriate PLIndex.</li>
--   </ul>
--   
--   If in either of the last two bullets we added a package to local deps,
--   print a warning to the user recommending modifying the extra-deps.
--   
--   Combine the various <tt>ResolveResults</tt>s together into
--   <a>Target</a> values, by combining various components for a single
--   package and ensuring that no conflicting statements were made about
--   targets.
--   
--   At this point, we now have a Map from package name to SimpleTarget,
--   and an updated Map of local dependencies. We still have the aggregated
--   flags, and the snapshot and project packages.
--   
--   Finally, we upgrade the snapshot by using calculatePackagePromotion.
module Stack.Build.Target

-- | How a package is intended to be built
data Target

-- | Build all of the default components.
TargetAll :: !PackageType -> Target

-- | Only build specific components
TargetComps :: !Set NamedComponent -> Target

-- | Do we need any targets? For example, `stack build` will fail if no
--   targets are provided.
data NeedTargets
NeedTargets :: NeedTargets
AllowNoTargets :: NeedTargets
data PackageType
PTProject :: PackageType
PTDependency :: PackageType
parseTargets :: HasBuildConfig env => NeedTargets -> Bool -> BuildOptsCLI -> SMActual GlobalPackage -> RIO env SMTargets

-- | Get the <a>Version</a> from a <a>GenericPackageDescription</a>.
gpdVersion :: GenericPackageDescription -> Version

-- | If this function returns <tt>Nothing</tt>, the input should be treated
--   as a directory.
parseRawTarget :: Text -> Maybe RawTarget

-- | Raw command line input, without checking against any databases or list
--   of locals. Does not deal with directories
data RawTarget
RTPackageComponent :: !PackageName -> !UnresolvedComponent -> RawTarget
RTComponent :: !ComponentName -> RawTarget
RTPackage :: !PackageName -> RawTarget
RTPackageIdentifier :: !PackageIdentifier -> RawTarget

-- | Either a fully resolved component, or a component name that could be
--   either an executable, test, or benchmark
data UnresolvedComponent
ResolvedComponent :: !NamedComponent -> UnresolvedComponent
UnresolvedComponent :: !ComponentName -> UnresolvedComponent
instance GHC.Classes.Ord Stack.Build.Target.UnresolvedComponent
instance GHC.Classes.Eq Stack.Build.Target.UnresolvedComponent
instance GHC.Show.Show Stack.Build.Target.UnresolvedComponent
instance GHC.Classes.Eq Stack.Build.Target.RawTarget
instance GHC.Show.Show Stack.Build.Target.RawTarget

module Stack.Constants.Config

-- | Package's build artifacts directory.
distDirFromDir :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs Dir)

-- | The directory containing all dist directories, including all different
--   GHC/Cabal combos.
rootDistDirFromDir :: (MonadReader env m, HasConfig env) => Path Abs Dir -> m (Path Abs Dir)

-- | Package's setup-config storing Cabal configuration
setupConfigFromDir :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs File)

-- | Package's working directory.
workDirFromDir :: (MonadReader env m, HasConfig env) => Path Abs Dir -> m (Path Abs Dir)

-- | Relative location of build artifacts.
distRelativeDir :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Rel Dir)

-- | Image staging dir from project root.
imageStagingDir :: (MonadReader env m, HasConfig env, MonadThrow m) => Path Abs Dir -> Int -> m (Path Abs Dir)

-- | Docker sandbox from project root.
projectDockerSandboxDir :: (MonadReader env m, HasConfig env) => Path Abs Dir -> m (Path Abs Dir)

-- | The filename used for modification check of .cabal
configCabalMod :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs File)

-- | The filename used for modification check of setup-config
configSetupConfigMod :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs File)

-- | The filename used for the project root from the last build of a
--   package
configPackageProjectRoot :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs File)

-- | The directory containing the files used for dirtiness check of source
--   files.
buildCachesDir :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs Dir)

-- | The filename used to mark tests as having succeeded
testSuccessFile :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs File)

-- | The filename used to mark tests as having built
testBuiltFile :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs File)

-- | Relative location of directory for HPC work.
hpcRelativeDir :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Rel Dir)

-- | Directory for HPC work.
hpcDirFromDir :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -> m (Path Abs Dir)

-- | Output .o/.hi directory.
objectInterfaceDirL :: HasBuildConfig env => Getting r env (Path Abs Dir)

-- | GHCi files directory.
ghciDirL :: HasBuildConfig env => Getting r env (Path Abs Dir)

-- | Directory for project templates.
templatesDir :: Config -> Path Abs Dir


-- | Create new a new project directory populated with a basic working
--   project.
module Stack.New

-- | Create a new project with the given options.
new :: HasConfig env => NewOpts -> Bool -> RIO env (Path Abs Dir)

-- | Options for creating a new project.
data NewOpts
NewOpts :: PackageName -> Bool -> Maybe TemplateName -> Map Text Text -> NewOpts

-- | Name of the project to create.
[newOptsProjectName] :: NewOpts -> PackageName

-- | Whether to create the project without a directory.
[newOptsCreateBare] :: NewOpts -> Bool

-- | Name of the template to use.
[newOptsTemplate] :: NewOpts -> Maybe TemplateName

-- | Nonce parameters specified just for this invocation.
[newOptsNonceParams] :: NewOpts -> Map Text Text

-- | A template name.
data TemplateName

-- | Display help for the templates command.
templatesHelp :: HasLogFunc env => RIO env ()
instance GHC.Exception.Type.Exception Stack.New.NewException
instance GHC.Show.Show Stack.New.NewException


-- | Clean a project.
module Stack.Clean

-- | Deletes build artifacts in the current project.
--   
--   Throws <a>StackCleanException</a>.
clean :: HasBuildConfig env => CleanOpts -> RIO env ()

-- | Options for <tt>stack clean</tt>.
data CleanOpts

-- | Delete the "dist directories" as defined in <a>distRelativeDir</a> for
--   the given local packages. If no packages are given, all project
--   packages should be cleaned.
CleanShallow :: [PackageName] -> CleanOpts

-- | Delete all work directories in the project.
CleanFull :: CleanOpts

-- | Clean commands
data CleanCommand
Clean :: CleanCommand
Purge :: CleanCommand

-- | Exceptions during cleanup.
newtype StackCleanException
NonLocalPackages :: [PackageName] -> StackCleanException
instance GHC.Show.Show Stack.Clean.StackCleanException
instance GHC.Exception.Type.Exception Stack.Clean.StackCleanException

module Stack.Options.CleanParser

-- | Command-line parser for the clean command.
cleanOptsParser :: CleanCommand -> Parser CleanOpts


-- | Nix configuration
module Stack.Config.Nix

-- | Interprets NixOptsMonoid options.
nixOptsFromMonoid :: HasRunner env => NixOptsMonoid -> OS -> RIO env NixOpts
nixCompiler :: WantedCompiler -> Either StringException Text
nixCompilerVersion :: WantedCompiler -> Either StringException Text
data StackNixException

-- | Nix can't be given packages and a shell file at the same time
NixCannotUseShellFileAndPackagesException :: StackNixException
instance GHC.Exception.Type.Exception Stack.Config.Nix.StackNixException
instance GHC.Show.Show Stack.Config.Nix.StackNixException


-- | Generate haddocks
module Stack.Build.Haddock

-- | Generate Haddock index and contents for local packages.
generateLocalHaddockIndex :: (HasProcessContext env, HasLogFunc env, HasCompiler env) => BaseConfigOpts -> Map GhcPkgId DumpPackage -> [LocalPackage] -> RIO env ()

-- | Generate Haddock index and contents for local packages and their
--   dependencies.
generateDepsHaddockIndex :: (HasProcessContext env, HasLogFunc env, HasCompiler env) => BaseConfigOpts -> Map GhcPkgId DumpPackage -> Map GhcPkgId DumpPackage -> Map GhcPkgId DumpPackage -> [LocalPackage] -> RIO env ()

-- | Generate Haddock index and contents for all snapshot packages.
generateSnapHaddockIndex :: (HasProcessContext env, HasLogFunc env, HasCompiler env) => BaseConfigOpts -> Map GhcPkgId DumpPackage -> Map GhcPkgId DumpPackage -> RIO env ()
openHaddocksInBrowser :: HasTerm env => BaseConfigOpts -> Map PackageName (PackageIdentifier, InstallLocation) -> Set PackageName -> RIO env ()

-- | Determine whether we should haddock for a package.
shouldHaddockPackage :: BuildOpts -> Set PackageName -> PackageName -> Bool

-- | Determine whether to build haddocks for dependencies.
shouldHaddockDeps :: BuildOpts -> Bool


-- | The general Stack configuration that starts everything off. This
--   should be smart to falback if there is no stack.yaml, instead relying
--   on whatever files are available.
--   
--   If there is no stack.yaml, and there is a cabal.config, we read in
--   those constraints, and if there's a cabal.sandbox.config, we read any
--   constraints from there and also find the package database from there,
--   etc. And if there's nothing, we should probably default to behaving
--   like cabal, possibly with spitting out a warning that "you should run
--   `stk init` to make things better".
module Stack.Config

-- | Load the configuration, using current directory, environment
--   variables, and defaults as necessary.
loadConfig :: HasRunner env => (Config -> RIO env a) -> RIO env a

-- | Load and parse YAML from the given config file. Throws
--   <a>ParseConfigFileException</a> when there's a decoding error.
loadConfigYaml :: HasLogFunc env => (Value -> Parser (WithJSONWarnings a)) -> Path Abs File -> RIO env a
packagesParser :: Parser [String]

-- | Get the location of the implicit global project directory. If the
--   directory already exists at the deprecated location, its location is
--   returned. Otherwise, the new location is returned.
getImplicitGlobalProjectDir :: HasLogFunc env => Config -> RIO env (Path Abs Dir)

-- | Download the <a>Snapshots</a> value from stackage.org.
getSnapshots :: HasConfig env => RIO env Snapshots

-- | Turn an <a>AbstractResolver</a> into a <tt>Resolver</tt>.
makeConcreteResolver :: HasConfig env => AbstractResolver -> RIO env RawSnapshotLocation

-- | <tt><a>checkOwnership</a> dir</tt> throws
--   <a>UserDoesn'tOwnDirectory</a> if <tt>dir</tt> isn't owned by the
--   current user.
--   
--   If <tt>dir</tt> doesn't exist, its parent directory is checked
--   instead. If the parent directory doesn't exist either,
--   <tt><a>NoSuchDirectory</a> (<a>parent</a> dir)</tt> is thrown.
checkOwnership :: MonadIO m => Path Abs Dir -> m ()

-- | <a>True</a> if we are currently running inside a Docker container.
getInContainer :: MonadIO m => m Bool

-- | <a>True</a> if we are currently running inside a Nix.
getInNixShell :: MonadIO m => m Bool
defaultConfigYaml :: IsString s => s

-- | Get the location of the project config file, if it exists.
getProjectConfig :: HasLogFunc env => StackYamlLoc -> RIO env (ProjectConfig (Path Abs File))

-- | Load the build configuration, adds build-specific values to config
--   loaded by <tt>loadConfig</tt>. values.
withBuildConfig :: RIO BuildConfig a -> RIO Config a

-- | Runs the provided action with a new <a>LogFunc</a>, given a
--   <a>StylesUpdate</a>.
withNewLogFunc :: MonadUnliftIO m => GlobalOpts -> Bool -> StylesUpdate -> (LogFunc -> m a) -> m a


-- | Run commands in a nix-shell
module Stack.Nix

-- | Command-line argument for "nix"
nixCmdName :: String
nixHelpOptName :: String
runShellAndExit :: RIO Config void
instance GHC.Exception.Type.Exception Stack.Nix.StackNixException
instance GHC.Show.Show Stack.Nix.StackNixException

module Stack.Options.NixParser
nixOptsParser :: Bool -> Parser NixOptsMonoid


-- | Make changes to project or global configuration.
module Stack.ConfigCmd
data ConfigCmdSet
ConfigCmdSetResolver :: Unresolved AbstractResolver -> ConfigCmdSet
ConfigCmdSetSystemGhc :: CommandScope -> Bool -> ConfigCmdSet
ConfigCmdSetInstallGhc :: CommandScope -> Bool -> ConfigCmdSet
configCmdSetParser :: Parser ConfigCmdSet
cfgCmdSet :: (HasConfig env, HasGHCVariant env) => ConfigCmdSet -> RIO env ()
cfgCmdSetName :: String
configCmdEnvParser :: Parser EnvSettings
cfgCmdEnv :: EnvSettings -> RIO EnvConfig ()
cfgCmdEnvName :: String
cfgCmdName :: String
instance GHC.Show.Show Stack.ConfigCmd.EnvVarAction


-- | Cache information about previous builds
module Stack.Build.Cache

-- | Try to read the dirtiness cache for the given package directory.
tryGetBuildCache :: HasEnvConfig env => Path Abs Dir -> NamedComponent -> RIO env (Maybe (Map FilePath FileCacheInfo))

-- | Try to read the dirtiness cache for the given package directory.
tryGetConfigCache :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe ConfigCache)

-- | Try to read the mod time of the cabal file from the last build
tryGetCabalMod :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe CTime)

-- | Try to read the mod time of setup-config file from the last build
tryGetSetupConfigMod :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe CTime)

-- | Try to read the project root from the last build of a package
tryGetPackageProjectRoot :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe ByteString)

-- | Get all of the installed executables
getInstalledExes :: HasEnvConfig env => InstallLocation -> RIO env [PackageIdentifier]

-- | Loads the flag cache for the given installed extra-deps
tryGetFlagCache :: HasEnvConfig env => Installed -> RIO env (Maybe ConfigCache)

-- | Delete the caches for the project.
deleteCaches :: HasEnvConfig env => Path Abs Dir -> RIO env ()

-- | Mark the given executable as installed
markExeInstalled :: HasEnvConfig env => InstallLocation -> PackageIdentifier -> RIO env ()

-- | Mark the given executable as not installed
markExeNotInstalled :: HasEnvConfig env => InstallLocation -> PackageIdentifier -> RIO env ()
writeFlagCache :: HasEnvConfig env => Installed -> ConfigCache -> RIO env ()

-- | Write the dirtiness cache for this package's files.
writeBuildCache :: HasEnvConfig env => Path Abs Dir -> NamedComponent -> Map FilePath FileCacheInfo -> RIO env ()

-- | Write the dirtiness cache for this package's configuration.
writeConfigCache :: HasEnvConfig env => Path Abs Dir -> ConfigCache -> RIO env ()

-- | See <a>tryGetCabalMod</a>
writeCabalMod :: HasEnvConfig env => Path Abs Dir -> CTime -> RIO env ()

-- | See <a>tryGetSetupConfigMod</a>
writeSetupConfigMod :: HasEnvConfig env => Path Abs Dir -> Maybe CTime -> RIO env ()

-- | See <a>tryGetPackageProjectRoot</a>
writePackageProjectRoot :: HasEnvConfig env => Path Abs Dir -> ByteString -> RIO env ()

-- | Status of a test suite
data TestStatus
TSSuccess :: TestStatus
TSFailure :: TestStatus
TSUnknown :: TestStatus

-- | Mark test suite status
setTestStatus :: HasEnvConfig env => Path Abs Dir -> TestStatus -> RIO env ()

-- | Check if the test suite already passed
getTestStatus :: HasEnvConfig env => Path Abs Dir -> RIO env TestStatus

-- | Write out information about a newly built package
writePrecompiledCache :: HasEnvConfig env => BaseConfigOpts -> PackageLocationImmutable -> ConfigureOpts -> Bool -> Set GhcPkgId -> Installed -> [GhcPkgId] -> Set Text -> RIO env ()

-- | Check the cache for a precompiled package matching the given
--   configuration.
readPrecompiledCache :: forall env. HasEnvConfig env => PackageLocationImmutable -> ConfigureOpts -> Bool -> Set GhcPkgId -> RIO env (Maybe (PrecompiledCache Abs))

-- | Stored on disk to know whether the files have changed.
newtype BuildCache
BuildCache :: Map FilePath FileCacheInfo -> BuildCache

-- | Modification times of files.
[buildCacheTimes] :: BuildCache -> Map FilePath FileCacheInfo

module Stack.Build.Installed
type InstalledMap = Map PackageName (InstallLocation, Installed)
data Installed
Library :: PackageIdentifier -> GhcPkgId -> Maybe (Either License License) -> Installed
Executable :: PackageIdentifier -> Installed

-- | Returns the new InstalledMap and all of the locally registered
--   packages.
getInstalled :: HasEnvConfig env => InstallMap -> RIO env (InstalledMap, [DumpPackage], [DumpPackage], [DumpPackage])
type InstallMap = Map PackageName (InstallLocation, Version)
toInstallMap :: MonadIO m => SourceMap -> m InstallMap
instance GHC.Show.Show Stack.Build.Installed.Allowed
instance GHC.Classes.Eq Stack.Build.Installed.Allowed
instance GHC.Show.Show Stack.Build.Installed.LoadHelper


-- | Dealing with Cabal.
module Stack.Package

-- | Read <tt><a>package</a>.buildinfo</tt> ancillary files produced by
--   some Setup.hs hooks. The file includes Cabal file syntax to be merged
--   into the package description derived from the package's .cabal file.
--   
--   NOTE: not to be confused with BuildInfo, an Stack-internal datatype.
readDotBuildinfo :: MonadIO m => Path Abs File -> m HookedBuildInfo

-- | Resolve a parsed cabal file into a <a>Package</a>, which contains all
--   of the info needed for stack to build the <a>Package</a> given the
--   current configuration.
resolvePackage :: PackageConfig -> GenericPackageDescription -> Package
packageFromPackageDescription :: PackageConfig -> [Flag] -> PackageDescriptionPair -> Package

-- | Some package info.
data Package
Package :: !PackageName -> !Version -> !Either License License -> !GetPackageFiles -> !Map PackageName DepValue -> !Set ExeName -> !Set PackageName -> ![Text] -> ![Text] -> !Map FlagName Bool -> !Map FlagName Bool -> !PackageLibraries -> !Set Text -> !Map Text TestSuiteInterface -> !Set Text -> !Set Text -> !GetPackageOpts -> !Bool -> !BuildType -> !Maybe (Map PackageName VersionRange) -> !VersionRange -> Package

-- | Name of the package.
[packageName] :: Package -> !PackageName

-- | Version of the package
[packageVersion] :: Package -> !Version

-- | The license the package was released under.
[packageLicense] :: Package -> !Either License License

-- | Get all files of the package.
[packageFiles] :: Package -> !GetPackageFiles

-- | Packages that the package depends on, both as libraries and build
--   tools.
[packageDeps] :: Package -> !Map PackageName DepValue

-- | Build tools specified in the legacy manner (build-tools:) that failed
--   the hard-coded lookup.
[packageUnknownTools] :: Package -> !Set ExeName

-- | Original dependencies (not sieved).
[packageAllDeps] :: Package -> !Set PackageName

-- | Ghc options used on package.
[packageGhcOptions] :: Package -> ![Text]

-- | Additional options passed to ./Setup.hs configure
[packageCabalConfigOpts] :: Package -> ![Text]

-- | Flags used on package.
[packageFlags] :: Package -> !Map FlagName Bool

-- | Defaults for unspecified flags.
[packageDefaultFlags] :: Package -> !Map FlagName Bool

-- | does the package have a buildable library stanza?
[packageLibraries] :: Package -> !PackageLibraries

-- | names of internal libraries
[packageInternalLibraries] :: Package -> !Set Text

-- | names and interfaces of test suites
[packageTests] :: Package -> !Map Text TestSuiteInterface

-- | names of benchmarks
[packageBenchmarks] :: Package -> !Set Text

-- | names of executables
[packageExes] :: Package -> !Set Text

-- | Args to pass to GHC.
[packageOpts] :: Package -> !GetPackageOpts

-- | Does the package have exposed modules?
[packageHasExposedModules] :: Package -> !Bool

-- | Package build-type.
[packageBuildType] :: Package -> !BuildType

-- | If present: custom-setup dependencies
[packageSetupDeps] :: Package -> !Maybe (Map PackageName VersionRange)

-- | Cabal spec range
[packageCabalSpec] :: Package -> !VersionRange

-- | A pair of package descriptions: one which modified the buildable
--   values of test suites and benchmarks depending on whether they are
--   enabled, and one which does not.
--   
--   Fields are intentionally lazy, we may only need one or the other
--   value.
--   
--   MSS 2017-08-29: The very presence of this data type is terribly ugly,
--   it represents the fact that the Cabal 2.0 upgrade did _not_ go well.
--   Specifically, we used to have a field to indicate whether a component
--   was enabled in addition to buildable, but that's gone now, and this is
--   an ugly proxy. We should at some point clean up the mess of Package,
--   LocalPackage, etc, and probably pull in the definition of
--   PackageDescription from Cabal with our additionally needed metadata.
--   But this is a good enough hack for the moment. Odds are, you're
--   reading this in the year 2024 and thinking "wtf?"
data PackageDescriptionPair
PackageDescriptionPair :: PackageDescription -> PackageDescription -> PackageDescriptionPair
[pdpOrigBuildable] :: PackageDescriptionPair -> PackageDescription
[pdpModifiedBuildable] :: PackageDescriptionPair -> PackageDescription

-- | Files that the package depends on, relative to package directory.
--   Argument is the location of the .cabal file
newtype GetPackageFiles
GetPackageFiles :: (forall env. HasEnvConfig env => Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Set (Path Abs File), [PackageWarning])) -> GetPackageFiles
[getPackageFiles] :: GetPackageFiles -> forall env. HasEnvConfig env => Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Set (Path Abs File), [PackageWarning])

-- | Files that the package depends on, relative to package directory.
--   Argument is the location of the .cabal file
newtype GetPackageOpts
GetPackageOpts :: (forall env. HasEnvConfig env => InstallMap -> InstalledMap -> [PackageName] -> [PackageName] -> Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Map NamedComponent BuildInfoOpts)) -> GetPackageOpts
[getPackageOpts] :: GetPackageOpts -> forall env. HasEnvConfig env => InstallMap -> InstalledMap -> [PackageName] -> [PackageName] -> Path Abs File -> RIO env (Map NamedComponent (Map ModuleName (Path Abs File)), Map NamedComponent [DotCabalPath], Map NamedComponent BuildInfoOpts)

-- | Package build configuration
data PackageConfig
PackageConfig :: !Bool -> !Bool -> !Map FlagName Bool -> ![Text] -> ![Text] -> ActualCompiler -> !Platform -> PackageConfig

-- | Are tests enabled?
[packageConfigEnableTests] :: PackageConfig -> !Bool

-- | Are benchmarks enabled?
[packageConfigEnableBenchmarks] :: PackageConfig -> !Bool

-- | Configured flags.
[packageConfigFlags] :: PackageConfig -> !Map FlagName Bool

-- | Configured ghc options.
[packageConfigGhcOptions] :: PackageConfig -> ![Text]

-- | ./Setup.hs configure options
[packageConfigCabalConfigOpts] :: PackageConfig -> ![Text]

-- | GHC version
[packageConfigCompilerVersion] :: PackageConfig -> ActualCompiler

-- | host platform
[packageConfigPlatform] :: PackageConfig -> !Platform

-- | Path for the package's build log.
buildLogPath :: (MonadReader env m, HasBuildConfig env, MonadThrow m) => Package -> Maybe String -> m (Path Abs File)

-- | All exceptions thrown by the library.
data PackageException
PackageInvalidCabalFile :: !Either PackageIdentifierRevision (Path Abs File) -> !Maybe Version -> ![PError] -> ![PWarning] -> PackageException
MismatchedCabalIdentifier :: !PackageIdentifierRevision -> !PackageIdentifier -> PackageException

-- | Evaluates the conditions of a <a>GenericPackageDescription</a>,
--   yielding a resolved <a>PackageDescription</a>.
resolvePackageDescription :: PackageConfig -> GenericPackageDescription -> PackageDescriptionPair

-- | Get all dependencies of the package (buildable targets only).
--   
--   Note that for Cabal versions 1.22 and earlier, there is a bug where
--   Cabal requires dependencies for non-buildable components to be
--   present. We're going to use GHC version as a proxy for Cabal library
--   version in this case for simplicity, so we'll check for GHC being 7.10
--   or earlier. This obviously makes our function a lot more fun to
--   write...
packageDependencies :: PackageConfig -> PackageDescription -> Map PackageName VersionRange

-- | Force a package to be treated as a custom build type, see
--   <a>https://github.com/commercialhaskell/stack/issues/4488</a>
applyForceCustomBuild :: Version -> Package -> Package
instance GHC.Exception.Type.Exception Stack.Package.CabalFileNameParseFail
instance GHC.Show.Show Stack.Package.CabalFileNameParseFail
instance Stack.Types.Config.HasPlatform Stack.Package.Ctx
instance Stack.Types.Config.HasGHCVariant Stack.Package.Ctx
instance RIO.Prelude.Logger.HasLogFunc Stack.Package.Ctx
instance Stack.Types.Config.HasRunner Stack.Package.Ctx
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Package.Ctx
instance RIO.PrettyPrint.HasTerm Stack.Package.Ctx
instance Stack.Types.Config.HasConfig Stack.Package.Ctx
instance Pantry.Types.HasPantryConfig Stack.Package.Ctx
instance RIO.Process.HasProcessContext Stack.Package.Ctx
instance Stack.Types.Config.HasBuildConfig Stack.Package.Ctx


-- | Generate HPC (Haskell Program Coverage) reports
module Stack.Coverage

-- | Invoked at the beginning of running with "--coverage"
deleteHpcReports :: HasEnvConfig env => RIO env ()

-- | Move a tix file into a sub-directory of the hpc report directory.
--   Deletes the old one if one is present.
updateTixFile :: HasEnvConfig env => PackageName -> Path Abs File -> String -> RIO env ()

-- | Generates the HTML coverage report and shows a textual coverage
--   summary for a package.
generateHpcReport :: HasEnvConfig env => Path Abs Dir -> Package -> [Text] -> RIO env ()
data HpcReportOpts
HpcReportOpts :: [Text] -> Bool -> Maybe String -> Bool -> HpcReportOpts
[hroptsInputs] :: HpcReportOpts -> [Text]
[hroptsAll] :: HpcReportOpts -> Bool
[hroptsDestDir] :: HpcReportOpts -> Maybe String
[hroptsOpenBrowser] :: HpcReportOpts -> Bool
generateHpcReportForTargets :: HasEnvConfig env => HpcReportOpts -> [Text] -> [Text] -> RIO env ()
generateHpcUnifiedReport :: HasEnvConfig env => RIO env ()
generateHpcMarkupIndex :: HasEnvConfig env => RIO env ()
instance GHC.Show.Show Stack.Coverage.HpcReportOpts
instance GHC.Exception.Type.Exception Stack.Coverage.CoverageException
instance GHC.Show.Show Stack.Coverage.CoverageException


-- | Resolving a build plan for a set of packages in a given Stackage
--   snapshot.
module Stack.BuildPlan
data BuildPlanException
UnknownPackages :: Path Abs File -> Map PackageName (Maybe Version, Set PackageName) -> Map PackageName (Set PackageIdentifier) -> BuildPlanException
SnapshotNotFound :: SnapName -> BuildPlanException
NeitherCompilerOrResolverSpecified :: Text -> BuildPlanException
data BuildPlanCheck
BuildPlanCheckOk :: Map PackageName (Map FlagName Bool) -> BuildPlanCheck
BuildPlanCheckPartial :: Map PackageName (Map FlagName Bool) -> DepErrors -> BuildPlanCheck
BuildPlanCheckFail :: Map PackageName (Map FlagName Bool) -> DepErrors -> ActualCompiler -> BuildPlanCheck

-- | Check a set of <a>GenericPackageDescription</a>s and a set of flags
--   against a given snapshot. Returns how well the snapshot satisfies the
--   dependencies of the packages.
checkSnapBuildPlan :: (HasConfig env, HasGHCVariant env) => [ResolvedPath Dir] -> Maybe (Map PackageName (Map FlagName Bool)) -> SnapshotCandidate env -> RIO env BuildPlanCheck
data DepError
DepError :: !Maybe Version -> !Map PackageName VersionRange -> DepError
[deVersion] :: DepError -> !Maybe Version
[deNeededBy] :: DepError -> !Map PackageName VersionRange
type DepErrors = Map PackageName DepError
removeSrcPkgDefaultFlags :: [GenericPackageDescription] -> Map PackageName (Map FlagName Bool) -> Map PackageName (Map FlagName Bool)

-- | Find a snapshot and set of flags that is compatible with and matches
--   as best as possible with the given <a>GenericPackageDescription</a>s.
selectBestSnapshot :: (HasConfig env, HasGHCVariant env) => [ResolvedPath Dir] -> NonEmpty SnapName -> RIO env (SnapshotCandidate env, RawSnapshotLocation, BuildPlanCheck)
showItems :: [String] -> Text
instance GHC.Show.Show Stack.BuildPlan.DepError
instance GHC.Show.Show Stack.BuildPlan.BuildPlanCheck
instance GHC.Exception.Type.Exception Stack.BuildPlan.BuildPlanException
instance GHC.Show.Show Stack.BuildPlan.BuildPlanException

module Stack.Init

-- | Generate stack.yaml
initProject :: (HasConfig env, HasGHCVariant env) => Path Abs Dir -> InitOpts -> Maybe AbstractResolver -> RIO env ()
data InitOpts
InitOpts :: ![Text] -> Bool -> Bool -> Bool -> InitOpts

-- | List of sub directories to search for .cabal files
[searchDirs] :: InitOpts -> ![Text]

-- | Exclude conflicting or incompatible user packages
[omitPackages] :: InitOpts -> Bool

-- | Overwrite existing stack.yaml
[forceOverwrite] :: InitOpts -> Bool

-- | If True, include all .cabal files found in any sub directories
[includeSubDirs] :: InitOpts -> Bool

module Stack.Build.Source

-- | loads and returns project packages
projectLocalPackages :: HasEnvConfig env => RIO env [LocalPackage]

-- | loads all local dependencies - project packages and local extra-deps
localDependencies :: HasEnvConfig env => RIO env [LocalPackage]
loadCommonPackage :: forall env. (HasBuildConfig env, HasSourceMap env) => CommonPackage -> RIO env Package

-- | Upgrade the initial project package info to a full-blown
--   <tt>LocalPackage</tt> based on the selected components
loadLocalPackage :: forall env. (HasBuildConfig env, HasSourceMap env) => ProjectPackage -> RIO env LocalPackage

-- | Given the parsed targets and build command line options constructs a
--   source map
loadSourceMap :: HasBuildConfig env => SMTargets -> BuildOptsCLI -> SMActual DumpedGlobalPackage -> RIO env SourceMap

-- | All flags for a local package.
getLocalFlags :: BuildOptsCLI -> PackageName -> Map FlagName Bool

-- | Returns entries to add to the build cache for any newly found unlisted
--   modules
addUnlistedToBuildCache :: HasEnvConfig env => Package -> Path Abs File -> Set NamedComponent -> Map NamedComponent (Map FilePath a) -> RIO env (Map NamedComponent [Map FilePath FileCacheInfo], [PackageWarning])

-- | Get a <a>SourceMapHash</a> for a given <a>SourceMap</a>
--   
--   Basic rules:
--   
--   <ul>
--   <li>If someone modifies a GHC installation in any way after Stack
--   looks at it, they voided the warranty. This includes installing a
--   brand new build to the same directory, or registering new packages to
--   the global database.</li>
--   <li>We should include everything in the hash that would relate to
--   immutable packages and identifying the compiler itself. Mutable
--   packages (both project packages and dependencies) will never make it
--   into the snapshot database, and can be ignored.</li>
--   <li>Target information is only relevant insofar as it effects the
--   dependency map. The actual current targets for this build are
--   irrelevant to the cache mechanism, and can be ignored.</li>
--   <li>Make sure things like profiling and haddocks are included in the
--   hash</li>
--   </ul>
hashSourceMapData :: (HasBuildConfig env, HasCompiler env) => BuildOptsCLI -> SourceMap -> RIO env SourceMapHash


-- | Perform a build
module Stack.Build.Execute

-- | Print a description of build plan for human consumption.
printPlan :: HasRunner env => Plan -> RIO env ()

-- | Fetch the packages necessary for a build, for example in combination
--   with a dry run.
preFetch :: HasEnvConfig env => Plan -> RIO env ()

-- | Perform the actual plan
executePlan :: HasEnvConfig env => BuildOptsCLI -> BaseConfigOpts -> [LocalPackage] -> [DumpPackage] -> [DumpPackage] -> [DumpPackage] -> InstalledMap -> Map PackageName Target -> Plan -> RIO env ()
data ExecuteEnv

-- | Execute a function that takes an <a>ExecuteEnv</a>.
withExecuteEnv :: forall env a. HasEnvConfig env => BuildOpts -> BuildOptsCLI -> BaseConfigOpts -> [LocalPackage] -> [DumpPackage] -> [DumpPackage] -> [DumpPackage] -> Maybe Int -> (ExecuteEnv -> RIO env a) -> RIO env a

-- | This sets up a context for executing build steps which need to run
--   Cabal (via a compiled Setup.hs). In particular it does the following:
--   
--   <ul>
--   <li>Ensures the package exists in the file system, downloading if
--   necessary.</li>
--   <li>Opens a log file if the built output shouldn't go to stderr.</li>
--   <li>Ensures that either a simple Setup.hs is built, or the package's
--   custom setup is built.</li>
--   <li>Provides the user a function with which run the Cabal
--   process.</li>
--   </ul>
withSingleContext :: forall env a. HasEnvConfig env => ActionContext -> ExecuteEnv -> Task -> Map PackageIdentifier GhcPkgId -> Maybe String -> (Package -> Path Abs File -> Path Abs Dir -> (KeepOutputOpen -> ExcludeTHLoading -> [String] -> RIO env ()) -> (Utf8Builder -> RIO env ()) -> OutputType -> RIO env a) -> RIO env a
data ExcludeTHLoading
ExcludeTHLoading :: ExcludeTHLoading
KeepTHLoading :: ExcludeTHLoading

-- | special marker for expected failures in curator builds, using those we
--   need to keep log handle open as build continues further even after a
--   failure
data KeepOutputOpen
KeepOpen :: KeepOutputOpen
CloseOnException :: KeepOutputOpen
instance GHC.Classes.Ord Stack.Build.Execute.ExecutableBuildStatus
instance GHC.Classes.Eq Stack.Build.Execute.ExecutableBuildStatus
instance GHC.Show.Show Stack.Build.Execute.ExecutableBuildStatus
instance GHC.Classes.Eq Stack.Build.Execute.KeepOutputOpen


-- | Construct a <tt>Plan</tt> for how to build
module Stack.Build.ConstructPlan

-- | Computes a build plan. This means figuring out which build
--   <a>Task</a>s to take, and the interdependencies among the build
--   <a>Task</a>s. In particular:
--   
--   1) It determines which packages need to be built, based on the
--   transitive deps of the current targets. For local packages, this is
--   indicated by the <a>lpWanted</a> boolean. For extra packages to build,
--   this comes from the <tt>extraToBuild0</tt> argument of type <tt>Set
--   PackageName</tt>. These are usually packages that have been specified
--   on the commandline.
--   
--   2) It will only rebuild an upstream package if it isn't present in the
--   <a>InstalledMap</a>, or if some of its dependencies have changed.
--   
--   3) It will only rebuild a local package if its files are dirty or some
--   of its dependencies have changed.
constructPlan :: forall env. HasEnvConfig env => BaseConfigOpts -> [DumpPackage] -> (PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> RIO EnvConfig Package) -> SourceMap -> InstalledMap -> Bool -> RIO env Plan
instance GHC.Show.Show Stack.Build.ConstructPlan.PackageInfo
instance GHC.Show.Show Stack.Build.ConstructPlan.AddDepRes
instance GHC.Show.Show Stack.Build.ConstructPlan.ToolWarning
instance GHC.Show.Show Stack.Build.ConstructPlan.BadDependency
instance GHC.Classes.Ord Stack.Build.ConstructPlan.BadDependency
instance GHC.Classes.Eq Stack.Build.ConstructPlan.BadDependency
instance GHC.Show.Show Stack.Build.ConstructPlan.ConstructPlanException
instance GHC.Classes.Eq Stack.Build.ConstructPlan.ConstructPlanException
instance GHC.Generics.Generic Stack.Build.ConstructPlan.W
instance GHC.Show.Show Stack.Build.ConstructPlan.DepsPath
instance GHC.Classes.Ord Stack.Build.ConstructPlan.DepsPath
instance GHC.Classes.Eq Stack.Build.ConstructPlan.DepsPath
instance Stack.Types.Config.HasPlatform Stack.Build.ConstructPlan.Ctx
instance Stack.Types.Config.HasGHCVariant Stack.Build.ConstructPlan.Ctx
instance RIO.Prelude.Logger.HasLogFunc Stack.Build.ConstructPlan.Ctx
instance Stack.Types.Config.HasRunner Stack.Build.ConstructPlan.Ctx
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Build.ConstructPlan.Ctx
instance RIO.PrettyPrint.HasTerm Stack.Build.ConstructPlan.Ctx
instance Stack.Types.Config.HasConfig Stack.Build.ConstructPlan.Ctx
instance Pantry.Types.HasPantryConfig Stack.Build.ConstructPlan.Ctx
instance RIO.Process.HasProcessContext Stack.Build.ConstructPlan.Ctx
instance Stack.Types.Config.HasBuildConfig Stack.Build.ConstructPlan.Ctx
instance Stack.Types.Config.HasSourceMap Stack.Build.ConstructPlan.Ctx
instance Stack.Types.Config.HasCompiler Stack.Build.ConstructPlan.Ctx
instance Stack.Types.Config.HasEnvConfig Stack.Build.ConstructPlan.Ctx
instance GHC.Base.Semigroup Stack.Build.ConstructPlan.W
instance GHC.Base.Monoid Stack.Build.ConstructPlan.W
instance GHC.Show.Show Stack.Build.ConstructPlan.NotOnlyLocal
instance GHC.Exception.Type.Exception Stack.Build.ConstructPlan.NotOnlyLocal


-- | Run external pagers (<tt>$PAGER</tt>, <tt>less</tt>, <tt>more</tt>).
module System.Process.Pager

-- | Run pager, providing a function that writes to the pager's input.
pageWriter :: (Handle -> IO ()) -> IO ()

-- | Run pager to display a <a>Text</a>
pageText :: Text -> IO ()

-- | Exception running pager.
data PagerException
PagerExitFailure :: CmdSpec -> Int -> PagerException
instance GHC.Show.Show System.Process.Pager.PagerException
instance GHC.Exception.Type.Exception System.Process.Pager.PagerException

module System.Terminal
fixCodePage :: x -> y -> a -> a
getTerminalWidth :: IO (Maybe Int)

-- | hIsTerminaDevice does not recognise handles to mintty terminals as
--   terminal devices, but isMinTTYHandle does.
hIsTerminalDeviceOrMinTTY :: MonadIO m => Handle -> m Bool
instance GHC.Show.Show System.Terminal.WindowWidth
instance GHC.Classes.Ord System.Terminal.WindowWidth
instance GHC.Classes.Eq System.Terminal.WindowWidth
instance Foreign.Storable.Storable System.Terminal.WindowWidth

module Stack.Setup

-- | Modify the environment variables (like PATH) appropriately, possibly
--   doing installation too
setupEnv :: NeedTargets -> BuildOptsCLI -> Maybe Text -> RIO BuildConfig EnvConfig

-- | Ensure both the compiler and the msys toolchain are installed and
--   provide the PATHs to add if necessary
ensureCompilerAndMsys :: (HasBuildConfig env, HasGHCVariant env) => SetupOpts -> RIO env (CompilerPaths, ExtraDirs)

-- | Ensure Docker container-compatible <tt>stack</tt> executable is
--   downloaded
ensureDockerStackExe :: HasConfig env => Platform -> RIO env (Path Abs File)
data SetupOpts
SetupOpts :: !Bool -> !Bool -> !WantedCompiler -> !VersionCheck -> !Maybe (Path Abs File) -> !Bool -> !Bool -> !Bool -> !Bool -> !Maybe Text -> !Maybe String -> SetupOpts
[soptsInstallIfMissing] :: SetupOpts -> !Bool

-- | Should we use a system compiler installation, if available?
[soptsUseSystem] :: SetupOpts -> !Bool
[soptsWantedCompiler] :: SetupOpts -> !WantedCompiler
[soptsCompilerCheck] :: SetupOpts -> !VersionCheck

-- | If we got the desired GHC version from that file
[soptsStackYaml] :: SetupOpts -> !Maybe (Path Abs File)
[soptsForceReinstall] :: SetupOpts -> !Bool

-- | Run a sanity check on the selected GHC
[soptsSanityCheck] :: SetupOpts -> !Bool

-- | Don't check for a compatible GHC version/architecture
[soptsSkipGhcCheck] :: SetupOpts -> !Bool

-- | Do not use a custom msys installation on Windows
[soptsSkipMsys] :: SetupOpts -> !Bool

-- | Message shown to user for how to resolve the missing GHC
[soptsResolveMissingGHC] :: SetupOpts -> !Maybe Text

-- | Alternate GHC binary distribution (requires custom GHCVariant)
[soptsGHCBindistURL] :: SetupOpts -> !Maybe String

-- | Default location of the stack-setup.yaml file
defaultSetupInfoYaml :: String

-- | Some commands (script, ghci and exec) set targets dynamically see also
--   the note about only local targets for rebuildEnv
withNewLocalBuildTargets :: HasEnvConfig env => [Text] -> RIO env a -> RIO env a

-- | Information on a binary release of Stack
data StackReleaseInfo
getDownloadVersion :: StackReleaseInfo -> Maybe Version

-- | Current Stack version
stackVersion :: Version
preferredPlatforms :: (MonadReader env m, HasPlatform env, MonadThrow m) => m [(Bool, String)]
downloadStackReleaseInfo :: (HasPlatform env, HasLogFunc env) => Maybe String -> Maybe String -> Maybe String -> RIO env StackReleaseInfo
downloadStackExe :: HasConfig env => [(Bool, String)] -> StackReleaseInfo -> Path Abs Dir -> Bool -> (Path Abs File -> IO ()) -> RIO env ()
instance GHC.Show.Show Stack.Setup.SetupOpts
instance GHC.Base.Functor (Stack.Setup.CheckDependency env)
instance GHC.Show.Show Stack.Setup.HaskellStackOrg
instance GHC.Base.Applicative (Stack.Setup.CheckDependency env)
instance GHC.Base.Alternative (Stack.Setup.CheckDependency env)
instance RIO.Prelude.Logger.HasLogFunc env => RIO.Prelude.Logger.HasLogFunc (Stack.Setup.WithGHC env)
instance Stack.Types.Config.HasRunner env => Stack.Types.Config.HasRunner (Stack.Setup.WithGHC env)
instance RIO.Process.HasProcessContext env => RIO.Process.HasProcessContext (Stack.Setup.WithGHC env)
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate env => RIO.PrettyPrint.StylesUpdate.HasStylesUpdate (Stack.Setup.WithGHC env)
instance RIO.PrettyPrint.HasTerm env => RIO.PrettyPrint.HasTerm (Stack.Setup.WithGHC env)
instance Pantry.Types.HasPantryConfig env => Pantry.Types.HasPantryConfig (Stack.Setup.WithGHC env)
instance Stack.Types.Config.HasConfig env => Stack.Types.Config.HasPlatform (Stack.Setup.WithGHC env)
instance Stack.Types.Config.HasConfig env => Stack.Types.Config.HasGHCVariant (Stack.Setup.WithGHC env)
instance Stack.Types.Config.HasConfig env => Stack.Types.Config.HasConfig (Stack.Setup.WithGHC env)
instance Stack.Types.Config.HasBuildConfig env => Stack.Types.Config.HasBuildConfig (Stack.Setup.WithGHC env)
instance Stack.Types.Config.HasCompiler (Stack.Setup.WithGHC env)
instance GHC.Exception.Type.Exception Stack.Setup.SetupException
instance GHC.Show.Show Stack.Setup.SetupException


-- | Install GHC/GHCJS and Cabal.
module Stack.SetupCmd
setup :: (HasBuildConfig env, HasGHCVariant env) => SetupCmdOpts -> WantedCompiler -> VersionCheck -> Maybe (Path Abs File) -> RIO env ()
setupParser :: Parser SetupCmdOpts
data SetupCmdOpts
SetupCmdOpts :: !Maybe WantedCompiler -> !Bool -> !Maybe String -> ![String] -> !Bool -> SetupCmdOpts
[scoCompilerVersion] :: SetupCmdOpts -> !Maybe WantedCompiler
[scoForceReinstall] :: SetupCmdOpts -> !Bool
[scoGHCBindistURL] :: SetupCmdOpts -> !Maybe String
[scoGHCJSBootOpts] :: SetupCmdOpts -> ![String]
[scoGHCJSBootClean] :: SetupCmdOpts -> !Bool


-- | Run commands in Docker containers
module Stack.Docker

-- | Command-line argument for "docker"
dockerCmdName :: String
dockerHelpOptName :: String

-- | Command-line argument for <tt>docker pull</tt>.
dockerPullCmdName :: String

-- | The Docker container "entrypoint": special actions performed when
--   first entering a container, such as switching the UID/GID to the
--   "outside-Docker" user's.
entrypoint :: (HasProcessContext env, HasLogFunc env) => Config -> DockerEntrypoint -> RIO env ()

-- | Error if running in a container.
preventInContainer :: MonadIO m => m () -> m ()

-- | Pull latest version of configured Docker image from registry.
pull :: HasConfig env => RIO env ()

-- | Remove the project's Docker sandbox.
reset :: HasConfig env => Bool -> RIO env ()

-- | Command-line option for <tt>--internal-re-exec-version</tt>.
reExecArgName :: String

-- | Exceptions thrown by Stack.Docker.
data StackDockerException

-- | Docker must be enabled to use the command.
DockerMustBeEnabledException :: StackDockerException

-- | Command must be run on host OS (not in a container).
OnlyOnHostException :: StackDockerException

-- | <tt>docker inspect</tt> failed.
InspectFailedException :: String -> StackDockerException

-- | Image does not exist.
NotPulledException :: String -> StackDockerException

-- | Invalid output from <tt>docker images</tt>.
InvalidImagesOutputException :: String -> StackDockerException

-- | Invalid output from <tt>docker ps</tt>.
InvalidPSOutputException :: String -> StackDockerException

-- | Invalid output from <tt>docker inspect</tt>.
InvalidInspectOutputException :: String -> StackDockerException

-- | Could not pull a Docker image.
PullFailedException :: String -> StackDockerException

-- | Installed version of <tt>docker</tt> below minimum version.
DockerTooOldException :: Version -> Version -> StackDockerException

-- | Installed version of <tt>docker</tt> is prohibited.
DockerVersionProhibitedException :: [Version] -> Version -> StackDockerException

-- | Installed version of <tt>docker</tt> is out of range specified in
--   config file.
BadDockerVersionException :: VersionRange -> Version -> StackDockerException

-- | Invalid output from <tt>docker --version</tt>.
InvalidVersionOutputException :: StackDockerException

-- | Version of <tt>stack</tt> on host is too old for version in image.
HostStackTooOldException :: Version -> Maybe Version -> StackDockerException

-- | Version of <tt>stack</tt> in container/image is too old for version on
--   host.
ContainerStackTooOldException :: Version -> Version -> StackDockerException

-- | Can't determine the project root (where to put docker sandbox).
CannotDetermineProjectRootException :: StackDockerException

-- | <tt>docker --version</tt> failed.
DockerNotInstalledException :: StackDockerException

-- | Using host stack-exe on unsupported platform.
UnsupportedStackExeHostPlatformException :: StackDockerException

-- | <tt>stack-exe</tt> option fails to parse.
DockerStackExeParseException :: String -> StackDockerException

-- | Fail with friendly error if project root not set.
getProjectRoot :: HasConfig env => RIO env (Path Abs Dir)

-- | Run a command in a new Docker container, then exit the process.
runContainerAndExit :: HasConfig env => RIO env void
instance GHC.Show.Show Stack.Docker.ImageConfig
instance GHC.Show.Show Stack.Docker.Inspect
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Docker.Inspect
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Docker.ImageConfig


-- | Utilities for running stack commands.
--   
--   Instead of using Has-style classes below, the type signatures use
--   concrete environments to try and avoid accidentally rerunning
--   configuration parsing. For example, we want <tt>withConfig $
--   withConfig $ ...</tt> to fail.
module Stack.Runners

-- | Load the build configuration, adds build-specific values to config
--   loaded by <tt>loadConfig</tt>. values.
withBuildConfig :: RIO BuildConfig a -> RIO Config a

-- | Upgrade a <a>Config</a> environment to an <a>EnvConfig</a> environment
--   by performing further parsing of project-specific configuration (like
--   <a>withBuildConfig</a>) and then setting up a build environment
--   toolchain. This is intended to be run inside a call to
--   <a>withConfig</a>.
withEnvConfig :: NeedTargets -> BuildOptsCLI -> RIO EnvConfig a -> RIO Config a

-- | Helper for <a>withEnvConfig</a> which passes in some default
--   arguments:
--   
--   <ul>
--   <li>No targets are requested</li>
--   <li>Default command line build options are assumed</li>
--   </ul>
withDefaultEnvConfig :: RIO EnvConfig a -> RIO Config a

-- | Load the configuration. Convenience function used throughout this
--   module.
withConfig :: ShouldReexec -> RIO Config a -> RIO Runner a

-- | Ensure that no project settings are used when running
--   <a>withConfig</a>.
withGlobalProject :: RIO Runner a -> RIO Runner a

-- | Use the <a>GlobalOpts</a> to create a <a>Runner</a> and run the
--   provided action.
withRunnerGlobal :: GlobalOpts -> RIO Runner a -> IO a

-- | If the settings justify it, should we reexec inside Docker or Nix?
data ShouldReexec
YesReexec :: ShouldReexec
NoReexec :: ShouldReexec


-- | Handy path information.
module Stack.Path

-- | Print out useful path information in a human-readable format (and
--   support others later).
path :: [Text] -> RIO Runner ()
pathParser :: Parser [Text]
instance Stack.Types.Config.HasPlatform Stack.Path.PathInfo
instance RIO.Prelude.Logger.HasLogFunc Stack.Path.PathInfo
instance Stack.Types.Config.HasRunner Stack.Path.PathInfo
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Path.PathInfo
instance RIO.PrettyPrint.HasTerm Stack.Path.PathInfo
instance Stack.Types.Config.HasGHCVariant Stack.Path.PathInfo
instance Stack.Types.Config.HasConfig Stack.Path.PathInfo
instance Pantry.Types.HasPantryConfig Stack.Path.PathInfo
instance RIO.Process.HasProcessContext Stack.Path.PathInfo
instance Stack.Types.Config.HasBuildConfig Stack.Path.PathInfo

module Stack.Options.DockerParser

-- | Options parser configuration for Docker.
dockerOptsParser :: Bool -> Parser DockerOptsMonoid


-- | Build the project.
module Stack.Build

-- | Build.
--   
--   If a buildLock is passed there is an important contract here. That
--   lock must protect the snapshot, and it must be safe to unlock it if
--   there are no further modifications to the snapshot to be performed by
--   this build.
build :: HasEnvConfig env => Maybe (Set (Path Abs File) -> IO ()) -> RIO env ()
buildLocalTargets :: HasEnvConfig env => NonEmpty Text -> RIO env (Either SomeException ())

-- | Provide a function for loading package information from the package
--   index
loadPackage :: (HasBuildConfig env, HasSourceMap env) => PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> RIO env Package

-- | Get the <tt>BaseConfigOpts</tt> necessary for constructing configure
--   options
mkBaseConfigOpts :: HasEnvConfig env => BuildOptsCLI -> RIO env BaseConfigOpts

-- | Query information about the build and print the result to stdout in
--   YAML format.
queryBuildInfo :: HasEnvConfig env => [Text] -> RIO env ()
splitObjsWarning :: String
newtype CabalVersionException
CabalVersionException :: String -> CabalVersionException
[unCabalVersionException] :: CabalVersionException -> String
instance GHC.Show.Show Stack.Build.CabalVersionException
instance GHC.Exception.Type.Exception Stack.Build.CabalVersionException

module Stack.Upgrade
upgrade :: Maybe String -> UpgradeOpts -> RIO Runner ()
data UpgradeOpts
upgradeOpts :: Parser UpgradeOpts
instance GHC.Show.Show Stack.Upgrade.BinaryOpts
instance GHC.Show.Show Stack.Upgrade.SourceOpts
instance GHC.Show.Show Stack.Upgrade.UpgradeOpts

module Stack.SDist

-- | Given the path to a local package, creates its source distribution
--   tarball.
--   
--   While this yields a <a>FilePath</a>, the name of the tarball, this
--   tarball is not written to the disk and instead yielded as a lazy
--   bytestring.
getSDistTarball :: HasEnvConfig env => Maybe PvpBounds -> Path Abs Dir -> RIO env (FilePath, ByteString, Maybe (PackageIdentifier, ByteString))

-- | Check package in given tarball. This will log all warnings and will
--   throw an exception in case of critical errors.
--   
--   Note that we temporarily decompress the archive to analyze it.
checkSDistTarball :: HasEnvConfig env => SDistOpts -> Path Abs File -> RIO env ()

-- | Version of <a>checkSDistTarball</a> that first saves lazy bytestring
--   to temporary directory and then calls <a>checkSDistTarball</a> on it.
checkSDistTarball' :: HasEnvConfig env => SDistOpts -> String -> ByteString -> RIO env ()

-- | Special exception to throw when you want to fail because of bad
--   results of package check.
data SDistOpts
SDistOpts :: [String] -> Maybe PvpBounds -> Bool -> Bool -> Maybe FilePath -> SDistOpts

-- | Directories to package
[sdoptsDirsToWorkWith] :: SDistOpts -> [String]

-- | PVP Bounds overrides
[sdoptsPvpBounds] :: SDistOpts -> Maybe PvpBounds

-- | Whether to ignore check of the package for common errors
[sdoptsIgnoreCheck] :: SDistOpts -> Bool

-- | Whether to build the tarball
[sdoptsBuildTarball] :: SDistOpts -> Bool

-- | Where to copy the tarball
[sdoptsTarPath] :: SDistOpts -> Maybe FilePath
instance GHC.Exception.Type.Exception Stack.SDist.CheckException
instance GHC.Show.Show Stack.SDist.CheckException

module Stack.Options.BuildMonoidParser
buildOptsMonoidParser :: GlobalOptsContext -> Parser BuildOptsMonoid

module Stack.Options.ConfigParser

-- | Command-line arguments parser for configuration.
configOptsParser :: FilePath -> GlobalOptsContext -> Parser ConfigMonoid

module Stack.Options.GlobalParser

-- | Parser for global command-line options.
globalOptsParser :: FilePath -> GlobalOptsContext -> Maybe LogLevel -> Parser GlobalOptsMonoid

-- | Create GlobalOpts from GlobalOptsMonoid.
globalOptsFromMonoid :: MonadIO m => Bool -> GlobalOptsMonoid -> m GlobalOpts
initOptsParser :: Parser InitOpts

module Stack.Options.NewParser

-- | Parser for <tt>stack new</tt>.
newOptsParser :: Parser (NewOpts, InitOpts)

module Stack.Options.Completion
ghcOptsCompleter :: Completer
targetCompleter :: Completer
flagCompleter :: Completer
projectExeCompleter :: Completer

module Stack.Options.ScriptParser
data ScriptOpts
ScriptOpts :: ![String] -> !FilePath -> ![String] -> !ScriptExecute -> ![String] -> ![PackageIdentifierRevision] -> !ShouldRun -> ScriptOpts
[soPackages] :: ScriptOpts -> ![String]
[soFile] :: ScriptOpts -> !FilePath
[soArgs] :: ScriptOpts -> ![String]
[soCompile] :: ScriptOpts -> !ScriptExecute
[soGhcOptions] :: ScriptOpts -> ![String]
[soScriptExtraDeps] :: ScriptOpts -> ![PackageIdentifierRevision]
[soShouldRun] :: ScriptOpts -> !ShouldRun
data ScriptExecute
SEInterpret :: ScriptExecute
SECompile :: ScriptExecute
SEOptimize :: ScriptExecute
data ShouldRun
YesRun :: ShouldRun
NoRun :: ShouldRun
scriptOptsParser :: Parser ScriptOpts
instance GHC.Show.Show Stack.Options.ScriptParser.ScriptExecute
instance GHC.Show.Show Stack.Options.ScriptParser.ShouldRun
instance GHC.Show.Show Stack.Options.ScriptParser.ScriptOpts

module Stack.Script

-- | Run a Stack Script
scriptCmd :: ScriptOpts -> RIO Runner ()
instance GHC.Exception.Type.Exception Stack.Script.StackScriptException
instance GHC.Show.Show Stack.Script.StackScriptException

module Stack.Options.HpcReportParser

-- | Parser for <tt>stack hpc report</tt>.
hpcReportOptsParser :: Parser HpcReportOpts
pvpBoundsOption :: Parser PvpBounds

module Stack.Options.SDistParser

-- | Parser for arguments to `stack sdist`
sdistOptsParser :: Parser SDistOpts

module Stack.Options.UploadParser
data UploadOpts
UploadOpts :: SDistOpts -> UploadVariant -> UploadOpts
[uoptsSDistOpts] :: UploadOpts -> SDistOpts

-- | Says whether to publish the package or upload as a release candidate
[uoptsUploadVariant] :: UploadOpts -> UploadVariant
data UploadVariant

-- | Publish the package
Publishing :: UploadVariant

-- | Create a package candidate
Candidate :: UploadVariant

-- | Parser for arguments to `stack upload`
uploadOptsParser :: Parser UploadOpts


-- | Provide ability to upload tarballs to Hackage.
module Stack.Upload

-- | Upload a single tarball with the given <tt>Uploader</tt>.
--   
--   Since 0.1.0.0
upload :: HasLogFunc m => String -> HackageAuth -> FilePath -> UploadVariant -> RIO m ()

-- | Upload a single tarball with the given <tt>Uploader</tt>. Instead of
--   sending a file like <a>upload</a>, this sends a lazy bytestring.
--   
--   Since 0.1.2.1
uploadBytes :: HasLogFunc m => String -> HackageAuth -> String -> UploadVariant -> ByteString -> RIO m ()
uploadRevision :: HasLogFunc m => String -> HackageAuth -> PackageIdentifier -> ByteString -> RIO m ()

-- | Username and password to log into Hackage.
--   
--   Since 0.1.0.0
data HackageCreds
data HackageAuth
HAKey :: HackageKey -> HackageAuth
HACreds :: HackageCreds -> HackageAuth
newtype HackageKey
HackageKey :: Text -> HackageKey
loadAuth :: HasLogFunc m => Config -> RIO m HackageAuth

-- | Write contents to a file which is always private.
--   
--   For history of this function, see:
--   
--   <ul>
--   
--   <li><a>https://github.com/commercialhaskell/stack/issues/2159#issuecomment-477948928</a></li>
--   <li><a>https://github.com/commercialhaskell/stack/pull/4665</a></li>
--   </ul>
writeFilePrivate :: MonadIO m => FilePath -> Builder -> m ()
maybeGetHackageKey :: RIO m (Maybe HackageKey)
instance GHC.Show.Show Stack.Upload.HackageKey
instance GHC.Classes.Eq Stack.Upload.HackageKey
instance GHC.Show.Show Stack.Upload.HackageCreds
instance GHC.Classes.Eq Stack.Upload.HackageCreds
instance GHC.Show.Show Stack.Upload.HackageAuth
instance GHC.Classes.Eq Stack.Upload.HackageAuth
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Upload.HackageCreds
instance Data.Aeson.Types.FromJSON.FromJSON (GHC.IO.FilePath -> Stack.Upload.HackageCreds)

module Stack.Options.ExecParser

-- | Parser for exec command
execOptsParser :: Maybe SpecialExecCmd -> Parser ExecOpts
evalOptsParser :: String -> Parser EvalOpts

-- | Parser for extra options to exec command
execOptsExtraParser :: Parser ExecOptsExtra

module Stack.Options.BuildParser

-- | Parser for CLI-only build arguments
buildOptsParser :: BuildCommand -> Parser BuildOptsCLI
targetsParser :: Parser [Text]
flagsParser :: Parser (Map ApplyCLIFlag (Map FlagName Bool))


-- | A wrapper around hoogle.
module Stack.Hoogle

-- | Hoogle command.
hoogleCmd :: ([String], Bool, Bool, Bool) -> RIO Runner ()


-- | Run a GHCi configured with the user's package(s).
module Stack.Ghci

-- | Command-line options for GHC.
data GhciOpts
GhciOpts :: ![Text] -> ![String] -> ![String] -> !Map ApplyCLIFlag (Map FlagName Bool) -> !Maybe FilePath -> !Bool -> ![String] -> !Maybe Text -> !Bool -> !Bool -> !Maybe Bool -> !Bool -> !Bool -> GhciOpts
[ghciTargets] :: GhciOpts -> ![Text]
[ghciArgs] :: GhciOpts -> ![String]
[ghciGhcOptions] :: GhciOpts -> ![String]
[ghciFlags] :: GhciOpts -> !Map ApplyCLIFlag (Map FlagName Bool)
[ghciGhcCommand] :: GhciOpts -> !Maybe FilePath
[ghciNoLoadModules] :: GhciOpts -> !Bool
[ghciAdditionalPackages] :: GhciOpts -> ![String]
[ghciMainIs] :: GhciOpts -> !Maybe Text
[ghciLoadLocalDeps] :: GhciOpts -> !Bool
[ghciSkipIntermediate] :: GhciOpts -> !Bool
[ghciHidePackages] :: GhciOpts -> !Maybe Bool
[ghciNoBuild] :: GhciOpts -> !Bool
[ghciOnlyMain] :: GhciOpts -> !Bool

-- | Necessary information to load a package or its components.
--   
--   NOTE: GhciPkgInfo has paths as list instead of a Set to preserve files
--   order as a workaround for bug
--   <a>https://ghc.haskell.org/trac/ghc/ticket/13786</a>
data GhciPkgInfo
GhciPkgInfo :: !PackageName -> ![(NamedComponent, BuildInfoOpts)] -> !Path Abs Dir -> !ModuleMap -> ![Path Abs File] -> !Map NamedComponent [Path Abs File] -> !Maybe [Path Abs File] -> !Package -> GhciPkgInfo
[ghciPkgName] :: GhciPkgInfo -> !PackageName
[ghciPkgOpts] :: GhciPkgInfo -> ![(NamedComponent, BuildInfoOpts)]
[ghciPkgDir] :: GhciPkgInfo -> !Path Abs Dir
[ghciPkgModules] :: GhciPkgInfo -> !ModuleMap

-- | C files.
[ghciPkgCFiles] :: GhciPkgInfo -> ![Path Abs File]
[ghciPkgMainIs] :: GhciPkgInfo -> !Map NamedComponent [Path Abs File]
[ghciPkgTargetFiles] :: GhciPkgInfo -> !Maybe [Path Abs File]
[ghciPkgPackage] :: GhciPkgInfo -> !Package
data GhciException
InvalidPackageOption :: String -> GhciException
LoadingDuplicateModules :: GhciException
MissingFileTarget :: String -> GhciException
Can'tSpecifyFilesAndTargets :: GhciException
Can'tSpecifyFilesAndMainIs :: GhciException
GhciTargetParseException :: [Text] -> GhciException

-- | Launch a GHCi session for the given local package targets with the
--   given options and configure it with the load paths and extensions of
--   those targets.
ghci :: HasEnvConfig env => GhciOpts -> RIO env ()
instance GHC.Show.Show Stack.Ghci.GhciOpts
instance GHC.Show.Show Stack.Ghci.GhciPkgInfo
instance GHC.Exception.Type.Exception Stack.Ghci.GhciException
instance GHC.Show.Show Stack.Ghci.GhciException

module Stack.Options.GhciParser

-- | Parser for GHCI options
ghciOptsParser :: Parser GhciOpts

module Stack.Dot

-- | Visualize the project's dependencies as a graphviz graph
dot :: DotOpts -> RIO Runner ()
listDependencies :: ListDepsOpts -> RIO Runner ()

-- | Options record for <tt>stack dot</tt>
data DotOpts
DotOpts :: !Bool -> !Bool -> !Maybe Int -> !Set PackageName -> [Text] -> !Map ApplyCLIFlag (Map FlagName Bool) -> Bool -> Bool -> Bool -> DotOpts

-- | Include external dependencies
[dotIncludeExternal] :: DotOpts -> !Bool

-- | Include dependencies on base
[dotIncludeBase] :: DotOpts -> !Bool

-- | Limit the depth of dependency resolution to (Just n) or continue until
--   fixpoint
[dotDependencyDepth] :: DotOpts -> !Maybe Int

-- | Package names to prune from the graph
[dotPrune] :: DotOpts -> !Set PackageName

-- | stack TARGETs to trace dependencies for
[dotTargets] :: DotOpts -> [Text]

-- | Flags to apply when calculating dependencies
[dotFlags] :: DotOpts -> !Map ApplyCLIFlag (Map FlagName Bool)

-- | Like the "--test" flag for build, affects the meaning of
--   <a>dotTargets</a>.
[dotTestTargets] :: DotOpts -> Bool

-- | Like the "--bench" flag for build, affects the meaning of
--   <a>dotTargets</a>.
[dotBenchTargets] :: DotOpts -> Bool

-- | Use global hints instead of relying on an actual GHC installation.
[dotGlobalHints] :: DotOpts -> Bool

-- | Information about a package in the dependency graph, when available.
data DotPayload
DotPayload :: Maybe Version -> Maybe (Either License License) -> Maybe PackageLocation -> DotPayload

-- | The package version.
[payloadVersion] :: DotPayload -> Maybe Version

-- | The license the package was released under.
[payloadLicense] :: DotPayload -> Maybe (Either License License)

-- | The location of the package.
[payloadLocation] :: DotPayload -> Maybe PackageLocation
data ListDepsOpts
ListDepsOpts :: !ListDepsFormat -> !DotOpts -> ListDepsOpts

-- | Format of printing dependencies
[listDepsFormat] :: ListDepsOpts -> !ListDepsFormat

-- | The normal dot options.
[listDepsDotOpts] :: ListDepsOpts -> !DotOpts
data ListDepsFormat
ListDepsText :: ListDepsFormatOpts -> ListDepsFormat
ListDepsTree :: ListDepsFormatOpts -> ListDepsFormat
ListDepsJSON :: ListDepsFormat
data ListDepsFormatOpts
ListDepsFormatOpts :: !Text -> !Bool -> ListDepsFormatOpts

-- | Separator between the package name and details.
[listDepsSep] :: ListDepsFormatOpts -> !Text

-- | Print dependency licenses instead of versions.
[listDepsLicense] :: ListDepsFormatOpts -> !Bool

-- | Resolve the dependency graph up to (Just depth) or until fixpoint is
--   reached
resolveDependencies :: (Applicative m, Monad m) => Maybe Int -> Map PackageName (Set PackageName, DotPayload) -> (PackageName -> m (Set PackageName, DotPayload)) -> m (Map PackageName (Set PackageName, DotPayload))

-- | Print a graphviz graph of the edges in the Map and highlight the given
--   local packages
printGraph :: (Applicative m, MonadIO m) => DotOpts -> Set PackageName -> Map PackageName (Set PackageName, DotPayload) -> m ()

-- | <tt>pruneGraph dontPrune toPrune graph</tt> prunes all packages in
--   <tt>graph</tt> with a name in <tt>toPrune</tt> and removes resulting
--   orphans unless they are in <tt>dontPrune</tt>
pruneGraph :: (Foldable f, Foldable g, Eq a) => f PackageName -> g PackageName -> Map PackageName (Set PackageName, a) -> Map PackageName (Set PackageName, a)
instance GHC.Show.Show Stack.Dot.DotPayload
instance GHC.Classes.Eq Stack.Dot.DotPayload
instance RIO.Prelude.Logger.HasLogFunc Stack.Dot.DotConfig
instance Pantry.Types.HasPantryConfig Stack.Dot.DotConfig
instance RIO.PrettyPrint.HasTerm Stack.Dot.DotConfig
instance RIO.PrettyPrint.StylesUpdate.HasStylesUpdate Stack.Dot.DotConfig
instance Stack.Types.Config.HasGHCVariant Stack.Dot.DotConfig
instance Stack.Types.Config.HasPlatform Stack.Dot.DotConfig
instance Stack.Types.Config.HasRunner Stack.Dot.DotConfig
instance RIO.Process.HasProcessContext Stack.Dot.DotConfig
instance Stack.Types.Config.HasConfig Stack.Dot.DotConfig
instance Stack.Types.Config.HasBuildConfig Stack.Dot.DotConfig
instance Stack.Types.Config.HasSourceMap Stack.Dot.DotConfig
instance Data.Aeson.Types.ToJSON.ToJSON Stack.Dot.DependencyTree

module Stack.Options.DotParser

-- | Parser for arguments to `stack dot`
dotOptsParser :: Bool -> Parser DotOpts
separatorParser :: Parser Text
licenseParser :: Parser Bool
listDepsFormatOptsParser :: Parser ListDepsFormatOpts
listDepsTreeParser :: Parser ListDepsFormat
listDepsTextParser :: Parser ListDepsFormat
listDepsJsonParser :: Parser ListDepsFormat
toListDepsOptsParser :: Parser ListDepsFormat -> Parser ListDepsOpts
formatSubCommand :: String -> String -> Parser ListDepsFormat -> Mod CommandFields ListDepsOpts

-- | Parser for arguments to `stack ls dependencies`.
listDepsOptsParser :: Parser ListDepsOpts

module Stack.Ls
lsCmd :: LsCmdOpts -> RIO Runner ()
lsParser :: Parser LsCmdOpts

-- | List the dependencies
listDependenciesCmd :: Bool -> ListDepsOpts -> RIO Runner ()
instance GHC.Classes.Ord Stack.Ls.LsView
instance GHC.Classes.Eq Stack.Ls.LsView
instance GHC.Show.Show Stack.Ls.LsView
instance GHC.Classes.Ord Stack.Ls.SnapshotType
instance GHC.Classes.Eq Stack.Ls.SnapshotType
instance GHC.Show.Show Stack.Ls.SnapshotType
instance GHC.Classes.Ord Stack.Ls.SnapshotOpts
instance GHC.Show.Show Stack.Ls.SnapshotOpts
instance GHC.Classes.Eq Stack.Ls.SnapshotOpts
instance GHC.Show.Show Stack.Ls.ListStylesOpts
instance GHC.Classes.Ord Stack.Ls.ListStylesOpts
instance GHC.Classes.Eq Stack.Ls.ListStylesOpts
instance GHC.Classes.Ord Stack.Ls.Snapshot
instance GHC.Classes.Eq Stack.Ls.Snapshot
instance GHC.Show.Show Stack.Ls.Snapshot
instance GHC.Classes.Ord Stack.Ls.SnapshotData
instance GHC.Classes.Eq Stack.Ls.SnapshotData
instance GHC.Show.Show Stack.Ls.SnapshotData
instance GHC.Show.Show Stack.Ls.LsException
instance GHC.Exception.Type.Exception Stack.Ls.LsException
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Ls.SnapshotData
instance Data.Aeson.Types.FromJSON.FromJSON Stack.Ls.Snapshot
