generateSnapHaddockIndex
    :: (MonadIO m, MonadCatch m, MonadThrow m, MonadLogger m, MonadBaseControl IO m)
    => EnvOverride -> WhichCompiler -> BaseConfigOpts -> Path Abs Dir -> m ()
generateSnapHaddockIndex envOverride wc bco globalDB = do
    pkgIds <- listGhcPkgDbs envOverride wc [globalDB, bcoSnapDB bco]
    generateHaddockIndex
        "snapshot packages"
        envOverride
        wc
        pkgIds
        "."
        (snapDocDir bco)

-- | Generate Haddock index and contents for specified packages.
generateSnapHaddockIndex
    :: (MonadIO m, MonadCatch m, MonadThrow m, MonadLogger m, MonadBaseControl IO m)
    => EnvOverride -> WhichCompiler -> BaseConfigOpts -> Path Abs Dir -> m ()
generateSnapHaddockIndex envOverride wc bco globalDB = do
    pkgIds <- listGhcPkgDbs envOverride wc [globalDB, bcoSnapDB bco]
    generateHaddockIndex
        "snapshot packages"
        envOverride
        wc
        pkgIds
        "."
        (snapDocDir bco)

-- | Generate Haddock index and contents for specified packages.
generateSnapHaddockIndex envOverride wc bco globalDB = do
    pkgIds <- listGhcPkgDbs envOverride wc [globalDB, bcoSnapDB bco]
    generateHaddockIndex
        "snapshot packages"
        envOverride
        wc
        pkgIds
        "."
        (snapDocDir bco)

-- | Generate Haddock index and contents for specified packages.