H             ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None!"I[c7This functions strips out trailing single line comment.;Helper function to debug different parts of AST processing.;Helper function to print labels to discover error position.None!"I[c%Short wrapper for types annotated by Scoped SrcSpanInfo. For example, use InScoped ImportDecl instead of ImportDecl (Scoped SrcSpanInfo).Retrive  from .Retrive  from something annotated by .Drop  annotation from  type.None!"I[c*Get name of module by dropping annonation.Returns name of  as a . Returns  iff given  is inside export list.,Extracts list of module names exported with module A way.  Extract all s from .    None!"I[c Returns module name for  with annotation erased. Returns  iff import has next form: ` import Module.Name import Module.Name as Other.Name import Module.Name hiding (smth) }This function returns name of import disregard to its qualification, how this module should be referenced, i.e. like this:  import  whatever A ! A import  whatever B as X ! X pKeep only hiding imports making them non-hiding. This function needed to collect unused hiding imports because  importTable1 doesn't track information about hiding imports.BCollect mapping from import name to to list of symbols it exports._Returns pair of line numbers  first and last line of import section if any import is in list.     None!"I[c None!"$I[bcChecks if given w is used in module annotations. This function performs comparison by ignoring module names because we want to remove hiding by calling this function.+Compares if two symbols are equal ignoring % field. Used to remove imports from hiding sections.None!"I[c Checks if L is used inside annotations. This function needed to remove unused imports.&Collect symbols unused in annotations.%Gather all symbols for given list of s. iff  is used,Mapping from imported names to their symbols$Returns list of unused symbols from None!"I[c)Collect names of unused implicit imports.nChecks if module symbols were cached. We don't want to remove unknown imports we just want to not touch them.QRemove all implicit import declarations specified by given list of module names.None!"I[cThis function takes range of origin text for import and AST of imports without unused entinties and then converts import declarations into list of lines that should be printed. None!"I[cParse  from given path to .cabal file.Retrieve list of unique names for all package dependencies inside library, all executables, all test suites and all benchmarks for a given package.<Extract some uniform data from every target if it's present. extractor extractor extractor Benchmakr extractorPackage*List of results collected from each target None!"I[cSplit list of modules into exposed modules and other modules for given library. First element of pair represents exposed modules. Second element of paris represents other modules.BReturns list of absolute paths to all modules inside given target."Absolute path to project directory for given target'Modules for Library and path for others None!"I[c Get list of all extensions from  and convert them into .This function add list of harmless extensions wich helps to avoid some parsing errors but doesn't affect already correct parsing results. None !"5IL[c gAll data for given module. This is needed to locate all required information about module by its path.!Module package, like  importify-1.0"Full module name, like Importify.Main#Target of module*8Mapping from module path to its package and module name.+(Directory name for corresponding target.,Extract every $ for given project description.- Extracts  for given $..OExtracts mapping from each package target to its extensions enabled by default./This function extracts *B from given package by given full path to project root directory. Generalized B collector for executables, testsuites and benchmakrs of package. !"#$%&'()*+,-./0123456 !"#$%&'()*+,-./)* !"#$%&'(-/.,+ !"#$%&'()*+,-./0123456None!"I[c !"#$%&'()*+,-./ None!"I[c<Initializes importify logger.=Prints  message.>Prints Info message.?Prints Notice message.@Prints Warning message.APrints Error message.<=>?@A<=>?@A<=A>?@<=>?@ANone !"IQRT[cCEPath to file that stores mapping from module names to their packages.EPath to golden tests.FGPath to JSON-encoded Map from target to its list of default extensions.K:Returns relative path to cabal file under given directory.L:Create given directory and perform given action inside it.M,Walk up till root while unpure predicate is 9. Returns absolute path to directory where predicate is : and suffix of current directory prepended to given file.NTries to read file and then decode) it. If either of two phases fails then , returned and warning is printed to console.BCDEFGHIJKLMNPath to json dataAction from decoded value BCDEFGHIJKLMN GBHFICJDENLKMBCDEFGHIJKLMNNone !"IT[c O0Remote packages, from GitHub or other locations.Q,Local subpackages from exactly this project.S.This data type represents package returned by  stack query command.U  importifyV /home/user/importify/W 0Checks if running in nix shellX,This function finds path to directory where include+ for ghc lies. Filepath looks like this:  ~.stackprograms x86_64-linux ghc-8.0.2libghc-8.0.2/include = This function needed to tell dependencies about files like  "MachDeps.h". TODO: use GHC path from project?YAcquires project using stack path --project-root command.Z.Extract all dependencies with versions using stack list-dependencies shell command.[Takes mapping from package names to their versions and list of packages adding version to each package which is inside dictionary.\Queries list of all local packages for project. If some errors occur then warning is printed into console and empty list returned.]Show full name of S with version.OPQRSTUVWXYZ[\]^OPQRSTVUWXYZ[\]STUVWQROPX]Z\Y[OPQRSTUVWXYZ[\]^None!"I[cA field namer for .8Custom rules for generating lenses. This is similar to  makeFields, but generated type classes have names like  HasPolyFoo instead of HasFooI so they supposed to be used by introducing new constraint aliases. See  for details.None!"*9:;<=?I[cfEnvironment for importify cache command.hPath to local  .importify folderiPath to GHC .h filesj5 if unpacked sources should be stored locally as wellk +  monad described here: 5https://www.fpcomplete.com/blog/2017/07/the-rio-monad| Getter of $~/path/to/project/.importify/symbols folder.}Run importify cache[ command. This function takes current project directory and searches for ghc include path.fghijklmvwxyz{|}~fghijklmvwxyz{|}klmfghijwxv{z|y} fghijklmvwxyz{|}~ None!"I[cMWraps given string into lines non exceeding given length splitting by chars.MWraps given string into lines non exceeding given length splitting by words.None!"I[cJUpdates file name of error location. Sometimes error location looks like - Location: : -1: -1 which is not very helpful. Converts  into  making error look pretty.Pretty printing # list of errors in really nice way.3Prints parse errors if list of errors is not empty.None !"IQRT[cParse module after preproccessing this module with possibly custom preprocessor. It first calls parsing with CPP, then reads  OPTIONS_GHC* to handle custom preprocessors. Now only  autoexporter+ supported among all custom preprocessors.Parse  by given  with given ds converting parser errors into human readable text. Some additional handling is required because haskell-src-exts can't handle -XCPP.#List of extensions from .cabal file Filenames of .h files to includePath to module#List of extensions from .cabal file Filenames of .h files to includePath to module!None!"I[ckRemoves element from list by given index. If there's no element at such index then list returns unchanged.Like % but takes list of indices to remove.None!"$I[c newtype) wrapper for list of unused symbols from hiding.newtype$ wrapper for list of unused symbols."Remove a list of identifiers from s. Next algorithm is used: gRemove all identifiers inside specified list of types. If list becomes empty then only type left. B import Module.Name (Type (HERE)) ! import Module.Name (Type) Traverse every $s and check matching with symbols. Y import Module.Name (Type (something), HERE) ! import Module.Name (Type (something)) /Translate empty imports into implicit import. 1 import Module.Name () ! import Module.Name HRemove all implicit imports preserving only initially implicit or empty.Returns + if the import is of either of the forms: ! import Foo () import Foo  Traverses s to remove symbols from  specs. Traverses ( to remove identifiers from those lists.Removes  points of deleted elements.Returns  if  is not needed.Returns  if . is not needed. On top level elements inside  annotated by p. But this constructor contains list of symbols. So it's needed if at least one element inside list is needed. Traverses s to remove empty non-hiding import specs.8First remove all imports with no lists and then remove  from empty hiding imports.'List of symbols which should be removed'List of hidings which should be removedImports to be purifiedKeep entitity?List of entitiesSpan info with points!Kept entities and info w/o points "None!"I[cLogical implication.4None !"$IT[cRemove unused  qualified as) imports, i.e. in one of the next form: f import qualified Data.List import qualified Data.List as L import Data.List as L  This function ignores imports with explicit import lists because it is running after stage where symbols from explicit list removed.WFor given import collect qualified name. Qualified names gathered using next scheme:  import A ! Nothing import qualified B ! Just B import qualified C as X ! Just X import D as Y ! Just Y ( Used later to determine whether empty  qualified import needed or not.Unused  import A as B#None!"I[cNone !"$:ILT[chThis function takes list of explicitly specified dependencies with versions and caches only them under  .importify| folder inside current directory ignoring .cabal file for project. This function doesn't update mapping from module paths.^Caches packages information into local .importify directory by reading this information from  package-name.cabal file.Collect cache of list of given dependencies. If given dependency is already cached then it's ignored and debug message is printed.This function is passed to  for Hackage dependencies.This function is passed to  for O.;Find .cabal file by given path to package and then collect *. Creates @. .imporitysymbols/ package~ folder where all symbols for given library stored. This function used for both library packages and project package itself. How to get dependency name?4How to cache dependency (unpack for StackDependency)*List of dependencies that should be cachedPath to package Package nameIs package itself is cachingPackage descriptionsPath to package rootPackage name with version%True if project itself is caching now Path like ~....importify/containers-0.5Paths to modulesBuildInfo of current target None !":<=IT[cf&This data type dictates how output of  importify should be outputed.Print to consoleChange file in-placePrint to specified fileRun importify file command with given options.Return result of importify file command.WRemove all unused entities in given module from given list of imports. Algorithm performs next steps: -1. Load environment 0. Collect annotations for module and imports. 1. Remove unused implicit imports. 2. Remove unused symbols from explicit list. 3. Remove unused hidings from explicit lists. 4. Remove unused qualified imports.Annotates module but drops import annotations because they can contain GlobalSymbol annotations and collectUnusedSymbols later does its job by looking for GlobalSymbol&Module where symbols should be removedImports from module $None!"I[c%&'()*+,-./0123456789:;< = > ? @ A B C D D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d efghijklmnopqrssttuuvwxyz{|}~        ! ! " !"#$%&'()*+,-./01234$importify-1.0-HmjHeILY3mZLGd3UIBc6JaImportify.Syntax.TextImportify.Syntax.ScopedImportify.Syntax.ModuleImportify.Syntax.ImportImportify.Resolution.HidingImportify.Resolution.ExplicitImportify.Resolution.ImplicitImportify.PrettyImportify.Cabal.PackageImportify.Cabal.ModuleImportify.Cabal.ExtensionImportify.Cabal.TargetExtended.System.WlogImportify.PathImportify.StackImportify.EnvironmentImportify.ParseExceptionImportify.PreprocessorImportify.TreeImportify.Resolution.QualifiedImportify.Main.CacheImportify.Main.FileImportify.SyntaxHSE ExtensionImportify.Cabal System.WlogDebugExtended.Lens.TH Importify EnvironmentExtended.Data.StrExtended.Data.ListExtended.Data.BoolImportify.ResolutionImportify.MainstripEndLineCommentdebugAST debugLabelInScopedscopedNameInfopullScopedInfounscope anyAnnotationgetModuleTitleisInsideExport modulePragmasgetImportModuleNameisImportImplicitswitchHidingImportsimportNamesWithTables importSlice hidingUsedIn symbolUsedIncollectUnusedSymbolsByresolveModulescollectUnusedImplicitImports isKnownImportremoveImplicitImportsprintLovelyImports readCabalpackageDependenciesextractFromTargetssplitOnExposedAndOther modulePathsbuildInfoExtensionswithHarmlessExtensions ModulesBundle mbPackagembModulembTargetTargetId LibraryId ExecutableId TestSuiteId BenchmarkId ExtensionsMap ModulesMap targetIdDirpackageTargetsextractTargetBuildInfopackageExtensionsextractTargetsMap$fFromJSONModulesBundle$fToJSONModulesBundle$fFromJSONKeyTargetId$fFromJSONTargetId$fToJSONKeyTargetId$fToJSONTargetId$fHashableTargetId$fShowTargetId $fEqTargetId$fGenericTargetId$fShowModulesBundle$fEqModulesBundleinitImportifyLogger printDebug printInfo printNotice printWarning printError importifyPath modulesPath symbolsPath testDataPathextensionsPath importifyDirextensionsFile modulesFile symbolsDir findCabalFile doInsideDir lookupToRootdecodeFileOrMemptyRemotePackages LocalPackages QueryPackageqpNameqpPath qpVersionghcIncludePathstackProjectRootstackListDependenciesupgradeWithVersionsstackListPackagespkgName$fFromJSONStackQueryResult$fEqQueryPackage$fShowQueryPackage$fEqLocalPackages$fMonoidLocalPackages$fEqRemotePackages$fMonoidRemotePackages$fShowStackQueryResultCacheEnvironment_pathToImportify_ghcIncludeDir _saveSourcesRIOrunRIO $fFunctorRIO$fApplicativeRIO $fMonadRIO $fMonadIORIO$fMonadReaderRIO$fMonadThrowRIO$fMonadCatchRIO$fMonadMaskRIOHasSaveSourcesHasGhcIncludeDirHasPathToImportify saveSourcespathToImportify ghcIncludeDir pathToSymbolsrunCache($fHasPolySaveSourcesCacheEnvironmentBool,$fHasPolyPathToImportifyCacheEnvironmentPath+$fHasPolyGhcIncludeDirCacheEnvironmentMaybeModuleParseExceptionMPE setMpeFileeitherParseResultreportErrorsIfAny$fBuildableModuleParseException$fExceptionModuleParseException$fShowModuleParseExceptionparseModuleWithPreprocessor UnusedHidingsgetUnusedHidings UnusedSymbolsgetUnusedSymbols removeImportsremoveUnusedQualifiedImportsimportifyCacheListimportifyCacheProject OutputOptions ToConsoleInPlaceToFileimportifyFileOptionsimportifyFileContent$fShowOutputOptions*haskell-names-0.9.0-223NMukCeUe6VyT6GJPclELanguage.Haskell.Names.TypesNameInfoScopedbaseGHC.BaseFunctorgetModuleNameId-haskell-src-exts-1.18.2-Kjop5wIioOPX4MdOWk71uLanguage.Haskell.Exts.SyntaxModuleStringghc-prim GHC.TypesTrue ModuleNameexportedModules ModulePragma ImportDeclimportReferenceNamestartAndEndLinesSymbol modulelessEq symbolModuleDatFun lossyCompare funPattern datPattern(Language.Haskell.Names.GlobalSymbolTableTableimportStartLineexactPrintImportCabal-1.24.2.0Distribution.PackageDescriptionGenericPackageDescriptiondependencyName allBuildInfosLibrary Executable TestSuite mapTargets BuildInfocabalExtToHseExtcollectTargetsListMaps TargetsMaptargetIdParserfindTargetBuildInfocollectTargetsMapimportifyLoggerConfig withImportifyFalsemempty isCabalFile inNixShellStackQueryResultshStackpathArgsrootArgsdepsArgsverboseFieldsNamerfieldsVerboseLensRulestransformers-0.5.2.0Control.Monad.Trans.ReaderReaderTIOHasPolySaveSourcesHasPolyPathToImportifyHasPolyGhcIncludeDircharWrapwordWrap Language.Haskell.Exts.ParseMonad ParseResult Data.EitherEitherprettyParseErrorsData.List.NonEmptyNonEmptyparseModuleAfterCPP!path-0.6.1-JFVPBZfrkGE3c8fkOd04qa Path.InternalPathLanguage.Haskell.Exts.ExtensionautoexportedArgsremoveAtremoveAtMultiple ImportSpecisVolatileImporttraverseToRemoveThing IThingWithtraverseToRemoveImportSpecListremoveSrcSpanInfoPointsLanguage.Haskell.Exts.SrcLoc SrcSpanInfo isSpecNeeded isNameNeededName ImportParttraverseToClean cleanDecls==> qualifiedNamepossiblyUnusedImportisInsideModulecacheDependenciesWith unpackCacher remoteCacher cachePackagecreatePackageCache cacheProjectlocalPackageDescriptionextractHackageDependenciesparseTargetModulesupdateModulesMapremoveUnusedImportsannotateModuleImportifyFileExceptionIFE importifyAstreadModulesMapreadExtensions getExtensionsloadEnvironment