I5_4      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123Nonem Usage structure a cabal package name of package version !is the package exposed or hidden 3components in the cabal file that use this package fall modules. We keep all modules so that we can try to open non exposed but imported modules directly component in cabal file  test suite test suite name  executable executable name library is the test suite buildable is the executable buildable is the library buildable !#Verbosity settings .(build flags for a specific file 0flags for GHC 1flags for preprocessor 2module name if known 3&component used to get flags, if known 4 complete result for outline 6outline contents 7exports 8imports 9'definition of an import statement ; module name < package name =location in source file >is the import qualified ?3is the import element list for hiding or exposing @ alias name Aspecific import elements B#definition of an import element Dname Etype Flocation in source file G#children (constructor names, etc.) Hdefinition of export Jname Ktype Llocation in source file M#children (constructor names, etc.) NType of import/export directive Oreexport module Pspecific import/ export list Qimport/export everything RAbs SVar T Lexer token Vtype of token W location Xelement of the outline result Zname [#types: can have several to combine \span in source ]children (constructors...) ^type signature if any _comment if any bname c#types: can have several to combine dtype signature if any e/Span inside a file, the file is known and doesn't need to be repeated gstart location h end location i3Location inside a file, the file is known and doesn't need to be repeated kline lcolumn m)type of elements for the outline y.result for building one file: success + names ,data Build1Result=Build1Result Bool [NameDef]  deriving (Show,Read,Eq) $instance ToJSON Build1Result where ( toJSON (Build1Result b ns)= object [r .= b, ns .= map toJSON ns] %instance FromJSON Build1Result where ' parseJSON (Object v) =Build1Result  $  v .: r  *  v .: ns  parseJSON _= mzero #which cabal file to use operations z1use temporary file that was saved in temp folder {use proper file |!result: success + files impacted ~esimple type encapsulating the fact the operations return along with notes generated on files a note on a source file status of the note message where the note is location of a note/%error (lines and columns start at 1)  source file line column  end line  end line "status of notes: error or warning the state we keep name of temporary folder path to the cabal executable path of the project cabal file verbosity of logging flags to pass cabal #extra arguments to cabal configure  State type construct a file span Econstructs an OutlineDef with no children and no type signature Bconstructs an OutlineDef with children and no type signature .get the full path for the temporary directory Wget the full path for the temporary dist directory (where cabal will write its output) @get full path in temporary folder for source file (i.e. where we'<re going to write the temporary contents of an edited file) -get the full, canonicalized path of a source get the full path of a source 7copy a file from the normal folders to the temp folder 0replace relative file path by module name http:book.realworldhaskell.orgread:io-case-study-a-library-for-searching-the-filesystem.html http:book.realworldhaskell.orgread:io-case-study-a-library-for-searching-the-filesystem.html ;delete files in temp folder but not in real folder anymore Fdebug method: fromJust with a message to display when we get Nothing ?remove a base directory from a string representing a full path #nub for Ord objects: use a set 8debug method to vaguely format JSON result to dump them   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ start line  start column  end line  end column name #types: can have several to combine span in source name #types: can have several to combine span in source children (constructors...) relative path of source file relative path of source file relative path of source file  copy even if temp file is newer relative path of source file =return Just the file if copied, Nothing if no copy was done 456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~|}y{zmxwvutsrqponijklefgh`abcdXYZ[\]^_TUVWNSRQPOHIJKLMBCDEFG9:;<=>?@A45678./0123&'()*+,-!%$#"     _      !%$#"&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNSRQPOTUVWXYZ[\]^_`abcdefghijklm xwvutsrqpony{z|}~456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYNoneZ simple type for search function [?get the file storing the information for the given source file \?get the file storing the information for the given source file ]remove the storage file ^store the build flags _.generate the JSON from the typechecked module c this incorporates info from the renamed source with types annotations from the typechecked source `store the GHC generated AST a!read the GHC AST as a JSON value b/read the build flags and notes as a JSON value c?utility function to store the given value under the given key d7read the top JSON value containing all the information ewrite the usage info file fread the usage info file grconvert a Data into a JSON value, with specific treatment for interesting GHC AST objects, and avoiding the holes h.find in JSON AST and return the string result ifind in JSON AST jfind in JSON AST k+sort Value by position, descending l@overlap function: find whatever is at the given line and column mDcontains function: find whatever is contained inside the given span n9isGHCType function: find whatever has the proper GHCType o"extract the source span from JSON p&extract the source location from JSON q"resolve the type of an expression r*Reduce type-level applications by pushing s@ arguments on a stack and binding them in an environment at the  appropriate tN. Class constraints that have no free variables after reduction are removed. #Z[the source file \the source file ]the source file ^the source file build flags and notes _`the source file  the GHC AST athe source file bthe source file cthe source file +the key under which the value will be put  the value dthe source file ethe source file  the value fthe source file guvwxyzh should the output be qualified? "should the output be fully typed? result of search {ithe evaluation function $the root object containing the AST jthe evaluation function $the root object containing the AST klline column m start line  start column  end line  end column n|$the root object containing the AST }~opqr#Z[\]^_`abcdefguvwxyzh{ijklmn|}~opqr#Z[\]^_`abcdefguvwxyzh{ijklmn|}~opqrNonemodule, function/type, constructors get the GHC typechecked AST 0perform an action on the GHC Typechecked module &perform an action on the GHC JSON AST 5the main method loading the source contents into GHC Convert  to '[BWNote]'. BThis will mix warnings and errors, but you can split them back up  by filtering the '[BWNote]' based on the  bw_status. get all names in scope -get all names in scope, packaged in NameDefs -get all names in scope, packaged in NameDefs get the thing at a particular point (line/column) in the source 0 this is using the saved JSON info if available get the thing at a particular point (line/column) in the source 0 this is using the saved JSON info if available @convert a GHC SrcSpan to a Span, ignoring the actual file info )convert a GHC SrcSpan to a BWLocation Mconvert a column info from GHC to our system (1 based) =convert a column info from our system (1 based) to GHC LGet a stream of tokens generated by the GHC lexer from the current document +like lexTokenStream, but keep Haddock flag _Filter tokens whose span appears legitimate (start line is less than end line, start column is  less than end column.) EConvert a GHC token to an interactive token (abbreviated token type) NGenerate the interactive token list used by EclipseFP for syntax highlighting &Extract occurrences based on lexing OParse the current document, generating a TokenDef list, filtered by a function LPreprocess some source, returning the literate and Haskell source as tuple. -convert a GHC error message to our note type /convert a GHC warning message to our note type .remove the initial status text from a message make unqualified token ?make qualified token: join the qualifier and the name by a dot JMake a token definition from its source location and Lexer.hs token type. (mkTokenDef :: Located Token -> TokenDef FmkTokenDef (L sp t) = TokenDef (mkTokenName t) (ghcSpanToLocation sp) clean imports 8the source file the base directory the module name the GHC options  the action the source file the base directory the module name the GHC options  the action the source file the base directory the module name the GHC options *the final action to perform on the result .transform given file path to find bwinfo path the base directory  what to load the GHC options the GHC options *the final action to perform on the result .transform given file path to find bwinfo path the base directory  what to load add the target? base directory  GHC messages  source path base directory  module name build options  source path base directory  module name build options  source path base directory  module name build options line column A -> Bool ^ do we want the result qualified by the module E -> Bool ^ do we want the full type or just the haddock type source file path base directory  module name  build flags  start line  start column  end line  end column source file path base directory  module name  build flags Base directory The file path to the document  The document' s contents  The options <Project root or base directory for absolute path conversion Contents to be parsed Token value to find 9Literate source flag (True = literate, False = ordinary) Options  The project's root directory ,The current document contents, to be parsed Literate Haskell flag  The options 0Transform function from GHC tokens to TokenDefs The TokenDef filter function the source contents is the source literate Haskell ;the preprocessor tokens and the final valid Haskell source  the name the qualifier  the name  source path base directory  module name build options format? 775None get the AST $get the ouline from the AST $get the ouline from the AST build the comment map get the import/export declarations -convert a HSE span into a buildwrapper span #all known extensions, as string  input text options the commented AST the commented AST =the map: key is line, value is start column and comment text  the comment  the AST    None!Types of cabal package databases GFetch the installed package info from the global and user package.conf 4 databases, mimicking the functionality of ghc-pkg. 8Read the contents of the given directory, searching for .conf files, and parse the K package contents. Returns a singleton list (directory, [installed packages]) )the path to the cabal-dev sandbox if any The package database Installed packages None .the cabal build info for a specific component the build info the component local build info (the folder to build that component into is the component the library Pthe module name and corresponding source file for each contained Haskell module the component handle run cabal build run cabal build run cabal configure $get the full path to the cabal file 2get Cabal build info, running configure if needed 'run a action with the cabal build info 7parse cabal error messages and transform them in notre parse messages from build add a message to the note (get the path of a file getting compiled )canonicalize the paths in the build info  Aapply a function on the build info modules and paths, in a monad  5apply a function on the build info modules and paths  +get the build info for a given source file J if a source file is in several component, get the first one  'get GHC options for a file  get CPP options for a file get the cabal extensions +get the source directory from a build info Kget all components, referencing all the files found in the source folders Wget all components, referencing only the files explicitely indicated in the cabal file )convert a ModuleName to a String %get all components in the Cabal file +get all the dependencies in the cabal file ]get all dependencies from the package description and the list of installed packages 8get all components from the package description 0>do we want output (True) or just compilation without linking? &use original cabal or temp cabal file can we rerun configure again >do we want output (True) or just compilation without linking? &use original cabal or temp cabal file &use original cabal or temp cabal file 8return the build info on success, or Nothing on failure &use original cabal or temp cabal file &use original cabal or temp cabal file &use original cabal or temp cabal file %action to run if we get a build info @the result of the action, or Nothing if we could get Cabal info  cabal file path to cabal executable  error output path to cabal executable  cabal file path to cabal executable line  cabal file path to cabal executable the dist directory the build output the cabal file  the dist dir original note message lines the message line the path if we could parse it  the function to apply the original build info  the result  the function to apply the original build info  the result  the source file 8the cabal component to use, or Nothing if not specified  the cabal info ,the module name and the options to pass GHC  the cabal info the list of CPP options the cabal info %the module name and cabal extensions the build info &the source paths, guaranteed non null the build info )the path to the cabal-dev sandbox if any the result is an array of tuples: the path to the package database, the list of packages in that db that the Cabal file references the cabal description 5the installed packages, by package database location 6the referenced packages, by package database location the package description the package description 0     0     )     None8copy all files from the project to the temporary folder synchronize one file only !write contents to temporary file run cabal configure  run cabal build !!generate usage information files "build one source file in GHC #build one source file in GHC $preprocess a file %&get the build flags for a source file &3get haskell-src-exts commented AST for source file '(get GHC typechecked AST for source file (!perform an action on the GHC AST *get outline for source file ++get all occurrences of a token in the file 'get lexer token types for source file -get thing at point .get locals identifiers /1get all names in scope (GHC API) 0get cabal dependencies 1get cabal components 2clean imports in a source file [if true copy all files, if false only copy files newer than their corresponding temp files ;return the list of files copied, the list of files deleted balways copy the file, if false only copy the file if it is newer than its corresponding temp file &the source file in the project folder 1return Nothing if no copy or Just file if copied 'the source file in the project folder the contents use the source or temp cabal True if configure succeeded  >do we want output (True) or just compilation without linking? &use original cabal or temp cabal file !5should we return all files or only the changed ones? the cabal component name "the source file 9the cabal component to use, or Nothing if not specified +Just names in scope if build is successful #the source file 9the cabal component to use, or Nothing if not specified True if build is successful $the build flags the file to preprocess the resulting code %the source file 9the cabal component to use, or Nothing if not specified &the source file 9the cabal component to use, or Nothing if not specified 'the source file 9the cabal component to use, or Nothing if not specified (the source file 9the cabal component to use, or Nothing if not specified )the source file 9the cabal component to use, or Nothing if not specified * source file 9the cabal component to use, or Nothing if not specified +the source file ,the source file the token to search for 9the cabal component to use, or Nothing if not specified -the source file  the line  the column 9the cabal component to use, or Nothing if not specified 6 -> Bool -- ^ do we want the result qualified? 2 -> Bool -- ^ do we want the result typed? .the source file the start line the start column  the end line the end column 9the cabal component to use, or Nothing if not specified /9the cabal component to use, or Nothing if not specified 012the source file format? 9the cabal component to use, or Nothing if not specified 3 everything?  !"#$%&'()*+,-./0123 !"#$%&'()*+,-./0123 !"#$%&'()*+,-./0123      !"#$%&'()*+,--./012344567899:;<==>?@ABCDEEFGHIJJKLMNOPQRSTUUVWXXYZ[\]^__`abccdeffghijklmnopqrstuvwxxyzz{|}~~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkijlmnopqrstuvwxyz{|}~        buildwrapper-0.7.1"Language.Haskell.BuildWrapper.Base!Language.Haskell.BuildWrapper.GHC#Language.Haskell.BuildWrapper.Cabal!Language.Haskell.BuildWrapper.API(Language.Haskell.BuildWrapper.GHCStorageGHCMessages!Language.Haskell.BuildWrapper.Src&Language.Haskell.BuildWrapper.PackagesUsage usPackageusModuleusName usSectionusTypeusLocusDef LoadContents MultipleFilelmFiles SingleFilelmFilelmModule ImportCleanicSpanicText CabalPackagecpName cpVersion cpExposed cpDependent cpModulesCabalComponent CCTestSuite ccTestName CCExecutable ccExeName CCLibrary ccBuildable Verbosity DeafeningVerboseNormalSilent ThingAtPointtapName tapModuletapTypetapQTypetapHTypetapGType BuildFlagsbfAst bfPreproc bfModName bfComponent OutlineResult orOutline orExports orImports ImportDefiModuleiPackageiLoc iQualifiediHidingiAlias iChildren ImportSpecDefisNameisTypeisLoc isChildren ExportDefeNameeTypeeLoc eChildrenImportExportTypeIEModule IEThingWith IEThingAllIEAbsIEVarTokenDeftdNametdLoc OutlineDefodNameodTypeodLoc odChildren odSignature odCommentNameDefndNamendType ndSignature InFileSpanifsStartifsEnd InFileLociflLine iflColumnOutlineDefTypeSplice ConstructorFieldInstanceTypeSynPatternFunctionFamilyDataClass WhichCabalTargetSource BuildResultOpResultBWNote bwnStatusbwnTitle bwnLocation BWLocationbwlSrcbwlLinebwlCol bwlEndLine bwlEndCol BWNoteStatus BWWarningBWErrorBuildWrapperState tempFolder cabalPath cabalFile verbosity cabalFlags cabalOpts BuildWrapperreadObj mkEmptySpan isBWNoteError ifsOverlap iflOverlap mkFileSpan mkOutlineDefmkOutlineDefWithChildrengetFullTempDir getDistDir getTargetPathcanonicalizeFullPath getFullSrc copyFromMainisSourceMoreRecent fileToModulecabalComponentName getLoadFilesgetRecursiveContentsgetRecursiveContentsHidden deleteGhosts deleteTempdeleteGenerated fromJustDebug removeBaseDirnubOrd formatJSONreadFile writeFilewithBinaryFileFinalImportMapFinalImportValueTypeMap ImportMapAliasMap PPBehaviorStartIndentContinueGHCApplyFunctiongetASTwithAST withJSONAST withASTNotesinitGHCghcWithASTNotesghcMessagesToNotesgetGhcNamesInScopegetGhcNameDefsInScope getGhcNameDefsInScopeLongRunningname2ndgetThingAtPointJSON getLocalsJSONghcSpanToLocationghcSpanToBWLocationghcColToScionColscionColToGhcColghctokensArbitrarylexTokenStreamHlexLoc lexerFlags ofInterest tokenToTypetokenTypesArbitrary occurrencesgenerateTokenspreprocessSourceghcErrMsgToNoteghcWarnMsgToNote ghcMsgToNote removeStatusmkUnqualTokenValuemkQualifiedTokenValue mkTokenName tokenTypedotFS tokenValuestartendghcImportToUsage ghcLIEToUsageghcExportToUsageghcNameToUsage ghcImportMapghcCleanImportsCabalBuildInfo cbiBuildInfocbiComponentBuildInfocbiBuildFolder cbiIsLibrarycbiModulePaths cbiComponentgetCabalLibraryVersiongetFilesToCopycabalV cabalBuild cabalBuild'cabalConfigure getCabalFile cabalInit withCabalparseCabalMessagessetupExe dropPrefixesstripPrefixIfNeeded addCurrentcabalErrorLineparseBuildMessagesvalidLocreadIntmakeNote getBuiltPathcanonicalizeBuildInfoonModulePathsM onModulePaths getBuildInfofileGhcOptionsfileCppOptionscabalExtensions getSourceDirs getAllFilesgetReferencedFilesstringToModuleNamemoduleToStringcabalComponentscabalDependencies dependenciescabalComponentsFromDescriptioncabalComponentsDependenciescabalComponentFromLibrarycabalComponentFromExecutablecabalComponentFromTestSuite synchronize synchronize1write configurebuild generateUsagebuild1build1LongRunningpreproc getBuildFlags getGHCAST withGHCAST withGHCAST' getOutline getTokenTypesgetOccurrencesgetThingAtPoint getLocalsgetNamesInScopegetCabalDependenciesgetCabalComponents cleanImportsclean$fFromJSONImportClean$fToJSONImportClean$fFromJSONCabalPackage$fToJSONCabalPackage$fFromJSONCabalComponent$fToJSONCabalComponent$fFromJSONThingAtPoint$fToJSONThingAtPoint$fFromJSONBuildFlags$fToJSONBuildFlags$fFromJSONOutlineResult$fToJSONOutlineResult$fFromJSONImportDef$fToJSONImportDef$fFromJSONImportSpecDef$fToJSONImportSpecDef$fFromJSONExportDef$fToJSONExportDef$fFromJSONImportExportType$fToJSONImportExportType$fFromJSONTokenDef$fToJSONTokenDef$fFromJSONOutlineDef$fToJSONOutlineDef$fFromJSONNameDef$fToJSONNameDef$fFromJSONInFileSpan$fToJSONInFileSpan$fFromJSONOutlineDefType$fToJSONOutlineDefType$fFromJSONBuildResult$fToJSONBuildResult$fFromJSONBWNote$fToJSONBWNote$fFromJSONBWLocation$fToJSONBWLocation$fFromJSONBWNoteStatus$fToJSONBWNoteStatusFindFunc getInfoFile getUsageFile clearInfostoreBuildFlagsInfogenerateGHCInfo storeGHCInfo readGHCInforeadBuildFlagsInfo setStoredInforeadStoredInfo setUsageInfo getUsageInfo dataToJSONfindInJSONFormatted findInJSON findAllInJSONlastPosoverlapcontains isGHCTypeextractSourceSpanextractSourceLoc typeOfExpr reduceType ghc-7.6.2TypeRepAppTyForAllTyshowSD showSDUser showSDDump srcSpanToJSON srcLocToJSONtypesInsideTypefindInJSONData extractUsages extractName extractSource $fMonoidBag getHSEAST getHSEOutlinegetModuleLocationbuildCommentMapgetHSEImportExportmakeSpanknownExtensionNamesnameDecl cnameDecl qnameDecl mnnameDeclCabalPkgDBType getPkgInfos readContentsInstalledPackagesListPkgFile PkgDirectoryInstalledPackageInfoString getLibDir