-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Create etags for Haskell projects based on Stack snapshots -- -- Create etags for Haskell projects based on Stack snapshots @package stack-tag @version 0.2.0 -- | Simple implementation for limiting the number of active threads during -- concurrent computations using a semaphore. module Control.Concurrent.Async.Pool -- | Limit the number of threads which can be active at any given time when -- using mapConcurrently. The downside is that this function will -- allocate all threads at once. mapPool :: Traversable t => Int -> (a -> IO b) -> t a -> IO (t b) -- | Map async using getNumCapabilities to determine the number of -- active threads. -- -- This function is a bit misleading as it doesn't actually utilize -- forkOn or exploit any control over whether the threads are -- spread across physical processors. It does, however, provide a nice -- starting point for most of the threads used in this program which are -- heavily IO bound. mapCapabilityPool :: Traversable t => (a -> IO b) -> t a -> IO (t b) -- | TAG a stack project based on snapshot versions module Stack.Tag data StackTagOpts StackTagOpts :: !(Maybe FilePath) -> !Bool -> !Bool -> StackTagOpts -- | Location of the stack.yaml to generate tags for [optsStackYaml] :: StackTagOpts -> !(Maybe FilePath) -- | Verbose output [optsVerbose] :: StackTagOpts -> !Bool -- | Flag to ignore any cached tags and re-run the tagger [noCache] :: StackTagOpts -> !Bool data Tagger Hasktags :: Tagger HotHasktags :: Tagger OtherTagger :: Text -> Tagger data TagFmt CTags :: TagFmt ETags :: TagFmt Both :: TagFmt OtherFmt :: Text -> TagFmt type TagOutput = FilePath type SourceDir = FilePath type PkgName = String data TagCmd TagCmd :: Tagger -> TagFmt -> TagOutput -> SourceDir -> PkgName -> TagCmd newtype StackTag a StackTag :: ReaderT StackTagOpts IO a -> StackTag a [runStackTag] :: StackTag a -> ReaderT StackTagOpts IO a defStackOpts :: StackTagOpts stackTag :: StackTagOpts -> IO () io :: MonadIO m => IO a -> m a p :: String -> StackTag () whenM :: Monad m => m Bool -> m () -> m () -- | Run a command using the stack command-line tool with a list -- of arguments runStk :: [String] -> StackTag (ExitCode, String, String) chkIsStack :: StackTag () chkHaskTags :: StackTag () chkStackCompatible :: StackTag () -- | Get a list of relavant directories from stack using the stack -- path command stkPaths :: StackTag [(Text, [Text])] -- | Get a list of dependencies using: stack --list-dependencies --test -- --bench --separator=- stkDepSources :: StackTag [String] tagSources :: [(Text, [Text])] -> [FilePath] -> StackTag () parTag :: [(Text, [Text])] -> [FilePath] -> StackTag [Either (PkgName, String) FilePath] -- | Tag a single dependency tagDependency :: Bool -> [(Text, [Text])] -> FilePath -> StackTag (Either (PkgName, String) FilePath) runTagger :: TagCmd -> StackTag (Either (PkgName, String) TagOutput) tagExe :: Tagger -> String tagFmt :: TagFmt -> String instance Control.Monad.IO.Class.MonadIO Stack.Tag.StackTag instance Control.Monad.Reader.Class.MonadReader Stack.Tag.StackTagOpts Stack.Tag.StackTag instance GHC.Base.Monad Stack.Tag.StackTag instance GHC.Base.Applicative Stack.Tag.StackTag instance GHC.Base.Functor Stack.Tag.StackTag instance GHC.Show.Show Stack.Tag.TagCmd instance GHC.Show.Show Stack.Tag.TagFmt instance GHC.Show.Show Stack.Tag.Tagger instance GHC.Show.Show Stack.Tag.StackTagOpts