-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Project statistics and definition analysis
--
-- Please see the README on GitHub at
-- https://github.com/aaronallen8455/inventory#readme
@package inventory
@version 0.1.0.3
module GHC.Api
module GHC.DynFlags
baseDynFlags :: IO DynFlags
module GHC.Output
-- | Rendering mode.
data Mode
-- | Normal
PageMode :: Mode
-- | With zig-zag cuts
ZigZagMode :: Mode
-- | No indentation, infinitely long lines
LeftMode :: Mode
-- | All on one line
OneLineMode :: Mode
module Utils
nodeHasAnnotation :: String -> String -> HieAST a -> Bool
-- | Extract node info for an AST. GHC 9 includes generated things that
-- need to be removed.
getNodeInfo :: HieAST a -> NodeInfo a
foldNodeChildren :: Monoid m => (HieAST a -> m) -> HieAST a -> m
module UseCounts.ProcessHie
type UsageCounter = AppendMap Name UsageCount
data UsageCount
UsageCount :: !Int -> !Bool -> UsageCount
[usages] :: UsageCount -> !Int
[locallyDefined] :: UsageCount -> !Bool
usageCounter :: HieAST a -> UsageCounter
instance GHC.Show.Show UseCounts.ProcessHie.UsageCount
instance GHC.Base.Semigroup UseCounts.ProcessHie.UsageCount
instance GHC.Base.Monoid UseCounts.ProcessHie.UsageCount
module UseCounts.Output
usageOutput :: UsageCounter -> SDoc
module MatchSigs.Sig
type FreeVarIdx = Int
-- | The internal representation of a type. Function types are represented
-- as a linked list with the init elems being the context followed by
-- arguments of the function and the last being the result type.
data Sig varIx
TyDescriptor :: !FastString -> !Maybe Name -> Sig varIx
FreeVar :: !varIx -> Sig varIx
Arg :: ![Sig varIx] -> Sig varIx
Qual :: ![Sig varIx] -> Sig varIx
Apply :: ![Sig varIx] -> ![[Sig varIx]] -> Sig varIx
VarCtx :: ![varIx] -> Sig varIx
Tuple :: ![[Sig varIx]] -> Sig varIx
KindSig :: ![Sig varIx] -> ![Sig varIx] -> Sig varIx
-- | Produce a Map from function Names to their type
-- signature's internal representation.
sigsFromHie :: HieAST a -> Map Name [Sig FreeVarIdx]
-- | Used to produce an orderable key for matching up signatures that are
-- likely to be equivalent. To allow for this, free vars must be
-- homogenized which is what void does here.
sigFingerprint :: [Sig a] -> [Sig ()]
isQual :: Sig a -> Bool
instance GHC.Base.Functor MatchSigs.Sig.Sig
instance Data.Foldable.Foldable MatchSigs.Sig.Sig
instance GHC.Classes.Ord varIx => GHC.Classes.Ord (MatchSigs.Sig.Sig varIx)
instance GHC.Classes.Eq varIx => GHC.Classes.Eq (MatchSigs.Sig.Sig varIx)
instance GHC.Show.Show varIx => GHC.Show.Show (MatchSigs.Sig.Sig varIx)
module MatchSigs.Matching.Env
-- | Context for matching the free vars in two Sigs
data Env
-- | Logical conjuction
(/\) :: State env Bool -> State env Bool -> State env Bool
checkOr :: [State env Bool] -> State env Bool
checkAnd :: [State Env Bool] -> State Env Bool
-- | Add vars from both sigs to the context, accounting for level
introVars :: [FreeVarIdx] -> [FreeVarIdx] -> State Env Bool
-- | Identify var from one sig with var in other sig
tryAssignVar :: FreeVarIdx -> FreeVarIdx -> State Env Bool
initEnv :: Env
module MatchSigs.Matching
newtype MatchedSigs
MatchedSigs :: [SigMatches] -> MatchedSigs
[getMatchedSigs] :: MatchedSigs -> [SigMatches]
instance GHC.Base.Semigroup MatchSigs.Matching.MatchedSigs
instance GHC.Base.Monoid MatchSigs.Matching.MatchedSigs
module MatchSigs.ProcessHie
type SigMap = AppendMap [Sig ()] MatchedSigs
newtype MatchedSigs
MatchedSigs :: [SigMatches] -> MatchedSigs
[getMatchedSigs] :: MatchedSigs -> [SigMatches]
-- | Collect all the function definitions in the HieAST that have
-- isomorphic type signatures.
mkSigMap :: DynFlags -> HieAST HieTypeFix -> SigMap
module MatchSigs.Output
sigDuplicateOutput :: SigMap -> SDoc
module DefCounts.ProcessHie
type DefCounter = AppendMap DefType (Sum Int, Sum Int)
data DefType
Func :: DefType
Data :: DefType
Newtype :: DefType
Class :: DefType
ClassInst :: DefType
Fam :: DefType
TyFamInst :: DefType
Syn :: DefType
PatSyn :: DefType
ModImport :: DefType
ExportThing :: DefType
-- | Counts up the different types of definitions in the given
-- HieAST.
declLines :: SourceCode -> HieAST a -> DefCounter
instance GHC.Show.Show DefCounts.ProcessHie.DefType
instance GHC.Classes.Ord DefCounts.ProcessHie.DefType
instance GHC.Classes.Eq DefCounts.ProcessHie.DefType
module HieFile
type Counters = (DefCounter, UsageCounter, SigMap, Sum Int)
getCounters :: DynFlags -> IO Counters
hieFileToCounters :: DynFlags -> HieFile -> Counters
hieFilesFromPaths :: [FilePath] -> IO [HieFile]
mkNameCache :: IO NameCache
module DefCounts.Output
defCountOutput :: DefCounter -> Sum Int -> SDoc
module Output
printResults :: DynFlags -> Counters -> IO ()